/* Hostayl design system — dark/light, glass surfaces, fluid layout */
:root {
  --bg: #f2f7fa; --bg-glow-1: rgba(5,115,157,.16); --bg-glow-2: rgba(7,7,110,.08);
  --surface: #ffffff; --surface-2: #f6fafc; --surface-3: #e9f1f6; --glass: rgba(255,255,255,.72);
  --text: #0a1030; --text-2: #2b3556; --muted: #5d6b85; --border: rgba(7,16,60,.09); --border-strong: rgba(7,16,60,.17);
  --brand: #05739d; --brand-2: #07076e; --brand-ink: #fff; --brand-soft: rgba(5,115,157,.12); --accent: #16a9c9;
  --ok: #059669; --ok-soft: rgba(16,185,129,.14); --warn: #b45309; --warn-soft: rgba(245,158,11,.16); --bad: #dc2626; --bad-soft: rgba(239,68,68,.13); --info: #2563eb; --info-soft: rgba(37,99,235,.12);
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05); --shadow: 0 8px 28px -10px rgba(30,41,90,.22), 0 2px 6px rgba(15,23,42,.05); --shadow-lg: 0 24px 60px -20px rgba(30,41,90,.35);
  --radius: 16px; --radius-sm: 10px; --radius-lg: 22px; --sidebar-w: 264px; --topbar-h: 64px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Noto Sans Devanagari", "Noto Sans Gujarati", "Nirmala UI", sans-serif;
  --grad: linear-gradient(135deg, #0a8fbf 0%, #05739d 38%, #07076e 100%); --grad-2: linear-gradient(135deg, #16a9c9, #05739d);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #060a22; --bg-glow-1: rgba(5,115,157,.26); --bg-glow-2: rgba(7,7,110,.30);
  --surface: #0d1331; --surface-2: #0a1029; --surface-3: #141b40; --glass: rgba(13,19,49,.68);
  --text: #eaf2fa; --text-2: #c2d0e3; --muted: #8b9cba; --border: rgba(255,255,255,.08); --border-strong: rgba(255,255,255,.16);
  --brand: #38b6e0; --brand-soft: rgba(56,182,224,.16); --ok: #34d399; --ok-soft: rgba(52,211,153,.14); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.14); --bad: #f87171; --bad-soft: rgba(248,113,113,.14); --info: #60a5fa; --info-soft: rgba(96,165,250,.14);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 10px 34px -12px rgba(0,0,0,.65); --shadow-lg: 0 28px 70px -24px rgba(0,0,0,.8);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 500px at 8% -8%, var(--bg-glow-1), transparent 60%), radial-gradient(800px 480px at 100% 0%, var(--bg-glow-2), transparent 55%); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; } h2 { font-size: 19px; font-weight: 700; } h3 { font-size: 15.5px; font-weight: 650; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
p { margin: 0; } button { font: inherit; color: inherit; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; } .bold { font-weight: 650; } .center { text-align: center; } .right { text-align: right; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; } .col { display: flex; flex-direction: column; gap: 10px; }
.gap-s { gap: 6px; } .gap-l { gap: 18px; } .mt { margin-top: 14px; } .mt-l { margin-top: 24px; } .mb { margin-bottom: 14px; } .hide { display: none !important; } .nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.ic { width: 1.2em; height: 1.2em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; min-height: 40px; user-select: none; }
.btn:hover { background: var(--surface-3); text-decoration: none; } .btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -8px rgba(5,115,157,.7); }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 12px 26px -8px rgba(5,115,157,.8); }
.btn.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .btn.ok:hover { filter: brightness(.95); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .btn.solid-danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--surface-3); }
.btn.sm { padding: 5px 11px; min-height: 32px; font-size: 13px; border-radius: 10px; } .btn.lg { padding: 14px 22px; font-size: 16px; min-height: 52px; border-radius: 15px; } .btn.block { width: 100%; }
.btn.icon { padding: 0; width: 40px; } .btn.icon.sm { width: 32px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; } .field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; min-height: 42px; transition: border-color .15s, box-shadow .15s, background .15s; }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--surface); }
.input::placeholder { color: var(--muted); opacity: .7; } .input[readonly] { opacity: .75; }
.field .hint { font-size: 12px; color: var(--muted); } .field.err .input { border-color: var(--bad); } .field .errmsg { font-size: 12px; color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; } .form-grid .span2 { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; } .check input { width: 18px; height: 18px; accent-color: var(--brand); }
.switch { display: inline-block; vertical-align: middle; position: relative; width: 44px; height: 26px; flex: none; } .switch input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; background: var(--border-strong); border-radius: 99px; transition: .2s; } .switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: .2s; }
.switch input:checked + i { background: var(--grad); } .switch input:checked + i::after { transform: translateX(18px); }
.seg { display: inline-flex; padding: 4px; background: var(--surface-3); border-radius: 13px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: .15s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .chip { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13.5px; transition: .15s; }
.chip:hover { border-color: var(--brand); } .chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -6px rgba(5,115,157,.7); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; position: relative; }
:root[data-theme="dark"] .card { background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)), var(--surface); }
.card.flush { padding: 0; overflow: hidden; } .card.hover { transition: transform .18s, box-shadow .18s, border-color .18s; cursor: pointer; } .card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; } .card-h h3 { display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } .g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.stat { display: flex; gap: 14px; align-items: center; } .stat .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; }
.stat .v { font-size: 25px; font-weight: 780; letter-spacing: -.02em; line-height: 1.1; } .stat .l { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.tone-brand { background: var(--brand-soft); color: var(--brand); } .tone-ok { background: var(--ok-soft); color: var(--ok); } .tone-warn { background: var(--warn-soft); color: var(--warn); } .tone-bad { background: var(--bad-soft); color: var(--bad); } .tone-info { background: var(--info-soft); color: var(--info); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); } .badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.pulse::before { animation: pulse 1.6s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--grad); flex: none; overflow: hidden; background-size: cover; background-position: center; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; } .avatar.xl { width: 96px; height: 96px; font-size: 32px; } .avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .8s cubic-bezier(.2,.8,.2,1); }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.kbd { font: 600 11px ui-monospace, Consolas, monospace; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); } .empty .ic { font-size: 40px; opacity: .45; margin-bottom: 10px; display: block; margin-inline: auto; } .empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; min-height: 14px; } @keyframes shimmer { to { background-position: -200% 0; } }
.alert { padding: 12px 14px; border-radius: 12px; display: flex; gap: 10px; align-items: flex-start; background: var(--info-soft); color: var(--info); font-weight: 500; } .alert.bad { background: var(--bad-soft); color: var(--bad); } .alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- table ---------- */
.tablewrap { overflow-x: auto; } table.t { width: 100%; border-collapse: collapse; min-width: 560px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; } table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .12s; } table.t tbody tr:hover { background: var(--surface-2); } table.t tr.click { cursor: pointer; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; } .toolbar .input { width: auto; min-width: 150px; } .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; } .search .input { padding-left: 38px; width: 100%; } .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- admin layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 16px 12px; background: var(--glass); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; z-index: 40; }
.brandbar { display: flex; align-items: center; gap: 11px; padding: 6px 10px 14px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; } .brandbar .logo { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px -6px rgba(5,115,157,.7); } .brandbar .logo img { width: 24px; height: auto; display: block; }
.logofull { display: inline-block; line-height: 0; } .logofull img { width: auto; max-width: 100%; display: block; } .logofull .lf-night { display: none; } :root[data-theme="dark"] .logofull .lf-day { display: none; } :root[data-theme="dark"] .logofull .lf-night { display: block; }
.brandbar small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 14px; position: relative; transition: background .15s, color .15s; } .nav a:hover { background: var(--surface-3); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand); } .nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
.nav a .ic { font-size: 19px; } .nav a .count { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--bad); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--glass); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid var(--border); }
.content { padding: 26px 24px 90px; max-width: 1500px; width: 100%; margin-inline: auto; animation: rise .35s ease both; } @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; } .page-head p { color: var(--muted); margin-top: 4px; }
.menu-btn { display: none; } .scrim { display: none; }
.livepill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); font-weight: 650; font-size: 12.5px; } .livepill.off { background: var(--bad-soft); color: var(--bad); }
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, 92vw); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; animation: pop .16s ease both; transform-origin: top right; } @keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); } .notif:last-child { border-bottom: 0; } .notif.unread { background: var(--brand-soft); } .notif .t { font-weight: 650; font-size: 13.5px; } .notif .b { color: var(--muted); font-size: 12.5px; }
.bell { position: relative; } .bell .dot { position: absolute; top: 5px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }

/* ---------- modal / drawer / toast / cmdk ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(5,8,22,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 18px; animation: fade .18s ease both; } @keyframes fade { from { opacity: 0; } }
.modal { width: min(640px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2,.8,.2,1) both; display: flex; flex-direction: column; } .modal.wide { width: min(900px, 100%); } .modal.sm { width: min(440px, 100%); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; } .modal-b { padding: 22px; } .modal-f { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--surface); flex-wrap: wrap; }
.toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); min-width: 240px; max-width: min(420px, 92vw); animation: slidein .28s cubic-bezier(.2,.8,.2,1) both; font-weight: 550; } @keyframes slidein { from { opacity: 0; transform: translateX(30px); } }
.toast .ic { font-size: 20px; margin-top: 1px; } .toast.ok .ic { color: var(--ok); } .toast.err .ic { color: var(--bad); } .toast.info .ic { color: var(--brand); } .toast.out { animation: slideout .22s ease both; } @keyframes slideout { to { opacity: 0; transform: translateX(30px); } }
.cmdk { width: min(620px, 100%); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; align-self: flex-start; margin-top: 12vh; animation: pop .18s ease both; }
.cmdk input { width: 100%; border: 0; background: transparent; padding: 18px 20px; font: inherit; font-size: 16px; color: var(--text); outline: none; border-bottom: 1px solid var(--border); }
.cmdk .res { max-height: 52vh; overflow: auto; padding: 8px; } .cmdk .item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-weight: 550; } .cmdk .item.on, .cmdk .item:hover { background: var(--brand-soft); color: var(--brand); } .cmdk .sec { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }

/* ---------- domain widgets ---------- */
.bedmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; } .roomcard { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface-2); transition: .15s; } .roomcard:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.beds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; } .bed { min-width: 40px; height: 38px; padding: 0 8px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; cursor: pointer; border: 1.5px solid transparent; transition: transform .12s; } .bed:hover { transform: scale(1.08); }
.bed.vacant { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); } .bed.occupied { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); } .bed.reserved { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); } .bed.maintenance { background: var(--surface-3); color: var(--muted); border: 1.5px dashed var(--border-strong); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); } .legend i { display: inline-block; width: 11px; height: 11px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.timeline { position: relative; padding-left: 22px; } .timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); } .tl { position: relative; padding: 0 0 16px; } .tl::before { content: ""; position: absolute; left: -22px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); } .tl.in::before { border-color: var(--ok); } .tl.out::before { border-color: var(--warn); } .tl.late::before { border-color: var(--bad); }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--ringc, var(--brand)) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; position: relative; } .ring::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); } .ring > * { position: relative; z-index: 1; text-align: center; }
.insight { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); } .insight .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.stars { display: inline-flex; gap: 4px; } .stars button { border: 0; background: none; font-size: 26px; color: var(--border-strong); cursor: pointer; padding: 0; line-height: 1; } .stars button.on { color: #f59e0b; }
.qrbox { background: #fff; padding: 14px; border-radius: 18px; display: inline-block; box-shadow: var(--shadow); line-height: 0; } .qrbox canvas, .qrbox img { max-width: 100%; height: auto !important; }
.tag-late { animation: blink 1.4s infinite; } @keyframes blink { 50% { opacity: .55; } }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 1.8s infinite; display: inline-block; }
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; } .heat .d { aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 650; font-size: 13px; position: relative; border: 1px solid var(--border); } .heat .d.has { background: var(--brand-soft); border-color: var(--brand); } .heat .d.late { background: var(--bad-soft); border-color: var(--bad); } .heat .d.today { outline: 2px solid var(--brand); } .heat .d i { font-style: normal; font-size: 10px; color: var(--muted); } .heat .h { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }

/* ---------- mobile app shell (resident / parent / gate) ---------- */
.mapp { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: 96px; position: relative; }
.mapp.wide { max-width: 980px; }
.mtop { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.mbody { padding: 18px; animation: rise .3s ease both; display: flex; flex-direction: column; gap: 16px; }
.tabbar { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: 12px; width: min(496px, calc(100% - 20px)); display: flex; padding: 8px; gap: 4px; background: var(--glass); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); border: 1px solid var(--border-strong); border-radius: 24px; box-shadow: var(--shadow-lg); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 17px; color: var(--muted); font-size: 11px; font-weight: 650; position: relative; transition: .15s; text-decoration: none !important; } .tabbar a .ic { font-size: 22px; } .tabbar a.on { background: var(--brand-soft); color: var(--brand); } .tabbar a .count { position: absolute; top: 2px; right: 22%; min-width: 17px; height: 17px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
.hero { border-radius: var(--radius-lg); padding: 22px; color: #fff; background: var(--grad); position: relative; overflow: hidden; box-shadow: 0 20px 44px -18px rgba(5,115,157,.8); } .hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; top: -80px; background: rgba(255,255,255,.14); } .hero::before { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; left: -40px; bottom: -70px; background: rgba(255,255,255,.1); }
.hero > * { position: relative; z-index: 1; } .hero.out { background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 20px 44px -18px rgba(239,68,68,.7); } .hero.in { background: linear-gradient(135deg, #10b981, #16a9c9); box-shadow: 0 20px 44px -18px rgba(16,185,129,.7); }
.hero .btn { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(6px); } .hero .btn:hover { background: rgba(255,255,255,.3); }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); cursor: pointer; transition: .15s; text-decoration: none !important; color: var(--text); } .tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); } .tile .ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; }
.list > * { padding: 14px 4px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; } .list > *:last-child { border-bottom: 0; }
.sheet-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(5,8,22,.55); backdrop-filter: blur(5px); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease both; }
.sheet { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 10px 20px 28px; box-shadow: var(--shadow-lg); animation: sheetup .28s cubic-bezier(.2,.8,.2,1) both; } @keyframes sheetup { from { transform: translateY(100%); } } .sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--border-strong); margin: 4px auto 16px; }
.sos-btn { width: 100%; padding: 18px; border-radius: 20px; border: 0; background: linear-gradient(135deg, #ef4444, #be123c); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .02em; cursor: pointer; position: relative; overflow: hidden; box-shadow: 0 14px 30px -10px rgba(239,68,68,.8); user-select: none; touch-action: none; } .sos-btn i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.28); }
.scanframe { position: relative; border-radius: 24px; overflow: hidden; background: #000; aspect-ratio: 1; box-shadow: var(--shadow); } .scanframe::after { content: ""; position: absolute; inset: 14%; border: 3px solid rgba(255,255,255,.85); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; } .scanline { position: absolute; left: 14%; right: 14%; height: 3px; background: linear-gradient(90deg, transparent, #34d399, transparent); animation: scan 2s infinite ease-in-out; z-index: 2; } @keyframes scan { 0%, 100% { top: 16%; } 50% { top: 82%; } }
.verdict { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; color: #fff; animation: fade .15s ease both; } .verdict.ok { background: linear-gradient(160deg, #047857, #10b981); } .verdict.in { background: linear-gradient(160deg, #0e7490, #16a9c9); } .verdict.bad { background: linear-gradient(160deg, #9f1239, #ef4444); } .verdict.warn { background: linear-gradient(160deg, #b45309, #f59e0b); }
.verdict .big { font-size: 44px; font-weight: 850; letter-spacing: -.02em; margin: 6px 0; } .verdict .face { width: 150px; height: 150px; border-radius: 50%; border: 6px solid rgba(255,255,255,.7); background: rgba(255,255,255,.2) center/cover; display: grid; place-items: center; font-size: 56px; font-weight: 800; margin-bottom: 14px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.4); }

/* ---------- landing / login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 22px; } .authbox { width: min(440px, 100%); } .authcard { padding: 30px; border-radius: 26px; box-shadow: var(--shadow-lg); }
.otpbox { display: flex; gap: 8px; justify-content: center; } .otpbox input { flex: 1; min-width: 0; max-width: 52px; height: 58px; text-align: center; font-size: 24px; font-weight: 700; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--surface-2); color: var(--text); } .otpbox input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.demo-chip { display: inline-flex; padding: 6px 12px; border-radius: 99px; background: var(--surface-3); font-size: 12.5px; font-weight: 600; cursor: pointer; border: 1px dashed var(--border-strong); } .demo-chip:hover { border-color: var(--brand); color: var(--brand); }
.hero-land { padding: 72px 22px 40px; text-align: center; max-width: 1060px; margin: 0 auto; } .hero-land h1 { font-size: clamp(34px, 6vw, 62px); font-weight: 850; letter-spacing: -.035em; line-height: 1.05; } .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; max-width: 1200px; margin: 0 auto; }
.feature { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); } .feature .ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; margin-bottom: 14px; }
.appcard { padding: 26px; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: .2s; display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none !important; position: relative; overflow: hidden; } .appcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand); } .appcard .ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; color: #fff; background: var(--grad); box-shadow: 0 12px 26px -10px rgba(5,115,157,.8); }
.print-sheet { max-width: 780px; margin: 30px auto; background: #fff; color: #111; padding: 44px; border-radius: 6px; box-shadow: var(--shadow); font-family: Georgia, "Times New Roman", serif; } .print-sheet h1 { font-family: var(--font); }
@media print { body::before { display: none; } body { background: #fff; } .noprint, .sidebar, .topbar, .scrim, .toasts, .tabbar, .overlay { display: none !important; } .shell { display: block; } .content { padding: 0; max-width: none; animation: none; } .card { box-shadow: none; border-color: #ddd; } .print-sheet { box-shadow: none; margin: 0; max-width: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 84vw); transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); background: var(--surface); }
  .sidebar.open { transform: none; } .scrim.show { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(5,8,22,.5); backdrop-filter: blur(3px); }
  .menu-btn { display: inline-flex; } .topbar { padding: 0 14px; } .content { padding: 18px 14px 90px; } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hide-m { display: none !important; }
}
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .page-head h1 { font-size: 22px; } .toasts { left: 14px; right: 14px; align-items: stretch; bottom: 90px; } .modal-b { padding: 16px; } .modal-h, .modal-f { padding-inline: 16px; } .form-grid { grid-template-columns: minmax(0, 1fr); } .stat .v { font-size: 22px; } .g4.keep2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

svg.ic.flip { transform: scaleX(-1); }

@media (max-width: 640px) { .authcard { padding: 24px 18px; } .auth { padding: 14px; } }

.propsel { width: auto; min-width: 170px; font-weight: 600; }
@media (max-width: 640px) { .propsel { min-width: 0; max-width: 132px; padding-inline: 10px; } .topbar .livepill { display: none; } .topbar { gap: 6px; } }


/* ---------- footer ---------- */
.ss-footer { padding: 26px 18px 30px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.ss-footer.left { align-items: flex-start; text-align: left; }
.ss-footer .row1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; } .ss-footer .row1 i { font-style: normal; opacity: .5; } .ss-footer .dev b, .ss-footer .dev a { color: var(--text-2); font-weight: 650; }
.ss-footer .row2 { display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: center; } .ss-footer a { color: var(--muted); font-weight: 550; } .ss-footer a:hover { color: var(--brand); text-decoration: none; }
.ss-footer .note { max-width: 560px; }
.main-view + .ss-footer { border-top: 1px solid var(--border); margin-top: 8px; }
/* legal pages */
.legal { max-width: 820px; margin: 0 auto; padding: 24px 22px 10px; } .legal h1 { font-size: 30px; margin: 8px 0 4px; } .legal h2 { font-size: 18px; margin: 28px 0 8px; } .legal p, .legal li { color: var(--text-2); line-height: 1.75; } .legal ul { padding-left: 22px; margin: 8px 0; } .legal .meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.legal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; } .legal-tabs a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--border-strong); color: var(--text-2); font-weight: 600; font-size: 13px; } .legal-tabs a.on { background: var(--grad); color: #fff; border-color: transparent; text-decoration: none; }
.legal .box { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin: 14px 0; font-size: 14px; }

/* ---------- user menu (top-right) ---------- */
.usermenu-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer; transition: .15s; min-height: 40px; }
.usermenu-btn:hover, .usermenu-btn[aria-expanded="true"] { background: var(--surface-3); border-color: var(--brand); }
.usermenu-btn .um-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; } .usermenu-btn .um-name b { font-size: 13px; } .usermenu-btn .um-name small { font-size: 11px; color: var(--muted); font-weight: 600; }
.um-menu { width: min(300px, 92vw); } .um-head { display: flex; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.um-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; } .um-item:hover, .um-item:focus-visible { background: var(--brand-soft); color: var(--brand); outline: none; } .um-item.danger { color: var(--bad); } .um-item.danger:hover { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 640px) { .usermenu-btn .um-name, .usermenu-btn > svg.ic { display: none; } .usermenu-btn { padding: 3px; } }

/* Landing nav: mobile par logo shrink na ho */
.landing-nav { gap: 10px; }
.landing-nav .logofull { flex-shrink: 0; }
.landing-nav .logofull img { max-width: none; }
.landing-nav > .row { min-width: 0; flex-wrap: nowrap; }
@media (max-width: 520px) {
  .landing-nav { padding: 14px 14px; }
  .landing-nav .logofull img { height: 36px !important; }
  .landing-nav > .row { gap: 6px; }
  .landing-nav > .row .btn { padding-left: 10px; padding-right: 10px; font-size: 13px; }
  .landing-nav > .row .btn svg { flex-shrink: 0; }
}
@media (max-width: 400px) {
  .landing-nav { padding: 12px 10px; }
  .landing-nav .logofull img { height: 32px !important; }
  .landing-nav > .row .btn { padding-left: 9px; padding-right: 9px; }
}
@media (max-width: 359px) {
  .landing-nav > .row .btn.icon { display: none; }
}
