:root {
  --brand: #0b5d5e;
  --brand-2: #147d79;
  --brand-soft: #e7f5f3;
  --ink: #18252d;
  --muted: #667680;
  --line: #dfe7e9;
  --surface: #ffffff;
  --surface-2: #f5f8f8;
  --surface-3: #edf3f3;
  --danger: #b43b50;
  --danger-soft: #fff0f2;
  --warning: #9b6412;
  --warning-soft: #fff7e7;
  --success: #1e7a54;
  --success-soft: #eaf8f1;
  --info: #3269a8;
  --info-soft: #edf5ff;
  --purple: #6d57a6;
  --purple-soft: #f4f0ff;
  --shadow: 0 16px 45px rgba(20, 54, 61, .09);
  --shadow-sm: 0 6px 20px rgba(20, 54, 61, .07);
  --radius: 20px;
  --radius-sm: 13px;
  --sidebar: 268px;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--surface-2); color: var(--ink); font-family: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(20,125,121,.28); outline-offset: 2px; }
a { color: inherit; }
.hidden { display: none !important; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); font-size: 20px; }
.brand > span:last-child { display: flex; align-items: baseline; gap: 4px; }
.brand strong { font-weight: 800; }
.brand b { font-size: 13px; background: var(--brand-soft); border-radius: 7px; padding: 3px 6px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: var(--brand-2); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-light { color: #fff; }
.brand-light b { color: #0b5d5e; background: rgba(255,255,255,.92); }

/* Authentication */
.auth-screen { min-height: 100vh; position: relative; overflow: hidden; color: #fff; padding: 28px clamp(22px, 5vw, 78px) 20px; background: radial-gradient(circle at 12% 18%, rgba(72,208,193,.23), transparent 30%), linear-gradient(135deg, #073d45 0%, #0b5d5e 54%, #0b6c6e 100%); }
.auth-decoration { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; pointer-events: none; }
.auth-decoration-a { width: 520px; height: 520px; left: -220px; top: -210px; box-shadow: 0 0 0 55px rgba(255,255,255,.02), 0 0 0 120px rgba(255,255,255,.015); }
.auth-decoration-b { width: 420px; height: 420px; right: -190px; bottom: -260px; box-shadow: 0 0 0 55px rgba(255,255,255,.02), 0 0 0 120px rgba(255,255,255,.015); }
.auth-header, .auth-footer { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.demo-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); padding: 9px 14px; border-radius: 999px; font-size: 13px; backdrop-filter: blur(10px); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #65e6b3; box-shadow: 0 0 0 5px rgba(101,230,179,.12); }
.auth-layout { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr); gap: clamp(38px, 6vw, 92px); align-items: center; max-width: 1420px; margin: 56px auto 35px; }
.auth-copy { max-width: 690px; }
.eyebrow { color: #8ee5d4; font-weight: 700; font-size: 14px; margin-bottom: 17px; }
.auth-copy h1 { margin: 0; font-size: clamp(40px, 4.8vw, 68px); line-height: 1.18; letter-spacing: -.9px; }
.auth-copy h1 span { color: #98eadb; }
.auth-copy > p { color: rgba(255,255,255,.78); font-size: 18px; line-height: 1.9; max-width: 650px; margin: 24px 0; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.feature-chips span { border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.07); padding: 9px 12px; border-radius: 999px; font-size: 12px; color: rgba(255,255,255,.9); }
.investor-note { display: flex; gap: 13px; align-items: flex-start; margin-top: 26px; padding: 16px 18px; border-right: 3px solid #8ee5d4; background: rgba(2,35,39,.22); border-radius: 13px; color: rgba(255,255,255,.78); line-height: 1.7; font-size: 13px; }
.investor-note > span { color: #8ee5d4; font-size: 20px; }
.investor-note strong { color: #fff; }
.login-panel { background: rgba(255,255,255,.98); color: var(--ink); border-radius: 28px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 35px 90px rgba(0,0,0,.25); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.step-label { color: var(--brand-2); font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.panel-heading h2 { margin: 0; font-size: 24px; }
.secure-mark { color: var(--muted); font-size: 11px; background: var(--surface-3); border-radius: 999px; padding: 7px 10px; white-space: nowrap; }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; max-height: 390px; overflow-y: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.role-option { min-height: 102px; text-align: right; border: 1px solid var(--line); background: #fff; border-radius: 15px; padding: 13px; color: var(--ink); transition: .18s ease; position: relative; }
.role-option:hover { transform: translateY(-2px); border-color: #9dcfca; box-shadow: var(--shadow-sm); }
.role-option.active { border-color: var(--brand-2); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-2); }
.role-option.active::after { content: "✓"; position: absolute; left: 10px; top: 9px; color: #fff; background: var(--brand-2); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; }
.role-icon { font-size: 24px; display: block; margin-bottom: 9px; }
.role-option strong { display: block; font-size: 12px; line-height: 1.45; }
.role-option small { color: var(--muted); font-size: 9px; display: block; margin-top: 3px; }
.primary-btn, .outline-btn, .ghost-btn, .danger-btn, .success-btn, .neutral-btn { border: 0; border-radius: 12px; min-height: 44px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: .16s ease; }
.primary-btn { color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 9px 20px rgba(11,93,94,.19); }
.primary-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.outline-btn { background: #fff; color: var(--brand); border: 1px solid #aacdca; }
.outline-btn:hover { background: var(--brand-soft); }
.ghost-btn { background: var(--brand-soft); color: var(--brand); }
.neutral-btn { background: var(--surface-3); color: var(--ink); }
.danger-btn { background: var(--danger); color: #fff; }
.success-btn { background: var(--success); color: #fff; }
.wide-btn { width: 100%; }
.login-panel .wide-btn { margin-top: 18px; min-height: 52px; }
.privacy-microcopy { text-align: center; color: var(--muted); font-size: 10px; line-height: 1.6; margin: 12px 0 0; }
.auth-footer { max-width: 1420px; margin: 0 auto; font-size: 11px; color: rgba(255,255,255,.55); }

/* App shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 0 0 auto; width: var(--sidebar); background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 16px 14px; overflow-y: auto; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 15px; }
.sidebar-close { display: none !important; }
.sidebar-role-card { background: linear-gradient(135deg, #0b5d5e, #147d79); color: #fff; border-radius: 17px; padding: 15px; margin-bottom: 16px; }
.role-card-top { display: flex; align-items: center; gap: 10px; }
.role-card-avatar { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 21px; }
.sidebar-role-card strong { display: block; font-size: 13px; }
.sidebar-role-card small { color: rgba(255,255,255,.72); font-size: 10px; }
.role-card-status { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: rgba(255,255,255,.75); }
.role-card-status b { font-weight: 600; color: #fff; background: rgba(255,255,255,.12); padding: 4px 7px; border-radius: 999px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { padding: 8px 10px 5px; color: #87949b; font-size: 9px; font-weight: 700; letter-spacing: .4px; }
.nav-item { border: 0; background: transparent; color: #42535c; display: flex; align-items: center; gap: 11px; min-height: 45px; border-radius: 12px; padding: 0 12px; text-align: right; font-size: 12px; width: 100%; }
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.nav-item .nav-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); font-size: 13px; }
.nav-item.active .nav-icon { background: #fff; }
.nav-item .nav-badge { margin-right: auto; background: var(--danger-soft); color: var(--danger); font-size: 9px; padding: 3px 6px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 8px; }
.text-btn { border: 0; background: transparent; color: var(--muted); font-size: 10px; padding: 8px; }
.text-btn:hover { color: var(--brand); }
.demo-disclaimer { display: flex; align-items: center; justify-content: center; gap: 7px; color: #87949b; font-size: 8px; margin-top: 4px; }
.demo-disclaimer span { width: 7px; height: 7px; background: #e9aa42; border-radius: 50%; }
.sidebar-backdrop { display: none; }
.app-workspace { min-height: 100vh; margin-right: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 30; min-height: 82px; background: rgba(245,248,248,.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(223,231,233,.86); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px clamp(18px, 3vw, 38px); }
.topbar-start { display: flex; align-items: center; gap: 13px; }
.page-eyebrow { font-size: 10px; color: var(--brand-2); font-weight: 700; min-height: 14px; }
.topbar h1 { margin: 2px 0 0; font-size: 23px; }
.mobile-menu-btn { display: none !important; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.compact { min-height: 38px; padding: 0 13px; font-size: 11px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 12px; color: var(--ink); position: relative; }
.icon-btn:hover { background: var(--surface-3); }
.notification-btn span { position: absolute; left: -5px; top: -6px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--danger); color: #fff; display: grid; place-items: center; font-size: 8px; border: 2px solid var(--surface-2); }
.role-switcher { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 5px 10px; }
.role-switcher span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.role-switcher select { border: 0; background: transparent; color: var(--ink); font-weight: 700; font-size: 11px; max-width: 155px; outline: none; }
.profile-button { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 12px; color: var(--ink); }
.profile-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #6d57a6, #9180bd); font-weight: 700; }
.profile-meta { text-align: right; }
.profile-meta strong { font-size: 10px; display: block; }
.profile-meta small { color: var(--muted); font-size: 8px; }
.main-content { max-width: 1640px; margin: 0 auto; padding: 26px clamp(18px, 3vw, 38px) 54px; }
.mobile-nav { display: none; }

/* Common content */
.hero-card { border-radius: 23px; min-height: 190px; padding: clamp(20px, 3vw, 30px); background: linear-gradient(120deg, #0a5659 0%, #147d79 62%, #20978e 100%); color: #fff; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 25px; box-shadow: var(--shadow); }
.hero-card::before, .hero-card::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.hero-card::before { width: 250px; height: 250px; left: -90px; top: -120px; box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 75px rgba(255,255,255,.02); }
.hero-card::after { width: 160px; height: 160px; right: 43%; bottom: -120px; }
.hero-copy, .hero-side { position: relative; z-index: 1; }
.hero-copy .eyebrow { margin: 0 0 5px; color: #99ecdc; }
.hero-copy h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.hero-copy p { margin: 10px 0 0; max-width: 680px; color: rgba(255,255,255,.76); line-height: 1.8; font-size: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.hero-actions .primary-btn { color: var(--brand); background: #fff; box-shadow: none; }
.hero-actions .outline-btn { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.3); }
.hero-side { min-width: 245px; display: grid; gap: 9px; }
.hero-mini { border: 1px solid rgba(255,255,255,.15); background: rgba(1,44,47,.2); border-radius: 15px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-mini small { color: rgba(255,255,255,.65); font-size: 9px; }
.hero-mini strong { display: block; margin-top: 4px; font-size: 13px; }
.hero-mini .mini-icon { width: 35px; height: 35px; border-radius: 11px; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 16px; }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 17px; box-shadow: 0 4px 14px rgba(20,54,61,.035); min-width: 0; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-head span:first-child { color: var(--muted); font-size: 10px; }
.metric-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); }
.metric-value { font-weight: 800; font-size: 25px; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.metric-trend { color: var(--success); font-weight: 700; }
.metric-trend.down { color: var(--danger); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 16px; margin-top: 16px; align-items: start; }
.dashboard-grid.equal { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stack { display: grid; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 18px rgba(20,54,61,.035); overflow: hidden; }
.panel-pad { padding: 20px; }
.panel-header { min-height: 58px; padding: 14px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header h3 { font-size: 14px; margin: 0; }
.panel-header p { color: var(--muted); font-size: 9px; margin: 4px 0 0; }
.panel-header .text-link { border: 0; background: transparent; color: var(--brand-2); font-weight: 700; font-size: 10px; padding: 7px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 26px 0 12px; }
.section-title h2 { font-size: 18px; margin: 0; }
.section-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.section-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-weight: 700; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.status-success { background: var(--success-soft); color: var(--success); }
.status-warning { background: var(--warning-soft); color: var(--warning); }
.status-danger { background: var(--danger-soft); color: var(--danger); }
.status-info { background: var(--info-soft); color: var(--info); }
.status-neutral { background: var(--surface-3); color: #5a6971; }
.status-purple { background: var(--purple-soft); color: var(--purple); }
.progress-track { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-2), #45b5a7); }
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 19px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.item-icon { flex: 0 0 auto; width: 39px; height: 39px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 17px; }
.item-body { min-width: 0; flex: 1; }
.item-body strong { font-size: 11px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-body p { color: var(--muted); margin: 5px 0 0; font-size: 9px; line-height: 1.5; }
.item-side { text-align: left; flex: 0 0 auto; }
.item-side strong { font-size: 10px; }
.item-side small { display: block; color: var(--muted); font-size: 8px; margin-top: 4px; }
.item-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mini-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 9px; min-height: 31px; padding: 0 10px; font-size: 8px; font-weight: 700; }
.mini-btn:hover { background: var(--surface-3); }
.mini-btn.brand { color: var(--brand); border-color: #b7d8d4; background: var(--brand-soft); }
.mini-btn.success { color: var(--success); border-color: #bfe1d0; background: var(--success-soft); }
.mini-btn.danger { color: var(--danger); border-color: #e9c4cb; background: var(--danger-soft); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th { background: #f8fafa; color: var(--muted); font-size: 9px; font-weight: 700; text-align: right; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 10px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fbfdfd; }
.cell-primary { font-weight: 700; }
.cell-secondary { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-state span { display: block; font-size: 34px; margin-bottom: 10px; }
.empty-state strong { color: var(--ink); display: block; font-size: 13px; }
.empty-state p { font-size: 10px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.service-card, .entity-card, .product-card { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 16px; transition: .16s ease; }
.service-card:hover, .entity-card:hover, .product-card:hover { border-color: #a9d2ce; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.service-card .big-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); font-size: 22px; }
.service-card h3, .entity-card h3, .product-card h3 { margin: 13px 0 6px; font-size: 12px; }
.service-card p, .entity-card p, .product-card p { color: var(--muted); font-size: 9px; line-height: 1.65; margin: 0; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.card-foot small { color: var(--muted); font-size: 8px; }
.card-foot strong { font-size: 10px; }
.filter-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.search-field { flex: 1; min-width: 220px; position: relative; }
.search-field input, .filter-select { width: 100%; min-height: 43px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0 13px; color: var(--ink); }
.filter-select { width: auto; min-width: 150px; }
.info-strip { display: flex; align-items: center; gap: 12px; background: var(--info-soft); color: #244b77; border: 1px solid #cfe2f7; border-radius: 14px; padding: 13px 15px; font-size: 10px; line-height: 1.6; margin-bottom: 16px; }
.warning-strip { background: var(--warning-soft); color: #74501b; border-color: #f1dfb8; }
.success-strip { background: var(--success-soft); color: #175b3f; border-color: #c8e8d8; }
.timeline { position: relative; padding: 5px 0; }
.timeline::before { content: ""; position: absolute; right: 19px; top: 17px; bottom: 17px; width: 1px; background: var(--line); }
.timeline-item { display: flex; gap: 14px; position: relative; padding: 9px 0; }
.timeline-dot { flex: 0 0 auto; width: 39px; height: 39px; z-index: 1; border-radius: 50%; display: grid; place-items: center; border: 5px solid #fff; background: var(--brand-soft); font-size: 13px; }
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-content strong { font-size: 10px; }
.timeline-content p { color: var(--muted); font-size: 9px; line-height: 1.55; margin: 4px 0; }
.timeline-content time { color: #8a989f; font-size: 8px; }
.health-profile { display: grid; grid-template-columns: 105px 1fr; gap: 18px; align-items: center; }
.health-score { width: 95px; height: 95px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand-2) 0 82%, var(--surface-3) 82% 100%); position: relative; }
.health-score::after { content: ""; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }
.health-score span { position: relative; z-index: 1; text-align: center; font-weight: 800; font-size: 20px; }
.health-score small { display: block; color: var(--muted); font-size: 7px; font-weight: 400; }
.health-facts { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.health-fact { background: var(--surface-2); padding: 10px 12px; border-radius: 11px; }
.health-fact small { color: var(--muted); font-size: 8px; display: block; }
.health-fact strong { display: block; font-size: 10px; margin-top: 5px; }
.dose-card { border: 1px solid var(--line); border-radius: 15px; padding: 14px; }
.dose-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dose-name { display: flex; align-items: center; gap: 10px; }
.pill-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: var(--purple-soft); }
.dose-name strong { font-size: 11px; }
.dose-name small { display: block; color: var(--muted); font-size: 8px; margin-top: 4px; }
.dose-times { display: flex; align-items: center; gap: 7px; margin-top: 12px; }
.time-chip { border-radius: 999px; padding: 5px 9px; font-size: 8px; background: var(--surface-3); color: var(--muted); }
.time-chip.taken { background: var(--success-soft); color: var(--success); }
.lab-result { display: grid; grid-template-columns: 1fr 100px; gap: 12px; align-items: center; }
.lab-result h4 { margin: 0; font-size: 10px; }
.lab-result p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.lab-value { text-align: left; }
.lab-value strong { font-size: 15px; }
.lab-range { margin-top: 10px; position: relative; height: 7px; background: linear-gradient(90deg, #f4caca 0 20%, #cdebdc 20% 80%, #f4caca 80% 100%); border-radius: 999px; }
.lab-marker { position: absolute; top: -4px; width: 3px; height: 15px; background: var(--ink); border-radius: 2px; }
.capacity-row { display: grid; grid-template-columns: 120px 1fr 48px; gap: 12px; align-items: center; padding: 10px 0; }
.capacity-row strong { font-size: 10px; }
.capacity-row span { text-align: left; color: var(--muted); font-size: 9px; }
.chart-bars { height: 180px; display: flex; align-items: flex-end; gap: 10px; padding-top: 18px; }
.chart-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.chart-col .bar { width: 72%; min-width: 18px; background: linear-gradient(180deg, #35aa9d, var(--brand)); border-radius: 8px 8px 3px 3px; position: relative; min-height: 9px; }
.chart-col .bar:hover::after { content: attr(data-value); position: absolute; bottom: calc(100% + 5px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 7px; padding: 3px 5px; border-radius: 5px; }
.chart-col small { color: var(--muted); font-size: 7px; }
.kpi-split { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.kpi-mini { background: var(--surface-2); border-radius: 13px; padding: 13px; }
.kpi-mini small { color: var(--muted); font-size: 8px; }
.kpi-mini strong { display: block; margin-top: 7px; font-size: 16px; }
.map-board { min-height: 330px; border-radius: 17px; position: relative; overflow: hidden; background-color: #e9f0ef; background-image: linear-gradient(30deg, transparent 45%, rgba(255,255,255,.8) 45% 49%, transparent 49%), linear-gradient(-36deg, transparent 53%, rgba(255,255,255,.8) 53% 58%, transparent 58%), linear-gradient(90deg, rgba(164,187,185,.25) 1px, transparent 1px), linear-gradient(rgba(164,187,185,.25) 1px, transparent 1px); background-size: 150px 130px, 190px 160px, 42px 42px, 42px 42px; }
.map-pin { position: absolute; width: 40px; height: 40px; border: 5px solid #fff; border-radius: 50% 50% 50% 10%; transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(20,54,61,.18); }
.map-pin span { transform: rotate(45deg); font-size: 13px; }
.map-pin.ambulance { background: var(--brand-2); }
.map-pin.emergency { background: var(--danger); animation: pulse-pin 1.8s infinite; }
.map-label { position: absolute; background: #fff; border-radius: 10px; padding: 7px 9px; box-shadow: var(--shadow-sm); font-size: 8px; }
@keyframes pulse-pin { 0%,100% { box-shadow: 0 0 0 0 rgba(180,59,80,.3), 0 6px 18px rgba(20,54,61,.18); } 50% { box-shadow: 0 0 0 12px rgba(180,59,80,0), 0 6px 18px rgba(20,54,61,.18); } }
.audit-row { display: grid; grid-template-columns: 145px 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border-bottom: 0; }
.audit-row time { color: var(--muted); font-size: 8px; }
.audit-row p { margin: 0; font-size: 9px; }
.audit-row small { color: var(--muted); font-size: 8px; }

/* Forms and modal */
.modal-root:empty { display: none; }
.modal-root { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(10,30,34,.58); backdrop-filter: blur(5px); }
.modal { width: min(610px, 100%); max-height: min(780px, calc(100vh - 36px)); overflow-y: auto; background: #fff; border-radius: 23px; box-shadow: 0 30px 90px rgba(0,0,0,.32); animation: modal-in .18s ease-out; }
.modal.wide { width: min(840px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-header { padding: 19px 21px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.modal-close { border: 0; background: var(--surface-3); width: 34px; height: 34px; border-radius: 10px; font-size: 18px; color: var(--muted); }
.modal-body { padding: 21px; }
.modal-footer { padding: 15px 21px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { color: #40515a; font-size: 9px; font-weight: 700; }
.form-group input, .form-group select, .form-group textarea { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 11px; min-height: 44px; padding: 10px 12px; color: var(--ink); }
.form-group textarea { min-height: 86px; resize: vertical; line-height: 1.7; }
.form-group small { color: var(--muted); font-size: 8px; }
.tour-steps { display: grid; gap: 10px; }
.tour-step { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 13px; }
.tour-step > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--brand-2); font-weight: 800; }
.tour-step strong { font-size: 11px; }
.tour-step p { color: var(--muted); font-size: 9px; line-height: 1.6; margin: 5px 0 0; }
.notification-list { display: grid; gap: 9px; }
.notification-card { display: grid; grid-template-columns: 39px 1fr; gap: 11px; padding: 12px; border-radius: 13px; background: var(--surface-2); }
.notification-card .item-icon { width: 39px; height: 39px; }
.notification-card strong { font-size: 10px; }
.notification-card p { color: var(--muted); font-size: 8px; margin: 4px 0; line-height: 1.55; }
.notification-card time { color: #94a0a6; font-size: 7px; }
.toast-container { position: fixed; z-index: 140; left: 20px; bottom: 20px; display: grid; gap: 10px; pointer-events: none; }
.toast { min-width: 290px; max-width: 390px; display: flex; align-items: center; gap: 11px; color: #fff; background: #18383c; border-radius: 14px; padding: 13px 15px; box-shadow: 0 13px 35px rgba(0,0,0,.2); font-size: 10px; animation: toast-in .25s ease-out; }
.toast.success { background: #176444; }
.toast.warning { background: #855814; }
.toast.danger { background: #963447; }
.toast .toast-icon { font-size: 17px; }
.toast strong { display: block; font-size: 10px; }
.toast small { display: block; color: rgba(255,255,255,.72); margin-top: 3px; font-size: 8px; }
@keyframes toast-in { from { transform: translateX(-18px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Responsive */
@media (max-width: 1180px) {
  .auth-layout { grid-template-columns: 1fr 470px; gap: 42px; }
  .auth-copy h1 { font-size: 47px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .profile-meta { display: none; }
}

@media (max-width: 960px) {
  .auth-screen { padding: 24px 22px 18px; }
  .auth-layout { grid-template-columns: 1fr; max-width: 720px; margin-top: 38px; }
  .auth-copy { text-align: center; max-width: none; }
  .auth-copy > p { margin-left: auto; margin-right: auto; }
  .feature-chips { justify-content: center; }
  .investor-note { text-align: right; }
  .login-panel { width: 100%; }
  .sidebar { transform: translateX(105%); transition: transform .22s ease; box-shadow: -20px 0 60px rgba(0,0,0,.18); }
  .sidebar.open { transform: none; }
  .sidebar-close { display: inline-grid !important; }
  .sidebar-backdrop { position: fixed; z-index: 45; inset: 0; background: rgba(10,30,34,.42); }
  .sidebar-backdrop.visible { display: block; }
  .app-workspace { margin-right: 0; }
  .mobile-menu-btn { display: inline-grid !important; }
  .dashboard-grid, .dashboard-grid.equal { grid-template-columns: 1fr; }
  .topbar-actions .role-switcher span { display: none; }
  .topbar-actions .outline-btn { display: none; }
}

@media (max-width: 680px) {
  :root { --radius: 17px; }
  body { background: #f5f8f8; }
  .auth-screen { min-height: 100dvh; }
  .auth-header .demo-pill { font-size: 9px; padding: 7px 9px; }
  .auth-copy h1 { font-size: 35px; }
  .auth-copy > p { font-size: 14px; line-height: 1.8; }
  .feature-chips { gap: 6px; }
  .feature-chips span { font-size: 9px; padding: 7px 9px; }
  .investor-note { font-size: 10px; }
  .login-panel { border-radius: 22px; padding: 19px; }
  .role-grid { grid-template-columns: repeat(2, minmax(0,1fr)); max-height: none; }
  .role-option { min-height: 92px; }
  .auth-footer { margin-top: 22px; }
  .topbar { min-height: 68px; padding: 9px 13px; }
  .topbar h1 { font-size: 17px; }
  .page-eyebrow { font-size: 8px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .role-switcher { display: none; }
  .profile-button { display: none; }
  .icon-btn { width: 37px; height: 37px; border-radius: 11px; }
  .main-content { padding: 15px 13px 92px; }
  .hero-card { min-height: 0; align-items: flex-start; padding: 19px; border-radius: 19px; }
  .hero-copy h2 { font-size: 23px; }
  .hero-copy p { font-size: 10px; }
  .hero-side { display: none; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions button { min-height: 42px; padding: 0 10px; font-size: 9px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 10px; }
  .metric-card { padding: 13px; border-radius: 14px; }
  .metric-value { font-size: 20px; }
  .metric-head span:first-child { font-size: 8px; }
  .metric-foot { font-size: 7px; }
  .dashboard-grid { gap: 10px; margin-top: 10px; }
  .panel-header { padding: 12px 14px; }
  .panel-pad { padding: 15px; }
  .list-item { padding: 12px 14px; }
  .section-title { margin-top: 20px; align-items: flex-start; }
  .section-title h2 { font-size: 15px; }
  .card-grid { grid-template-columns: 1fr; gap: 9px; }
  .health-profile { grid-template-columns: 82px 1fr; gap: 12px; }
  .health-score { width: 78px; height: 78px; }
  .health-facts { grid-template-columns: 1fr 1fr; gap: 7px; }
  .capacity-row { grid-template-columns: 90px 1fr 38px; }
  .mobile-nav { position: fixed; z-index: 40; bottom: 0; right: 0; left: 0; min-height: 68px; padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); display: flex; align-items: stretch; overflow-x: auto; backdrop-filter: blur(14px); box-shadow: 0 -8px 26px rgba(20,54,61,.08); }
  .mobile-nav button { flex: 1 0 72px; border: 0; background: transparent; color: var(--muted); border-radius: 11px; display: grid; place-items: center; align-content: center; gap: 3px; font-size: 8px; }
  .mobile-nav button span:first-child { font-size: 17px; }
  .mobile-nav button.active { color: var(--brand); background: var(--brand-soft); font-weight: 700; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92dvh; align-self: end; }
  .modal-root { place-items: end center; padding: 0; }
  .toast-container { left: 12px; right: 12px; bottom: 82px; }
  .toast { min-width: 0; max-width: none; width: 100%; }
  .kpi-split { grid-template-columns: 1fr 1fr; }
  .map-board { min-height: 270px; }
  .audit-row { grid-template-columns: 1fr auto; }
  .audit-row time { grid-column: 1 / -1; }
}

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