/* Theme matches carecollect.us: teal #04C4B4, navy #002158, Poppins + Plus Jakarta Sans.
   Fonts are hosted here (not Google Fonts) so no third party sees portal visits. */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(fonts/poppins-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); }

:root {
  --brand-teal: #04C4B4;     /* site primary */
  --brand-navy: #002158;     /* site secondary */
  --bg: #f3f7f9;
  --surface: #ffffff;
  --surface-2: #f6fafb;
  --ink: #0A0A0A;
  --muted: #5D7285;
  --line: #e1e8ee;
  --accent: #027d73;         /* darker teal for text/links so it stays readable */
  --accent-ink: #ffffff;
  --accent-soft: #e2f8f6;
  --navy: var(--brand-navy);
  --heading-font: "Plus Jakarta Sans", var(--font);
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #17703c;
  --ok-soft: #e6f4ea;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-family: var(--heading-font); font-weight: 700; color: var(--ink); }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.mt { margin-top: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Buttons & inputs */
button, .btn {
  font: inherit; font-weight: 600; font-size: 14px; border-radius: 1000px; padding: 9px 18px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.2;
}
button:hover, .btn:hover { background: var(--surface-2); }
button.primary, .btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); letter-spacing: .3px; transition: background .2s, border-color .2s; }
button.primary:hover, .btn.primary:hover { background: var(--brand-teal); border-color: var(--brand-teal); color: #fff; }
button.danger { color: var(--danger); }
button.link { border: 0; background: none; color: var(--accent); padding: 4px 6px; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.sm, .btn.sm { padding: 5px 10px; font-size: 13px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
input, select, textarea {
  font: inherit; width: 100%; padding: 9px 11px; border: 1px solid #cfd6dd; border-radius: 8px;
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 1px; border-color: var(--brand-teal); }
textarea { resize: vertical; min-height: 70px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.err { color: var(--danger); font-size: 14px; min-height: 1.2em; margin: 6px 0; }

/* Auth pages */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #e6faf8 0%, var(--bg) 45%, #e8eef7 100%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 33, 88, .08); padding: 32px 30px; border-top: 4px solid var(--brand-teal); }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; display: block; }
.brand-name { font-family: var(--heading-font); font-weight: 800; font-size: 18px; color: var(--navy); }
.brand-name span { color: var(--brand-teal); }
.brand-sub { font-size: 12px; color: var(--muted); }
.auth-card .foot { margin-top: 18px; font-size: 14px; color: var(--muted); }
.qr { display: block; margin: 8px auto 12px; border: 1px solid var(--line); border-radius: 8px; }

/* App shell */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.topbar .brand { margin: 0; }
.topbar .spacer { flex: 1; }
.tabs { display: flex; gap: 2px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 12px 14px; color: var(--muted); white-space: nowrap; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--brand-teal); }
.tabs button:hover { color: var(--navy); background: none; }
.tabs .sep { width: 1px; background: var(--line); margin: 10px 8px; }
main { padding: 20px; max-width: 1200px; margin: 0 auto; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat { border-top: 3px solid var(--brand-teal); }
.stat .v { font-family: var(--heading-font); font-size: 24px; font-weight: 800; color: var(--navy); margin-top: 2px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.notice { background: var(--accent-soft); color: #0b4f4a; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }

/* Messaging layout */
.split { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list-item { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 14px; background: var(--surface); font-weight: 400; }
.list-item:last-child { border-bottom: 0; }
.list-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--brand-teal); }
.list-item .t { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.list-item .s { font-size: 13px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-teal); display: inline-block; flex: none; margin-top: 6px; }
.conv { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 460px; }
.conv-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.conv-tabs { display: flex; gap: 4px; }
.conv-tabs button { padding: 6px 14px; font-size: 13px; }
.conv-tabs button.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.day { text-align: center; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.msg { max-width: 72%; display: flex; flex-direction: column; margin-top: 6px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; }
.msg .who { font-size: 12px; color: var(--muted); margin: 0 4px 2px; }
.bubble { padding: 9px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.me .bubble { background: var(--navy); color: #fff; border-color: var(--navy); }
.msg .time { font-size: 11px; color: var(--muted); margin: 2px 4px 0; }
.attach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-top: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.attach .fname { font-weight: 600; font-size: 14px; }
.attach .fmeta { font-size: 12px; color: var(--muted); }
.attach .icon { width: 34px; height: 34px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 160px; height: 42px; }
.composer input[type=file] { display: none; }
.files-pane { flex: 1; overflow-y: auto; padding: 12px 16px; }

/* Modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px 24px; box-shadow: 0 20px 40px rgba(16, 24, 40, .2); }
.modal.wide { max-width: 920px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
.preview-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.preview-img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; font-size: 14px; box-shadow: var(--shadow); }
.toast.error { background: var(--danger); }
.code-box { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 22px; letter-spacing: .08em; background: var(--surface-2); border: 1px dashed var(--brand-teal); border-radius: 8px; padding: 12px; text-align: center; margin: 10px 0; user-select: all; }
.line-items .li { display: grid; grid-template-columns: 1fr 90px 110px 36px; gap: 8px; margin-bottom: 8px; }
.line-items .li.ded { grid-template-columns: 1fr 120px 36px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: 14px; }
.kv .k { color: var(--muted); }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .conv { height: 70vh; }
  .msg { max-width: 88%; }
  main { padding: 14px; }
  .topbar { padding: 10px 14px; }
  .tabs { padding: 0 8px; }
  .kv { grid-template-columns: 1fr; }
  .line-items .li { grid-template-columns: 1fr 70px 90px 36px; }
}
.brand-mark-text { background: var(--brand-teal); color: #fff; display: grid; place-items: center; font-family: var(--heading-font); font-weight: 800; font-size: 18px; }
button, .btn { white-space: nowrap; }
@media (max-width: 600px) {
  #groupName, #whoami { display: none; }
}

/* ---------- iATRIC MD brand (employee side). Colors from the iATRIC MD payroll app. ---------- */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url(fonts/inter-latin-800-normal.woff2) format("woff2"); }
body.brand-iatric {
  --brand-teal: #5E17EB;      /* iATRIC logo purple: top lines, active tabs, highlights */
  --brand-navy: #0F172A;      /* iATRIC slate: primary buttons, own messages */
  --navy: #0F172A;
  --bg: #F8FAFC;
  --surface-2: #F8FAFC;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --accent: #4C0FD0;
  --accent-soft: #F3EDFE;
  --iatric: #5E17EB;
  --iatric-dark: #4A0FC4;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --heading-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
body.brand-iatric .brand-name { color: #0F172A; letter-spacing: .2px; }
body.brand-iatric .brand-name span { color: #5E17EB; }   /* letterhead purple */
body.brand-iatric .notice { color: #3B0E99; }
body.brand-iatric button.primary, body.brand-iatric .btn.primary { background: var(--iatric); border-color: var(--iatric); }
body.brand-iatric button.primary:hover, body.brand-iatric .btn.primary:hover { background: var(--iatric-dark); border-color: var(--iatric-dark); }
body.brand-iatric .msg.me .bubble { background: var(--iatric); border-color: var(--iatric); }
body.brand-iatric .auth-wrap { background: #fff; }
body.brand-iatric .auth-card { box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }

/* ---------- Client billing notices ---------- */
.pay-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between;
  background: var(--warn-soft); color: #6b3f00; border: 1px solid #f4d9a8; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.pay-banner.overdue { background: var(--danger-soft); color: #8a1c12; border-color: #f5c2bd; }
.pay-banner b { font-weight: 700; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; margin-left: 6px; }
.badge.warn { background: #d97706; }
.msg.system { align-self: center; max-width: 86%; align-items: center; }
.msg.system .bubble { background: var(--accent-soft); color: var(--ink); border-color: transparent; text-align: center; }
.msg.system .who { font-weight: 600; }
a.btn.pay { background: var(--brand-teal); border-color: var(--brand-teal); color: #fff; }
a.btn.pay:hover { filter: brightness(.95); background: var(--brand-teal); }
.link-btn { color: var(--accent); font-weight: 600; text-decoration: underline; cursor: pointer; background: none; border: 0; padding: 0; font-size: inherit; }
.card-head select, .actions select { width: auto; }

/* ---------- In-portal payment ---------- */
button.pay-btn, .btn.pay-btn { background: var(--brand-teal); border-color: var(--brand-teal); color: #fff; }
button.pay-btn:hover { filter: brightness(.95); background: var(--brand-teal); }
.amount-box { font-family: var(--heading-font); font-size: 26px; font-weight: 800; color: var(--navy); padding: 6px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.money-input { display: flex; align-items: center; border: 1px solid #cfd6dd; border-radius: 8px; background: #fff; padding-left: 11px; }
.money-input span { color: var(--muted); font-weight: 600; }
.money-input input { border: 0; outline-offset: 0; font-size: 18px; }
.money-input:focus-within { outline: 2px solid var(--brand-teal); }
.tip-quick { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.total-line { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.total-line b { font-size: 18px; }
.stripe-box { min-height: 120px; margin: 12px 0; }
.receipt { text-align: center; }
.receipt .kv { text-align: left; max-width: 340px; margin: 12px auto; }
.receipt .actions { justify-content: center; }
.check { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 30px; margin: 0 auto 10px; }
.pm-icon { font-size: 18px; }
.radio { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 6px 0; }
.radio input { width: auto; margin-top: 4px; }
.plan-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.plan-card .t { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.consent { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }

/* ---------- Attendance ---------- */
.att-today { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; border-left: 5px solid var(--line); }
.att-today.ok { border-left-color: #16a34a; }
.att-today.late { border-left-color: #dc2626; }
.att-head { font-size: 18px; margin-top: 6px; line-height: 1.5; }
.punches { font-size: 12px; color: var(--muted); }
.punches .x { color: var(--danger); cursor: pointer; border: 0; background: none; padding: 0 2px; font-size: 12px; }
.daypick { display: flex; gap: 6px; flex-wrap: wrap; }
.daypick label { display: inline-flex; gap: 4px; align-items: center; font-weight: 500; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; cursor: pointer; }
.daypick input { width: auto; }
.pin-input { max-width: 140px; }
#attDate { width: auto; }

/* Client access lists */
.check-list { display: grid; gap: 4px; max-height: 260px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin: 8px 0; }
.check-list.tall { max-height: 360px; }
.check-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.check-row:hover { background: var(--surface-2); }
.check-row.disabled { cursor: default; opacity: .85; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
#teamTable td .pill { margin: 2px 2px 2px 0; }

/* Unread conversations + alerts toggle */
.list-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-item.unread .t span:first-child { font-weight: 800; }
.list-item .t .pill { font-size: 11px; padding: 1px 7px; }
button.sm.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* Team notes (staff only) */
.notes-pane { flex: 1; overflow: auto; padding: 14px 16px; display: grid; gap: 10px; align-content: start; }
.notes-intro { background: var(--warn-soft); color: var(--text); padding: 8px 12px; border-radius: 10px; }
.note-form { display: grid; gap: 8px; }
.note-form textarea { min-height: 70px; }
.note-form button { justify-self: start; }
.note { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.note-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.note-meta .link-btn { margin-left: auto; }
.note-body { white-space: pre-wrap; margin-top: 4px; }

/* Grouped admin menus */
.tab-group { display: flex; }
.tabs .group-btn { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 12px 14px; color: var(--muted); white-space: nowrap; }
.tabs .group-btn.active { color: var(--navy); border-bottom-color: var(--brand-teal); }
.tabs .group-btn:hover { color: var(--navy); background: none; }
.tab-menu { display: none; position: fixed; z-index: 60; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 30, 60, .14); padding: 6px; }
.tab-group.open .tab-menu { display: grid; }
.tabs .tab-menu button { border: 0; border-radius: 8px; text-align: left; padding: 10px 12px; color: var(--text); }
.tabs .tab-menu button:hover { background: var(--surface-2); }
.tabs .tab-menu button.active { background: var(--accent-soft); color: var(--accent); border: 0; }

/* Phones: wide tables scroll sideways instead of squashing; menus get proper focus */
@media (max-width: 700px) {
  .table-wrap { -webkit-overflow-scrolling: touch; margin: 0 -4px; }
  .table-wrap table { min-width: 620px; }
  #attTable table, #myLeaveTable table { min-width: 0; }
  #attTable th, #attTable td, #myLeaveTable th, #myLeaveTable td { padding-left: 6px; padding-right: 6px; }
  .att-note { display: none; }
  .tabs .group-btn, .tabs button { padding: 12px 11px; }
  .card-head { flex-wrap: wrap; gap: 8px; }
}
.tabs button:focus:not(:focus-visible), .tabs .group-btn:focus:not(:focus-visible) { outline: none; }
.tabs button:focus-visible { outline-offset: -3px; }

/* Requests (eligibility / prior auth / claim status) */
.req-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; background: var(--surface-2); }
.req-fields { background: var(--surface); margin: 12px 16px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); }
.req-result { margin: 10px 16px 0; padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); border: 1px solid transparent; }
.req-thread { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.req-closed { padding: 12px 16px; border-top: 1px solid var(--line); }
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.req-grid .field:has(textarea) { grid-column: 1 / -1; }
.pre { white-space: pre-wrap; }
#reqList .list-item .s .pill { font-size: 11px; padding: 1px 7px; }
#reqList select, .list-head select { width: 100%; }
@media (max-width: 600px) { .req-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .kv.req-fields { grid-template-columns: 118px 1fr; } }

/* iATRIC MD: real logo, white pages with a blue line on top (same layout as CareCollect) */
.brand-wordmark { flex-direction: column; align-items: flex-start; gap: 4px; }
.brand-wordmark .wordmark { height: 40px; width: auto; display: block; }
.topbar .brand-wordmark { flex-direction: row; align-items: center; gap: 12px; }
.topbar .brand-wordmark .wordmark { height: 30px; }
.topbar .brand-wordmark .brand-sub { border-left: 1px solid var(--line); padding-left: 12px; }
body.brand-iatric .auth-wrap { background: #fff; }
body.brand-iatric .auth-card { box-shadow: 0 10px 34px rgba(94, 23, 235, .10); border: 1px solid #ECE6FB; border-top: 4px solid var(--iatric); }
body.brand-iatric .auth-card .brand { margin-bottom: 26px; }

/* Notification gate */
.notif-gate { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .55); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.notif-card { background: var(--surface); border-radius: 18px; max-width: 440px; width: 100%; padding: 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); border-top: 4px solid var(--brand-teal); }
.notif-card h2 { margin: 6px 0 8px; }
.notif-card p, .notif-card ol { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.notif-card ol { padding-left: 20px; }
.notif-icon { font-size: 34px; }

/* Typing, seen, reactions */
.typing { padding: 6px 18px; font-size: 13px; color: var(--muted); background: var(--surface-2); display: flex; align-items: center; gap: 6px; }
.typing .dots { display: inline-flex; gap: 3px; }
.typing .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .4; animation: ccdot 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .2s; } .typing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes ccdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.msg .time .seen { color: var(--brand-teal); font-weight: 600; }
.msg .time .sent { color: var(--muted); }
.msg { position: relative; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.reacts:empty { display: none; }
.react-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 13px; line-height: 1.6; cursor: pointer; }
.react-chip.mine { border-color: var(--brand-teal); background: var(--accent-soft); }
.react-btn { position: absolute; top: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; width: 28px; height: 28px; padding: 0; font-size: 15px; color: var(--muted); opacity: 0; transition: opacity .15s; cursor: pointer; }
.msg.them .react-btn { right: -34px; } .msg.me .react-btn { left: -34px; }
.msg:hover .react-btn, .react-btn:focus { opacity: 1; }
@media (hover: none) { .react-btn { opacity: .55; } }
.react-picker { position: absolute; top: -40px; z-index: 30; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px; box-shadow: 0 8px 24px rgba(15, 30, 60, .15); }
.msg.them .react-picker { left: 0; } .msg.me .react-picker { right: 0; }
.react-picker button { border: 0; background: none; font-size: 20px; padding: 2px 5px; border-radius: 8px; cursor: pointer; transition: transform .1s; }
.react-picker button:hover { transform: scale(1.25); background: var(--surface-2); }

/* Screen privacy */
.secret { font-variant-numeric: tabular-nums; letter-spacing: .5px; }
body:not(.secrets-shown) .secret { color: var(--muted); }
.pay-head { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-bottom: 8px; }
.slip-wrap { position: relative; }
.slip-cover { position: absolute; inset: 0; width: 100%; border: 0; border-radius: 10px; background: rgba(248, 250, 252, .92); backdrop-filter: blur(14px); font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer; line-height: 1.6; }
.privacy-shield { position: fixed; inset: 0; z-index: 150; background: rgba(241, 245, 249, .8); backdrop-filter: blur(22px); display: grid; place-items: center; cursor: pointer; }
.ps-card { background: var(--surface); padding: 26px 34px; border-radius: 16px; text-align: center; box-shadow: 0 16px 40px rgba(15, 23, 42, .15); display: grid; gap: 6px; }
.ps-icon { font-size: 30px; }

/* My profile */
.pf-hero { display: flex; align-items: center; gap: 18px; background: linear-gradient(120deg, var(--surface) 55%, var(--accent-soft)); flex-wrap: wrap; }
.pf-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-teal), #5E17EB); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; letter-spacing: .5px; flex: none; box-shadow: 0 6px 18px rgba(37, 99, 235, .25); }
.pf-id { flex: 1; min-width: 200px; }
.pf-id h2 { margin: 0; font-size: 22px; }
.pf-role { color: var(--muted); margin: 2px 0 8px; }
.pf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.pf-tile { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-top: 3px solid var(--accent-soft); }
.pf-tile-k { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.pf-tile-v { font-size: 18px; font-weight: 700; margin: 6px 0 2px; }
.pf-tile-s { font-size: 12.5px; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pf-card h3 { margin: 0 0 10px; font-size: 15px; }
.pf-wide { grid-column: 1 / -1; }
.pf-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.pf-row:first-of-type { border-top: 0; }
.pf-k { color: var(--muted); }
.pf-v { font-weight: 500; word-break: break-word; }
.pf-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-doc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
@media (max-width: 820px) { .pf-tiles { grid-template-columns: 1fr 1fr; } .pf-grid { grid-template-columns: 1fr; } .pf-row { grid-template-columns: 130px 1fr; } }

/* Details / onboarding form */
.onboard-card { max-width: 860px; margin: 0 auto; }
.ob-icon { font-size: 40px; }
.details-form .df-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.details-form h3 { margin: 0 0 10px; font-size: 15px; }
.id-drop { flex: 1; display: block; cursor: pointer; }
.id-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.id-prev { display: grid; place-items: center; text-align: center; min-height: 140px; border: 2px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; background: var(--surface-2); overflow: hidden; }
.id-prev img { width: 100%; height: 160px; object-fit: cover; display: block; }
.id-drop:focus-within .id-prev { border-color: var(--brand-teal); }

/* My attendance layout */
.att-top { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; margin-bottom: 0; }
.att-top .att-today { margin-bottom: 16px; }
.att-leave-card .card-head { margin-bottom: 8px; }
.leave-mini { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.leave-mini:first-child { border-top: 0; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 14px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(15, 23, 42, .12); }
.seg-wide { display: flex; flex-wrap: wrap; border-radius: 12px; }
.seg-wide button { flex: 1; border-radius: 9px; min-width: 120px; }
.leave-types { display: flex; flex-wrap: wrap; gap: 8px; }
.lt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; font-weight: 500; }
.lt:has(input:checked) { border-color: var(--brand-teal); background: var(--accent-soft); }
.lt-em:has(input:checked) { border-color: #DC2626; background: #FEF2F2; color: #991B1B; }
.lt input { margin: 0; accent-color: var(--brand-teal); }
@media (max-width: 900px) { .att-top { grid-template-columns: 1fr; } }

/* Big leave alert */
.big-alert { position: fixed; inset: 0; z-index: 190; background: rgba(15, 23, 42, .6); display: grid; place-items: center; padding: 16px; animation: ccfade .2s; }
.big-card { background: var(--surface); border-radius: 20px; max-width: 520px; width: 100%; padding: 30px; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); border-top: 8px solid var(--brand-teal); }
.big-alert.emergency .big-card { border-top-color: #DC2626; animation: ccpulse 1.2s infinite; }
.big-icon { font-size: 54px; }
.big-title { font-weight: 800; letter-spacing: 1px; color: var(--muted); margin-top: 6px; }
.big-alert.emergency .big-title { color: #DC2626; font-size: 20px; }
.big-name { font-size: 26px; font-weight: 800; margin: 8px 0 4px; }
.big-meta { color: var(--muted); }
.big-reason { margin: 14px 0; padding: 12px; background: var(--surface-2); border-radius: 12px; font-style: italic; }
.big-actions { justify-content: center; }
.big-actions button { min-width: 110px; padding: 10px 18px; }
@keyframes ccpulse { 0%, 100% { box-shadow: 0 30px 80px rgba(220, 38, 38, .25); } 50% { box-shadow: 0 30px 90px rgba(220, 38, 38, .6); } }
@keyframes ccfade { from { opacity: 0; } to { opacity: 1; } }
.row-emergency td { background: #FEF2F2; }

/* Notices */
.notice-pop { position: fixed; right: 20px; bottom: 20px; z-index: 120; background: var(--surface); border-radius: 14px; padding: 14px 16px; box-shadow: 0 16px 40px rgba(15, 23, 42, .2); display: flex; gap: 14px; align-items: center; border-left: 5px solid var(--brand-teal); max-width: 380px; }
.notice-pop.warning { border-left-color: #DC2626; }
.notice-pop.appreciation { border-left-color: #16A34A; }
.notice-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 12px; border-left: 4px solid var(--brand-teal); }
.notice-item.warning { border-left-color: #DC2626; }
.notice-item.appreciation { border-left-color: #16A34A; }
.notice-item.unread { background: var(--accent-soft); }
.ni-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ni-body { white-space: pre-wrap; margin: 10px 0; line-height: 1.55; }
.badge.warn { background: #F59E0B; } .badge.bad { background: #DC2626; }

/* Privacy glass: blur everything except an area around the mouse / the field being typed in */
.pglass { position: fixed; inset: 0; z-index: 140; pointer-events: none;
  -webkit-backdrop-filter: blur(9px) saturate(.5) contrast(.8); backdrop-filter: blur(9px) saturate(.5) contrast(.8);
  background: repeating-linear-gradient(90deg, rgba(30, 20, 60, .045) 0 1px, transparent 1px 3px), rgba(236, 233, 245, .38);
  -webkit-mask-image: radial-gradient(ellipse var(--rw, 190px) var(--rh, 120px) at var(--gx, -2000px) var(--gy, -2000px), transparent 0, transparent 62%, #000 100%);
  mask-image: radial-gradient(ellipse var(--rw, 190px) var(--rh, 120px) at var(--gx, -2000px) var(--gy, -2000px), transparent 0, transparent 62%, #000 100%); }
.pglass-chip { position: fixed; left: 14px; bottom: 14px; z-index: 141; border: 0; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600;
  background: #1f1640; color: #fff; box-shadow: 0 6px 20px rgba(20, 10, 60, .3); cursor: pointer; }
.pglass-chip span { font-weight: 400; opacity: .75; }
.pglass-chip:hover { background: #2d1f5e; }
[data-glass-btn].active { background: var(--accent-soft); border-color: var(--brand-teal); color: var(--accent); }
@media (max-width: 700px) { .pglass-chip span { display: none; } }

/* My pay confirmation */
.pay-gate { display: grid; place-items: center; padding: 40px 12px; }
.pay-gate-card { max-width: 480px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand-teal); border-radius: 16px; padding: 30px 28px; box-shadow: 0 12px 36px rgba(15, 23, 42, .08); }
.pay-gate-card h2 { margin: 6px 0 10px; }
.pay-gate-icon { font-size: 34px; }
.pay-gate-warn { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 14px 0 18px; text-align: left; }
.actions.center { justify-content: center; }
.pf-tile-text { font-size: 16px !important; }

/* Policies & SOPs */
.pol-layout { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; align-items: start; }
.pol-side { position: sticky; top: 120px; }
.seg-sm button { padding: 5px 11px; font-size: 12.5px; }
.pol-item { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.pol-item:hover { border-color: var(--brand-teal); }
.pol-item.active { border-color: var(--brand-teal); box-shadow: inset 3px 0 0 var(--brand-teal); background: var(--accent-soft); }
.pol-item.unread { border-left: 4px solid var(--warn); }
.pol-item .t { font-weight: 600; display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.pol-item .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.pol-item .pol-note { font-size: 12.5px; color: var(--warn); margin-top: 4px; }
.pol-item, .pol-item * { white-space: normal; }
.pill.new { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.updated { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pol-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.pol-head h2 { margin: 4px 0; }
.pol-change { background: var(--warn-soft); color: #6b3f00; border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: 14px; }
.pol-body { line-height: 1.65; font-size: 15px; max-width: 820px; }
.pol-body h3 { margin: 20px 0 6px; font-size: 18px; } .pol-body h4 { margin: 16px 0 4px; font-size: 16px; } .pol-body h5 { margin: 12px 0 4px; font-size: 14.5px; }
.pol-body ul, .pol-body ol { padding-left: 22px; } .pol-body li { margin: 3px 0; }
.pol-ack { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
.pol-file { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; background: var(--surface-2); }
.pol-editor textarea[name=body] { min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; }
.pol-readers { max-height: 260px; overflow: auto; }
details.pol-more { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
details.pol-more summary { cursor: pointer; font-weight: 600; }
@media (max-width: 860px) { .pol-layout { grid-template-columns: 1fr; } .pol-side { position: static; } }

/* Pasted screenshot preview in the chat box */
.paste-preview { display: flex; gap: 10px; align-items: center; border: 1px dashed var(--brand-teal); border-radius: 10px; padding: 8px; margin-bottom: 8px; background: var(--accent-soft); }
.paste-preview img { max-height: 90px; max-width: 160px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.paste-preview .grow { flex: 1; font-size: 13px; }
.msg-img { display: block; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; margin-bottom: 6px; max-width: 320px; cursor: zoom-in; }
.msg-img img { display: block; max-width: 100%; max-height: 240px; object-fit: contain; }

/* HIPAA badge + Security page */
.hipaa-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #b7e4cf; background: #ecfaf3; color: #106b45; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.hipaa-badge:hover { background: #dff5ea; border-color: #8fd3b3; }
.hipaa-login { margin: 16px auto 0; display: flex; max-width: 420px; justify-content: center; font-weight: 500; }
.auth-wrap { align-content: center; }
.trust-hero { display: flex; gap: 18px; align-items: flex-start; border-top: 4px solid #17a36b; }
.trust-hero h2 { margin: 2px 0 6px; } .trust-hero p { margin: 0 0 10px; max-width: 760px; }
.trust-shield { font-size: 40px; line-height: 1; }
.trust-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.trust-grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.trust-item p { margin: 3px 0 0; color: var(--muted); }
.trust-ic { font-size: 22px; line-height: 1.2; }
@media (max-width: 600px) { .topbar .hipaa-badge { display: none; } }

/* Floating chat button + mini chat window */
.fc-btn { position: fixed; right: 22px; bottom: 22px; z-index: 130; width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0;
  background: var(--brand-teal); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 28px rgba(15, 23, 42, .28); cursor: pointer; transition: transform .15s, box-shadow .15s; }
body.brand-iatric .fc-btn { background: var(--iatric); }
.fc-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 32px rgba(15, 23, 42, .32); background: var(--brand-teal); color: #fff; }
body.brand-iatric .fc-btn:hover { background: var(--iatric-dark); }
.fc-btn.open { transform: scale(.92); }
.fc-badge { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #e5383b; color: #fff;
  font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.fc-pulse { animation: fcpulse 1.4s ease-out infinite; }
@keyframes fcpulse { 0% { box-shadow: 0 0 0 0 rgba(229, 56, 59, .55), 0 10px 28px rgba(15, 23, 42, .28); } 70% { box-shadow: 0 0 0 18px rgba(229, 56, 59, 0), 0 10px 28px rgba(15, 23, 42, .28); } 100% { box-shadow: 0 0 0 0 rgba(229, 56, 59, 0), 0 10px 28px rgba(15, 23, 42, .28); } }
.fc-panel { position: fixed; right: 22px; bottom: 92px; z-index: 131; width: 390px; height: min(580px, calc(100vh - 120px)); background: var(--surface);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; animation: fcin .16s ease-out; }
@keyframes fcin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fc-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; background: var(--brand-teal); color: #fff; }
body.brand-iatric .fc-head { background: var(--iatric); }
body.brand-carecollect .fc-head { background: var(--brand-navy); }
.fc-head b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-head button { border: 0; background: rgba(255, 255, 255, .15); color: #fff; border-radius: 8px; width: 30px; height: 30px; padding: 0; font-size: 16px; line-height: 1; }
.fc-head button:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.fc-spacer { flex: 1; }
.fc-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fc-conv { flex: 1; min-height: 0; display: flex; }
.fc-conv .conv { height: auto; min-height: 0; flex: 1; border-radius: 0; box-shadow: none; }
.fc-conv .conv-head { padding: 8px 10px; }
.fc-conv .conv-tabs button { padding: 4px 9px; font-size: 12px; }
.fc-conv .messages { padding: 10px; }
.fc-conv .composer { padding: 8px; }
.fc-list { overflow-y: auto; padding: 8px; }
.fc-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-radius: 10px; padding: 10px; background: none; }
.fc-item:hover { background: var(--surface-2); }
.fc-item.unread b { color: var(--accent); }
.fc-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.fc-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fc-txt b, .fc-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-pop { bottom: 92px; }
@media (max-width: 520px) { .fc-panel { right: 0; left: 0; bottom: 0; width: auto; height: calc(100vh - 60px); border-radius: 16px 16px 0 0; } .fc-btn { right: 14px; bottom: 14px; } }

/* Start screen: Client workspace / My employee portal / Admin */
body[data-mode="home"] .tabs, body[data-mode="home"] main { display: none; }
.tabs .mode-off { display: none !important; }
body[data-mode="admin"] .tabs .sep { display: none; }
.mode-home { max-width: 1060px; margin: 0 auto; padding: 48px 20px 40px; }
.mh-greet h1 { margin: 0; font-size: 28px; }
.mh-greet p { margin: 4px 0 26px; }
.mh-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }
.mh-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 26px 24px 22px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); border-top: 5px solid var(--brand-teal); box-shadow: 0 10px 30px rgba(15, 23, 42, .07); min-height: 230px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; white-space: normal; }
.mh-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15, 23, 42, .12); background: var(--surface); border-color: var(--line); border-top-color: var(--brand-teal); color: inherit; }
.mh-card.me { border-top-color: #0f9f6e; } .mh-card.me:hover { border-top-color: #0f9f6e; }
.mh-card.admin { border-top-color: #0F172A; } .mh-card.admin:hover { border-top-color: #0F172A; }
.mh-ic { font-size: 34px; line-height: 1; }
.mh-title { font-size: 20px; font-weight: 700; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.mh-lock { font-size: 15px; }
.mh-desc { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.mh-badges { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.mh-go { margin-top: auto; font-weight: 600; color: var(--accent); font-size: 14px; }
.mh-foot { margin-top: 22px; }
.mode-switch { font-weight: 600; }
.unlock-form { text-align: center; } .unlock-form .field { text-align: left; } .unlock-ic { font-size: 34px; }
@media (max-width: 600px) { .mode-home { padding-top: 24px; } .mh-card { min-height: 0; } }
