/* Surau Al-Amin — Sistem Pengurusan Surau · design system */

:root {
  --navy-900: #071235;
  --navy-800: #0c1a44;
  --navy-700: #122152;
  --navy-600: #1b2d6b;
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #e6eaf3;
  --border-soft: #eef1f8;
  --text: #182135;
  --text-muted: #838da3;
  --text-soft: #aab1c2;
  --text-inverse: #f4f6ff;
  --primary: #1f9d76;         /* emerald — masjid green */
  --primary-dark: #17805f;
  --primary-soft: #e4f6ef;
  --gold: #c69a3f;
  --gold-soft: #f8f0dd;
  --teal: #0ea5a3;
  --teal-soft: #e0f6f5;
  --blue: #3b6ff2;
  --blue-soft: #eaf0ff;
  --purple: #8b5cf6;
  --purple-soft: #f1ecfe;
  --orange: #f59e0b;
  --orange-soft: #fef3e2;
  --red: #ef4444;
  --red-soft: #fdeaea;
  --green: #10b981;
  --green-soft: #e7f9f2;
  --pink: #ec4899;
  --pink-soft: #fdeaf3;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -12px rgba(16, 24, 40, .10);
  --shadow-pop: 0 12px 32px -8px rgba(16, 24, 40, .18);
  --sidebar-w: 266px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* ---------- Layout shell ---------- */
.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--text-inverse); position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column; z-index: 40; transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.sidebar-brand .logo-badge {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 6px 16px -4px rgba(31,157,118,.5);
}
.sidebar-brand .logo-badge svg { width: 24px; height: 24px; color: #fff; }
.sidebar-brand .brand-text .name { font-weight: 700; font-size: 16px; color: #fff; letter-spacing: .2px; }
.sidebar-brand .brand-text .tag { font-size: 11px; color: #93a0c9; margin-top: 2px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 14px; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 6px; }
.sidebar-section-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: #6a76a3; margin: 18px 10px 8px; font-weight: 700;
}
.sidebar-nav a.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  margin-bottom: 2px; color: #c3cae6; font-size: 13.6px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.sidebar-nav a.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar-nav a.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.nav-item.active { background: rgba(31,157,118,.22); color: #fff; box-shadow: inset 3px 0 0 var(--primary); }
.sidebar-nav a.nav-item.active svg { opacity: 1; }
.sidebar-nav a.nav-item .badge-count {
  margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
}
.sidebar-nav a.nav-item .badge-count.amber { background: var(--orange); }

.sidebar-user { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #a97f2e);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px;
}
.sidebar-user .who { flex: 1; min-width: 0; }
.sidebar-user .who .n { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who .r { color: #8a93c2; font-size: 11.5px; }
.sidebar-user button.logout-btn {
  background: rgba(255,255,255,.06); border: none; color: #c3cae6; width: 32px; height: 32px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.sidebar-user button.logout-btn:hover { background: rgba(239,68,68,.25); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(244,246,251,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft); padding: 15px 28px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.topbar-title h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.topbar-title p { margin: 2px 0 0; color: var(--text-muted); font-size: 12.6px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; align-items: center; justify-content: center; flex-shrink: 0; }
.hamburger svg { width: 18px; height: 18px; }

.search-box { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; min-width: 230px; color: var(--text-muted); }
.search-box svg { width: 16px; height: 16px; flex-shrink: 0; }
.search-box input { border: none; outline: none; background: transparent; font-size: 13px; width: 100%; color: var(--text); }

.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.icon-btn svg { width: 17px; height: 17px; color: var(--text-muted); }
.icon-btn .ping { position: absolute; top: -3px; right: -3px; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 999px; }

.lang-switch { display: flex; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang-switch a { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.lang-switch a.active { background: var(--navy-800); color: #fff; }

.topbar-avatar { display: flex; align-items: center; gap: 8px; }
.topbar-avatar .av { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg,var(--primary),var(--teal)); display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:13px; }

.content { padding: 24px 28px 90px; flex: 1; }

.status-footer { position: sticky; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--border-soft); padding: 10px 28px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.status-footer .item { display: flex; align-items: center; gap: 6px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-footer .spacer { flex: 1; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .pt { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.page-head .ps { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
.grid-stats-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: 2fr 1fr; }
.grid-2e { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.mb-18 { margin-bottom: 18px; }
.mt-18 { margin-top: 18px; }
@media (max-width: 1100px) { .grid-2, .grid-3, .grid-4, .grid-2e { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 20px; }
.card.pad-lg { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.card-head h3 { font-size: 15px; font-weight: 700; margin: 0; }
.card-head .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.card-link { font-size: 12.5px; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 3px; }
.card-link svg { width: 14px; height: 14px; }

.stat-card { display: flex; flex-direction: column; gap: 12px; }
.stat-card .top-row { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-icon { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.stat-icon svg { width: 21px; height: 21px; }
.stat-card .label { color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.stat-card .value { font-size: 24px; font-weight: 800; letter-spacing: -.5px; margin-top: 3px; }
.stat-card .value small { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.stat-change { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; width: fit-content; }
.stat-change.up { color: var(--green); background: var(--green-soft); }
.stat-change.down { color: var(--red); background: var(--red-soft); }
.stat-change.flat { color: var(--text-muted); background: var(--border-soft); }
.stat-change svg { width: 12px; height: 12px; }
.stat-sub { font-size: 11.5px; color: var(--text-soft); }

/* icon tints */
.tint-primary { background: var(--primary-soft); color: var(--primary); }
.tint-gold { background: var(--gold-soft); color: var(--gold); }
.tint-teal { background: var(--teal-soft); color: var(--teal); }
.tint-blue { background: var(--blue-soft); color: var(--blue); }
.tint-purple { background: var(--purple-soft); color: var(--purple); }
.tint-orange { background: var(--orange-soft); color: #b06a00; }
.tint-red { background: var(--red-soft); color: var(--red); }
.tint-green { background: var(--green-soft); color: var(--green); }
.tint-pink { background: var(--pink-soft); color: var(--pink); }

/* badges / pills */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge-green { background: var(--green-soft); color: #0a7a5a; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-orange { background: var(--orange-soft); color: #b06a00; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-teal { background: var(--teal-soft); color: #0a7d7b; }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-gold { background: var(--gold-soft); color: #8a6a1f; }
.badge-gray { background: var(--border-soft); color: var(--text-muted); }
.badge-dot::before { content:''; width:6px; height:6px; border-radius:50%; background: currentColor; display:inline-block; }

/* tables */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data-table td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data-table td.nowrap, table.data-table th.nowrap { white-space: nowrap; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tbody tr { transition: background .12s; }
table.data-table tbody tr:hover td { background: #fafbfe; }
table.data-table td.num, table.data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px; background: var(--border-soft); font-weight: 700; font-size: 11.5px; color: var(--text-muted); }
.rank-num.gold { background: var(--gold-soft); color: #8a6a1f; }
.progress-track { width: 100%; height: 7px; background: var(--border-soft); border-radius: 999px; overflow: hidden; min-width: 70px; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--teal)); }

/* avatars in tables/lists */
.person { display: flex; align-items: center; gap: 10px; }
.person .pa { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; background: linear-gradient(135deg,var(--primary),var(--teal)); }
.person .pa.c1 { background: linear-gradient(135deg,var(--blue),var(--purple)); }
.person .pa.c2 { background: linear-gradient(135deg,var(--gold),#a97f2e); }
.person .pa.c3 { background: linear-gradient(135deg,var(--pink),var(--purple)); }
.person .pa.c4 { background: linear-gradient(135deg,var(--teal),var(--primary)); }
.person .pn { font-weight: 600; font-size: 13.3px; }
.person .pm { font-size: 11.5px; color: var(--text-muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; border-radius: 10px; font-size: 13.4px; font-weight: 700; border: 1px solid transparent; transition: all .14s ease; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #b0862f; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger-outline { background: #fff; border-color: var(--red-soft); color: var(--red); }
.btn-danger-outline:hover { background: var(--red-soft); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; width: 34px; height: 34px; }
.btn-icon svg { width: 16px; height: 16px; }

/* forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field label .req { color: var(--red); }
.field .hint { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=date], .field input[type=time], .field input[type=file], .field input[type=tel], .field select, .field textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; font-size: 13.5px; background: #fff; color: var(--text); outline: none; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.error-text { color: var(--red); font-size: 12px; margin-top: 5px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 700; font-size: 13px; }
.input-prefix input { padding-left: 40px !important; }

/* filter bar */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-bar .search-field { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; }
.filter-bar .search-field svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.filter-bar .search-field input { border: none; outline: none; background: transparent; font-size: 13.5px; width: 100%; }
.filter-bar select { padding: 9px 13px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; background: #fff; color: var(--text); font-family: inherit; min-width: 140px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; flex-wrap: wrap; }
.tabs a { padding: 11px 6px; margin-right: 20px; font-size: 13.2px; font-weight: 700; color: var(--text-muted); border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 7px; }
.tabs a svg { width: 15px; height: 15px; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }
.tabs a:hover { color: var(--text); }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.alert svg { width: 17px; height: 17px; flex-shrink: 0; }
.alert-success { background: var(--green-soft); color: #0a7a5a; }
.alert-error { background: var(--red-soft); color: #b02323; }
.alert-info { background: var(--blue-soft); color: #2456c9; }
.alert-warn { background: var(--orange-soft); color: #a8710a; }

.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state .es-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--border-soft); display:flex; align-items:center; justify-content:center; margin: 0 auto 16px; }
.empty-state .es-ic svg { width: 30px; height: 30px; opacity: .5; }
.empty-state h4 { font-size: 15px; color: var(--text); margin: 0 0 6px; }
.empty-state p { font-size: 13px; margin: 0 0 18px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }

/* definition list / show pages */
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 0; }
.dl dt { padding: 12px 0; color: var(--text-muted); font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--border-soft); }
.dl dd { padding: 12px 0; margin: 0; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--border-soft); }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: none; }
@media (max-width: 620px) { .dl { grid-template-columns: 1fr; } .dl dd { padding-top: 0; border-bottom: 1px solid var(--border-soft); } .dl dt { border-bottom: none; padding-bottom: 2px; } }

/* timeline (audit / minutes / actions) */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 4px 0 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .dot { position: absolute; left: -22px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tl-item .dot.blue { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.tl-item .dot.gold { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.tl-item .dot.gray { background: var(--text-soft); box-shadow: 0 0 0 3px var(--border-soft); }
.tl-item .tt { font-weight: 700; font-size: 13.5px; }
.tl-item .tm { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* action item rows */
.action-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.action-item:last-child { border-bottom: none; }
.action-item .ai-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.action-item .ai-icon svg { width: 17px; height: 17px; }
.action-item .ai-body { flex: 1; min-width: 0; }
.action-item .ai-body .m { font-weight: 600; font-size: 13.4px; }
.action-item .ai-body .a { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }

/* meeting cards */
.meet-card { display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.meet-card .mdate { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 62px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-dark); flex-shrink: 0; }
.meet-card .mdate .d { font-size: 22px; font-weight: 800; line-height: 1; }
.meet-card .mdate .m { font-size: 11px; font-weight: 700; text-transform: uppercase; margin-top: 3px; }
.meet-row { display: flex; align-items: flex-start; gap: 14px; }
.meet-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.3px; color: var(--text-muted); }
.meet-meta span { display: inline-flex; align-items: center; gap: 5px; }
.meet-meta svg { width: 14px; height: 14px; }

/* member category dots */
.cat-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* fund balance card */
.fund-card { display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--primary); }
.fund-card .fh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fund-card .fname { font-weight: 700; font-size: 14.5px; }
.fund-card .fbal { font-size: 23px; font-weight: 800; letter-spacing: -.4px; }
.fund-card .fmeta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }
.fund-card .fmeta b { color: var(--text); }

.canvas-wrap { position: relative; width: 100%; }

/* login */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-hero { background: radial-gradient(circle at 25% 20%, #16265e, #071235 65%); color: #fff; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero .pattern { position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 26px 26px; }
.login-hero .lh-brand { display: flex; align-items: center; gap: 13px; position: relative; }
.login-hero .lh-brand .logo-badge { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(135deg, var(--primary), var(--teal)); display: flex; align-items: center; justify-content: center; }
.login-hero .lh-brand .logo-badge svg { width: 26px; height: 26px; color: #fff; }
.login-hero .lh-brand .bt .n { font-weight: 700; font-size: 17px; }
.login-hero .lh-brand .bt .t { font-size: 12px; color: #9aa6cf; }
.login-hero .lh-mid { position: relative; }
.login-hero .lh-mid h1 { font-size: 34px; line-height: 1.2; font-weight: 800; margin: 0 0 16px; letter-spacing: -.5px; }
.login-hero .lh-mid p { font-size: 14.5px; color: #b8c1e0; max-width: 420px; line-height: 1.6; }
.login-hero .lh-feats { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.login-hero .lh-feats .f { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #dbe1f4; }
.login-hero .lh-feats .f .fi { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.login-hero .lh-feats .f .fi svg { width: 17px; height: 17px; color: var(--primary); }
.login-hero .lh-foot { position: relative; font-size: 12px; color: #7986b0; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 30px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 24px; margin: 0 0 5px; font-weight: 800; }
.login-card p.sub { color: var(--text-muted); font-size: 13.5px; margin: 0 0 26px; }
.login-card .lang-mini { display: flex; gap: 6px; margin-bottom: 22px; }
.login-card .lang-mini a { font-size: 12px; font-weight: 700; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px; background: #fff; }
.login-card .lang-mini a.active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.demo-hint { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 12px; color: var(--text-muted); margin-top: 20px; line-height: 1.8; }
.demo-hint .dh-title { font-weight: 700; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.demo-hint .dh-row { display: flex; justify-content: space-between; gap: 10px; }
.demo-hint code { background: var(--bg); padding: 1px 6px; border-radius: 5px; color: var(--primary-dark); font-weight: 700; }
@media (max-width: 900px) { .login-shell { grid-template-columns: 1fr; } .login-hero { display: none; } }

/* section title */
.section-title { font-size: 14px; font-weight: 800; margin: 26px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title svg { width: 17px; height: 17px; color: var(--primary); }

/* mini stat inside cards */
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap: 12px; }
.mini-stats .ms { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.mini-stats .ms .l { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.mini-stats .ms .v { font-size: 18px; font-weight: 800; margin-top: 3px; }

.divider { height: 1px; background: var(--border-soft); margin: 18px 0; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.fw-700 { font-weight: 700; }
.amount-in { color: var(--green); font-weight: 700; }
.amount-out { color: var(--red); font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }

/* quorum meter */
.quorum { display: flex; align-items: center; gap: 12px; }
.quorum-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p)*1%), var(--border-soft) 0); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quorum-ring i { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; font-style: normal; }

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: flex; }
  .search-box { display: none; }
  .content { padding: 18px 16px 90px; }
  .topbar { padding: 13px 16px; }
  .status-footer { padding: 10px 16px; overflow-x: auto; }
  .dl { grid-template-columns: 1fr; }
}
body.sidebar-open::before { content: ''; position: fixed; inset: 0; background: rgba(7,18,53,.5); z-index: 35; }
