/* ==========================================================================
   Arisan Kita — tampilan
   ========================================================================== */

:root {
  --bg: #f6f1e7;
  --bg-deep: #efe8da;
  --surface: #fffdf8;
  --surface-2: #f8f3e8;
  --surface-3: #efe8d9;
  --ink: #16352c;
  --ink-2: #2a4b40;
  --muted: #79857f;
  --muted-2: #9aa49f;
  --line: #e6dfd0;
  --line-strong: #d7cdb9;
  --forest: #123f33;
  --forest-2: #1a5644;
  --forest-3: #2f7a5e;
  --mint: #dcefe4;
  --mint-2: #eef7f1;
  --gold: #d99a3d;
  --gold-2: #b97c24;
  --gold-soft: #fbf0d8;
  --coral: #c96a4a;
  --coral-soft: #f9e5dc;
  --blue: #4d7f98;
  --blue-soft: #e7f0f5;
  --wa: #1f8a5b;
  --wa-soft: #e3f4ea;
  --danger: #b34a40;
  --danger-soft: #fbe8e4;
  --shadow-sm: 0 1px 2px rgba(22, 53, 44, 0.04), 0 6px 20px rgba(22, 53, 44, 0.04);
  --shadow-md: 0 14px 40px rgba(22, 53, 44, 0.09);
  --shadow-lg: 0 30px 80px rgba(16, 42, 33, 0.2);
  --radius: 20px;
  --radius-sm: 13px;
  --radius-xs: 9px;
  --sidebar-w: 264px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1000px 560px at 100% -10%, rgba(217, 154, 61, 0.09), transparent 60%),
    radial-gradient(900px 520px at 0% 110%, rgba(47, 122, 94, 0.07), transparent 62%),
    var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, h5, p { margin: 0; }
::selection { background: rgba(47, 122, 94, 0.2); }
:focus-visible { outline: 3px solid rgba(47, 122, 94, 0.3); outline-offset: 2px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ta-right { text-align: right !important; }
.block { display: block; }
.break-all { overflow-wrap: anywhere; }
.text-danger { color: var(--danger) !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--forest); color: #fffaf0; box-shadow: 0 8px 18px rgba(18, 63, 51, 0.16); }
.btn-primary:hover { background: var(--forest-2); box-shadow: 0 10px 24px rgba(18, 63, 51, 0.22); }
.btn-gold { background: var(--gold); color: #2b2110; box-shadow: 0 8px 18px rgba(217, 154, 61, 0.25); }
.btn-gold:hover { background: #e4a94e; }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface-2); }
.btn-outline { border-color: rgba(18, 63, 51, 0.25); color: var(--forest); background: transparent; }
.btn-outline:hover { background: var(--mint-2); }
.btn-outline-light { border-color: rgba(255, 250, 240, 0.35); color: #fff8e9; background: rgba(255, 255, 255, 0.06); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.13); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 18px rgba(31, 138, 91, 0.2); }
.btn-wa:hover { background: #187a4f; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #993b33; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { background: var(--danger-soft); border-color: transparent; }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 12.5px; }
.btn-xs { min-height: 30px; padding: 5px 10px; font-size: 11.5px; gap: 5px; }
.btn-lg { min-height: 50px; padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.is-loading { color: transparent !important; position: relative; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
.btn-ghost.is-loading::after, .btn-outline.is-loading::after { border-color: rgba(18, 63, 51, 0.2); border-top-color: var(--forest); }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.ghost { border-color: var(--line); background: var(--surface); }
.icon-btn svg { width: 17px; height: 17px; }
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--forest-3);
  font-weight: 700;
  font-size: 12px;
  padding: 4px;
}
.link-btn svg { width: 14px; height: 14px; }
.link-btn:hover { color: var(--forest); }

/* ==========================================================================
   Form controls
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.01em; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field small { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--forest-3);
  box-shadow: 0 0 0 4px rgba(47, 122, 94, 0.1);
}
.field input:disabled, .field select:disabled { background: var(--surface-2); color: var(--muted); }
.field-count { font-style: normal; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.field-count.is-ok { color: var(--forest-3); }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.input-prefix > span { padding: 0 0 0 13px; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.input-prefix input { border: 0 !important; box-shadow: none !important; padding-left: 8px; background: transparent; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.form-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px; }
.form-note svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--forest-3); margin-top: 1px; }
.check-field { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.check-field input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--forest); flex: 0 0 auto; }
.check-field span { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.check-field span small { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.mini-info { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; }
.mini-info span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.mini-info strong { font-size: 15px; }

.policy-box { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.policy-box.is-locked { background: var(--mint-2); border-color: var(--mint); }
.policy-box.is-locked .policy-head { margin-bottom: 0; }
.policy-box.is-locked .policy-head strong { display: flex; align-items: center; gap: 6px; color: var(--forest); }
.policy-box.is-locked .policy-head strong svg { width: 14px; height: 14px; }
.scheme-picker { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.scheme-picker-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.scheme-picker-label em { font-style: normal; font-size: 10px; color: var(--gold-2); font-weight: 700; }
.scheme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.scheme-option { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }
.scheme-option:has(input:checked) { border-color: var(--forest-3); background: var(--mint-2); box-shadow: 0 0 0 2px rgba(47, 122, 94, 0.08); }
.scheme-option input { margin-top: 2px; accent-color: var(--forest); }
.scheme-option span { display: flex; flex-direction: column; gap: 2px; }
.scheme-option b { font-size: 12px; }
.scheme-option small { font-size: 10.5px; color: var(--muted); line-height: 1.4; }
.scheme-warning { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; font-size: 10.5px; color: var(--gold-2); line-height: 1.45; }
.scheme-warning svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }
.scheme-lock-card { display: flex; flex-direction: column; gap: 13px; }
.scheme-lock-card.is-locked { background: var(--mint-2); border-color: var(--mint); }
.scheme-locked { display: flex; align-items: flex-start; gap: 12px; }
.scheme-lock-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: var(--forest-3); flex: 0 0 auto; }
.scheme-lock-icon svg { width: 18px; height: 18px; }
.scheme-locked strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; margin-top: 4px; }
.scheme-locked p { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.scheme-lock-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.scheme-lock-action p { display: flex; align-items: flex-start; gap: 6px; font-size: 10.5px; color: var(--gold-2); line-height: 1.45; max-width: 560px; }
.scheme-lock-action p svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.policy-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.policy-head strong { font-size: 12.5px; }
.policy-head small { font-size: 11px; color: var(--muted); }
.policy-box .form-grid { gap: 12px; }
.policy-box .field { margin-top: 0; }
.field.is-disabled { opacity: 0.55; }
.field.is-disabled input { background: var(--surface-3); cursor: not-allowed; }
.policy-callout { margin-bottom: 14px; padding: 13px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px solid #efd9ae; }
.policy-callout strong { display: block; font-size: 12.5px; color: #6d4a13; }
.policy-callout p { font-size: 11.5px; color: #7c5a24; line-height: 1.5; margin-top: 3px; }
.next-current { margin-bottom: 13px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; color: var(--muted); }
.next-current b { color: var(--ink); }
.undian-mode { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 8px 11px; border-radius: 9px; background: var(--surface-2); font-size: 10.5px; color: var(--muted); }
.undian-mode svg { width: 13px; height: 13px; color: var(--forest-3); }
.undian-mode b { color: var(--ink-2); }

/* ==========================================================================
   Boot
   ========================================================================== */
.boot-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.boot-screen p { font-size: 13px; letter-spacing: 0.02em; }
.boot-mark { display: flex; gap: 7px; }
.boot-mark span { width: 11px; height: 11px; border-radius: 50%; background: var(--forest-3); animation: bob 1.1s ease-in-out infinite; }
.boot-mark span:nth-child(2) { animation-delay: 0.1s; background: var(--gold); }
.boot-mark span:nth-child(3) { animation-delay: 0.2s; }
.boot-mark span:nth-child(4) { animation-delay: 0.3s; background: var(--gold); }
.boot-mark span:nth-child(5) { animation-delay: 0.4s; }

/* ==========================================================================
   Shell
   ========================================================================== */
.app-shell { min-height: 100vh; }
.app-shell.is-onboarding .sidebar, .app-shell.is-onboarding .topbar, .app-shell.is-onboarding .bottom-nav { display: none; }
.app-shell.is-onboarding .main { margin-left: 0; }
.app-shell.is-onboarding .view { padding: 0; max-width: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  color: #f2ead8;
  background:
    radial-gradient(340px 260px at 10% 0%, rgba(217, 154, 61, 0.16), transparent 65%),
    radial-gradient(380px 320px at 100% 100%, rgba(47, 122, 94, 0.35), transparent 60%),
    #10382e;
  overflow: hidden;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(rgba(255, 255, 255, 0.28) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; padding: 3px 6px 22px; }
.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.brand-mark .petal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--forest);
  transform-origin: 50% 50%;
}
.brand-mark .p1 { transform: translate(-50%, -50%) rotate(0deg) translateY(-12px); }
.brand-mark .p2 { transform: translate(-50%, -50%) rotate(72deg) translateY(-12px); }
.brand-mark .p3 { transform: translate(-50%, -50%) rotate(144deg) translateY(-12px); }
.brand-mark .p4 { transform: translate(-50%, -50%) rotate(216deg) translateY(-12px); }
.brand-mark .p5 { transform: translate(-50%, -50%) rotate(288deg) translateY(-12px); }
.brand-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
}
.brand-mark-light { background: rgba(255, 248, 233, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.brand-mark-light .petal { background: #f4e8c9; }
.brand-mark-light::after { background: var(--gold); }
.brand-text strong { display: block; font-family: var(--serif); font-size: 21px; letter-spacing: 0.01em; color: #fff8e8; }
.brand-text span { display: block; font-size: 10.5px; color: rgba(242, 234, 216, 0.6); margin-top: 1px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(242, 234, 216, 0.74);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item svg { width: 19px; height: 19px; opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff8e8; }
.nav-item.active { background: rgba(255, 248, 232, 0.1); color: #fff8e8; box-shadow: inset 3px 0 0 var(--gold); }
.nav-item.active svg { color: var(--gold); opacity: 1; }
.nav-count { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(217, 154, 61, 0.2); color: #f3d9a7; }
.nav-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(217, 154, 61, 0.16); }

.sidebar-note { display: flex; gap: 10px; margin-top: auto; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-note-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(217, 154, 61, 0.16); color: var(--gold); }
.sidebar-note-icon svg { width: 16px; height: 16px; }
.sidebar-note strong { display: block; font-size: 11.5px; color: #f6ecd8; }
.sidebar-note p { font-size: 10.5px; color: rgba(242, 234, 216, 0.55); line-height: 1.4; margin-top: 2px; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user-text { min-width: 0; }
.sidebar-user-text strong { display: block; font-size: 12.5px; color: #fff8e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-text span { display: block; font-size: 10.5px; color: rgba(242, 234, 216, 0.55); }
.sidebar-user .icon-btn { margin-left: auto; color: rgba(242, 234, 216, 0.7); }
.sidebar-user .icon-btn:hover { background: rgba(255, 255, 255, 0.08); }

.avatar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), #f1dfb8);
  color: var(--forest);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(18, 63, 51, 0.08);
}
.avatar-sm { width: 34px; height: 34px; font-size: 11px; }
.avatar-xs { width: 32px; height: 32px; font-size: 10.5px; }
.avatar-lg { width: 58px; height: 58px; font-size: 18px; }
.avatar-xl { width: 76px; height: 76px; font-size: 24px; }
.avatar-muted { background: var(--surface-3); color: var(--muted); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 34px;
  border-bottom: 1px solid rgba(214, 205, 185, 0.6);
  background: rgba(246, 241, 231, 0.86);
  backdrop-filter: blur(14px);
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-family: var(--serif); font-size: 25px; line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; }
.eyebrow { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; color: var(--gold-2); }
.topbar-date { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-user { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--surface); padding: 0; background: linear-gradient(135deg, #f1dfb8, var(--gold-soft)); color: var(--forest); font-weight: 800; font-size: 11px; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.topbar-wa.is-connected { color: var(--wa); border-color: rgba(31, 138, 91, 0.25); background: var(--wa-soft); }
.mobile-only { display: none !important; }

.view { flex: 1; padding: 30px 34px 90px; max-width: 1500px; width: 100%; margin: 0 auto; outline: none; }
.page { display: flex; flex-direction: column; gap: 22px; animation: rise 0.3s ease both; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-head h2 { font-family: var(--serif); font-size: 33px; line-height: 1.08; font-weight: 600; margin-top: 4px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; padding: 2px; }
.back-link:hover { color: var(--forest); }
.back-link svg { width: 15px; height: 15px; }

.bottom-nav { display: none; }
.nav-scrim { display: none; }

/* ==========================================================================
   Shared cards & bits
   ========================================================================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin-top: 3px; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 4px; max-width: 560px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; align-items: start; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; border: 1px solid transparent; }
.chip-green { background: var(--mint); color: var(--forest); }
.chip-amber { background: var(--gold-soft); color: var(--gold-2); }
.chip-gold { background: #f6e3bd; color: #7b5311; }
.chip-blue { background: var(--blue-soft); color: #31647c; }
.chip-coral { background: var(--coral-soft); color: #9c4a30; }
.chip-cream { background: var(--surface-2); color: var(--ink-2); }
.chip-outline { border-color: var(--line); color: var(--muted); background: transparent; }
.chip-muted { background: var(--surface-3); color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.dot-green { background: var(--forest-3); }
.dot-cream { background: #dccdb0; }
.dot-gold { background: var(--gold); }
.dot-coral { background: var(--coral); }
.dot-blue { background: var(--blue); }
.badge-count { min-width: 24px; height: 24px; display: inline-grid; place-items: center; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; }
.badge-count.is-danger { background: var(--danger-soft); color: var(--danger); }
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--forest-3), var(--gold)); transition: width 0.5s ease; }
.progress-green > span { background: var(--forest-3); }
.progress-blue > span { background: var(--blue); }
.progress-gold > span { background: var(--gold); }
.restan-label { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--coral-soft); color: #9c4a30; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.winner-label { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--mint); color: var(--forest); font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.restan-amount { color: var(--danger); font-weight: 700; font-size: 12px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 60px 24px; text-align: center; color: var(--muted); }
.empty-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--surface-2); color: var(--forest-3); display: grid; place-items: center; margin-bottom: 4px; }
.empty-icon svg { width: 24px; height: 24px; }
.empty-state h2, .empty-state h3 { font-family: var(--serif); color: var(--ink); font-size: 22px; font-weight: 600; }
.empty-state p { font-size: 13px; max-width: 380px; }
.empty-inline { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; }
.loader { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--forest-3); animation: spin 0.8s linear infinite; }
.loader-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 1s ease infinite; flex: 0 0 auto; margin-top: 5px; }

/* ==========================================================================
   Hero / dashboard
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.6fr);
  gap: 24px;
  padding: 34px 38px;
  border-radius: 26px;
  color: #fff8e8;
  overflow: hidden;
  background:
    radial-gradient(620px 380px at 92% 0%, rgba(217, 154, 61, 0.2), transparent 62%),
    radial-gradient(520px 420px at 4% 110%, rgba(47, 122, 94, 0.42), transparent 62%),
    linear-gradient(120deg, #0f382d, #164a3b 62%, #123f33);
  box-shadow: 0 22px 60px rgba(18, 63, 51, 0.18);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(100deg, transparent 30%, #000 100%);
  pointer-events: none;
}
.hero-main, .hero-side { position: relative; z-index: 1; }
.eyebrow-light { color: #e8c98d; }
.hero h2 { font-family: var(--serif); font-size: clamp(32px, 4vw, 46px); line-height: 1.05; font-weight: 600; margin: 9px 0 8px; letter-spacing: -0.01em; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: rgba(255, 248, 232, 0.72); font-size: 13px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--gold); }
.hero-progress { max-width: 420px; margin-top: 22px; }
.hero-progress-label { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255, 248, 232, 0.65); margin-bottom: 7px; }
.hero-progress-label strong { color: #fff8e8; font-size: 11.5px; }
.hero .progress { background: rgba(255, 255, 255, 0.14); }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-winner { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 248, 232, 0.78); font-size: 12px; }
.hero-winner svg { width: 15px; height: 15px; color: var(--gold); }
.hero-winner strong { color: #fff8e8; }
.hero-overdue { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: rgba(201, 106, 74, 0.18); border: 1px solid rgba(240, 172, 148, 0.28); color: #f4bda9; font-size: 10px; font-weight: 700; margin-bottom: 6px; }
.hero-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.hero-wheel { position: relative; width: 176px; height: 176px; display: grid; place-items: center; }
.hero-wheel-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255, 248, 232, 0.3); }
.hero-wheel-ring::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; border: 1px solid rgba(255, 248, 232, 0.12); }
.hero-wheel-center { position: relative; width: 118px; height: 118px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 248, 232, 0.08); border: 1px solid rgba(255, 248, 232, 0.16); backdrop-filter: blur(4px); }
.hero-wheel-center strong { font-family: var(--serif); font-size: 44px; line-height: 1; color: #fff8e8; }
.hero-wheel-center span { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 248, 232, 0.6); margin-top: 4px; }
.hero-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(217, 154, 61, 0.14); }
.hd1 { top: -2px; left: 50%; transform: translateX(-50%); }
.hd2 { top: 24px; right: 8px; }
.hd3 { bottom: 20px; right: 24px; }
.hd4 { bottom: -3px; left: 44%; }
.hd5 { top: 40px; left: 2px; }
.hero-mini { display: flex; gap: 16px; font-size: 10.5px; color: rgba(255, 248, 232, 0.6); text-align: center; }
.hero-mini span { display: flex; flex-direction: column; gap: 1px; }
.hero-mini strong { font-family: var(--serif); font-size: 19px; color: #fff8e8; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
button.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.stat-card.static { cursor: default; }
.stat-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-green { background: var(--mint); color: var(--forest-3); }
.stat-gold { background: var(--gold-soft); color: var(--gold-2); }
.stat-blue { background: var(--blue-soft); color: var(--blue); }
.stat-coral { background: var(--coral-soft); color: var(--coral); }
.stat-card > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.stat-card strong { font-family: var(--serif); font-size: 23px; line-height: 1.1; font-weight: 600; color: var(--ink); }
.stat-card strong em { font-style: normal; font-size: 13px; color: var(--muted); font-family: var(--sans); }
.stat-card small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-money { font-size: 18px !important; font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: -0.02em; }
.stat-arrow { margin-left: auto; width: 15px; height: 15px; color: var(--muted-2); flex: 0 0 auto; }
.stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.progress-wrap { display: flex; align-items: center; gap: 24px; padding: 4px 2px 18px; }
.donut { flex: 0 0 auto; width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(var(--forest-3) calc(var(--value) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.donut-inner { width: 100px; height: 100px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); }
.donut-inner strong { font-family: var(--serif); font-size: 26px; line-height: 1; }
.donut-inner span { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-top: 3px; }
.progress-copy h4 { font-size: 14.5px; font-weight: 700; }
.progress-copy p { color: var(--muted); font-size: 12px; margin-top: 4px; max-width: 330px; }
.mini-legend { display: flex; gap: 14px; margin-top: 12px; font-size: 10.5px; color: var(--muted); }
.mini-legend span { display: flex; align-items: center; gap: 6px; }
.recent-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 8px; }
.recent-item { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border: 0; background: transparent; border-bottom: 1px solid var(--line); text-align: left; }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { background: var(--surface-2); }
.recent-num { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--forest-3); font-size: 10px; font-weight: 800; }
.recent-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.recent-info strong { font-size: 12px; }
.recent-info small { font-size: 10.5px; color: var(--muted); }
.recent-arrow { margin-left: auto; width: 14px; height: 14px; color: var(--muted-2); }

.attention-list { display: flex; flex-direction: column; gap: 8px; }
.attention-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.attention-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.attention-icon svg { width: 15px; height: 15px; }
.attention-amber .attention-icon { background: var(--gold-soft); color: var(--gold-2); }
.attention-coral .attention-icon { background: var(--coral-soft); color: var(--coral); }
.attention-blue .attention-icon { background: var(--blue-soft); color: var(--blue); }
.attention-cream .attention-icon { background: var(--surface-2); color: var(--muted); }
.attention-copy { min-width: 0; flex: 1; }
.attention-copy strong { display: block; font-size: 12px; }
.attention-copy p { font-size: 10.5px; color: var(--muted); line-height: 1.4; margin-top: 1px; }
.attention-item .btn { flex: 0 0 auto; }
.all-clear { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 18px 10px 22px; }
.all-clear.compact { padding: 30px 10px; }
.all-clear-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--mint); color: var(--forest-3); display: grid; place-items: center; margin-bottom: 4px; }
.all-clear h4 { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.all-clear p { font-size: 11.5px; color: var(--muted); max-width: 260px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 12px; border: 1px dashed var(--line-strong); background: transparent; font-size: 10.5px; font-weight: 600; color: var(--ink-2); }
.quick-btn:hover { background: var(--surface-2); border-color: var(--forest-3); color: var(--forest); }
.quick-btn svg { width: 17px; height: 17px; color: var(--forest-3); }

/* ==========================================================================
   Pertemuan
   ========================================================================== */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--surface); color: var(--forest); box-shadow: var(--shadow-sm); }
.search-box { display: flex; align-items: center; gap: 8px; min-width: 240px; padding: 0 13px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.search-box svg { width: 15px; height: 15px; color: var(--muted); flex: 0 0 auto; }
.search-box input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 12.5px; }
.search-box.compact { min-width: 190px; height: 36px; }
.meeting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.meeting-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 19px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease; }
.meeting-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.meeting-card.is-done::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 3px 0 0 3px; background: var(--mint); }
.meeting-top { display: flex; align-items: center; justify-content: space-between; }
.meeting-no { font-family: var(--serif); font-size: 27px; line-height: 1; color: var(--gold-2); }
.meeting-card h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.meeting-date, .meeting-place { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.meeting-date svg { width: 13px; height: 13px; }
.meeting-place { color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meeting-winner { min-height: 36px; display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.meeting-winner > span:not(.avatar) { display: flex; flex-direction: column; gap: 1px; }
.meeting-winner small { font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.meeting-winner strong { font-size: 12px; }
.meeting-progress { margin-top: auto; padding-top: 8px; }
.meeting-progress .progress { height: 5px; }
.meeting-progress-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 7px; font-size: 10.5px; color: var(--muted); }
.meeting-progress-meta strong { font-size: 12.5px; color: var(--ink); }
.summary-strip { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 11.5px; color: var(--muted); }
.summary-strip > div { display: flex; align-items: center; gap: 7px; }
.summary-strip strong { color: var(--ink); }
.summary-strip .is-danger strong { color: var(--danger); }

/* Detail pertemuan */
.meeting-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 22px; padding: 26px 28px; border-radius: 24px; color: #fff8e8; background: radial-gradient(500px 300px at 100% 0%, rgba(217, 154, 61, 0.18), transparent 60%), linear-gradient(120deg, #10382d, #174b3c); box-shadow: 0 18px 50px rgba(18, 63, 51, 0.16); }
.meeting-hero.is-done { background: radial-gradient(500px 300px at 100% 0%, rgba(47, 122, 94, 0.25), transparent 60%), linear-gradient(120deg, #10382d, #123f33); }
.meeting-hero-main { display: flex; flex-direction: column; gap: 8px; }
.meeting-hero-title { display: flex; align-items: center; gap: 16px; }
.meeting-hero-title > strong { font-family: var(--serif); font-size: 62px; line-height: 0.9; color: var(--gold); font-weight: 500; opacity: 0.9; }
.meeting-hero-title h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.meeting-hero-title p { color: rgba(255, 248, 232, 0.65); font-size: 12px; margin-top: 3px; }
.meeting-hero-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.meeting-hero-tags .chip-outline { border-color: rgba(255, 255, 255, 0.2); color: rgba(255, 248, 232, 0.75); }
.meeting-hero-winner { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.meeting-hero-winner .avatar { background: rgba(255, 248, 232, 0.14); color: #fff8e8; border-color: rgba(255, 255, 255, 0.15); }
.meeting-hero-winner strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; margin-top: 2px; }
.winner-wa { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: rgba(255, 248, 232, 0.65); margin-top: 3px; }
.winner-wa svg { width: 12px; height: 12px; }
.winner-empty { display: flex; align-items: center; gap: 12px; }
.winner-spark { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(217, 154, 61, 0.16); color: var(--gold); }
.winner-spark svg { width: 22px; height: 22px; }
.winner-empty strong { font-family: var(--serif); font-size: 18px; }
.winner-empty p { font-size: 11px; color: rgba(255, 248, 232, 0.55); margin-top: 2px; }
.winner-note { display: block; font-size: 9.5px; color: var(--gold); margin-top: 3px; }
.next-winner-card { display: flex; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.next-winner-card.is-set { background: var(--mint-2); border-color: var(--mint); }
.next-winner-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); flex: 0 0 auto; }
.next-winner-icon svg { width: 18px; height: 18px; }
.next-winner-copy { flex: 1; min-width: 0; }
.next-winner-copy strong { display: block; font-size: 12.5px; margin-top: 1px; }
.next-winner-copy p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.next-winner-action { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.member-policy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.member-policy-item { display: flex; gap: 10px; padding: 13px; border-radius: 12px; background: var(--surface-2); }
.policy-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--forest-3); flex: 0 0 auto; }
.policy-icon svg { width: 15px; height: 15px; }
.member-policy-item > div { min-width: 0; }
.member-policy-item small { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.member-policy-item strong { display: block; font-size: 12px; margin-top: 1px; }
.member-policy-item p { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-banner { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.inline-banner-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; background: var(--gold-soft); color: var(--gold-2); }
.inline-banner-icon svg { width: 16px; height: 16px; }
.inline-banner > div { flex: 1; min-width: 0; }
.inline-banner strong { font-size: 12.5px; }
.inline-banner p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.banner-amber { background: var(--gold-soft); border-color: #efd9ae; }
.banner-amber .inline-banner-icon { background: rgba(255, 255, 255, 0.5); }
.payment-head { align-items: flex-end; }
.payment-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.payment-table td { vertical-align: middle; }
.pay-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 6px 11px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; font-size: 11.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pay-chip:hover { border-color: var(--forest-3); background: var(--mint-2); color: var(--forest); }
.pay-chip svg { width: 13px; height: 13px; }
.pay-chip.is-paid { border-style: solid; border-color: transparent; background: var(--mint); color: var(--forest); }
.pay-chip.is-paid:hover { background: var(--danger-soft); color: var(--danger); }
.pay-chip.is-paid.sos { background: var(--gold-soft); color: #7b5311; }
.pay-chip.is-paid.sos:hover { background: var(--danger-soft); color: var(--danger); }
.pay-chip.is-frozen { border-style: solid; border-color: var(--mint); background: var(--mint-2); color: var(--forest); cursor: default; }
.pay-chip.is-frozen:hover { border-color: var(--mint); background: var(--mint-2); color: var(--forest); }
.payment-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.payment-foot-note { color: var(--gold-2); }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-card { padding: 0; overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.data-table th { padding: 11px 14px; text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); font-weight: 800; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(248, 243, 232, 0.55); }
.data-table tr.clickable { cursor: pointer; }
.member-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.member-cell > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.member-cell strong { font-size: 12.5px; font-weight: 700; }
.member-cell small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.row-actions { white-space: nowrap; }
.row-actions > * { vertical-align: middle; }
.row-arrow { width: 14px; height: 14px; color: var(--muted-2); display: inline-block; }
.table-empty { text-align: center; color: var(--muted); padding: 30px !important; }

/* ==========================================================================
   Anggota detail
   ========================================================================== */
.member-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.member-hero-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.member-hero h2 { font-family: var(--serif); font-size: 29px; line-height: 1.1; font-weight: 600; margin-top: 2px; }
.member-hero p { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 3px; }
.member-hero p svg { width: 13px; height: 13px; color: var(--wa); }
.member-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.member-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ==========================================================================
   Kas
   ========================================================================== */
.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.field-inline { min-width: 150px; }
.field-inline input { min-height: 38px; padding: 7px 10px; font-size: 12px; }
.grid-kas { grid-template-columns: 1fr 1fr; }
.breakdown-list { display: flex; flex-direction: column; gap: 14px; }
.breakdown-row { display: flex; flex-direction: column; gap: 6px; }
.breakdown-label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.breakdown-label strong { margin-left: auto; color: var(--ink); font-size: 12.5px; }
.breakdown-row small { font-size: 10px; color: var(--muted-2); }
.kas-saldo { margin-top: 18px; padding: 15px; border-radius: 13px; background: var(--forest); color: #fff8e8; display: flex; flex-direction: column; gap: 2px; }
.kas-saldo span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 248, 232, 0.6); }
.kas-saldo strong { font-family: var(--serif); font-size: 25px; font-weight: 600; }
.kas-saldo small { font-size: 10px; color: rgba(255, 248, 232, 0.5); }
.debt-list { display: flex; flex-direction: column; }
.debt-row { display: flex; align-items: center; gap: 9px; padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.debt-row:last-child { border-bottom: 0; }
.debt-row:hover { background: var(--surface-2); }
.debt-row > span:not(.avatar) { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.debt-row strong { font-size: 12px; }
.debt-row small { font-size: 10px; color: var(--muted); }
.debt-row em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--danger); }
.tx-cell { display: flex; align-items: center; gap: 9px; }
.tx-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.tx-icon svg { width: 13px; height: 13px; }
.tx-in { background: var(--mint); color: var(--forest-3); }
.tx-out { background: var(--gold-soft); color: var(--gold-2); }
.tx-cell > div { display: flex; flex-direction: column; gap: 1px; }
.tx-cell strong { font-size: 12px; }
.tx-cell small { font-size: 10px; color: var(--muted); }

/* ==========================================================================
   WhatsApp
   ========================================================================== */
.wa-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 18px; align-items: stretch; }
.wa-connection { display: flex; flex-direction: column; gap: 15px; }
.wa-connection-head { display: flex; align-items: center; gap: 11px; }
.wa-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--wa-soft); color: var(--wa); }
.wa-logo svg { width: 21px; height: 21px; }
.wa-connection-head h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.wa-connection-head p { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); }
.status-dot.on { background: var(--forest-3); box-shadow: 0 0 0 3px rgba(47, 122, 94, 0.14); }
.wa-connect-body { display: flex; align-items: center; gap: 13px; padding: 13px; border-radius: 13px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.wa-connect-art { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--forest-3); flex: 0 0 auto; }
.wa-connect-art svg { width: 22px; height: 22px; }
.wa-connect-body strong { font-size: 12.5px; }
.wa-connect-body p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wa-profile { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 13px; background: var(--mint-2); border: 1px solid var(--mint); }
.wa-profile-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; }
.wa-profile > div:nth-child(2) { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.wa-profile strong { font-size: 12.5px; }
.wa-profile span { font-size: 10.5px; color: var(--muted); }
.wa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wa-error { font-size: 10.5px; color: var(--danger); }
.qr-wrap { display: flex; align-items: center; gap: 18px; }
.qr-image { width: 170px; height: 170px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.qr-instruction strong { font-size: 13px; }
.qr-instruction p { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.qr-instruction small { display: block; font-size: 10px; color: var(--muted-2); margin-top: 6px; }
.queue-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.queue-stats > div { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 12px; background: var(--surface-2); gap: 2px; }
.queue-stats strong { font-family: var(--serif); font-size: 24px; line-height: 1; }
.queue-stats span { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.queue-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); font-size: 11px; color: var(--muted); }
.wa-actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wa-action-card { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-align: left; box-shadow: var(--shadow-sm); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.wa-action-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.wa-action-card > div { flex: 1; min-width: 0; }
.wa-action-card strong { display: block; font-size: 12.5px; }
.wa-action-card p { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.wa-action-card > svg { width: 15px; height: 15px; color: var(--muted-2); }
.wa-action-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.wa-action-icon svg { width: 19px; height: 19px; }
.wa-green { background: var(--wa-soft); color: var(--wa); }
.wa-blue { background: var(--blue-soft); color: var(--blue); }
.wa-gold { background: var(--gold-soft); color: var(--gold-2); }
.message-preview { max-width: 360px; }
.message-preview span { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-preview small { display: block; font-size: 10px; margin-top: 2px; }

/* ==========================================================================
   Pengaturan
   ========================================================================== */
.settings-page { gap: 26px; }
.settings-section { display: flex; flex-direction: column; gap: 10px; }
.settings-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.settings-section-head h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin-top: 2px; }
.settings-section-head p { font-size: 12px; color: var(--muted); margin-top: 3px; max-width: 720px; }
.settings-section .card { padding: 20px; }
.settings-section .form-grid + .field, .settings-section .field + .field { margin-top: 14px; }
.settings-section .form-grid .field { margin-top: 0; }
.placeholder-help { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.placeholder-help code, .settings-page code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; font-size: 10.5px; color: var(--forest-2); }
.settings-bottom { grid-template-columns: 1fr 1fr; }
.data-card { display: flex; flex-direction: column; gap: 2px; }
.data-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.data-row:last-child { border-bottom: 0; }
.data-row > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.data-row strong { font-size: 12.5px; }
.data-row small { font-size: 10.5px; color: var(--muted); }
.data-row.danger-row { margin-top: 4px; padding: 12px; border-radius: 10px; background: var(--danger-soft); border: 0; }
.app-version { text-align: center; color: var(--muted-2); font-size: 10.5px; padding: 4px 0 12px; }

/* ==========================================================================
   Setup
   ========================================================================== */
.setup-shell { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 100vh; }
.setup-side { position: relative; padding: 42px 46px; color: #fff8e8; background: radial-gradient(600px 500px at 90% 0%, rgba(217, 154, 61, 0.18), transparent 60%), radial-gradient(500px 500px at 0% 100%, rgba(47, 122, 94, 0.4), transparent 60%), #10382e; display: flex; flex-direction: column; gap: 34px; overflow: hidden; }
.setup-side::after { content: ""; position: absolute; inset: 0; opacity: 0.16; background-image: radial-gradient(rgba(255, 255, 255, 0.3) 0.7px, transparent 0.7px); background-size: 20px 20px; pointer-events: none; }
.setup-side > * { position: relative; z-index: 1; }
.setup-brand { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 22px; }
.setup-side-copy { max-width: 430px; }
.setup-side-copy h1 { font-family: var(--serif); font-size: clamp(32px, 3.3vw, 46px); line-height: 1.06; font-weight: 600; margin: 8px 0 10px; }
.setup-side-copy p { font-size: 13px; color: rgba(255, 248, 232, 0.65); line-height: 1.6; }
.setup-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.setup-steps li { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, 0.08); opacity: 0.55; }
.setup-steps li.active { opacity: 1; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); }
.setup-steps li > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); font-size: 11px; font-weight: 800; }
.setup-steps li.active > span { background: var(--gold); color: #2b2110; }
.setup-steps strong { display: block; font-size: 12.5px; }
.setup-steps small { display: block; font-size: 10.5px; color: rgba(255, 248, 232, 0.55); }
.setup-quote { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.setup-quote p { font-family: var(--serif); font-size: 17px; font-style: italic; color: rgba(255, 248, 232, 0.85); }
.setup-quote span { display: block; margin-top: 6px; font-size: 10.5px; color: rgba(255, 248, 232, 0.45); }
.setup-main { display: flex; align-items: center; justify-content: center; padding: 38px 34px; overflow-y: auto; }
.setup-card { width: min(640px, 100%); }
.setup-head { margin-bottom: 22px; }
.setup-head h2 { font-family: var(--serif); font-size: 32px; font-weight: 600; margin-top: 3px; }
.setup-head p { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.setup-tools { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ==========================================================================
   Modal
   ========================================================================== */
#modal-root { position: relative; z-index: 100; }
.modal-backdrop { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 30, 24, 0.52); backdrop-filter: blur(4px); animation: fade 0.18s ease both; }
.modal { width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); animation: pop 0.2s ease both; overflow: hidden; }
.modal-sm { width: min(430px, 100%); }
.modal-lg { width: min(860px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-family: var(--serif); font-size: 23px; font-weight: 600; }
.modal-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 18px 22px; overflow-y: auto; min-height: 0; }
.modal-body .field + .field, .modal-body .form-grid + .field, .modal-body .field + .form-grid { margin-top: 13px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 13px 22px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.confirm-text { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.receipt-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--mint-2); border: 1px solid var(--mint); }
.receipt-summary span { font-size: 11px; color: var(--muted); }
.receipt-summary strong { font-family: var(--serif); font-size: 22px; color: var(--forest); }
.nota-frame { position: fixed; left: -10000px; top: 0; width: 148mm; height: 210mm; border: 0; opacity: 0; pointer-events: none; }
.settings-section .card .check-field + .check-field { margin-top: 9px; }
.close-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.close-summary > div { padding: 11px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; }
.close-summary span { font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; }
.close-summary strong { font-size: 13px; }
.success-mark { width: 58px; height: 58px; margin: 4px auto 14px; border-radius: 50%; background: var(--mint); color: var(--forest-3); display: grid; place-items: center; }
.success-mark svg { width: 28px; height: 28px; }
.danger-box { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 12px; margin-bottom: 14px; }
.danger-box svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; }

.undian-stage { text-align: center; padding: 8px 0 4px; }
.undian-name { font-family: var(--serif); font-size: clamp(28px, 5vw, 42px); line-height: 1.15; min-height: 52px; display: flex; align-items: center; justify-content: center; margin: 12px 0; color: var(--forest); }
.undian-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; max-height: 140px; overflow-y: auto; }
.undian-names span { font-size: 10px; padding: 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.undian-winner { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 18px 0 10px; }
.undian-winner strong { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.undian-winner span { font-size: 12px; color: var(--gold-2); }
.restan-list { display: flex; flex-direction: column; gap: 12px; }
.restan-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.restan-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); }
.restan-head strong { font-size: 12px; }
.restan-head em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--danger); }
.restan-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.restan-row > div { display: flex; gap: 5px; flex-wrap: wrap; }
.restan-stats { margin-bottom: 14px; }
.restan-note { margin-bottom: 14px; }
.text-coral { color: var(--danger); }
.text-forest { color: var(--forest); }
.restan-group { padding: 0; margin-bottom: 14px; }
.restan-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.restan-meeting h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 2px 0; }
.restan-meeting h3 small { font-family: var(--sans); font-size: 10.5px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.restan-meeting p { font-size: 11.5px; color: var(--muted); }
.restan-meeting p strong { color: var(--ink-2); }
.restan-group-money { display: flex; gap: 20px; }
.restan-group-money > div { display: flex; flex-direction: column; gap: 2px; text-align: right; }
.restan-group-money span { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.restan-group-money strong { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.restan-group-body { display: grid; grid-template-columns: 1fr; }
.restan-block { padding: 14px 18px; min-width: 0; }
.restan-block + .restan-block { border-left: 0; border-top: 1px solid var(--line); }
.restan-table td:last-child, .restan-table th:last-child { width: 78px; white-space: nowrap; }
.restan-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.restan-block-head h4 { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; }
.restan-block-head small { font-size: 9.5px; color: var(--muted); }
.restan-table th { font-size: 9px; padding: 6px 7px; }
.restan-table td { padding: 7px; font-size: 11px; }
.restan-table .member-cell small { font-size: 9px; }
.restan-group-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.restan-group-foot > p { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.restan-group-foot > p svg { width: 13px; height: 13px; color: var(--forest-3); flex: 0 0 auto; }
.restan-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.restan-empty { text-align: center; padding: 38px 20px; }
.restan-empty .stat-icon { margin: 0 auto 10px; }
.restan-empty h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.restan-empty p { font-size: 12px; color: var(--muted); margin: 4px 0 14px; }
.restan-pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0; }
.restan-pay-options .check-field { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.restan-pay-options .check-field small { display: block; font-family: var(--serif); font-size: 16px; color: var(--forest); margin-top: 2px; }
.restan-free-input { margin-top: 5px; }
.restan-free-input input { min-width: 0; width: 100%; }
.restan-pay-options .check-field:has(input:disabled) { opacity: 0.55; }
.restan-pay-total { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; border-radius: 9px; background: var(--mint-2); border: 1px solid var(--mint); }
.restan-pay-total span { font-size: 11px; color: var(--muted); }
.restan-pay-total strong { font-family: var(--serif); font-size: 18px; color: var(--forest); }
.restan-modal-callout { margin: 0 0 12px; }
.form-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; font-size: 10px; color: var(--muted); line-height: 1.45; }
.form-hint svg { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; color: var(--gold-2); }
.user-menu-head { display: flex; align-items: center; gap: 13px; padding: 4px 2px 16px; border-bottom: 1px solid var(--line); }
.user-menu-head > div { display: flex; flex-direction: column; gap: 2px; }
.user-menu-head strong { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.user-menu-head span { font-size: 11px; color: var(--muted); }
.user-menu-actions { display: flex; flex-direction: column; padding-top: 8px; }
.user-menu-item { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font-size: 12.5px; font-weight: 600; }
.user-menu-item:last-child { border-bottom: 0; }
.user-menu-item svg { width: 16px; height: 16px; color: var(--muted); }
.user-menu-item svg:last-child { margin-left: auto; width: 14px; height: 14px; }
.user-menu-item:hover { color: var(--forest); }
.user-menu-item.danger { color: var(--danger); }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 240px; max-width: 360px; padding: 12px 14px; border-radius: 13px; background: #123f33; color: #fff8e8; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity 0.2s ease, transform 0.2s ease; pointer-events: auto; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast p { font-size: 12px; line-height: 1.4; }
.toast-icon { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); display: grid; place-items: center; flex: 0 0 auto; color: #dfeee5; }
.toast-icon svg { width: 13px; height: 13px; }
.toast-err { background: #7c2f28; }
.toast-err .toast-icon { color: #ffd9d2; }

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-5px); opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-kas { grid-template-columns: 1fr; }
  .settings-bottom { grid-template-columns: 1fr; }
  .wa-actions-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: minmax(0, 1.35fr) minmax(200px, 0.65fr); }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 230px; }
  .view { padding: 24px 22px 90px; }
  .topbar { padding: 12px 22px; }
  .topbar-date { display: none; }
  .hero { grid-template-columns: 1fr; padding: 28px; }
  .hero-side { flex-direction: row; justify-content: flex-start; }
  .hero-wheel { width: 130px; height: 130px; }
  .hero-wheel-center { width: 92px; height: 92px; }
  .hero-wheel-center strong { font-size: 34px; }
  .hero-mini { flex-direction: column; align-items: flex-start; gap: 5px; text-align: left; }
  .meeting-hero { grid-template-columns: 1fr; }
  .wa-grid { grid-template-columns: 1fr; }
  .setup-shell { grid-template-columns: 1fr; }
  .setup-side { display: none; }
  .setup-main { min-height: 100vh; padding: 26px 20px; }
}
@media (max-width: 760px) {
  body { font-size: 13.5px; }
  .sidebar { transform: translateX(-105%); transition: transform 0.22s ease; width: 270px; box-shadow: var(--shadow-lg); }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .app-shell.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10, 30, 24, 0.45); }
  .main { margin-left: 0; }
  .topbar { min-height: 68px; padding: 10px 16px; gap: 10px; }
  .topbar-title h1 { font-size: 20px; }
  .topbar-title .eyebrow { font-size: 9px; }
  .mobile-only { display: inline-flex !important; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { width: 38px; min-height: 38px; padding: 0; border-radius: 50%; }
  .topbar-user { width: 36px; height: 36px; }
  .view { padding: 18px 14px 92px; }
  .page { gap: 16px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-head h2 { font-size: 27px; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1; }
  .hero { padding: 22px 20px; border-radius: 20px; gap: 16px; }
  .hero h2 { font-size: 31px; }
  .hero-side { display: none; }
  .hero-actions .btn { flex: 1; }
  .hero-progress { margin-top: 16px; }
  .stat-grid, .stat-grid-4 { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { padding: 12px; gap: 9px; align-items: flex-start; }
  .stat-icon { width: 32px; height: 32px; border-radius: 9px; }
  .stat-card strong { font-size: 19px; }
  .stat-money { font-size: 14px !important; }
  .stat-card small { font-size: 9px; white-space: normal; }
  .stat-label { font-size: 8.5px; }
  .stat-arrow { display: none; }
  .card { padding: 16px; border-radius: 16px; }
  .restan-group { padding: 0; }
  .restan-group-body { grid-template-columns: 1fr; }
  .restan-block { padding: 13px 14px; }
  .restan-block + .restan-block { border-left: 0; border-top: 1px solid var(--line); }
  .restan-group-head { padding: 14px; }
  .restan-group-money { width: 100%; gap: 18px; }
  .restan-group-money > div { text-align: left; }
  .restan-group-foot { flex-direction: column; align-items: flex-start; padding: 12px 14px; }
  .restan-actions { width: 100%; }
  .restan-actions .btn { flex: 1; }
  .card-head h3 { font-size: 18px; }
  .progress-wrap { flex-direction: column; align-items: flex-start; gap: 14px; }
  .donut { width: 110px; height: 110px; }
  .donut-inner { width: 82px; height: 82px; }
  .quick-actions { grid-template-columns: 1fr 1fr 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .segmented { overflow-x: auto; }
  .segmented button { white-space: nowrap; }
  .search-box { min-width: 0; width: 100%; }
  .meeting-grid { grid-template-columns: 1fr; }
  .meeting-hero { padding: 20px; border-radius: 18px; }
  .meeting-hero-title > strong { font-size: 42px; }
  .meeting-hero-title h2 { font-size: 23px; }
  .meeting-hero-winner { padding: 12px; }
  .action-row { display: grid; grid-template-columns: 1fr 1fr; }
  .action-row .btn { width: 100%; }
  .member-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .member-hero-main { gap: 13px; }
  .member-hero h2 { font-size: 24px; }
  .avatar-xl { width: 58px; height: 58px; font-size: 18px; }
  .member-hero-actions { width: 100%; justify-content: flex-start; }
  .inline-banner { flex-wrap: wrap; }
  .inline-banner > div { flex-basis: calc(100% - 50px); }
  .inline-banner .btn { margin-left: 47px; }
  .next-winner-card { flex-wrap: wrap; }
  .next-winner-copy { flex-basis: calc(100% - 55px); }
  .next-winner-action { width: 100%; justify-content: flex-end; }
  .member-policy-grid { grid-template-columns: 1fr; }
  .scheme-options { grid-template-columns: 1fr; }
  .scheme-lock-action { flex-direction: column; align-items: stretch; }
  .scheme-lock-action .btn { width: 100%; }
  .payment-head { flex-direction: column; align-items: stretch; }
  .payment-head-actions { width: 100%; }
  .payment-head-actions .search-box { flex: 1; }
  .data-table { min-width: 560px; }
  .summary-strip { gap: 6px 14px; }
  .filter-bar { gap: 8px; }
  .filter-bar .field { flex: 1; min-width: 120px; }
  .close-summary { grid-template-columns: 1fr; }
  .setup-card .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .modal-backdrop { padding: 10px; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 20px 20px 14px 14px; }
  .modal-head, .modal-body { padding-left: 17px; padding-right: 17px; }
  .modal-foot { padding: 12px 17px 16px; }
  .modal-foot .btn { flex: 1; }
  .toast-root { left: 14px; right: 14px; bottom: 86px; align-items: stretch; }
  .toast { max-width: none; }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 68px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 248, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }
  .bottom-item { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 600; width: 58px; padding: 4px 0; }
  .bottom-item svg { width: 20px; height: 20px; }
  .bottom-item.active { color: var(--forest); }
  .bottom-item.active svg { color: var(--forest-3); }
  .bottom-add { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--bg); background: var(--forest); color: #fff8e8; display: grid; place-items: center; margin-top: -20px; box-shadow: 0 8px 18px rgba(18, 63, 51, 0.28); }
  .bottom-add svg { width: 22px; height: 22px; }
  .qr-wrap { flex-direction: column; align-items: flex-start; }
  .wa-actions-grid { grid-template-columns: 1fr; }
  .wa-grid { gap: 12px; }
  .settings-section-head { flex-direction: column; align-items: flex-start; }
  .settings-section .form-grid { grid-template-columns: 1fr; }
  .data-row { flex-wrap: wrap; }
  .app-version { padding-bottom: 8px; }
}
@media (max-width: 420px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .action-row { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  .stat-grid, .stat-grid-4 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
