:root {
  --bg: #F3F2EA;
  --surface: #FFFFFF;
  --surface-2: #FAF9F3;
  --sage: #E5E9DD;
  --sage-2: #D3DCC7;
  --green: #2F4B2B;
  --green-2: #46663F;
  --green-3: #86A07A;
  --ink: #1E281C;
  --muted: #6C7568;
  --line: #E6E5DB;
  --gold: #B39158;
  --gold-soft: #F3EBDC;
  --danger: #B4553F;
  --danger-soft: #F7E6E1;
  --info: #3E6A80;
  --info-soft: #E1ECF1;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(30, 40, 28, .04), 0 8px 24px rgba(30, 40, 28, .06);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --arab: 'Amiri', 'Traditional Arabic', serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%232F4B2B' stroke-width='1' opacity='.09'%3E%3Cpath d='M28 6l6.4 15.6L50 28l-15.6 6.4L28 50l-6.4-15.6L6 28l15.6-6.4z'/%3E%3Crect x='14' y='14' width='28' height='28' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; color: var(--green); }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--green-2); }
button, input, select, textarea { font: inherit; color: inherit; }
.arab { font-family: var(--arab); direction: rtl; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.hidden { display: none !important; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--sage-2); border-top-color: var(--green); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons & form ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 20px; cursor: pointer;
  background: var(--green); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none;
  transition: transform .08s ease, background .15s ease, opacity .15s;
}
.btn:hover { background: var(--green-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; padding: 15px 20px; font-size: 15px; }
.btn.ghost { background: var(--surface); color: var(--green); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.soft { background: var(--sage); color: var(--green); }
.btn.soft:hover { background: var(--sage-2); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: var(--surface); color: var(--green); cursor: pointer; box-shadow: var(--shadow); flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.flat { box-shadow: none; background: transparent; }
.icon-btn.flat:hover { background: var(--sage); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--green-2); font-weight: 600; cursor: pointer; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.link-btn svg { width: 15px; height: 15px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--green); }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm);
  padding: 12px 14px; outline: none; transition: border .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 90px; }
.input:focus { border-color: var(--green-3); box-shadow: 0 0 0 3px rgba(134, 160, 122, .22); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.input-icon .input { padding-left: 42px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; }
.note { background: var(--gold-soft); color: #6F5629; padding: 12px 14px; border-radius: 14px; font-size: 13px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface-2); border-radius: 34px; padding: 34px 28px 28px;
  box-shadow: var(--shadow); text-align: center; position: relative; overflow: hidden;
}
.auth-card::before { content: ''; position: absolute; inset: 0; background: var(--pattern); opacity: .6; pointer-events: none; mask-image: linear-gradient(#000, transparent 45%); -webkit-mask-image: linear-gradient(#000, transparent 45%); }
.auth-card > * { position: relative; }
.auth-title { font-size: 44px; line-height: 1; }
.auth-tag { margin-top: 10px; font-size: 12px; letter-spacing: .22em; font-weight: 700; color: var(--green-2); text-transform: uppercase; }
.auth-sub { margin-top: 10px; color: var(--muted); font-size: 14px; }
.auth-art { margin: 18px auto 18px; width: 220px; }
.auth-form { text-align: left; margin-top: 6px; }
.auth-foot { margin-top: 14px; font-size: 13px; color: var(--muted); }
.bismillah { font-family: var(--arab); font-size: 22px; color: var(--gold); margin-bottom: 8px; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.sidebar { display: none; }
.main { max-width: 1080px; margin: 0 auto; padding: 18px 16px 110px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.topbar .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--sage); color: var(--green);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none;
}
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.page-title { display: flex; align-items: center; gap: 10px; }

.bottom-nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  background: var(--surface); border-radius: 26px; box-shadow: 0 10px 30px rgba(30, 40, 28, .12);
  display: flex; justify-content: space-around; padding: 8px 6px;
}
.nav-item {
  display: grid; justify-items: center; gap: 3px; text-decoration: none; color: #9AA294; font-size: 11px; font-weight: 600;
  padding: 4px 6px; min-width: 52px; border-radius: 16px;
}
.nav-item .ic { width: 40px; height: 34px; border-radius: 13px; display: grid; place-items: center; }
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--green); }
.nav-item.active .ic { background: var(--green); color: #fff; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 250px 1fr; }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
    padding: 26px 16px; background: var(--surface-2); border-right: 1px solid var(--line);
  }
  .sidebar .brand { display: flex; gap: 10px; align-items: center; padding: 0 10px 22px; }
  .sidebar .brand b { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--green); }
  .side-item {
    display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; text-decoration: none;
    color: var(--muted); font-weight: 600; font-size: 14px;
  }
  .side-item svg { width: 20px; height: 20px; }
  .side-item:hover { background: var(--sage); color: var(--green); }
  .side-item.active { background: var(--green); color: #fff; }
  .sidebar .spacer { flex: 1; }
  .side-quote { background: var(--sage); border-radius: 18px; padding: 16px; font-size: 12px; color: var(--green); }
  .side-quote .arab { font-size: 18px; text-align: right; margin-bottom: 6px; line-height: 1.7; }
  .bottom-nav { display: none; }
  .main { padding: 30px 36px 60px; width: 100%; }
  h1 { font-size: 34px; }
}

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card + .card, .stack > * + * { margin-top: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 12px; }
.section-head h2 { font-size: 21px; }

.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 24px; min-height: 200px;
  background: linear-gradient(135deg, #EEF0E6 0%, #DFE6D6 100%);
}
.hero::before { content: ''; position: absolute; inset: 0; background: var(--pattern); opacity: .9; }
.hero > * { position: relative; }
.hero .hero-body { max-width: 62%; }
.hero h1 { font-size: 28px; }
.hero .art { position: absolute; right: -6px; bottom: -4px; width: 42%; max-width: 230px; }
.hero .eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--green-2); margin-bottom: 8px; }
.hero .meta { color: var(--green-2); font-size: 13px; margin: 10px 0 16px; display: grid; gap: 4px; }
.hero .meta span { display: inline-flex; gap: 6px; align-items: center; }
.hero .meta svg { width: 15px; height: 15px; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.quick a { text-decoration: none; display: grid; justify-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.quick .tile { width: 58px; height: 58px; border-radius: 18px; background: var(--surface); display: grid; place-items: center; color: var(--green); box-shadow: var(--shadow); }
.quick a:first-child .tile { background: var(--green); color: #fff; }
.quick svg { width: 24px; height: 24px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.stat .v { font-family: var(--serif); font-size: 30px; color: var(--green); line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .ic { width: 34px; height: 34px; border-radius: 11px; background: var(--sage); color: var(--green); display: grid; place-items: center; margin-bottom: 10px; }
.stat .ic svg { width: 18px; height: 18px; }

.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.hscroll > * { scroll-snap-align: start; }
.mat-card { background: var(--surface); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.mat-thumb { height: 92px; border-radius: 14px; background: var(--sage); display: grid; place-items: center; color: var(--green); position: relative; overflow: hidden; }
.mat-thumb::before { content: ''; position: absolute; inset: 0; background: var(--pattern); }
.mat-thumb svg { width: 32px; height: 32px; position: relative; }
.mat-card b { font-size: 14px; line-height: 1.35; }

/* chips & badges */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip {
  border: 0; background: var(--surface); color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 13px;
  font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line);
}
.chip.active { background: var(--green); color: #fff; box-shadow: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; background: var(--sage); color: var(--green); white-space: nowrap; }
.badge.gold { background: var(--gold-soft); color: #7A5E2D; }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.plain { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.t-rutin { background: var(--sage); color: var(--green); }
.t-outdoor { background: #E3EEDD; color: #3C6B2F; }
.t-riyadhah { background: var(--info-soft); color: var(--info); }
.t-mabit { background: #EAE4F0; color: #5B4A75; }
.t-kajian { background: var(--gold-soft); color: #7A5E2D; }
.t-lainnya { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

/* progress */
.bar { height: 8px; border-radius: 99px; background: var(--sage); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green-2); border-radius: 99px; transition: width .4s; }
.prog-list { display: grid; gap: 12px; }
.prog-row { display: grid; grid-template-columns: 108px 1fr 42px; gap: 10px; align-items: center; font-size: 13px; }
.prog-row b { text-align: right; font-size: 13px; color: var(--green); }
.ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--green-2) calc(var(--p) * 1%), var(--sage) 0); }
.ring > div { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--serif); font-size: 24px; color: var(--green); font-weight: 400; line-height: 1; }
.ring span { font-size: 10px; color: var(--muted); font-weight: 600; }

/* ---------- yaumiyah ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.week-nav .lbl { text-align: center; font-weight: 700; font-size: 14px; color: var(--green); }
.week-nav .lbl small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 16px 0; }
.day {
  border: 0; background: var(--surface); border-radius: 16px; padding: 9px 0 8px; cursor: pointer; display: grid; justify-items: center; gap: 2px;
  box-shadow: inset 0 0 0 1px var(--line); color: var(--muted);
}
.day .dn { font-size: 11px; font-weight: 700; }
.day .dd { font-family: var(--serif); font-size: 19px; color: var(--ink); line-height: 1.1; }
.day .dot { width: 22px; height: 4px; border-radius: 9px; background: var(--sage); margin-top: 3px; overflow: hidden; }
.day .dot i { display: block; height: 100%; background: var(--green-3); }
.day.active { background: var(--green); box-shadow: none; color: #E5E9DD; }
.day.active .dd { color: #fff; }
.day.active .dot { background: rgba(255,255,255,.25); }
.day.active .dot i { background: #fff; }
.day:disabled { opacity: .4; cursor: not-allowed; }
.y-card { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.y-card + .y-card { margin-top: 12px; }
.y-head { display: flex; align-items: center; gap: 12px; }
.y-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--sage); color: var(--green); display: grid; place-items: center; flex: none; }
.y-ic svg { width: 22px; height: 22px; }
.y-head .t { flex: 1; min-width: 0; }
.y-head .t b { display: block; font-size: 15px; }
.y-head .t .arab { font-size: 15px; color: var(--gold); direction: rtl; display: inline; }
.prayers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 14px; }
.pchip {
  border: 0; border-radius: 14px; padding: 10px 2px; cursor: pointer; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px; font-weight: 700; color: var(--muted); display: grid; justify-items: center; gap: 4px;
}
.pchip svg { width: 18px; height: 18px; }
.pchip.on { background: var(--green); color: #fff; box-shadow: none; }
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; background: var(--sage-2); border-radius: 99px; cursor: pointer; transition: background .15s; }
.toggle span::after { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s; }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 2px solid var(--green-3); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 3px; box-shadow: inset 0 0 0 1px var(--line); }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface); cursor: pointer; font-weight: 700; color: var(--green); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.stepper input { width: 44px; border: 0; background: transparent; text-align: center; font-weight: 700; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.sub-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.save-bar { position: sticky; bottom: 96px; margin-top: 18px; z-index: 5; }
@media (min-width: 900px) { .save-bar { bottom: 20px; } }
.save-bar .btn { box-shadow: 0 10px 24px rgba(47, 75, 43, .3); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover td { background: var(--surface-2); }
td.c, th.c { text-align: center; }
.pct { display: inline-block; min-width: 46px; text-align: center; border-radius: 99px; padding: 2px 8px; font-weight: 700; font-size: 12px; }
.pct.hi { background: var(--sage); color: var(--green); }
.pct.mid { background: var(--gold-soft); color: #7A5E2D; }
.pct.lo { background: var(--danger-soft); color: var(--danger); }
.grid-check td, .grid-check th { padding: 9px 8px; text-align: center; }
.grid-check td:first-child, .grid-check th:first-child { text-align: left; }
.ok { color: var(--green-2); font-weight: 700; }
.no { color: #C9C9BE; }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 0; }
.tl-item { display: grid; grid-template-columns: 58px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: 28px; top: 62px; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--sage-2) 0 6px, transparent 6px 11px); }
.tl-item:last-child::before { display: none; }
.tl-date { width: 58px; height: 62px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; align-content: center; text-align: center; }
.tl-date b { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--green); line-height: 1; }
.tl-date span { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.tl-item.next .tl-date { background: var(--green); }
.tl-item.next .tl-date b, .tl-item.next .tl-date span { color: #fff; }
.tl-item.past { opacity: .78; }
.tl-card { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.tl-card h3 { font-size: 18px; margin: 6px 0 4px; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.tl-meta span { display: inline-flex; gap: 5px; align-items: center; }
.tl-meta svg { width: 14px; height: 14px; }
.duty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.duty div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.duty div.me { background: var(--gold-soft); box-shadow: inset 0 0 0 1px #E7D6B6; }
.duty small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.duty b { font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duty em { font-size: 11.5px; color: var(--muted); font-style: normal; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.banner { display: flex; gap: 12px; align-items: center; background: var(--gold-soft); border-radius: 18px; padding: 14px 16px; color: #6F5629; margin-bottom: 16px; }
.banner svg { width: 22px; height: 22px; flex: none; }

/* list */
.list { display: grid; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty svg { width: 40px; height: 40px; color: var(--green-3); margin-bottom: 8px; }

/* segmented attendance */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button.on[data-s=hadir] { background: var(--green); color: #fff; }
.seg button.on[data-s=izin] { background: var(--info); color: #fff; }
.seg button.on[data-s=sakit] { background: var(--gold); color: #fff; }
.seg button.on[data-s=alpa] { background: var(--danger); color: #fff; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(30, 40, 28, .38); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 22px 18px 26px; animation: up .2s ease; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.modal.wide { max-width: 860px; }
@media (min-width: 640px) { .modal-bg { align-items: center; padding: 20px; } .modal { border-radius: 28px; padding: 26px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px); background: var(--green); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--danger); }
@media (min-width: 900px) { #toast { bottom: 30px; } }

.temp-pass { font-family: ui-monospace, Menlo, monospace; font-size: 26px; letter-spacing: .12em; text-align: center; background: var(--surface); border-radius: 16px; padding: 16px; color: var(--green); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); margin: 12px 0; user-select: all; }
.two-col { display: grid; gap: 16px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.btn .spinner { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.btn.ghost .spinner, .btn.soft .spinner, .btn.danger .spinner { border-color: var(--sage-2); border-top-color: var(--green); }
.mat-row { display: flex; gap: 14px; background: var(--surface); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.mat-row .mat-thumb { width: 74px; height: 74px; flex: none; }
.mat-row .grow { flex: 1; min-width: 0; }
.mat-row h3 { font-size: 17px; margin: 4px 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.search { max-width: 320px; }
.two-col > .card + .card { margin-top: 0; }
.hero .badge { background: rgba(255,255,255,.85); }
