:root{
  --teal:#0b7b6e;--teal-dark:#095e54;--accent:#5b3d86;
  --bg:#f4f9f8;--ink:#1a2a33;--muted:#5f7e7a;--faint:#89a8a3;
  --line:#e0ece9;--line2:#f0f6f5;--card:#fff;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--bg);color:var(--ink);display:flex;min-height:100vh}
a{text-decoration:none;color:inherit}
::-webkit-scrollbar{width:7px;height:7px}::-webkit-scrollbar-thumb{background:#b8d0cc;border-radius:8px}

.sidebar{width:230px;min-width:230px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:20px 14px 16px 16px;position:sticky;top:0;height:100vh}
.logo{display:flex;align-items:center;gap:10px;padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:8px}
.logo .mark{width:38px;height:38px;background:var(--teal);border-radius:11px;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:15px}
.logo .name{font-size:17px;font-weight:700;color:#0b2a2a;line-height:1.1}
.logo .name small{display:block;font-size:10px;font-weight:600;color:var(--teal);letter-spacing:.3px}
.nav-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.6px;color:var(--faint);padding:12px 8px 5px}
.nav a{display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:9px;color:#3d5a56;font-size:14px;font-weight:500;margin-bottom:1px}
.nav a .ico{width:18px;text-align:center;color:var(--faint);font-size:14px}
.nav a:hover{background:#e8f4f2;color:#0b2a2a}
.nav a.on{background:#dff0ed;color:var(--teal);font-weight:600}
.nav a.on .ico{color:var(--teal)}
.side-foot{margin-top:auto;font-size:11px;color:var(--faint);line-height:1.6;padding-top:12px;border-top:1px solid var(--line2)}

.main{flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{background:#fff;border-bottom:1px solid var(--line);padding:12px 30px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:5}
.crumb{font-size:13px;color:var(--faint)}.crumb b{color:#0b2a2a}
.who{display:flex;align-items:center;gap:12px}
.who .txt{text-align:right;line-height:1.25}
.who .txt b{font-size:13px;color:#0b2a2a}.who .txt span{font-size:11px;color:var(--muted)}
.av{width:34px;height:34px;border-radius:50%;background:#dff0ed;color:var(--teal);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:13px}
.protobar{background:#fef8ec;border-bottom:1px solid #f6e2b8;color:#8a6410;font-size:12px;padding:6px 30px}

.wrap{padding:22px 30px 60px;max-width:960px;width:100%}
.ptitle{font-size:23px;font-weight:700;letter-spacing:-.3px}
.psub{color:var(--muted);font-size:14px;margin:3px 0 18px}

.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px;margin-bottom:20px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px 17px}
.kpi .l{font-size:12.5px;color:var(--muted)}
.kpi .v{font-size:27px;font-weight:700;margin-top:5px;letter-spacing:-.5px}
.kpi.warn .v{color:#d97706}.kpi.good .v{color:var(--teal)}

.card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-bottom:16px}
.card h3{font-size:14px;font-weight:700;padding:14px 18px;border-bottom:1px solid var(--line2)}
.card .body{padding:8px 0}
.card .pad{padding:16px 18px}
.row{display:flex;align-items:center;gap:12px;padding:11px 18px;border-bottom:1px solid var(--line2)}
.row:last-child{border-bottom:none}
.row .nm{font-weight:600;font-size:14px}.row .mt{font-size:12px;color:var(--faint)}
.row .right{margin-left:auto;text-align:right}
.empty{padding:26px 18px;text-align:center;color:var(--faint);font-size:13px}

.pill{font-size:11px;font-weight:600;padding:3px 10px;border-radius:20px;white-space:nowrap;display:inline-block}
.pill.ok{background:#dff0ed;color:var(--teal)}
.pill.warn{background:#fef3c7;color:#b45309}
.pill.bad{background:#fee2e2;color:#b91c1c}
.pill.info{background:#e0f2fe;color:#0369a1}
.chip{display:inline-block;background:#eef5f3;color:#0b5a51;border-radius:20px;padding:4px 11px;font-size:12px;margin:0 6px 6px 0}
.chip form{display:inline}
.chip .x{background:none;border:0;color:#0b5a51;cursor:pointer;padding:0 0 0 3px;font-size:13px}

table{width:100%;border-collapse:collapse}
thead th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--faint);font-weight:600;padding:11px 18px;background:#f8fbfa;border-bottom:1px solid var(--line)}
tbody td{padding:12px 18px;border-bottom:1px solid var(--line2);font-size:14px}
tbody tr:last-child td{border-bottom:none}

.btn{border:none;border-radius:9px;padding:8px 15px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:7px}
.btn.primary{background:var(--teal);color:#fff}.btn.primary:hover{background:var(--teal-dark)}
.btn.ghost{background:#f0f6f5;color:var(--teal);border:1px solid #d4e2de}
.btn.sm{padding:5px 12px;font-size:13px}
.btn.danger{background:#f0f6f5;color:#b91c1c;border:1px solid #f3caca}

.field label{display:block;font-size:12px;font-weight:600;color:#3d5a56;margin-bottom:5px}
input,textarea,select{border:1px solid #d4e2de;border-radius:9px;padding:9px 12px;font-size:14px;font-family:inherit;color:var(--ink);background:#fff;outline:none}
input:focus,textarea:focus,select:focus{border-color:var(--teal)}
textarea{width:100%;resize:vertical;min-height:74px}
.fullw{width:100%}

@media(max-width:820px){.kpis{grid-template-columns:1fr 1fr}.sidebar{width:60px;min-width:60px}.logo .name,.nav a span,.nav-label,.side-foot{display:none}}

/* ── Lucide icons ─────────────────────────────────────────── */
.nav a .ico{display:flex;align-items:center;justify-content:center}
.nav a .ico svg{width:18px;height:18px;stroke-width:2}
.card h3{display:flex;align-items:center;gap:8px}
.card h3 svg{width:15px;height:15px;color:var(--teal);stroke-width:2}
.kpi .l{display:flex;align-items:center;gap:6px}
.kpi .l svg{width:14px;height:14px;color:var(--teal);stroke-width:2}
.btn svg{width:15px;height:15px}
[data-lucide]{display:inline-block;width:16px;height:16px}

/* shared tab bar (person profile + medication administration) */
.ptabs{display:flex;gap:4px;flex-wrap:wrap;margin:16px 0 14px;border-bottom:1px solid var(--line2)}
.ptab{display:inline-block;background:none;border:none;padding:9px 16px;border-radius:8px 8px 0 0;cursor:pointer;font-family:inherit;font-size:14px;color:#64748b;font-weight:600;margin-bottom:-1px;text-decoration:none}
.ptab:hover{color:var(--teal)}
.ptab.active{color:var(--teal);border-bottom:2px solid var(--teal)}

/* collapsible nav groups (dropdown headings with chevrons) */
.navgrp-head{width:100%;display:flex;align-items:center;justify-content:space-between;background:none;border:none;cursor:pointer;font-family:inherit;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#8595a3;padding:12px 12px 6px}
.navgrp-head:hover{color:var(--teal)}
.navgrp-chev{width:15px;height:15px;opacity:.65;transition:transform .18s ease}
.navgrp-items{display:none}
.navgrp.open>.navgrp-items{display:block}
.navgrp.open>.navgrp-head .navgrp-chev{transform:rotate(180deg)}

/* ===== Professional dashboard ===== */
.dashhead{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:20px;flex-wrap:wrap}
.dashhead .greet{font-size:25px;font-weight:750;letter-spacing:-.5px;color:#0b2a2a}
.dashhead .greetsub{color:var(--muted);font-size:13.5px;margin-top:4px}
.dashhead .today{text-align:right;line-height:1.35}
.dashhead .today .d{font-size:15px;font-weight:650;color:#0b2a2a}
.dashhead .today .t{font-size:11px;color:var(--faint);text-transform:uppercase;letter-spacing:.06em;font-weight:600}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(172px,1fr));gap:13px;margin-bottom:20px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px 16px;display:flex;align-items:center;gap:13px;transition:box-shadow .16s ease,transform .16s ease;text-decoration:none;color:inherit}
.kpi:hover{box-shadow:0 6px 18px rgba(11,123,110,.10);transform:translateY(-1px)}
.kpi .ico{width:38px;height:38px;border-radius:11px;background:#e7f3f1;display:flex;align-items:center;justify-content:center;flex:none}
.kpi .ico svg{width:18px;height:18px;color:var(--teal);stroke-width:2}
.kpi .txt{min-width:0}
.kpi .v{font-size:26px;font-weight:750;letter-spacing:-.6px;line-height:1;color:#0b2a2a}
.kpi .l{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.045em;font-weight:600;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi.good .ico{background:#e2f3ee}.kpi.good .v{color:var(--teal)}
.kpi.warn{border-color:#f0dcc0;background:#fffdf7}.kpi.warn .ico{background:#fbe9cf}.kpi.warn .ico svg{color:#c2790a}.kpi.warn .v{color:#b5710a}
.dashgrid{display:grid;grid-template-columns:1.65fr 1fr;gap:16px;align-items:start}
.dashcol{display:flex;flex-direction:column;gap:16px;min-width:0}
.card{box-shadow:0 1px 2px rgba(16,40,37,.03)}
@media(max-width:960px){.dashgrid{grid-template-columns:1fr}}

/* ===== Executive dashboard ===== */
.wrap:has(.execdash){max-width:1240px}
.execdash{font-family:'DM Sans','Inter',sans-serif}
.ex-hero{position:relative;overflow:hidden;border-radius:22px;padding:26px 28px;color:#fff;background:radial-gradient(circle at 82% 18%,rgba(91,231,208,.26),transparent 30%),linear-gradient(135deg,#073f39,#07584f);box-shadow:0 16px 40px rgba(17,63,58,.14);margin-bottom:18px}
.ex-hero-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;flex-wrap:wrap}
.ex-eyebrow{text-transform:uppercase;letter-spacing:.13em;font-size:11px;font-weight:700;color:#8ce3d4}
.ex-h1{font-family:'Manrope','Inter',sans-serif;font-size:27px;line-height:1.15;margin:8px 0 6px;letter-spacing:-.6px;font-weight:800}
.ex-hero-copy{color:#c7e3de;font-size:14px;max-width:640px}
.ex-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.ex-btn{border-radius:11px;padding:9px 13px;display:inline-flex;align-items:center;gap:7px;font-weight:700;font-size:13px}
.ex-ghost{background:rgba(255,255,255,.10);color:#fff;border:1px solid rgba(255,255,255,.18)}
.ex-btn svg{width:15px;height:15px}
.ex-hero-stats{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:11px;margin-top:24px}
.ex-hstat{padding:13px 15px;border-radius:14px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.13)}
.ex-hstat .l{font-size:11px;color:#b9dcd6;text-transform:uppercase;letter-spacing:.07em}
.ex-hstat .v{font-family:'Manrope','Inter',sans-serif;font-size:23px;font-weight:800;margin-top:5px}
.ex-hstat .d{font-size:11px;color:#9ce5d8;margin-top:3px}
.ex-prio{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-bottom:18px}
.ex-p{display:flex;align-items:center;gap:12px;padding:13px 15px;border-radius:15px;background:#fff;border:1px solid var(--line);box-shadow:0 6px 18px rgba(17,63,58,.06);color:inherit;transition:.18s}
.ex-p:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(17,63,58,.10)}
.ex-p.danger{border-left:4px solid #be3f45}.ex-p.warning{border-left:4px solid #c67b14}.ex-p.info{border-left:4px solid #3678c8}
.ex-p-ico{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;flex:none}
.ex-p-ico svg{width:19px;height:19px}
.ex-p.danger .ex-p-ico{background:#fff0f1;color:#be3f45}.ex-p.warning .ex-p-ico{background:#fff6df;color:#c67b14}.ex-p.info .ex-p-ico{background:#edf5ff;color:#3678c8}
.ex-p strong{display:block;font-size:13px;line-height:1.3}.ex-p span{font-size:11.5px;color:var(--muted)}
.ex-chev{margin-left:auto;color:#91a5a2;width:16px;height:16px;flex:none}
.ex-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.9fr);gap:18px}
.ex-stack{display:flex;flex-direction:column;gap:18px;min-width:0}
.ex-panel{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 6px 18px rgba(17,63,58,.05);overflow:hidden}
.ex-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 18px;border-bottom:1px solid #eaf1f0}
.ex-title{display:flex;align-items:center;gap:9px;font-family:'Manrope','Inter',sans-serif;font-weight:800;font-size:15px;color:var(--ink)}
.ex-title svg{width:18px;height:18px;color:var(--teal)}
.ex-sub{font-size:12px;color:var(--muted);margin-top:2px}
.ex-link{font-size:12.5px;font-weight:700;color:var(--teal);white-space:nowrap}
.ex-health{display:grid;grid-template-columns:190px 1fr;padding:20px;gap:22px;align-items:center}
.ex-ring{width:150px;height:150px;margin:auto;position:relative}
.ex-ring svg{width:100%;height:100%}
.ex-score-center{position:absolute;inset:0;display:grid;place-content:center;text-align:center}
.ex-score{font-family:'Manrope','Inter',sans-serif;font-weight:800;font-size:38px;line-height:1}
.ex-score-label{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.1em;margin-top:4px}
.ex-domains{display:grid;gap:13px}
.ex-drow{display:grid;grid-template-columns:130px 1fr 42px;align-items:center;gap:11px}
.ex-dname{font-size:12.5px;font-weight:600}
.ex-track{height:9px;background:#edf3f2;border-radius:20px;overflow:hidden}
.ex-fill{height:100%;border-radius:20px;background:linear-gradient(90deg,#0d8577,#23b7a5)}
.ex-fill.warn{background:linear-gradient(90deg,#d68b20,#efb34e)}
.ex-dval{text-align:right;font-size:12px;font-weight:800}
.ex-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;padding:16px}
.ex-metric{padding:15px;border:1px solid #e4ecea;border-radius:14px;background:#fbfdfd}
.ex-m-ico{width:36px;height:36px;border-radius:10px;background:#dcf5f0;display:grid;place-items:center;color:var(--teal);margin-bottom:12px}
.ex-m-ico svg{width:17px;height:17px}
.ex-m-v{font-family:'Manrope','Inter',sans-serif;font-weight:800;font-size:25px;line-height:1;color:var(--ink)}
.ex-m-l{font-size:12px;color:var(--muted);margin-top:6px}
.ex-q{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:13px 18px;border-bottom:1px solid #eef2f1}
.ex-q:last-child{border-bottom:0}
.ex-av{width:37px;height:37px;border-radius:11px;background:#d8f5ef;display:grid;place-items:center;color:#07584f;font-weight:800;font-size:13px}
.ex-q-t{font-size:13px;font-weight:700}
.ex-q-c{font-size:12px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ex-q-btn{border:1px solid #cfe1de;background:#fff;border-radius:9px;padding:7px 11px;font-size:11.5px;font-weight:700;color:var(--teal);white-space:nowrap}
.ex-sev{padding:16px 18px;display:flex;flex-direction:column;gap:10px}
.ex-sev-row{display:flex;align-items:center;gap:10px}
.ex-sev-l{font-size:12px;color:var(--muted);width:56px;text-transform:capitalize}
.ex-sev-track{flex:1;height:9px;background:#eef3f2;border-radius:6px;overflow:hidden}
.ex-sev-track div{height:100%;border-radius:6px}
.ex-sev-n{font-size:12px;font-weight:700;width:16px;text-align:right}
.ex-homes{padding:6px 18px 14px}
.ex-home{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eef2f1}
.ex-home:last-child{border-bottom:0}
.ex-home-n{font-size:13px;font-weight:700}.ex-home-m{font-size:11.5px;color:var(--muted);margin-top:2px}
.ex-status{border-radius:999px;padding:5px 10px;font-size:10.5px;font-weight:800;white-space:nowrap}
.ex-status.good{background:#e7f7f1;color:#12845f}.ex-status.warn{background:#fff6df;color:#9a5c08}.ex-status.bad{background:#fff0f1;color:#be3f45}
.ex-act{padding:4px 18px 14px}
.ex-act-i{display:grid;grid-template-columns:34px 1fr;gap:11px;padding:11px 0}
.ex-act-ico{width:34px;height:34px;border-radius:10px;background:#eff7f5;color:var(--teal);display:grid;place-items:center}
.ex-act-ico svg{width:16px;height:16px}
.ex-act-t{font-size:12.5px;font-weight:700}.ex-act-c{font-size:11.5px;color:var(--muted);margin-top:2px}.ex-act-time{font-size:10.5px;color:#93a4a2;margin-top:4px}
.ex-empty{padding:18px;text-align:center;color:var(--faint);font-size:13px}
@media(max-width:900px){.ex-grid{grid-template-columns:1fr}.ex-prio{grid-template-columns:1fr}.ex-hero-stats{grid-template-columns:1fr 1fr}.ex-health{grid-template-columns:1fr}.ex-metrics{grid-template-columns:1fr 1fr}}

/* ===== Professional sidebar ===== */
.sidebar{width:270px;min-width:270px;padding:18px 14px 14px}
.logo{gap:12px;padding:2px 6px 16px;margin-bottom:14px}
.logo .mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(145deg,#0f9b85,#087565);box-shadow:0 9px 22px rgba(15,138,120,.22);font-size:15px}
.logo .name{font-size:17px;color:#0f2f2b}
.logo .name small{font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--teal)}
.nav{display:flex;flex-direction:column;gap:5px}
.nav>a{min-height:46px;padding:0 13px;border-radius:12px;gap:12px;color:#31534e;font-size:14px;font-weight:600;margin-bottom:0;transition:.16s ease}
.nav>a:hover{background:#edf8f5;color:#0a6b5e}
.nav>a.on{background:#dff1ed;color:#0a6b5e}
.nav>a .ico{color:#7ea39d}
.nav>a .ico svg{width:20px;height:20px}
.nav>a.on .ico{color:#0f8a78}
.navgrp{margin-top:2px}
.navgrp-head{min-height:42px;padding:0 10px;border-radius:10px;font-size:12px;letter-spacing:.075em;color:#7d8e9b}
.navgrp-head:hover{background:#f4faf9;color:#7d8e9b}
.navgrp-chev{color:#9aaba8}
.navgrp-items{display:grid;grid-template-rows:0fr;transition:grid-template-rows .24s ease}
.navgrp.open>.navgrp-items{display:grid;grid-template-rows:1fr}
.navgrp-inner{overflow:hidden;min-height:0}
.navgrp-items a{min-height:40px;padding:0 10px 0 12px;border-radius:10px;gap:11px;margin:1px 0 1px 8px;color:#486560;font-size:13px;font-weight:500;display:flex;align-items:center}
.navgrp-items a:hover{background:#edf8f5;color:#0a6b5e}
.navgrp-items a.on{background:#dff1ed;color:#0a6b5e;font-weight:600}
.navgrp-items a .ico{color:#7ea39d}
.navgrp-items a .ico svg{width:17px;height:17px}
.navgrp-items a.on .ico{color:#0f8a78}
.side-foot{margin-top:18px;padding:14px 8px 2px;border-top:1px solid var(--line);color:inherit}
.user-card{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.uc-av{width:35px;height:35px;border-radius:50%;background:#dff1ed;color:#0a6b5e;display:grid;place-items:center;font-size:12px;font-weight:700;flex:none}
.uc-meta{min-width:0}
.uc-name{font-size:13px;font-weight:700;color:#23433e}
.uc-role{font-size:11px;color:var(--muted);margin-top:1px}
.phi-note{font-size:10.5px;color:var(--faint);line-height:1.5}
@media(max-width:820px){.sidebar{width:64px;min-width:64px}.nav>a span,.navgrp-head span,.navgrp-items a span,.uc-meta,.phi-note{display:none}.navgrp-head{justify-content:center;padding:0}.nav>a{justify-content:center;padding:0}.navgrp-items a{margin-left:0;justify-content:center;padding:0}.user-card{justify-content:center}}
