@import url("/theme-tokens.css");
:root {
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px; font-synthesis: weight; font-weight: 400;
  color: var(--ai-text); background: var(--ai-bg);
  --accent: var(--ai-primary); --accent-dark: var(--ai-primary-hover); --text: var(--ai-text); --muted: var(--ai-muted);
  --line: var(--ai-border); --soft-line: #eef2f7; --surface: #fff; --sidebar: #fff;
  --radius: var(--ai-radius); --sidebar-width: var(--ai-sidebar-width); --header-height: var(--ai-header-height);
}

/* Shared primitives */
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; border: 0; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input, select { min-width: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; color: var(--text); }
svg { flex-shrink: 0; }
.icon { width: 18px; height: 18px; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; left: 16px; top: -80px; background: #fff; padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.initial-loading, .connection-error { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 100vh; padding: 32px; text-align: center; }
.initial-loading p { color: var(--muted); font-size: 13px; }
.loading-ring { width: 21px; height: 21px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #27c998; flex-shrink: 0; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px; background: #f0f3f8; color: #5b6b83; font-size: 10px; font-weight: 500; line-height: 1.6; white-space: nowrap; }
.status-badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-badge.ready { color: #117642; background: #eafbf2; }
.status-badge.offline { color: #d94747; background: #fff0f0; }
.status-badge.pending { color: #a66b12; background: #fff6df; }
.status-badge.locked { color: #5b6b83; background: #f0f3f8; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 35px; padding: 8px 13px; border-radius: 6px; font-size: 12px; font-weight: 550; line-height: 1.4; white-space: nowrap; transition: background .15s, border-color .15s; }
.button .icon { width: 15px; height: 15px; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { background: #fff; color: #53637c; border: 1px solid var(--line); }
.button-secondary:hover { background: #f7faff; border-color: #bfd2f3; }
.button:disabled { opacity: .5; }
.button-launch { min-height: 31px; padding: 6px 0 6px 10px; background: transparent; color: var(--accent); font-size: 11px; gap: 7px; }
.button-launch .icon { width: 14px; height: 14px; }
.button-launch:hover { color: var(--accent-dark); }
.button-launch:disabled { color: #5b6b83; opacity: 1; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 33px; height: 33px; background: transparent; border-radius: 7px; color: var(--muted); transition: background .15s; }
.icon-button:hover { background: #eff5ff; color: var(--accent); }
.icon-button:disabled { opacity: .5; }
.icon-button .icon { width: 17px; height: 17px; }
.surface-button { background: #fff; border: 1px solid var(--line); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 11px; font-weight: 550; }
.text-link .icon { width: 14px; height: 14px; }
.text-link:hover { color: var(--accent-dark); }

/* Full-width header and compact navigation */
.global-header { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px #21314c03; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: #263246; font-size: 18px; font-weight: 700; letter-spacing: -.4px; line-height: 1.1; }
.brand small { display: block; margin-top: 5px; color: #5b6b83; font-size: 8px; font-weight: 500; line-height: 1; letter-spacing: 1.1px; }
.logo-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; background: var(--accent); color: #fff; }
.logo-icon .icon, .logo-icon > svg { width: 21px; height: 21px; }
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-actions { display: flex; align-items: center; gap: 20px; min-width: 0; }
.header-link { color: #5b6b83; font-size: 11px; white-space: nowrap; }
.header-link:hover { color: var(--accent); }
.header-health { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; color: #5b6b83; white-space: nowrap; }
.header-health .status-dot { box-shadow: 0 0 0 4px #ebfaf5; }
.header-health > i { width: 6px; height: 6px; border-radius: 50%; background: #2bc99a; box-shadow: 0 0 0 4px #ebfaf5; }
.header-health.pending > i, .status-dot.pending { background: #e5b04b; box-shadow: 0 0 0 4px #fff8e9; }
.header-settings { border: 1px solid var(--line); }
.topbar-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e3eeff; color: #2465df; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.mobile-toggle { display: none; }
.sidebar { position: fixed; inset: var(--header-height) auto 0 0; z-index: 30; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 18px 12px 0; overflow-y: auto; overscroll-behavior: contain; background: var(--sidebar); border-right: 1px solid var(--line); }
.workspace-switch { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.workspace-switch:hover { border-color: #bfd2f3; }
.workspace-switch > .icon { width: 13px; height: 13px; margin-left: auto; color: #5b6b83; }
.workspace-mark { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; background: #eaf2ff; color: var(--accent); border-radius: 6px; }
.workspace-mark .icon { width: 16px; height: 16px; }
.workspace-copy { display: block; min-width: 0; }
.workspace-copy strong { display: block; color: #334157; font-size: 11px; line-height: 1.3; font-weight: 600; }
.workspace-copy small { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5b6b83; font-size: 9px; line-height: 1.2; }
.sidebar nav { padding-top: 24px; }
.nav-group { display: grid; gap: 4px; margin-bottom: 22px; }
.nav-group-label { display: flex; align-items: center; justify-content: space-between; padding: 0 9px; margin-bottom: 6px; color: #5b6b83; font-size: 9px; font-weight: 650; letter-spacing: 1.2px; line-height: 1.6; }
.nav-group-label .icon { width: 12px; height: 12px; }
.nav-item { display: flex; align-items: center; width: 100%; gap: 10px; min-height: 37px; padding: 9px 10px; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #5b6b83; font-size: 12px; line-height: 1.5; text-align: left; }
.nav-item .icon { width: 17px; height: 17px; }
.nav-item:hover { background: #f6f9ff; color: var(--accent); }
.nav-item.active { background: #eff5ff; border-color: #dce9ff; color: var(--accent); font-weight: 550; }
.nav-item:disabled { opacity: .55; }
.nav-lock { width: 11px!important; height: 11px!important; margin-left: auto; }
.nav-indicator { width: 4px; height: 4px; margin-left: auto; border-radius: 50%; background: var(--accent); }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.sidebar-health { display: flex; align-items: center; gap: 8px; padding: 11px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fafbfd; }
.sidebar-health > .icon { width: 18px; height: 18px; color: var(--accent); }
.sidebar-health > div, .sidebar-health > span { min-width: 0; flex: 1; }
.sidebar-health strong { display: block; color: #4a5971; font-size: 10px; font-weight: 600; }
.sidebar-health p, .sidebar-health small { display: block; margin-top: 4px; color: #5b6b83; font-size: 9px; line-height: 1.4; }
.sidebar-health .status-dot { margin-left: auto; box-shadow: 0 0 0 3px #e6f8f1; }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 18px 3px; }
.avatar { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 50%; background: #e3eeff; color: #2465df; font-size: 11px; font-weight: 550; }
.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #35435a; font-size: 11px; font-weight: 600; }
.sidebar-user-info span { display: block; margin-top: 4px; color: #5b6b83; font-size: 9px; }
.logout-button { width: 25px; height: 28px; color: #5b6b83; }
.logout-button .icon { width: 15px; height: 15px; }
.main-shell { display: flex; flex-direction: column; min-height: 100vh; margin-left: var(--sidebar-width); padding-top: var(--header-height); }
.main-content { width: 100%; max-width: 1700px; margin: 0 auto; padding: 25px 28px 28px; outline: none; }
.page-breadcrumb { display: flex; align-items: center; gap: 9px; color: #5b6b83; font-size: 10px; line-height: 1.5; margin-bottom: 13px; }
.page-breadcrumb .icon { width: 12px; height: 12px; }
.page-breadcrumb strong { color: #5d6d84; font-weight: 550; }
.page-breadcrumb a:hover { color: var(--accent); }
.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding: 14px 28px; color: #5b6b83; border-top: 1px solid var(--line); font-size: 9px; line-height: 1.6; letter-spacing: .5px; }

/* Overview: four metrics, two compact columns */
.overview-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 21px; }
.overview-heading h1 { font-size: 24px; line-height: 1.4; letter-spacing: -.5px; }
.overview-heading p { margin-top: 6px; color: #5b6b83; font-size: 12px; line-height: 1.8; }
.overview-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding-top: 8px; }
.overview-actions > .status-badge { padding: 6px 10px; border: 1px solid #c6f0dc; background: #f2fcf6; font-size: 10px; }
.overview-actions .button { min-height: 33px; font-size: 11px; }
.overview-checked { font-size: 10px; color: #5b6b83; }
.metrics-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label icon" "value value" "foot foot"; align-items: center; min-width: 0; min-height: 112px; padding: 13px 16px 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--metric-color,#39bdef); border-radius: 9px; box-shadow: 0 3px 12px #24365903; }
.metric-cyan { --metric-color: #36bff0; --metric-tint: #e9f8ff; }
.metric-purple { --metric-color: #a686fb; --metric-tint: #f5f0ff; }
.metric-green { --metric-color: #2acf99; --metric-tint: #eafbf5; }
.metric-amber { --metric-color: #ffc52e; --metric-tint: #fff8e7; }
.metric-label { grid-area: label; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #5b6b83; font-size: 11px; line-height: 1.5; }
.metric-icon { grid-area: icon; display: grid; place-items: center; width: 25px; height: 25px; background: var(--metric-tint,#e9f8ff); color: var(--metric-color,#36bff0); border-radius: 6px; }
.metric-icon .icon { width: 15px; height: 15px; }
.metric-value { grid-area: value; margin-top: 6px; color: #202b40; font-size: 25px; font-weight: 700; line-height: 1.25; letter-spacing: -.8px; }
.metric-value small { margin-left: 5px; color: #5b6b83; font-size: 10px; font-weight: 400; letter-spacing: 0; }
.metric-foot { grid-area: foot; display: flex; align-items: center; gap: 4px; margin-top: 4px; color: #5b6b83; font-size: 10px; line-height: 1.5; }
.metric-foot .icon { width: 12px; height: 12px; }
.metric-foot.positive, .metric-green .metric-foot { color: #168052; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(270px,1fr); gap: 14px; align-items: stretch; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 17px; border-bottom: 1px solid var(--soft-line); }
.search-field { display: flex; align-items: center; gap: 7px; width: 183px; height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #5b6b83; }
.search-field .icon { width: 13px; height: 13px; }
.search-field input { width: 100%; height: 26px; padding: 0; border: 0; background: transparent; color: #41516b; font-size: 10px; outline: none; }
.search-field input::placeholder { color: #5b6b83; }
.search-field:focus-within { outline: 2px solid #9bbfff; outline-offset: 1px; }
.filter-tabs { display: flex; align-items: center; gap: 3px; }
.filter-tab { padding: 6px 8px; border-radius: 4px; background: transparent; color: #5b6b83; font-size: 10px; white-space: nowrap; }
.filter-tab:hover { background: #f2f6fc; color: var(--accent); }
.filter-tab.selected { background: #eff5ff; color: var(--accent); font-weight: 550; }
.module-list { display: grid; }
.module-row { display: flex; align-items: center; gap: 13px; min-width: 0; min-height: 82px; padding: 12px 17px; border-bottom: 1px solid var(--soft-line); transition: background .15s; }
.module-row:last-child { border-bottom: 0; }
.module-row:hover { background: #f9fbff; }
.module-row-icon { display: grid; place-items: center; flex-shrink: 0; width: 35px; height: 35px; border: 1px solid #e1edff; border-radius: 8px; background: #f0f6ff; color: #4e8bef; }
.module-row-icon .icon { width: 20px; height: 20px; }
.module-learning .module-row-icon { background: #f6f1ff; border-color: #ede5ff; color: #9c78ef; }
.module-pregnancy .module-row-icon { background: #fff0f5; border-color: #fbe1ec; color: #df7fa5; }
.module-vaccination .module-row-icon { background: #eaf7fb; border-color: #d5eaf1; color: #237f99; }
.module-row-main { flex: 1; min-width: 0; }
.module-row-main h3 { color: #26364c; font-size: 13px; line-height: 1.5; font-weight: 700; }
.module-row-main p { margin-top: 4px; color: #5b6b83; font-size: 10px; line-height: 1.7; }
.module-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; color: #5b6b83; font-size: 9px; line-height: 1.5; }
.module-row-meta .icon { width: 11px; height: 11px; }
.module-row-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.module-status-detail { margin-top: 4px; color: #a87823; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.module-row-actions { display: flex; flex-shrink: 0; align-items: center; justify-content: flex-end; gap: 14px; }
.module-row-actions .status-badge { font-size: 9px; }
.service-list { display: grid; gap: 17px; padding: 20px 17px 18px; }
.service-panel, .access-panel { display: flex; flex-direction: column; }
.service-panel .service-list { flex: 1; align-content: start; }
.service-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; line-height: 1.5; }
.service-item-heading > span:first-child, .service-item-heading > div:first-child { display: inline-flex; align-items: center; gap: 7px; color: #5b6b83; }
.service-item-heading .icon { width: 15px; height: 15px; color: #5b6b83; }
.service-value { color: #5b6b83; font-size: 10px; font-weight: 550; white-space: nowrap; }
.service-value.online { color: #168052; }
.service-detail { margin-top: 5px; color: #5b6b83; font-size: 9px; line-height: 1.6; overflow-wrap: anywhere; }
.service-track { height: 5px; margin-top: 8px; overflow: hidden; background: #edf2f9; border-radius: 4px; }
.service-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: #34c4ee; }
.service-learning .service-track i { background: #a486f7; }
.service-pregnancy .service-track i { background: #33cea3; }
.service-vaccination .service-track i { background: #2f9ab4; }
.service-track.online i { width: 100%; }
.service-track.offline i { width: 0; }
.footer-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 34px; margin: 0 17px 17px; padding: 8px 10px; color: #586982; border: 1px solid var(--line); border-radius: 5px; font-size: 10px; font-weight: 550; }
.footer-link .icon { width: 14px; height: 14px; }
.footer-link:hover { background: #f7faff; border-color: #cbdcf8; color: var(--accent); }
.panel-footer { display: flex; justify-content: space-between; gap: 12px; padding: 11px 17px; border-top: 1px solid var(--soft-line); color: #5b6b83; font-size: 9px; line-height: 1.6; }
.panel-footer > span { display: inline-flex; align-items: center; gap: 5px; }
.panel-footer .icon { width: 11px; height: 11px; }
.activity-list { padding: 0 17px; }
.activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--soft-line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row time { flex-shrink: 0; width: 55px; padding-top: 2px; color: #5b6b83; font-size: 9px; font-variant-numeric: tabular-nums; line-height: 1.8; }
.activity-icon { display: grid; place-items: center; flex-shrink: 0; width: 23px; height: 23px; background: #eff6ff; color: #5591ee; border-radius: 6px; }
.activity-icon .icon { width: 13px; height: 13px; }
.activity-icon.warning { background: #fff6e3; color: #dba13a; }
.activity-copy { flex: 1; min-width: 0; }
.activity-copy strong { display: block; color: #52627c; font-size: 11px; line-height: 1.6; font-weight: 600; }
.activity-copy > span, .activity-copy p { display: block; margin-top: 2px; color: #5b6b83; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.guide-row { padding-top: 16px; padding-bottom: 16px; }
.activity-empty { display: grid; place-items: center; min-height: 180px; padding: 30px; color: #5b6b83; font-size: 11px; line-height: 1.8; text-align: center; }
.panel-empty { padding: 18px 0; color: #5b6b83; font-size: 11px; line-height: 1.8; }
.account-summary { padding: 17px; }
.account-summary-header { display: flex; align-items: center; gap: 11px; padding-bottom: 15px; margin-bottom: 3px; border-bottom: 1px solid var(--soft-line); }
.account-summary-header .profile-avatar { flex-shrink: 0; width: 37px; height: 37px; margin: 0; font-size: 14px; }
.account-summary-header > div { min-width: 0; }
.account-summary-header h3, .account-summary-header strong { display: block; color: #41516a; font-size: 12px; font-weight: 650; line-height: 1.5; }
.account-summary-header p, .account-summary-header small { display: block; margin-top: 3px; color: #5b6b83; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.account-summary-header .role-pill { margin-top: 4px; }
.account-summary-header > .role-pill { flex-shrink: 0; margin-left: auto; }
.account-summary-header > div > span { display: block; margin-top: 3px; color: #5b6b83; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.account-access-item { display: flex; align-items: center; gap: 8px; padding-top: 13px; color: #5b6b83; font-size: 10px; line-height: 1.5; }
.account-access-item > span { display: inline-flex; align-items: center; gap: 7px; }
.account-access-item .icon { width: 14px; height: 14px; }
.account-access-item > .icon { width: 14px; height: 14px; color: #5b6b83; }
.account-access-item > span:last-child, .account-access-item > strong:last-child { margin-left: auto; font-size: 10px; }
.access-state { color: #5b6b83; font-size: 9px; }
.access-state.granted { color: #168052; }
.access-panel > .footer-link { margin-top: 0; }
.access-panel > .account-summary { flex: 1; }

/* Existing account, management, authentication, and dialog components */
.section-kicker{font-size:10px;letter-spacing:1.4px;color:#5b6b83;font-weight:600}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:4px 0 32px}.page-heading h1{font-size:24px;letter-spacing:-.7px;margin:10px 0 10px}.page-heading p{font-size:12px;color:#5b6b83;line-height:1.8}.panel{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:21px 24px;border-bottom:1px solid #e1e8f2;min-height:72px}.panel-heading h2{font-size:14px;font-weight:600;display:flex;align-items:center;gap:10px}.panel-heading>.icon{color:#5b6b83;width:18px;height:18px}.count-pill{font-size:10px;background:#f1f5f9;padding:3px 7px;border-radius:5px;color:#5b6b83;font-weight:500}.subtle{font-size:10px;color:#5b6b83}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:11px;line-height:1.6}th{font-size:10px;font-weight:500;color:#5b6b83;background:#f8fafc;padding:14px 24px;border-bottom:1px solid #e1e8f2;white-space:nowrap}td{padding:19px 24px;border-bottom:1px solid #f1f5f9;color:#475569}tbody tr:last-child td{border-bottom:0}.table-user{display:flex;align-items:center;gap:11px;min-width:170px}.avatar-light{background:#eff6ff;color:var(--accent)}.table-user strong{display:block;font-weight:550;color:#1e293b;font-size:12px}.table-user>div>span{display:block;color:#5b6b83;font-size:10px;margin-top:4px}.self-label{margin-left:7px;background:#eff6ff;color:var(--accent);padding:1px 5px;font-size:9px;font-weight:400;border-radius:4px}.role-pill{display:inline-block;font-size:10px;line-height:1.6;background:#f1f5f9;color:#5b6b83;border:1px solid #e1e8f2;border-radius:5px;padding:3px 8px;white-space:nowrap}.role-admin{background:#eff6ff;border-color:#e1e8f2;color:var(--accent)}.permission-tags{display:flex;flex-wrap:wrap;gap:5px;min-width:125px}.permission-tags>span{background:#f8fafc;border:1px solid #e1e8f2;padding:2px 6px;font-size:9px;border-radius:4px;color:#5b6b83;white-space:nowrap}.table-actions{text-align:right}.text-button{background:transparent;padding:5px;color:var(--accent);font-size:11px;border-radius:4px;white-space:nowrap}.text-button:hover{color:#2465df;background:#f1f5f9}.empty-cell{text-align:center;color:#5b6b83;padding:50px 20px}.nowrap{white-space:nowrap}.audit-action{font-size:11px;color:#475569}.audit-target{max-width:350px;overflow-wrap:anywhere;font-size:10px;color:#5b6b83}.settings-grid{display:grid;grid-template-columns:minmax(250px,.85fr) minmax(320px,1.3fr);gap:24px;align-items:start}.profile-summary{text-align:center;padding:30px 20px 27px}.profile-avatar{width:64px;height:64px;display:grid;place-items:center;margin:0 auto 15px;border-radius:50%;background:#eff6ff;color:var(--accent);font-size:25px}.profile-summary h3{font-size:16px;margin-bottom:8px}.profile-summary p{font-size:11px;color:#5b6b83;margin-bottom:12px;overflow-wrap:anywhere}.profile-facts{margin:0;padding:0 24px 12px}.profile-facts>div{display:flex;justify-content:space-between;gap:15px;align-items:start;border-top:1px solid #e1e8f2;padding:17px 0;font-size:10px;line-height:1.8}.profile-facts dt{color:#5b6b83;white-space:nowrap}.profile-facts dd{margin:0;text-align:right;color:#475569;max-width:65%}.panel-form{padding:24px}.form-description{font-size:11px;line-height:1.8;color:#475569;margin-bottom:2px}.system-panel{margin-top:24px}.system-facts{display:grid;grid-template-columns:1.4fr .7fr 1fr;gap:20px;margin:0;padding:24px}.system-facts dt{color:#5b6b83;font-size:10px;margin-bottom:9px}.system-facts dd{font-size:12px;color:#475569;margin:0;overflow-wrap:anywhere}.form-actions{display:flex;justify-content:flex-end;margin-top:3px}
.empty-state{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:270px;border:1px dashed #e1e8f2;border-radius:10px;text-align:center;padding:30px}.empty-icon{width:54px;height:54px;display:grid;place-items:center;background:#eff6ff;color:#5b6b83;border-radius:15px;margin-bottom:16px}.empty-icon .icon{width:24px;height:24px}.empty-state h3{font-size:15px;font-weight:550;color:#475569}.empty-state p{font-size:11px;line-height:1.9;color:#5b6b83;margin-top:8px}.content-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:240px;color:#5b6b83;font-size:12px}.grid-loading{grid-column:1/-1}.notice{display:flex;align-items:center;gap:10px;padding:13px 16px;border:1px solid #fde68a;background:#fffbeb;color:#a16207;font-size:11px;border-radius:9px;margin-bottom:20px;line-height:1.7}.notice .icon{width:17px;height:17px}.notice>span{flex:1}.notice .text-button{color:#a16207}.muted{color:var(--muted)}
.auth-layout{display:grid;grid-template-columns:minmax(360px,1fr) minmax(420px,1fr);min-height:100vh;background:#f8fafc}.auth-story{background:#eff6ff;color:#1e3a8a;display:flex;flex-direction:column;padding:48px 10%;position:relative;overflow:hidden}.auth-story:before{content:"";position:absolute;width:470px;height:470px;border-radius:50%;border:1px solid #387cf71a;right:-270px;top:28%;pointer-events:none}.auth-story:after{content:"";position:absolute;width:680px;height:680px;border-radius:50%;border:1px solid #387cf70d;right:-376px;top:calc(28% - 105px);pointer-events:none}.auth-brand{position:relative;z-index:1}.auth-brand small{font-size:8px;letter-spacing:1.6px}.auth-story-content{position:relative;z-index:1;margin:auto 0;padding:65px 0}.eyebrow{font-size:9px;letter-spacing:2px;color:#5b6b83}.auth-story h1{font-size:clamp(26px,2.5vw,34px);font-weight:500;line-height:1.6;letter-spacing:-1px;margin:22px 0 20px}.auth-story-content>p{font-size:13px;color:#475569;line-height:2.2;letter-spacing:.5px}.auth-module-list{display:grid;gap:0;margin-top:38px;max-width:320px}.auth-module-list>div{display:flex;gap:13px;align-items:center;padding:15px 0;border-bottom:1px solid #387cf71a;color:#475569;font-size:11px}.auth-module-list>div>.icon:first-child{width:18px;height:18px;color:#2465df}.auth-module-list>div>.icon:last-child{margin-left:auto;width:15px;height:15px;color:#2465df}.auth-story-footer{font-size:9px;color:#5b6b83;letter-spacing:1px;display:flex;align-items:center;gap:8px}.auth-form-side{display:flex;flex-direction:column;justify-content:center;padding:60px 12% 30px}.auth-form-wrap{max-width:365px;width:100%;margin:auto}.auth-form-wrap>.section-kicker{font-size:10px;letter-spacing:3px;color:#5b6b83}.auth-form-wrap h2{font-size:24px;margin:15px 0 12px;letter-spacing:-1px;font-weight:600}.auth-description{font-size:12px;color:#475569;line-height:1.9;margin-bottom:30px}.stack-form{display:flex;flex-direction:column;gap:19px}.stack-form>label{display:flex;flex-direction:column;gap:9px;font-size:11px;color:#475569;font-weight:500}.stack-form input:not([type="checkbox"]),.stack-form select{width:100%;padding:12px 13px;border:1px solid #e1e8f2;border-radius:7px;background:#fff;color:#1e293b;font-size:12px;min-height:43px;font-weight:400;transition:border-color .15s}.stack-form input::placeholder{color:#5b6b83;font-size:11px}.stack-form input:disabled{background:#f8fafc;color:#5b6b83}.stack-form select{appearance:auto}.auth-submit{margin-top:6px;min-height:46px;justify-content:space-between;padding:13px 17px;font-size:12px}.auth-footnote{font-size:10px;color:#5b6b83;line-height:1.9;text-align:center;margin-top:25px}.auth-copyright{display:flex;justify-content:center;gap:15px;font-size:8px;letter-spacing:1.5px;color:#5b6b83;margin-top:45px}.auth-copyright span{letter-spacing:1px;color:#5b6b83}.field-hint{font-size:10px;color:#5b6b83;line-height:1.7;font-weight:400}.form-note{display:flex;gap:9px;background:#eff6ff;border-radius:7px;padding:12px;color:#5b6b83;font-size:10px;line-height:1.8}.form-note .icon{width:16px;height:16px;margin-top:2px}.form-error{font-size:11px;padding:11px 13px;background:#fef2f2;color:#b91c1c;line-height:1.8;border-radius:7px;border:1px solid #fecaca}.form-error[hidden]{display:none}
dialog{width:min(480px,calc(100% - 32px));max-height:calc(100vh - 48px);padding:0;border:1px solid #e1e8f2;border-radius:12px;box-shadow:0 24px 90px #0f172a30;color:var(--text);background:#fff}dialog::backdrop{background:#0f172a66;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:26px 28px 20px;border-bottom:1px solid #e1e8f2}.dialog-heading h2{font-size:19px;margin-top:7px}.dialog-form{padding:24px 28px 26px;gap:16px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #e1e8f2;padding-top:19px;margin-top:3px}.permission-fieldset{margin:0;padding:12px 12px 5px;border:1px solid #e1e8f2;border-radius:8px}.permission-fieldset legend{font-size:11px;color:#5b6b83;padding:0 5px}.checkbox-row{display:flex!important;flex-direction:row!important;align-items:center;gap:10px!important;font-size:11px;font-weight:400!important;padding:9px 1px;color:#475569}.checkbox-row input{accent-color:var(--accent);width:16px;height:16px;flex-shrink:0;margin:0}.checkbox-icon{width:26px;height:26px;display:grid;place-items:center;border-radius:6px;background:#eff6ff;color:var(--accent)}.checkbox-icon .icon{width:15px;height:15px}.checkbox-icon.module-learning{background:#f3e8ff;color:#7c3aed}.checkbox-icon.module-pregnancy{background:#fce7f3;color:#be185d}.account-enabled{margin:1px 0}.toast-region{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:100;width:max-content;max-width:calc(100vw - 32px);pointer-events:none}.toast{display:flex;gap:11px;align-items:center;background:#0f172a;color:#ffffff;border:1px solid #334155;border-radius:10px;padding:14px 20px;box-shadow:0 8px 25px #0f172a24;font-size:12px;line-height:1.8}.toast .icon{width:18px;height:18px;color:#bfdbfe}.toast-error{background:#7f1d1d;border-color:#b91c1c}.toast-error .icon{color:#fecaca}


/* Shared panels follow the same compact dashboard dimensions. */
.panel { min-width: 0; box-shadow: 0 2px 10px #25395602; }
.panel-heading { min-height: 62px; padding: 14px 17px; gap: 14px; border-color: var(--soft-line); }
.panel-heading h2 { font-size: 14px; line-height: 1.5; font-weight: 700; }
.panel-heading p { margin-top: 3px; color: #5b6b83; font-size: 10px; line-height: 1.5; }
.panel-heading .text-link { font-size: 10px; white-space: nowrap; }
.section-kicker { font-size: 9px; color: #5b6b83; }
.page-heading { margin: 2px 0 24px; }
.page-heading h1 { margin: 7px 0; font-size: 24px; line-height: 1.4; letter-spacing: -.5px; }
.empty-state { min-height: 235px; border: 0; border-radius: 0; }
.empty-state h3 { font-size: 13px; }
.empty-icon { width: 45px; height: 45px; border-radius: 10px; }
.systems-panel > .notice { margin: 10px 17px; }
.auth-story { background: #f0f5fd; }
.auth-story:before, .auth-story:after { display: none; }
.auth-layout { background: #fff; }
.account-summary-header .profile-avatar { width: 37px; height: 37px; margin: 0; font-size: 14px; }

/* Responsive layout keeps the compact scale of the desktop. */
@media (min-width: 1700px) {
  .main-content { padding-top: 29px; }
  .metrics-grid, .dashboard-grid { gap: 16px; }
  .metric-card { min-height: 120px; }
}
@media (max-width: 1250px) {
  .main-content { padding: 24px; }
  .global-header { padding: 0 20px; }
  .header-actions { gap: 16px; }
  .dashboard-grid { grid-template-columns: minmax(0,1.6fr) minmax(260px,1fr); }
  .module-row { gap: 10px; padding: 15px; }
  .module-row-actions { align-items: flex-end; flex-direction: column; gap: 3px; }
  .module-row-actions .button-launch { min-height: 25px; padding-top: 3px; padding-bottom: 3px; }
  .panel-toolbar { padding-left: 15px; padding-right: 15px; gap: 8px; }
  .search-field { width: 150px; }
  .filter-tab { padding-left: 6px; padding-right: 6px; }
  .overview-checked { display: none; }
}
@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric-card { min-height: 106px; }
  .settings-grid { grid-template-columns: 1fr; }
  .system-facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1050px) {
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .systems-panel { order: 0; }
  .service-panel { order: 2; }
  .activity-panel { order: 1; }
  .access-panel { order: 3; }
  .module-row-actions { align-items: center; flex-direction: row; gap: 14px; }
  .service-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
  .service-item-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .header-health { display: none; }
  .overview-actions > .status-badge { display: none; }
  .auth-story { padding: 40px 9%; }
  .auth-form-side { padding: 45px 10% 28px; }
  .auth-layout { grid-template-columns: .95fr 1fr; }
  .auth-story h1 { font-size: 28px; }
}
@media (max-width: 760px) {
  .global-header { gap: 12px; padding: 0 18px; }
  .global-header .brand { font-size: 16px; gap: 8px; }
  .global-header .brand small { font-size: 7px; letter-spacing: .6px; }
  .logo-icon { width: 30px; height: 30px; }
  .header-brand { gap: 5px; }
  .header-actions { gap: 12px; margin-left: auto; }
  .header-link { display: none; }
  .mobile-toggle { display: inline-flex; }
  .header-brand > .mobile-toggle { margin-left: -6px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 5px 0 25px #22344e16; }
  .sidebar-open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: var(--header-height) 0 0; z-index: 25; background: #25364b66; }
  .main-shell { margin-left: 0; }
  .main-content { padding: 21px 20px 24px; }
  .page-breadcrumb { margin-bottom: 12px; }
  .overview-heading { gap: 15px; margin-bottom: 19px; }
  .overview-heading h1 { font-size: 22px; }
  .overview-heading p { font-size: 11px; }
  .overview-actions { padding-top: 0; }
  .overview-actions .button { min-height: 31px; padding: 7px 10px; font-size: 10px; }
  .metrics-grid { gap: 10px; margin-bottom: 12px; }
  .metric-card { min-height: 103px; padding: 11px 13px; }
  .metric-value { font-size: 24px; }
  .dashboard-grid { gap: 12px; }
  .workspace-footer { padding: 13px 20px; font-size: 8px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading p { font-size: 11px; }
  .auth-layout { display: flex; flex-direction: column; }
  .auth-story { min-height: auto; padding: 25px 28px 28px; }
  .auth-brand { font-size: 18px; }
  .auth-brand small { font-size: 7px; }
  .auth-story-content { padding: 32px 0 0; }
  .auth-story-content > .eyebrow { font-size: 8px; }
  .auth-story h1 { margin: 14px 0 8px; font-size: 24px; line-height: 1.5; }
  .auth-story h1 br, .auth-story-content > p br { display: none; }
  .auth-story-content > p { font-size: 11px; line-height: 1.9; }
  .auth-module-list, .auth-story-footer { display: none; }
  .auth-form-side { flex: 1; padding: 34px 28px 22px; }
  .auth-form-wrap { max-width: 430px; }
  .auth-form-wrap h2 { font-size: 22px; }
  .auth-description { margin-bottom: 23px; }
  .auth-copyright { margin-top: 30px; }
  .auth-footnote { margin-top: 18px; }
  .stack-form { gap: 16px; }
}
@media (max-width: 480px) {
  .global-header { padding: 0 15px; }
  .header-actions { gap: 7px; }
  .global-header .brand { font-size: 15px; }
  .main-content { padding: 19px 14px 22px; }
  .overview-heading h1 { font-size: 22px; }
  .overview-heading p { max-width: 235px; font-size: 10px; }
  .overview-actions .button { gap: 5px; padding: 7px 8px; font-size: 10px; }
  .overview-actions .button .icon { width: 13px; height: 13px; }
  .metric-card { min-height: 103px; padding: 10px 11px; }
  .metric-label { font-size: 10px; }
  .metric-icon { width: 22px; height: 22px; }
  .metric-icon .icon { width: 13px; height: 13px; }
  .metric-value { font-size: 23px; }
  .metric-foot { font-size: 9px; }
  .panel-heading { min-height: 61px; padding: 13px 14px; gap: 8px; }
  .panel-heading h2 { font-size: 13px; }
  .panel-heading p { font-size: 9px; }
  .panel-heading .text-link { font-size: 9px; gap: 3px; }
  .panel-toolbar { flex-wrap: wrap; gap: 9px; padding: 10px 14px; }
  .search-field { width: 100%; }
  .filter-tabs { gap: 5px; }
  .filter-tab { padding: 5px 9px; font-size: 10px; }
  .module-row { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 9px 10px; padding: 14px; }
  .module-row-icon { align-self: start; width: 30px; height: 30px; border-radius: 7px; }
  .module-row-icon .icon { width: 17px; height: 17px; }
  .module-row-main h3 { font-size: 12px; }
  .module-row-main p { margin-top: 3px; font-size: 10px; }
  .module-row-meta { gap: 8px; margin-top: 4px; font-size: 9px; }
  .module-row-actions { grid-column: 2; justify-content: space-between; gap: 8px; }
  .module-row-actions .button-launch { min-height: 24px; font-size: 10px; }
  .service-list { grid-template-columns: 1fr; gap: 16px; padding: 16px 14px; }
  .service-item-heading { flex-direction: row; align-items: center; }
  .footer-link { margin-left: 14px; margin-right: 14px; margin-bottom: 14px; }
  .panel-footer { padding: 10px 14px; }
  .activity-list { padding: 0 14px; }
  .activity-row { gap: 8px; padding: 12px 0; }
  .activity-row time { width: 47px; font-size: 8px; }
  .activity-copy strong { font-size: 10px; }
  .activity-copy > span, .activity-copy p { font-size: 9px; }
  .account-summary { padding: 16px 14px; }
  .workspace-footer { padding: 13px 15px; }
  .workspace-footer span:last-child { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 20px; }
  .page-heading > .button { min-height: 34px; }
  .table-wrap th, .table-wrap td { padding: 13px; }
  .settings-grid { gap: 14px; }
  .panel-form { padding: 20px 16px; }
  .system-facts { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
  .form-actions .button { width: 100%; }
  .dialog-heading { padding: 21px 20px 17px; }
  .dialog-form { padding: 20px; }
  .dialog-heading h2 { font-size: 17px; }
  .dialog-actions .button { padding: 9px 13px; }
  .toast-region { bottom: 18px; }
  .toast { padding: 11px 14px; font-size: 11px; }
  .auth-story { padding: 22px 25px; }
  .auth-story-content { padding-top: 25px; }
  .auth-story h1 { font-size: 22px; }
  .auth-story-content > p { font-size: 10px; }
  .auth-form-side { padding: 28px 25px 20px; }
  .auth-footnote { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
