/* ==========================================
   VARIABLES Y RESET
   ========================================== */
:root {
  /* Colores base (se sobrescriben dinámicamente desde la DB) */
  --primary: #1e40af;       /* Azul corporativo */
  --primary-dark: #1e3a8a;
  --secondary: #64748b;     /* Gris azulado */
  
  --bg: #f8fafc;            /* Fondo general */
  --white: #ffffff;
  --text: #0f172a;          /* Texto principal */
  --text-light: #64748b;    /* Texto secundario */
  --border: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

/* Reset básico */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

/* ==========================================
   HEADER Y NAVEGACIÓN
   ========================================== */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-link {
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-link:hover { background: var(--bg); color: var(--primary); }
.nav-link.active { background: var(--primary); color: var(--white); }

.user-actions { display: flex; align-items: center; gap: 16px; }
.user-info { text-align: right; }
.user-name { font-weight: 600; font-size: 14px; }
.user-role { font-size: 12px; color: var(--text-light); }

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

/* Menú hamburguesa (oculto en desktop) */
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 4px; }
.hamburger span { width: 25px; height: 3px; background: var(--text); border-radius: 3px; transition: 0.3s; }

/* ==========================================
   LAYOUT Y COMPONENTES
   ========================================== */
.main-wrapper { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }
.page-title { font-size: 28px; margin-bottom: 24px; color: var(--text); }
.card { background: var(--white); padding: 32px; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 24px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-light); font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; box-sizing: border-box;
}
.form-textarea { font-family: monospace; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* ==========================================
   RESPONSIVE (MÓVIL)
   ========================================== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed; top: 70px; left: -100%; width: 100%; height: calc(100vh - 70px);
    background: var(--white); flex-direction: column; padding: 24px;
    transition: left 0.3s ease; box-shadow: var(--shadow);
  }
  .nav-menu.active { left: 0; }
  .nav-link { width: 100%; padding: 16px; }
  .user-actions { display: none; } /* En móvil simplificamos */
}
/* Importar componentes y responsive */
@import url('components.css');
@import url('responsive.css');