/* =====================================================================
   Preschool System — Oracle Redwood UI
   ---------------------------------------------------------------------
   • Soft & neutral: warm, low-glare canvas; white modular surfaces
   • Core palette: Bark (text/lines), O-Red (accent only), Air (light),
     Neutral grays (structure)
   • Typography: Oracle Sans → Arial → Calibri. Uniform weights
     (400 / 500 / 600 only), sentence-case labels, never all-caps
   • Clean & minimalist: generous whitespace, 40–48px touch targets,
     1px hairlines instead of heavy shadows, sleek 1.5px stroke icons
   • Drawers over pop-ups: dialogs slide in from the right edge
   • Modular blocks: one reusable set of buttons, fields, cards,
     tables, chips, drawers used by every screen
   Legacy variable names (--primary, --ok, --line …) are preserved so
   every inline style already in app.js keeps working.
   ===================================================================== */

@font-face{font-family:'NotoSinhala';src:url('/assets/fonts/NotoSansSinhala-Regular.ttf') format('truetype');font-weight:400;font-display:swap;}
@font-face{font-family:'NotoSinhala';src:url('/assets/fonts/NotoSansSinhala-Bold.ttf') format('truetype');font-weight:600;font-display:swap;}

:root{
  /* ---------- Core palette ---------- */
  /* Bark — text, icons, hairlines */
  --rw-bark:#161513;
  --rw-bark-80:#3B3835;
  --rw-bark-60:#605C57;
  --rw-bark-40:#8A8681;

  /* O-Red — accent only, never a background wash */
  --rw-red:#C74634;
  --rw-red-hover:#AB3628;
  --rw-red-active:#8E2C20;
  --rw-red-tint:#FBEEEC;
  --rw-red-line:#EFD3CE;

  /* Air — light, calm tones */
  --rw-air:#F6F5F3;
  --rw-air-2:#FBFAF9;
  --rw-air-panel:#F9F9F9;   /* Air tone used by every side panel / drawer */
  --rw-air-blue:#EDF3F8;

  /* Bark — header / primary text on panels, and the dark brand block */
  --rw-bark-head:#312D2A;
  --rw-bark-head-2:#3E3936;

  /* 8px grid */
  --sp-1:8px; --sp-2:16px; --sp-3:24px; --sp-4:32px; --sp-5:40px;

  /* Neutrals */
  --rw-n-0:#FFFFFF;
  --rw-n-10:#FAF9F8;
  --rw-n-20:#F4F3F1;
  --rw-n-30:#EDEBE9;
  --rw-n-40:#E2E0DD;
  --rw-n-50:#D3D0CC;
  --rw-n-60:#B4B0AB;
  --rw-n-70:#8A8681;

  /* Functional — desaturated, soft */
  --rw-info:#2A6EBB;
  --rw-info-tint:#EDF3FA;
  --rw-success:#3A7D53;
  --rw-success-tint:#EDF4EF;
  --rw-warning:#8A6116;
  --rw-warning-tint:#F9F2E4;
  --rw-danger:#A73A2E;
  --rw-danger-tint:#FAEDEB;

  /* ---------- Legacy token bridge ---------- */
  --bg:var(--rw-air);
  --surface:var(--rw-n-0);
  --surface-2:var(--rw-n-10);
  --ink:var(--rw-bark);
  --muted:var(--rw-bark-60);
  --line:var(--rw-n-40);
  --primary:var(--rw-red);
  --primary-700:var(--rw-red-hover);
  --primary-50:var(--rw-red-tint);
  --accent:var(--rw-info);
  --danger:var(--rw-danger);
  --warn:var(--rw-warning);
  --ok:var(--rw-success);

  /* Elevation — kept deliberately quiet */
  --shadow-1:0 1px 1px rgba(22,21,19,.04);
  --shadow-2:0 2px 4px rgba(22,21,19,.06);
  --shadow-3:0 8px 28px rgba(22,21,19,.12);
  --shadow-drawer:-24px 0 64px rgba(49,45,42,.20), -8px 0 24px rgba(49,45,42,.10);
  --shadow-panel:-16px 0 48px rgba(49,45,42,.14), -4px 0 12px rgba(49,45,42,.06);
  --shadow:var(--shadow-1);

  --radius:8px;
  --radius-sm:6px;
  --radius-lg:12px;
  --focus:0 0 0 2px var(--rw-n-0),0 0 0 4px rgba(42,110,187,.6);

  --font:'Oracle Sans','Oracle Sans VF','Redwood Sans',Arial,Calibri,'NotoSinhala','Helvetica Neue',sans-serif;
  --tap:40px;              /* minimum touch target */
  --sidebar-w:252px;
}

*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{
  font-family:var(--font);
  background:var(--bg);color:var(--ink);
  font-size:14px;line-height:1.55;font-weight:400;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
:lang(si),.si{font-family:'NotoSinhala',var(--font)}
h1,h2,h3,h4{font-weight:500;letter-spacing:0;margin:0}
a{color:var(--rw-info);text-decoration:none}
a:hover{text-decoration:underline}
button{font-family:inherit;font-weight:500}
b,strong{font-weight:600}
.hidden{display:none!important}
::selection{background:var(--rw-red-tint)}

/* Focus — consistent across every component */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,
textarea:focus-visible,[tabindex]:focus-visible{outline:none;box-shadow:var(--focus);border-radius:var(--radius-sm)}

/* Slim, quiet scrollbars */
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:var(--rw-n-50);border-radius:8px;border:3px solid transparent;background-clip:content-box}
*::-webkit-scrollbar-thumb:hover{background:var(--rw-n-60);background-clip:content-box}
*::-webkit-scrollbar-track{background:transparent}

/* ---------- Login ---------- */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--rw-air)}
.login-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-2);width:100%;max-width:400px;padding:36px}
.login-card .logo{width:68px;height:56px;display:flex;align-items:center;justify-content:center;margin-bottom:18px}
.login-card .logo img{width:100%;height:100%;object-fit:contain}
.login-card h1{font-size:23px;font-weight:500;margin:0 0 6px}
.login-card p{color:var(--muted);margin:0 0 24px;font-size:13.5px}
.login-card .btn{width:100%}

/* ---------- Layout ---------- */
.app{display:flex;min-height:100vh}
.sidebar{width:var(--sidebar-w);background:var(--rw-air);border-right:none;box-shadow:var(--shadow-panel);display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:40}
/* Brand block — the official Lexington lockup sits edge to edge on its own
   Bark (#302D2A) block, exactly as supplied. No chip, no re-typed wordmark. */
.brand{display:block;padding:0;background:#302D2A;box-sizing:border-box}
.brand .brand-lockup{display:block;line-height:0;text-decoration:none}
.brand .brand-lockup img{display:block;width:100%;height:auto}
.brand .brand-meta{display:flex;align-items:center;gap:8px;padding:0 24px 16px;
  font-size:12px;line-height:16px;color:rgba(255,255,255,.64);font-weight:400}
.brand .brand-meta .dot{opacity:.5}

/* Block navigation (Redwood): grouped flat blocks, 8px grid, 16px gutters. */
.nav{padding:24px 16px;flex:1;overflow:auto;min-height:0;background:var(--rw-air)}
.nav-group{margin-bottom:16px}
.nav-group:last-child{margin-bottom:0}
.nav-block{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow-1);padding:8px;overflow:hidden}
.nav a{display:flex;align-items:center;gap:12px;min-height:40px;padding:8px 12px;border-radius:var(--radius-sm);color:var(--rw-bark-80);font-weight:400;font-size:14px;line-height:20px;position:relative;transition:background .12s,color .12s}
.nav a:hover{background:var(--rw-air);text-decoration:none;color:var(--rw-bark-head)}
.nav a.active{background:var(--rw-red-tint);color:var(--rw-red);font-weight:500}
.nav a.active::before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--rw-red)}
.nav a svg{width:19px;height:19px;flex:none;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;opacity:.9}
.nav a.active svg{opacity:1}
.nav .section{font-size:12px;letter-spacing:0;text-transform:none;color:var(--rw-bark-40);padding:0 8px 8px;font-weight:400}
.sidebar-foot{border-top:none;padding:16px;background:var(--rw-air)}
.sidebar-foot .userbox{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow-1);padding:12px}
.userbox{display:flex;align-items:center;gap:11px;font-size:13.5px}
.userbox .av{width:36px;height:36px;border-radius:50%;background:var(--rw-n-30);color:var(--rw-bark-80);display:flex;align-items:center;justify-content:center;font-weight:500;flex:none}
.role-pill{display:inline-block;font-size:11.5px;padding:1px 9px;border-radius:20px;background:var(--rw-n-20);border:1px solid var(--rw-n-40);color:var(--muted);font-weight:400;text-transform:none;letter-spacing:0}

.main{flex:1;margin-left:var(--sidebar-w);min-width:0}
.topbar{min-height:64px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:30}
.topbar h2{font-size:20px;margin:0;font-weight:500}
.topbar-actions{display:flex;align-items:center;gap:10px}
.content{padding:24px}
.hamburger{display:none;background:none;border:none;cursor:pointer;color:var(--ink);min-width:var(--tap);min-height:var(--tap)}
.hamburger svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.5}

/* ---------- Buttons (modular block) ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--tap);border:1px solid var(--rw-n-50);background:var(--surface);color:var(--ink);padding:8px 16px;border-radius:var(--radius);font-weight:500;font-size:14px;cursor:pointer;transition:background .12s,border-color .12s,color .12s}
.btn:hover{background:var(--rw-n-20);border-color:var(--rw-n-60)}
.btn:active{background:var(--rw-n-30)}
.btn.primary{background:var(--rw-red);border-color:var(--rw-red);color:#fff}
.btn.primary:hover{background:var(--rw-red-hover);border-color:var(--rw-red-hover)}
.btn.primary:active{background:var(--rw-red-active)}
.btn.accent{background:var(--rw-info);border-color:var(--rw-info);color:#fff}
.btn.accent:hover{background:#215C9E;border-color:#215C9E}
.btn.ghost{background:transparent;border-color:transparent;color:var(--rw-info)}
.btn.ghost:hover{background:var(--rw-info-tint)}
.btn.danger{color:var(--rw-danger);border-color:var(--rw-n-50);background:var(--surface)}
.btn.danger:hover{background:var(--rw-danger-tint);border-color:var(--rw-danger)}
.btn.sm{min-height:32px;padding:5px 12px;font-size:13px;border-radius:var(--radius-sm)}
.btn.lg{min-height:48px;padding:12px 22px;font-size:15px}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}

/* ---------- Cards / panels (modular blocks) ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:24px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px;box-shadow:none}
.card .label{font-size:13px;color:var(--muted);font-weight:400;text-transform:none;letter-spacing:0}
.card .value{font-size:28px;font-weight:500;margin-top:6px;font-variant-numeric:tabular-nums;line-height:1.2}
.card .value.sm{font-size:20px}

.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:none;overflow:hidden;margin-bottom:22px}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--surface)}
.panel-head h3{margin:0;font-size:16px;font-weight:500}
.panel-body{padding:20px}

.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:18px}
.toolbar .grow{flex:1;min-width:170px}

/* ---------- Forms ---------- */
input,select,textarea{width:100%;min-height:var(--tap);padding:9px 12px;border:1px solid var(--rw-n-50);border-radius:var(--radius-sm);font-size:14px;font-family:inherit;font-weight:400;background:var(--rw-n-0);color:var(--ink);transition:border-color .12s,box-shadow .12s}
textarea{min-height:96px;line-height:1.55}
input::placeholder,textarea::placeholder{color:var(--rw-bark-40)}
input:hover,select:hover,textarea:hover{border-color:var(--rw-n-60)}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--rw-info);box-shadow:0 0 0 3px var(--rw-info-tint)}
input[type=checkbox],input[type=radio]{width:18px;height:18px;min-height:0;accent-color:var(--rw-red)}
label.fld{display:block;margin-bottom:16px}
label.fld .lab{display:block;font-size:13px;color:var(--muted);font-weight:400;margin-bottom:6px;text-transform:none;letter-spacing:0}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 16px}

/* ---------- Tables ---------- */
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;font-size:13px;text-transform:none;letter-spacing:0;color:var(--muted);padding:12px 16px;border-bottom:1px solid var(--line);background:var(--rw-n-10);white-space:nowrap;font-weight:500}
td{padding:13px 16px;border-bottom:1px solid var(--rw-n-30);vertical-align:middle}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover{background:var(--rw-n-10)}
.t-num{text-align:right;font-variant-numeric:tabular-nums}
.empty{padding:48px;text-align:center;color:var(--muted)}

.badge{display:inline-block;font-size:12.5px;font-weight:400;padding:2px 10px;border-radius:20px;border:1px solid transparent;text-transform:none;letter-spacing:0}
.badge.paid{background:var(--rw-success-tint);color:var(--rw-success);border-color:#D7E6DC}
.badge.unpaid{background:var(--rw-warning-tint);color:var(--rw-warning);border-color:#EBDFC4}
.badge.partial{background:var(--rw-info-tint);color:var(--rw-info);border-color:#D6E3F2}
.badge.active{background:var(--rw-success-tint);color:var(--rw-success);border-color:#D7E6DC}
.badge.inactive{background:var(--rw-n-20);color:var(--muted);border-color:var(--rw-n-40)}

/* =====================================================================
   Drawers over pop-ups
   Every dialog produced by modal() slides in from the right edge as a
   side panel instead of a centred pop-up. Same markup, same classes.
   ===================================================================== */
.modal-bg{position:fixed;inset:0;background:rgba(22,21,19,.32);display:flex;align-items:stretch;justify-content:flex-end;padding:0;z-index:60;overflow:hidden;animation:rwFade .18s ease}
.modal{background:var(--rw-air-panel);border-radius:0;width:100%;max-width:520px;height:100vh;box-shadow:var(--shadow-drawer);border:none;display:flex;flex-direction:column;color:var(--rw-bark-head);animation:rwSlideIn .24s cubic-bezier(.22,.61,.36,1)}
.modal.wide{max-width:760px}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:none;background:var(--rw-air-panel);flex:none}
.modal-head h3{margin:0;font-size:20px;line-height:28px;font-weight:500;color:var(--rw-bark-head)}
.modal-body{padding:0 24px 24px;flex:1;max-height:none;overflow:auto;color:var(--rw-bark-head)}
.modal-body>*+*{margin-top:16px}
.modal-foot{padding:24px;border-top:none;display:flex;justify-content:flex-end;gap:16px;background:var(--rw-air-panel);border-radius:0;flex:none}
.x{background:none;border:none;font-size:24px;cursor:pointer;color:var(--muted);line-height:1;min-width:var(--tap);min-height:var(--tap);border-radius:var(--radius-sm)}
.x:hover{color:var(--ink);background:var(--rw-n-20)}
@keyframes rwSlideIn{from{transform:translateX(24px);opacity:.4}to{transform:none;opacity:1}}
@keyframes rwFade{from{opacity:0}to{opacity:1}}

/* ---------- Toast ---------- */
#toast{position:fixed;bottom:24px;right:24px;z-index:90;display:flex;flex-direction:column;gap:10px}
.toast{background:var(--rw-bark);color:#fff;padding:12px 18px;border-radius:var(--radius);font-size:14px;font-weight:400;box-shadow:var(--shadow-3);max-width:380px;border-left:3px solid var(--rw-n-60)}
.toast.ok{border-left-color:var(--rw-success)}
.toast.err{border-left-color:var(--rw-red)}

.muted{color:var(--muted)}
.right{text-align:right}.center{text-align:center}
.flex{display:flex;gap:10px;align-items:center}
.spread{display:flex;justify-content:space-between;align-items:center;gap:10px}
.mt{margin-top:18px}.mb{margin-bottom:18px}
hr.sep{border:none;border-top:1px solid var(--line);margin:20px 0}

/* =====================================================================
   FEATURE 1 — Advanced search & filtering (public/js/filters.js)
   ===================================================================== */
.dt{border-bottom:1px solid var(--line);background:var(--surface)}
.dt-bar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 18px}
.dt-search{position:relative;flex:1;min-width:220px}
.dt-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;stroke:var(--rw-bark-40);fill:none;stroke-width:1.5;stroke-linecap:round;pointer-events:none}
.dt-search input{padding-left:38px;padding-right:34px;border-radius:var(--radius)}
.dt-search .dt-clear{position:absolute;right:6px;top:50%;transform:translateY(-50%);border:none;background:none;color:var(--muted);font-size:17px;cursor:pointer;line-height:1;width:28px;height:28px;border-radius:50%}
.dt-search .dt-clear:hover{background:var(--rw-n-20);color:var(--ink)}
.dt-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dt-count{font-size:13px;color:var(--muted);font-weight:400;white-space:nowrap}
.dt-count b{color:var(--ink);font-weight:500}
.dt-btn{display:inline-flex;align-items:center;gap:7px;min-height:var(--tap);border:1px solid var(--rw-n-50);background:var(--surface);color:var(--ink);padding:8px 14px;border-radius:var(--radius);font-size:13.5px;font-weight:400;cursor:pointer}
.dt-btn:hover{background:var(--rw-n-20);border-color:var(--rw-n-60)}
.dt-btn.on{background:var(--rw-n-30);border-color:var(--rw-n-60);color:var(--ink)}
.dt-btn .n{background:var(--rw-red);color:#fff;border-radius:20px;font-size:11.5px;padding:0 7px;min-width:18px;text-align:center;font-weight:500}

.dt-adv{display:none;padding:0 18px 16px;border-top:1px solid var(--rw-n-30)}
.dt-adv.open{display:block}
.dt-adv-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0 10px;flex-wrap:wrap}
.dt-adv-head .lbl{font-size:13px;font-weight:500;text-transform:none;letter-spacing:0;color:var(--muted)}
.dt-match{display:inline-flex;border:1px solid var(--rw-n-50);border-radius:var(--radius);overflow:hidden}
.dt-match button{border:none;background:var(--surface);color:var(--muted);font-size:13px;font-weight:400;padding:7px 14px;min-height:34px;cursor:pointer}
.dt-match button.on{background:var(--rw-n-30);color:var(--ink);font-weight:500}
.dt-rules{display:flex;flex-direction:column;gap:10px}
.dt-rule{display:grid;grid-template-columns:minmax(130px,1.1fr) minmax(130px,1fr) minmax(150px,1.3fr) auto;gap:10px;align-items:center;background:var(--rw-n-10);border:1px solid var(--rw-n-30);border-radius:var(--radius);padding:10px}
.dt-rule .dt-val-wrap{display:flex;gap:8px;align-items:center}
.dt-rule select,.dt-rule input{background:var(--rw-n-0);font-size:13.5px;min-height:36px;padding:7px 10px}
.dt-rule .dt-rm{border:1px solid var(--rw-n-50);background:var(--rw-n-0);color:var(--rw-danger);border-radius:var(--radius-sm);width:36px;height:36px;font-size:17px;line-height:1;cursor:pointer}
.dt-rule .dt-rm:hover{background:var(--rw-danger-tint);border-color:var(--rw-danger)}
.dt-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 18px 14px}
.dt-chip{display:inline-flex;align-items:center;gap:6px;background:var(--rw-n-20);color:var(--rw-bark-80);border:1px solid var(--rw-n-40);border-radius:20px;font-size:13px;font-weight:400;padding:4px 6px 4px 12px}
.dt-chip button{border:none;background:none;color:var(--muted);cursor:pointer;font-size:15px;line-height:1;width:22px;height:22px;border-radius:50%}
.dt-chip button:hover{background:var(--rw-n-40);color:var(--ink)}
.dt-noresult{padding:40px;text-align:center;color:var(--muted)}
th.dt-sortable{cursor:pointer;user-select:none}
th.dt-sortable:hover{color:var(--ink)}
th.dt-sortable .dt-arrow{opacity:.3;margin-left:6px;font-size:9px}
th.dt-sortable.dt-asc .dt-arrow,th.dt-sortable.dt-desc .dt-arrow{opacity:1;color:var(--rw-red)}
mark.dt-hit{background:#F7E7A8;color:inherit;border-radius:2px;padding:0 1px}

/* =====================================================================
   FEATURE 2 — Rapid Mode kiosk (public/js/rapid.js)
   ===================================================================== */
.kiosk{display:grid;grid-template-columns:1fr 340px;gap:20px;align-items:start}
.kiosk.panel-collapsed{grid-template-columns:1fr 56px}
.kiosk-stage{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);overflow:hidden;min-height:calc(100vh - 160px);display:flex;flex-direction:column}
.kiosk-top{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 22px;border-bottom:1px solid var(--line);background:var(--rw-n-10)}
.kiosk-top h3{margin:0;font-size:17px;font-weight:500}
.kiosk-top .sub{font-size:13px;color:var(--muted)}
.kiosk-steps{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.kiosk-steps .st{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:400;color:var(--muted);text-transform:none;letter-spacing:0}
.kiosk-steps .st i{width:22px;height:22px;border-radius:50%;background:var(--rw-n-30);color:var(--rw-bark-60);display:inline-flex;align-items:center;justify-content:center;font-style:normal;font-size:12px}
.kiosk-steps .st.on{color:var(--ink);font-weight:500}
.kiosk-steps .st.on i{background:var(--rw-red);color:#fff}
.kiosk-steps .st.done i{background:var(--rw-success);color:#fff}
.kiosk-steps .sepr{width:20px;height:1px;background:var(--rw-n-50)}
.kiosk-body{padding:26px;flex:1;overflow:auto}

.kiosk-hero{max-width:740px;margin:0 auto}
.kiosk-hero h2{font-size:27px;font-weight:500;margin:10px 0 6px;text-align:center}
.kiosk-hero p.lead{text-align:center;color:var(--muted);margin:0 0 22px;font-size:15px}
.kiosk-bigsearch{position:relative}
.kiosk-bigsearch svg{position:absolute;left:20px;top:50%;transform:translateY(-50%);width:22px;height:22px;stroke:var(--rw-bark-40);fill:none;stroke-width:1.5;stroke-linecap:round}
.kiosk-bigsearch input{font-size:19px;font-weight:400;min-height:60px;padding:16px 20px 16px 56px;border-radius:var(--radius-lg);border:1px solid var(--rw-n-50)}
.kiosk-bigsearch input:focus{border-color:var(--rw-info);box-shadow:0 0 0 3px var(--rw-info-tint)}
.kiosk-hint{text-align:center;font-size:13px;color:var(--muted);margin-top:12px}
.kiosk-hint kbd{background:var(--rw-n-20);border:1px solid var(--rw-n-40);border-radius:4px;padding:1px 7px;font-family:inherit;font-size:12px;font-weight:400}

.kiosk-results{margin-top:20px;display:flex;flex-direction:column;gap:10px}
.kiosk-result{display:flex;align-items:center;gap:16px;text-align:left;width:100%;min-height:64px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;cursor:pointer;transition:border-color .12s,background .12s}
.kiosk-result:hover{background:var(--rw-n-10);border-color:var(--rw-n-60)}
.kiosk-result.sel{border-color:var(--rw-red);background:var(--rw-red-tint)}
.kiosk-result .av{width:44px;height:44px;border-radius:50%;flex:none;background:var(--rw-n-20);color:var(--rw-bark-80);display:flex;align-items:center;justify-content:center;font-weight:500;font-size:15px}
.kiosk-result .nm{font-weight:500;font-size:15.5px}
.kiosk-result .mt2{font-size:13px;color:var(--muted);margin-top:2px}
.kiosk-result .due{margin-left:auto;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}

.kiosk-student{display:flex;align-items:center;gap:16px;background:var(--rw-n-10);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;margin-bottom:22px}
.kiosk-student .av{width:48px;height:48px;border-radius:50%;background:var(--rw-n-30);color:var(--rw-bark-80);display:flex;align-items:center;justify-content:center;font-weight:500;font-size:17px;flex:none}
.kiosk-student .nm{font-size:17px;font-weight:500}

.kiosk-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.kiosk-action{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;min-height:132px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:20px;cursor:pointer;transition:border-color .12s,background .12s}
.kiosk-action:hover{border-color:var(--rw-n-60);background:var(--rw-n-10)}
.kiosk-action .ico{width:42px;height:42px;border-radius:var(--radius);background:var(--rw-n-20);color:var(--rw-bark-80);display:flex;align-items:center;justify-content:center}
.kiosk-action .ico svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.kiosk-action .ttl{font-weight:500;font-size:15.5px}
.kiosk-action .dsc{font-size:13px;color:var(--muted)}
.kiosk-action .kb{margin-left:auto;font-size:12.5px;color:var(--rw-bark-40);font-weight:400}
.kiosk-action.ok .ico{background:var(--rw-success-tint);color:var(--rw-success)}
.kiosk-action.info .ico{background:var(--rw-info-tint);color:var(--rw-info)}
.kiosk-action.warn .ico{background:var(--rw-warning-tint);color:var(--rw-warning)}

.kiosk-picks{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.kiosk-pick{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-height:68px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px;cursor:pointer;text-align:left}
.kiosk-pick:hover{border-color:var(--rw-n-60);background:var(--rw-n-10)}
.kiosk-pick strong{font-size:14px;font-weight:500}
.kiosk-pick span{font-size:13px;color:var(--muted)}

.kiosk-cart{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.kiosk-cart .ln{display:flex;align-items:center;gap:12px;padding:11px 14px;border-bottom:1px solid var(--rw-n-30)}
.kiosk-cart .ln:last-child{border-bottom:none}
.kiosk-cart .ln input{width:64px;min-height:36px;padding:5px 8px;text-align:center}
.kiosk-total{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;background:var(--rw-n-10);border:1px solid var(--line);border-radius:var(--radius);font-size:18px;font-weight:500;margin-top:16px}
.kiosk-foot{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:16px 22px;border-top:1px solid var(--line);background:var(--rw-n-10);flex-wrap:wrap}

.kiosk-done{max-width:540px;margin:44px auto;text-align:center}
.kiosk-done .tick{width:76px;height:76px;border-radius:50%;background:var(--rw-success-tint);color:var(--rw-success);display:flex;align-items:center;justify-content:center;margin:0 auto 18px}
.kiosk-done .tick svg{width:38px;height:38px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.kiosk-done h2{font-size:24px;margin:0 0 8px;font-weight:500}
.kiosk-done .amt{font-size:30px;font-weight:500;margin:12px 0;font-variant-numeric:tabular-nums}
.kiosk-loop{margin-top:20px;font-size:13.5px;color:var(--muted)}
.kiosk-loopbar{height:4px;border-radius:4px;background:var(--rw-n-30);overflow:hidden;margin-top:10px}
.kiosk-loopbar i{display:block;height:100%;background:var(--rw-red);width:100%;transform-origin:left;animation:kioskLoop 4s linear forwards}
@keyframes kioskLoop{from{transform:scaleX(1)}to{transform:scaleX(0)}}

/* --- Collapsible history drawer --- */
/* Side panel — Air #F9F9F9 surface, heavy diffused left shadow, no borders,
   strict 8px grid (24px padding, 16px gaps), Bark #312D2A text. */
.kiosk-side{background:var(--rw-air-panel);border:none;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;position:sticky;top:88px;max-height:calc(100vh - 112px);box-shadow:var(--shadow-panel);color:var(--rw-bark-head)}
.kiosk-side-head{display:flex;align-items:center;gap:16px;padding:24px;border-bottom:none;background:var(--rw-air-panel)}
.kiosk-side-head h4{margin:0;font-size:16px;line-height:24px;font-weight:500;color:var(--rw-bark-head);flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kiosk-side-head .live{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:400;color:var(--rw-success);text-transform:none;letter-spacing:0}
.kiosk-side-head .live i{width:7px;height:7px;border-radius:50%;background:var(--rw-success);animation:pulse 1.8s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
.kiosk-collapse{border:1px solid var(--rw-n-50);background:var(--surface);border-radius:var(--radius-sm);width:32px;height:32px;cursor:pointer;color:var(--muted);font-size:15px;line-height:1;flex:none}
.kiosk-collapse:hover{background:var(--rw-n-20);color:var(--ink)}
.kiosk-side-stats{display:grid;grid-template-columns:1fr 1fr;gap:16px;background:transparent;padding:0 24px 16px}
.kiosk-side-stats div{background:#fff;border-radius:8px;padding:16px}
.kiosk-side-stats .l{font-size:12.5px;text-transform:none;letter-spacing:0;color:var(--muted);font-weight:400}
.kiosk-side-stats .v{font-size:20px;line-height:28px;font-weight:500;color:var(--rw-bark-head);font-variant-numeric:tabular-nums;margin-top:4px}
.kiosk-side-search{padding:0 24px 16px;border-bottom:none}
.kiosk-side-search .dt-search input{border-radius:var(--radius)}
.kiosk-feed{flex:1;overflow:auto;padding:0 24px 16px;display:flex;flex-direction:column;gap:8px}
.feed-item{display:flex;gap:16px;padding:16px;border-radius:8px;border:none;background:#fff;cursor:pointer;transition:box-shadow .12s,background .12s}
.feed-item:hover{background:#fff;box-shadow:var(--shadow-2)}
.feed-item .dot{width:30px;height:30px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-size:13px;background:var(--rw-n-20);color:var(--rw-bark-60)}
.feed-item.pay .dot{background:var(--rw-success-tint);color:var(--rw-success)}
.feed-item.sale .dot{background:var(--rw-info-tint);color:var(--rw-info)}
.feed-item.invoice .dot{background:var(--rw-warning-tint);color:var(--rw-warning)}
.feed-item.msg .dot{background:var(--rw-red-tint);color:var(--rw-red)}
.feed-item .who{font-size:13.5px;font-weight:500;line-height:1.35}
.feed-item .what{font-size:12.5px;color:var(--muted);margin-top:2px}
.feed-item .amt{margin-left:auto;text-align:right;font-size:13px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.feed-item .amt span{display:block;font-size:12px;font-weight:400;color:var(--muted)}
.kiosk-feed-empty{padding:28px 16px;text-align:center;color:var(--muted);font-size:13px}
.kiosk-side-foot{border-top:none;padding:24px;background:var(--rw-air-panel);display:flex;gap:16px}

/* Collapsed rail */
.kiosk-side.collapsed{align-items:center}
.kiosk-side.collapsed .kiosk-side-head{flex-direction:column;padding:16px 8px;gap:8px;width:100%}
.kiosk-side.collapsed .kiosk-side-head h4,
.kiosk-side.collapsed .kiosk-side-head .live,
.kiosk-side.collapsed .kiosk-side-stats,
.kiosk-side.collapsed .kiosk-side-search,
.kiosk-side.collapsed .kiosk-feed,
.kiosk-side.collapsed .kiosk-side-foot{display:none}
.kiosk-side.collapsed .kiosk-rail{display:flex}
.kiosk-rail{display:none;flex-direction:column;align-items:center;gap:12px;padding:14px 0;writing-mode:vertical-rl;font-size:13px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--muted)}
.kiosk-rail .n{writing-mode:horizontal-tb;background:var(--rw-n-30);color:var(--ink);border-radius:20px;font-size:12px;padding:1px 8px}

@media (max-width:1100px){
  .kiosk{grid-template-columns:1fr}
  .kiosk.panel-collapsed{grid-template-columns:1fr}
  .kiosk-side{position:static;max-height:none;order:2}
  .kiosk-stage{min-height:0;order:1}
}

/* ---------- Responsive ---------- */
@media (max-width:860px){
  .sidebar{transform:translateX(-100%);transition:transform .22s ease;width:276px;z-index:50}
  .sidebar.open{transform:none;box-shadow:var(--shadow-3)}
  .main{margin-left:0}
  .hamburger{display:block}
  .topbar{min-height:58px;padding:8px 14px;flex-wrap:wrap;gap:8px}
  .grid2,.grid3{grid-template-columns:1fr}
  #posGrid{grid-template-columns:1fr!important}
  input,select,textarea{font-size:16px}        /* prevents iOS zoom-on-focus */
  .btn{min-height:44px}
  .content{padding:16px}
  .panel-body{padding:16px;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .panel-body table{min-width:580px}
  .topbar-actions{margin-left:auto}
  .dt-rule{grid-template-columns:1fr 1fr;gap:8px}
  .dt-rule .dt-rm{grid-column:2;justify-self:end}
  .kiosk-bigsearch input{font-size:16px;min-height:54px;padding:14px 16px 14px 50px}
  .kiosk-body{padding:18px}
  /* Drawer becomes a bottom sheet on phones */
  .modal-bg{align-items:flex-end;justify-content:center}
  .modal,.modal.wide{max-width:100%;height:92vh;border:none;border-radius:16px 16px 0 0;box-shadow:0 -24px 64px rgba(49,45,42,.20);animation:rwSlideUp .24s cubic-bezier(.22,.61,.36,1)}
  @keyframes rwSlideUp{from{transform:translateY(28px);opacity:.4}to{transform:none;opacity:1}}
  .modal-head,.modal-body,.modal-foot{padding-left:24px;padding-right:24px}
  .brand{padding:24px;min-height:88px}
  .kiosk-side-head,.kiosk-side-stats,.kiosk-side-search,.kiosk-feed,.kiosk-side-foot{padding-left:24px;padding-right:24px}
}
@media (max-width:420px){
  .panel-body table{font-size:13.5px}
  h2#pageTitle{font-size:17px}
  .kiosk-actions{grid-template-columns:1fr}
}

/* ---------- Print ---------- */
@media print{
  .sidebar,.topbar,.toolbar,.no-print,.dt,.kiosk-side,.kiosk-foot{display:none!important}
  .main{margin:0}.content{padding:0}
  .panel,.kiosk-stage{box-shadow:none;border:none}
}

/* =====================================================================
   Astrid — assistant workspace (Oracle Redwood)
   Air panel, 8px grid, 24px padding, 16px gaps, Bark text, O-Red accent
   ===================================================================== */
.astrid {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 96px);
  min-height: 520px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.astrid.side-collapsed { grid-template-columns: 0 1fr; }
.astrid.side-collapsed .ast-side { display: none; }
.astrid.side-collapsed .ast-rail { display: flex; }

/* ---- conversation rail ---- */
.ast-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--rw-air-panel, #F9F9F9);
  box-shadow: var(--shadow-panel);
  position: relative;
  z-index: 2;
}
.ast-side-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 16px;
}
.ast-new {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 500;
}
.ast-collapse,
.ast-rail {
  border: 0;
  background: transparent;
  color: var(--rw-bark-60, #605C57);
  font-size: 16px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.ast-collapse:hover, .ast-rail:hover { background: rgba(0,0,0,.05); color: var(--rw-bark-head, #312D2A); }
.ast-rail {
  display: none;
  align-items: center;
  justify-content: center;
  align-self: start;
  margin: 24px 0 0 8px;
}
.ast-side-search { padding: 0 24px 16px; }
.ast-side-search .dt-search { width: 100%; }
.ast-side-search input { width: 100%; }

.ast-list { flex: 1; overflow: auto; padding: 0 16px 16px; }
.ast-list-group {
  padding: 16px 8px 8px;
  font-size: 12px;
  line-height: 16px;
  color: var(--rw-bark-40, #8A8681);
}
.ast-list-empty {
  padding: 24px 8px;
  font-size: 13px;
  color: var(--rw-bark-40, #8A8681);
}
.ast-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
}
.ast-item:hover { background: rgba(0,0,0,.045); }
.ast-item.on { background: #fff; box-shadow: var(--shadow-1); }
.ast-item.on .ast-item-title { color: var(--rw-red, #C74634); }
.ast-item-main { flex: 1; min-width: 0; }
.ast-item-title {
  font-size: 14px;
  line-height: 20px;
  color: var(--rw-bark-head, #312D2A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ast-item-sub {
  font-size: 12px;
  line-height: 16px;
  color: var(--rw-bark-40, #8A8681);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ast-item-time { font-size: 11px; color: var(--rw-bark-40, #8A8681); flex: none; }
.ast-item-acts { display: none; gap: 4px; flex: none; }
.ast-item:hover .ast-item-acts, .ast-item.on .ast-item-acts { display: flex; }
.ast-item:hover .ast-item-time, .ast-item.on .ast-item-time { display: none; }
.ast-ico {
  border: 0;
  background: transparent;
  color: var(--rw-bark-60, #605C57);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ast-ico:hover { background: rgba(0,0,0,.07); color: var(--rw-bark-head, #312D2A); }
.ast-ico.danger:hover { background: var(--rw-red-tint, #FBEEEC); color: var(--rw-red, #C74634); }
.ast-side-foot {
  display: flex;
  gap: 8px;
  padding: 16px 24px 24px;
}

/* ---- main column ---- */
.ast-main { display: flex; flex-direction: column; min-width: 0; }
.ast-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
}
.ast-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 20px;
  color: var(--rw-bark-head, #312D2A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ast-side-toggle { display: none; border: 0; background: transparent; color: var(--rw-bark-60, #605C57); cursor: pointer; }

.ast-thread {
  flex: 1;
  overflow: auto;
  padding: 8px 24px 24px;
  scroll-behavior: smooth;
}
.ast-msg { display: flex; gap: 16px; margin-bottom: 16px; max-width: 820px; }
.ast-msg.user { justify-content: flex-end; margin-left: auto; }
.ast-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 14px 14px 4px 14px;
  background: var(--rw-air, #F6F5F3);
  color: var(--rw-bark-head, #312D2A);
  font-size: 14px;
  line-height: 22px;
  white-space: pre-wrap;
}
.ast-av {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rw-red, #C74634);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ast-body { flex: 1; min-width: 0; }
.ast-md { font-size: 14px; line-height: 22px; color: var(--rw-bark-80, #3B3835); }
.ast-md p { margin: 0 0 8px; }
.ast-md ul, .ast-md ol { margin: 0 0 8px; padding-left: 20px; }
.ast-md li { margin: 2px 0; }
.ast-md code {
  background: var(--rw-air, #F6F5F3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}
.ast-md .ast-h { margin: 8px 0 4px; font-size: 14px; color: var(--rw-bark-head, #312D2A); }
.ast-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.ast-table th, .ast-table td { text-align: left; padding: 8px 12px; }
.ast-table th { color: var(--rw-bark-60, #605C57); background: var(--rw-air, #F6F5F3); }
.ast-table tbody tr + tr td { border-top: 1px solid var(--rw-n-10, #EAE8E5); }
.ast-acts { display: flex; gap: 4px; opacity: 0; transition: opacity .12s ease; }
.ast-msg:hover .ast-acts { opacity: 1; }
.ast-sys { font-size: 12px; color: var(--rw-bark-40, #8A8681); margin: 0 0 16px 48px; }

.ast-typing { display: inline-flex; gap: 5px; padding: 10px 2px; }
.ast-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rw-bark-40, #8A8681);
  animation: astBlink 1.1s infinite ease-in-out;
}
.ast-typing i:nth-child(2) { animation-delay: .16s; }
.ast-typing i:nth-child(3) { animation-delay: .32s; }
@keyframes astBlink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

/* ---- action confirm card ---- */
.ast-action {
  max-width: 820px;
  margin: 0 0 16px 48px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--rw-red-tint, #FBEEEC);
}
.ast-action-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--rw-bark-head, #312D2A); }
.ast-action-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--rw-red, #C74634);
}
.ast-action-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.ast-done { color: var(--rw-success, #3A7D53); font-size: 14px; }
.ast-failed { color: var(--rw-danger, #A73A2E); font-size: 14px; }

/* ---- welcome ---- */
.ast-welcome { max-width: 700px; margin: 8vh auto 0; text-align: center; padding: 0 24px; }
.ast-mark {
  width: 48px; height: 48px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--rw-red, #C74634);
  color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.ast-welcome h2 { margin: 0 0 8px; font-size: 24px; font-weight: 500; color: var(--rw-bark-head, #312D2A); }
.ast-welcome .lead { margin: 0 0 24px; font-size: 14px; line-height: 22px; color: var(--rw-bark-60, #605C57); }
.ast-suggs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ast-sugg {
  border: 0;
  background: var(--rw-air, #F6F5F3);
  color: var(--rw-bark-80, #3B3835);
  font: inherit;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 40px;
}
.ast-sugg:hover { background: var(--rw-red-tint, #FBEEEC); color: var(--rw-red, #C74634); }

/* ---- capabilities list ---- */
.ast-cap-group { margin-top: 16px; }
.ast-cap-head { font-size: 13px; color: var(--rw-bark-head, #312D2A); margin-bottom: 4px; }
.ast-cap-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 22px; color: var(--rw-bark-60, #605C57); }

/* ---- composer ---- */
.ast-composer { padding: 16px 24px 24px; }
.ast-composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  border-radius: 14px;
  background: var(--rw-air, #F6F5F3);
  max-width: 820px;
  margin: 0 auto;
}
.ast-composer textarea {
  flex: 1;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 22px;
  color: var(--rw-bark-head, #312D2A);
  padding: 9px 0;
  max-height: 200px;
}
.ast-send {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ast-hint { max-width: 820px; margin: 8px auto 0; font-size: 12px; color: var(--rw-bark-40, #8A8681); text-align: center; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .astrid { grid-template-columns: 1fr; height: calc(100vh - 88px); }
  .ast-rail { display: none !important; }
  .ast-side-toggle { display: inline-flex; }
  .ast-side {
    position: absolute;
    inset: 0 auto 0 0;
    width: 84%;
    max-width: 320px;
    transform: translateX(-102%);
    transition: transform .2s ease;
  }
  .astrid.side-open .ast-side { transform: none; }
  .astrid { position: relative; }
  .ast-thread { padding: 8px 16px 16px; }
  .ast-composer { padding: 8px 16px 16px; }
  .ast-action, .ast-sys { margin-left: 0; }
}

/* =====================================================================
   Astrid scroll fix + sidebar block polish
   Flex/grid children must be allowed to shrink (min-height/min-width:0)
   or the thread grows instead of scrolling once a message is added.
   ===================================================================== */
.astrid { overflow: hidden; min-height: 0; }
.ast-main { min-height: 0; min-width: 0; overflow: hidden; }
.ast-side { min-height: 0; }
.ast-list { min-height: 0; overscroll-behavior: contain; }
.ast-thread {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;              /* smooth scrolling fought the auto-scroll */
}
.ast-composer { flex: none; }
.ast-topbar { flex: none; }
.ast-welcome { margin: 6vh auto 0; }
.ast-msg, .ast-action { max-width: 820px; margin-left: auto; margin-right: auto; }
.ast-msg.astrid, .ast-sys { margin-left: auto; }
.ast-md { overflow-wrap: anywhere; }
.ast-bubble { overflow-wrap: anywhere; }

/* Sidebar blocks on small screens */
@media (max-width: 860px) {
  .brand .brand-meta { padding: 0 16px 12px; }
  .nav { padding: 16px; }
  .sidebar-foot { padding: 16px; }
}

/* =====================================================================
   Profile menu, split login, mobile menu (Oracle Redwood)
   ===================================================================== */

/* ---- profile block + its sub-tab menu ---- */
.sidebar-foot{position:relative}
.userbox{width:100%;display:flex;align-items:center;gap:12px;padding:12px;
  background:#fff;border:0;border-radius:var(--radius);box-shadow:var(--shadow-1);
  font:inherit;font-size:14px;text-align:left;color:var(--rw-bark-head);
  cursor:pointer;min-height:56px;transition:box-shadow .12s,background .12s}
.userbox:hover{box-shadow:var(--shadow-2)}
.userbox .av{width:36px;height:36px;border-radius:50%;background:var(--rw-air);
  color:var(--rw-bark-80);display:flex;align-items:center;justify-content:center;
  font-weight:500;flex:none;font-size:14px}
.userbox .ub-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.userbox .ub-name{font-weight:500;font-size:14px;line-height:20px;color:var(--rw-bark-head);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.userbox .ub-caret{width:18px;height:18px;flex:none;color:var(--rw-bark-40);
  transform:rotate(180deg);transition:transform .16s ease}
.sidebar-foot.open .userbox{background:var(--rw-air-2)}
.sidebar-foot.open .ub-caret{transform:none}

.user-menu{position:absolute;left:16px;right:16px;bottom:calc(100% - 8px);
  background:#fff;border-radius:var(--radius);box-shadow:var(--shadow-panel);
  padding:8px;display:none;z-index:60}
.sidebar-foot.open .user-menu{display:block;animation:rwMenuIn .14s ease}
@keyframes rwMenuIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.user-menu-item{width:100%;display:flex;align-items:center;gap:12px;min-height:40px;
  padding:8px 12px;border:0;background:transparent;border-radius:var(--radius-sm);
  font:inherit;font-size:14px;color:var(--rw-bark-80);text-align:left;cursor:pointer}
.user-menu-item:hover{background:var(--rw-air);color:var(--rw-bark-head)}
.user-menu-item.danger{color:var(--rw-red)}
.user-menu-item.danger:hover{background:var(--rw-red-tint)}
.user-menu-item svg{width:18px;height:18px;flex:none}

/* ---- split login with photograph ---- */
.login-wrap{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:1.15fr 1fr;
  align-items:stretch;justify-content:stretch;padding:0;background:var(--rw-air)}
.login-photo{position:relative;overflow:hidden;
  background:#1b2a33 url('/assets/login-photo.jpg') center/cover no-repeat}
.login-photo-veil{position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(48,45,42,.10) 0%,rgba(48,45,42,.55) 68%,rgba(48,45,42,.82) 100%)}
.login-photo-copy{position:relative;height:100%;display:flex;flex-direction:column;
  justify-content:flex-end;gap:16px;padding:48px}
.login-photo-logo{width:252px;max-width:70%;height:auto;display:block;border-radius:8px}
.login-photo-copy p{margin:0;color:rgba(255,255,255,.86);font-size:15px;line-height:24px;max-width:44ch}
.login-pane{display:flex;align-items:center;justify-content:center;padding:48px 24px;background:var(--rw-air)}
.login-card{background:#fff;border:0;border-radius:var(--radius-lg);box-shadow:var(--shadow-2);
  width:100%;max-width:400px;padding:40px}

/* ---- mobile menu ---- */
.nav-scrim{position:fixed;inset:0;background:rgba(22,21,19,.45);opacity:0;visibility:hidden;
  transition:opacity .2s ease,visibility .2s ease;z-index:45}
.nav-scrim.on{opacity:1;visibility:visible}
body.nav-locked{overflow:hidden}

@media (max-width:1024px){
  .login-wrap{grid-template-columns:1fr}
  .login-photo{display:none}
  .login-photo.mobile-band{display:block}
}
@media (max-width:860px){
  .sidebar{width:min(88vw,300px);transform:translateX(-102%);transition:transform .22s cubic-bezier(.22,.61,.36,1)}
  .sidebar.open{transform:none;box-shadow:var(--shadow-drawer)}
  .nav-scrim{display:block}
  .brand .brand-meta{padding:0 16px 12px}
  .user-menu{left:16px;right:16px}
  .topbar{position:sticky;top:0}
  .hamburger{display:inline-flex;align-items:center;justify-content:center;
    width:44px;height:44px;border-radius:var(--radius-sm)}
  .hamburger:hover{background:var(--rw-air)}
  .hamburger svg{width:22px;height:22px}
  .login-pane{padding:24px 16px;align-items:flex-start}
  .login-card{padding:24px;box-shadow:var(--shadow-1);margin-top:8px}
  .login-wrap{background:var(--rw-air)}
  .content{padding-bottom:32px}
  .toolbar{flex-wrap:wrap;gap:8px}
  .toolbar .btn{flex:1 1 auto}
  .dt-chips{overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap}
}
@media (min-width:861px){
  .nav-scrim{display:none}
}

/* Astrid on phones: rail becomes a slide-over, composer clears the keyboard */
@media (max-width:900px){
  .astrid{height:calc(100dvh - 108px)}
  .ast-topbar{gap:8px;padding:12px 16px}
  .ast-topbar .btn.sm{padding:0 10px}
  .ast-side{box-shadow:var(--shadow-drawer);z-index:5}
  .ast-composer-inner{padding:6px 6px 6px 14px}
  .ast-hint{display:none}
}

/* =====================================================================
   Hamburger tap-target hardening
   The scrim and the sticky top bar were able to sit over the button, and
   the icon SVG swallowed the tap. Both are fixed here.
   ===================================================================== */
.hamburger{position:relative;z-index:2;pointer-events:auto;-webkit-tap-highlight-color:transparent;
  touch-action:manipulation;flex:none}
.hamburger svg{pointer-events:none}
.hamburger:active{background:var(--rw-n-20)}
.topbar{z-index:30}
.topbar .flex{align-items:center;gap:8px;min-width:0}

/* Scrim must never intercept taps unless it is actually showing */
.nav-scrim{pointer-events:none}
.nav-scrim.on{pointer-events:auto}

@media (max-width:860px){
  .hamburger{display:inline-flex!important;align-items:center;justify-content:center;
    width:44px;height:44px;min-width:44px;min-height:44px;padding:0;
    border-radius:var(--radius-sm);background:transparent;color:var(--rw-bark-head)}
  .topbar{padding:8px 12px}
  h2#pageTitle{font-size:18px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* =====================================================================
   Dashboard: Sri Lanka clock, day/night orb, Ask Astrid, upcoming events
   ===================================================================== */
.dash-hero{display:grid;grid-template-columns:minmax(280px,1fr) minmax(280px,1.1fr);
  gap:16px;align-items:stretch;margin-bottom:16px}

/* --- time block --- */
.dash-when{display:flex;align-items:center;gap:16px;background:#fff;border-radius:var(--radius);
  box-shadow:var(--shadow-1);padding:20px 24px;min-height:104px}
.dash-orb{width:56px;height:56px;flex:none;border-radius:50%;display:flex;align-items:center;
  justify-content:center;position:relative;transition:background .4s ease,color .4s ease}
.dash-orb svg{width:28px;height:28px}
.dash-orb::after{content:'';position:absolute;inset:-6px;border-radius:50%;opacity:.35;
  background:inherit;filter:blur(10px);z-index:-1}
.dash-orb.morning{background:#FDF3E3;color:#B4761A}
.dash-orb.afternoon{background:#FBF0D8;color:#8A6116}
.dash-orb.evening{background:var(--rw-red-tint);color:var(--rw-red)}
.dash-orb.night{background:#EAEFF5;color:#3E5C86}
.dash-when-txt{min-width:0}
.dash-greet{font-size:15px;line-height:20px;color:var(--rw-bark-60)}
.dash-clock{display:flex;align-items:baseline;gap:8px;margin-top:2px}
.dash-clock #dashTime{font-size:30px;line-height:36px;font-weight:500;color:var(--rw-bark-head);
  font-variant-numeric:tabular-nums;letter-spacing:-.4px}
.dash-zone{font-size:12px;line-height:16px;color:var(--rw-bark-40);white-space:nowrap}
.dash-date{font-size:13px;line-height:18px;color:var(--rw-bark-60);margin-top:2px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* --- Ask Astrid prompt --- */
.astrid-prompt{display:flex;align-items:center;gap:14px;width:100%;min-height:104px;
  padding:20px 20px 20px 18px;background:#fff;border:1px solid transparent;border-radius:var(--radius);
  box-shadow:var(--shadow-1);cursor:pointer;font:inherit;text-align:left;position:relative;overflow:hidden;
  transition:box-shadow .16s ease,border-color .16s ease,transform .16s ease}
.astrid-prompt::before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.55;
  background:radial-gradient(120% 140% at 0% 0%,var(--rw-red-tint) 0%,rgba(255,255,255,0) 58%)}
.astrid-prompt:hover{box-shadow:var(--shadow-2);border-color:var(--rw-red-line)}
.astrid-prompt:active{transform:translateY(1px)}
.astrid-prompt>*{position:relative}
.ap-mark{width:40px;height:40px;flex:none;border-radius:50%;display:flex;align-items:center;
  justify-content:center;background:var(--rw-red);color:#fff;font-size:17px;font-weight:500;
  box-shadow:0 0 0 6px var(--rw-red-tint)}
.ap-text{flex:1;min-width:0;font-size:15px;line-height:22px;color:var(--rw-bark-60);
  transition:opacity .18s ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.astrid-prompt:hover .ap-text{color:var(--rw-bark-head)}
.ap-go{width:32px;height:32px;flex:none;border-radius:50%;display:flex;align-items:center;
  justify-content:center;background:var(--rw-air);color:var(--rw-bark-80);transition:background .16s,transform .16s}
.ap-go svg{width:18px;height:18px}
.astrid-prompt:hover .ap-go{background:var(--rw-red);color:#fff;transform:translateX(2px)}

/* --- dashboard split: recent invoices + upcoming --- */
.dash-split{display:grid;grid-template-columns:1.45fr 1fr;gap:16px;align-items:start}
.dash-split .panel{margin:0}
.dash-split .panel-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.dash-split .panel-head .muted{font-size:12px;color:var(--rw-bark-40)}

/* --- upcoming event rows --- */
.ev-list{display:flex;flex-direction:column;padding:8px}
.ev{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--radius-sm);
  text-decoration:none;color:inherit;min-height:56px;transition:background .12s}
.ev:hover{background:var(--rw-air)}
.ev-ico{width:36px;height:36px;flex:none;border-radius:8px;display:flex;align-items:center;
  justify-content:center;background:var(--rw-air);color:var(--rw-bark-80)}
.ev-ico svg{width:19px;height:19px}
.ev-ico.birthday{background:#F3EEF8;color:#6B4E9B}
.ev-ico.invoice{background:var(--rw-air-blue);color:var(--rw-info)}
.ev-ico.overdue{background:var(--rw-red-tint);color:var(--rw-red)}
.ev-ico.billing{background:#EDF5EF;color:var(--rw-success)}
.ev-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ev-title{font-size:14px;line-height:20px;color:var(--rw-bark-head);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev-sub{font-size:12px;line-height:16px;color:var(--rw-bark-40);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ev-when{flex:none;font-size:12px;line-height:18px;color:var(--rw-bark-60);
  background:var(--rw-air);border-radius:999px;padding:2px 10px;white-space:nowrap}
.ev-when.near{background:var(--rw-red-tint);color:var(--rw-red)}
.ev-list .empty{padding:24px 12px;text-align:center;color:var(--rw-bark-40);font-size:13px}

@media (max-width:1100px){
  .dash-hero{grid-template-columns:1fr}
  .dash-split{grid-template-columns:1fr}
}
@media (max-width:860px){
  .dash-when{padding:16px;gap:12px;min-height:0}
  .dash-orb{width:46px;height:46px}
  .dash-orb svg{width:24px;height:24px}
  .dash-clock #dashTime{font-size:26px;line-height:32px}
  .dash-date{font-size:12px}
  .astrid-prompt{min-height:0;padding:14px 14px 14px 12px;gap:12px}
  .ap-mark{width:36px;height:36px;font-size:15px;box-shadow:0 0 0 4px var(--rw-red-tint)}
  .ap-text{font-size:14px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .ev{padding:10px 8px}
  .ev-when{padding:2px 8px}
}
@media (prefers-reduced-motion:reduce){
  .ap-text,.ap-go,.astrid-prompt,.dash-orb{transition:none}
}


/* ============================================================
   ROUND 11 - brand bar, greeting, screen fades, glass login,
   Astrid rail fix
   ============================================================ */

/* ---- brand bar: matches the logo artwork background exactly ---- */
.brand{background:#5B5652;border-bottom:1px solid rgba(0,0,0,.16)}
.brand-lockup{display:block;padding:0;line-height:0}
.brand-lockup img{display:block;width:100%;height:auto}

/* the warm personal line under the logo */
.brand-meta{
  display:block;padding:10px 16px 12px;background:#5B5652;
  font-size:12.5px;line-height:1.45;color:rgba(255,255,255,.82);
  letter-spacing:.1px;min-height:18px;text-align:left}
.brand-meta.greet-in{animation:greetFade .5s ease both}
@keyframes greetFade{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:none}}

/* ---- screen fade in / out on login and logout ---- */
#root{transition:opacity .24s ease}
#root.screen-out{opacity:0}
#root.screen-in{animation:screenIn .42s ease both}
@keyframes screenIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---- glass login card over the photo ---- */
.login-pane{position:relative;background:transparent}
.login-card{
  background:rgba(255,255,255,.30);
  -webkit-backdrop-filter:blur(26px) saturate(150%);
  backdrop-filter:blur(26px) saturate(150%);
  border:1px solid rgba(255,255,255,.55);
  border-radius:16px;
  box-shadow:0 20px 60px rgba(22,21,19,.24),inset 0 1px 0 rgba(255,255,255,.65);
  color:var(--rw-bark)}
.login-card h1{color:var(--rw-bark-head)}
.login-card p{color:var(--rw-bark-80)}
.login-card label{color:var(--rw-bark-80)}
.login-card input{
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.75);
  color:var(--rw-bark)}
.login-card input:focus{
  background:rgba(255,255,255,.92);
  border-color:var(--rw-red);
  box-shadow:0 0 0 3px rgba(199,70,52,.18)}

/* soft tinted wash behind the pane so the glass has something to grab */
.login-pane::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(140deg,rgba(255,255,255,.34),rgba(255,255,255,.10))}
.login-card{position:relative;z-index:1}

/* Safari/Firefox without backdrop-filter still needs to be readable */
@supports not ((backdrop-filter:blur(2px)) or (-webkit-backdrop-filter:blur(2px))){
  .login-card{background:rgba(255,255,255,.86)}
}

/* ---- Astrid: the collapsed rail needs a real column to live in ---- */
/* Previously the collapsed grid was `0 1fr`, which clipped the unhide
   button to zero width and made it impossible to click. */
.astrid.side-collapsed{grid-template-columns:52px 1fr}
.astrid.side-collapsed .ast-rail{
  display:flex;position:relative;z-index:6;width:36px;height:36px;
  background:var(--rw-air-panel,#F9F9F9);border:1px solid var(--rw-n-10);
  box-shadow:var(--shadow-1)}
.astrid.side-collapsed .ast-rail:hover{
  background:var(--rw-red-tint);border-color:var(--rw-red-line);color:var(--rw-red)}

@media (max-width:900px){
  /* on mobile the drawer handles this, so the rail must not reserve space */
  .astrid.side-collapsed{grid-template-columns:1fr}
}


/* ============================================================
   ROUND 12 - Birthdays page styling (restored), dashboard
   greeting, full-bleed glass login
   ============================================================ */

/* ---------------- Birthdays page ---------------- */
.bd-top{display:grid;grid-template-columns:1.3fr 1fr;gap:16px;margin-bottom:16px}

.bd-switch{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:20px 24px;background:#fff;border:1px solid var(--rw-n-10);
  border-radius:var(--radius);box-shadow:var(--shadow-1);
  border-left:3px solid var(--rw-n-20);transition:border-color .18s ease,background .18s ease}
.bd-switch.on{border-left-color:var(--rw-red);background:var(--rw-red-tint)}
.bd-switch-txt{min-width:0}
.bd-switch-title{font-size:15px;font-weight:500;color:var(--rw-bark-head);margin-bottom:4px}
.bd-switch-sub{font-size:13px;line-height:19px;color:var(--rw-bark-60)}

/* toggle */
.switch{position:relative;display:inline-block;width:46px;height:26px;flex:0 0 auto}
.switch input{opacity:0;width:0;height:0;position:absolute}
.switch .slider{
  position:absolute;cursor:pointer;inset:0;background:var(--rw-n-20);
  border-radius:999px;transition:background .18s ease}
.switch .slider::before{
  content:"";position:absolute;height:20px;width:20px;left:3px;top:3px;
  background:#fff;border-radius:50%;transition:transform .18s ease;
  box-shadow:0 1px 3px rgba(22,21,19,.28)}
.switch input:checked + .slider{background:var(--rw-red)}
.switch input:checked + .slider::before{transform:translateX(20px)}
.switch input:focus-visible + .slider{box-shadow:0 0 0 3px rgba(199,70,52,.22)}
.switch input:disabled + .slider{opacity:.5;cursor:not-allowed}

.bd-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.bd-stat{
  background:#fff;border:1px solid var(--rw-n-10);border-radius:var(--radius);
  padding:16px;box-shadow:var(--shadow-1);display:flex;flex-direction:column;justify-content:center}
.bd-stat .label{font-size:11.5px;letter-spacing:.3px;color:var(--rw-bark-60);margin-bottom:6px}
.bd-stat .value{font-size:26px;font-weight:500;color:var(--rw-bark-head);line-height:1.1}
.bd-stat .value.sm{font-size:14px;font-weight:400;color:var(--rw-bark-80)}
.bd-stat.bad .value{color:var(--rw-danger)}
.bd-stat.bad{border-color:var(--rw-red-line);background:var(--rw-red-tint)}

.bd-form{padding:24px;display:flex;flex-direction:column;gap:16px}
.bd-form .f{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.bd-form .f > label{font-size:12.5px;color:var(--rw-bark-80);font-weight:500}
.bd-form textarea{
  width:100%;font:inherit;font-size:13.5px;line-height:21px;padding:12px 14px;
  border:1px solid var(--rw-n-20);border-radius:var(--radius-sm);
  background:var(--rw-air-2);color:var(--rw-bark);resize:vertical}
.bd-form textarea:focus,.bd-form input:focus{
  outline:0;border-color:var(--rw-red);background:#fff;
  box-shadow:0 0 0 3px rgba(199,70,52,.14)}
.bd-form .hint{font-size:12px;color:var(--rw-bark-60)}

.bd-checks{display:flex;flex-wrap:wrap;gap:16px;align-items:center;padding-top:4px}
.bd-checks .chk,.bd-form .chk{
  display:inline-flex;align-items:center;gap:8px;font-size:13.5px;
  color:var(--rw-bark-80);cursor:pointer;min-height:var(--tap,36px)}
.bd-checks .chk input,.bd-form .chk input{width:16px;height:16px;accent-color:var(--rw-red);cursor:pointer}

.ph-chips{display:flex;flex-wrap:wrap;gap:8px}
.ph-chip{
  border:1px solid var(--rw-n-20);background:var(--rw-air-2);color:var(--rw-bark-80);
  border-radius:999px;padding:6px 12px;font-size:12.5px;font-family:var(--font);
  cursor:pointer;transition:all .15s ease}
.ph-chip:hover{border-color:var(--rw-red);color:var(--rw-red);background:var(--rw-red-tint)}

.bd-preview{
  background:var(--rw-air);border:1px solid var(--rw-n-10);
  border-radius:var(--radius);padding:20px;display:flex;flex-direction:column;gap:12px}
.bd-preview-head{
  font-size:11.5px;letter-spacing:.4px;color:var(--rw-bark-60);
  text-transform:none;font-weight:500}
.bd-bubble{
  background:#fff;border:1px solid var(--rw-n-10);border-radius:14px 14px 14px 4px;
  padding:12px 16px;font-size:13.5px;line-height:21px;color:var(--rw-bark);
  max-width:520px;box-shadow:var(--shadow-1);white-space:pre-wrap;word-break:break-word}
.bd-preview-sub{font-size:13px;font-weight:500;color:var(--rw-bark-head)}
.bd-mail{
  background:#fff;border:1px solid var(--rw-n-10);border-radius:var(--radius-sm);
  padding:16px;font-size:13px;line-height:21px;color:var(--rw-bark-80);
  white-space:pre-wrap;word-break:break-word}

.bd-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:8px;
  border-top:1px solid var(--rw-n-10);margin-top:8px}
.bd-err{font-size:12.5px;color:var(--rw-danger);max-width:280px;word-break:break-word}
.bd-err .muted{color:var(--rw-bark-60)}

@media (max-width:1100px){
  .bd-top{grid-template-columns:1fr}
}
@media (max-width:860px){
  .bd-stats{grid-template-columns:1fr 1fr}
  .bd-stat:last-child{grid-column:1 / -1}
  .bd-form{padding:16px}
  .bd-switch{padding:16px}
}

/* ---------------- Dashboard greeting ---------------- */
.dash-hello{
  margin:0 0 20px;padding:0 0 14px;position:relative;
  font-size:clamp(22px,3.2vw,34px);line-height:1.22;font-weight:500;
  letter-spacing:-.4px;color:var(--rw-bark-head);max-width:36ch}
.dash-hello .dh-line{display:inline}
/* the different-coloured accent underneath the greeting */
.dash-hello::after{
  content:"";position:absolute;left:0;bottom:0;width:72px;height:4px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--rw-red) 0%,var(--rw-red) 55%,#4BA4DB 55%,#4BA4DB 100%)}
.dash-hello.greet-in{animation:helloIn .5s ease both}
@keyframes helloIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (max-width:860px){
  .dash-hello{font-size:22px;margin-bottom:16px;max-width:none}
}

/* ---------------- Login: full-bleed photo + glass panel ---------------- */
.login-wrap{
  min-height:100vh;min-height:100dvh;display:block;padding:0;position:relative;
  background:#1b2a33 url('/assets/login-photo.jpg') center/cover no-repeat fixed}
/* soft darkening so white text and the glass stay readable on any photo */
.login-wrap::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(22,21,19,.42) 0%,rgba(22,21,19,.18) 46%,rgba(22,21,19,0) 72%)}

.login-glass{
  position:relative;z-index:1;
  width:min(480px,100%);min-height:100vh;min-height:100dvh;
  display:flex;align-items:center;justify-content:center;padding:48px 40px;
  background:rgba(255,255,255,.16);
  -webkit-backdrop-filter:blur(30px) saturate(160%);
  backdrop-filter:blur(30px) saturate(160%);
  border-right:1px solid rgba(255,255,255,.28);
  box-shadow:0 0 70px rgba(22,21,19,.34)}
.lg-inner{width:100%;max-width:340px}
.lg-logo{
  width:104px;height:auto;display:block;margin:0 0 24px;
  filter:drop-shadow(0 4px 14px rgba(22,21,19,.30))}
.login-glass h1{
  font-size:27px;font-weight:500;line-height:1.2;margin:0 0 6px;
  color:#fff;text-shadow:0 1px 12px rgba(22,21,19,.42)}
.login-glass p{
  margin:0 0 28px;font-size:14px;line-height:21px;
  color:rgba(255,255,255,.90);text-shadow:0 1px 10px rgba(22,21,19,.38)}
.login-glass .f{display:flex;flex-direction:column;gap:7px;margin-bottom:18px}
.login-glass label{
  font-size:12.5px;font-weight:500;color:rgba(255,255,255,.94);
  text-shadow:0 1px 8px rgba(22,21,19,.34)}
.login-glass input{
  width:100%;font:inherit;font-size:14.5px;padding:13px 15px;
  border-radius:10px;color:#fff;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.36);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease}
.login-glass input::placeholder{color:rgba(255,255,255,.62)}
.login-glass input:focus{
  outline:0;background:rgba(255,255,255,.24);border-color:#fff;
  box-shadow:0 0 0 3px rgba(255,255,255,.22)}
/* Chrome autofill would otherwise paint an opaque yellow box */
.login-glass input:-webkit-autofill,
.login-glass input:-webkit-autofill:hover,
.login-glass input:-webkit-autofill:focus{
  -webkit-text-fill-color:#fff;
  -webkit-box-shadow:0 0 0 1000px rgba(80,80,80,.55) inset;
  caret-color:#fff;transition:background-color 9999s ease-out}
.login-glass .btn.primary{
  width:100%;justify-content:center;margin-top:8px;height:46px;
  font-size:14.5px;border-radius:10px;
  box-shadow:0 8px 24px rgba(199,70,52,.36)}

@supports not ((backdrop-filter:blur(2px)) or (-webkit-backdrop-filter:blur(2px))){
  .login-glass{background:rgba(30,28,26,.62)}
}

@media (max-width:860px){
  .login-wrap{
    background-attachment:scroll;
    display:flex;align-items:stretch;justify-content:center}
  .login-wrap::before{
    background:linear-gradient(180deg,rgba(22,21,19,.34),rgba(22,21,19,.52))}
  .login-glass{
    width:100%;min-height:100dvh;border-right:0;padding:32px 22px;
    align-items:center}
  .lg-inner{max-width:400px}
  .login-glass h1{font-size:24px}
  .lg-logo{width:88px;margin-bottom:20px}
}

/* ===================================================================
   ROUND 13 — Login: split layout, solid white panel on the right.
   Replaces the round-12 full-bleed glass treatment. These rules come
   last in the file, so they win over the earlier .login-wrap /
   .login-glass declarations (including the ones inside the older
   mobile media queries further up).
   =================================================================== */

.login-wrap {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
}

/* ---- Left: the photograph ---- */
.login-photo-side {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: url('/assets/login-photo.jpg') center center / cover no-repeat;
}
/* Gentle darkening at the foot so the wordmark always reads. */
.login-photo-side::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,21,19,0) 45%, rgba(22,21,19,.55) 100%);
  pointer-events: none;
}
.login-wordmark {
  position: absolute;
  left: 40px;
  bottom: 40px;
  z-index: 2;
  width: min(300px, 55%);
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.40));
}

/* ---- Right: the white sign-in panel ---- */
.login-panel {
  flex: 0 0 46%;
  max-width: 560px;
  min-width: 320px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  box-shadow: -1px 0 0 var(--rw-n-10);
}
.lp-inner { width: 100%; max-width: 380px; }

.login-panel h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--rw-bark-head);
}
.lp-sub {
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--rw-bark-60);
}

.login-panel .fld { display: block; margin: 0 0 16px; }
.login-panel .fld .lab {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--rw-bark-60);
}
.login-panel .fld input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--rw-bark);
  background: #fff;
  border: 1px solid var(--rw-n-10);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-panel .fld input:hover { border-color: var(--rw-bark-40); }
.login-panel .fld input:focus {
  border-color: var(--rw-red);
  box-shadow: 0 0 0 3px var(--rw-red-tint);
}
/* Chrome autofill would otherwise paint these pale yellow. */
.login-panel .fld input:-webkit-autofill,
.login-panel .fld input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--rw-bark);
  caret-color: var(--rw-bark);
}

.login-panel #loginBtn {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
}

/* ---- Privacy line ---- */
.lp-legal {
  margin: 24px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--rw-bark-40);
}
.lp-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--rw-red);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.lp-link:hover { color: var(--rw-red-hover); }
.lp-link:focus-visible {
  outline: 2px solid var(--rw-red);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Body copy inside the privacy drawer/modal. */
.legal-copy {
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--rw-bark-80);
}
.legal-copy p { margin: 0 0 12px; }
.legal-copy p:last-child { margin-bottom: 0; }

/* ---- Responsive: stack the photo above the panel ---- */
@media (max-width: 900px) {
  .login-wrap { flex-direction: column; background: #fff; }
  .login-photo-side { flex: 0 0 210px; min-height: 210px; }
  .login-wordmark { left: 24px; bottom: 24px; width: min(240px, 62%); }
  .login-panel {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    align-items: flex-start;
    padding: 32px 24px 40px;
    box-shadow: none;
  }
  .lp-inner { max-width: 440px; margin: 0 auto; }
  .login-panel h1 { font-size: 26px; }
  .lp-sub { margin-bottom: 24px; }
}

@media (max-width: 420px) {
  .login-photo-side { flex-basis: 160px; min-height: 160px; }
  .login-wordmark { left: 16px; bottom: 16px; }
  .login-panel { padding: 24px 16px 32px; }
}

/* ===================================================================
   ROUND 14
   a) Sri Lanka time block under the sidebar logo
   b) Desktop-only sidebar hide / unhide
   c) Larger Redwood display type on the login panel
   d) Soft grey username / password fields
   =================================================================== */

/* ---------- a) Sidebar clock ---------- */
.side-clock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--rw-air-2);
  border-bottom: 1px solid var(--rw-n-10);
  box-sizing: border-box;
}
.sc-orb {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rw-n-10);
  color: var(--rw-bark-60);
  transition: background .3s ease, color .3s ease;
}
.sc-orb svg { width: 18px; height: 18px; display: block; }
.sc-orb.morning   { background: #FDF2D6; color: #8A6116; }
.sc-orb.afternoon { background: #FCEBD2; color: #96591B; }
.sc-orb.evening   { background: var(--rw-red-tint); color: var(--rw-red); }
.sc-orb.night     { background: #E7EDF5; color: #2A6EBB; }

.sc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-top { display: flex; align-items: baseline; gap: 8px; }
.sc-time {
  font-size: 16px;
  font-weight: 600;
  color: var(--rw-bark-head);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.sc-part {
  font-size: 12.5px;
  color: var(--rw-bark-60);
  white-space: nowrap;
}
.sc-part::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rw-bark-40);
  vertical-align: middle;
  margin-right: 8px;
}
.sc-zone {
  font-size: 11.5px;
  color: var(--rw-bark-40);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- b) Desktop sidebar hide / unhide ---------- */
.side-toggle {
  display: none;                 /* enabled on desktop only, below */
  background: none;
  border: none;
  cursor: pointer;
  color: var(--rw-bark-60);
  border-radius: var(--radius-sm);
  padding: 8px;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}
.side-toggle svg { width: 20px; height: 20px; display: block; }
.side-toggle:hover { background: var(--rw-n-10); color: var(--rw-bark-head); }
.side-toggle:focus-visible { outline: 2px solid var(--rw-red); outline-offset: 1px; }

@media (min-width: 861px) {
  .side-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar { transition: transform .22s ease; }
  .main    { transition: margin-left .22s ease; }
  .app.side-hidden .sidebar { transform: translateX(-100%); }
  .app.side-hidden .main    { margin-left: 0; }
  /* Flip the glyph so it reads as "bring the panel back". */
  .app.side-hidden .side-toggle svg { transform: scaleX(-1); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .main { transition: none; }
}

/* Mobile keeps the hamburger drawer: make sure a stale hidden state
   can never strand the sidebar off-screen on a small viewport. */
@media (max-width: 860px) {
  .side-toggle { display: none !important; }
  .app.side-hidden .sidebar { transform: none; }
  .app.side-hidden .main { margin-left: 0; }
}

/* ---------- c) Login display type (Redwood scale) ---------- */
.login-panel h1 {
  font-size: clamp(34px, 3.2vw, 46px);
  line-height: 1.1;
  font-weight: 400;              /* Redwood keeps display type light */
  letter-spacing: -.02em;
  color: var(--rw-bark-head);
  margin: 0 0 12px;
}
.lp-sub {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--rw-bark-60);
  margin: 0 0 36px;
}
.lp-inner { max-width: 400px; }

/* ---------- d) Soft grey fields ---------- */
.login-panel .fld .lab {
  font-size: 13px;
  font-weight: 400;
  color: var(--rw-bark-40);
  letter-spacing: .01em;
}
.login-panel .fld input {
  background: var(--rw-air);
  border: 1px solid transparent;
  color: var(--rw-bark);
  height: 50px;
  font-size: 15px;
}
.login-panel .fld input::placeholder { color: var(--rw-bark-40); }
.login-panel .fld input:hover { background: var(--rw-n-10); border-color: transparent; }
.login-panel .fld input:focus {
  background: #fff;
  border-color: var(--rw-red);
  box-shadow: 0 0 0 3px var(--rw-red-tint);
}
.login-panel .fld input:-webkit-autofill,
.login-panel .fld input:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px var(--rw-air) inset;
  -webkit-text-fill-color: var(--rw-bark);
}
.login-panel .fld input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 3px var(--rw-red-tint);
}

@media (max-width: 900px) {
  .login-panel h1 { font-size: clamp(28px, 7vw, 36px); }
  .lp-sub { font-size: 16px; margin-bottom: 28px; }
}

/* ===================================================================
   ROUND 15 — Astrid: motion + interaction feedback
   The page had no transitions, so every click felt dead. Redwood keeps
   motion short and functional: 120-220ms, ease-out, small distances.
   =================================================================== */

@keyframes astRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes astPop  { from { opacity: 0; transform: scale(.96); }      to { opacity: 1; transform: none; } }

/* ---- Collapsing the chat history now animates instead of snapping ---- */
.astrid {
  transition: grid-template-columns .22s cubic-bezier(.2,.7,.3,1);
}
.ast-side {
  transition: opacity .18s ease;
  will-change: opacity;
}
.astrid.side-collapsed .ast-side { opacity: 0; }
.astrid.side-collapsed .ast-rail { animation: astPop .18s ease both; }

/* The rail (unhide) button needs to sit above the panel edge so it can
   always be clicked, whatever the collapse state. */
.ast-rail { position: relative; z-index: 5; }

/* ---- Buttons: real press feedback everywhere on the page ---- */
.astrid .btn,
.ast-collapse,
.ast-rail,
.ast-ico,
.ast-sugg,
.ast-side-toggle {
  transition: background-color .15s ease, color .15s ease,
              box-shadow .15s ease, transform .08s ease, border-color .15s ease;
}
.astrid .btn:active,
.ast-collapse:active,
.ast-rail:active,
.ast-ico:active,
.ast-sugg:active,
.ast-side-toggle:active { transform: translateY(1px) scale(.985); }

.astrid .btn:focus-visible,
.ast-collapse:focus-visible,
.ast-rail:focus-visible,
.ast-ico:focus-visible,
.ast-sugg:focus-visible,
.ast-side-toggle:focus-visible {
  outline: 2px solid var(--rw-red);
  outline-offset: 2px;
}

/* ---- Conversation rows ---- */
.ast-item {
  transition: background-color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.ast-item:hover { background: rgba(0,0,0,.035); }
.ast-item:active { transform: translateY(1px); }
.ast-item-acts { transition: opacity .15s ease; }
.ast-ico:hover { background: rgba(0,0,0,.06); }
.ast-ico.danger:hover { background: var(--rw-red-tint); color: var(--rw-red); }

/* ---- Messages arrive with a short rise ---- */
.ast-msg, .ast-sys, .ast-welcome { animation: astRise .22s ease both; }
.ast-welcome .ast-mark { animation: astPop .28s ease both; }

/* Stagger the starter prompts so the empty state feels alive. */
.ast-sugg { animation: astRise .24s ease both; }
.ast-sugg:nth-child(1) { animation-delay: .02s; }
.ast-sugg:nth-child(2) { animation-delay: .06s; }
.ast-sugg:nth-child(3) { animation-delay: .10s; }
.ast-sugg:nth-child(4) { animation-delay: .14s; }
.ast-sugg:nth-child(5) { animation-delay: .18s; }
.ast-sugg:nth-child(n+6) { animation-delay: .22s; }
.ast-sugg:hover {
  background: #fff;
  border-color: var(--rw-bark-40);
  box-shadow: var(--shadow-1);
}

/* ---- Composer ---- */
.ast-composer-inner { transition: border-color .15s ease, box-shadow .15s ease; }
.ast-composer-inner:focus-within {
  border-color: var(--rw-red);
  box-shadow: 0 0 0 3px var(--rw-red-tint);
}
.ast-send { transition: background-color .15s ease, transform .08s ease; }
.ast-send:active { transform: scale(.94); }

/* ---- Thinking dots actually bounce ---- */
@keyframes astBlink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-3px); }
}
.ast-typing i { animation: astBlink 1.1s infinite ease-in-out; }
.ast-typing i:nth-child(2) { animation-delay: .16s; }
.ast-typing i:nth-child(3) { animation-delay: .32s; }

/* ---- Modal: fade the backdrop, lift the dialog ---- */
@keyframes rwModalBg { from { opacity: 0; } to { opacity: 1; } }
@keyframes rwModalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-bg { animation: rwModalBg .14s ease both; }
.modal-bg .modal { animation: rwModalIn .18s cubic-bezier(.2,.7,.3,1) both; }

/* Capability list inside the "What can Astrid do?" dialog. */
.ast-cap-group { margin-top: 16px; }
.ast-cap-group:first-of-type { margin-top: 8px; }
.ast-cap-head {
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--rw-bark-40);
  margin-bottom: 6px;
}
.ast-cap-list {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--rw-bark-80);
  font-size: 14px;
  line-height: 1.6;
}
.ast-cap-list li { margin: 2px 0; }

@media (prefers-reduced-motion: reduce) {
  .astrid, .ast-side, .ast-item, .astrid .btn { transition: none; }
  .ast-msg, .ast-sys, .ast-welcome, .ast-sugg,
  .ast-welcome .ast-mark, .astrid.side-collapsed .ast-rail,
  .modal-bg, .modal-bg .modal { animation: none; }
  .ast-typing i { animation: none; opacity: .6; }
}

/* ===================================================================
   ROUND 16 — Sidebar clock: squared indicator + firmer spacing
   =================================================================== */

/* Square tile instead of a circle — a Redwood block, softly rounded. */
.sc-orb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);   /* 6px: a square, not a pill */
  flex: 0 0 36px;
}
.sc-orb svg { width: 19px; height: 19px; }

/* Spacing had been leaning entirely on flex `gap`, which left the time,
   the status word and the zone label running together. Give each part
   its own explicit spacing so they can never collide. */
.side-clock { align-items: center; gap: 14px; }
.sc-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sc-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.25;
}
.sc-time { margin: 0 2px 0 0; }
.sc-part { margin: 0; line-height: 1.25; }
.sc-part::before { margin: 0 8px 0 0; }
.sc-zone { display: block; margin-top: 1px; line-height: 1.3; }

/* ===================================================================
   ROUND 17 — Filter bar, result summary and inactive badges
   Redwood: flat, no harsh borders, 8px grid, Bark text on Air surfaces.
   =================================================================== */

/* Filter toolbars wrap gracefully once several controls are present. */
.toolbar.filters {
  flex-wrap: wrap;
  row-gap: 8px;
  align-items: center;
}
.toolbar.filters select,
.toolbar.filters input[type="number"] {
  height: 38px;
  background: var(--rw-air);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--rw-bark-80);
  font-family: var(--font);
  font-size: 14px;
  padding: 0 10px;
  transition: background .14s ease-out, border-color .14s ease-out, box-shadow .14s ease-out;
}
.toolbar.filters select:hover,
.toolbar.filters input[type="number"]:hover { background: var(--rw-n-10); }
.toolbar.filters select:focus,
.toolbar.filters input[type="number"]:focus {
  outline: none;
  background: #fff;
  border-color: var(--rw-red);
  box-shadow: 0 0 0 3px var(--rw-red-tint);
}

/* "Active students only" style checkbox — a proper tap target, not a bare box. */
.filter-chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--rw-air);
  color: var(--rw-bark-80);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background .14s ease-out, color .14s ease-out;
}
.filter-chk:hover { background: var(--rw-n-10); }
.filter-chk input { width: 16px; height: 16px; accent-color: var(--rw-red); cursor: pointer; margin: 0; }
.filter-chk:focus-within { box-shadow: 0 0 0 3px var(--rw-red-tint); }

/* Result count strip that sits between the filters and the table. */
.filter-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 16px;
  padding: 0 2px;
  font-size: 13px;
  color: var(--rw-bark-60);
}
.filter-summary strong { color: var(--rw-bark-head); font-weight: 600; }
.filter-summary .fs-due { color: var(--rw-danger); }
.filter-summary .fs-sep {
  width: 1px; height: 12px;
  background: var(--rw-n-10);
  display: inline-block;
}

/* Quiet note explaining that former students were left out. */
.filter-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--rw-air-blue);
  color: var(--rw-bark-80);
  font-size: 13px;
}
.filter-note::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rw-info);
  flex: 0 0 6px;
}

/* Neutral badge for a former student appearing in a list. */
.badge.muted-badge {
  background: var(--rw-n-10);
  color: var(--rw-bark-60);
  font-weight: 500;
}

@media (max-width: 860px) {
  .toolbar.filters select,
  .toolbar.filters input[type="number"] { flex: 1 1 auto; min-width: 120px; }
  .filter-chk { flex: 1 1 100%; justify-content: flex-start; }
}

/* ===================================================================
   ROUND 19 — Sidebar clock rebuilt as a Redwood block
   The day/night indicator is now a full-height panel filling a quarter
   of the bar, not a small floating tile. A date line sits above the
   time. Appended last so it supersedes the round-14 and round-16 rules.
   =================================================================== */

.side-clock {
  display: flex;
  align-items: stretch;      /* the indicator spans the whole bar height */
  gap: 0;
  padding: 0;                /* padding moves inside the text column */
  min-height: 78px;
  background: var(--rw-air-2);
  border-bottom: 1px solid var(--rw-n-10);
  box-sizing: border-box;
  overflow: hidden;
}

/* A quarter of the bar, floor to ceiling. */
.sc-orb {
  flex: 0 0 25%;
  width: 25%;
  height: auto;
  min-height: 100%;
  border-radius: 0;
  border-right: 1px solid var(--rw-n-10);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .35s ease, color .35s ease;
}
.sc-orb svg { width: 24px; height: 24px; display: block; }

/* Text column: 8px grid, 16px inset from the indicator, 24px from the edge. */
.sc-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 14px 24px 14px 16px;
  box-sizing: border-box;
}

/* Date sits above the time — "Mon, Aug 4". */
.sc-date {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--rw-bark-40);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Time keeps its established size; the status word sits beside it. */
.sc-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.25;
}
.sc-time { font-size: 16px; font-weight: 600; margin: 0 2px 0 0; }
.sc-part { margin: 0; line-height: 1.25; }
.sc-part::before { margin: 0 8px 0 0; }
.sc-zone { display: block; margin-top: 1px; line-height: 1.3; }

/* Tone the whole panel, not just a swatch. */
.sc-orb.morning   { background: #FDF2D6; color: #8A6116; }
.sc-orb.afternoon { background: #FCEBD2; color: #96591B; }
.sc-orb.evening   { background: var(--rw-red-tint); color: var(--rw-red); }
.sc-orb.night     { background: #E7EDF5; color: #2A6EBB; }

@media (prefers-reduced-motion: reduce) {
  .sc-orb { transition: none; }
}
