/* SedekahSubuh - Main CSS */
/* Islamic Green & Gold Theme */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  /* Islamic Green Palette */
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  /* Gold Accent */
  --gold:      #c9a227;
  --gold-light:#fef3c7;
  --gold-dark: #92740e;
  /* Primary - Islamic Deep Green */
  --primary:       #1a9a5c;
  --primary-dark:  #0f6b3f;
  --primary-light: #d1fae5;
  --secondary:     #0a4a2e;
  --accent:        #c9a227;
  /* Status */
  --danger:    #ef4444;
  --warning:   #f59e0b;
  --info:      #3b82f6;
  --success:   #10b981;
  /* Neutral */
  --bg:        #f5f7f5;
  --bg-chat:   #e8f5e9;
  --white:     #ffffff;
  --text:      #111827;
  --text-muted:#6b7280;
  --border:    #e5e7eb;
  /* Shadows */
  --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  /* Shape */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --font:      'Nunito', sans-serif;
  --nav-h:     60px;
  --bottom-h:  68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* ── Topbar ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: var(--shadow-md);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: white;
  box-shadow: 0 2px 8px rgba(201,162,39,0.4);
}
.topbar-title { font-size: 18px; font-weight: 800; color: white; }
.topbar-subtitle { font-size: 11px; color: rgba(255,255,255,.7); line-height: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: none; color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; position: relative; transition: background .2s;
}
.topbar-btn:hover { background: rgba(255,255,255,.25); }
.badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--gold); color: white;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Bottom Nav ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-h);
  background: white;
  border-top: 2px solid var(--primary-light);
  display: flex;
  box-shadow: 0 -4px 16px rgba(10,74,46,.12);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; color: var(--text-muted); transition: all .2s;
  text-decoration: none; font-size: 10px; font-weight: 600;
}
.bottom-nav-item.active { color: var(--primary-dark); }
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active svg { stroke: var(--primary-dark); }
.bnav-icon { position: relative; }
.bnav-icon-center {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(26,154,92,.4);
  margin-top: -20px;
}
.bnav-icon-center svg { stroke: white; width: 24px; height: 24px; }
.bottom-nav-item.center-item { color: var(--primary-dark); font-weight: 700; }

/* ── Main Content ── */
.main {
  padding-top: calc(var(--nav-h) + 16px);
  padding-bottom: calc(var(--bottom-h) + 16px);
  padding-left: 16px;
  padding-right: 16px;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Hero Banner ── */
.hero-banner {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 60%, var(--gold-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 16px;
  color: white;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '☪';
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 80px; opacity: 0.08; line-height: 1;
}
.hero-greeting { font-size: 13px; opacity: .8; margin-bottom: 4px; }
.hero-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.hero-sub { font-size: 12px; opacity: .75; font-style: italic; }
.hero-hadits {
  margin-top: 14px;
  background: rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  opacity: .9;
  font-style: italic;
  border-left: 3px solid var(--gold);
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  background: white; border-radius: var(--radius);
  padding: 16px 12px; text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--primary-light);
}
.stat-icon { font-size: 24px; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--primary-dark); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }

/* ── Cards ── */
.card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px;
}
.card-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-body { padding: 16px; }

/* ── Section Header ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; margin-top: 20px;
}
.section-title { font-size: 15px; font-weight: 800; color: var(--text); }
.section-link { font-size: 13px; font-weight: 600; color: var(--primary-dark); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm); font-family: var(--font);
  font-size: 14px; font-weight: 700; cursor: pointer; border: none;
  transition: all .2s; text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); color: white; }
.btn-gold:hover { opacity: .9; color: white; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: var(--primary-dark); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary-dark); }
.btn-outline:hover { background: var(--green-50); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 14px;
  color: var(--text); background: white; transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,154,92,.12); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ── Alert / Flash ── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-success { background: var(--primary-light); color: var(--primary-dark); border-left: 4px solid var(--primary); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }
.alert-danger  { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid var(--info); }
.alert-gold    { background: var(--gold-light); color: var(--gold-dark); border-left: 4px solid var(--gold); }

/* ── Tags / Badges ── */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.tag-green  { background: var(--primary-light); color: var(--primary-dark); }
.tag-gold   { background: var(--gold-light); color: var(--gold-dark); }
.tag-red    { background: #fee2e2; color: #991b1b; }
.tag-yellow { background: #fef3c7; color: #92400e; }
.tag-blue   { background: #eff6ff; color: #1e40af; }
.tag-gray   { background: #f3f4f6; color: #374151; }

/* ── List Items ── */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-size: 14px; font-weight: 700; color: var(--text); }
.list-item-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.list-item-right { text-align: right; flex-shrink: 0; }

/* ── Kegiatan Card ── */
.kegiatan-card {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden; cursor: pointer;
  transition: box-shadow .2s;
}
.kegiatan-card:hover { box-shadow: var(--shadow-md); }
.kegiatan-card.pinned { border-left: 4px solid var(--gold); }
.kegiatan-img { width: 100%; height: 150px; object-fit: cover; }
.kegiatan-body { padding: 14px 16px; }
.kegiatan-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.kegiatan-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.kegiatan-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.kegiatan-footer {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}
.kegiatan-time {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--primary-dark); font-weight: 700;
  padding: 6px 12px; background: var(--primary-light); border-radius: 20px;
  margin-top: 8px; width: fit-content;
}

/* ── Webinar Card ── */
.webinar-card {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden;
}
.webinar-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  padding: 16px; color: white;
}
.webinar-platform {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.2); padding: 4px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 700; margin-bottom: 8px;
}
.webinar-title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.webinar-pemateri { font-size: 12px; opacity: .8; margin-top: 4px; }
.webinar-body { padding: 14px 16px; }
.webinar-info { display: flex; flex-direction: column; gap: 8px; }
.webinar-info-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-muted);
}
.webinar-info-item strong { color: var(--text); }
.webinar-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.status-live { color: #ef4444; font-weight: 700; animation: pulse-red 1.5s infinite; }
@keyframes pulse-red { 0%,100%{ opacity:1 } 50%{ opacity:.5 } }

/* ── Sedekah Card ── */
.sedekah-card {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden;
}
.sedekah-header {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  padding: 14px 16px; color: white;
}
.sedekah-nama { font-size: 16px; font-weight: 800; }
.sedekah-body { padding: 14px 16px; }
.progress-bar-wrap {
  background: var(--border); border-radius: 20px; height: 10px; overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar {
  height: 100%; border-radius: 20px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 100%);
  transition: width .6s ease;
}
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}
.progress-label strong { color: var(--primary-dark); }

/* ── Forum Card ── */
.forum-card {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 10px; overflow: hidden; cursor: pointer; transition: box-shadow .2s;
}
.forum-card:hover { box-shadow: var(--shadow-md); }
.forum-card.pinned { border-left: 4px solid var(--gold); }
.forum-card-body { padding: 14px 16px; }
.forum-card-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.forum-card-excerpt { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.forum-card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); }
.forum-card-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--primary-dark);
  flex-shrink: 0;
}

/* ── Forum Thread ── */
.thread-post {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden;
}
.thread-post-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.thread-post-meta { flex: 1; }
.thread-post-author { font-size: 14px; font-weight: 700; }
.thread-post-time { font-size: 12px; color: var(--text-muted); }
.thread-post-body { padding: 14px 16px; font-size: 14px; line-height: 1.7; color: var(--text); }
.thread-post.original { border-top: 4px solid var(--primary); }

/* ── Sedekah History ── */
.sedekah-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.sedekah-item:last-child { border-bottom: none; }
.sedekah-item-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold-light); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.sedekah-nominal { font-size: 16px; font-weight: 800; color: var(--primary-dark); }

/* ── Notification ── */
.notif-item {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start;
  background: white; transition: background .2s; cursor: pointer;
}
.notif-item.unread { background: var(--primary-light); }
.notif-item:hover { background: var(--bg); }
.notif-icon {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.notif-body { flex: 1; }
.notif-title { font-size: 14px; font-weight: 700; color: var(--text); }
.notif-pesan { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 40px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty-icon { font-size: 52px; opacity: .5; }
.empty-title { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.empty-sub { font-size: 13px; color: var(--text-muted); }

/* ── Quick Actions Grid ── */
.quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px;
}
.quick-btn {
  background: white; border-radius: var(--radius);
  padding: 16px 10px; text-align: center;
  text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.quick-btn:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--text); }
.quick-btn-icon { font-size: 28px; }
.quick-btn-label { font-size: 11px; font-weight: 700; }

/* ── Login Page ── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--secondary) 0%, var(--primary-dark) 40%, var(--primary) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.auth-card {
  background: white; border-radius: 20px;
  padding: 32px 24px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.auth-logo {
  text-align: center; margin-bottom: 24px;
}
.auth-logo-icon {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; box-shadow: 0 8px 24px rgba(201,162,39,.4);
}
.auth-logo-title { font-size: 24px; font-weight: 800; color: var(--primary-dark); }
.auth-logo-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-style: italic; }
.auth-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.auth-divider {
  text-align: center; font-size: 13px; color: var(--text-muted);
  margin: 16px 0; position: relative;
}
.auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.auth-divider span { background: white; padding: 0 12px; position: relative; }

/* ── Profil ── */
.profil-header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px;
  display: flex; flex-direction: column; align-items: center; text-align: center; color: white;
}
.profil-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; color: white; margin-bottom: 12px;
  overflow: hidden;
}
.profil-name { font-size: 20px; font-weight: 800; }
.profil-role { font-size: 12px; opacity: .8; margin-top: 4px; }
.profil-since { font-size: 11px; opacity: .7; margin-top: 2px; }

/* ── Toast ── */
#toast-container {
  position: fixed; top: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 400px;
}
.toast {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
}
.toast-success { background: var(--primary-dark); color: white; }
.toast-error   { background: var(--danger); color: white; }
.toast-warning { background: var(--warning); color: white; }
.toast-info    { background: var(--info); color: white; }
@keyframes toastIn { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:translateY(0); } }

/* ── Utilities ── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-dark); }
.text-gold { color: var(--gold-dark); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.w-100 { width: 100%; }

/* ── Spinner ── */
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Back Button ── */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-muted); font-size: 14px; font-weight: 600;
  padding: 8px 0; margin-bottom: 12px;
}
.back-btn:hover { color: var(--primary-dark); }

/* ── Sedekah Nominal Options ── */
.nominal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px;
}
.nominal-chip {
  padding: 10px 6px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); text-align: center;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .2s; background: white; color: var(--text);
}
.nominal-chip:hover, .nominal-chip.active {
  border-color: var(--primary); background: var(--primary-light);
  color: var(--primary-dark);
}

/* ── Safe area ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .main { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom) + 16px); }
}

/* ── Topbar Avatar & Dropdown ── */
.topbar-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--gold) 100%);
  border: 2px solid rgba(255,255,255,.4);
  color: white; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; transition: border-color .2s;
  flex-shrink: 0;
}
.topbar-avatar-btn:hover { border-color: rgba(255,255,255,.8); }
.topbar-avatar-btn img  { width: 100%; height: 100%; object-fit: cover; }

.topbar-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white; border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
  min-width: 200px; z-index: 9999;
  overflow: hidden; animation: dropIn .18s ease;
}
@keyframes dropIn {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}

.topbar-dropdown-user {
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: white;
}
.topbar-dropdown-name { font-size: 14px; font-weight: 800; }
.topbar-dropdown-role { font-size: 11px; opacity: .75; margin-top: 2px; }

.topbar-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.topbar-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 14px; font-weight: 600;
  color: var(--text); text-decoration: none; transition: background .15s;
}
.topbar-dropdown-item:hover { background: var(--bg); color: var(--text); }
.topbar-dropdown-item span { font-size: 18px; width: 24px; text-align: center; }

.topbar-dropdown-logout { color: var(--danger) !important; }
.topbar-dropdown-logout:hover { background: #fee2e2 !important; }
