/* ============================
   MÓDULO: ADMIN
   - Activa con: $modulo = 'admin'
   - Scope: body.admin …
   - Paleta: azul neutro
   ============================ */

/* Variables y colores del tema ADMIN */
body.admin{
  --brand:#0d6efd;            /* primario (azul) */
  --brand-dark:#0a58ca;
  --brand-grad:linear-gradient(135deg,#0d6efd,#0a58ca);

  --bg-soft:#f7f8fb;
  --ink:#14171a;
  --stroke:#e6e7ec;

  --success:#198754;
  --warning:#fd7e14;
  --danger:#dc3545;

  background:var(--bg-soft);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}

/* Topbar + layout */
body.admin .topbar{ background:var(--brand-grad); }
body.admin .layout{ display:grid; grid-template-columns:260px 1fr; min-height:calc(100vh - 56px); }
body.admin #sidebar{
  background:#fff; padding:14px; position:sticky; top:56px; height:calc(100vh - 56px);
  overflow:auto; transition:transform .2s ease;
}
body.admin .content{ min-width:0; }

/* Responsive sidebar (no toca tu sidebar.css, solo comportamiento) */
@media (max-width:991.98px){
  body.admin .layout{ grid-template-columns:0 1fr; }
  body.admin #sidebar{ position:fixed; left:0; top:56px; width:280px; transform:translateX(-100%); z-index:1040; }
  body.admin #sidebar.open{ transform:translateX(0); }
  body.admin::after{ content:''; position:fixed; inset:0; background:rgba(0,0,0,.2); opacity:0; pointer-events:none; transition:.2s; }
  body.admin.sidebar-open::after{ opacity:1; pointer-events:auto; }
}

/* Toolbar (título + acciones) */
body.admin .admin-toolbar{
  display:flex; flex-wrap:wrap; gap:.75rem; justify-content:space-between; align-items:center; margin-bottom:1rem;
}
body.admin .admin-toolbar h1{ font-size:1.1rem; margin:0; }

/* Cards */
body.admin .card{
  border:0; border-radius:1rem; background:#fff; box-shadow:0 10px 25px rgba(0,0,0,.06);
}
body.admin .card-header{
  background:#fff; border-bottom:1px solid var(--stroke); font-weight:600;
}

/* Botones */
body.admin .btn-brand{ background:var(--brand); border:0; color:#fff; border-radius:.8rem; padding:.6rem 1rem; }
body.admin .btn-brand:hover{ background:var(--brand-dark); color:#fff; }
body.admin .btn-soft{ background:rgba(0,0,0,.04); border:0; border-radius:.8rem; }

/* Formularios */
body.admin .form-control, body.admin .form-select{ border-radius:.8rem; border:1px solid var(--stroke); }
body.admin .form-floating>.form-control, body.admin .form-floating>.form-select{ border-radius:.8rem; }
body.admin .input-group-text{ border-radius:.8rem 0 0 .8rem; background:#fff; }

/* Tablas */
body.admin .table-modern thead th{
  background:#f2f3f7; border-bottom:0; font-weight:600; text-transform:uppercase; font-size:.82rem;
  position:sticky; top:0; z-index:1;
}
body.admin .table-modern tbody tr{ border-bottom:1px dashed rgba(0,0,0,.08); }
body.admin .table-modern .actions .btn{
  --bs-btn-padding-y:.3rem; --bs-btn-padding-x:.5rem; border-radius:.5rem;
}

/* Badges / estados */
body.admin .badge-soft{ background:rgba(0,0,0,.05); color:#333; font-weight:600; }
body.admin .badge-success{ background:rgba(25,135,84,.12); color:var(--success); font-weight:600; }
body.admin .badge-warning{ background:rgba(253,126,20,.14); color:var(--warning); font-weight:600; }
body.admin .badge-danger{ background:rgba(220,53,69,.14); color:var(--danger); font-weight:600; }

/* Estado vacío */
body.admin .empty{ padding:32px; text-align:center; border:2px dashed #e9ecf3; border-radius:1rem; color:#6c757d; }
body.admin .empty .icon{ font-size:40px; opacity:.6; }

/* Utilidades */
body.admin .rounded-xl{ border-radius:1rem!important; }
body.admin .shadow-soft{ box-shadow:0 10px 25px rgba(0,0,0,.06)!important; }

/* Navegación lateral (solo estilos de enlaces, no reemplaza tu sidebar.css) */
body.admin .nav-section{ font-size:.78rem; text-transform:uppercase; color:#7a7a7a; margin:14px 10px 6px; }
body.admin .nav-item>a{ display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:.7rem; color:#333; text-decoration:none; }
body.admin .nav-item>a:hover{ background:#f5f7fa; }
body.admin .nav-item.active>a{ background:rgba(0,0,0,.04); font-weight:600; }
