:root {
  --brand-navy: #0B2D4D;
  --brand-teal: #2F8B86;
  --brand-sage: #A9C6A2;
  --color-text: #173343;
  --color-muted: #4E626B;
  --color-bg: #F6F8F7;
  --color-border: #DCE5E5;
  --color-focus: #0859A5;
  --font-ui: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--color-bg); color: var(--color-text); font-family: var(--font-ui); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.app { display: flex; min-height: 100vh; }
.sidebar { width: 250px; min-width: 250px; background: var(--brand-navy); color: #CFDEE6; display: flex; flex-direction: column; padding: 22px 14px 16px; }
.brand { margin: 0 0 20px; background: #fff; border-radius: 12px; padding: 8px 8px 7px; line-height: 0; }
.brand img { width: 100%; height: auto; display: block; }
.nav-group { font-size: 10px; letter-spacing: 1.6px; color: #89AABD; text-transform: uppercase; font-weight: 700; padding: 0 14px; margin: 8px 0; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-entry { display: flex; align-items: center; color: #DBE7EA; border-left: 3px solid transparent; font-size: 13.5px; font-weight: 600; padding: 10px 12px; border-radius: 10px; min-height: 40px; }
.nav-entry.active { background: #ffffff1a; color: #fff; border-left-color: var(--brand-sage); }
.sidebar-bottom { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid #ffffff2d; font-size: 12px; }
.sidebar-bottom strong { color: #fff; display: block; margin-bottom: 4px; }
.shell { flex: 1; min-width: 0; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--color-border); }
.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.family-badge { background: #F1F6F5; color: #3B6268; border-radius: 11px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; }
.circle-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #DAE5E4; background: #fff; color: var(--brand-navy); display: grid; place-items: center; }
.circle-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #D0E3DE; color: #155A58; font-weight: 700; font-size: 13px; display: grid; place-items: center; cursor: pointer; list-style: none; }
.avatar::-webkit-details-marker { display: none; }
.account { position: relative; }
.account-panel { position: absolute; right: 0; top: 46px; width: 220px; background: #fff; border: 1px solid #DCE6E4; border-radius: 12px; box-shadow: 0 8px 28px rgba(11,45,77,.08); padding: 14px; z-index: 5; }
.account-panel strong { display: block; color: var(--brand-navy); }
.account-panel span { display: block; margin-top: 2px; color: var(--color-muted); font-size: 13px; }
.button.secondary { margin-top: 12px; width: 100%; min-height: 40px; border-radius: 11px; border: 1px solid var(--color-border); background: #fff; color: var(--brand-navy); font: inherit; font-weight: 700; cursor: pointer; }
.mobile-brand { display: none; }
.crumb { color: #4F6671; font-weight: 700; font-size: 14px; display: flex; gap: 10px; }
.sep { color: #A1B2B5; }
.content { padding: 26px 32px 40px; }
h1 { margin: 0; font-size: 30px; letter-spacing: -1px; color: var(--brand-navy); }
h2 { margin: 0 0 8px; font-size: 20px; color: var(--brand-navy); }
.sub, .empty, .foot, .stat-label { color: var(--color-muted); }
.sub { margin: 6px 0 0; font-size: 14px; }
.content-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.metric, .card { background: #fff; border: 1px solid #DCE6E4; border-radius: 16px; box-shadow: 0 8px 28px rgba(11,45,77,.055); }
.metric { padding: 18px; }
.metric.warm { background: #FFF9F4; border-color: #EFE2D5; }
.metric.sage { background: #F2F8F3; border-color: #E0ECDC; }
.stat-value { margin-top: 8px; font-size: 26px; font-weight: 700; letter-spacing: -.8px; color: var(--brand-navy); }
.card { padding: 18px 20px; }
.text-link { color: var(--brand-teal); font-weight: 700; }
.text-button { background: none; border: 0; padding: 0; color: #DBE7EA; font: inherit; font-weight: 700; cursor: pointer; }
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--color-bg); }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid #DCE6E4; border-radius: 16px; padding: 22px; box-shadow: 0 8px 28px rgba(11,45,77,.055); }
.login-card .brand { max-width: 280px; }
.login-card h1 { margin-top: 8px; font-size: 28px; }
.login-card form { display: flex; flex-direction: column; }
.login-card .field { display: flex; flex-direction: column; }
.login-card label { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--color-muted); }
.login-card input { display: block; width: 100%; min-height: 44px; border: 1px solid #D3DEDE; border-radius: 10px; padding: 0 12px; font: inherit; color: var(--color-text); background: #fff; }
.primary { margin-top: 16px; min-height: 44px; width: 100%; border: 0; border-radius: 10px; background: var(--brand-teal); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.form-error { color: #8A3B2A; font-size: 14px; font-weight: 600; }
.bottom { display: none; }
.admin { max-width: 720px; }
.brand-admin { max-width: 280px; }
@media (max-width: 760px) {
  .sidebar, .crumb, .family-badge { display: none; }
  .mobile-brand { display: block; background: #fff; border-radius: 12px; padding: 4px; line-height: 0; }
  .mobile-brand img { width: 100%; max-width: 250px; height: auto; display: block; }
  .topbar { height: auto; padding: 10px 12px; }
  .content { padding: 16px 14px 96px; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .metric.sage { grid-column: 1 / -1; }
  .bottom { display: flex; position: fixed; left: 0; bottom: 0; width: 100%; height: 72px; background: #fff; border-top: 1px solid #D8E4E3; justify-content: space-around; align-items: center; }
  .bottom a { color: #5F747B; font-size: 12px; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
  .bottom a[aria-current="page"] { color: #16736F; }
}
