:root {
  --ink: #142d3b;
  --muted: #657a7f;
  --primary: #087f78;
  --primary-hover: #066b64;
  --navy: #142d3b;
  --bg: #f7f8f2;
  --card: #ffffff;
  --line: #dce7e5;
  --soft: #bceed9;
  --danger: #a9363a;
  --radius: 14px;
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

body { background: var(--bg); }
h1, h2, h3, .metric-value { font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; }
h1 { color: #142d3b; font-size: clamp(1.8rem, 2.4vw, 2.3rem); letter-spacing: -.055em; }
h2 { color: #142d3b; font-size: 1.08rem; letter-spacing: -.025em; }
p { line-height: 1.6; }
:focus-visible { outline: 3px solid #f47c68; outline-offset: 3px; }
input:focus, select:focus { outline: 3px solid #9cc9c6; outline-offset: 1px; border-color: var(--primary); }

.app-shell { grid-template-columns: 252px minmax(0, 1fr); background: var(--bg); }
.sidebar {
  padding: 28px 18px 22px;
  background: var(--navy);
  border-right: 1px solid #17444a;
  box-shadow: 8px 0 28px #153d3b0a;
}
.sidebar-brand { padding: 0 10px 34px; gap: 12px; }
.sidebar-brand .brand-mark, .login-brand .brand-mark {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}
.sidebar-brand strong, .login-brand strong { font-size: 1.7rem; letter-spacing: -.07em; }
.sidebar-caption { padding: 0 12px 13px; color: #a7c2c2; letter-spacing: .16em; }
.navigation { gap: 23px; }
.nav-group { display: flex; flex-direction: column; gap: 5px; }
.nav-section-label {
  padding: 0 13px 5px;
  color: #8faeb0;
  font-size: .61rem;
  font-weight: 750;
  letter-spacing: .14em;
}
.button.nav-item {
  min-height: 45px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #ccdddd;
  font-size: .81rem;
  font-weight: 550;
  gap: 11px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.button.nav-item:hover { background: #ffffff10; color: #fff; transform: translateX(2px); }
.button.nav-item[aria-current=page] {
  border-color: #ffffff16;
  background: #ffffff16;
  color: #fff;
  box-shadow: inset 3px 0 #f47c68;
  font-weight: 700;
}
.nav-icon {
  display: inline-flex;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffffff20;
  border-radius: 8px;
  color: #b9d8d3;
  font-size: .95rem;
  line-height: 1;
}
.nav-item[aria-current=page] .nav-icon { border-color: #d5ebe333; background: #e5f4ee18; color: #dcefe6; }
.sidebar-bottom { border-color: #ffffff20; padding: 19px 12px 0; color: #c1d7d4; }
.sidebar-bottom .small { color: #9db9b8; }
.status-dot { width: 8px; height: 8px; background: #7dc7a6; box-shadow: 0 0 0 4px #7dc7a622; }

.app-main { min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 76px;
  padding: 15px clamp(22px, 3vw, 46px);
  border-bottom-color: #e2eae8;
  background: #ffffffed;
  backdrop-filter: blur(14px);
}
.topbar strong { color: #23434a; font-size: .86rem; }
.workspace-heading { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.workspace-heading .workspace-label { color: #0b7376; font-size: .59rem; font-weight: 750; letter-spacing: .12em; }
.workspace-heading .workspace-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .small { color: #74868a; font-size: .72rem; }
.topbar-actions { gap: 10px; }
.topbar-actions .button.ghost:first-child {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #25464c;
  background: #fff;
}
.topbar-actions .button.ghost:last-child { color: #6b7f82; }
.topbar>select { max-width: 220px; min-height: 40px; border-color: var(--line); }
.content { max-width: 1580px; padding: clamp(28px, 3.2vw, 48px) clamp(22px, 3vw, 46px) 60px; }
.page-heading { align-items: flex-end; margin-bottom: 27px; }
.page-heading .eyebrow { margin-bottom: 8px; color: #0b7376; font-size: .64rem; letter-spacing: .13em; }
.page-heading .muted { max-width: 760px; margin-top: 9px; color: #6b7e82; font-size: .86rem; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.date-chip { display: inline-flex; min-height: 38px; align-items: center; padding: 7px 12px; border: 1px solid #dce7e5; border-radius: 9px; background: #fff; color: #62777b; font-size: .75rem; font-weight: 600; white-space: nowrap; }

.button {
  min-height: 43px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: .81rem;
  font-weight: 650;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.button.primary { background: var(--primary); box-shadow: 0 4px 12px #0b6b7326; }
.button.primary:hover { background: var(--primary-hover); box-shadow: 0 6px 16px #0b6b7333; transform: translateY(-1px); }
.button.secondary { border-color: #d6e2e0; background: #fff; color: #26474d; }
.button.secondary:hover { border-color: #adc9c5; background: #f9fcfb; }
.button.ghost { color: #087f78; }
.button.ghost:hover { background: #eaf4f2; }

.metrics { gap: 16px; margin-bottom: 22px; }
.metric {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  padding: 20px 21px;
  border: 1px solid #e0e9e7;
  border-radius: 13px;
  background: var(--card);
  box-shadow: 0 2px 8px #163b3b08;
  transition: transform .18s ease, box-shadow .18s ease;
}
.metric:hover { transform: translateY(-2px); box-shadow: 0 9px 22px #163b3b10; }
.metric-icon {
  position: absolute;
  top: 17px;
  right: 17px;
  display: flex;
  width: 33px;
  height: 33px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfe3df;
  border-radius: 10px;
  background: #eff7f5;
  color: var(--primary);
  font-size: 1rem;
}
.metric:nth-child(2) .metric-icon { border-color: #efe1c6; background: #fbf5e9; }
.metric:nth-child(3) .metric-icon { border-color: #d4e2ef; background: #eff4f9; }
.metric>p:first-child { max-width: calc(100% - 45px); color: #687d81; font-size: .73rem; font-weight: 650; }
.metric-value { display: block; padding: 14px 0 6px; color: #183b42; font-size: 2.45rem; font-weight: 700; letter-spacing: -.075em; line-height: 1; }
.metric>p:last-child { color: #738589; font-size: .71rem; }
.dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(285px, .9fr); gap: 18px; }
.section-panel {
  margin-bottom: 18px;
  padding: 23px 24px;
  border: 1px solid #e0e9e7;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 2px 8px #163b3b08;
}
.section-heading { margin-bottom: 15px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-panel>.muted { color: #718287; }
.list-row { padding: 15px 0; border-color: #edf1f0; }
.list-row strong { color: #24444a; }
.list-row .muted { color: #74868a; }
.step-number { border: 1px solid #bceed9; background: #eff8f3; color: #087f78; }
.badge { padding: 5px 9px; border-radius: 999px; font-size: .67rem; }
.badge.active { background: #e4f3eb; color: #256645; }
.badge.inactive { background: #edf1f1; color: #627276; }
.assistant-card {
  border: 1px solid #d5e8e2;
  border-radius: 13px;
  background: linear-gradient(145deg, #eff8f4, #e4f1ed);
  color: #24464b;
  padding: 25px;
}
.assistant-orb { width: 52px; height: 52px; margin-bottom: 20px; border: 1px solid #bceed9; border-radius: 15px; background: #f7f8f2; }
.assistant-symbol { display: block; width: 100%; height: 100%; object-fit: contain; }
.assistant-card .eyebrow { margin-bottom: 7px; color: #087f78; }
.assistant-card h2 { margin-bottom: 10px; color: #143b40; font-size: 1.45rem; }
.assistant-card p { font-size: .81rem; }
.assistant-rules { margin: 17px 0; color: #446165; font-size: .75rem; }
.assistant-rules li { margin: 6px 0; }
.phone-note { border-color: #cfe2dc; color: #5e7779; }
.phone-note strong { color: #183f44; }

.resource-grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 16px; }
.resource-card { min-height: 220px; padding: 21px; border-color: #e0e9e7; border-radius: 13px; box-shadow: 0 2px 8px #163b3b08; transition: transform .18s ease, box-shadow .18s ease; }
.resource-card:hover { transform: translateY(-2px); box-shadow: 0 9px 22px #163b3b10; }
.resource-top { margin-bottom: 18px; }
.resource-monogram { border: 1px solid #bceed9; border-radius: 11px; background: #eff8f3; color: #087f78; }
.resource-card h2 { margin-bottom: 6px; }
.resource-card .muted { color: #718287; }
.empty-state { min-height: 260px; border-color: #d5e3e0; border-radius: 13px; background: #fff; }
.empty-symbol { border: 1px solid #bceed9; border-radius: 14px; background: #eff8f3; color: #087f78; }
.info-panel { border-color: #dbe8e5; border-radius: 13px; background: #edf5f3; }
.notice { border-left-color: #087f78; background: #eff8f3; color: #425f63; }

.filters { gap: 14px; padding: 19px; border-color: #e0e9e7; border-radius: 13px; box-shadow: 0 2px 8px #163b3b08; }
.field { gap: 7px; }
.field label { color: #3c575c; font-size: .75rem; }
.field input, .field select, .topbar>select { border-color: #d4e0de; border-radius: 8px; color: #24434a; }
.field input::placeholder { color: #92a1a3; }
.field-hint { color: #718287; }
.table-panel { border-color: #e0e9e7; border-radius: 13px; box-shadow: 0 2px 8px #163b3b08; }
table { min-width: 760px; }
th { background: #f7faf9; color: #687b7f; font-size: .66rem; letter-spacing: .08em; }
td { border-color: #edf1f0; color: #334f54; }
tbody tr:hover { background: #fbfdfc; }
.pagination { padding: 0 2px; }
.dialog { border-color: #dce7e5; border-radius: 15px; box-shadow: 0 28px 90px #153d3b2e; }
.dialog::backdrop { background: #102e3480; backdrop-filter: blur(4px); }
.dialog-actions { border-color: #e4ece9; }
.account-panel { border: 1px solid #e0e9e7; border-radius: 14px; box-shadow: 0 2px 8px #163b3b08; }
.avatar { background: #bceed9; color: #087f78; }
.notification { border: 1px solid #ffffff24; border-radius: 11px; box-shadow: 0 14px 38px #173a3b26; }
.notification.error { background: #8b3035; }

.login-layout { background: #fff; }
.login-story { background: var(--navy); }
.login-story::after { border-color: #a4cbc22c; box-shadow: 0 0 0 65px #a4cbc210, 0 0 0 130px #a4cbc208; }
.login-copy .eyebrow { color: #bceed9; }
.login-copy h1 { color: #f7f8f2; font-weight: 650; letter-spacing: -.07em; }
.login-copy>p:not(.eyebrow) { max-width: 620px; color: #bceed9; font-size: .96rem; line-height: 1.8; }
.login-copy>p:not(.eyebrow)+p { margin-top: 16px; }
.login-footer { color: #bceed9; }
.login-form-panel { background: #f7f8f2; }
.login-form-wrap h2 { color: #142d3b; }

@media (min-width: 1600px) {
  .app-shell { grid-template-columns: 264px minmax(0, 1fr); }
  .content { padding-top: 43px; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { padding-inline: 15px; }
  .content { padding: 30px 25px 50px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .assistant-card { display: block; }
}
@media (max-width: 740px) {
  .app-shell { display: block; }
  .sidebar { padding: 16px 16px 13px; }
  .sidebar-brand { padding: 0 0 14px; }
  .sidebar-brand .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 1.7rem; }
  .sidebar-brand strong { font-size: 1.48rem; }
  .navigation { flex-direction: row; gap: 6px; overflow-x: auto; padding: 0 0 3px; scrollbar-width: thin; }
  .nav-group { display: contents; }
  .nav-section-label { display: none; }
  .button.nav-item { min-height: 44px; flex: 0 0 auto; padding: 8px 11px; font-size: .75rem; }
  .nav-icon { width: 23px; height: 23px; flex-basis: 23px; }
  .button.nav-item[aria-current=page] { box-shadow: inset 0 -3px #f47c68; }
  .topbar { min-height: 68px; padding: 13px 17px; }
  .topbar-actions { gap: 2px; }
  .topbar-actions .button { min-height: 38px; font-size: .72rem; }
  .topbar-actions .button.ghost:first-child { padding: 6px 9px; }
  .content { padding: 25px 17px 42px; }
  .page-heading { align-items: flex-start; }
  .page-heading .muted { font-size: .81rem; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .metric { min-height: 125px; padding: 16px; }
  .metric-value { font-size: 2rem; }
  .metric-icon { top: 13px; right: 13px; width: 28px; height: 28px; }
  .section-panel { padding: 19px; }
  .filters { padding: 15px; }
  .filters .field { min-width: calc(50% - 10px); }
  .filters>.button { width: 100%; }
  .resource-grid { grid-template-columns: 1fr; }
  .assistant-card { padding: 21px; }
  .login-story { min-height: 260px; padding: 23px 25px; }
  .login-copy { padding: 24px 0 0; }
  .login-copy h1 { font-size: clamp(2.3rem, 11vw, 3.6rem); }
  .login-form-panel { padding: 38px 24px; }
}
@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 112px; }
  .topbar strong { font-size: .74rem; }
  .topbar .small { max-width: 135px; font-size: .62rem; }
  .topbar-actions .button:last-child { padding-inline: 7px; }
  .filters .field { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
