/* HPC Portal - colours from the Healthcare Providers Care logo (navy + aqua) */
:root {
    --navy: #00256e;
    --navy-d: #001a52;
    --navy-l: #1d3f8f;
    --aqua: #018593;
    --aqua-d: #006d79;
    --aqua-l: #00a8b5;
    --aqua-50: #e6f6f7;
    --aqua-100: #cdeef0;
    --bg: #f2f5f9;
    --panel: #ffffff;
    --line: #e2e8f0;
    --line-2: #edf1f6;
    --text: #12203a;
    --muted: #5d6b82;
    --faint: #8b97aa;
    --green: #18a957;
    --amber: #e59a0b;
    --red: #d93a3a;
    --purple: #7a4dd8;
    --chat-bg: #e8f0f3;
    --mine: #d3f0f2;
    --theirs: #ffffff;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(10, 30, 70, .06), 0 4px 16px rgba(10, 30, 70, .06);
    --shadow-lg: 0 10px 40px rgba(0, 20, 60, .22);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
    color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px; line-height: 1.45; color: var(--text); background: var(--bg);
    -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--aqua-d); }
img { max-width: 100%; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- boot / auth ---------- */
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-d) 55%, var(--aqua-d) 100%); }
.boot img { animation: pulse 1.6s ease-in-out infinite; filter: drop-shadow(0 6px 18px rgba(0,0,0,.25)); }
.boot-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.boot-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--aqua-l); animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.auth { min-height: 100vh; height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 24px 16px calc(24px + var(--safe-b)); background: radial-gradient(1200px 600px at 10% -10%, rgba(0,168,181,.35), transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-d) 60%, #00384a 100%); }
.auth-card { width: 100%; max-width: 410px; background: #fff; border-radius: 22px; padding: 30px 26px 24px; box-shadow: var(--shadow-lg); }
.auth-logo { display: block; width: 230px; margin: 0 auto 6px; }
.auth h1 { font-size: 20px; text-align: center; margin: 14px 0 4px; color: var(--navy); }
.auth p.sub { text-align: center; color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.auth .foot { text-align: center; font-size: 12px; color: var(--faint); margin-top: 18px; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label, .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, select.input, textarea.input {
    width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fff; outline: none;
    transition: border-color .15s, box-shadow .15s; font-size: 15px;
}
.input:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(1, 133, 147, .14); }
textarea.input { resize: vertical; min-height: 84px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--faint); margin-top: 5px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; padding: 4px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--aqua); }
.err { background: #fdecec; color: #a32020; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 11px 18px;
    font-weight: 600; font-size: 14.5px; background: var(--aqua); color: #fff; transition: background .15s, transform .05s, opacity .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--aqua-d); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.navy { background: var(--navy); } .btn.navy:hover { background: var(--navy-d); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); } .btn.ghost:hover { background: var(--line-2); }
.btn.soft { background: var(--aqua-50); color: var(--aqua-d); } .btn.soft:hover { background: var(--aqua-100); }
.btn.danger { background: var(--red); } .btn.danger:hover { background: #b92b2b; }
.btn.danger-soft { background: #fdecec; color: #b42323; } .btn.danger-soft:hover { background: #fadada; }
.btn.green { background: var(--green); } .btn.green:hover { background: #128a46; }
.btn.amber { background: var(--amber); } .btn.amber:hover { background: #c98505; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13.5px; border-radius: 9px; }
.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: inherit; flex: none; position: relative; }
.icon-btn:hover { background: rgba(0, 37, 110, .07); }
.icon-btn svg { width: 22px; height: 22px; }
.on-dark .icon-btn:hover, .topbar .icon-btn:hover { background: rgba(255, 255, 255, .12); }

svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- shell ---------- */
.shell { height: 100vh; height: 100dvh; display: flex; overflow: hidden; }
.rail {
    width: 74px; flex: none; background: linear-gradient(180deg, var(--navy) 0%, var(--navy-d) 100%); color: #cdd8f0; display: flex; flex-direction: column;
    align-items: center; padding: 12px 0 14px; gap: 4px; z-index: 5;
}
.rail .mark { width: 46px; height: 46px; border-radius: 13px; background: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.rail .mark img { width: 38px; }
.rail a { width: 62px; text-align: center; line-height: 1.15; padding: 8px 0 6px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: inherit; text-decoration: none; font-size: 10.5px; font-weight: 600; position: relative; letter-spacing: .1px; }
.rail a svg { width: 23px; height: 23px; }
.rail a:hover { background: rgba(255,255,255,.08); color: #fff; }
.rail a.on { background: rgba(0, 168, 181, .22); color: #fff; }
.rail a.on::before { content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--aqua-l); }
.rail .spacer { flex: 1; }
.rail .me { margin-top: 6px; }
.badge { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; font-size: 11px; font-weight: 700; line-height: 18px; background: var(--aqua-l); color: #fff; text-align: center; box-shadow: 0 0 0 2px var(--navy); }
.badge.red { background: var(--red); }

.side { position: relative; width: 380px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.shell.wide .side { display: none; }

.topbar {
    min-height: 62px; padding: 8px 10px 8px 16px; padding-top: calc(8px + var(--safe-t)); display: flex; align-items: center; gap: 8px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--navy-l) 100%); color: #fff; flex: none;
}
.topbar h1, .topbar h2 { font-size: 19px; margin: 0; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .1px; }
.topbar .sub { font-size: 12.5px; opacity: .82; font-weight: 400; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .t { flex: 1; min-width: 0; cursor: default; }
.topbar .t.click { cursor: pointer; }
.topbar .t b { display: block; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar.light { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); }
.topbar.light .icon-btn:hover { background: var(--line-2); }

.tabs { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; flex: none; border-bottom: 1px solid var(--line-2); background: #fff; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: var(--line-2); color: var(--muted); padding: 7px 13px; border-radius: 20px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tab.on { background: var(--aqua-50); color: var(--aqua-d); box-shadow: inset 0 0 0 1.5px var(--aqua-100); }
.tab .n { background: var(--aqua); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 4px; }

.search { padding: 10px 12px 6px; flex: none; background: #fff; }
.search .box { display: flex; align-items: center; gap: 8px; background: var(--line-2); border-radius: 12px; padding: 0 12px; }
.search input { border: 0; background: transparent; outline: none; padding: 10px 0; flex: 1; min-width: 0; font-size: 15px; }
.search svg { color: var(--faint); }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pad { padding: 16px; }
.page { max-width: 1100px; margin: 0 auto; padding: 18px 18px calc(28px + var(--safe-b)); }
.page.narrow { max-width: 720px; }

/* ---------- lists ---------- */
.item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; position: relative; border-radius: 0; text-decoration: none; color: inherit; }
.item:hover { background: #f6f9fb; }
.item.on { background: var(--aqua-50); }
.item .mid { flex: 1; min-width: 0; border-bottom: 1px solid var(--line-2); padding: 3px 0 11px; margin-bottom: -11px; }
.item:last-child .mid { border-bottom: 0; }
.item .l1 { display: flex; align-items: baseline; gap: 8px; }
.item .name { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15.5px; }
.item .time { font-size: 12px; color: var(--faint); flex: none; }
.item .time.new { color: var(--aqua); font-weight: 700; }
.item .l2 { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 2px; }
.item .l2 .txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .l2 svg { width: 16px; height: 16px; }
.count { min-width: 21px; height: 21px; border-radius: 11px; background: var(--aqua); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; flex: none; }
.count.muted { background: var(--faint); }
.group-h { padding: 14px 16px 6px; font-size: 12px; font-weight: 700; color: var(--aqua-d); text-transform: uppercase; letter-spacing: .6px; display: flex; align-items: center; gap: 8px; }
.group-h .n { color: var(--faint); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 50px 24px; }
.empty svg { width: 54px; height: 54px; color: var(--aqua-100); margin-bottom: 8px; stroke-width: 1.6; }
.empty h3 { margin: 6px 0; color: var(--text); font-size: 17px; }
.fab { position: absolute; right: 18px; bottom: calc(18px + var(--safe-b)); width: 56px; height: 56px; border-radius: 18px; background: var(--aqua); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(1,133,147,.4); display: flex; align-items: center; justify-content: center; z-index: 3; }
.fab svg { width: 26px; height: 26px; }
.fab:hover { background: var(--aqua-d); }

/* ---------- avatars & presence ---------- */
.av { width: 48px; height: 48px; border-radius: 50%; flex: none; position: relative; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 17px; background: var(--navy-l); background-size: cover; background-position: center; text-transform: uppercase; }
.av.sm { width: 36px; height: 36px; font-size: 13px; }
.av.xs { width: 26px; height: 26px; font-size: 11px; }
.av.lg { width: 96px; height: 96px; font-size: 34px; }
.av.xl { width: 128px; height: 128px; font-size: 44px; }
.av.group { border-radius: 15px; }
.av .dot { position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; border-radius: 50%; background: #b8c2d0; box-shadow: 0 0 0 2.5px #fff; }
.av.sm .dot { width: 11px; height: 11px; }
.av.lg .dot { width: 20px; height: 20px; box-shadow: 0 0 0 4px #fff; }
.av .dot.on { background: var(--green); }
.av .dot.brk { background: var(--amber); }
.av .dot.ot { background: var(--purple); }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.pill.green { background: #e3f6ec; color: #0f7a3e; } .pill.amber { background: #fdf2dc; color: #94600a; } .pill.red { background: #fde7e7; color: #b42323; }
.pill.purple { background: #efe8fc; color: #5a33b0; } .pill.aqua { background: var(--aqua-50); color: var(--aqua-d); } .pill.navy { background: #e4e9f5; color: var(--navy); }
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- chat ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--chat-bg); position: relative; }
.chat::before { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
    background-image: radial-gradient(rgba(0,37,110,.05) 1.2px, transparent 1.3px), radial-gradient(rgba(1,133,147,.05) 1.2px, transparent 1.3px);
    background-size: 26px 26px, 26px 26px; background-position: 0 0, 13px 13px; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 5% 10px; position: relative; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.day { text-align: center; margin: 12px 0 8px; position: sticky; top: 4px; z-index: 1; }
.day span { background: rgba(255,255,255,.92); color: var(--muted); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 9px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.sys { text-align: center; margin: 8px 0; }
.sys span { background: #fff8e1; color: #7a5b00; font-size: 12.5px; padding: 5px 12px; border-radius: 9px; display: inline-block; max-width: 85%; }
.m { display: flex; margin: 2px 0; position: relative; }
.m.me { justify-content: flex-end; }
.m.first { margin-top: 8px; }
.bub { max-width: min(75%, 560px); background: var(--theirs); border-radius: 12px; padding: 6px 9px 6px 10px; box-shadow: 0 1px 1px rgba(0,0,0,.08); position: relative; word-wrap: break-word; overflow-wrap: anywhere; min-width: 70px; }
.m.me .bub { background: var(--mine); }
.m.first:not(.me) .bub { border-top-left-radius: 4px; }
.m.first.me .bub { border-top-right-radius: 4px; }
.bub .who { font-size: 13px; font-weight: 700; margin-bottom: 1px; }
.bub .body { white-space: pre-wrap; font-size: 15px; }
.bub .body a { word-break: break-all; }
.bub .meta { float: right; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--faint); margin: 6px 0 -3px 10px; position: relative; top: 2px; white-space: nowrap; }
.bub .meta svg { width: 16px; height: 16px; }
.tick-read { color: #2a9df4; }
.bub.deleted .body { font-style: italic; color: var(--faint); }
.bub .fwd { font-size: 12px; color: var(--faint); font-style: italic; display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.bub .fwd svg { width: 14px; height: 14px; }
.bub .rep { background: rgba(0,37,110,.06); border-left: 4px solid var(--aqua); border-radius: 7px; padding: 5px 9px; margin: 2px 0 5px; font-size: 13px; cursor: pointer; }
.bub .rep b { display: block; color: var(--aqua-d); font-size: 12.5px; }
.bub .rep span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bub img.photo { display: block; border-radius: 8px; max-width: 100%; max-height: 340px; min-width: 160px; object-fit: cover; margin: 2px -3px 4px; cursor: zoom-in; background: #dfe7ec; }
.bub .filebox { display: flex; align-items: center; gap: 10px; background: rgba(0,37,110,.05); border-radius: 9px; padding: 9px 10px; margin: 2px 0 4px; text-decoration: none; color: inherit; min-width: 220px; }
.bub .filebox .fi { width: 40px; height: 40px; border-radius: 9px; background: var(--aqua); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.bub .filebox .fn { font-weight: 600; font-size: 14px; word-break: break-all; }
.bub .filebox .fs { font-size: 12px; color: var(--faint); }
.bub audio { width: 250px; max-width: 100%; height: 40px; display: block; margin: 2px 0; }
.bub .callrow { display: flex; align-items: center; gap: 10px; padding: 4px 2px; font-weight: 600; }
.bub .callrow .ci { width: 36px; height: 36px; border-radius: 50%; background: var(--aqua-50); color: var(--aqua-d); display: flex; align-items: center; justify-content: center; }
.bub .callrow .ci.miss { background: #fde7e7; color: var(--red); }
.m .more { position: absolute; top: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); box-shadow: 0 1px 3px rgba(0,0,0,.15); display: none; align-items: center; justify-content: center; color: var(--muted); z-index: 2; }
.m:not(.me) .more { left: calc(min(75%, 560px) + 4px); }
.m .bub:hover + .more, .m .more:hover { display: flex; }
@media (hover: hover) { .m:hover .more { display: flex; } }
.m.me .more { right: auto; left: auto; position: relative; order: -1; align-self: flex-start; margin-right: 4px; top: 4px; }
.m.sel .bub { box-shadow: 0 0 0 3px var(--aqua-l); }
.m.flash .bub { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { filter: none; } 30% { filter: brightness(.86); } }
.selecting .m { cursor: pointer; }
.selecting .m .bub { pointer-events: none; }
.typing { font-size: 12.5px; color: #d7f7fa; }
.jump { position: absolute; right: 16px; bottom: 84px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; color: var(--muted); z-index: 3; }
.jump .count { position: absolute; top: -6px; right: -4px; }

.composer { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + var(--safe-b)); background: transparent; position: relative; z-index: 2; }
.composer .boxw { flex: 1; min-width: 0; background: #fff; border-radius: 24px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.composer .boxin { display: flex; align-items: flex-end; gap: 2px; padding: 2px 4px; }
.composer textarea { flex: 1; min-width: 0; border: 0; outline: none; resize: none; padding: 11px 6px; max-height: 140px; min-height: 44px; background: transparent; font-size: 15.5px; line-height: 1.4; }
.composer .icon-btn { color: var(--muted); width: 42px; height: 42px; }
.send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--aqua); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 2px 6px rgba(1,133,147,.35); }
.send:hover { background: var(--aqua-d); }
.send svg { width: 22px; height: 22px; }
.send.rec { background: var(--red); }
.replybar { display: flex; align-items: center; gap: 8px; margin: 6px 6px 0; background: var(--line-2); border-left: 4px solid var(--aqua); border-radius: 10px; padding: 6px 4px 6px 10px; font-size: 13px; }
.replybar .t { flex: 1; min-width: 0; }
.replybar b { color: var(--aqua-d); display: block; font-size: 12.5px; }
.replybar span { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replybar .icon-btn { width: 30px; height: 30px; }
.readonly { flex: none; text-align: center; padding: 14px 16px calc(14px + var(--safe-b)); background: #fff; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); position: relative; z-index: 2; }
.recbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex: 1; }
.recbar .rd { width: 11px; height: 11px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.selbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; padding-top: calc(8px + var(--safe-t)); min-height: 62px; background: var(--aqua-d); color: #fff; flex: none; }
.selbar b { flex: 1; font-size: 17px; }

.welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--muted); background: linear-gradient(180deg, #f6f9fc, #edf3f7); }
.welcome img { width: 280px; max-width: 70%; margin-bottom: 18px; }
.welcome h2 { color: var(--navy); margin: 6px 0; }
.welcome .lock { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 26px; color: var(--faint); }

/* ---------- cards ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 16.5px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card h3 .grow { flex: 1; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h3 { padding: 16px 18px 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.stat .v { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .k { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.stat.green .v { color: var(--green); } .stat.amber .v { color: var(--amber); } .stat.purple .v { color: var(--purple); } .stat.aqua .v { color: var(--aqua); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-head { text-align: center; padding: 26px 16px 18px; background: #fff; }
.profile-head h2 { margin: 12px 0 2px; font-size: 22px; }
.profile-head .muted { color: var(--muted); }
.quick { display: flex; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.quick button { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; width: 86px; padding: 10px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--aqua-d); font-size: 12.5px; font-weight: 600; }
.quick button:hover { background: var(--aqua-50); border-color: var(--aqua-100); }
.quick button svg { width: 22px; height: 22px; }
.menu-list .item .mid { padding: 6px 0 14px; }
.menu-list .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--aqua-50); color: var(--aqua-d); display: flex; align-items: center; justify-content: center; flex: none; }
.menu-list .ic.navy { background: #e4e9f5; color: var(--navy); } .menu-list .ic.red { background: #fde7e7; color: var(--red); } .menu-list .ic.amber { background: #fdf2dc; color: #a46a08; } .menu-list .ic.purple { background: #efe8fc; color: var(--purple); }
.danger-text { color: var(--red) !important; }

/* tree (practice → people) */
.tree { padding: 6px 0 4px; }
.tree .node { margin-left: 22px; border-left: 2px solid var(--aqua-100); padding-left: 14px; }
.tree .lvl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--aqua-d); margin: 12px 0 4px; display: flex; align-items: center; gap: 6px; }
.tree .person { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.tree .person:hover { background: #f6f9fb; }
.tree .person .nm { flex: 1; min-width: 0; }
.tree .person .nm b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree .person .nm span { font-size: 12.5px; color: var(--muted); }
.tree .person .icon-btn { width: 34px; height: 34px; color: var(--aqua-d); }
.tree .person .icon-btn svg { width: 19px; height: 19px; }
.tree .root { display: flex; align-items: center; gap: 12px; padding: 4px 0 8px; }
.tree .root .bico { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--navy), var(--aqua)); color: #fff; display: flex; align-items: center; justify-content: center; }

/* tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 10px 12px; background: #f7f9fc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:hover td { background: #fafcfd; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }

/* attendance */
.clock-card { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-l) 45%, var(--aqua) 130%); color: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-lg); margin-bottom: 16px; position: relative; overflow: hidden; }
.clock-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.07); }
.clock-card .st { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 20px; font-weight: 600; font-size: 13.5px; }
.clock-card .st .d { width: 9px; height: 9px; border-radius: 50%; background: #cfd8e8; }
.clock-card .st.in .d { background: #36e08a; } .clock-card .st.break .d { background: #ffc24b; } .clock-card .st.overtime .d { background: #c4a5ff; }
.clock-card .big { font-size: 44px; font-weight: 800; letter-spacing: 1px; margin: 12px 0 2px; font-variant-numeric: tabular-nums; }
.clock-card .small { opacity: .85; font-size: 14px; }
.clock-card .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.clock-card .btn { background: #fff; color: var(--navy); }
.clock-card .btn:hover { background: #eef4ff; }
.clock-card .btn.go { background: #18c26a; color: #fff; } .clock-card .btn.go:hover { background: #12a75a; }
.clock-card .btn.stop { background: #ff5d5d; color: #fff; } .clock-card .btn.stop:hover { background: #e64848; }
.clock-card .btn.glass { background: rgba(255,255,255,.16); color: #fff; } .clock-card .btn.glass:hover { background: rgba(255,255,255,.26); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 8px 0; align-items: flex-start; font-size: 14.5px; }
.timeline .tl-i { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--aqua-50); color: var(--aqua-d); }
.timeline .tl-i svg { width: 17px; height: 17px; }
.timeline .tl-i.amber { background: #fdf2dc; color: #a46a08; } .timeline .tl-i.red { background: #fde7e7; color: var(--red); } .timeline .tl-i.purple { background: #efe8fc; color: var(--purple); }
.timeline small { display: block; color: var(--muted); }
.workchip { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.14); color: #fff; border: 0; white-space: nowrap; }
.workchip .d { width: 8px; height: 8px; border-radius: 50%; background: #cfd8e8; }
.workchip.in .d { background: #36e08a; } .workchip.break .d { background: #ffc24b; } .workchip.overtime .d { background: #c4a5ff; }

/* tasks */
.task { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; align-items: flex-start; background: #fff; }
.task:hover { background: #f8fbfc; }
.task .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--faint); flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; background: #fff; color: #fff; padding: 0; }
.task .tick:hover { border-color: var(--green); }
.task.done .tick { background: var(--green); border-color: var(--green); }
.task .tick svg { width: 14px; height: 14px; stroke-width: 3; }
.task .tb { flex: 1; min-width: 0; }
.task .tt { font-weight: 600; font-size: 15px; }
.task.done .tt { text-decoration: line-through; color: var(--faint); }
.task .tm { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.prio { width: 4px; align-self: stretch; border-radius: 4px; flex: none; background: transparent; }
.prio.high { background: var(--amber); } .prio.urgent { background: var(--red); } .prio.low { background: #c8d2df; }

/* modal / sheet */
#layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.ov { position: fixed; inset: 0; background: rgba(8, 20, 45, .48); display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: auto; animation: fade .15s ease; z-index: 50; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .18s ease; overflow: hidden; }
.modal.wide { max-width: 760px; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal .mh { display: flex; align-items: center; gap: 8px; padding: 16px 12px 12px 20px; border-bottom: 1px solid var(--line-2); }
.modal .mh h3 { flex: 1; margin: 0; font-size: 18px; color: var(--navy); }
.modal .mb { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal .mf { padding: 12px 20px calc(14px + var(--safe-b)); display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.sheet-ov { align-items: flex-end; }
.sheet { background: #fff; width: 100%; max-width: 440px; border-radius: 20px; padding: 8px 0 calc(8px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: up .18s ease; max-height: 80dvh; overflow-y: auto; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet .sh { padding: 10px 20px 6px; font-weight: 700; color: var(--muted); font-size: 13px; }
.sheet button { width: 100%; border: 0; background: transparent; text-align: left; padding: 13px 20px; display: flex; align-items: center; gap: 14px; font-size: 15.5px; }
.sheet button:hover { background: var(--line-2); }
.sheet button svg { color: var(--muted); }
.sheet button.red, .sheet button.red svg { color: var(--red); }
.pick-list { max-height: 50dvh; overflow-y: auto; margin: 0 -20px; }
.pick-list .item .mid { border: 0; margin: 0; padding: 0; }
.pick-list .item input { width: 20px; height: 20px; accent-color: var(--aqua); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--aqua-50); color: var(--aqua-d); border-radius: 20px; padding: 3px 4px 3px 10px; font-size: 13px; font-weight: 600; }
.chip button { border: 0; background: transparent; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: inherit; padding: 0; }
.chip svg { width: 14px; height: 14px; }
.viewer { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 60; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.viewer img { max-width: 96vw; max-height: 86vh; border-radius: 6px; }
.viewer .vbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: flex-end; gap: 6px; padding: calc(10px + var(--safe-t)) 12px 10px; color: #fff; }

/* toasts */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { background: #12203a; color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); pointer-events: auto; animation: up .2s ease; display: flex; gap: 10px; align-items: center; max-width: 100%; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--aqua-d); }
.toast.note { background: #fff; color: var(--text); cursor: pointer; border-left: 4px solid var(--aqua); width: 100%; }
.toast.note b { display: block; }
.toast.note span { color: var(--muted); font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* calls */
.call { position: fixed; inset: 0; z-index: 70; background: radial-gradient(900px 500px at 50% -10%, #12428a 0%, #061a3f 55%, #03102a 100%); color: #fff; display: flex; flex-direction: column; pointer-events: auto; }
.call .ctop { padding: calc(18px + var(--safe-t)) 20px 8px; text-align: center; }
.call .ctop h2 { margin: 0; font-size: 22px; }
.call .ctop .cs { opacity: .8; font-size: 14.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.call .lock { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; opacity: .6; margin-top: 6px; }
.call .lock svg { width: 13px; height: 13px; }
.call .stage { flex: 1; display: grid; gap: 8px; padding: 8px; min-height: 0; grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr); }
.call .stage.n2 { grid-template-columns: 1fr 1fr; } .call .stage.n3, .call .stage.n4 { grid-template-columns: 1fr 1fr; } .call .stage.n5, .call .stage.n6, .call .stage.n7 { grid-template-columns: 1fr 1fr 1fr; }
.call .tile { position: relative; background: #0b2452; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 0; aspect-ratio: auto; }
.call .stage.n1 .tile { height: 100%; }
.call .tile.ring { background: transparent; }
.call .tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.call .tile .nm { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.45); padding: 3px 10px; border-radius: 8px; font-size: 13px; }
.call .tile .av { box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 0 0 14px rgba(255,255,255,.04); }
.call .ring .av { animation: ringp 1.6s ease-in-out infinite; }
@keyframes ringp { 0%,100% { box-shadow: 0 0 0 0 rgba(0,168,181,.5); } 50% { box-shadow: 0 0 0 22px rgba(0,168,181,0); } }
.call .me-tile { position: absolute; right: 14px; top: calc(80px + var(--safe-t)); width: 112px; height: 160px; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.4); background: #000; z-index: 2; }
.call .me-tile video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call .ctrls { display: flex; justify-content: center; gap: 16px; padding: 18px 16px calc(26px + var(--safe-b)); flex-wrap: wrap; }
.call .cb { width: 60px; height: 60px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; }
.call .cb:hover { background: rgba(255,255,255,.24); }
.call .cb.off { background: #fff; color: #0b2452; }
.call .cb.end { background: #ff3b3b; } .call .cb.end:hover { background: #e02a2a; }
.call .cb.acc { background: #18c26a; } .call .cb.acc:hover { background: #12a75a; }
.call .cb svg { width: 26px; height: 26px; }
.call .cl { font-size: 11.5px; text-align: center; opacity: .8; margin-top: 6px; }
.call .cbw { display: flex; flex-direction: column; align-items: center; }
.call.mini { inset: auto; right: 16px; bottom: calc(90px + var(--safe-b)); width: 230px; height: auto; border-radius: 18px; box-shadow: var(--shadow-lg); cursor: pointer; }
.call.mini .stage, .call.mini .me-tile, .call.mini .ctrls .cbw:not(.keep) { display: none; }
.call.mini .ctop { padding: 12px; }
.call.mini .ctop h2 { font-size: 16px; }
.call.mini .ctrls { padding: 4px 12px 14px; }
.call.mini .cb { width: 46px; height: 46px; }
.call.mini .cl { display: none; }

/* bottom tabs (phones) */
.bottom { display: none; }
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
.more-grid a { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 16px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 8px; font-weight: 600; position: relative; }
.more-grid a .ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--aqua-50); color: var(--aqua-d); }
.more-grid a small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.more-grid .badge { top: 12px; right: 12px; box-shadow: none; }

.banner { display: flex; gap: 10px; align-items: center; background: #fff8e1; color: #6d5200; padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid #f3e3ad; }
.banner.aqua { background: var(--aqua-50); color: var(--aqua-d); border-color: var(--aqua-100); }
.banner .grow { flex: 1; }
.offline-bar { background: var(--amber); color: #fff; text-align: center; font-size: 13px; padding: 4px; font-weight: 600; }

@media (min-width: 861px) { .main .topbar [data-back] { display: none; } }
@media (max-width: 1100px) {
    .side { width: 330px; }
    .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .rail { display: none; }
    .shell { flex-direction: column; }
    .side { width: 100%; border: 0; flex: 1; min-height: 0; }
    .main { flex: 1; min-height: 0; }
    .shell.detail .side { display: none; }
    .shell:not(.detail):not(.wide) .main { display: none; }
    .shell.wide .side { display: none; }
    .bottom {
        display: flex; flex: none; background: #fff; border-top: 1px solid var(--line); padding: 4px 4px calc(4px + var(--safe-b)); z-index: 5;
    }
    .shell.detail .bottom, .shell.in-chat .bottom { display: none; }
    .bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; color: var(--faint); text-decoration: none; font-size: 11px; font-weight: 600; position: relative; border-radius: 12px; }
    .bottom a svg { width: 24px; height: 24px; }
    .bottom a.on { color: var(--aqua-d); }
    .bottom a.on svg { background: var(--aqua-50); border-radius: 14px; padding: 3px 14px; width: 54px; height: 30px; margin: -3px 0; }
    .bottom .badge { top: 0; right: calc(50% - 26px); box-shadow: 0 0 0 2px #fff; }
    .msgs { padding: 10px 10px 8px; }
    .bub { max-width: 84%; }
    .m:not(.me) .more { left: auto; right: 4px; }
    .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
    .page { padding: 12px 12px calc(24px + var(--safe-b)); }
    .kv { grid-template-columns: 110px 1fr; }
    .welcome { display: none; }
    .modal { max-height: calc(100dvh - 20px); }
    .ov { padding: 10px; }
    .sheet-ov { padding: 0; }
    .sheet { border-radius: 20px 20px 0 0; max-width: none; }
    .fab { bottom: calc(16px + var(--safe-b)); }
    .call .me-tile { width: 96px; height: 136px; }
    .call .cb { width: 56px; height: 56px; }
    .call .ctrls { gap: 12px; }
    .row2 { grid-template-columns: 1fr; gap: 0; }
    #toasts { bottom: calc(80px + var(--safe-b)); }
    .clock-card .big { font-size: 38px; }
    .tree .node { margin-left: 8px; padding-left: 10px; }
    .tree .person { padding: 7px 4px; gap: 8px; }
}
@media (max-width: 380px) {
    .grid.c4 { grid-template-columns: 1fr 1fr; }
    .quick button { width: 74px; }
}

/* ===== Virtual Manager ===== */
.stat.red .v { color: var(--red); }
a.stat { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.stat:hover { box-shadow: 0 0 0 2px var(--aqua-100), var(--shadow); transform: translateY(-1px); }
.vm-stats { margin-bottom: 16px; }
.vm-hero { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(120deg, var(--navy) 0%, var(--navy-l) 60%, var(--aqua) 130%); color: #fff; border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.vm-hero h2 { margin: 0 0 6px; font-size: 22px; } .vm-hero p { margin: 0; color: #d8e4f7; max-width: 560px; }
.vm-hero-n { text-align: right; } .vm-hero-n b { display: block; font-size: 30px; } .vm-hero-n span { color: #d8e4f7; font-size: 13px; }
.vm-pr { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.vm-pc { display: block; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.vm-pc:hover { box-shadow: inset 0 0 40px rgba(1, 133, 147, .12), var(--shadow); transform: translateY(-2px); }
.vm-pc .t { display: flex; gap: 8px; align-items: center; color: var(--navy); font-size: 16px; } .vm-pc .t svg { color: var(--aqua); }
.vm-pc .s { color: var(--muted); font-size: 13px; margin: 2px 0 12px 28px; }
.vm-pc .n { display: flex; gap: 8px; } .vm-pc .n span { flex: 1; background: var(--line-2); border-radius: 10px; padding: 8px; font-size: 11.5px; color: var(--muted); text-align: center; }
.vm-pc .n b { display: block; font-size: 16px; color: var(--navy); } .vm-pc .n .red b { color: var(--red); }
.vm-pc .u { margin-top: 10px; font-size: 12px; color: var(--faint); }
.vm-st { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vm-sb { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--line-2); color: var(--muted); text-decoration: none; font-size: 12.5px; font-weight: 600; border-left: 4px solid var(--line); transition: box-shadow .15s; }
.vm-sb:hover { box-shadow: inset 0 0 30px rgba(1, 133, 147, .14); }
.vm-sb b { font-size: 20px; color: var(--navy); } .vm-sb small { color: var(--text); font-weight: 600; }
.vm-sb.navy { border-color: var(--navy-l); } .vm-sb.aqua { border-color: var(--aqua); } .vm-sb.green { border-color: var(--green); } .vm-sb.amber { border-color: var(--amber); } .vm-sb.red { border-color: var(--red); } .vm-sb.purple { border-color: var(--purple); }
.vm-age { display: grid; grid-template-columns: 92px 1fr 96px; gap: 10px; align-items: center; padding: 7px 0; color: inherit; text-decoration: none; font-size: 13.5px; }
.vm-age .b, .vm-mini { height: 10px; background: var(--line-2); border-radius: 6px; overflow: hidden; display: block; }
.vm-mini { height: 6px; margin-top: 6px; max-width: 220px; }
.vm-age .b i, .vm-mini i { display: block; height: 100%; background: var(--aqua); border-radius: 6px; } .vm-age .b i.old, .vm-mini i.old { background: var(--red); }
.vm-age .v { text-align: right; font-weight: 700; color: var(--navy); } .vm-age .v small { margin-left: 6px; color: var(--faint); font-weight: 600; }
.vm-age:hover .l { color: var(--aqua-d); }
.vm-chart { width: 100%; height: auto; display: block; }
.vm-chart .vm-bv { font-size: 10.5px; fill: var(--navy); font-weight: 700; } .vm-chart .vm-bl { font-size: 10.5px; fill: var(--muted); }
.vm-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.vm-bar .input { width: auto; min-width: 140px; padding: 9px 10px; }
.vm-bar2 { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.vm-tbl tbody tr[data-c], tr.vm-click { cursor: pointer; }
.vm-tbl tbody tr[data-c]:hover td, tr.vm-click:hover td { background: var(--aqua-50); }
.vm-tbl .hint { font-size: 12px; } .vm-why { color: #b42323 !important; max-width: 200px; }
.vm-cl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; } .vm-cl-head .grow { flex: 1; }
.vm-bal { font-size: 14px; color: var(--muted); } .vm-bal b { font-size: 20px; color: var(--navy); margin-left: 6px; }
.vm-den { display: flex; gap: 10px; background: #fdecec; color: #8f1d1d; padding: 10px 12px; border-radius: 12px; margin-bottom: 14px; font-size: 14px; }
.vm-den.aqua { background: var(--aqua-50); color: var(--aqua-d); } .vm-den svg { flex: none; margin-top: 2px; }
.vm-h4 { margin: 18px 0 8px; color: var(--navy); font-size: 14.5px; }
.vm-note { display: flex; gap: 8px; margin-bottom: 12px; } .vm-note .input { flex: 1; }
.vm-log { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; } .vm-log .vm-n { background: var(--aqua-50); padding: 6px 10px; border-radius: 10px; margin-top: 3px; display: inline-block; }
.vm-doc { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); } .vm-doc:last-child { border-bottom: 0; }
.vm-doc .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--aqua-50); color: var(--aqua-d); display: flex; align-items: center; justify-content: center; flex: none; }
.vm-doc .grow { flex: 1; min-width: 0; } .vm-doc a b { color: var(--navy); }
.vm-big { display: inline-flex; width: 64px; height: 64px; border-radius: 20px; background: var(--aqua-50); color: var(--aqua); align-items: center; justify-content: center; } .vm-big svg { width: 30px; height: 30px; }
.vm-steps { margin: 0 0 14px; padding-left: 20px; color: var(--muted); } .vm-steps li { margin-bottom: 6px; }
.vm-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.vm-map label { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.vm-map label.ok span { color: var(--aqua-d); } .vm-map .input { padding: 7px 8px; font-size: 13.5px; }
.vm-prev { max-height: 220px; border: 1px solid var(--line-2); border-radius: 10px; } .vm-prev td, .vm-prev th { font-size: 12px; padding: 6px 8px; white-space: nowrap; }
a.tab { text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 860px) {
  .vm-st { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vm-map { grid-template-columns: 1fr; }
  .vm-bar .input { flex: 1; min-width: 46%; }
  .hide-sm { display: none; }
  .grid.c4.vm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* claims list as cards on phones */
@media (max-width: 700px) {
  .vm-cards thead { display: none; }
  .vm-cards, .vm-cards tbody { display: block; }
  .vm-cards tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "no bal" "pt st" "py st" "dos fu"; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .vm-cards td { padding: 0; border: 0; text-align: left; }
  .vm-cards .c-no { grid-area: no; } .vm-cards .c-bal { grid-area: bal; text-align: right; font-size: 15px; }
  .vm-cards .c-pt { grid-area: pt; color: var(--text); } .vm-cards .c-py { grid-area: py; color: var(--muted); font-size: 13px; }
  .vm-cards .c-st { grid-area: st; text-align: right; } .vm-cards .c-st .vm-why { display: none; }
  .vm-cards .c-dos { grid-area: dos; font-size: 13px; color: var(--muted); } .vm-cards .c-dos .hint { display: inline; margin-left: 4px; }
  .vm-cards .c-fu { grid-area: fu; text-align: right; } .vm-cards .c-fu .hint { display: none; }
  .vm-cards .c-bi, .vm-cards .c-pd { display: none; }
  .vm-cards td[colspan] { grid-column: 1 / -1; }
}
@media (max-width: 700px) { .vm-cards tr[data-c]:hover td { background: transparent; } .vm-cards tr[data-c]:hover, .vm-cards tr[data-c]:active { background: var(--aqua-50); } }

/* request access page */
.auth-alt { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; }
.auth-alt a { color: var(--aqua-d, #018593); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth .opt { font-weight: 400; color: var(--faint); }
.auth-done { width: 64px; height: 64px; border-radius: 50%; margin: 10px auto 0; display: flex; align-items: center; justify-content: center; background: rgba(1,133,147,.12); color: var(--aqua, #018593); }
.auth-done .i { width: 32px; height: 32px; }
.seg { display: grid; gap: 8px; margin-bottom: 16px; }
.seg-opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line, #dde3ea); border-radius: 12px; padding: 11px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.seg-opt input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--aqua, #018593); flex: none; }
.seg-opt b { display: block; font-size: 14.5px; color: var(--navy, #152d54); }
.seg-opt small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.seg-opt:has(input:checked) { border-color: var(--aqua, #018593); background: rgba(1,133,147,.06); }
[data-prov][hidden], [data-comp][hidden] { display: none !important; }
.req-card { border: 1px solid var(--line, #dde3ea); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.req-card h4 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req-card .meta { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.req-card .msg { margin-top: 8px; background: var(--line-2, #f2f5f8); border-radius: 10px; padding: 8px 10px; font-size: 14px; white-space: pre-wrap; }
.req-card .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pill { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--line-2, #eef2f6); color: var(--muted); }
.pill.prov { background: rgba(1,133,147,.12); color: #017480; } .pill.comp { background: rgba(21,45,84,.1); color: #152d54; }
.pill.pending { background: #fff4d6; color: #8a5a00; } .pill.approved { background: #e3f6ea; color: #1d7a3e; } .pill.declined { background: #fdecec; color: #a32020; }
.tab .badge-n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
