/* ═══════════════════════════════════════════════════════════════════
   PSAH-PE v11.1 — Tema Azul Límpido "Água Cristalina"
   Autora: Luana Pessoa Genuino | IFPE MPGA 2026
   ═══════════════════════════════════════════════════════════════════ */

/* ─── VARIÁVEIS DE COR — Azul Límpido ─── */
:root {
  --c-bg:          #f0f7ff;        /* fundo principal — azul clarissimo */
  --c-bg2:         #e3f0fc;        /* fundo secundário */
  --c-bg3:         #cce4f7;        /* fundo terciário */
  --c-surface:     #ffffff;        /* cards/painéis */
  --c-surface2:    #f5faff;        /* superfície alternada */
  --c-border:      #b8d9f0;        /* bordas suaves */
  --c-border2:     #d0e8f8;        /* bordas mais claras */

  /* Azuis principais */
  --c-blue-1:      #0369a1;        /* azul profundo */
  --c-blue-2:      #0284c7;        /* azul médio */
  --c-blue-3:      #0ea5e9;        /* azul vivo */
  --c-blue-4:      #38bdf8;        /* azul claro */
  --c-blue-5:      #7dd3fc;        /* azul muito claro */
  --c-blue-6:      #bae6fd;        /* azul pastel */
  --c-blue-7:      #e0f2fe;        /* azul quase branco */

  /* Textos */
  --c-text:        #0c2340;        /* texto principal — azul escuro */
  --c-text2:       #1e4976;        /* texto secundário */
  --c-text3:       #3a6ea5;        /* texto terciário */
  --c-text-muted:  #6b93b8;        /* texto suave */
  --c-text-inv:    #ffffff;        /* texto sobre fundo escuro */

  /* Acentos */
  --c-green:       #059669;
  --c-green-light: #d1fae5;
  --c-amber:       #d97706;
  --c-amber-light: #fef3c7;
  --c-red:         #dc2626;
  --c-red-light:   #fee2e2;

  /* Gradientes */
  --grad-header:   linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0ea5e9 100%);
  --grad-hero:     linear-gradient(160deg, #0369a1 0%, #0284c7 40%, #38bdf8 100%);
  --grad-card:     linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  --grad-sidebar:  linear-gradient(180deg, #0369a1 0%, #0284c7 60%, #0ea5e9 100%);

  /* Sombras */
  --shadow-sm:     0 1px 3px rgba(3,105,161,0.10), 0 1px 2px rgba(3,105,161,0.06);
  --shadow-md:     0 4px 16px rgba(3,105,161,0.12), 0 2px 6px rgba(3,105,161,0.08);
  --shadow-lg:     0 10px 32px rgba(3,105,161,0.16), 0 4px 12px rgba(3,105,161,0.10);
  --shadow-xl:     0 20px 60px rgba(3,105,161,0.20);

  /* Layout */
  --sidebar-w:     240px;
  --header-h:      56px;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --transition:    0.2s ease;
}

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

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCROLLBAR PERSONALIZADA ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-bg2); }
::-webkit-scrollbar-thumb { background: var(--c-blue-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-blue-3); }

/* ─── TIPOGRAFIA ─── */
h1, h2, h3, h4, h5, h6 { color: var(--c-text); font-weight: 700; line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { color: var(--c-text2); line-height: 1.7; }
a { color: var(--c-blue-2); text-decoration: none; }
a:hover { color: var(--c-blue-1); text-decoration: underline; }

/* ─── HEADER ─── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--grad-header);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(3,105,161,0.25);
}

#header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

#header-logo img {
  height: 36px;
  width: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
}

#header-title {
  color: white;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

#header-title span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.85;
}

#header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botão login no header */
#btn-login-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

#btn-login-header:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

#btn-login-header .login-icon { font-size: 15px; }

#btn-admin-status {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(5,150,105,0.25);
  border: 1px solid rgba(5,150,105,0.5);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
}

#btn-admin-status:hover { background: rgba(220,38,38,0.3); border-color: rgba(220,38,38,0.5); }

/* ─── LAYOUT PRINCIPAL ─── */
#app-container {
  display: flex;
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

/* ─── SIDEBAR ─── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--grad-sidebar);
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 900;
  transition: transform var(--transition);
  box-shadow: 2px 0 16px rgba(3,105,161,0.2);
}

.sidebar-nav { padding: 12px 8px; }
.nav-group { margin-bottom: 18px; }

.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.55);
  padding: 4px 10px;
  margin-bottom: 4px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.nav-item.active {
  background: rgba(255,255,255,0.22);
  color: white;
  font-weight: 600;
  box-shadow: inset 3px 0 0 rgba(255,255,255,0.8);
}

.nav-item .nav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }

/* Admin-only nav items */
.nav-item.admin-only {
  display: none;
  border-left: 2px solid rgba(251,191,36,0.5);
}

body.admin-mode .nav-item.admin-only { display: flex; }

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  line-height: 1.7;
  margin-top: auto;
}

.sidebar-footer strong { color: white; }

/* ─── CONTEÚDO PRINCIPAL ─── */
#main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  background: var(--c-bg);
}

/* ─── PAINÉIS ─── */
.panel { display: none; animation: fadeIn 0.25s ease; }
.panel.active { display: block; }

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

/* Admin-only panels */
.panel.admin-only { display: none !important; }
body.admin-mode .panel.admin-only { display: none; } /* still controlled by active class */
body.admin-mode .panel.admin-only.active { display: block !important; }

/* ─── CARDS ─── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--c-blue-7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ─── GRID ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ─── STATS CARDS ─── */
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.stat-card .stat-icon {
  font-size: 28px;
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--c-blue-1);
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--c-text-muted);
  font-weight: 500;
}

.stat-card .stat-desc {
  font-size: 11px;
  color: var(--c-text3);
}

/* ─── HERO SECTION (Home) ─── */
.hero-section {
  background: var(--grad-hero);
  border-radius: var(--radius-xl);
  padding: 40px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 40%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-white { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.3); }
.badge-green { background: var(--c-green-light); color: var(--c-green); }
.badge-blue  { background: var(--c-blue-7); color: var(--c-blue-1); }
.badge-amber { background: var(--c-amber-light); color: var(--c-amber); }

/* ─── BOTÕES ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--c-blue-2);
  color: white;
  box-shadow: 0 2px 8px rgba(2,132,199,0.3);
}
.btn-primary:hover { background: var(--c-blue-1); box-shadow: 0 4px 12px rgba(3,105,161,0.4); color: white; }

.btn-secondary {
  background: var(--c-blue-7);
  color: var(--c-blue-1);
  border: 1px solid var(--c-blue-6);
}
.btn-secondary:hover { background: var(--c-blue-6); color: var(--c-blue-1); }

.btn-outline {
  background: transparent;
  color: var(--c-blue-2);
  border: 1px solid var(--c-blue-4);
}
.btn-outline:hover { background: var(--c-blue-7); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ─── SEÇÃO SOBRE O PROJETO ─── */
.project-team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.team-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.team-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--grad-header);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 12px;
  color: white;
}

.team-name { font-size: 14px; font-weight: 700; color: var(--c-text); }
.team-role { font-size: 12px; color: var(--c-text3); margin-top: 4px; }
.team-inst { font-size: 11px; color: var(--c-text-muted); margin-top: 2px; }

/* ─── CALCULADORA AHP ─── */
.ahp-criterion {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow var(--transition);
}

.ahp-criterion:hover { box-shadow: var(--shadow-md); }

.ahp-criterion-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.ahp-criterion-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--c-blue-7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  border: 1px solid var(--c-border);
}

.ahp-criterion-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}

.ahp-weight-bar {
  height: 8px;
  background: var(--c-bg2);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.ahp-weight-fill {
  height: 100%;
  background: var(--grad-header);
  border-radius: 4px;
  transition: width 0.8s ease;
}

.ahp-weight-label {
  font-size: 22px;
  font-weight: 800;
  color: var(--c-blue-1);
}

/* ─── GALERIA DE MAPAS ─── */
.maps-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.map-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.map-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.map-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--c-bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--c-blue-4);
}

.map-card-body { padding: 14px 16px; }
.map-card-title { font-size: 13px; font-weight: 700; color: var(--c-text); margin-bottom: 4px; }
.map-card-desc { font-size: 12px; color: var(--c-text-muted); }

/* Mapa interativo menor */
#leaflet-map-container {
  height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--c-border);
  box-shadow: var(--shadow-md);
}

/* ─── CHAT IA ─── */
.chat-container {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.chat-header {
  background: var(--grad-header);
  padding: 14px 18px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-messages {
  height: 360px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--c-bg);
}

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.chat-msg.user {
  background: var(--c-blue-2);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-msg.bot {
  background: var(--c-surface);
  color: var(--c-text);
  align-self: flex-start;
  border: 1px solid var(--c-border);
  border-bottom-left-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
}

.chat-input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  font-size: 13px;
  background: var(--c-bg);
  color: var(--c-text);
  outline: none;
}

.chat-input:focus { border-color: var(--c-blue-3); box-shadow: 0 0 0 3px rgba(14,165,233,0.1); }

/* ─── TABELAS ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  background: var(--c-blue-7);
  color: var(--c-blue-1);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--c-blue-5);
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border2);
  color: var(--c-text2);
}

.data-table tr:hover td { background: var(--c-blue-7); }
.data-table tr:last-child td { border-bottom: none; }

/* ─── QR CODE ─── */
.qr-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.qr-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.qr-card img {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  border: 2px solid var(--c-border);
  margin: 12px auto;
  display: block;
}

/* ─── FORMULÁRIOS ─── */
input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--c-blue-3);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}

/* ─── LOADING SCREEN ─── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--grad-hero);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ACESSIBILIDADE ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--c-blue-3); outline-offset: 2px; }

/* ─── SEÇÃO TÍTULO ─── */
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 24px;
}

/* ─── ABNT EDITOR (admin-only) ─── */
#abnt-editor {
  min-height: 400px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--c-surface);
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-text);
  outline: none;
}

#abnt-editor:focus { border-color: var(--c-blue-3); }

/* ─── ALERTAS ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-info { background: var(--c-blue-7); border: 1px solid var(--c-blue-5); color: var(--c-blue-1); }
.alert-success { background: var(--c-green-light); border: 1px solid #6ee7b7; color: var(--c-green); }
.alert-warning { background: var(--c-amber-light); border: 1px solid #fcd34d; color: var(--c-amber); }
.alert-error { background: var(--c-red-light); border: 1px solid #fca5a5; color: var(--c-red); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  #sidebar { transform: translateX(-240px); width: 240px; }
  #sidebar.open { transform: translateX(0); }
  #main-content { margin-left: 0; padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.4rem; }
  .qr-section { grid-template-columns: 1fr; }
  #header-title span { display: none; }
}

@media (max-width: 480px) {
  .hero-section { padding: 24px 16px; }
  .maps-gallery { grid-template-columns: 1fr; }
}

/* ─── PRINT ─── */
@media print {
  #sidebar, #header, #btn-login-header { display: none !important; }
  #main-content { margin-left: 0 !important; }
  .panel { display: block !important; }
}

/* ─── Componentes adicionais v11.1 ─── */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* App header */
.app-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: 56px;
  background: var(--grad-header);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 14px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(3,105,161,0.2);
  color: white;
  transition: left 0.3s;
}
#page-title {
  font-size: 15px;
  font-weight: 700;
  color: white;
}

/* Sidebar logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.logo-icon { font-size: 28px; }
.logo-title { font-size: 16px; font-weight: 800; color: white; line-height: 1.2; }
.logo-sub   { font-size: 10px; color: rgba(255,255,255,0.75); }

/* Sidebar toggle (mobile) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

/* Nav section label */
.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.5);
  padding: 14px 16px 4px;
  text-transform: uppercase;
}

/* Main content offset */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: 56px;
  padding: 28px;
  min-height: calc(100vh - 56px);
  background: var(--c-bg);
}

/* Panel active */
.panel { display: none; animation: fadeIn 0.25s ease; }
.panel.active { display: block; }

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

/* Card */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.card-icon {
  width: 36px;
  height: 36px;
  background: var(--c-bg2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--c-text); }

/* Alert */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
}
.alert-error { background: #fee2e2; border: 1px solid #fca5a5; color: #dc2626; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: var(--font-sans);
  text-decoration: none;
}
.btn-primary {
  background: var(--grad-header);
  color: white;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-secondary {
  background: var(--c-bg2);
  color: var(--c-blue-1);
  border: 1px solid var(--c-border);
}
.btn-secondary:hover { background: var(--c-bg3); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  background: var(--c-blue-7);
  color: var(--c-blue-1);
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid var(--c-border);
}
.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-border2);
  color: var(--c-text);
}
.data-table tr:hover td { background: var(--c-blue-7); }

/* Responsive */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar-toggle { display: flex; }
  .app-header { left: 0; }
  .main-content { margin-left: 0; padding: 16px; }
  #sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    z-index: 200;
    transition: left 0.3s;
    overflow-y: auto;
  }
  #sidebar.open { left: 0; }
}
