/* ============================================================
   SISTEMA FINANCEIRO — FORMATURA VILLA LOBOS
   Design System Premium · MVP Edition
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900&display=swap');

/* ─── 1. DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Brand Palette — Premium Violet ×  Green accent */
  --brand-50:  #f5f3ff;
  --brand-100: #ede9fe;
  --brand-200: #ddd6fe;
  --brand-300: #c4b5fd;
  --brand-400: #a78bfa;
  --brand-500: #8b5cf6;
  --brand-600: #7c3aed;
  --brand-700: #6d28d9;
  --brand-800: #5b21b6;
  --brand-900: #4c1d95;

  /* Accent Green */
  --accent-400: #34d399;
  --accent-500: #10b981;
  --accent-600: #059669;

  /* Superfícies Light */
  --bg:           #f8f7fe;
  --surface:      #ffffff;
  --surface-2:    #fafaf9;
  --surface-hover:#f5f3ff;
  --border:       #e8e5f5;
  --border-dark:  #d1cef0;

  /* Sidebar — Deep Dark */
  --sidebar-bg:         #0d0a1a;
  --sidebar-surface:    #16122b;
  --sidebar-border:     rgba(139,92,246,0.12);
  --sidebar-text:       #8b85b0;
  --sidebar-text-hover: #f1efff;
  --sidebar-active-bg:  rgba(139,92,246,0.15);
  --sidebar-active:     #a78bfa;

  /* Topbar */
  --topbar-bg: rgba(255,255,255,0.9);

  /* Texto */
  --text-1: #1a1535;
  --text-2: #4a4474;
  --text-3: #9994b8;

  /* Status */
  --green:        #10b981;
  --green-bg:     #ecfdf5;
  --green-text:   #065f46;
  --red:          #ef4444;
  --red-bg:       #fef2f2;
  --red-text:     #991b1b;
  --yellow:       #f59e0b;
  --yellow-bg:    #fffbeb;
  --yellow-text:  #92400e;
  --blue:         #3b82f6;
  --blue-bg:      #eff6ff;
  --blue-text:    #1e40af;
  --purple:       #8b5cf6;

  /* Sombras */
  --shadow-xs:  0 1px 2px rgba(26,21,53,0.04);
  --shadow-sm:  0 2px 4px rgba(26,21,53,0.06), 0 1px 2px rgba(26,21,53,0.04);
  --shadow-md:  0 6px 16px rgba(26,21,53,0.08), 0 2px 4px rgba(26,21,53,0.05);
  --shadow-lg:  0 12px 28px rgba(26,21,53,0.12), 0 4px 8px rgba(26,21,53,0.06);
  --shadow-xl:  0 24px 48px rgba(26,21,53,0.14), 0 8px 16px rgba(26,21,53,0.06);
  --shadow-glow-brand: 0 0 32px rgba(139,92,246,0.3);
  --shadow-glow-green: 0 0 24px rgba(16,185,129,0.25);

  /* Gradientes */
  --gradient-brand:   linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  --gradient-brand-2: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 55%, #34d399 100%);
  --gradient-hero:    linear-gradient(135deg, #0d0a1a 0%, #1a1235 50%, #0f0c20 100%);
  --gradient-hero-2:  linear-gradient(160deg, #16122b 0%, #1e1840 50%, #12102a 100%);
  --gradient-card:    linear-gradient(145deg, #ffffff 0%, #fafaf9 100%);
  --gradient-success: linear-gradient(135deg, #10b981, #059669);
  --gradient-danger:  linear-gradient(135deg, #ef4444, #dc2626);
  --gradient-warning: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-info:    linear-gradient(135deg, #3b82f6, #2563eb);
  --gradient-purple:  linear-gradient(135deg, #8b5cf6, #6d28d9);
  --gradient-aurora:  linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #059669 100%);

  /* Layout */
  --sidebar-w:     270px;
  --topbar-h:      64px;
  --radius:        0.875rem;
  --radius-sm:     0.5rem;
  --radius-lg:     1.125rem;
  --radius-xl:     1.5rem;
  --radius-2xl:    2rem;
  --radius-full:   9999px;

  /* Tipografia */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Transitions */
  --t-fast:   0.12s ease;
  --t-base:   0.2s ease;
  --t-slow:   0.35s ease;
  --t-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── 2. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── 3. LAYOUT ──────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--t-slow);
  min-width: 0;
}

/* ─── 4. SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--t-slow);
  overflow: hidden;
}

/* Mesh gradient overlay */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139,92,246,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 100%, rgba(52,211,153,0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.sidebar > * { position: relative; z-index: 1; }

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: var(--gradient-brand);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
  color: white;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(139,92,246,0.45);
  position: relative;
  overflow: hidden;
}

.sidebar-logo::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -10%;
  width: 70%;
  height: 60%;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--sidebar-text-hover);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.sidebar-brand-sub {
  font-size: 0.6875rem;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.875rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 4px; }

.sidebar-section {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--sidebar-border);
  border-radius: 1px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6875rem 0.875rem;
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--t-base);
  white-space: nowrap;
  position: relative;
  margin-bottom: 2px;
  letter-spacing: -0.1px;
}

.sidebar-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--t-base), transform var(--t-base);
}

.sidebar-link:hover {
  background: rgba(139,92,246,0.07);
  color: var(--sidebar-text-hover);
}

.sidebar-link:hover svg {
  opacity: 1;
  transform: translateX(1px);
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: 600;
}

.sidebar-link.active svg { opacity: 1; color: var(--sidebar-active); }

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--gradient-brand);
  border-radius: 0 3px 3px 0;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--gradient-danger);
  color: white;
  font-size: 0.5625rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
  line-height: 1.5;
  animation: pulseBadge 2s ease infinite;
}

@keyframes pulseBadge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--t-base);
}

.sidebar-user:hover { background: rgba(139,92,246,0.06); }

.sidebar-avatar {
  width: 34px;
  height: 34px;
  background: var(--gradient-brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(139,92,246,0.35);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sidebar-text-hover);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: var(--sidebar-text);
}

.sidebar-link-danger {
  color: #f87171;
}

.sidebar-link-danger:hover {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
}

/* Overlay mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,10,26,0.6);
  backdrop-filter: blur(6px);
  z-index: 999;
  transition: opacity var(--t-slow);
}

/* ─── 5. TOPBAR ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.75rem;
  box-shadow: 0 1px 0 var(--border), var(--shadow-xs);
  flex-shrink: 0;
}

.topbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-base);
  flex-shrink: 0;
}

.topbar-toggle:hover { background: var(--surface-hover); color: var(--text-1); }

.topbar-breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-3);
  min-width: 0;
  overflow: hidden;
}

.topbar-breadcrumb a {
  color: var(--text-2);
  transition: color var(--t-base);
  white-space: nowrap;
}

.topbar-breadcrumb a:hover { color: var(--brand-600); }

.breadcrumb-sep { color: var(--text-3); font-size: 0.75rem; flex-shrink: 0; }

.breadcrumb-current {
  color: var(--text-1);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.topbar-role-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
}

.topbar-role-badge.admin {
  background: var(--gradient-brand);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(139,92,246,0.3);
}

/* ─── 6. MAIN CONTENT ────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 2rem;
  max-width: 1240px;
  width: 100%;
  margin-inline: auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.page-header-left { flex: 1; min-width: 0; }

.page-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.75px;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--text-2);
  font-weight: 400;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* ─── 7. FOOTER ──────────────────────────────────────────────── */
.footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-3);
  background: var(--surface);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer::before {
  content: '🎓';
  font-size: 1rem;
}

/* ─── 8. STAT CARDS ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--t-base), box-shadow var(--t-base);
  position: relative;
  overflow: hidden;
}

/* Decorative corner shape */
.stat-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.04;
  transition: opacity var(--t-base), transform var(--t-slow);
}

.stat-card.green::before { background: var(--green); }
.stat-card.red::before   { background: var(--red); }
.stat-card.blue::before  { background: var(--blue); }

.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity var(--t-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stat-card:hover::after { opacity: 1; }
.stat-card:hover::before { opacity: 0.08; transform: scale(1.4); }

.stat-card.green::after { background: var(--gradient-success); }
.stat-card.red::after   { background: var(--gradient-danger); }
.stat-card.blue::after  { background: var(--gradient-info); }
.stat-card.brand::after { background: var(--gradient-brand); }

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--t-spring);
}

.stat-card:hover .stat-card-icon { transform: rotate(-6deg) scale(1.1); }

.stat-card-icon svg { width: 22px; height: 22px; }

.stat-card-icon.green  { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: var(--green); box-shadow: 0 4px 12px rgba(16,185,129,0.15); }
.stat-card-icon.red    { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: var(--red); box-shadow: 0 4px 12px rgba(239,68,68,0.15); }
.stat-card-icon.blue   { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: var(--blue); box-shadow: 0 4px 12px rgba(59,130,246,0.15); }
.stat-card-icon.brand  { background: linear-gradient(135deg, #f5f3ff, #ede9fe); color: var(--brand-600); box-shadow: 0 4px 12px rgba(139,92,246,0.15); }
.stat-card-icon.purple { background: linear-gradient(135deg, #f5f3ff, #ede9fe); color: var(--purple); box-shadow: 0 4px 12px rgba(139,92,246,0.15); }

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.375rem;
}

.stat-card-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-card-value.positive { color: var(--green); }
.stat-card-value.negative { color: var(--red); }
.stat-card-value.accent   { color: var(--brand-600); }
.stat-card-value.info     { color: var(--blue); }

.stat-card-footer {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Gradient hero stat card */
.stat-card-hero {
  background: var(--gradient-hero-2);
  border: 1px solid rgba(139,92,246,0.2);
  color: white;
  overflow: hidden;
}

.stat-card-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 80% 0%, rgba(139,92,246,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at -10% 100%, rgba(52,211,153,0.15) 0%, transparent 60%);
}

.stat-card-hero::after { display: none; }
.stat-card-hero:hover  { box-shadow: var(--shadow-xl); }
.stat-card-hero:hover::before { opacity: 1; }

.stat-card-hero .stat-card-label { color: rgba(255,255,255,0.55); }
.stat-card-hero .stat-card-value { color: white; }
.stat-card-hero .stat-card-footer { border-top-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.55); }

/* Progress bar in hero card */
.progress-wrap { margin-top: 1rem; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.5rem;
}
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #34d399);
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Quick Access Cards */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--t-base);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
  background: var(--surface-hover);
}

.quick-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.quick-card-info { flex: 1; min-width: 0; }
.quick-card-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.125rem;
}
.quick-card-desc {
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ─── 9. DATA TABLES ─────────────────────────────────────────── */
.table-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.table-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.table-scroll { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-3);
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-1);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--t-fast);
}

.data-table tbody tr:hover { background: var(--surface-hover); }

.data-table td.mono {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.td-muted { color: var(--text-3); font-size: 0.8rem; }

/* ─── 10. BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-success { background: var(--green-bg); color: var(--green-text); }
.badge-success .badge-dot { background: var(--green); }
.badge-danger  { background: var(--red-bg);   color: var(--red-text); }
.badge-danger  .badge-dot { background: var(--red); }
.badge-warning { background: var(--yellow-bg);color: var(--yellow-text); }
.badge-warning .badge-dot { background: var(--yellow); }
.badge-info    { background: var(--blue-bg);  color: var(--blue-text); }
.badge-info    .badge-dot { background: var(--blue); }
.badge-neutral { background: var(--bg); color: var(--text-2); border: 1px solid var(--border); }

.badge-pago    { background: #ecfdf5; color: #065f46; }
.badge-pendente{ background: #fffbeb; color: #92400e; }
.badge-atrasado{ background: var(--red-bg);   color: var(--red-text); }

/* Category badges */
.badge-rifa        { background: #faf5ff; color: #6b21a8; }
.badge-evento      { background: #eff6ff; color: #1e40af; }
.badge-mensalidade { background: #ecfdf5; color: #065f46; }
.badge-outros      { background: var(--bg); color: var(--text-2); border: 1px solid var(--border); }
.badge-contrato    { background: #eff6ff; color: #1e40af; }
.badge-custo       { background: #fffbeb; color: #92400e; }

/* ─── 11. BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all var(--t-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: -0.1px;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Ripple */
.btn::after {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%; left: -25%;
  background: radial-gradient(circle, rgba(255,255,255,0.28) 0%, transparent 60%);
  transform: scale(0);
  transition: transform 0.4s ease;
  border-radius: 50%;
  pointer-events: none;
}
.btn:active::after { transform: scale(1); transition: 0s; }

.btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: 0 2px 8px rgba(139,92,246,0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,92,246,0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16,185,129,0.4);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,0.25);
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239,68,68,0.35);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--brand-300);
  color: var(--brand-700);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-1); }

.btn-ghost-danger {
  background: transparent;
  color: var(--red);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-sm);
  transition: all var(--t-base);
  font-family: var(--font);
}
.btn-ghost-danger:hover { background: var(--red-bg); box-shadow: var(--shadow-xs); }

.btn-icon {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.8125rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-full { width: 100%; }

/* Pay button */
.btn-pay {
  background: transparent;
  color: var(--green);
  border: 1.5px solid rgba(16,185,129,0.4);
  padding: 0.3rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font);
}
.btn-pay:hover {
  background: var(--green-bg);
  border-color: var(--green);
  box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}

/* ─── 12. FORMS ──────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  max-width: 640px;
  margin-inline: auto;
  overflow: hidden;
}

.form-card-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
}

.form-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-card-title-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-brand);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.form-card-title-icon svg { width: 15px; height: 15px; }

.form-card-body {
  padding: 1.75rem 2rem;
}

.form-card-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg);
}

.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-1);
  font-size: 0.875rem;
}

.form-label svg { width: 14px; height: 14px; color: var(--text-3); }

.form-input {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-1);
  background: var(--surface);
  transition: all var(--t-base);
  outline: none;
}

.form-input:hover  { border-color: var(--border-dark); }
.form-input:focus  {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}
.form-input::placeholder { color: var(--text-3); }

.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

.form-hint {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.form-hint.error { color: var(--red); }

/* Info box */
.info-box {
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--blue-text);
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.info-box svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* Preview box */
.preview-box {
  background: linear-gradient(135deg, var(--brand-50), #ecfdf5);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--brand-700);
  font-weight: 600;
  margin-top: 0.5rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.preview-box.visible { display: flex; }

/* ─── 13. ALERTS ─────────────────────────────────────────────── */
.alerts-container {
  padding: 1rem 2rem 0;
}

.alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
  border-left: 4px solid;
  position: relative;
  box-shadow: var(--shadow-sm);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-success { background: var(--green-bg); color: var(--green-text); border-color: var(--green); }
.alert-error   { background: var(--red-bg);   color: var(--red-text);   border-color: var(--red); }
.alert-warning { background: var(--yellow-bg);color: var(--yellow-text);border-color: var(--yellow); }
.alert-info    { background: var(--blue-bg);  color: var(--blue-text);  border-color: var(--blue); }

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.4;
  line-height: 1;
  padding: 0 0.25rem;
  color: inherit;
  transition: opacity var(--t-fast);
}
.alert-close:hover { opacity: 1; }

/* ─── 14. AUTH LAYOUT ────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Animated mesh background */
.auth-layout::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(139,92,246,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(52,211,153,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 10%, rgba(59,130,246,0.12) 0%, transparent 60%);
  pointer-events: none;
}

/* Floating orbs */
.auth-layout::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
  animation: floatOrb 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.1); }
}

.auth-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.15);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
  animation: cardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  text-align: center;
}

.auth-logo {
  width: 80px;
  height: 80px;
  background: var(--gradient-brand);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-glow-brand), var(--shadow-lg);
  position: relative;
  overflow: hidden;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: var(--shadow-glow-brand), var(--shadow-lg); }
  50% { box-shadow: 0 0 50px rgba(139,92,246,0.5), var(--shadow-lg); }
}

.auth-logo::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 55%;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.auth-logo svg { width: 38px; height: 38px; color: white; position: relative; z-index: 1; }

.auth-title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-1);
  margin-bottom: 0.375rem;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.5;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 4px 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.auth-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
  animation: pulseDot 2s ease infinite;
}

.auth-footer-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-2);
}

.auth-footer-link a {
  color: var(--brand-600);
  font-weight: 600;
  transition: color var(--t-base);
}
.auth-footer-link a:hover { color: var(--brand-700); text-decoration: underline; }

/* Input with icon prefix */
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-3);
  pointer-events: none;
  transition: color var(--t-base);
}
.input-icon-wrap:focus-within svg { color: var(--brand-500); }
.input-icon-wrap .form-input { padding-left: 2.5rem; }

/* ─── 15. NOTIFICATION CARDS ───────────────────────────────── */
.notification-list { display: flex; flex-direction: column; gap: 0.875rem; }

.notification-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all var(--t-base);
}

.notification-card.unread {
  border-left: 3px solid var(--brand-500);
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--surface) 100%);
}

.notification-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.notification-icon-wrap {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--brand-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.notification-icon-wrap.success { background: var(--green-bg); }
.notification-icon-wrap.error   { background: var(--red-bg); }
.notification-icon-wrap.warning { background: var(--yellow-bg); }

.notification-icon-wrap svg { width: 20px; height: 20px; color: var(--brand-600); }

.notification-body { flex: 1; min-width: 0; }
.notification-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.25rem;
}
.notification-message {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.5;
}
.notification-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.625rem;
  flex-wrap: wrap;
}
.notification-date {
  font-size: 0.8125rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.notification-date svg { width: 12px; height: 12px; }

/* Pulse dot for unread */
.unread-dot {
  width: 9px; height: 9px;
  background: var(--brand-500);
  border-radius: 50%;
  animation: pulseDot 2.5s ease-in-out infinite;
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 0 0 rgba(139,92,246,0.4);
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(139,92,246,0); }
}

/* ─── 16. EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-3);
}

.empty-state-icon {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-50), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 2px dashed var(--border-dark);
  font-size: 2.25rem;
}

.empty-state-icon svg { width: 36px; height: 36px; color: var(--text-3); }

.empty-state-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 0.5rem;
}
.empty-state-text { font-size: 0.9rem; line-height: 1.6; }

/* ─── 17. EXPENSE ACCORDION ─────────────────────────────────── */
.expense-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base);
}

.expense-group:hover { box-shadow: var(--shadow-md); }

.expense-group-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  cursor: pointer;
  transition: background var(--t-fast);
  user-select: none;
}

.expense-group-header:hover { background: var(--surface-hover); }

.expense-group-toggle {
  width: 20px; height: 20px;
  color: var(--text-3);
  transition: transform var(--t-base), color var(--t-base);
  flex-shrink: 0;
}

.expense-group.open .expense-group-toggle {
  transform: rotate(90deg);
  color: var(--brand-500);
}

.expense-group-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-1);
  flex: 1;
  min-width: 0;
}

.expense-group-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.expense-group-total {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1rem;
  color: var(--red);
}

.expense-progress-mini {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 1.25rem;
  overflow: hidden;
}

.expense-progress-mini-fill {
  height: 100%;
  background: var(--gradient-success);
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

.expense-group-body {
  display: none;
  border-top: 1px solid var(--border);
}
.expense-group.open .expense-group-body { display: block; }

.expense-group-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  gap: 0.5rem;
}

/* ─── 18. TOAST ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
}

.toast {
  background: var(--sidebar-bg);
  color: var(--sidebar-text-hover);
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  max-width: 340px;
  pointer-events: all;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  border: 1px solid rgba(139,92,246,0.15);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.94); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.toast.out {
  animation: toastOut 0.25s ease forwards;
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); }
}

.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--accent-400); }
.toast.error   .toast-icon { color: var(--red); }
.toast.info    .toast-icon { color: var(--brand-400); }

/* ─── 19. LOADING STATES ─────────────────────────────────────── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── 20. ANIMATIONS ─────────────────────────────────────────── */
.animate-up {
  animation: fadeUpIn 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-up-delay-1 { animation-delay: 0.07s; }
.animate-up-delay-2 { animation-delay: 0.14s; }
.animate-up-delay-3 { animation-delay: 0.21s; }
.animate-up-delay-4 { animation-delay: 0.28s; }

/* ─── 21. DASHBOARD HERO BANNER ─────────────────────────────── */
.dashboard-hero {
  background: var(--gradient-hero-2);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139,92,246,0.2);
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 90% 50%, rgba(139,92,246,0.2) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at -5% 50%, rgba(52,211,153,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.dashboard-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.dashboard-hero-text h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.4px;
  margin-bottom: 0.25rem;
}

.dashboard-hero-text p {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
}

.dashboard-hero-emoji {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
  animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

/* ─── 22. SECTION DIVIDERS ──────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── 23. RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content { padding: 1.5rem; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(139,92,246,0.2);
  }
  .sidebar-overlay.visible { display: block; }
  .main-wrapper { margin-left: 0 !important; }
  .topbar-toggle { display: flex; }
  .content { padding: 1.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.875rem; }
  .quick-access-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .form-card-body { padding: 1.25rem; }
  .form-card-footer { padding: 1rem 1.25rem; }
  .dashboard-hero { padding: 1.5rem; }
  .dashboard-hero-emoji { font-size: 2.5rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-access-grid { grid-template-columns: 1fr; }
  .stat-card-value { font-size: 1.625rem; }
  .auth-card { padding: 2rem 1.5rem; }
  .alerts-container { padding: 1rem 1.25rem 0; }
  .page-title { font-size: 1.5rem; }
}

/* ─── 24. UTILITY ────────────────────────────────────────────── */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.font-mono   { font-variant-numeric: tabular-nums; }
.text-success{ color: var(--green); font-weight: 700; }
.text-danger { color: var(--red);   font-weight: 700; }
.text-muted  { color: var(--text-3); }
.text-sm     { font-size: 0.875rem; }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.gap-2       { gap: 0.5rem; }
.gap-3       { gap: 0.75rem; }
.mt-1        { margin-top: 0.25rem; }
.mt-2        { margin-top: 0.5rem; }
.mt-4        { margin-top: 1rem; }
.mb-0        { margin-bottom: 0; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
