:root {
  --hub-accent: #087e8b;
  --hub-accent-strong: #066c77;
  --hub-accent-soft: #e7f3f4;
  --hub-accent-line: #c8e3e5;
  --hub-ink: #243443;
  --hub-muted: #748391;
  --hub-line: #e3e9ec;
  --hub-canvas: #f5f8f9;
}

body { color: var(--hub-ink); background: var(--hub-canvas); }
.admin-side, .panel, .project-tab, .admin-main .panel { background-color: #fff; }
.admin-side { border-color: var(--hub-line); }
#commonNav a.active, #adminNav a.active,
#commonNav a[aria-current="page"], #adminNav a[aria-current="page"] {
  color: var(--hub-accent-strong); background: var(--hub-accent-soft);
}
#commonNav a.active .nav-icon, #adminNav a.active .nav-icon { color: var(--hub-accent); }
.admin-mark { background: var(--hub-accent); }
.project-tab.active { color: var(--hub-accent-strong); border-color: var(--hub-accent); }
.primary-button, .button.primary, .admin-main button.primary,
.admin-main .primary-button, .admin-main .primary-action {
  background: var(--hub-accent); border-color: var(--hub-accent); color: #fff;
  box-shadow: none;
}
.primary-button:hover, .button.primary:hover, .admin-main button.primary:hover,
.admin-main .primary-button:hover, .admin-main .primary-action:hover { background: var(--hub-accent-strong); }
.row-action, .link-mini, .export-button { color: var(--hub-accent); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline-color: var(--hub-accent); border-color: var(--hub-accent-line);
}
.metric-badge, .calendar-modes button.chosen, .calendar-day.selected { background-color: var(--hub-accent-soft); color: var(--hub-accent-strong); }
.calendar-day.selected { background: var(--hub-accent); color: #fff; }
.bar { background: #48a7ad; }
.bar.alt { background: #c7e3e4; }
.progress i, .capacity-track i { background: var(--hub-accent); }
.blue-dot { background: var(--hub-accent); }
.project-notice { background: #eff6f6; }

/* The native Mashup admin owns its own layout; match its teal palette to the hub. */
body.mashup-native-admin .mashup-native-frame { background: var(--hub-canvas); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Unified teal command bar for project admin pages */
.global-header {
  height: 64px;
  padding: 0 18px;
  color: var(--hub-ink);
  background: linear-gradient(105deg, #eef6f6 0%, #f8fbfb 42%, #f1f7f7 100%);
  border-bottom: 1px solid #dce8e9;
  box-shadow: 0 3px 14px #203d4509;
}
.global-brand { gap: 11px; color: var(--hub-ink); }
.global-brand b { color: #203943; letter-spacing: .07em; }
.global-brand small { color: #74858b; }
.brand-cube {
  background: linear-gradient(145deg, #e0f0ef, #edf6f5);
  color: var(--hub-accent);
  box-shadow: inset 0 0 0 1px #d1e5e4, 0 2px 5px #1f596008;
}
.header-divider { border-color: #dce7e8; }
.global-nav { gap: 5px; }
.global-nav { height: 100%; align-items: center; }
.global-nav-item {
  position: relative;
  justify-content: center;
  gap: 8px;
  height: 46px;
  margin: 0 2px;
  padding: 0 17px;
  color: #60727a;
  font-size: 11px;
  font-weight: 520;
  border: 0;
  border-radius: 10px;
  transition: color .16s ease, background-color .16s ease;
}
.global-nav-item::after {
  position: absolute;
  right: 15px;
  bottom: 3px;
  left: 15px;
  height: 2px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
}
.global-nav-item:hover { color: var(--hub-accent-strong); background: #eaf4f3; }
.global-nav-item.active,
.global-nav-item[aria-current="page"] {
  color: var(--hub-accent-strong);
  background: linear-gradient(180deg, #eaf5f4 0%, #f2f8f7 100%);
  border-color: transparent;
  font-weight: 650;
}
.global-nav-item.active::after,
.global-nav-item[aria-current="page"]::after { background: var(--hub-accent); }
.global-nav-item .global-icon,
.global-nav-item span { color: currentColor; }
.header-service-tools {
  gap: 10px;
  margin-right: 10px;
  padding-right: 12px;
  border-color: #dce7e8;
}
.header-service-tools .local-status { color: #5e7779; font-size: 10px; }
.header-service-tools .local-status i {
  width: 7px;
  height: 7px;
  background: #38a889;
  box-shadow: 0 0 0 3px #38a88918;
}
.header-service-tools .refresh-btn,
.notice-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dce8e8;
  border-radius: 9px;
  background: #ffffffd9;
  color: #527076;
  box-shadow: 0 1px 2px #23495008;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.header-service-tools .refresh-btn { flex-basis: 34px; font-size: 18px; }
.header-service-tools .refresh-btn:hover,
.notice-button:hover {
  color: var(--hub-accent-strong);
  border-color: #b9d8d7;
  background: #eaf5f4;
}
.header-service-tools .refresh-btn:active,
.notice-button:active { transform: scale(.96); }
.notice-button { margin-right: 10px; }
.notice-button .notice-icon { width: 18px; height: 18px; }
.notice-button i { right: 5px; top: 4px; box-shadow: 0 0 0 2px #f7fafa; }
.header-user {
  min-height: 36px;
  gap: 9px;
  padding-left: 12px;
  border-left: 1px solid #dce7e8;
  color: #42575e;
  font-size: 11px;
}
.global-avatar {
  width: 32px;
  height: 32px;
  border-color: #d0e4e3;
  background: #e4f1f0;
  color: var(--hub-accent-strong);
  font-size: 12px;
}
.user-chevron { color: #829396; margin-left: 2px; }
.global-logout {
  min-width: 52px;
  height: 32px;
  margin-left: 2px;
  padding: 0 12px;
  border: 1px solid #cfe0e0;
  border-radius: 8px;
  background: #f9fcfc;
  color: #42666a;
  cursor: pointer;
  font: 550 11px "Noto Sans SC", sans-serif;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.global-logout:hover { border-color: #9fcac7; background: #e8f4f3; color: #066c77; }
.global-logout:focus-visible,
.header-service-tools .refresh-btn:focus-visible,
.notice-button:focus-visible,
.global-nav-item:focus-visible { outline: 2px solid #72b5b2; outline-offset: 2px; }
.header-popover-anchor, .header-user { position: relative; }
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #42575e;
  cursor: pointer;
  font: 550 11px "Noto Sans SC", sans-serif;
  transition: background .16s ease, border-color .16s ease;
}
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: #eaf5f4; border-color: #d8eae8; }
.account-trigger:focus-visible { outline: 2px solid #72b5b2; outline-offset: 2px; }
.header-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  width: 310px;
  padding: 14px;
  border: 1px solid #dce8e9;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 36px #263e451c, 0 2px 6px #263e4509;
  color: var(--hub-ink);
}
.header-popover[hidden] { display: none; }
.notice-popover { right: -46px; }
.popover-heading { display: flex; justify-content: space-between; align-items: center; padding: 1px 1px 11px; border-bottom: 1px solid #edf1f1; }
.popover-heading b { font-size: 13px; font-weight: 650; }
.popover-heading button { width: 25px; height: 25px; border: 0; border-radius: 7px; background: transparent; color: #7b8a8e; cursor: pointer; font-size: 18px; }
.popover-heading button:hover { background: #eef6f5; color: var(--hub-accent-strong); }
.notice-content { max-height: 310px; overflow: auto; }
.notice-group-label { padding: 12px 1px 5px; color: #849396; font-size: 10px; font-weight: 600; }
.notice-item { display: flex; gap: 9px; padding: 10px 1px; border-bottom: 1px solid #f0f3f3; }
.notice-item:last-child { border-bottom: 0; }
.notice-item>i { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #d88753; box-shadow: 0 0 0 3px #d8875318; }
.notice-item>i.is-online { background: #35a783; box-shadow: 0 0 0 3px #35a78318; }
.notice-item>div { min-width: 0; }
.notice-item b { display: block; color: #33494e; font-size: 11px; font-weight: 600; }
.notice-item p { margin: 3px 0; color: #718184; font-size: 10px; line-height: 1.5; }
.notice-item time, .notice-loading { color: #a0acad; font-size: 9px; }
.notice-empty { display: grid; justify-items: center; gap: 5px; padding: 24px 8px; text-align: center; }
.notice-empty>span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #e8f5f0; color: #289273; font-size: 15px; }
.notice-empty b { color: #52676b; font-size: 11px; }
.notice-empty small { color: #9aa8aa; font-size: 9px; }
.notice-error { padding: 17px 6px; color: #a76050; font-size: 10px; line-height: 1.6; }
.popover-link { display: flex; justify-content: space-between; align-items: center; margin: 8px -3px -4px; padding: 10px 5px 3px; border-top: 1px solid #edf1f1; color: var(--hub-accent-strong); text-decoration: none; font-size: 10px; font-weight: 600; }
.popover-link:hover { color: #044f57; }
.account-popover { width: 250px; }
.account-popover-user { display: flex; align-items: center; gap: 10px; padding: 3px 2px 12px; border-bottom: 1px solid #edf1f1; }
.account-popover-user>span:last-child { display: grid; gap: 3px; }
.account-popover-user b { color: #354b50; font-size: 12px; }
.account-popover-user small, .account-popover-note { color: #859396; font-size: 9px; }
.account-popover-note { padding: 11px 2px; line-height: 1.5; }
.account-logout { width: 100%; height: 32px; border: 1px solid #e4ebeb; border-radius: 8px; background: #fff; color: #536a6d; cursor: pointer; font: 550 10px "Noto Sans SC", sans-serif; }
.account-logout:hover { border-color: #efc8c2; background: #fff7f5; color: #a65348; }
@media (max-width: 900px) {
  .global-header { padding-right: 12px; padding-left: 12px; }
  .global-brand { min-width: 180px; }
}
@media (max-width: 600px) {
  .global-header { height: 54px; padding: 0 10px; }
  .global-brand { min-width: 0; gap: 8px; }
  .brand-cube { width: 30px; height: 30px; }
  .global-nav-item { padding: 0 10px; }
  .header-service-tools { gap: 7px; margin-right: 6px; padding-right: 7px; }
  .header-service-tools .refresh-btn,
  .notice-button { width: 29px; height: 29px; }
  .header-service-tools .refresh-btn { flex-basis: 29px; }
  .notice-button { margin-right: 5px; }
  .header-user { gap: 6px; padding-left: 7px; }
  .global-avatar { width: 28px; height: 28px; }
  .global-logout { min-width: 42px; height: 28px; padding: 0 8px; }
  .account-trigger { gap: 6px; min-height: 32px; padding: 0 4px; }
  .account-trigger [data-global-admin-name] { max-width: 62px; overflow: hidden; text-overflow: ellipsis; }
  .header-popover { position: fixed; top: 60px; right: 10px; width: min(310px, calc(100vw - 20px)); }
  .account-popover { width: min(250px, calc(100vw - 20px)); }
}
