/* ==========================================================================
   SantriApp Demo — Interactive app stylesheet
   Light teal theme, matching the SantriApp / NgajiKu application tokens.
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f2f9f6;
  --bg-2: #e7f4ef;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-2: #f0f9f6;
  --card: #ffffff;
  --card-2: #f5fbf9;
  --border: rgba(15, 92, 82, 0.13);
  --border-strong: rgba(15, 92, 82, 0.22);
  --text: #0a2a26;
  --muted: #5f7f7a;
  --muted-strong: #35524d;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #14b8a6;
  --primary-ink: #0b6b5f;
  --on-primary: #ffffff;
  --income: #059669;
  --income-ink: #047857;
  --expense: #e11d48;
  --expense-ink: #be123c;
  --warn: #d97706;
  --warn-ink: #b45309;
  --info: #0284c7;
  --info-ink: #0369a1;
  --indigo: #4f46e5;
  --indigo-ink: #4338ca;
  --pink-ink: #be185d;
  --chip: #e6f3ef;
  --input-bg: #ffffff;
  --input-border: #cadfd9;
  --focus-ring: rgba(15, 118, 110, 0.16);
  --shadow: 0 18px 44px -28px rgba(8, 58, 52, 0.46);
  --shadow-soft: 0 8px 22px -18px rgba(8, 58, 52, 0.38);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 10px 30px -24px rgba(8, 58, 52, 0.5);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 12px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --glow-1: rgba(20, 184, 166, 0.2);
  --glow-2: rgba(45, 212, 191, 0.16);
  --glow-3: rgba(5, 150, 105, 0.12);
  --glow-4: rgba(125, 211, 252, 0.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(760px 560px at 6% -8%, var(--glow-1), transparent 62%),
    radial-gradient(620px 520px at 98% 2%, var(--glow-2), transparent 64%),
    radial-gradient(680px 560px at 42% 108%, var(--glow-3), transparent 66%),
    radial-gradient(520px 440px at 92% 94%, var(--glow-4), transparent 68%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 58%, var(--bg) 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: rgba(15, 118, 110, 0.2); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 118, 110, 0.22); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 118, 110, 0.4); }

.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.hide { display: none !important; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.tone-teal { color: var(--primary-ink); }
.tone-success { color: var(--income-ink); }
.tone-danger { color: var(--expense-ink); }
.tone-warn { color: var(--warn-ink); }
.tone-info { color: var(--info-ink); }
.tone-indigo { color: var(--indigo-ink); }
.tone-muted { color: var(--muted); }

/* ==========================================================================
   Shell
   ========================================================================== */
#app { position: relative; overflow-x: clip; min-height: 100dvh; }
.app-shell { display: block; }
.app-sidebar { display: none; }
.app-col { min-width: 0; }
.app-statusbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 16px; font-size: 11px; color: var(--muted-strong);
  background: var(--surface); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
}
.app-statusbar .live-dot {
  width: 7px; height: 7px; border-radius: 999px; background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14); display: inline-block;
}
.status-right { display: inline-flex; align-items: center; gap: 7px; }
.app-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 11px 16px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
}
.header-left { order: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-right { order: 2; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-title {
  margin: 0; font-size: 18px; line-height: 1.2; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), #0d9488);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.header-eyebrow { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.header-search {
  order: 3; flex-basis: 100%; position: relative;
  padding-top: 9px; border-top: 1px solid var(--border);
}
.search-box { position: relative; display: flex; align-items: center; }
.search-box > .ico { position: absolute; left: 12px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search-box input {
  width: 100%; border: 1px solid var(--input-border); background: var(--input-bg);
  border-radius: 12px; padding: 9px 12px 9px 36px; font-size: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 50px -24px rgba(8, 58, 52, .35); overflow: hidden;
  max-height: 320px; overflow-y: auto;
}
.search-group { padding: 9px 12px 4px; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-ink); }
.search-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; font-size: 12px; }
.search-item:hover { background: var(--surface-2); }
.search-item small { display: block; color: var(--muted); font-size: 10px; }
.search-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--border);
  background: #fff; color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
  transition: .15s;
}
.icon-btn:hover { color: var(--expense-ink); border-color: rgba(225, 29, 72, .25); }
.user-name { font-size: 11px; color: var(--muted); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.json-pill {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid rgba(5, 150, 105, .24);
  background: rgba(5, 150, 105, .07); color: var(--income-ink);
  border-radius: 999px; padding: 4px 8px; font-size: 9px; font-weight: 800; letter-spacing: .08em;
}
.json-pill i { width: 6px; height: 6px; border-radius: 999px; background: #10b981; display: inline-block; }

main#screen-content { padding: 16px 16px 112px; min-width: 0; animation: fadeUp .24s ease both; }
.page { display: flex; flex-direction: column; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.divider { height: 1px; background: var(--border); border: 0; margin: 2px 0; }

/* Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 32rem; z-index: 40;
  background: rgba(255, 255, 255, .95); border-top: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));
}
.bnav-side { display: flex; justify-content: space-around; flex: 1 1 0; }
.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 9px; font-weight: 600; padding: 5px 2px; border: 0; background: transparent;
  min-width: 48px;
}
.bnav-item .ico { width: 20px; height: 20px; }
.bnav-item.active { color: var(--primary-ink); }
.bnav-center-wrap { flex: 0 0 auto; padding: 0 10px; display: flex; justify-content: center; margin-top: -26px; }
.bnav-center {
  width: 56px; height: 56px; border-radius: 999px; border: 4px solid var(--bg);
  background: linear-gradient(135deg, #0d9488, #14b8a6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 28px -12px rgba(13, 148, 136, .7);
  transition: transform .12s;
}
.bnav-center:active { transform: scale(.94); }
.bnav-center .ico { width: 25px; height: 25px; }
.bnav-badge {
  position: absolute; transform: translate(15px, -14px); min-width: 16px; height: 16px;
  border-radius: 999px; background: var(--expense); color: #fff; font-size: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.more-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px; border-radius: 14px; border: 1px solid var(--border);
  background: #fff; color: var(--muted-strong); font-size: 10px; font-weight: 600;
}
.more-item .ico { width: 22px; height: 22px; color: var(--primary-ink); }
.more-item:active { transform: scale(.97); }
.fab {
  position: fixed; right: 18px; bottom: 96px; z-index: 25;
  width: 48px; height: 48px; border-radius: 999px; border: 0;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 16px 30px -14px rgba(15, 118, 110, .8);
}
.fab .ico { width: 24px; height: 24px; }

/* ==========================================================================
   Buttons / badges / chips
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid transparent;
  font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap;
  transition: transform .12s, background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 24px -16px rgba(15, 118, 110, .9); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--muted-strong); }
.btn-ghost:hover { border-color: rgba(15, 118, 110, .35); color: var(--text); }
.btn-soft { background: rgba(15, 118, 110, .09); border-color: rgba(15, 118, 110, .18); color: var(--primary-ink); }
.btn-danger { background: var(--expense); color: #fff; }
.btn-danger-soft { background: rgba(225, 29, 72, .09); border-color: rgba(225, 29, 72, .24); color: var(--expense-ink); }
.btn-warn { background: rgba(217, 119, 6, .1); border-color: rgba(217, 119, 6, .26); color: var(--warn-ink); }
.btn-success { background: rgba(5, 150, 105, .1); border-color: rgba(5, 150, 105, .28); color: var(--income-ink); }
.btn-sm { min-height: 31px; padding: 0 10px; border-radius: 9px; font-size: 11px; }
.btn-xs { min-height: 26px; padding: 0 8px; border-radius: 8px; font-size: 10px; }
.btn-block { width: 100%; }
.btn-icon { min-width: 38px; padding: 0; }
.btn-icon.btn-sm { min-width: 31px; }
.btn .ico { width: 16px; height: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .04em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-success { background: rgba(5, 150, 105, .09); color: var(--income-ink); border-color: rgba(5, 150, 105, .22); }
.badge-warn { background: rgba(217, 119, 6, .1); color: var(--warn-ink); border-color: rgba(217, 119, 6, .24); }
.badge-danger { background: rgba(225, 29, 72, .09); color: var(--expense-ink); border-color: rgba(225, 29, 72, .22); }
.badge-info { background: rgba(2, 132, 199, .09); color: var(--info-ink); border-color: rgba(2, 132, 199, .2); }
.badge-teal { background: rgba(15, 118, 110, .09); color: var(--primary-ink); border-color: rgba(15, 118, 110, .2); }
.badge-indigo { background: rgba(79, 70, 229, .08); color: var(--indigo-ink); border-color: rgba(79, 70, 229, .2); }
.badge-muted { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--border); background: #fff;
  color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 11px; font-weight: 600;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip:hover:not(.active) { border-color: rgba(15, 118, 110, .35); color: var(--primary-ink); }

.segmented {
  display: flex; gap: 4px; padding: 4px; border-radius: 14px;
  border: 1px solid var(--border); background: #fff;
}
.segmented button {
  flex: 1 1 0; border: 0; background: transparent; color: var(--muted);
  border-radius: 10px; padding: 8px 10px; font-size: 11px; font-weight: 700;
}
.segmented button.active { background: var(--primary); color: #fff; box-shadow: 0 8px 16px -12px rgba(15, 118, 110, .8); }

/* ==========================================================================
   Cards / banner / stats / sections
   ========================================================================== */
.card {
  background: linear-gradient(180deg, #fff, var(--card-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 14px; }
.banner {
  position: relative; overflow: hidden;
  border: 1px solid rgba(15, 118, 110, .2); border-radius: var(--radius-lg);
  padding: 16px; background:
    radial-gradient(420px 240px at 100% 0%, rgba(20, 184, 166, .16), transparent 65%),
    linear-gradient(135deg, rgba(15, 118, 110, .1), rgba(255, 255, 255, .35) 60%, rgba(255, 255, 255, .8));
  box-shadow: var(--shadow-card);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.banner::after {
  content: ''; position: absolute; right: -30px; bottom: -60px; width: 150px; height: 150px;
  border-radius: 999px; border: 1px solid rgba(15, 118, 110, .12);
  pointer-events: none;
}
.banner-text { min-width: 0; position: relative; z-index: 1; }
.banner h2 { margin: 2px 0 0; font-size: 18px; line-height: 1.2; letter-spacing: -.03em; }
.banner p { margin: 5px 0 0; color: var(--muted); font-size: 11px; max-width: 60ch; }
.eyebrow { font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-ink); }
.banner-portal { background:
  radial-gradient(420px 240px at 0% 100%, rgba(20, 184, 166, .2), transparent 60%),
  linear-gradient(135deg, rgba(15, 118, 110, .16), rgba(255, 255, 255, .7)); }
.banner-warm { background:
  radial-gradient(420px 240px at 100% 0%, rgba(217, 119, 6, .18), transparent 65%),
  linear-gradient(135deg, rgba(217, 119, 6, .1), rgba(255, 255, 255, .7)); border-color: rgba(217, 119, 6, .24); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card {
  padding: 13px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, var(--card-2)); box-shadow: var(--shadow-card);
  min-width: 0;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 600; }
.stat-ico { width: 26px; height: 26px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(15, 118, 110, .08); }
.stat-ico .ico { width: 15px; height: 15px; }
.stat-ico.tone-success { background: rgba(5, 150, 105, .09); }
.stat-ico.tone-warn { background: rgba(217, 119, 6, .1); }
.stat-ico.tone-info { background: rgba(2, 132, 199, .09); }
.stat-ico.tone-indigo { background: rgba(79, 70, 229, .08); }
.stat-value { display: block; margin-top: 5px; font-size: 23px; line-height: 1.1; font-weight: 800; letter-spacing: -.04em; }
.stat-value.sm { font-size: 18px; }
.stat-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.section-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 14px 0; }
.section-head h3 { margin: 0; font-size: 13px; letter-spacing: -.01em; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.section-card > .section-body, .section-body { padding: 13px 14px 14px; }
.section-card > .divider { margin: 12px 14px 0; }

.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.metric { text-align: center; padding: 10px 6px; border-radius: 13px; border: 1px solid var(--border); background: linear-gradient(180deg, #fff, var(--card-2)); }
.metric span { display: block; font-size: 9px; color: var(--muted); }
.metric strong { display: block; margin-top: 3px; font-size: 17px; letter-spacing: -.03em; }

.notice { display: flex; gap: 9px; padding: 11px 12px; border-radius: 13px; font-size: 11px; line-height: 1.5; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted-strong); }
.notice .ico { width: 17px; height: 17px; margin-top: 1px; }
.notice-warn { background: rgba(217, 119, 6, .07); border-color: rgba(217, 119, 6, .22); color: #7c4a06; }
.notice-danger { background: rgba(225, 29, 72, .06); border-color: rgba(225, 29, 72, .2); color: #8c1631; }
.notice-info { background: rgba(2, 132, 199, .06); border-color: rgba(2, 132, 199, .18); color: #075985; }

/* ==========================================================================
   Form
   ========================================================================== */
.field { display: block; }
.label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--input-border); background: var(--input-bg);
  color: var(--text); border-radius: 11px; padding: 9px 10px; font-size: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 74px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.input::placeholder, .textarea::placeholder { color: #93aaa5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b8a84 50%), linear-gradient(135deg, #6b8a84 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.hint { display: block; margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.form-grid { display: grid; gap: 9px; }
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.form-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 15px; height: 15px; }
.check-row { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 11px; cursor: pointer; }
.check-row:hover { border-color: rgba(15, 118, 110, .35); }
.modal-actions { display: flex; gap: 8px; padding-top: 4px; }
.modal-actions .btn { flex: 1 1 0; }

/* ==========================================================================
   Lists / tables / progress
   ========================================================================== */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: flex; align-items: center; gap: 10px; padding: 11px;
  border: 1px solid var(--border); border-radius: 13px; background: #fff;
}
.list-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.list-title { margin: 0; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.list-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.avatar {
  width: 36px; height: 36px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex: 0 0 auto;
  background: rgba(15, 118, 110, .09); border: 1px solid rgba(15, 118, 110, .22); color: var(--primary-ink);
}
.avatar-p { background: rgba(219, 39, 119, .08); border-color: rgba(219, 39, 119, .2); color: var(--pink-ink); }
.avatar-sm { width: 29px; height: 29px; font-size: 9px; }

.progress { height: 7px; border-radius: 999px; background: rgba(15, 92, 82, .09); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .35s ease; }
.progress-success i { background: var(--income); }
.progress-warn i { background: var(--warn); }
.progress-danger i { background: var(--expense); }
.progress-info i { background: var(--info); }
.progress-indigo i { background: var(--indigo); }
.progress-sm { height: 5px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 11px; }
table.data thead th { text-align: left; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid rgba(15, 92, 82, .07); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(15, 118, 110, .025); }
.table-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 12px; }

.ring-wrap { display: flex; align-items: center; gap: 12px; }
.ring {
  width: 64px; height: 64px; border-radius: 999px; flex: 0 0 auto;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), rgba(15, 92, 82, .1) 0);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.ring::before { content: ''; position: absolute; inset: 6px; border-radius: 999px; background: #fff; }
.ring span { position: relative; font-family: var(--mono); font-size: 16px; font-weight: 800; letter-spacing: -.05em; }
.ring span small { font-size: 8px; }
.ring-wrap strong { display: block; font-size: 11px; }
.ring-wrap small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 14px; color: var(--muted); text-align: center; font-size: 11px; }
.empty .ico { width: 28px; height: 28px; opacity: .55; }

/* ==========================================================================
   Calendar & session
   ========================================================================== */
.calendar-card { padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-head strong { font-size: 13px; }
.cal-nav { display: flex; gap: 5px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 5px; }
.cal-weekdays span { text-align: center; font-size: 8px; font-weight: 800; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  min-height: 44px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  padding: 5px 4px; text-align: left; display: flex; flex-direction: column; justify-content: space-between;
  transition: .15s; position: relative;
}
.cal-day:hover { border-color: rgba(15, 118, 110, .4); }
.cal-day strong { font-size: 10px; font-weight: 700; }
.cal-day small { display: block; font-size: 7.5px; color: var(--primary-ink); font-weight: 700; }
.cal-day.has-sesi { background: rgba(15, 118, 110, .07); border-color: rgba(15, 118, 110, .24); }
.cal-day.today { box-shadow: 0 0 0 1.5px rgba(217, 119, 6, .8) inset; }
.cal-day.today strong { color: var(--warn-ink); }
.cal-day.empty-day { border-color: transparent; background: transparent; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: 8.5px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; background: rgba(15, 118, 110, .14); border: 1px solid rgba(15, 118, 110, .3); display: inline-block; }

.sesi-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.sesi-tab { flex: 0 0 auto; border: 1px solid var(--border); background: #fff; color: var(--muted); border-radius: 999px; padding: 6px 11px; font-size: 10px; font-weight: 700; }
.sesi-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sesi-layout { display: flex; flex-direction: column; gap: 14px; }
.sesi-side { display: flex; flex-direction: column; gap: 12px; }
.sesi-main { min-width: 0; }
.sesi-banner { background:
  radial-gradient(380px 220px at 100% 0%, rgba(20, 184, 166, .18), transparent 65%),
  linear-gradient(135deg, rgba(15, 118, 110, .13), rgba(255, 255, 255, .65));
  border: 1px solid rgba(15, 118, 110, .22); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-card);
}
.sesi-banner h2 { margin: 2px 0 0; font-size: 18px; letter-spacing: -.03em; }
.sesi-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sesi-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 11px; }
.sesi-metric { background: #fff; border: 1px solid var(--border); border-radius: 11px; padding: 8px; }
.sesi-metric span { display: block; font-size: 8.5px; color: var(--muted); }
.sesi-metric strong { display: block; margin-top: 2px; font-size: 15px; letter-spacing: -.03em; }
.sesi-actions { display: flex; gap: 7px; margin-top: 10px; }
.sesi-actions .btn { flex: 1 1 0; }

.roster-grid { display: grid; gap: 9px; }
.roster-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-card); }
.roster-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
.roster-name { font-size: 12px; font-weight: 700; line-height: 1.25; }
.roster-sub { margin-top: 2px; font-size: 9px; color: var(--muted); }
.abs-buttons { display: flex; gap: 4px; overflow-x: auto; margin-top: 9px; padding-bottom: 1px; }
.abs-btn {
  flex: 1 0 auto; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--muted); border-radius: 8px; padding: 6px 7px; font-size: 9px; font-weight: 700;
}
.abs-btn.active.abs-hadir, .abs-btn.active.abs-terlambat { background: rgba(5, 150, 105, .11); border-color: rgba(5, 150, 105, .4); color: var(--income-ink); box-shadow: 0 0 0 1px rgba(5, 150, 105, .35) inset; }
.abs-btn.active.abs-izin { background: rgba(217, 119, 6, .12); border-color: rgba(217, 119, 6, .42); color: var(--warn-ink); box-shadow: 0 0 0 1px rgba(217, 119, 6, .35) inset; }
.abs-btn.active.abs-sakit { background: rgba(2, 132, 199, .11); border-color: rgba(2, 132, 199, .38); color: var(--info-ink); box-shadow: 0 0 0 1px rgba(2, 132, 199, .32) inset; }
.abs-btn.active.abs-alfa { background: rgba(225, 29, 72, .1); border-color: rgba(225, 29, 72, .38); color: var(--expense-ink); box-shadow: 0 0 0 1px rgba(225, 29, 72, .32) inset; }
.roster-actions { display: flex; gap: 5px; margin-top: 8px; }
.roster-action { flex: 1 1 0; border: 1px solid var(--border); background: #fff; color: var(--muted-strong); border-radius: 9px; padding: 7px 4px; font-size: 9.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.roster-action.infaq-lunas { background: rgba(5, 150, 105, .09); border-color: rgba(5, 150, 105, .3); color: var(--income-ink); }
.roster-action .ico { width: 13px; height: 13px; }
.session-closed { opacity: .72; }
.session-closed .abs-btn, .session-closed .roster-action { pointer-events: none; }

/* Heatmap sholat */
.heat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat-day {
  min-height: 38px; border-radius: 9px; border: 1px solid var(--border); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 9px; color: var(--muted);
}
.heat-day b { font-family: var(--mono); font-size: 9px; }
.heat-day small { font-size: 7px; opacity: .8; }
.heat-day.h1 { background: rgba(15, 118, 110, .12); border-color: rgba(15, 118, 110, .25); color: var(--primary-ink); }
.heat-day.h3 { background: rgba(15, 118, 110, .55); border-color: rgba(15, 118, 110, .7); color: #fff; }
.heat-day.h5 { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 800; }
.heat-day.today { box-shadow: 0 0 0 1.5px rgba(217, 119, 6, .85) inset; }
.heat-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 8.5px; color: var(--muted); }
.heat-legend i { width: 9px; height: 9px; border-radius: 3px; border: 1px solid var(--border); display: inline-block; }
.sholat-form { padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: #fff; }
.waktu-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.waktu-item { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px; padding: 8px 3px; font-size: 8px; font-weight: 700; text-transform: capitalize; cursor: pointer; }
.waktu-item:has(input:checked) { background: rgba(15, 118, 110, .1); border-color: rgba(15, 118, 110, .35); color: var(--primary-ink); }

/* ==========================================================================
   Modal & toast
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
  padding: 0; background: rgba(8, 47, 43, .38); backdrop-filter: blur(8px) saturate(120%);
  opacity: 0; transition: opacity .18s ease;
}
.modal-overlay.show { opacity: 1; }
.modal {
  width: 100%; max-height: 92dvh; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border);
  border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px -20px rgba(8, 58, 52, .4);
  transform: translateY(18px); transition: transform .2s ease; overflow: hidden;
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal.sm { max-width: 380px; }
.modal.lg { max-width: 760px; }
.modal.xl { max-width: 980px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 13px 15px 11px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fff, var(--card-2)); }
.modal-title-wrap { min-width: 0; }
.modal-head h3 { margin: 0; font-size: 14px; letter-spacing: -.02em; }
.modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.modal-x { border: 1px solid var(--border); background: #fff; color: var(--muted); border-radius: 9px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.modal-x .ico { width: 15px; height: 15px; }
.modal-body { padding: 14px 15px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.confirm-box { display: flex; gap: 11px; padding: 12px; border-radius: 13px; background: rgba(217, 119, 6, .06); border: 1px solid rgba(217, 119, 6, .18); font-size: 12px; line-height: 1.55; }
.confirm-box.danger { background: rgba(225, 29, 72, .05); border-color: rgba(225, 29, 72, .18); }
.confirm-box p { margin: 0; }
.confirm-ico { width: 30px; height: 30px; border-radius: 999px; background: rgba(217, 119, 6, .12); color: var(--warn-ink); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.confirm-box.danger .confirm-ico { background: rgba(225, 29, 72, .1); color: var(--expense-ink); }
.confirm-ico .ico { width: 17px; height: 17px; }

#toast-container { position: fixed; top: 14px; right: 12px; left: 12px; z-index: 3000; display: flex; flex-direction: column; gap: 9px; pointer-events: none; max-width: 380px; margin-left: auto; }
.toast {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border-radius: 13px;
  background: rgba(30, 41, 59, .96); color: #fff; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px); font-size: 11.5px; line-height: 1.45; pointer-events: auto;
  animation: toastIn .22s ease both;
}
.toast-ico { color: #5eead4; margin-top: 1px; }
.toast-ico .ico { width: 17px; height: 17px; }
.toast-success .toast-ico { color: #6ee7b7; }
.toast-error .toast-ico { color: #fda4af; }
.toast-warning .toast-ico { color: #fcd34d; }
.toast-text { flex: 1 1 auto; }
.toast-x { border: 0; background: transparent; color: rgba(255, 255, 255, .55); padding: 0; }
.toast-x .ico { width: 14px; height: 14px; }
.toast-out { animation: toastOut .2s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   Hafalan modal
   ========================================================================== */
.haf-tabs { display: flex; gap: 5px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.haf-tabs button { flex: 1 1 0; border: 0; background: transparent; color: var(--muted); padding: 7px 8px; border-radius: 9px; font-size: 10px; font-weight: 700; }
.haf-tabs button.active { background: #fff; color: var(--primary-ink); box-shadow: var(--shadow-soft); }
.haf-surah { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; background: #fff; }
.haf-surah + .haf-surah { margin-top: 6px; }
.haf-surah-head { width: 100%; border: 0; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; text-align: left; font-size: 11px; font-weight: 700; }
.haf-surah-head small { color: var(--muted); font-size: 9px; font-weight: 500; }
.haf-ayat-grid { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 9px 10px; border-top: 1px solid var(--border); background: var(--surface-2); }
.haf-leaf { display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-size: 9.5px; color: var(--muted-strong); cursor: pointer; }
.haf-leaf.passed { background: rgba(5, 150, 105, .08); border-color: rgba(5, 150, 105, .28); color: var(--income-ink); }
.haf-leaf input { width: 13px; height: 13px; }
.haf-footer { border-top: 1px solid var(--border); padding: 11px 0 0; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

/* Wizard */
.wizard-steps { display: flex; gap: 5px; margin-bottom: 3px; }
.wizard-step { flex: 1 1 0; height: 5px; border-radius: 999px; background: rgba(15, 92, 82, .1); }
.wizard-step.active { background: var(--primary); }
.wizard-day-row { display: flex; flex-wrap: wrap; gap: 5px; }
.day-chip { border: 1px solid var(--border); background: #fff; color: var(--muted); border-radius: 8px; padding: 6px 9px; font-size: 9.5px; font-weight: 700; }
.day-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pick-list { max-height: 210px; overflow-y: auto; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.pick-item { display: flex; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 10px; }
.pick-item input { flex: 0 0 auto; }
.pick-item .nis { margin-left: auto; color: var(--muted); font-size: 8.5px; }

/* ==========================================================================
   Login
   ========================================================================== */
.login-page { min-height: 100dvh; display: flex; flex-direction: column; }
.login-brand-panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center;
  padding: 28px 22px; border-bottom: 1px solid var(--border);
  background:
    radial-gradient(600px 420px at 0% 0%, rgba(20, 184, 166, .28), transparent 60%),
    radial-gradient(500px 400px at 100% 100%, rgba(13, 148, 136, .18), transparent 65%),
    linear-gradient(155deg, #0b4f4a 0%, #0f766e 52%, #115e59 100%);
  color: #fff;
}
.login-brand-panel::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .4; pointer-events: none;
}
.login-brand-inner { position: relative; z-index: 1; max-width: 480px; }
.login-logo { display: flex; align-items: center; gap: 11px; }
.login-logo .brand-mark { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #ccfbf1; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.login-logo .brand-mark .ico { width: 25px; height: 25px; }
.login-logo h1 { margin: 0; font-size: 23px; letter-spacing: -.04em; }
.login-logo p { margin: 2px 0 0; font-size: 10px; color: rgba(255, 255, 255, .66); }
.login-copy { margin-top: 26px; }
.login-copy h2 { margin: 0; font-size: clamp(24px, 5vw, 36px); line-height: 1.1; letter-spacing: -.04em; font-weight: 800; }
.login-copy h2 em { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; color: #a7f3d0; }
.login-copy p { margin: 12px 0 0; color: rgba(255, 255, 255, .72); font-size: 12px; line-height: 1.65; max-width: 44ch; }
.login-features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.login-feature { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16); font-size: 9.5px; color: rgba(255, 255, 255, .85); }
.login-feature .ico { width: 13px; height: 13px; color: #99f6e4; }
.login-card-wrap { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 24px 16px 38px; }
.login-card { width: 100%; max-width: 370px; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 26px 60px -34px rgba(8, 58, 52, .5); padding: 20px; }
.login-card-head { text-align: center; margin-bottom: 16px; }
.login-card-head .mark { width: 52px; height: 52px; border-radius: 16px; background: rgba(15, 118, 110, .09); border: 1px solid rgba(15, 118, 110, .22); color: var(--primary-ink); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.login-card-head .mark .ico { width: 26px; height: 26px; }
.login-card-head h2 { margin: 0; font-size: 18px; letter-spacing: -.03em; }
.login-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.login-form { display: flex; flex-direction: column; gap: 10px; }
.login-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.login-quick button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 8px 5px; font-size: 9px; font-weight: 700; color: var(--muted-strong); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.login-quick button .ico { width: 16px; height: 16px; color: var(--primary-ink); }
.login-quick button:hover { border-color: rgba(15, 118, 110, .35); }
.login-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 9px; line-height: 1.6; }
.login-hint { display: flex; gap: 6px; align-items: flex-start; padding: 8px 9px; border-radius: 10px; background: rgba(15, 118, 110, .05); border: 1px solid rgba(15, 118, 110, .14); color: var(--muted-strong); font-size: 9.5px; }

/* ==========================================================================
   Rapor print
   ========================================================================== */
.rapor-toolbar { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: space-between; }
.rapor-sheet { background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.rapor-header { background: linear-gradient(135deg, #0b4f4a, #0f766e); color: #fff; padding: 20px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; position: relative; overflow: hidden; }
.rapor-header::after { content: ''; position: absolute; right: -40px; top: -60px; width: 160px; height: 160px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); }
.rapor-brand { display: flex; gap: 10px; align-items: center; position: relative; z-index: 1; }
.rapor-brand .mark { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; }
.rapor-brand .mark .ico { width: 22px; height: 22px; }
.rapor-brand h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.rapor-brand p { margin: 3px 0 0; font-size: 9px; color: rgba(255,255,255,.68); }
.rapor-title { text-align: right; position: relative; z-index: 1; }
.rapor-title strong { display: block; font-size: 12px; }
.rapor-title span { display: block; margin-top: 3px; font-size: 9px; color: rgba(255,255,255,.7); }
.rapor-body { padding: 16px; display: flex; flex-direction: column; gap: 13px; }
.rapor-identity { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; padding: 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.rapor-identity div span { display: block; font-size: 8.5px; color: var(--muted); }
.rapor-identity div strong { display: block; margin-top: 2px; font-size: 11px; }
.rapor-kpis { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.rapor-kpi { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border); background: #fff; }
.rapor-kpi span { display: block; font-size: 8.5px; color: var(--muted); }
.rapor-kpi strong { display: block; margin-top: 2px; font-size: 17px; letter-spacing: -.03em; }
.rapor-block { border: 1px solid var(--border); border-radius: 12px; padding: 11px; }
.rapor-block h4 { margin: 0 0 8px; font-size: 11px; display: flex; align-items: center; gap: 5px; }
.rapor-block h4 .ico { width: 14px; height: 14px; color: var(--primary-ink); }
.rapor-2col { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.rapor-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; padding: 4px 0; border-bottom: 1px dashed rgba(15, 92, 82, .1); }
.rapor-row:last-child { border-bottom: 0; }
.rapor-note { padding: 10px; border-radius: 10px; background: rgba(15, 118, 110, .05); border: 1px solid rgba(15, 118, 110, .14); font-size: 10px; line-height: 1.6; color: var(--muted-strong); }
.rapor-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 8px; padding-top: 11px; border-top: 1px solid var(--border); font-size: 9px; color: var(--muted); }
.rapor-sign div { text-align: center; width: 45%; }
.rapor-sign b { display: block; margin-top: 26px; color: var(--text); font-size: 10px; border-top: 1px solid var(--border); padding-top: 4px; }

/* ==========================================================================
   Report charts
   ========================================================================== */
.report-bars {
  display: flex; align-items: flex-end; gap: 5px; height: 158px;
  padding: 16px 2px 0; border-bottom: 1px solid var(--border); overflow-x: auto;
}
.report-bar-col { flex: 1 0 14px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 14px; }
.report-bar { width: 100%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--primary-light), var(--primary)); position: relative; min-height: 6px; opacity: .85; transition: opacity .15s; }
.report-bar:hover { opacity: 1; }
.report-bar i { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 7px; font-style: normal; color: var(--muted); }
.report-bar-col small { font-size: 8px; color: var(--muted); font-family: var(--mono); }

/* ==========================================================================
   Materi tree
   ========================================================================== */
.tree-list { display: flex; flex-direction: column; gap: 3px; }
.tree-row {
  display: flex; align-items: center; gap: 7px; padding: 7px 8px;
  border: 1px solid transparent; border-radius: 9px; min-width: 0;
}
.tree-row:hover { background: var(--surface-2); border-color: var(--border); }
.tree-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex: 0 0 auto; }
.tree-label { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: 0 0 auto; }
.tree-actions .btn { min-height: 23px; padding: 0 5px; }
.tree-actions .ico { width: 12px; height: 12px; }

/* ==========================================================================
   Rapor formal (print document)
   ========================================================================== */
.rapor-formal {
  color: #10231f; background: #fff; border: 2px solid #123b35; border-radius: 6px;
  padding: 30px 32px; font-family: Georgia, 'Times New Roman', serif;
  box-shadow: 0 20px 50px -34px rgba(8, 58, 52, .55);
}
.rapor-kop { display: flex; align-items: center; gap: 14px; border-bottom: 4px double #123b35; padding-bottom: 13px; text-align: left; }
.rapor-kop-mark { width: 58px; height: 58px; border-radius: 999px; border: 2px solid #0f766e; display: flex; align-items: center; justify-content: center; color: #0f766e; flex: 0 0 auto; }
.rapor-kop-mark .ico { width: 30px; height: 30px; }
.rapor-kop p { margin: 0; font-family: var(--font); font-size: 9px; font-weight: 800; letter-spacing: .16em; color: #33544e; }
.rapor-kop h1 { margin: 3px 0 0; font-size: 24px; line-height: 1.1; letter-spacing: -.01em; color: #0b3f38; text-transform: uppercase; }
.rapor-kop span { display: block; margin-top: 3px; font-family: var(--font); font-size: 9.5px; color: #516d68; }
.rapor-formal-title { text-align: center; margin: 20px 0 16px; }
.rapor-formal-title h2 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.rapor-formal-title p { margin: 6px 0 0; font-family: var(--font); font-size: 9.5px; color: #516d68; }
.rapor-formal-identity { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 11px; border: 1px solid #123b35; background: #f8fcfa; }
.rapor-formal-identity td { border: 1px solid rgba(18, 59, 53, .28); padding: 6px 9px; vertical-align: top; }
.rapor-formal-identity td:nth-child(odd) { width: 17%; color: #4c6661; font-family: var(--font); font-size: 9px; font-weight: 700; }
.rapor-formal-identity td:nth-child(even) { width: 33%; }
.rapor-formal-head { margin: 16px 0 0; padding: 6px 10px; background: #123b35; color: #fff; font-family: var(--font); font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; border-radius: 4px 4px 0 0; }
.rapor-formal-box { border: 1px solid #123b35; border-top: 0; padding: 12px; border-radius: 0 0 4px 4px; }
.rapor-formal-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.rapor-formal-kpis div { border: 1px solid rgba(18, 59, 53, .3); border-radius: 4px; padding: 8px 5px; background: #f8fcfa; }
.rapor-formal-kpis span { display: block; font-family: var(--font); font-size: 8px; font-weight: 700; color: #516d68; text-transform: uppercase; letter-spacing: .06em; }
.rapor-formal-kpis strong { display: block; margin-top: 3px; font-family: var(--mono); font-size: 17px; color: #0b3f38; }
.rapor-formal-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; align-items: start; }
.rapor-formal-table { width: 100%; border-collapse: collapse; font-size: 10.5px; border: 1px solid #123b35; }
.rapor-formal-table td { border: 1px solid rgba(18, 59, 53, .26); padding: 6px 9px; }
.rapor-formal-table td:last-child { text-align: right; font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.rapor-formal-table tr.total td { background: #f1f8f5; font-weight: 800; }
.rapor-formal-note { margin-top: 8px; border: 1px solid #123b35; border-radius: 0 0 4px 4px; padding: 10px 12px; font-style: italic; font-size: 11px; background: #f8fcfa; line-height: 1.6; }
.rapor-formal-sign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; text-align: center; font-size: 10px; color: #516d68; }
.rapor-formal-sign p { margin: 0 0 38px; line-height: 1.5; }
.rapor-formal-sign b { display: block; border-top: 1px solid #123b35; padding-top: 5px; color: #10231f; font-size: 10.5px; }
.rapor-formal-foot { margin: 26px 0 0; border-top: 1px solid rgba(18, 59, 53, .25); padding-top: 8px; text-align: center; font-family: var(--font); font-size: 8px; color: #6a817c; }
.rapor-formal .badge { font-family: var(--font); }

/* ==========================================================================
   Data JSON panel
   ========================================================================== */
.data-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.data-stat { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: var(--surface-2); }
.data-stat span { display: block; font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.data-stat strong { display: block; margin-top: 2px; font-family: var(--mono); font-size: 14px; }
.json-preview { width: 100%; min-height: 120px; max-height: 220px; font-family: var(--mono); font-size: 9px; line-height: 1.5; border: 1px solid var(--border); border-radius: 11px; background: #f8fbfa; padding: 9px; resize: vertical; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 767.98px) {
  #app { max-width: 32rem; margin-inline: auto; }
}
@media (min-width: 640px) {
  .grid-2-sm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .modal-overlay { align-items: center; padding: 16px; }
  .modal { border-radius: 18px; max-height: 88dvh; }
  .modal-overlay.show .modal { transform: translateY(0) scale(1); }
}
@media (min-width: 768px) {
  .app-shell { display: flex; align-items: flex-start; min-height: 100dvh; }
  .app-sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; z-index: 40;
    width: 248px; flex: 0 0 248px; height: 100dvh; overflow-y: auto;
    background: var(--surface); border-right: 1px solid var(--border);
    backdrop-filter: blur(16px) saturate(150%); transition: width .18s, flex-basis .18s;
  }
  .app-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
  .bottom-nav, .app-statusbar { display: none !important; }
  .app-header { flex-wrap: nowrap; gap: 14px; padding: 11px 28px; }
  .header-search { order: 0; flex: 1 1 auto; flex-basis: auto; max-width: 420px; margin-inline: auto; padding-top: 0; border-top: 0; }
  main#screen-content { width: 100%; max-width: 1200px; margin-inline: auto; padding: 24px 20px 56px; }
  .fab { right: 24px; bottom: 24px; }
  .stat-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sesi-layout { flex-direction: row; align-items: flex-start; gap: 18px; }
  .sesi-side { width: 360px; flex: 0 0 360px; }
  .sesi-main { flex: 1 1 auto; }
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-page { display: grid; grid-template-columns: 1fr 1fr; }
  .login-brand-panel { border-bottom: 0; border-right: 1px solid var(--border); padding: 42px; min-height: 100dvh; }
  .login-card-wrap { min-height: 100dvh; }
  .rapor-identity, .rapor-kpis { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width: 1024px) {
  .app-sidebar { width: 264px; flex-basis: 264px; }
  .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .split-main { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
  .rapor-sheet { max-width: 820px; margin-inline: auto; }
  .login-brand-panel { padding: 56px; }
}
@media (max-width: 640px) {
  .rapor-formal { padding: 18px 15px; }
  .rapor-kop h1 { font-size: 18px; }
  .rapor-formal-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rapor-formal-2col { grid-template-columns: 1fr; }
  .rapor-formal-identity td { padding: 5px 6px; font-size: 9px; }
  .rapor-formal-sign { gap: 8px; font-size: 8px; }
  .rapor-formal-sign b { font-size: 8.5px; }
}
@media (min-width: 1280px) {
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sidebar */
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 16px 14px 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: rgba(15, 118, 110, .09); border: 1px solid rgba(15, 118, 110, .22); color: var(--primary-ink); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.brand-mark .ico { width: 20px; height: 20px; }
.sidebar-brand h1 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(135deg, var(--primary-dark), var(--primary), #0d9488); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-brand p { margin: 1px 0 0; font-size: 9px; color: var(--muted); }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 9px; flex: 1 1 auto; overflow-y: auto; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; border: 1px solid transparent; color: var(--muted); font-size: 12px; font-weight: 600; transition: .15s; }
.sidebar-item .ico { width: 18px; height: 18px; flex: 0 0 auto; }
.sidebar-item:hover { background: var(--chip); color: var(--primary-ink); }
.sidebar-item.active { background: rgba(15, 118, 110, .1); border-color: rgba(15, 118, 110, .22); color: var(--primary-ink); }
.sidebar-section { padding: 12px 12px 4px; font-size: 8px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.sidebar-footer { border-top: 1px solid var(--border); padding: 10px 9px 13px; display: flex; flex-direction: column; gap: 7px; }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.sidebar-user .avatar { width: 31px; height: 31px; font-size: 9px; }
.sidebar-user p { margin: 0; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { display: block; color: var(--muted); font-size: 8.5px; }
.sidebar-actions { display: flex; gap: 5px; }
.sidebar-actions .btn { flex: 1 1 0; }
#app.shell-collapsed .app-sidebar { width: 72px; flex-basis: 72px; }
#app.shell-collapsed .sidebar-label, #app.shell-collapsed .sidebar-user > div, #app.shell-collapsed .sidebar-section { display: none; }
#app.shell-collapsed .sidebar-brand { justify-content: center; padding-inline: 8px; }
#app.shell-collapsed .sidebar-item { justify-content: center; padding-inline: 8px; }
#app.shell-collapsed .sidebar-footer { align-items: center; }
#app.shell-collapsed .sidebar-actions .btn { min-width: 0; padding: 0 6px; }
#app.shell-collapsed .sidebar-actions .btn span { display: none; }

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; background-image: none !important; }
  #app { max-width: none !important; }
  .app-sidebar, .app-statusbar, .app-header, .bottom-nav, .fab, .rapor-toolbar, #toast-container, .modal-overlay { display: none !important; }
  main#screen-content { padding: 0 !important; max-width: none !important; }
  .rapor-sheet { border: 0; border-radius: 0; box-shadow: none; max-width: none; }
  .rapor-formal { padding: 0; border: 0; background: #fff !important; }
  .rapor-formal-head, .rapor-kop-mark, .rapor-formal-kpis div, .rapor-formal-table tr.total td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rapor-formal-head { color: #fff !important; }
  .rapor-formal-sign, .rapor-formal-2col, .rapor-formal-table { break-inside: avoid; }
  .rapor-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rapor-body { padding: 14px 0 0; }
  .rapor-block, .rapor-identity, .rapor-kpi, .rapor-note { break-inside: avoid; }
  .rapor-note { background: #f6fbf9 !important; }
}
