/* Babul Khairat · presentation system. Order: tokens, primitives, components,
   layouts, responsive, accessibility. No workflow selectors changed.
   body.ui-2026 specificity deliberately outranks the earlier institutional theme. */
:root {
  --color-primary:#08765d; --color-primary-strong:#075b48;
  --surface-base:#f3f7f5; --surface-section:#f8fbfa; --surface-raised:#fff;
  --border-default:#d7e2dc; --text-primary:#16231f; --text-secondary:#52655d;
  --success:#087052; --warning:#80560b; --danger:#a72e38; --info:#2458a9;
  --font-body:'DM Sans',system-ui,sans-serif;
  --font-heading:'Plus Jakarta Sans',system-ui,sans-serif;
  --type-display:clamp(32px,4vw,48px); --type-h1:clamp(24px,2.3vw,32px);
  --type-h2:22px; --type-h3:18px; --type-title:16px; --type-body:15px;
  --type-body-small:14px; --type-label:14px; --type-caption:12px; --type-metadata:12px;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px;
  --space-5:20px; --space-6:24px; --space-8:32px; --space-10:40px;
  --space-12:48px; --space-16:64px;
  --radius-control:12px; --radius-panel:18px; --radius-dialog:24px;
  --shadow-panel:0 2px 8px rgb(20 56 46 / 4%);
  --shadow-overlay:0 20px 64px rgb(12 47 38 / 18%);
  --sidebar-width:260px; --page-gutter:24px; --content-width:1440px;
  --motion-fast:160ms; --motion-component:220ms;
  --ui26-ease:cubic-bezier(.2,.78,.24,1);
  /* Compatibility aliases consumed by existing presentation components. */
  --ui26-ink:var(--text-primary); --ui26-muted:var(--text-secondary);
  --ui26-primary:var(--color-primary); --ui26-primary-strong:var(--color-primary-strong);
  --ui26-primary-soft:#e7f7f1; --ui26-primary-soft-2:#f1fbf7;
  --ui26-gold:#80560b; --ui26-gold-soft:#fff4d9;
  --ui26-blue:var(--info); --ui26-blue-soft:#edf4ff;
  --ui26-danger:var(--danger); --ui26-danger-soft:#fff0f0;
  --ui26-surface:var(--surface-raised); --ui26-surface-2:var(--surface-section);
  --ui26-canvas:var(--surface-base); --ui26-line:var(--border-default);
  --ui26-line-strong:#b6c8bf; --ui26-shadow-sm:var(--shadow-panel);
  --ui26-shadow:0 8px 24px rgb(20 56 46 / 8%); --ui26-shadow-float:var(--shadow-overlay);
  --ui26-radius-sm:var(--radius-control); --ui26-radius:var(--radius-panel);
  --ui26-radius-lg:var(--radius-dialog);
  --ink:var(--text-primary); --muted:var(--text-secondary);
  --line:var(--border-default); --canvas:var(--surface-base); --surface:var(--surface-raised);
}
html { background:var(--surface-base); scroll-padding-top:88px }
body { font-family:var(--font-body); font-size:var(--type-body); line-height:1.55 }
body.ui-modern-islamic,body.ui-2026 { background:var(--surface-base); color:var(--text-primary) }
body.ui-2026 :is(button,input,select,textarea) { font-family:inherit }
body.ui-2026 :is(.app-content,.dashboard,.panel,.page-heading>div,.module-toolbar>*,.topbar__start) { min-width:0 }
body.ui-2026 :is(.page-heading h1,.login-card h2) { font:700 var(--type-h1)/1.25 var(--font-heading); letter-spacing:-.025em; overflow-wrap:anywhere }
body.ui-2026 :is(.panel__header h2,.content-card h2) { font:700 var(--type-h3)/1.35 var(--font-heading) }
body.ui-2026 :is(.page-heading p,.form-note,.alert,.empty-state,.login-card>.muted) { font-size:var(--type-body-small); line-height:1.6 }
body.ui-2026 :is(.eyebrow,.nav-heading,.room-switcher__label,.topbar__date,.badge,.table-footer,.ui26-export-note) { font-size:var(--type-caption); line-height:1.5 }
body.ui-2026 :is(.field label,.form-field label,.report-filters label>span,.range-filter label>span) { font-size:var(--type-label); line-height:1.5; text-transform:none; letter-spacing:normal }
body.ui-2026 :is(.field__error,.import-intro small,.import-progress__step small,.report-metric>small,.report-trend__item small) { font-size:var(--type-caption) }
body.ui-2026 :is(.report-metric>span,.report-breakdown__head,.report-breakdown__head b) { font-size:var(--type-body-small) }
body.ui-2026 :is(.panel,.stat-card,.portal-room-card,.role-panel,.content-card) {
  border:1px solid var(--border-default); border-radius:var(--radius-panel);
  background:var(--surface-raised); box-shadow:var(--shadow-panel);
}
body.ui-2026 .page-heading { min-height:0; height:auto; position:relative; overflow:visible; border:0; border-radius:0; padding:0 0 var(--space-6); background:none; box-shadow:none; gap:var(--space-6) }
body.ui-2026 .page-heading:before,body.ui-2026 .page-heading:after { content:none }
body.ui-2026 .page-heading .page-actions { flex-wrap:wrap; gap:var(--space-2); min-width:0 }
body.ui-2026 :is(.stat-card,.content-card,.setup-checklist-item):hover { transform:none; box-shadow:var(--shadow-panel) }
body.ui-2026 .portal-room-card { transition:border-color var(--motion-fast),box-shadow var(--motion-fast) }
body.ui-2026 .portal-room-card:hover { border-color:var(--color-primary); box-shadow:var(--ui26-shadow) }
/* Controls: text fields deliberately exclude checkbox/radio/hidden inputs. */
body.ui-2026 :is(.button,.icon-button,.attendance-choice,.student-picker__trigger) {
  min-height:44px; border-radius:var(--radius-control); font-size:var(--type-body-small);
  gap:var(--space-2); -webkit-tap-highlight-color:transparent;
  transition:background-color var(--motion-fast),border-color var(--motion-fast),box-shadow var(--motion-fast);
}
body.ui-2026 .button { padding:10px 16px; font-weight:600; line-height:1.4; box-shadow:none; white-space:normal; text-align:center }
body.ui-2026 .button--primary,body.ui-2026 .button--login,body.ui-2026 .button--success { background:var(--color-primary); border:1px solid var(--color-primary); color:#fff }
body.ui-2026 .button--primary:hover,body.ui-2026 .button--login:hover { background:var(--color-primary-strong) }
body.ui-2026 .button--secondary { background:#fff; border:1px solid #b6c8bf; color:var(--text-primary) }
body.ui-2026 .button--tertiary,body.ui-2026 .button--ghost { background:transparent; border:1px solid transparent; color:var(--color-primary-strong) }
body.ui-2026 .button--info { background:var(--info); border:1px solid var(--info); color:#fff }
body.ui-2026 .button--download,body.ui-2026 .button--warning { background:var(--ui26-gold-soft); border:1px solid #d6b875; color:var(--warning) }
body.ui-2026 .button--danger { background:var(--danger); border:1px solid var(--danger); color:#fff }
body.ui-2026 :is(.button,.icon-button):disabled { opacity:.55; cursor:not-allowed; transform:none; box-shadow:none }
body.ui-2026 .button[aria-busy=true] { cursor:progress }
body.ui-2026 .icon-button { width:44px; height:44px; flex-shrink:0; background:var(--surface-raised); border:1px solid var(--border-default); box-shadow:none }
body.ui-2026 .icon { width:20px; height:20px; flex-shrink:0; stroke-width:1.8 }
body.ui-2026 :is(.field,.form-field,.auth-form,.report-filters,.range-filter,.module-toolbar) :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea),body.ui-2026 .student-picker__trigger {
  min-height:44px; max-width:100%; border:1px solid #b6c8bf; border-radius:var(--radius-control);
  background:#fff; color:var(--text-primary); font-size:var(--type-body-small); padding:10px 12px;
}
body.ui-2026 textarea { font:inherit; line-height:1.6 }
body.ui-2026 input::placeholder,body.ui-2026 textarea::placeholder { color:#61756b; opacity:1 }
body.ui-2026 :is(input,select,textarea)[aria-invalid=true],body.ui-2026 input.field--invalid { border-color:var(--danger) }
body.ui-2026 .search-box { min-width:0; min-height:44px; border:1px solid #b6c8bf; border-radius:var(--radius-control); background:#fff; box-shadow:none }
body.ui-2026 .module-toolbar .search-box input[type=search] { width:100%; min-width:0; border:0; background:transparent; box-shadow:none }
body.ui-2026 .search-box:focus-within { outline:2px solid var(--color-primary); outline-offset:2px }
body.ui-2026 :is(.button,.icon-button,.nav-link,a,input,select,textarea,button):focus-visible { outline:3px solid var(--color-primary); outline-offset:3px }
body.ui-2026 .sidebar :focus-visible { outline-color:#f7d67d }
body.ui-2026 .form-note { border:1px solid var(--border-default); border-radius:var(--radius-control); background:var(--surface-section); padding:var(--space-4) }
body.ui-2026 .form-note.is-error { background:var(--ui26-danger-soft); color:var(--danger) }
body.ui-2026 .form-note.is-success { background:var(--ui26-primary-soft); color:var(--success) }
/* Navigation + shell. Match the existing drawer breakpoint (1020px). */
body.ui-2026 .app-shell { grid-template-columns:var(--sidebar-width) minmax(0,1fr) }
body.ui-2026 .sidebar { width:var(--sidebar-width); background:#064e3d; box-shadow:none; padding:20px 16px; overflow-y:auto }
body.ui-2026 .sidebar:before,body.ui-2026 .sidebar:after { content:none }
body.ui-2026 .sidebar__nav { flex:1 0 auto }
body.ui-2026 .nav-link { min-height:44px; height:auto; padding:10px 12px; font-size:14px; border-radius:12px; transform:none }
body.ui-2026 .nav-link:hover { transform:none; background:rgb(255 255 255 / 9%) }
body.ui-2026 .nav-link.is-active { color:#173e32; background:#f6dfa4; box-shadow:none; border-color:transparent }
body.ui-2026 .room-switcher__button { border-radius:12px; background:rgb(255 255 255 / 8%) }
body.ui-2026 .room-switcher strong { font-size:14px }
body.ui-2026 :is(.room-switcher small,.sidebar__support small,.brand small) { font-size:12px }
body.ui-2026 .sidebar__support strong { font-size:13px }
body.ui-2026 .topbar { min-height:72px; height:auto; padding:12px var(--page-gutter); gap:16px; background:#fff; border-bottom:1px solid var(--border-default); box-shadow:none; backdrop-filter:none }
body.ui-2026 .topbar__start { min-width:0 }
body.ui-2026 .topbar__room { font:700 15px/1.4 var(--font-heading) }
body.ui-2026 .dashboard { width:100%; max-width:var(--content-width); padding:var(--space-6) var(--page-gutter) 96px; margin-inline:auto }
body.ui-2026 :is(.dashboard-grid,.report-grid) { gap:var(--space-6); min-width:0 }
body.ui-2026 .module-toolbar { display:flex; flex-wrap:wrap; gap:12px; padding:16px; background:var(--surface-section); border-radius:18px 18px 0 0; backdrop-filter:none }
body.ui-2026 .toolbar-filters { display:flex; flex-wrap:wrap; gap:12px; min-width:0 }
body.ui-2026 .toolbar-filters select { min-width:0; min-height:44px }
/* One account layout, including export inserted by existing runtime. */
body.ui-2026 [data-account-manager] .module-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:'search export' 'filters filters' 'note note'; align-items:center }
body.ui-2026 [data-account-manager] .search-box { grid-area:search; width:100% }
body.ui-2026 [data-account-manager] .ui26-account-export { grid-area:export; width:auto; white-space:nowrap; background:var(--ui26-primary-soft); border:1px solid #b6d9ca; color:var(--color-primary-strong) }
body.ui-2026 [data-account-manager] .toolbar-filters { grid-area:filters; width:auto; justify-self:end }
body.ui-2026 [data-account-manager] .toolbar-filters select { width:150px }
body.ui-2026 .ui26-export-note { grid-area:note; margin:0; color:var(--text-secondary) }
.ui26-account-export svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
/* Data density: contain wide tables without dropping columns or changing semantics. */
body.ui-2026 .table-wrap { max-width:100%; overflow:auto; overscroll-behavior-inline:contain; background:#fff; border-radius:0 0 18px 18px }
body.ui-2026 .data-table { font-size:14px }
body.ui-2026 .data-table :is(th,td) { padding:12px 16px; font-size:14px; line-height:1.5; border-bottom-color:#e5ece8 }
body.ui-2026 .data-table thead th { color:var(--text-secondary); background:var(--surface-section); font-weight:700; text-transform:none; letter-spacing:normal }
body.ui-2026 .data-table tbody.ui-2026 tr:hover { background:#f3faf6 }
body.ui-2026 .data-table :is(small,.person-cell small) { font-size:12px }
body.ui-2026 .badge { line-height:1.5; box-shadow:none }
body.ui-2026 .badge--success { background:var(--ui26-primary-soft); color:var(--success) }
body.ui-2026 .badge--warning { background:var(--ui26-gold-soft); color:var(--warning) }
body.ui-2026 .badge--info { background:var(--ui26-blue-soft); color:var(--info) }
body.ui-2026 .table-footer { flex-wrap:wrap; gap:12px; padding:16px }
body.ui-2026 .report-filters { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; padding:16px }
body.ui-2026 .report-metric-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px }
body.ui-2026 .range-filter { flex-wrap:wrap }
/* Overlays and attendance retain all existing open/close and status hooks. */
body.ui-2026 :is(.form-modal__panel,.onboarding-modal__panel) { max-height:calc(100dvh - 48px); overflow:auto; overscroll-behavior:contain; border-radius:var(--radius-dialog); border:1px solid var(--border-default); box-shadow:var(--shadow-overlay); animation:ui26-modal-in .22s var(--ui26-ease) both }
body.ui-2026 .form-modal__header { background:#fff }
body.ui-2026 :is(.bulk-attendance__row,.attendance-row) { border:1px solid var(--border-default); border-radius:var(--radius-panel); background:#fff; padding:16px; margin-bottom:12px; gap:12px; box-shadow:none }
body.ui-2026 .attendance-choice { min-width:44px; font-size:14px }
body.ui-2026 .attendance-choice__face { min-height:44px; font-size:14px; border-radius:var(--radius-control) }
body.ui-2026 .attendance-choice input:checked + .attendance-choice__face { border:2px solid var(--color-primary); background:var(--ui26-primary-soft); color:var(--color-primary-strong) }
body.ui-2026 .attendance-choice.is-active,body.ui-2026 .attendance-choice[aria-checked=true] { border-color:var(--color-primary); background:var(--ui26-primary-soft); color:var(--color-primary-strong); box-shadow:inset 0 0 0 1px var(--color-primary); font-weight:700 }
body.ui-2026 .login-panel { background:#fff }
body.ui-2026 .login-visual { background:#064e3d }
body.ui-2026 .login-panel__footer { position:static; margin-top:32px; text-align:center; font-size:12px }
body.ui-2026 .password-toggle { min-height:44px; top:2px; font-size:12px }
body.ui-2026 .login-help :is(strong,p,a) { font-size:13px }

/* PWA install and feedback */
.ui26-install-chip[hidden],.ui26-toast[hidden]{display:none!important}
.ui26-install-chip{position:fixed;right:20px;bottom:20px;z-index:80;display:flex;align-items:center;gap:10px;padding:11px 15px 11px 12px;border-radius:18px;border:1px solid #cfe5dc;background:rgba(255,255,255,.92);backdrop-filter:blur(4px);color:#075f4a;box-shadow:var(--ui26-shadow);font-weight:800;cursor:pointer;animation:ui26-rise .4s var(--ui26-ease) both}
.ui26-install-chip__icon{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:var(--ui26-primary-soft);color:var(--ui26-primary)}
.ui26-install-chip:hover{transform:translateY(-2px);box-shadow:var(--ui26-shadow-float)}
.ui26-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:10000;max-width:min(520px,calc(100vw - 32px));padding:13px 16px;border-radius:16px;background:#163c32;color:#fff;box-shadow:var(--ui26-shadow-float);font-size:13px;line-height:1.45;animation:ui26-toast-in .18s var(--ui26-ease) both}


/* Responsive layout: 1280 full toolbar; 1020 drawer; 760 compact; 430 small. */
@media(min-width:1280px) {
  body.ui-2026 [data-account-manager] .module-toolbar { grid-template-columns:minmax(0,1fr) auto auto; grid-template-areas:'search export filters' 'note note note' }
}
@media(max-width:1020px) {
  body.ui-2026 .app-shell { display:block }
  body.ui-2026 .sidebar { width:min(300px,calc(100vw - 48px)) }
  body.ui-2026 .page-heading { flex-direction:column; align-items:stretch }
  body.ui-2026 .page-heading .page-actions { display:flex; width:100% }
  body.ui-2026 .report-metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
}
@media(max-width:760px) {
  :root { --page-gutter:16px; --radius-panel:16px }
  body.ui-2026 .dashboard { padding-top:20px }
  body.ui-2026 .ui26-account-table { min-width:0; width:100% }
  body.ui-2026 .ui26-account-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%) }
  body.ui-2026 .ui26-account-table tbody { display:block }
  body.ui-2026 .ui26-account-table .ui26-account-record { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; padding:16px; border-bottom:1px solid var(--border-default) }
  body.ui-2026 .ui26-account-record td { display:block; width:auto; max-width:none; padding:6px 0; border:0; white-space:normal; overflow-wrap:anywhere }
  body.ui-2026 .ui26-account-record td::before { display:block; margin-bottom:4px; content:attr(data-ui26-label); color:var(--text-secondary); font-size:12px; font-weight:600 }
  body.ui-2026 .ui26-account-record td:first-child,body.ui-2026 .ui26-account-record td:last-child { grid-column:1/-1 }
  body.ui-2026 .ui26-account-record td>* { min-width:0; max-width:100% }
  body.ui-2026 .ui26-account-record td .button { justify-self:start }

  body.ui-2026 .topbar { gap:8px; padding-block:12px }
  body.ui-2026 .topbar__actions { gap:8px }
  body.ui-2026 .page-heading { padding-bottom:20px }
  body.ui-2026 .page-heading .page-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px }
  body.ui-2026 .page-actions .button { width:100%; min-width:0 }
  body.ui-2026 .page-actions .button:first-child { grid-column:1/-1 }
  body.ui-2026 .module-toolbar { flex-direction:column; align-items:stretch }
  body.ui-2026 .toolbar-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100% }
  body.ui-2026 .toolbar-filters select { width:100% }
  body.ui-2026 [data-account-manager] .module-toolbar { grid-template-columns:minmax(0,1fr); grid-template-areas:'search' 'export' 'filters' 'note' }
  body.ui-2026 [data-account-manager] .toolbar-filters { width:100%; justify-self:stretch }
  body.ui-2026 [data-account-manager] .toolbar-filters select { width:100% }
  body.ui-2026 [data-account-manager] .ui26-account-export { width:100%; white-space:normal }
  body.ui-2026 :is(.field,.form-field,.auth-form,.report-filters,.range-filter,.module-toolbar) :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { font-size:16px }
  body.ui-2026 .button { min-height:48px }
  body.ui-2026 :is(.form-modal__panel,.onboarding-modal__panel) { max-height:calc(100dvh - 24px); border-radius:20px 20px 0 0 }
  .ui26-install-chip { right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); max-width:calc(100vw - 24px) }
}
@media(max-width:430px) {
  body.ui-2026 .report-metric-grid { gap:12px }
  body.ui-2026 .report-filters { grid-template-columns:minmax(0,1fr) }
  body.ui-2026 .page-heading .page-actions { grid-template-columns:minmax(0,1fr) }
  body.ui-2026 .login-panel { padding:24px 20px }
}
@keyframes ui26-rise { from {opacity:0;transform:translateY(6px)} to {opacity:1;transform:none} }
@keyframes ui26-modal-in { from {opacity:0;transform:translateY(10px)} to {opacity:1;transform:none} }
@keyframes ui26-toast-in { from {opacity:0} to {opacity:1} }
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition:none!important }
}
@media(forced-colors:active) {
  body.ui-2026 :is(.button,.icon-button,.attendance-choice,.badge) { border:1px solid ButtonText }
  body.ui-2026 .nav-link.is-active { outline:2px solid Highlight }
}
