/* ============================================================
   CERMIN SEHATKU — Logbook Diabetes 30 Hari
   Design System: Soft Light, Fresh Wellness & Medical Theme
   Palette: Clean Off-White, Emerald Teal, Soft Amber & Slate
   ============================================================ */

/* ---- IMPORTS & RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core Colors */
  --c-teal:        hsl(173, 80%, 36%);
  --c-teal-deep:   hsl(175, 84%, 26%);
  --c-teal-light:  hsl(173, 60%, 46%);
  --c-teal-soft:   hsl(171, 75%, 94%);
  --c-teal-border: hsl(171, 60%, 82%);
  --c-teal-glow:   rgba(13, 148, 136, 0.2);

  --c-amber:       hsl(38, 92%, 50%);
  --c-amber-deep:  hsl(32, 95%, 44%);
  --c-amber-soft:  hsl(48, 100%, 96%);
  --c-amber-border:hsl(45, 90%, 80%);
  --c-amber-glow:  rgba(245, 158, 11, 0.2);

  /* Backgrounds & Glass */
  --c-bg:          #f8fafc;
  --c-bg-card:     #ffffff;
  --c-glass:       rgba(255, 255, 255, 0.92);
  --c-glass-hover: rgba(255, 255, 255, 0.98);
  --c-border:      #e2e8f0;
  --c-border-2:    #f1f5f9;
  --c-border-input:#cbd5e1;

  /* Typography */
  --c-text:        #0f172a;
  --c-text-muted:  #475569;
  --c-text-dim:    #94a3b8;

  --c-success:     #16a34a;
  --c-error:       #dc2626;
  --c-warning:     #d97706;
  --c-info:        #0284c7;

  /* Fonts */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-card:  0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow:  0 4px 16px var(--c-teal-glow);
  --shadow-amber: 0 4px 16px var(--c-amber-glow);

  /* Transitions */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(20, 184, 166, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 100%, rgba(251, 191, 36, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(56, 189, 248, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ---- VIEWS ---- */
.view { display: none; min-height: 100vh; animation: fadeIn var(--t-base) ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- LOADING SCREEN ---- */
.loading-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: var(--space-xl);
}
.loading-logo { display: flex; align-items: center; gap: var(--space-md); }
.loading-title {
  font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--c-teal-deep), var(--c-teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.loading-sub { color: var(--c-text-muted); font-size: 0.95rem; margin-top: var(--space-xs); }
.spinner {
  width: 38px; height: 38px; border: 3.5px solid #e2e8f0;
  border-top-color: var(--c-teal); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- GLASSMORPHISM / CARDS ---- */
.glass {
  background: var(--c-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-card);
}

/* ---- LOGIN ---- */
.login-bg {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--space-lg);
  background-image:
    radial-gradient(ellipse 70% 60% at 20% 20%, rgba(20, 184, 166, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(251, 191, 36, 0.10) 0%, transparent 65%);
}
.login-container { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: var(--space-md); }
.login-card {
  border-radius: var(--r-xl); padding: var(--space-xl);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}
.login-brand { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); }
.brand-icon { flex-shrink: 0; }
.brand-title {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--c-teal-deep), var(--c-teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.brand-sub { color: var(--c-text-muted); font-size: 0.85rem; margin-top: 2px; font-weight: 500; }
.brand-loc { color: var(--c-text-dim); font-size: 0.76rem; margin-top: 1px; }
.login-divider { height: 1px; background: #e2e8f0; margin-bottom: var(--space-md); }
.login-footer { text-align: center; color: var(--c-text-muted); font-size: 0.82rem; margin-top: var(--space-md); }

/* Auth Tabs (Masuk / Daftar) */
.auth-tabs {
  display: flex; gap: 4px; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: var(--r-md); padding: 4px;
  margin-bottom: var(--space-md);
}
.auth-tab-btn {
  flex: 1; background: none; border: none; color: var(--c-text-muted);
  padding: 8px var(--space-sm); border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 600;
  transition: all var(--t-fast); text-align: center;
}
.auth-tab-btn.active {
  background: #ffffff; color: var(--c-teal-deep); font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.auth-tab-btn:hover:not(.active) { color: var(--c-text); background: rgba(255,255,255,0.6); }

.login-form {
  display: flex; flex-direction: column; gap: var(--space-md);
}
.form-actions {
  margin-top: var(--space-sm);
}

.login-tips { display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: center; }
.tip-pill {
  background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: var(--r-full); padding: 5px var(--space-md);
  font-size: 0.78rem; color: var(--c-text-muted); font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* ---- TOP NAV ---- */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.nav-brand { display: flex; align-items: center; gap: var(--space-sm); }
.nav-title {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem;
  background: linear-gradient(135deg, var(--c-teal-deep), var(--c-teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-actions { display: flex; gap: var(--space-xs); }
.nav-btn {
  background: #ffffff; border: 1.5px solid #e2e8f0; border-radius: var(--r-sm);
  padding: 6px 10px; cursor: pointer; font-size: 1rem;
  color: var(--c-text-muted); transition: all var(--t-fast);
  box-shadow: var(--shadow-sm);
}
.nav-btn:hover { background: #f8fafc; color: var(--c-text); border-color: #cbd5e1; }
.nav-btn-back {
  background: #f1f5f9; border: 1px solid #e2e8f0; color: var(--c-teal-deep); cursor: pointer;
  font-size: 0.88rem; font-weight: 600; font-family: var(--font-body); padding: 6px 12px;
  border-radius: var(--r-sm); transition: all var(--t-fast);
}
.nav-btn-back:hover { background: var(--c-teal-soft); border-color: var(--c-teal-border); }
.nav-center-title {
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem; color: var(--c-text);
  position: absolute; left: 50%; transform: translateX(-50%);
}

.pt-nav { padding-top: 76px !important; }

/* ---- PAGE CONTAINER ---- */
.page-container {
  max-width: 680px; margin: 0 auto; padding: var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-md);
}

/* ---- CARDS ---- */
.card {
  border-radius: var(--r-lg); padding: var(--space-lg);
  background: #ffffff;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-card);
}
.card-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.card-header h3 { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 700; color: var(--c-text); }
.card-badge { font-size: 1.25rem; }
.mb-4 { margin-bottom: var(--space-lg); }

/* ---- HERO CARD ---- */
.hero-card {
  border-radius: var(--r-xl); padding: var(--space-xl);
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px -4px rgba(13, 148, 136, 0.35), 0 4px 10px -2px rgba(13, 148, 136, 0.2);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
}
.hero-left { flex: 1; }
.hero-greeting { color: #ccfbf1; font-size: 0.88rem; font-weight: 500; margin-bottom: var(--space-xs); }
.hero-name { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; margin-bottom: var(--space-sm); color: #ffffff; }
.hero-info { margin-bottom: var(--space-sm); }
.hero-quote { color: #e6fffa; font-size: 0.82rem; font-style: italic; opacity: 0.9; }
.hero-right { flex-shrink: 0; }

/* Progress ring in Hero */
.progress-ring-container { position: relative; width: 100px; height: 100px; }
.progress-ring { transform: rotate(-90deg); }
.progress-ring-label {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.progress-num {
  font-family: var(--font-heading); font-size: 1.45rem; font-weight: 800;
  color: #ffffff; text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.progress-lbl { font-size: 0.65rem; color: #ccfbf1; font-weight: 600; text-transform: uppercase; }

/* ---- TODAY CTA ---- */
.today-cta-card {
  border-radius: var(--r-lg); padding: var(--space-lg);
  background: linear-gradient(135deg, #f0fdfa 0%, #fefce8 100%);
  border: 1.5px solid #99f6e4;
  box-shadow: var(--shadow-card);
}
.today-cta-content { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.today-cta-content h3 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: #0f766e; }
.today-sub { color: var(--c-text-muted); font-size: 0.84rem; margin-top: 2px; }

/* ---- STATS ---- */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
.stat-card {
  border-radius: var(--r-md); padding: var(--space-md); display: flex;
  align-items: center; gap: var(--space-sm);
  background: #ffffff; border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.stat-icon { font-size: 1.6rem; }
.stat-num {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; display: block;
  color: var(--c-teal-deep);
}
.stat-label { font-size: 0.72rem; color: var(--c-text-muted); font-weight: 500; display: block; }

/* ---- CALENDAR ---- */
.calendar-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}
.cal-day {
  aspect-ratio: 1; border-radius: var(--r-sm); display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer;
  font-size: 0.75rem; font-weight: 600; transition: all var(--t-fast);
  border: 1.5px solid transparent; position: relative;
}
.cal-day:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--c-teal); }
.cal-day.done {
  background: #f0fdfa; border-color: #5eead4; color: var(--c-teal-deep);
}
.cal-day.done::after {
  content: '✓'; position: absolute; top: 2px; right: 4px; font-size: 0.65rem; font-weight: 800; color: var(--c-teal);
}
.cal-day.today-day {
  background: #fefce8; border-color: var(--c-amber); color: #b45309;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}
.cal-day.empty {
  background: #ffffff; border-color: #e2e8f0; color: var(--c-text-muted);
}
.cal-day.future {
  background: #f8fafc; border-color: #e2e8f0; color: var(--c-text-dim); opacity: 0.65; cursor: default;
}
.cal-day .cal-num { font-size: 0.95rem; font-weight: 700; }
.cal-day .cal-label { font-size: 0.58rem; color: var(--c-text-dim); margin-top: 1px; }
.cal-day.today-day .cal-label { color: #b45309; font-weight: 600; }
.cal-day.done .cal-label { color: var(--c-teal); font-weight: 600; }

.calendar-legend {
  display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-md);
  font-size: 0.78rem; color: var(--c-text-muted);
}
.legend-item { display: flex; align-items: center; gap: var(--space-xs); font-weight: 500; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.done { background: #5eead4; border: 1.5px solid var(--c-teal); }
.legend-dot.today-dot { background: #fde047; border: 1.5px solid var(--c-amber); }
.legend-dot.empty { background: #ffffff; border: 1.5px solid #cbd5e1; }
.legend-dot.future { background: #f1f5f9; border: 1px dashed #cbd5e1; }

/* ---- TIPS ---- */
.tips-card .card-header { margin-bottom: var(--space-md); }
.tips-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.tip-item {
  padding: var(--space-sm) var(--space-md); background: #f8fafc;
  border-radius: var(--r-sm); font-size: 0.88rem; border: 1px solid var(--c-border);
  color: var(--c-text); font-weight: 500;
}

/* ---- COACH NOTE ---- */
.coach-note-content { display: flex; flex-direction: column; gap: var(--space-sm); }
.coach-note-item { display: flex; flex-direction: column; gap: 3px; }
.coach-note-label {
  font-size: 0.72rem; color: var(--c-teal-deep); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.coach-note-value {
  font-size: 0.9rem; padding: var(--space-sm) var(--space-md);
  background: var(--c-teal-soft); border: 1px solid var(--c-teal-border);
  border-radius: var(--r-sm); color: #0f172a;
}

/* ---- LOGBOOK HERO ---- */
.logbook-hero { display: flex; align-items: center; gap: var(--space-lg); padding: var(--space-md) 0; }
.logbook-day-badge {
  flex-shrink: 0; width: 72px; height: 72px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-teal), var(--c-teal-deep));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: var(--shadow-glow); color: #ffffff;
}
.logbook-day-num { font-family: var(--font-heading); font-size: 1.85rem; font-weight: 800; line-height: 1; }
.logbook-day-text { font-size: 0.58rem; color: #ccfbf1; font-weight: 600; text-transform: uppercase; }
.logbook-date { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--c-text); }
.logbook-sub { color: var(--c-text-muted); font-size: 0.85rem; margin-top: 2px; }

/* ---- TABS ---- */
.tab-bar {
  display: flex; gap: 4px; background: #f1f5f9;
  border: 1px solid #e2e8f0; border-radius: var(--r-md); padding: 4px;
  overflow-x: auto; scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1; min-width: max-content; background: none; border: none; color: var(--c-text-muted);
  padding: 8px var(--space-md); border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--font-body); font-size: 0.84rem; font-weight: 500; transition: all var(--t-fast);
  white-space: nowrap;
}
.tab-btn.active {
  background: #ffffff; color: var(--c-teal-deep); font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.tab-btn:hover:not(.active) { color: var(--c-text); background: rgba(255,255,255,0.6); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn var(--t-fast); }

/* ---- MEAL TABLE ---- */
.meal-table { display: flex; flex-direction: column; gap: var(--space-sm); }
.meal-header {
  font-size: 0.74rem; color: var(--c-text-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 2px;
}
.meal-row { display: grid; grid-template-columns: 95px 1fr 95px; gap: var(--space-sm); align-items: center; }
.meal-time { font-size: 0.88rem; color: var(--c-text); font-weight: 500; }
.meal-input { min-width: 0; }
.meal-input-sm { min-width: 0; }

/* ---- GULA TABLE ---- */
.gula-table { display: flex; flex-direction: column; gap: var(--space-sm); }
.gula-header {
  font-size: 0.74rem; color: var(--c-text-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 2px;
}
.gula-row { display: grid; grid-template-columns: 1fr 100px 1fr; gap: var(--space-sm); align-items: center; }
.gula-label { font-size: 0.88rem; color: var(--c-text); font-weight: 500; }
.gula-input { min-width: 0; }
.gd-indicator {
  margin-top: var(--space-md); padding: var(--space-sm) var(--space-md);
  border-radius: var(--r-sm); font-size: 0.86rem; font-weight: 600;
}
.gd-normal { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.gd-warning { background: #fef3c7; border: 1px solid #fde047; color: #854d0e; }
.gd-danger { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }

/* ---- MOOD ---- */
.mood-section { margin-top: var(--space-md); }
.mood-row { display: flex; gap: var(--space-sm); margin-top: var(--space-sm); }
.mood-btn {
  flex: 1; font-size: 1.6rem; padding: var(--space-sm); border: 2px solid #e2e8f0;
  border-radius: var(--r-md); background: #f8fafc; cursor: pointer;
  transition: all var(--t-fast); line-height: 1;
}
.mood-btn:hover, .mood-btn.selected {
  border-color: var(--c-teal); background: #f0fdfa; transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ---- SAVE SECTION ---- */
.save-section { display: flex; flex-direction: column; gap: var(--space-md); }
.save-actions { display: flex; gap: var(--space-sm); }
.checkbox-confirm { display: flex; align-items: center; gap: var(--space-sm); cursor: pointer; }
.checkbox-confirm input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--c-teal); cursor: pointer; }
.checkbox-confirm-text { font-size: 0.92rem; color: var(--c-text); font-weight: 600; }

/* ---- CATATAN TEXTAREA ---- */
.catatan-textarea { resize: vertical; min-height: 120px; }

/* ---- FORMS & INPUTS ---- */
.form-group { display: flex; flex-direction: column; gap: var(--space-xs); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.form-full { grid-column: 1 / -1; }
.form-label { font-size: 0.84rem; font-weight: 600; color: var(--c-text-muted); }
.form-input {
  width: 100%; padding: 10px 14px;
  background: #ffffff; border: 1.5px solid var(--c-border-input);
  border-radius: var(--r-sm); color: var(--c-text); font-family: var(--font-body);
  font-size: 0.9rem; transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none; appearance: none; -webkit-appearance: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.form-input::placeholder { color: var(--c-text-dim); }
.form-input:focus {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3.5px rgba(13, 148, 136, 0.15);
  background: #ffffff;
}
.form-input:disabled { background: #f1f5f9; opacity: 0.75; cursor: not-allowed; }
textarea.form-input { resize: vertical; min-height: 72px; }

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 12px; font-size: 0.95rem; pointer-events: none; color: var(--c-text-muted); }
.input-wrapper .form-input { padding-left: 36px; }
.input-toggle {
  position: absolute; right: 10px; background: none; border: none;
  cursor: pointer; font-size: 0.9rem; color: var(--c-text-muted);
}

/* ---- RADIO / CHECKBOX ---- */
.radio-group, .checkbox-group { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.radio-option, .checkbox-option { cursor: pointer; }
.radio-option input, .checkbox-option input { display: none; }
.radio-box, .checkbox-box {
  display: inline-flex; align-items: center; padding: 8px var(--space-md);
  background: #ffffff; border: 1.5px solid var(--c-border-input); border-radius: var(--r-sm);
  font-size: 0.86rem; color: var(--c-text-muted); font-weight: 500;
  transition: all var(--t-fast); cursor: pointer; box-shadow: var(--shadow-sm);
}
.radio-option input:checked + .radio-box,
.checkbox-option input:checked + .checkbox-box {
  background: #f0fdfa; border-color: var(--c-teal); color: var(--c-teal-deep); font-weight: 700;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 11px var(--space-lg); border-radius: var(--r-sm); font-family: var(--font-body);
  font-size: 0.92rem; font-weight: 600; cursor: pointer; border: none; transition: all var(--t-fast);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--c-teal) 0%, var(--c-teal-deep) 100%);
  color: #ffffff; box-shadow: 0 4px 14px var(--c-teal-glow);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 18px var(--c-teal-glow); }
.btn-primary:active { transform: none; }

.btn-accent {
  background: linear-gradient(135deg, var(--c-amber) 0%, var(--c-amber-deep) 100%);
  color: #ffffff; box-shadow: 0 4px 14px var(--c-amber-glow);
}
.btn-accent:hover { filter: brightness(1.06); transform: translateY(-1px); }

.btn-secondary {
  background: #ffffff; border: 1.5px solid var(--c-border-input); color: var(--c-text-muted);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: #f8fafc; color: var(--c-text); border-color: #94a3b8; }
.btn-outline {
  background: #ffffff; border: 1.5px solid var(--c-border); color: var(--c-text);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover { background: #f8fafc; border-color: var(--c-teal-deep); color: var(--c-teal-deep); }
.btn-full { width: 100%; }
.btn-sm { padding: 7px var(--space-md); font-size: 0.8rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; border-radius: var(--r-sm); font-weight: 500; }
.btn-icon-subtle {
  background: none; border: none; font-size: 1.1rem; color: var(--c-text-muted);
  cursor: pointer; padding: 4px 8px; border-radius: var(--r-sm); transition: all var(--t-fast);
}
.btn-icon-subtle:hover { background: #f1f5f9; color: var(--c-text); }

.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #ffffff; border-radius: 50%; animation: spin 0.8s linear infinite;
}
.hidden { display: none !important; }

/* ---- ALERTS ---- */
.alert {
  padding: var(--space-sm) var(--space-md); border-radius: var(--r-sm);
  font-size: 0.86rem; font-weight: 500;
}
.alert-error { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.alert-info { background: #e0f2fe; border: 1px solid #bae6fd; color: #0369a1; }

/* ---- BADGES ---- */
.badge { display: inline-flex; padding: 4px 11px; border-radius: var(--r-full); font-size: 0.76rem; font-weight: 700; }
.badge-teal { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.badge-amber { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* ---- SETUP PAGE ---- */
.page-header-setup { text-align: center; padding: var(--space-xl) 0 var(--space-md); }
.page-header-setup .brand-icon-sm { display: flex; justify-content: center; margin-bottom: var(--space-md); }
.page-header-setup h2 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin-bottom: var(--space-xs); color: var(--c-text); }
.page-header-setup p { color: var(--c-text-muted); font-size: 0.9rem; }
.setup-form { display: flex; flex-direction: column; gap: var(--space-md); }

/* ---- SUMMARY ---- */
.summary-hero { text-align: center; padding: var(--space-xl) 0; }
.trophy-icon { font-size: 4rem; margin-bottom: var(--space-md); }
.summary-hero h2 { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--c-text-muted); }
.summary-hero h3 {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--c-teal-deep), var(--c-teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin: var(--space-xs) 0;
}
.summary-quote { color: var(--c-text-muted); font-style: italic; font-size: 0.9rem; margin-top: var(--space-md); }
.signature-row { display: flex; gap: var(--space-lg); margin-top: var(--space-xl); }
.signature-box { flex: 1; text-align: center; }
.signature-box p { font-size: 0.82rem; color: var(--c-text-muted); margin-bottom: var(--space-md); font-weight: 500; }
.sig-line { height: 1.5px; background: #cbd5e1; }

/* ---- CHART ---- */
.chart-wrapper { padding: var(--space-md) 0; position: relative; }
.chart-note { font-size: 0.74rem; color: var(--c-text-dim); margin-top: var(--space-sm); text-align: center; }

/* ---- SEARCH ---- */
.search-bar {
  display: flex; align-items: center; gap: var(--space-sm);
  border-radius: var(--r-md); padding: 10px var(--space-md);
  background: #ffffff; border: 1px solid var(--c-border); box-shadow: var(--shadow-sm);
}
.search-icon { font-size: 1rem; color: var(--c-text-muted); }
.search-input { background: none; border: none; outline: none; color: var(--c-text); font-family: var(--font-body); font-size: 0.92rem; width: 100%; }
.search-input::placeholder { color: var(--c-text-dim); }

/* ---- PATIENT LIST (Admin) ---- */
.patient-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.patient-item {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md); background: #ffffff;
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  cursor: pointer; transition: all var(--t-fast); box-shadow: var(--shadow-sm);
}
.patient-item:hover {
  background: #f0fdfa; border-color: var(--c-teal); transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
}
.patient-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-teal), var(--c-amber));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; color: #ffffff;
}
.patient-info { flex: 1; }
.patient-name { font-weight: 700; font-size: 0.95rem; color: var(--c-text); }
.patient-meta { font-size: 0.78rem; color: var(--c-text-muted); margin-top: 2px; }
.patient-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.patient-compliance { font-size: 0.75rem; }
.compliance-bar { width: 60px; height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.compliance-fill { height: 100%; background: linear-gradient(90deg, var(--c-teal), var(--c-amber)); border-radius: 3px; transition: width var(--t-slow); }

/* ---- ADMIN PATIENT DETAIL ---- */
.admin-patient-header { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); }
.admin-patient-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--c-teal), var(--c-amber));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; color: #ffffff;
}
.admin-patient-avatar { text-transform: uppercase; }
.admin-pt-sub { color: var(--c-text-muted); font-size: 0.84rem; margin: 2px 0 var(--space-xs); font-weight: 500; }
.admin-patient-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.meta-item { display: flex; flex-direction: column; gap: 2px; background: #f8fafc; padding: 8px; border-radius: var(--r-sm); border: 1px solid var(--c-border-2); }
.meta-label { font-size: 0.72rem; color: var(--c-text-muted); font-weight: 700; text-transform: uppercase; }
.meta-item > span:last-child { font-size: 0.88rem; font-weight: 600; color: var(--c-text); }

/* Admin Day Detail */
.day-detail-grid { display: flex; flex-direction: column; gap: var(--space-md); }
.detail-section { }
.detail-section h4 {
  font-size: 0.8rem; font-weight: 700; color: var(--c-teal-deep);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-sm);
}
.detail-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.detail-table td { padding: 8px var(--space-sm); border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.detail-table td:first-child { color: var(--c-text-muted); width: 120px; font-weight: 600; }

/* ---- LOADING INLINE ---- */
.loading-inline { text-align: center; color: var(--c-text-muted); font-size: 0.9rem; padding: var(--space-xl); }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---- ADMIN TOOLBAR & ACTIONS ---- */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.toolbar-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.toolbar-heading {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--c-text);
}
.toolbar-sub {
  font-size: 0.76rem;
  color: var(--c-text-muted);
}
.toolbar-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ---- DROPDOWN MENUS ---- */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.dropdown-arrow {
  font-size: 0.72rem;
  opacity: 0.75;
  transition: transform var(--t-fast);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 270px;
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  padding: 6px;
  z-index: 80;
  animation: dropdownFadeIn 0.18s ease-out;
}
.dropdown-menu-right {
  left: auto;
  right: 0;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  text-align: left;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast);
  font-family: var(--font-body);
}
.dropdown-item:hover {
  background: #f1f5f9;
}
.dropdown-icon {
  font-size: 1.15rem;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}
.dropdown-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.25;
}
.dropdown-desc {
  font-size: 0.73rem;
  color: var(--c-text-muted);
  margin-top: 2px;
  line-height: 1.25;
}
.dropdown-divider {
  height: 1px;
  background: var(--c-border-2);
  margin: 5px 0;
}

/* ---- MODAL OVERLAY & DIALOG ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: modalOverlayIn 0.2s ease-out;
}
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-container {
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  background: #ffffff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 45px -8px rgba(15, 23, 42, 0.18), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalContainerIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalContainerIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--c-border-2);
  background: rgba(248, 250, 252, 0.85);
}
.modal-title-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.modal-subtitle {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 2px;
}
.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--c-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.modal-close-btn:hover {
  background: #f1f5f9;
  color: var(--c-text);
}
.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--c-border-2);
  background: rgba(248, 250, 252, 0.85);
}

/* ---- IMPORT MODE TABS ---- */
.import-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 4px;
}
.import-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--c-text-muted);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 600;
  transition: all var(--t-fast);
  text-align: center;
}
.import-tab-btn.active {
  background: #ffffff;
  color: var(--c-teal-deep);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.import-tab-btn:hover:not(.active) {
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.6);
}

/* ---- TEMPLATE HINT CARD ---- */
.template-hint-card {
  background: var(--c-teal-soft);
  border: 1px solid var(--c-teal-border);
  border-radius: var(--r-md);
  padding: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.hint-text {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  color: var(--c-teal-deep);
  gap: 2px;
}
.template-btns {
  display: flex;
  gap: var(--space-xs);
  flex-shrink: 0;
}

/* ---- DROPZONE ---- */
.import-dropzone {
  border: 2px dashed var(--c-teal-border);
  border-radius: var(--r-md);
  background: rgba(240, 253, 250, 0.55);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-fast);
}
.import-dropzone:hover,
.import-dropzone.dragover {
  border-color: var(--c-teal);
  background: rgba(204, 251, 241, 0.65);
  transform: scale(1.004);
}
.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-xs);
}
.primary-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-text);
  display: block;
}
.secondary-text {
  font-size: 0.77rem;
  color: var(--c-text-muted);
  display: block;
  margin-top: 4px;
}
.browse-link {
  color: var(--c-teal-deep);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}
.file-hidden-input {
  display: none;
}

/* ---- IMPORT FILE INFO ---- */
.import-file-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--c-teal-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.file-info-details {
  display: flex;
  align-items: center;
  gap: 10px;
}
.file-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.file-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text);
}
.file-size {
  font-size: 0.74rem;
  color: var(--c-text-muted);
  margin-top: 1px;
}

/* ---- IMPORT PREVIEW TABLE ---- */
.import-preview-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.preview-summary {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}
.import-table-wrapper {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: #ffffff;
}
.import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.import-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 2;
  font-weight: 600;
  color: var(--c-text-muted);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.import-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--c-text);
  white-space: nowrap;
}
.import-table tr:hover td {
  background: #f8fafc;
}

/* ---- PROGRESS BAR ---- */
.import-progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-sm) 0;
}
.progress-bar-wrapper {
  width: 100%;
  height: 9px;
  background: #e2e8f0;
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-teal), #2dd4bf);
  transition: width 0.2s ease;
}
.progress-text {
  font-size: 0.8rem;
  text-align: center;
  color: var(--c-text-muted);
  font-weight: 500;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 520px) {
  .page-container { padding: var(--space-md); }
  .hero-card { flex-direction: column; text-align: center; }
  .hero-right { margin: 0 auto; }
  .form-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stats-row .stat-card:last-child { grid-column: span 2; }
  .meal-row { grid-template-columns: 80px 1fr; }
  .meal-row .meal-input-sm { display: none; }
  .gula-row { grid-template-columns: 1fr 85px; }
  .gula-row .gula-input:last-child { display: none; }
  .calendar-grid { grid-template-columns: repeat(5, 1fr); }
  .tab-btn { font-size: 0.78rem; padding: var(--space-xs) var(--space-sm); }
  .save-actions { flex-direction: column; }
  .admin-patient-meta { grid-template-columns: 1fr; }
  .today-cta-content { flex-direction: column; align-items: flex-start; }
  .signature-row { flex-direction: column; }
  .admin-toolbar { flex-direction: column; align-items: stretch; gap: var(--space-sm); }
  .toolbar-buttons { justify-content: flex-start; }
  .modal-container { max-height: 96vh; }
  .dropdown-menu { max-width: 90vw; }
}

@media (max-width: 360px) {
  .calendar-grid { grid-template-columns: repeat(5, 1fr); }
  .brand-title { font-size: 1.15rem; }
}

/* ============================================================
   PENGATURAN AKUN — SUPERADMIN & ADMIN PUSKESMAS
   ============================================================ */

/* Dropdown mengikuti gaya .form-input. appearance:none menghapus panah
   bawaan browser, jadi chevron-nya digambar sendiri lewat background. */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
  cursor: pointer;
}

/* Penanda cakupan data: mengingatkan admin sedang melihat puskesmas mana */
.scope-bar {
  display: flex; align-items: center; gap: var(--space-md);
  padding: var(--space-md); border-radius: var(--r-md);
  margin-bottom: var(--space-md);
}
.scope-icon { font-size: 1.4rem; flex-shrink: 0; }
.scope-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#admin-scope-name { font-weight: 700; font-size: 0.95rem; color: var(--c-text); }
#admin-scope-sub { font-size: 0.78rem; color: var(--c-text-muted); }

/* Item daftar akun & puskesmas: memakai .patient-item tapi tidak bisa diklik
   sebagai satu kesatuan, karena aksinya ada pada tombol di sebelah kanan. */
.acc-item { cursor: default; }
.acc-item:hover {
  background: #ffffff; border-color: var(--c-border);
  transform: none; box-shadow: var(--shadow-sm);
}
.acc-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

.acc-hint {
  font-size: 0.78rem; color: var(--c-text-muted);
  margin-top: 6px; line-height: 1.5;
}

.acc-migrate-row {
  display: flex; gap: var(--space-sm); align-items: center;
  margin-top: var(--space-sm); flex-wrap: wrap;
}
.acc-migrate-row .form-input { flex: 1; min-width: 180px; }

.badge-violet { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.badge-rose { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }

@media (max-width: 560px) {
  .acc-item { flex-wrap: wrap; }
  .acc-actions { width: 100%; justify-content: flex-end; }
}

/* Tab pada Pengaturan Akun memakai class sendiri: .tab-btn / .tab-content
   sudah dipakai logbook dengan handler global yang membaca data-tab. */
.acc-tab-btn {
  flex: 1; min-width: max-content; background: none; border: none; color: var(--c-text-muted);
  padding: 8px var(--space-md); border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--font-body); font-size: 0.84rem; font-weight: 500; transition: all var(--t-fast);
  white-space: nowrap;
}
.acc-tab-btn.active {
  background: #ffffff; color: var(--c-teal-deep); font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.acc-tab-btn:hover:not(.active) { color: var(--c-text); background: rgba(255,255,255,0.6); }
.acc-tab-panel { display: none; }
.acc-tab-panel.active { display: block; animation: fadeIn var(--t-fast); }

/* Kartu .glass memakai backdrop-filter, dan properti itu membuat stacking
   context baru. Akibatnya setiap kartu setelah toolbar (pencarian, daftar
   pasien) digambar di atas menu dropdown, berapa pun z-index menu itu —
   karena z-index-nya hanya berlaku di dalam toolbar. Menaikkan toolbar
   sendiri di atas kartu-kartu sesudahnya yang membuat menunya terlihat.
   Tetap di bawah .top-nav (z-index 100) supaya nav tidak ikut tertutup. */
.admin-toolbar {
  position: relative;
  z-index: 60;
}

/* ============================================================
   FOOTER PENDANAAN
   ============================================================ */
.app-footer {
  border-top: 1px solid var(--c-border);
  background: rgba(255, 255, 255, 0.72);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}
.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
/* Tinggi diseragamkan dan lebar mengikuti rasio masing-masing, supaya logo
   yang tidak persegi tidak tampak gepeng. */
.footer-logos img {
  height: 56px;
  width: auto;
  object-fit: contain;
}
.footer-text {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  max-width: 540px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 560px) {
  .footer-logos { gap: var(--space-md); }
  .footer-logos img { height: 42px; }
  .footer-text { font-size: 0.78rem; }
}
