/* ============================================
   APTO ADMIN - Sistema de Diseño Premium
   ============================================ */

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

/* ---- VARIABLES ---- */
:root {
  --bg-base:       #080C14;
  --bg-surface:    #0D1321;
  --bg-card:       rgba(15, 25, 50, 0.6);
  --bg-card-hover: rgba(20, 35, 65, 0.8);
  --bg-input:      rgba(255,255,255,0.05);

  --blue-900: #0A1628;
  --blue-800: #0F2040;
  --blue-700: #152D5E;
  --blue-500: #2563EB;
  --blue-400: #3B82F6;
  --blue-300: #60A5FA;
  --blue-200: #93C5FD;

  --emerald-500: #10B981;
  --emerald-400: #34D399;
  --emerald-300: #6EE7B7;

  --amber-500:  #F59E0B;
  --amber-400:  #FBBF24;
  --rose-500:   #EF4444;
  --rose-400:   #F87171;

  --text-primary:   #F0F6FF;
  --text-secondary: #8BA0C4;
  --text-muted:     #4B6080;

  --border:        rgba(99, 132, 200, 0.12);
  --border-active: rgba(59, 130, 246, 0.4);

  --shadow-glow-blue:    0 0 30px rgba(37, 99, 235, 0.2);
  --shadow-glow-emerald: 0 0 30px rgba(16, 185, 129, 0.2);
  --shadow-card:         0 8px 32px rgba(0,0,0,0.4);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  --sidebar-w: 260px;
  --topbar-h:  68px;

  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--blue-700); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-500); }

/* ---- BACKGROUND GRID ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(37,99,235,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* =======================================
   LAYOUT
   ======================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(8,12,20,0.9);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow-blue);
}
.logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1.1;
}
.logo-text span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 12px 8px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  border: 1px solid transparent;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(37,99,235,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.nav-item:hover { color: var(--text-primary); background: rgba(37,99,235,0.08); }
.nav-item:hover::before { opacity: 1; }
.nav-item.active {
  color: var(--blue-300);
  background: rgba(37,99,235,0.15);
  border-color: var(--border-active);
  box-shadow: inset 2px 0 0 var(--blue-500);
}
.nav-item.active::before { opacity: 1; }
.nav-item-icon { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--rose-500);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-footer-info {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
}
.avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue-500), var(--emerald-500));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.footer-user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.footer-user-role { font-size: 11px; color: var(--text-muted); }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- TOPBAR ---- */
.topbar {
  height: var(--topbar-h);
  background: rgba(8,12,20,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0; z-index: 50;
}
.topbar-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.topbar-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.icon-btn:hover { background: rgba(37,99,235,0.15); color: var(--blue-300); border-color: var(--border-active); }

.current-month-badge {
  background: rgba(37,99,235,0.15);
  border: 1px solid var(--border-active);
  color: var(--blue-300);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
}

/* ---- PAGE CONTENT ---- */
.page-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* ---- SECTIONS ---- */
.section { display: none; animation: fadeSlideIn 0.35s ease; }
.section.active { display: block; }

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

/* =======================================
   COMPONENTS
   ======================================= */

/* ---- GLASS CARD ---- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.glass-card:hover { border-color: var(--border-active); box-shadow: var(--shadow-card); }

/* ---- KPI CARDS ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
  cursor: default;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: 0.06;
  transform: translate(30px, -30px);
  transition: opacity var(--transition);
}
.kpi-card:hover::before { opacity: 0.12; }

.kpi-card.blue::before  { background: var(--blue-400); }
.kpi-card.green::before { background: var(--emerald-400); }
.kpi-card.amber::before { background: var(--amber-400); }
.kpi-card.rose::before  { background: var(--rose-400); }

.kpi-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.kpi-card.blue  .kpi-icon { background: rgba(37,99,235,0.2); }
.kpi-card.green .kpi-icon { background: rgba(16,185,129,0.2); }
.kpi-card.amber .kpi-icon { background: rgba(245,158,11,0.2); }
.kpi-card.rose  .kpi-icon { background: rgba(239,68,68,0.2); }

.kpi-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 28px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.kpi-card.blue  .kpi-value { color: var(--blue-300); }
.kpi-card.green .kpi-value { color: var(--emerald-400); }
.kpi-card.amber .kpi-value { color: var(--amber-400); }
.kpi-card.rose  .kpi-value { color: var(--rose-400); }

.kpi-trend {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; margin-top: 8px;
  color: var(--text-muted);
}
.kpi-trend.up   { color: var(--emerald-400); }
.kpi-trend.down { color: var(--rose-400); }

/* ---- GRID LAYOUTS ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.three-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }

/* ---- CARD HEADER ---- */
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0;
  margin-bottom: 16px;
}
.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 600; color: var(--text-primary);
}
.card-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.card-body { padding: 0 22px 22px; }

/* ---- BUTTON ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: 0 4px 15px rgba(37,99,235,0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.5); }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); border-color: var(--border-active); }
.btn-success {
  background: linear-gradient(135deg, var(--emerald-500), #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.45); }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: var(--rose-400);
  border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; gap: 0; }

/* ---- BADGE / STATUS ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.badge-paid   { background: rgba(16,185,129,0.15); color: var(--emerald-400); border: 1px solid rgba(16,185,129,0.25); }
.badge-paid::before   { background: var(--emerald-400); }
.badge-pending{ background: rgba(245,158,11,0.15);  color: var(--amber-400);   border: 1px solid rgba(245,158,11,0.25); }
.badge-pending::before{ background: var(--amber-400); }
.badge-overdue{ background: rgba(239,68,68,0.15);   color: var(--rose-400);    border: 1px solid rgba(239,68,68,0.25); }
.badge-overdue::before{ background: var(--rose-400); }

/* ---- TABLE ---- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid rgba(99,132,200,0.06);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(37,99,235,0.05); }
tbody td {
  padding: 13px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  vertical-align: middle;
}
tbody td:first-child { color: var(--text-primary); font-weight: 500; }

/* ---- SEARCH / FILTERS ---- */
.search-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.search-input-wrap {
  position: relative; flex: 1; min-width: 180px;
}
.search-input-wrap .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 15px; pointer-events: none;
}
input[type="text"], input[type="number"], input[type="date"],
input[type="email"], input[type="tel"], select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 9px 14px;
  width: 100%;
  transition: all var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-active);
  background: rgba(37,99,235,0.06);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.search-input-wrap input { padding-left: 38px; }
select option { background: var(--bg-surface); }
textarea { resize: vertical; min-height: 80px; }

.filter-group {
  display: flex; align-items: center; gap: 8px;
}
.filter-select { min-width: 130px; }

/* ---- FORM ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 7px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #0D1828;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), var(--shadow-glow-blue);
  transform: scale(0.94) translateY(10px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px 0;
  margin-bottom: 20px;
}
.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px; font-weight: 700; color: var(--text-primary);
}
.modal-close {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); font-size: 16px;
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,0.15); color: var(--rose-400); border-color: rgba(239,68,68,0.3); }
.modal-body { padding: 0 24px 24px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ---- TOAST ---- */
#toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: rgba(15,25,50,0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  min-width: 280px; max-width: 380px;
  font-size: 13px; font-weight: 500;
  animation: toastIn 0.3s ease;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast.info    { border-color: rgba(37,99,235,0.4); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--emerald-400); }
.toast.error   .toast-icon { color: var(--rose-400); }
.toast.info    .toast-icon { color: var(--blue-300); }
.toast-msg { color: var(--text-primary); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---- CHART ---- */
.chart-container { padding: 0 22px 22px; }
.chart-bar-wrap { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.chart-bar-col {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.chart-bar-track {
  width: 100%; flex: 1;
  display: flex; align-items: flex-end;
}
.chart-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  position: relative;
  transition: height 0.8s cubic-bezier(0.34,1.56,0.64,1);
  cursor: pointer;
}
.chart-bar:hover { filter: brightness(1.2); }
.chart-bar-label {
  font-size: 10px; color: var(--text-muted);
  white-space: nowrap;
}
.chart-bar-value {
  font-size: 9px; color: var(--text-secondary);
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
}

/* ---- PROGRESS ---- */
.progress-item { margin-bottom: 14px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.progress-label { color: var(--text-secondary); }
.progress-pct   { color: var(--text-primary); font-weight: 600; }
.progress-track {
  height: 6px; background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.34,1.56,0.64,1);
}

/* ---- RECENT TRANSACTIONS ---- */
.tx-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(99,132,200,0.07);
}
.tx-item:last-child { border-bottom: none; }
.tx-avatar {
  width: 38px; height: 38px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.tx-info { flex: 1; }
.tx-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.tx-apt  { font-size: 11px; color: var(--text-muted); }
.tx-amount { font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700; color: var(--emerald-400); }
.tx-date   { font-size: 11px; color: var(--text-muted); text-align: right; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center; padding: 48px 24px;
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state-text  { font-size: 13px; color: var(--text-muted); }

/* ---- PAGINATION ---- */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted);
}
.pagination-btns { display: flex; gap: 6px; }
.page-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: rgba(37,99,235,0.15);
  border-color: var(--border-active);
  color: var(--blue-300);
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---- REPORT CARD ---- */
.report-month-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all var(--transition);
  cursor: pointer;
}
.report-month-card:hover { border-color: var(--border-active); background: rgba(37,99,235,0.05); }
.report-month-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.report-month-sub  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.report-amount { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: var(--emerald-400); }

/* ---- DONUT CHART ---- */
.donut-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 0;
}
.donut-legend { margin-left: 20px; }
.legend-item  { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.legend-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---- MOBILE MENU ---- */
.menu-toggle {
  display: none;
  width: 38px; height: 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; color: var(--text-secondary);
}

/* ---- CONFIRM DIALOG ---- */
#confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
#confirm-overlay.open { opacity: 1; pointer-events: all; }
.confirm-box {
  background: #0D1828;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 380px; width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  transform: scale(0.94);
  transition: transform var(--transition);
}
#confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-icon { font-size: 42px; margin-bottom: 14px; }
.confirm-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.confirm-text  { font-size: 13px; color: var(--text-secondary); margin-bottom: 22px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }

/* ---- DIVIDER ---- */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ---- METHOD ICONS ---- */
.method-icon { font-size: 16px; }

/* ---- HAMBURGER SIDEBAR MOBILE ---- */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* =======================================
   RESPONSIVE
   ======================================= */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0; }
  .menu-toggle  { display: flex; }
  .two-col, .three-col { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .kpi-value { font-size: 22px; }
}
