/* =============================================================================
   PAINEL ADMINISTRATIVO — PLATAFORMA EDUCATIVA INFANTIL
   Design System: Tema Escuro Executivo, Glassmorphism, Micro-animações e Tipografia Moderna
   ============================================================================= */

:root {
  --adm-bg: #0b0f19;
  --adm-surface: #121826;
  --adm-surface-light: #1e2640;
  --adm-border: rgba(255, 255, 255, 0.08);
  --adm-border-active: rgba(99, 102, 241, 0.5);
  
  --adm-primary: #6366f1;
  --adm-primary-hover: #4f46e5;
  --adm-primary-glow: rgba(99, 102, 241, 0.25);
  
  --adm-success: #10b981;
  --adm-warning: #f59e0b;
  --adm-danger: #ef4444;
  --adm-info: #06b6d4;
  
  --adm-text: #f8fafc;
  --adm-text-muted: #94a3b8;
  --adm-text-dim: #64748b;
  
  --adm-radius-sm: 8px;
  --adm-radius-md: 12px;
  --adm-radius-lg: 16px;
  --adm-font: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --adm-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--adm-bg);
  color: var(--adm-text);
  font-family: var(--adm-font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================================================
   TELA DE LOGIN ADMINISTRATIVO
   ============================================================================= */
.adm-login-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(circle at 50% 30%, #1e1e38 0%, #0b0f19 80%);
}

.adm-login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-lg);
  padding: 40px 32px;
  box-shadow: var(--adm-shadow);
  text-align: center;
}

.adm-login-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: inline-block;
  animation: admPulse 2s infinite ease-in-out;
}

@keyframes admPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.adm-login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--adm-text);
  margin-bottom: 6px;
}

.adm-login-subtitle {
  color: var(--adm-text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* =============================================================================
   LAYOUT PRINCIPAL DO DASHBOARD
   ============================================================================= */
.adm-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.adm-header {
  height: 68px;
  background: rgba(18, 24, 38, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.adm-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.adm-logo-badge {
  background: linear-gradient(135deg, var(--adm-primary), #8b5cf6);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--adm-radius-sm);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--adm-text);
}

.adm-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.adm-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--adm-text-muted);
}

.adm-user-name {
  color: var(--adm-text);
  font-weight: 600;
}

/* TABS DE NAVEGAÇÃO */
.adm-nav-tabs {
  display: flex;
  background: var(--adm-surface);
  border-bottom: 1px solid var(--adm-border);
  padding: 0 32px;
  gap: 8px;
  overflow-x: auto;
}

.adm-tab-btn {
  background: none;
  border: none;
  color: var(--adm-text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.adm-tab-btn:hover {
  color: var(--adm-text);
}

.adm-tab-btn.active {
  color: var(--adm-primary);
  border-bottom-color: var(--adm-primary);
}

/* CONTEÚDO PRINCIPAL */
.adm-main-content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.adm-section {
  display: none;
}

.adm-section.active {
  display: block;
  animation: admFadeIn 0.25s ease-out;
}

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

.adm-card {
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.adm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.adm-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--adm-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-card-subtitle {
  font-size: 13px;
  color: var(--adm-text-muted);
  margin-top: 4px;
}

/* FORMULÁRIOS & CONTROLES */
.adm-form-group {
  margin-bottom: 18px;
  text-align: left;
}

.adm-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--adm-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.adm-form-input,
.adm-form-select,
.adm-form-textarea {
  width: 100%;
  background: var(--adm-surface-light);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-sm);
  padding: 12px 14px;
  color: var(--adm-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.adm-form-input:focus,
.adm-form-select:focus,
.adm-form-textarea:focus {
  border-color: var(--adm-primary);
  box-shadow: 0 0 0 3px var(--adm-primary-glow);
}

.adm-form-textarea {
  resize: vertical;
  min-height: 80px;
}

.adm-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* BOTÕES */
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--adm-radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.adm-btn-primary {
  background: var(--adm-primary);
  color: #fff;
}

.adm-btn-primary:hover {
  background: var(--adm-primary-hover);
  box-shadow: 0 0 16px var(--adm-primary-glow);
}

.adm-btn-secondary {
  background: var(--adm-surface-light);
  border-color: var(--adm-border);
  color: var(--adm-text);
}

.adm-btn-secondary:hover {
  background: #283354;
}

.adm-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--adm-danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.adm-btn-danger:hover {
  background: var(--adm-danger);
  color: #fff;
}

.adm-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* TABELAS */
.adm-table-responsive {
  width: 100%;
  overflow-x: auto;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.adm-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--adm-text-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--adm-border);
}

.adm-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--adm-text);
  font-size: 14px;
}

.adm-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* BADGES & TAGS */
.adm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.adm-badge-primary {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.adm-badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.adm-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.adm-badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* MODAIS */
.adm-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.adm-modal-backdrop.active {
  display: flex;
  animation: admFadeIn 0.2s ease-out;
}

.adm-modal {
  width: 100%;
  max-width: 600px;
  background: var(--adm-surface);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-lg);
  padding: 28px;
  box-shadow: var(--adm-shadow);
  max-height: 90vh;
  overflow-y: auto;
}

.adm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.adm-modal-close {
  background: none;
  border: none;
  color: var(--adm-text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.adm-modal-close:hover {
  color: var(--adm-text);
}

/* NOTIFICAÇÃO TOAST */
.adm-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-toast {
  background: var(--adm-surface-light);
  border: 1px solid var(--adm-border);
  color: var(--adm-text);
  padding: 14px 20px;
  border-radius: var(--adm-radius-sm);
  box-shadow: var(--adm-shadow);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: admToastIn 0.3s ease-out;
  min-width: 280px;
}

.adm-toast.success {
  border-left: 4px solid var(--adm-success);
}

.adm-toast.error {
  border-left: 4px solid var(--adm-danger);
}

@keyframes admToastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .adm-header {
    padding: 0 16px;
  }
  .adm-nav-tabs {
    padding: 0 16px;
  }
  .adm-main-content {
    padding: 16px;
  }
}
