/* =====================================================================
   Tema: capa estetica comun. Carga despues de app.css y panel.css y
   reusa los colores por servicio (.g-inicial / .g-sec / .g-sede).
   ===================================================================== */

/* ---------- barra lateral ---------- */
.sidebar { background: linear-gradient(180deg, #0b1220 0%, #111827 100%); }
.brand { gap: 12px; padding: 8px 8px 24px; }
.brand-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9); box-shadow: 0 8px 20px -8px rgba(37,99,235,.85); }
.brand-text { font-size: 15px; line-height: 1.15; }
.nav a { border-radius: 12px; }
.nav a.active { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 8px 18px -10px rgba(37,99,235,.9); }
.sidebar-bottom .btn-primary { background: #fff; border-color: #fff; color: #1d4ed8; box-shadow: none; }
.sidebar-bottom .btn-primary:hover { background: #eff6ff; border-color: #eff6ff; color: #1e40af; }

/* ---------- banda de titulo de cada pantalla ---------- */
.topbar {
  position: relative; overflow: hidden; border-radius: 20px; padding: 22px 26px; margin-bottom: 22px;
  background: linear-gradient(120deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%); color: #fff; align-items: center;
  box-shadow: 0 14px 30px -16px rgba(37,99,235,.6);
}
.topbar::after { content: ""; position: absolute; width: 280px; height: 280px; right: -70px; top: -170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0) 68%); pointer-events: none; }
.topbar > * { position: relative; z-index: 1; }
.page-title { color: #fff; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.topbar .muted { color: rgba(255,255,255,.84); }
.topbar p { margin: 4px 0 0; }
.topbar .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.42); color: #fff; box-shadow: none; }
.topbar .btn:hover { background: rgba(255,255,255,.26); border-color: rgba(255,255,255,.6); color: #fff; }
.topbar .btn-primary { background: #fff; border-color: #fff; color: #1d4ed8; }
.topbar .btn-primary:hover { background: #eff6ff; border-color: #eff6ff; color: #1e40af; }

/* ---------- botones y tarjetas ---------- */
.btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 8px 18px -10px rgba(37,99,235,.9); }
.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); }
.btn-success { background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: 0 8px 18px -10px rgba(22,163,74,.8); }
.card { border-radius: 18px; border-color: #e9edf3; }

/* ---------- avisos ---------- */
.flash { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 12px 15px; border: 1px solid transparent; box-shadow: var(--shadow); }
.flash::before { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.flash-ok { background: #f0fdf4; border-color: #bbf7d0; }
.flash-ok::before { content: "✓"; background: var(--ok); }
.flash-error { background: #fef2f2; border-color: #fecaca; }
.flash-error::before { content: "!"; background: var(--bad); }
.aviso { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-radius: 14px; }
.aviso::before { content: "⚠️"; }

/* ---------- lista de alumnos ---------- */
.buscador { position: relative; flex: 1; min-width: 240px; }
.buscador .input { width: 100%; padding-left: 40px; }
.buscador::before { content: "🔎"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .75; pointer-events: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 18px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); transition: .12s; }
.chip:hover { text-decoration: none; border-color: #cfd6e0; transform: translateY(-1px); }
.chip .n { background: var(--gray-soft); color: var(--muted); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.chip.on { background: var(--g, var(--primary)); border-color: var(--g, var(--primary)); color: #fff; }
.chip.on .n { background: rgba(255,255,255,.24); color: #fff; }

.tabla th { padding: 0 12px 12px; font-size: 11px; letter-spacing: .06em; }
.tabla td { padding: 13px 12px; }
.tabla tbody tr:hover { background: #f6f8fc; }
.scroll-x .tabla { margin: 0; }   /* el contenedor con scroll recorta el margen negativo */
.persona { display: flex; align-items: center; gap: 11px; }
.tabla .avatar { color: var(--g-ink, var(--primary-dark)); background: var(--g-soft, var(--primary-soft));
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--g-tint, var(--primary-soft)); }
.pl { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--g-soft, var(--gray-soft)); color: var(--g-ink, var(--muted)); font-size: 12px; font-weight: 700; }
.ind { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--gray-soft); color: #a3abbd; margin-right: 4px; white-space: nowrap; }
.ind.on { background: var(--ok-soft); color: #15803d; }
.nota { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: #fff; border: 1px dashed var(--line); font-size: 13px; color: var(--muted); }

/* ---------- formularios por secciones ---------- */
.seccion { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.seccion-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px;
  background: var(--primary-soft); }
.seccion h3 { font-size: 16px; }
.seccion p { margin: 1px 0 0; font-size: 13px; color: var(--muted); }
.form-cards { display: grid; gap: 16px; max-width: 860px; }
.opciones-pl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.opcion-pl { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: .12s; }
.opcion-pl:hover { border-color: #cfd6e0; }
.opcion-pl input { position: absolute; opacity: 0; width: 0; height: 0; }
.opcion-pl .e { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--g-soft); }
.opcion-pl b { font-size: 14px; }
.opcion-pl small { color: var(--muted); font-size: 12px; }
.opcion-pl:has(input:checked) { border-color: var(--g); background: var(--g-soft); box-shadow: 0 0 0 3px var(--g-tint); }
.opcion-pl:has(input:checked) b { color: var(--g-ink); }
.opcion-pl:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.acciones-fijas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* ---------- ajustes ---------- */
.ajustes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; margin-bottom: 16px; }
.preview { margin-bottom: 16px; background: linear-gradient(135deg, #eff6ff, #e0f2fe); border-color: #bfdbfe; }
.preview-titulo { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1e40af; margin-bottom: 8px; }
.preview-linea { font-size: 14px; color: #1e3a8a; line-height: 2; }
.preview b { display: inline-block; background: #fff; padding: 1px 9px; border-radius: 7px; color: var(--primary-dark);
  box-shadow: 0 1px 2px rgba(16,24,40,.08); font-weight: 700; }
.preview b.falta { background: var(--warn-soft); color: #92400e; font-weight: 600; }

/* ---------- importar ---------- */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px dashed #c7d2fe; border-radius: 16px; padding: 32px 20px; text-align: center;
  background: #f8faff; transition: .15s; }
.dropzone:hover, .dropzone:focus-within, .dropzone.con-archivo { border-color: var(--primary); background: #eef3ff; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone-ico { font-size: 36px; }
.dropzone b { display: block; margin-top: 6px; font-size: 15px; }
.dropzone small { color: var(--muted); }
.dropzone .archivo { display: none; margin-top: 8px; font-weight: 700; color: var(--primary-dark); }
.dropzone.con-archivo .archivo { display: block; }

/* ---------- login ---------- */
.login-body { background: linear-gradient(135deg, #0b1220 0%, #1e3a8a 45%, #0ea5e9 100%); }
.login-card { border: 0; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.65); }
.login-icono { width: 68px; height: 68px; margin: 0 auto 8px; border-radius: 20px; display: grid; place-items: center; font-size: 34px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9); box-shadow: 0 14px 28px -12px rgba(37,99,235,.8); }

/* ---------- vacio ---------- */
.vacio { border-radius: 20px; }
.vacio-icono { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; font-size: 36px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .topbar { padding: 18px; border-radius: 16px; }
  .page-title { font-size: 24px; }
  .brand { padding: 0; }
  .sidebar-bottom .btn-primary { box-shadow: none; }
}
