/* ================================================================
   GNR APPS - Sistem Informasi RT/RW
   Mobile-First Design System
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --primary:     #0F6B5F;
  --primary-lt:  #12836F;
  --primary-dk:  #094D44;
  --accent:      #F59E0B;
  --accent-lt:   #FEF3C7;
  --danger:      #EF4444;
  --success:     #10B981;
  --info:        #3B82F6;
  --warning:     #F59E0B;
  --bg:          #F0F4F3;
  --card:        #FFFFFF;
  --text:        #1A2E2B;
  --text-muted:  #6B7280;
  --border:      #E5E7EB;
  --shadow:      0 2px 12px rgba(15,107,95,.10);
  --shadow-lg:   0 8px 32px rgba(15,107,95,.16);
  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --nav-h:       64px;
  --bottom-nav:  68px;
  --font-head:   'Plus Jakarta Sans', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --transition:  .2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; }
.page-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; }
.section-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }

/* ── Top Navigation ── */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--primary);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.topnav .nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; color: #fff;
}
.topnav .nav-brand .brand-icon {
  width: 36px; height: 36px; background: rgba(255,255,255,.2);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.topnav .nav-actions { display: flex; align-items: center; gap: 8px; }
.topnav .btn-icon {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.15); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition); position: relative;
}
.topnav .btn-icon:hover { background: rgba(255,255,255,.25); }
.notif-dot {
  position: absolute; top: 4px; right: 4px; width: 8px; height: 8px;
  background: #EF4444; border-radius: 50%; border: 2px solid var(--primary);
}
.notif-count {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
  background: #EF4444; color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-nav);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 4px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 6px 4px;
  border-radius: 12px; cursor: pointer; transition: var(--transition);
  color: var(--text-muted); font-size: .65rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
  border: none; background: none;
}
.bottom-nav .nav-item svg { width: 22px; height: 22px; stroke-width: 1.8; transition: var(--transition); }
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item.active svg { stroke: var(--primary); transform: translateY(-2px); }
.bottom-nav .nav-item:hover { color: var(--primary); background: rgba(15,107,95,.05); }

/* Panic Button special */
.bottom-nav .nav-item.panic {
  color: #fff; background: var(--danger); border-radius: 50%;
  width: 52px; height: 52px; min-width: 52px; font-size: .55rem; padding: 0;
  margin-top: -12px; box-shadow: 0 4px 16px rgba(239,68,68,.4);
  flex: 0;
}
.bottom-nav .nav-item.panic svg { width: 24px; height: 24px; stroke: #fff; }
.bottom-nav .nav-item.panic:hover { background: #DC2626; transform: scale(1.05); }

/* ── Main Content ── */
.main-content {
  margin-top: var(--nav-h);
  padding: 16px;
  min-height: calc(100vh - var(--nav-h) - var(--bottom-nav));
  padding-bottom: calc(var(--bottom-nav) + 16px);
}
.main-content.no-bottom-nav {
  padding-bottom: 24px;
  margin-bottom: 0;
}

/* ── Cards ── */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: var(--transition);
}
.card-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 16px; }
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #FAFAFA;
}

/* ── Stat Cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.stat-card.full { grid-column: 1/-1; }
.stat-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.stat-value { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; }
.stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.stat-change { font-size: .7rem; font-weight: 600; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Hero Banner ── */
.hero-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-lt) 100%);
  border-radius: var(--radius-lg); padding: 20px; color: #fff;
  margin-bottom: 16px; position: relative; overflow: hidden;
}
.hero-banner::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero-banner::before {
  content: ''; position: absolute; right: 30px; bottom: -30px;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.hero-greeting { font-size: .8rem; opacity: .8; margin-bottom: 2px; }
.hero-name { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; }
.hero-role { font-size: .75rem; opacity: .75; margin-top: 2px; }
.hero-date { font-size: .72rem; opacity: .7; margin-top: 8px; }

/* ── Quick Actions ── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.quick-action {
  background: var(--card); border-radius: var(--radius);
  padding: 12px 6px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer;
  transition: var(--transition); display: flex;
  flex-direction: column; align-items: center; gap: 6px;
  border: none; color: var(--text);
}
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.quick-action:active { transform: scale(.96); }
.qa-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.qa-label { font-size: .65rem; font-weight: 600; color: var(--text-muted); line-height: 1.2; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 600;
  font-size: .875rem; border: none; cursor: pointer; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-lt); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #D97706; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-info { background: var(--info); color: #fff; }
.btn-secondary { background: #6B7280; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 6px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 12px; }
.btn-full { width: 100%; }
.btn-icon-only {
  width: 36px; height: 36px; padding: 0; border-radius: 8px;
}

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--text); margin-bottom: 5px;
}
.form-label span { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: #fff;
  font-size: .9rem; color: var(--text); transition: var(--transition);
  outline: none; -webkit-appearance: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,107,95,.12); }
.form-control::placeholder { color: #B0B8C0; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* File Upload */
.upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; cursor: pointer; transition: var(--transition);
  background: #FAFAFA;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: rgba(15,107,95,.04); }
.upload-area .upload-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-area p { font-size: .82rem; color: var(--text-muted); }
.upload-preview { width: 100%; max-height: 200px; object-fit: cover; border-radius: 8px; margin-top: 10px; }

/* Camera capture */
.camera-container { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; }
#cameraVideo { width: 100%; height: 220px; object-fit: cover; }
.camera-actions { display: flex; gap: 10px; margin-top: 10px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: 20px;
  font-size: .7rem; font-weight: 700; letter-spacing: .3px;
}
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info    { background: #DBEAFE; color: #1E40AF; }
.badge-secondary { background: #F3F4F6; color: #4B5563; }
.badge-primary { background: #DCFCE7; color: var(--primary-dk); }

/* ── Lists ── */
.list-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #FAFAFA; }
.list-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  object-fit: cover; background: var(--border);
}
.list-avatar.round { border-radius: 50%; }
.list-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.list-action { flex-shrink: 0; display: flex; align-items: center; gap: 6px; }

/* ── Table ── */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th {
  background: #F9FAFB; padding: 10px 12px;
  text-align: left; font-size: .75rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #FAFAFA; }

/* ── Alert ── */
.alert {
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: .85rem; margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-success { background: #D1FAE5; color: #065F46; border-left: 3px solid #10B981; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border-left: 3px solid #EF4444; }
.alert-warning { background: #FEF3C7; color: #92400E; border-left: 3px solid #F59E0B; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border-left: 3px solid #3B82F6; }

/* ── Tabs ── */
.tabs { display: flex; background: var(--card); border-radius: 10px; padding: 4px; margin-bottom: 14px; box-shadow: var(--shadow); }
.tab-btn {
  flex: 1; padding: 8px 6px; border: none; background: transparent;
  border-radius: 8px; font-size: .78rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: var(--transition); text-align: center;
}
.tab-btn.active { background: var(--primary); color: #fff; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-sheet {
  width: 100%; max-width: 600px; background: var(--card);
  border-radius: 20px 20px 0 0; padding: 20px;
  transform: translateY(100%); transition: .3s cubic-bezier(.4,0,.2,1);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.show .modal-sheet { transform: translateY(0); }
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }
.modal-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; }
/* Desktop modal variant */
@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: var(--radius-lg); max-width: 480px; margin: 20px; }
  .modal-overlay.show .modal-sheet { transform: none; }
}

/* ── Toast ── */
.toast-container { position: fixed; top: calc(var(--nav-h) + 10px); right: 10px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 20px); }
.toast {
  background: var(--card); border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18); display: flex; align-items: center; gap: 10px;
  transform: translateX(120%); animation: toastIn .3s forwards, toastOut .3s 3s forwards;
  max-width: 320px; border-left: 3px solid var(--primary);
}
.toast.success { border-color: var(--success); }
.toast.danger  { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast-msg { font-size: .85rem; font-weight: 500; }
@keyframes toastIn  { to { transform: translateX(0); } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ── Login Page ── */
.login-page {
  min-height: 100vh; background: linear-gradient(160deg, var(--primary) 0%, var(--primary-lt) 50%, #1a9e88 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px;
}
.login-logo { text-align: center; color: #fff; margin-bottom: 32px; }
.login-logo .logo-icon {
  width: 72px; height: 72px; background: rgba(255,255,255,.2);
  border-radius: 22px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  backdrop-filter: blur(10px); border: 2px solid rgba(255,255,255,.3);
}
.login-logo h1 { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; }
.login-logo p { opacity: .8; font-size: .9rem; }
.login-card {
  width: 100%; max-width: 400px; background: rgba(255,255,255,.97);
  border-radius: var(--radius-lg); padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.login-card h2 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
.login-card .subtitle { font-size: .85rem; color: var(--text-muted); margin-bottom: 20px; }

/* ── GPS Status ── */
.gps-status {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; font-size: .82rem; margin-bottom: 12px;
}
.gps-status.checking { background: #FEF3C7; color: #92400E; }
.gps-status.valid    { background: #D1FAE5; color: #065F46; }
.gps-status.invalid  { background: #FEE2E2; color: #991B1B; }
.gps-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gps-dot.pulse { animation: gpsPulse 1.5s infinite; background: var(--warning); }
.gps-dot.ok    { background: var(--success); }
.gps-dot.err   { background: var(--danger); }
@keyframes gpsPulse { 0%,100%{opacity:1}50%{opacity:.4} }

/* ── Map Preview ── */
.map-preview { border-radius: var(--radius); overflow: hidden; height: 180px; background: #E5E7EB; position: relative; }
.map-preview iframe { width: 100%; height: 100%; border: none; }

/* ── Shift Card ── */
.shift-card {
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--border); background: var(--card);
}
.shift-card.active { border-color: var(--primary); background: rgba(15,107,95,.04); }
.shift-time { font-family: var(--font-head); font-size: 1rem; font-weight: 800; }
.shift-name { font-size: .78rem; color: var(--text-muted); }

/* ── Panic Button ── */
.panic-btn-big {
  width: 160px; height: 160px; border-radius: 50%; border: none;
  background: radial-gradient(circle, #FF4444 60%, #CC0000);
  color: #fff; font-size: 2.5rem; cursor: pointer;
  box-shadow: 0 0 0 12px rgba(239,68,68,.2), 0 0 0 24px rgba(239,68,68,.1), 0 8px 32px rgba(239,68,68,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: var(--transition); animation: panicPulse 2s infinite;
  font-family: var(--font-head); font-weight: 800;
}
.panic-btn-big span { font-size: .8rem; letter-spacing: 1px; }
@keyframes panicPulse {
  0%,100%{box-shadow:0 0 0 12px rgba(239,68,68,.2),0 0 0 24px rgba(239,68,68,.1),0 8px 32px rgba(239,68,68,.5)}
  50%{box-shadow:0 0 0 16px rgba(239,68,68,.3),0 0 0 32px rgba(239,68,68,.15),0 8px 40px rgba(239,68,68,.6)}
}
.panic-btn-big:active { transform: scale(.94); }

/* ── Finance Summary ── */
.finance-summary {
  background: linear-gradient(135deg, #1E3A5F, #2563EB);
  border-radius: var(--radius-lg); padding: 18px; color: #fff; margin-bottom: 12px;
}
.finance-row { display: flex; justify-content: space-between; align-items: center; }
.finance-label { font-size: .8rem; opacity: .8; }
.finance-amount { font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; }
.finance-divider { border: none; border-top: 1px solid rgba(255,255,255,.2); margin: 10px 0; }
.finance-saldo { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; text-align: center; padding: 8px 0; }
.finance-saldo-label { font-size: .75rem; opacity: .8; text-align: center; }

/* ── Announcement Card ── */
.announcement-card {
  border-radius: var(--radius); padding: 14px 16px;
  background: var(--card); box-shadow: var(--shadow); margin-bottom: 10px;
  border-left: 4px solid var(--primary);
}
.announcement-card.penting  { border-color: var(--warning); }
.announcement-card.darurat  { border-color: var(--danger); }
.announcement-card.kegiatan { border-color: var(--info); }
.announcement-category { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.announcement-title { font-family: var(--font-head); font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.announcement-preview { font-size: .8rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.announcement-date { font-size: .72rem; color: var(--text-muted); margin-top: 6px; }

/* ── Progress ── */
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; transition: width .5s ease; }

/* ── Avatar / Profile ── */
.avatar { border-radius: 50%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 72px; height: 72px; }

/* ── Loading ── */
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: .9rem; }

/* ── Sidebar for desktop ── */
@media (min-width: 768px) {
  .has-sidebar .bottom-nav { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
    background: var(--primary); z-index: 100; padding: 20px 0;
    display: flex; flex-direction: column;
  }
  .sidebar .brand { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .sidebar .brand h2 { color: #fff; font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; }
  .sidebar .nav-links { flex: 1; padding: 12px 0; overflow-y: auto; }
  .sidebar .nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 20px;
    color: rgba(255,255,255,.75); font-size: .875rem; font-weight: 500;
    transition: var(--transition); text-decoration: none;
  }
  .sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255,255,255,.12); color: #fff;
  }
  .sidebar .nav-link.active { border-right: 3px solid var(--accent); }
  .sidebar .nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
  .has-sidebar .topnav { left: 240px; }
  .has-sidebar .main-content { margin-left: 240px; padding-bottom: 24px; }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.text-primary{ color: var(--primary); }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.hidden { display: none; }
.w-full { width: 100%; }
.rounded-full { border-radius: 50%; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.divide-y > * + * { border-top: 1px solid var(--border); }
