/* Saathi design system: white theme, indigo → violet → pink gradient accents. Light only. */
:root {
  color-scheme: light;
  --g1: #4f46e5; --g2: #7c3aed; --g3: #db2777;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #db2777 100%);
  --grad-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #fdf2f8 100%);
  --grad-teal: linear-gradient(135deg, #0ea5e9, #14b8a6);
  --grad-amber: linear-gradient(135deg, #f59e0b, #f43f5e);
  --grad-green: linear-gradient(135deg, #10b981, #84cc16);
  --bg: #f6f7fb; --card: #ffffff; --line: #eceef5; --line2: #e2e5ef;
  --ink: #0f172a; --ink2: #334155; --muted: #64748b; --faint: #94a3b8;
  --ok: #059669; --ok-bg: #ecfdf5; --warn: #d97706; --warn-bg: #fffbeb; --bad: #e11d48; --bad-bg: #fff1f2; --info: #4f46e5; --info-bg: #eef2ff;
  --r: 16px; --r-sm: 10px;
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px -18px rgba(79, 70, 229, .25);
  --sh-lg: 0 24px 60px -20px rgba(49, 46, 129, .35);
  --side: 264px;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { font-size: 14.5px; line-height: 1.5; }
a { color: var(--g1); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.015em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .nowrap { white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: #fff; border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font-weight: 800; font-size: 19px; color: var(--ink); }
.logo { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px -8px rgba(124, 58, 237, .7); }
.logo svg.i { width: 20px; height: 20px; stroke-width: 2.2; }
.org { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--grad-soft); border: 1px solid #ede9fe; }
.org b { display: block; font-size: 13px; line-height: 1.25; } .org span { font-size: 11.5px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav h6 { margin: 12px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; color: var(--ink2); font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { background: #f4f5fb; color: var(--ink); }
.nav a.on { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -12px rgba(124, 58, 237, .9); }
.nav a .n { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; }
.nav a.on .n { background: rgba(255, 255, 255, .25); }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); }
.side .me b { display: block; font-size: 13px; } .side .me span { font-size: 11.5px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(246, 247, 251, .82); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top .menu { display: none; }
.search { flex: 1; max-width: 480px; position: relative; }
.search input { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; padding: 0 14px 0 40px; outline: none; transition: box-shadow .15s, border-color .15s; }
.search input:focus { border-color: #c7d2fe; box-shadow: 0 0 0 4px #eef2ff; }
.search > svg.i { position: absolute; left: 13px; top: 12px; color: var(--faint); }
.search kbd { position: absolute; right: 10px; top: 10px; font: 600 11px/1 inherit; color: var(--faint); border: 1px solid var(--line2); border-radius: 6px; padding: 4px 6px; background: #fafbff; }
.results { position: absolute; left: 0; right: 0; top: 48px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-lg); padding: 6px; display: none; max-height: 60vh; overflow: auto; }
.results.show { display: block; }
.results a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--ink); }
.results a:hover, .results a.hl { background: #f4f5fb; }
.results a small { margin-left: auto; color: var(--faint); }
.top .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.iconbtn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line2); background: #fff; color: var(--ink2); cursor: pointer; transition: transform .1s, box-shadow .15s; }
.iconbtn:hover { box-shadow: var(--sh); } .iconbtn:active { transform: scale(.96); }
.iconbtn .dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--grad-amber); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.content { padding: 8px 28px 48px; max-width: 1440px; width: 100%; }
.bottom { display: none; }
.scrim { display: none; }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; margin: 10px 0 22px; flex-wrap: wrap; }
.ph h1 { font-size: 26px; font-weight: 800; }
.ph p { margin: 4px 0 0; color: var(--muted); }
.ph .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; color: #fff; background: var(--grad); box-shadow: var(--sh-lg); margin: 10px 0 22px; }
.hero::after { content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); }
.hero::before { content: ''; position: absolute; left: 40%; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .35), transparent 65%); }
.hero h1 { font-size: 26px; font-weight: 800; position: relative; z-index: 1; }
.hero p { margin: 6px 0 0; opacity: .9; position: relative; z-index: 1; max-width: 640px; }
.hero .row { position: relative; z-index: 1; margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn { background: rgba(255, 255, 255, .18); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.hero .btn:hover { background: rgba(255, 255, 255, .28); }
.hero .btn.white { background: #fff; color: var(--g2); }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line2); background: #fff; color: var(--ink); font-weight: 650; cursor: pointer; white-space: nowrap; transition: transform .08s, box-shadow .15s, background .15s, opacity .15s; }
.btn:hover { box-shadow: var(--sh); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { border: 0; color: #fff; background: var(--grad); box-shadow: 0 10px 22px -12px rgba(124, 58, 237, .9); }
.btn.primary:hover { box-shadow: 0 14px 28px -12px rgba(124, 58, 237, 1); }
.btn.soft { background: #eef2ff; color: var(--g1); border-color: #e0e7ff; }
.btn.ok { background: var(--ok-bg); color: var(--ok); border-color: #a7f3d0; }
.btn.bad { background: var(--bad-bg); color: var(--bad); border-color: #fecdd3; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #f1f3f9; box-shadow: none; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { height: 50px; padding: 0 22px; font-size: 15.5px; border-radius: 14px; }
.btn.block { width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 650; color: var(--ink2); }
.field label .req { color: var(--bad); }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 42px; border-radius: 11px; border: 1px solid var(--line2); background: #fff; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 96px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 4px #eef2ff; }
.field .hint { font-size: 12px; color: var(--faint); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid2 .wide { grid-column: 1 / -1; }
select.input { padding-right: 30px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card.pad { padding: 20px; }
.card .hd { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card .hd h3 { font-size: 15.5px; font-weight: 750; }
.card .hd .right { margin-left: auto; display: flex; gap: 8px; }
.card .bd { padding: 18px 20px; }
.cards { display: grid; gap: 18px; }
.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.c-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kpi { padding: 18px; display: flex; gap: 14px; align-items: flex-start; position: relative; overflow: hidden; }
.kpi .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad); flex: none; box-shadow: 0 10px 20px -12px rgba(79, 70, 229, .9); }
.kpi .ic.t { background: var(--grad-teal); box-shadow: 0 10px 20px -12px rgba(14, 165, 233, .9); }
.kpi .ic.a { background: var(--grad-amber); box-shadow: 0 10px 20px -12px rgba(244, 63, 94, .9); }
.kpi .ic.g { background: var(--grad-green); box-shadow: 0 10px 20px -12px rgba(16, 185, 129, .9); }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .s { font-size: 12px; margin-top: 4px; color: var(--faint); }
.kpi .s b { color: var(--ok); }
a.kpi { color: inherit; transition: transform .15s; } a.kpi:hover { transform: translateY(-2px); }

/* ---------- badges, chips, progress ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #f1f5f9; color: var(--ink2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.plain::before { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line2); background: #fff; display: inline-flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13px; color: var(--ink2); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: #c7d2fe; }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.chip .c { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: #f1f5f9; color: var(--muted); }
.chip.on .c { background: rgba(255, 255, 255, .25); color: #fff; }
.bar { height: 8px; border-radius: 99px; background: #eef0f6; overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.bar.over > i { background: var(--grad-amber); }
.prog { display: flex; align-items: center; gap: 8px; } .prog .bar { flex: 1; } .prog span { font-size: 12px; font-weight: 700; color: var(--ink2); width: 36px; text-align: right; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 13px; color: #fff; flex: none; background: var(--grad); }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

/* ---------- tables ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .search { max-width: 340px; }
.toolbar .search input { height: 40px; }
.toolbar .search > svg.i { top: 11px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; background: #fcfcfe; }
.tbl th.sorted { color: var(--g1); }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; cursor: pointer; }
.tbl tbody tr:hover { background: #fafaff; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td .t1 { font-weight: 650; color: var(--ink); }
.tbl td .t2 { font-size: 12px; color: var(--faint); }
.tbl .rowacts { display: flex; gap: 6px; justify-content: flex-end; }
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pager .right { margin-left: auto; display: flex; gap: 6px; }
.list-cards { display: none; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--g2); }
.empty .ic svg.i { width: 28px; height: 28px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

/* ---------- drawer / modal / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .38); backdrop-filter: blur(3px); z-index: 80; opacity: 0; transition: opacity .2s; }
.overlay.show { opacity: 1; }
.drawer { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(560px, calc(100vw - 20px)); background: #fff; border-radius: 22px; z-index: 90; display: flex; flex-direction: column; box-shadow: var(--sh-lg); transform: translateX(110%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.drawer.show { transform: none; }
.drawer .dh { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer .dh h2 { font-size: 18px; font-weight: 800; }
.drawer .dh .x { margin-left: auto; }
.drawer .db { flex: 1; overflow-y: auto; padding: 20px; }
.drawer .df { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fcfcfe; border-radius: 0 0 22px 22px; }
.drawer .df .right { margin-left: auto; display: flex; gap: 10px; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98); opacity: 0; width: min(440px, calc(100vw - 32px)); background: #fff; border-radius: 22px; z-index: 95; padding: 24px; box-shadow: var(--sh-lg); transition: all .2s; }
.modal.show { opacity: 1; transform: translate(-50%, -50%); }
.modal h3 { font-size: 18px; margin-bottom: 6px; } .modal p { color: var(--muted); margin: 0 0 20px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; }
.toasts { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: center; background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--sh-lg); font-weight: 600; max-width: 380px; animation: tin .25s ease-out; }
.toast.ok svg.i { color: #34d399; } .toast.bad svg.i { color: #fb7185; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
.detail dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; margin: 0; }
.detail dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.detail dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- misc lists ---------- */
.rows > * { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.rows > *:last-child { border-bottom: 0; }
.rows .grow { flex: 1; min-width: 0; }
.rows .t1 { font-weight: 650; } .rows .t2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--ink2); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.alert { border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.Emergency { background: var(--bad-bg); color: #9f1239; border: 1px solid #fecdd3; }
.alert.Important { background: var(--warn-bg); color: #92400e; border: 1px solid #fde68a; }
.alert.Normal { background: var(--info-bg); color: #3730a3; border: 1px solid #e0e7ff; }
.alert b { display: block; }
.tabs { display: flex; gap: 4px; padding: 4px; background: #eef0f6; border-radius: 13px; width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 18px; }
.tabs a { padding: 8px 14px; border-radius: 10px; font-weight: 650; color: var(--ink2); white-space: nowrap; font-size: 13.5px; }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }

/* ---------- check-in ---------- */
.clock { text-align: center; padding: 30px 20px; }
.clock .time { font-size: 54px; font-weight: 800; letter-spacing: -.03em; }
.punch { width: 190px; height: 190px; border-radius: 50%; border: 0; cursor: pointer; margin: 18px auto; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px; background: var(--grad); box-shadow: 0 0 0 14px #f1efff, 0 0 0 28px #f8f7ff, 0 24px 50px -16px rgba(124, 58, 237, .9); transition: transform .15s; }
.punch:hover { transform: scale(1.03); } .punch:active { transform: scale(.97); }
.punch.out { background: var(--grad-amber); box-shadow: 0 0 0 14px #fff1f2, 0 0 0 28px #fff7f8, 0 24px 50px -16px rgba(244, 63, 94, .8); }
.punch.done { background: var(--grad-green); box-shadow: 0 0 0 14px #ecfdf5, 0 0 0 28px #f5fffa, 0 24px 50px -16px rgba(16, 185, 129, .8); cursor: default; }
.punch svg.i { width: 40px; height: 40px; display: block; margin: 0 auto 6px; }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 150px); min-height: 520px; overflow: hidden; }
.chat .list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat .list .hd { padding: 14px 16px; }
.chat .chans { overflow-y: auto; flex: 1; }
.chat .chan { display: flex; gap: 11px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f4f5f9; align-items: center; }
.chat .chan:hover { background: #fafaff; } .chat .chan.on { background: var(--grad-soft); }
.chat .chan .grow { flex: 1; min-width: 0; }
.chat .chan b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .chan span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .chan .u { display: inline-block; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; margin-top: 3px; }
.chat .chan span.avatar, .org span.avatar, .side .me span.avatar { display: grid; color: #fff; font-size: 13px; }
.chat .room { display: flex; flex-direction: column; min-height: 0; background: linear-gradient(180deg, #fbfbff, #fff); }
.chat .room .hd { background: #fff; }
.msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 72%; display: flex; flex-direction: column; gap: 3px; }
.msg .bub { padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); white-space: pre-wrap; word-break: break-word; }
.msg .who { font-size: 12px; font-weight: 700; color: var(--g2); }
.msg .at { font-size: 11px; color: var(--faint); }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.me .bub { background: var(--grad); color: #fff; border: 0; border-radius: 18px 18px 6px 18px; }
.msg.me .bub a { color: #fff; text-decoration: underline; }
.msg img { max-width: 240px; border-radius: 12px; display: block; }
.msg audio { width: 240px; max-width: 100%; height: 38px; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 42px; max-height: 120px; border-radius: 13px; border: 1px solid var(--line2); padding: 10px 14px; resize: none; outline: none; }
.composer textarea:focus { border-color: #a5b4fc; box-shadow: 0 0 0 4px #eef2ff; }
.rec { color: var(--bad); font-weight: 700; display: flex; align-items: center; gap: 8px; flex: 1; padding: 0 10px; height: 42px; }
.rec i { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.back-chat { display: none; }

/* ---------- auth & public pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth .art { position: relative; overflow: hidden; background: var(--grad); color: #fff; padding: 48px; display: flex; flex-direction: column; }
.auth .art::before { content: ''; position: absolute; width: 520px; height: 520px; right: -160px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 65%); }
.auth .art::after { content: ''; position: absolute; width: 420px; height: 420px; left: -120px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .35), transparent 65%); }
.auth .art > * { position: relative; z-index: 1; }
.auth .art h1 { font-size: 40px; line-height: 1.12; font-weight: 800; margin: auto 0 14px; max-width: 520px; }
.auth .art p { opacity: .9; font-size: 16px; max-width: 480px; margin: 0; }
.auth .feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 30px 0 auto; max-width: 520px; }
.auth .feats div { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; padding: 12px 14px; font-weight: 650; display: flex; gap: 9px; align-items: center; backdrop-filter: blur(6px); }
.auth .pane { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 16px; }
.auth form h2 { font-size: 28px; font-weight: 800; }
.demo { border: 1px dashed #c7d2fe; background: #f8f9ff; border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.demo .chips { margin-top: 8px; } .demo .chip { height: 28px; font-size: 12px; }
.err { color: var(--bad); background: var(--bad-bg); border: 1px solid #fecdd3; padding: 10px 12px; border-radius: 11px; font-weight: 600; font-size: 13.5px; }
.steps { display: flex; gap: 8px; } .steps i { flex: 1; height: 5px; border-radius: 99px; background: #e5e7f0; } .steps i.on { background: var(--grad); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan { border: 1.5px solid var(--line2); border-radius: 14px; padding: 12px; cursor: pointer; text-align: center; }
.plan b { display: block; } .plan span { font-size: 12px; color: var(--muted); }
.plan.on { border-color: var(--g2); background: var(--grad-soft); }
.landing { background: #fff; }
.landing header { display: flex; align-items: center; gap: 14px; padding: 18px 6vw; position: sticky; top: 0; background: rgba(255, 255, 255, .85); backdrop-filter: blur(12px); z-index: 10; border-bottom: 1px solid var(--line); }
.landing header .right { margin-left: auto; display: flex; gap: 10px; }
.l-hero { padding: 80px 6vw 60px; text-align: center; background: radial-gradient(60% 60% at 50% 0%, #ede9fe 0%, #fff 70%); }
.l-hero h1 { font-size: clamp(34px, 5.5vw, 62px); font-weight: 800; line-height: 1.05; max-width: 900px; margin: 0 auto; letter-spacing: -.03em; }
.l-hero p { font-size: 18px; color: var(--muted); max-width: 640px; margin: 18px auto 28px; }
.l-hero .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid #e9d5ff; font-weight: 700; font-size: 13px; color: var(--g2); margin-bottom: 20px; }
.l-sec { padding: 60px 6vw; }
.l-sec h2 { font-size: 32px; font-weight: 800; text-align: center; margin-bottom: 10px; }
.l-sec > p { text-align: center; color: var(--muted); margin: 0 auto 34px; max-width: 620px; }
.mods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1200px; margin: 0 auto; }
.mod { padding: 20px; }
.mod .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); color: var(--g2); margin-bottom: 12px; }
.mod b { display: block; margin-bottom: 4px; } .mod span { color: var(--muted); font-size: 13.5px; }
.l-foot { padding: 30px 6vw; color: var(--muted); border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.donate { min-height: 100vh; background: radial-gradient(70% 50% at 50% 0%, #ede9fe 0%, #f6f7fb 70%); padding: 30px 16px 60px; }
.donate .box { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amt { height: 52px; border-radius: 13px; border: 1.5px solid var(--line2); background: #fff; font-weight: 800; font-size: 16px; cursor: pointer; }
.amt.on { border-color: var(--g2); background: var(--grad-soft); color: var(--g2); }
.paym { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.paym label { border: 1.5px solid var(--line2); border-radius: 13px; padding: 12px; display: flex; gap: 10px; align-items: center; cursor: pointer; font-weight: 700; }
.paym input { accent-color: var(--g2); }
.paym label:has(input:checked) { border-color: var(--g2); background: var(--grad-soft); }
.receipt { border: 1px dashed #c7d2fe; border-radius: 18px; padding: 22px; background: #fbfbff; }
.receipt dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 14px 0 0; }
.receipt dt { color: var(--muted); } .receipt dd { margin: 0; font-weight: 700; text-align: right; }
.q-edit { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: #fcfcfe; }
.q-edit .row { display: flex; gap: 10px; align-items: center; }
.loader { display: grid; place-items: center; padding: 60px; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #e0e7ff; border-top-color: var(--g2); animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #f1f3f9 25%, #f8f9fc 50%, #f1f3f9 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.slip { max-width: 720px; }
.slip table { width: 100%; border-collapse: collapse; }
.slip td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.slip td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mods { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 286px; transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--sh-lg); padding-bottom: 90px; }
  .side.open { transform: none; }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 35; }
  .top { padding: 12px 16px; }
  .top .menu { display: grid; }
  .search kbd { display: none; }
  .content { padding: 4px 16px 100px; }
  .c-21, .c3, .c2 { grid-template-columns: 1fr; }
  .bottom { display: flex; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-lg); padding: 6px; justify-content: space-around; }
  .bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0; border-radius: 14px; color: var(--muted); font-size: 11px; font-weight: 700; position: relative; }
  .bottom a.on { color: var(--g2); background: var(--grad-soft); }
  .bottom a .n { position: absolute; top: 2px; right: calc(50% - 22px); background: var(--bad); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 5px; }
  .auth { grid-template-columns: 1fr; } .auth .art { padding: 28px 22px; } .auth .art h1 { font-size: 28px; margin-top: 30px; } .auth .feats { margin-bottom: 0; }
  .donate .box { grid-template-columns: 1fr; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 190px); }
  .chat .room { display: none; } .chat.inroom .room { display: flex; } .chat.inroom .list { display: none; }
  .back-chat { display: grid; }
}
@media (max-width: 720px) {
  .ph h1 { font-size: 22px; } .hero { padding: 22px 20px; } .hero h1 { font-size: 22px; }
  .c4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 14px; flex-direction: column; gap: 10px; } .kpi .v { font-size: 22px; } .kpi .ic { width: 38px; height: 38px; }
  .tbl-wrap.cardify { display: none; }
  .list-cards { display: flex; flex-direction: column; }
  .list-cards .lc { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
  .list-cards .lc .top1 { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .list-cards .lc .t1 { font-weight: 700; }
  .list-cards .lc .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
  .list-cards .lc .meta b { color: var(--ink2); font-weight: 650; }
  .grid2 { grid-template-columns: 1fr; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 92vh; border-radius: 22px 22px 0 0; transform: translateY(105%); }
  .drawer .df { border-radius: 0; padding-bottom: 18px; }
  .detail dl { grid-template-columns: 1fr; gap: 2px; } .detail dd { margin-bottom: 10px; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .top .actions .hide-sm { display: none; }
  .toasts { left: 16px; right: 16px; bottom: 96px; }
  .plans { grid-template-columns: 1fr; }
  .msg { max-width: 86%; }
  .landing header .right .btn:not(.primary) { display: none; }
  .mods { grid-template-columns: 1fr; }
  .punch { width: 160px; height: 160px; }
}
@media print {
  .side, .top, .bottom, .no-print, .toasts { display: none !important; }
  .app { display: block; } .content { padding: 0; } .card { box-shadow: none; border-color: #ddd; } body { background: #fff; }
}
