/* ============================================================
   MAUX Admin · Design System v2.0
   Colegio María Auxiliadora · Valdivia
   Reemplaza: login.css, list_students_mat.css, base_style.css,
              message.css, student_data.css, representative_data.css,
              student_medical_sheet.css, student_parent.css,
              response_survey.css, recover_pwd.css,
              representative_register.css, process_recover_pwd.css
   ============================================================ */

/* ── 1. Google Fonts ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── 2. Tokens de diseño ───────────────────────────────────── */
:root {
  --blue:          #1B3A8C;
  --blue-dark:     #112568;
  --blue-mid:      #2a52b8;
  --blue-light:    #E8EEF9;
  --blue-xlight:   #F3F6FC;
  --steel:         #4A8FA8;
  --steel-dark:    #2e6e87;
  --steel-light:   #E6F2F6;

  --success:       #16a34a;
  --success-bg:    #dcfce7;
  --warning:       #b45309;
  --warning-bg:    #fef9c3;
  --danger:        #b91c1c;
  --danger-bg:     #fee2e2;
  --info:          #0369a1;
  --info-bg:       #e0f2fe;

  --bg:            #F2F5FA;
  --surface:       #ffffff;
  --border:        #E2E8F0;
  --border-strong: #CBD5E1;

  --text:          #1E293B;
  --text-muted:    #64748B;
  --text-xs:       #94A3B8;

  --sidebar-w:     220px;
  --sidebar-col:   56px;
  --topbar-h:      56px;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --transition:    .2s ease;
}

/* ── 3. Base global ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* Elimina el padding-top que usaban todos los CSS viejos */
body.maux-app  { overflow: hidden; height: 100vh; }
body.maux-page { padding-top: 0; }

/* ── 4. LAYOUT SHELL ───────────────────────────────────────── */
.maux-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.maux-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.maux-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── 5. SIDEBAR ────────────────────────────────────────────── */
.maux-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--blue);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--transition), min-width var(--transition);
  position: relative;
  z-index: 100;
}
.maux-sidebar.collapsed {
  width: var(--sidebar-col);
  min-width: var(--sidebar-col);
}

/* Brand */
.maux-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  min-height: var(--topbar-h);
  flex-shrink: 0;
  text-decoration: none;
}
.maux-brand-mark {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--steel);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.maux-brand-mark svg { width: 20px; height: 20px; fill: #fff; }
.maux-brand-text { overflow: hidden; white-space: nowrap; transition: opacity var(--transition); }
.maux-sidebar.collapsed .maux-brand-text { opacity: 0; pointer-events: none; }
.maux-brand-name { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.2; }
.maux-brand-sub  { font-size: 10px; color: rgba(255,255,255,.45); margin-top: 1px; }

/* Toggle */
.maux-toggle {
  position: absolute; right: -11px; top: 68px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); border: 2px solid rgba(255,255,255,.2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 101; transition: background var(--transition);
}
.maux-toggle:hover { background: var(--steel); }
.maux-toggle svg {
  width: 10px; height: 10px; fill: none;
  stroke: #fff; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--transition);
}
.maux-sidebar.collapsed .maux-toggle svg { transform: rotate(180deg); }

/* Scroll area */
.maux-sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.maux-sidebar-scroll::-webkit-scrollbar { display: none; }

/* Section labels */
.maux-nav-section { padding: 6px 0; }
.maux-nav-label {
  font-size: 10px; font-weight: 600; letter-spacing: .07em;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  padding: 10px 14px 4px;
  white-space: nowrap; overflow: hidden;
  transition: opacity var(--transition);
}
.maux-sidebar.collapsed .maux-nav-label { opacity: 0; }

/* Nav items */
.maux-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
  color: rgba(255,255,255,.7);
  position: relative;
}
.maux-nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); text-decoration: none; }
.maux-nav-item.active { background: rgba(255,255,255,.12); border-left-color: var(--steel); color: #fff; }

.maux-nav-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.maux-nav-icon svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.maux-nav-text { font-size: 13px; flex: 1; transition: opacity var(--transition); }
.maux-sidebar.collapsed .maux-nav-text { opacity: 0; }

.maux-nav-badge {
  background: var(--steel); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  flex-shrink: 0; transition: opacity var(--transition);
}
.maux-sidebar.collapsed .maux-nav-badge { opacity: 0; }

/* Tooltip colapsado */
.maux-sidebar.collapsed .maux-nav-item:hover::after {
  content: attr(data-tip);
  position: absolute; left: calc(var(--sidebar-col) + 8px); top: 50%;
  transform: translateY(-50%);
  background: var(--blue-dark); color: #fff;
  font-size: 12px; padding: 5px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* User footer */
.maux-sidebar-user {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 12px; display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; overflow: hidden;
}
.maux-sidebar-user-avatar {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--steel); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.maux-sidebar-user-info { overflow: hidden; transition: opacity var(--transition); }
.maux-sidebar.collapsed .maux-sidebar-user-info { opacity: 0; }
.maux-sidebar-user-name  { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maux-sidebar-user-role  { font-size: 10px; color: rgba(255,255,255,.45); }
.maux-sidebar-logout {
  margin-left: auto; flex-shrink: 0;
  color: rgba(255,255,255,.45); transition: color var(--transition);
  text-decoration: none; display: flex;
}
.maux-sidebar-logout:hover { color: #fff; }
.maux-sidebar-logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── 6. TOPBAR ─────────────────────────────────────────────── */
.maux-topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; flex-shrink: 0;
}
.maux-topbar-info { flex: 1; min-width: 0; }
.maux-topbar-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.maux-breadcrumb {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.maux-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.maux-breadcrumb a:hover { color: var(--blue); }
.maux-breadcrumb-sep { color: var(--text-xs); }

.maux-period-badge {
  background: var(--blue-light); color: var(--blue);
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
  white-space: nowrap; letter-spacing: .02em; flex-shrink: 0;
}

/* Search */
.maux-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px;
  min-width: 200px; max-width: 280px;
  transition: border-color var(--transition);
}
.maux-search:focus-within { border-color: var(--blue); background: var(--surface); }
.maux-search input {
  border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text); width: 100%;
  font-family: inherit;
}
.maux-search input::placeholder { color: var(--text-muted); }
.maux-search svg { width: 14px; height: 14px; fill: none; stroke: var(--text-muted); stroke-width: 1.8; flex-shrink: 0; }

/* Topbar action buttons */
.maux-topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.maux-icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition);
  position: relative; border: none; background: transparent; color: var(--text-muted);
  text-decoration: none;
}
.maux-icon-btn:hover { background: var(--bg); color: var(--text); }
.maux-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.maux-notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #e74c3c; border: 1.5px solid var(--surface);
}

/* User chip */
.maux-user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 10px 4px 5px;
  cursor: pointer; transition: border-color var(--transition); text-decoration: none;
}
.maux-user-chip:hover { border-color: var(--border-strong); }
.maux-user-avatar-sm {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--steel); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.maux-user-chip-name { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.2; }
.maux-user-chip-role { font-size: 10px; color: var(--text-muted); }

/* ── 7. BOTTOM NAV (móvil) ─────────────────────────────────── */
.maux-bottom-nav {
  display: none; height: 56px; background: var(--surface);
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.maux-bn-items { display: flex; height: 100%; }
.maux-bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; border-top: 2px solid transparent;
  transition: border-color var(--transition); text-decoration: none; color: var(--text-muted);
}
.maux-bn-item.active { border-top-color: var(--blue); color: var(--blue); }
.maux-bn-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.maux-bn-item span { font-size: 9px; font-weight: 500; }

/* ── 8. PAGE HEADER ────────────────────────────────────────── */
.maux-page-header {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px;
}
.maux-page-header h1 {
  font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 3px;
}
.maux-page-header p { font-size: 13px; color: var(--text-muted); margin: 0; }
.maux-page-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

/* ── 9. KPI CARDS ──────────────────────────────────────────── */
.maux-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.maux-kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--kpi-color, var(--steel));
  padding: 14px 16px;
}
.maux-kpi-label { font-size: 11px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.maux-kpi-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.maux-kpi-sub   { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.maux-kpi-trend { font-size: 11px; font-weight: 600; margin-top: 4px; }
.maux-kpi-trend.up   { color: var(--success); }
.maux-kpi-trend.warn { color: var(--warning); }
.maux-kpi-trend.down { color: var(--danger); }

/* ── 10. CARDS ─────────────────────────────────────────────── */
.maux-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px;
}
.maux-card-header {
  padding: 14px 18px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.maux-card-title { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.maux-card-sub   { font-size: 11px; color: var(--text-muted); }
.maux-card-body  { padding: 16px 18px; }

/* ── 11. TABLA ─────────────────────────────────────────────── */
.maux-table-wrap { overflow-x: auto; }
.maux-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.maux-table th {
  background: var(--bg); font-weight: 600; color: var(--text-muted);
  padding: 10px 14px; text-align: left; font-size: 11px;
  letter-spacing: .04em; border-bottom: 1px solid var(--border);
  white-space: nowrap; text-transform: uppercase; user-select: none;
}
.maux-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.maux-table tbody tr:last-child td { border-bottom: none; }
.maux-table tbody tr:hover td { background: var(--blue-xlight); }
.maux-table td.td-rut { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text-muted); }
.maux-table td.td-nombre { font-weight: 500; }

/* ── 12. BADGES ────────────────────────────────────────────── */
.maux-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 20px;
  white-space: nowrap;
}
.maux-badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.maux-badge.no-dot::before { display: none; }
.maux-badge.ok      { background: var(--success-bg); color: #166534; }
.maux-badge.pending { background: var(--warning-bg); color: #854d0e; }
.maux-badge.none    { background: #f1f5f9; color: #475569; }
.maux-badge.fd      { background: var(--steel-light); color: #1e6579; }
.maux-badge.danger  { background: var(--danger-bg); color: #9b1c1c; }
.maux-badge.blue    { background: var(--blue-light); color: var(--blue); }

/* ── 13. BOTONES ───────────────────────────────────────────── */
.maux-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 500; font-family: inherit;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  transition: background var(--transition), border-color var(--transition), transform .1s;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.maux-btn:hover  { background: var(--bg); border-color: var(--border-strong); color: var(--text); }
.maux-btn:active { transform: scale(.98); }
.maux-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.maux-btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.maux-btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.maux-btn-steel { background: var(--steel); color: #fff; border-color: var(--steel); }
.maux-btn-steel:hover { background: var(--steel-dark); border-color: var(--steel-dark); color: #fff; }
.maux-btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.maux-btn-success { background: var(--success); color: #fff; border-color: var(--success); }

.maux-btn-sm { padding: 5px 10px; font-size: 11.5px; }
.maux-btn-xs { padding: 3px 8px;  font-size: 11px; }

/* ── 14. FORMULARIOS ───────────────────────────────────────── */
.maux-form-group { margin-bottom: 16px; }
.maux-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px; letter-spacing: .02em;
}
.maux-label .req { color: var(--danger); margin-left: 2px; }
.maux-input, .maux-select, .maux-textarea {
  width: 100%; padding: 8px 12px; font-size: 13px; font-family: inherit;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.maux-input:focus, .maux-select:focus, .maux-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,58,140,.1);
}
.maux-input.is-error { border-color: var(--danger); }
.maux-input.is-ok    { border-color: var(--success); }
.maux-textarea { resize: vertical; min-height: 90px; }

/* Sección de formulario (reemplaza seccion-titulo/detalle) */
.maux-section-title {
  background: var(--blue-light); color: var(--blue);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; margin: 16px 0 10px;
  border-left: 3px solid var(--blue);
}
.maux-section-sub {
  background: var(--steel-light); color: #1e6579;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 12px; margin-bottom: 10px;
}

/* ── 15. TOAST / ALERTAS ───────────────────────────────────── */
.maux-toast-wrap {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.maux-toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 360px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  pointer-events: all; animation: toastIn .2s ease;
  border-left: 4px solid var(--blue);
}
.maux-toast.ok     { border-left-color: var(--success); }
.maux-toast.warn   { border-left-color: var(--warning); }
.maux-toast.danger { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ── 16. LOGIN PAGE ────────────────────────────────────────── */
body.maux-login {
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.maux-login-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 40px 36px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.maux-login-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 28px;
}
.maux-login-logo-mark {
  width: 48px; height: 48px; background: var(--blue);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.maux-login-logo-mark svg { width: 30px; height: 30px; fill: #fff; }
.maux-login-logo-text {}
.maux-login-logo-name { font-size: 18px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.maux-login-logo-sub  { font-size: 11px; color: var(--text-muted); }
.maux-login-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; text-align: center; }
.maux-login-desc  { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; text-align: center; }
.maux-login-error {
  background: var(--danger-bg); color: var(--danger);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.maux-login-error svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.maux-login-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.maux-recaptcha-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.maux-login-btn {
  width: 100%; padding: 10px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background var(--transition);
}
.maux-login-btn:hover { background: var(--blue-dark); }
.maux-login-closed {
  text-align: center; padding: 32px 16px;
  color: var(--text-muted); font-size: 14px;
}

/* ── 17. MESSAGE PAGE ──────────────────────────────────────── */
body.maux-message {
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.maux-message-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 40px 36px; text-align: center;
  max-width: 440px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

/* ── 18. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
  body.maux-app { overflow: auto; height: auto; }
  .maux-shell { flex-direction: column; height: auto; min-height: 100vh; }
  .maux-sidebar { display: none; }
  .maux-bottom-nav { display: flex; }
  .maux-content { overflow-y: visible; padding: 14px; }
  .maux-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .maux-search { display: none; }
  .maux-topbar { padding: 0 14px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .maux-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── 19. UTILIDADES ────────────────────────────────────────── */
.maux-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.maux-text-muted { color: var(--text-muted) !important; }
.maux-text-blue  { color: var(--blue) !important; }
.maux-mt-0 { margin-top: 0 !important; }
.maux-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.maux-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .maux-grid-2, .maux-grid-3 { grid-template-columns: 1fr; } }

/* ============================================================
   MAUX Admin · Design System v2.0
   Colegio María Auxiliadora · Valdivia
   Reemplaza: login.css, list_students_mat.css, base_style.css,
              message.css, student_data.css, representative_data.css,
              student_medical_sheet.css, student_parent.css,
              response_survey.css, recover_pwd.css,
              representative_register.css, process_recover_pwd.css
   ============================================================ */

/* ── 1. Google Fonts ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── 2. Tokens de diseño ───────────────────────────────────── */
:root {
  --blue:          #1B3A8C;
  --blue-dark:     #112568;
  --blue-mid:      #2a52b8;
  --blue-light:    #E8EEF9;
  --blue-xlight:   #F3F6FC;
  --steel:         #4A8FA8;
  --steel-dark:    #2e6e87;
  --steel-light:   #E6F2F6;

  --success:       #16a34a;
  --success-bg:    #dcfce7;
  --warning:       #b45309;
  --warning-bg:    #fef9c3;
  --danger:        #b91c1c;
  --danger-bg:     #fee2e2;
  --info:          #0369a1;
  --info-bg:       #e0f2fe;

  --bg:            #F2F5FA;
  --surface:       #ffffff;
  --border:        #E2E8F0;
  --border-strong: #CBD5E1;

  --text:          #1E293B;
  --text-muted:    #64748B;
  --text-xs:       #94A3B8;

  --sidebar-w:     220px;
  --sidebar-col:   56px;
  --topbar-h:      56px;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     14px;
  --transition:    .2s ease;
}

/* ── 3. Base global ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

/* Elimina el padding-top que usaban todos los CSS viejos */
body.maux-app  { overflow: hidden; height: 100vh; }
body.maux-page { padding-top: 0; }

/* ── 4. LAYOUT SHELL ───────────────────────────────────────── */
.maux-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.maux-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.maux-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── 5. SIDEBAR ────────────────────────────────────────────── */
.maux-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--blue);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--transition), min-width var(--transition);
  position: relative;
  z-index: 100;
}
.maux-sidebar.collapsed {
  width: var(--sidebar-col);
  min-width: var(--sidebar-col);
}

/* Brand */
.maux-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  min-height: var(--topbar-h);
  flex-shrink: 0;
  text-decoration: none;
}
.maux-brand-mark {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--steel);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.maux-brand-mark svg { width: 20px; height: 20px; fill: #fff; }
.maux-brand-text { overflow: hidden; white-space: nowrap; transition: opacity var(--transition); }
.maux-sidebar.collapsed .maux-brand-text { opacity: 0; pointer-events: none; }
.maux-brand-name { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.2; }
.maux-brand-sub  { font-size: 10px; color: rgba(255,255,255,.45); margin-top: 1px; }

/* Toggle */
.maux-toggle {
  position: absolute; right: -11px; top: 68px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); border: 2px solid rgba(255,255,255,.2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 101; transition: background var(--transition);
}
.maux-toggle:hover { background: var(--steel); }
.maux-toggle svg {
  width: 10px; height: 10px; fill: none;
  stroke: #fff; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--transition);
}
.maux-sidebar.collapsed .maux-toggle svg { transform: rotate(180deg); }

/* Scroll area */
.maux-sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.maux-sidebar-scroll::-webkit-scrollbar { display: none; }

/* Section labels */
.maux-nav-section { padding: 6px 0; }
.maux-nav-label {
  font-size: 10px; font-weight: 600; letter-spacing: .07em;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  padding: 10px 14px 4px;
  white-space: nowrap; overflow: hidden;
  transition: opacity var(--transition);
}
.maux-sidebar.collapsed .maux-nav-label { opacity: 0; }

/* Nav items */
.maux-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  border-left: 3px solid transparent;
  white-space: nowrap; overflow: hidden;
  transition: background var(--transition), border-color var(--transition);
  text-decoration: none;
  color: rgba(255,255,255,.7);
  position: relative;
}
.maux-nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); text-decoration: none; }
.maux-nav-item.active { background: rgba(255,255,255,.12); border-left-color: var(--steel); color: #fff; }

.maux-nav-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.maux-nav-icon svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.maux-nav-text { font-size: 13px; flex: 1; transition: opacity var(--transition); }
.maux-sidebar.collapsed .maux-nav-text { opacity: 0; }

.maux-nav-badge {
  background: var(--steel); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  flex-shrink: 0; transition: opacity var(--transition);
}
.maux-sidebar.collapsed .maux-nav-badge { opacity: 0; }

/* Tooltip colapsado */
.maux-sidebar.collapsed .maux-nav-item:hover::after {
  content: attr(data-tip);
  position: absolute; left: calc(var(--sidebar-col) + 8px); top: 50%;
  transform: translateY(-50%);
  background: var(--blue-dark); color: #fff;
  font-size: 12px; padding: 5px 10px; border-radius: var(--radius-sm);
  white-space: nowrap; z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* User footer */
.maux-sidebar-user {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 12px; display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; overflow: hidden;
}
.maux-sidebar-user-avatar {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--steel); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.maux-sidebar-user-info { overflow: hidden; transition: opacity var(--transition); }
.maux-sidebar.collapsed .maux-sidebar-user-info { opacity: 0; }
.maux-sidebar-user-name  { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maux-sidebar-user-role  { font-size: 10px; color: rgba(255,255,255,.45); }
.maux-sidebar-logout {
  margin-left: auto; flex-shrink: 0;
  color: rgba(255,255,255,.45); transition: color var(--transition);
  text-decoration: none; display: flex;
}
.maux-sidebar-logout:hover { color: #fff; }
.maux-sidebar-logout svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── 6. TOPBAR ─────────────────────────────────────────────── */
.maux-topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; flex-shrink: 0;
}
.maux-topbar-info { flex: 1; min-width: 0; }
.maux-topbar-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.maux-breadcrumb {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.maux-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.maux-breadcrumb a:hover { color: var(--blue); }
.maux-breadcrumb-sep { color: var(--text-xs); }

.maux-period-badge {
  background: var(--blue-light); color: var(--blue);
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
  white-space: nowrap; letter-spacing: .02em; flex-shrink: 0;
}

/* Search */
.maux-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 7px 12px;
  min-width: 200px; max-width: 280px;
  transition: border-color var(--transition);
}
.maux-search:focus-within { border-color: var(--blue); background: var(--surface); }
.maux-search input {
  border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text); width: 100%;
  font-family: inherit;
}
.maux-search input::placeholder { color: var(--text-muted); }
.maux-search svg { width: 14px; height: 14px; fill: none; stroke: var(--text-muted); stroke-width: 1.8; flex-shrink: 0; }

/* Topbar action buttons */
.maux-topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.maux-icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition);
  position: relative; border: none; background: transparent; color: var(--text-muted);
  text-decoration: none;
}
.maux-icon-btn:hover { background: var(--bg); color: var(--text); }
.maux-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.maux-notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #e74c3c; border: 1.5px solid var(--surface);
}

/* User chip */
.maux-user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 4px 10px 4px 5px;
  cursor: pointer; transition: border-color var(--transition); text-decoration: none;
}
.maux-user-chip:hover { border-color: var(--border-strong); }
.maux-user-avatar-sm {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--steel); color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.maux-user-chip-name { font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.2; }
.maux-user-chip-role { font-size: 10px; color: var(--text-muted); }

/* ── 7. BOTTOM NAV (móvil) ─────────────────────────────────── */
.maux-bottom-nav {
  display: none; height: 56px; background: var(--surface);
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.maux-bn-items { display: flex; height: 100%; }
.maux-bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; border-top: 2px solid transparent;
  transition: border-color var(--transition); text-decoration: none; color: var(--text-muted);
}
.maux-bn-item.active { border-top-color: var(--blue); color: var(--blue); }
.maux-bn-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.maux-bn-item span { font-size: 9px; font-weight: 500; }

/* ── 8. PAGE HEADER ────────────────────────────────────────── */
.maux-page-header {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px;
}
.maux-page-header h1 {
  font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 3px;
}
.maux-page-header p { font-size: 13px; color: var(--text-muted); margin: 0; }
.maux-page-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }

/* ── 9. KPI CARDS ─────────────────────────────────────────── */
.maux-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--kpi-color, var(--blue));
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.maux-kpi:hover { box-shadow: 0 4px 20px rgba(0,0,0,.07); transform: translateY(-1px); }
.maux-kpi-grid  { display: grid; gap: 14px; margin-bottom: 20px; }
.maux-kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.maux-kpi-value { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 6px; }
.maux-kpi-sub   { font-size: 11px; color: var(--text-muted); }
.maux-kpi-trend { font-size: 11px; font-weight: 600; }
.maux-kpi-trend.up   { color: var(--success); }
.maux-kpi-trend.down { color: var(--danger); }
.maux-kpi-trend.warn { color: var(--warning); }

/* ── 10. CARDS ─────────────────────────────────────────────── */
.maux-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px;
}
.maux-card-header {
  padding: 14px 18px 12px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.maux-card-title { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.maux-card-sub   { font-size: 11px; color: var(--text-muted); }
.maux-card-body  { padding: 16px 18px; }

/* ── 11. TABLA ─────────────────────────────────────────────── */
.maux-table-wrap { overflow-x: auto; }
.maux-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.maux-table th {
  background: var(--bg); font-weight: 600; color: var(--text-muted);
  padding: 10px 14px; text-align: left; font-size: 11px;
  letter-spacing: .04em; border-bottom: 1px solid var(--border);
  white-space: nowrap; text-transform: uppercase; user-select: none;
}
.maux-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle;
}
.maux-table tbody tr:last-child td { border-bottom: none; }
.maux-table tbody tr:hover td { background: var(--blue-xlight); }
.maux-table td.td-rut { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text-muted); }
.maux-table td.td-nombre { font-weight: 500; }

/* ── 12. BADGES ────────────────────────────────────────────── */
.maux-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 20px;
  white-space: nowrap;
}
.maux-badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.maux-badge.no-dot::before { display: none; }
.maux-badge.ok      { background: var(--success-bg); color: #166534; }
.maux-badge.pending { background: var(--warning-bg); color: #854d0e; }
.maux-badge.none    { background: #f1f5f9; color: #475569; }
.maux-badge.fd      { background: var(--steel-light); color: #1e6579; }
.maux-badge.danger  { background: var(--danger-bg); color: #9b1c1c; }
.maux-badge.blue    { background: var(--blue-light); color: var(--blue); }

/* ── 13. BOTONES ───────────────────────────────────────────── */
.maux-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 500; font-family: inherit;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  transition: background var(--transition), border-color var(--transition), transform .1s;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.maux-btn:hover  { background: var(--bg); border-color: var(--border-strong); color: var(--text); }
.maux-btn:active { transform: scale(.98); }
.maux-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.maux-btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.maux-btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.maux-btn-steel { background: var(--steel); color: #fff; border-color: var(--steel); }
.maux-btn-steel:hover { background: var(--steel-dark); border-color: var(--steel-dark); color: #fff; }
.maux-btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.maux-btn-success { background: var(--success); color: #fff; border-color: var(--success); }

.maux-btn-sm { padding: 5px 10px; font-size: 11.5px; }
.maux-btn-xs { padding: 3px 8px;  font-size: 11px; }

/* ── 14. FORMULARIOS ───────────────────────────────────────── */
.maux-form-group { margin-bottom: 16px; }
.maux-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 5px; letter-spacing: .02em;
}
.maux-label .req { color: var(--danger); margin-left: 2px; }
.maux-input, .maux-select, .maux-textarea {
  width: 100%; padding: 8px 12px; font-size: 13px; font-family: inherit;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.maux-input:focus, .maux-select:focus, .maux-textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,58,140,.1);
}
.maux-input.is-error { border-color: var(--danger); }
.maux-input.is-ok    { border-color: var(--success); }
.maux-textarea { resize: vertical; min-height: 90px; }

/* Sección de formulario (reemplaza seccion-titulo/detalle) */
.maux-section-title {
  background: var(--blue-light); color: var(--blue);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; margin: 16px 0 10px;
  border-left: 3px solid var(--blue);
}
.maux-section-sub {
  background: var(--steel-light); color: #1e6579;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 12px; margin-bottom: 10px;
}

/* ── 15. TOAST / ALERTAS ───────────────────────────────────── */
.maux-toast-wrap {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.maux-toast {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  font-size: 13px; display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 360px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  pointer-events: all; animation: toastIn .2s ease;
  border-left: 4px solid var(--blue);
}
.maux-toast.ok     { border-left-color: var(--success); }
.maux-toast.warn   { border-left-color: var(--warning); }
.maux-toast.danger { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ── 16. LOGIN PAGE ────────────────────────────────────────── */
body.maux-login {
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.maux-login-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 40px 36px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.maux-login-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 28px;
}
.maux-login-logo-mark {
  width: 48px; height: 48px; background: var(--blue);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.maux-login-logo-mark svg { width: 30px; height: 30px; fill: #fff; }
.maux-login-logo-text {}
.maux-login-logo-name { font-size: 18px; font-weight: 700; color: var(--blue); line-height: 1.2; }
.maux-login-logo-sub  { font-size: 11px; color: var(--text-muted); }
.maux-login-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; text-align: center; }
.maux-login-desc  { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; text-align: center; }
.maux-login-error {
  background: var(--danger-bg); color: var(--danger);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.maux-login-error svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.maux-login-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.maux-recaptcha-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.maux-login-btn {
  width: 100%; padding: 10px; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background var(--transition);
}
.maux-login-btn:hover { background: var(--blue-dark); }
.maux-login-closed {
  text-align: center; padding: 32px 16px;
  color: var(--text-muted); font-size: 14px;
}

/* ── 17. MESSAGE PAGE ──────────────────────────────────────── */
body.maux-message {
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.maux-message-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 40px 36px; text-align: center;
  max-width: 440px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

/* ── 18. RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 768px) {
  body.maux-app { overflow: auto; height: auto; }
  .maux-shell { flex-direction: column; height: auto; min-height: 100vh; }
  .maux-sidebar { display: none; }
  .maux-bottom-nav { display: flex; }
  .maux-content { overflow-y: visible; padding: 14px; }
  .maux-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .maux-search { display: none; }
  .maux-topbar { padding: 0 14px; }
}
@media (min-width: 769px) and (max-width: 1100px) {
  .maux-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── 19. UTILIDADES ────────────────────────────────────────── */
.maux-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.maux-text-muted { color: var(--text-muted) !important; }
.maux-text-blue  { color: var(--blue) !important; }
.maux-mt-0 { margin-top: 0 !important; }
.maux-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.maux-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .maux-grid-2, .maux-grid-3 { grid-template-columns: 1fr; } }

/* ── 20. MEJORAS LOOK & FEEL v2.1 ──────────────────────────── */

/* KPI cards — borde superior coloreado y hover sutil */
.maux-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--kpi-color, var(--blue));
  border-radius: var(--radius-lg);
  padding: 18px 20px 16px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.maux-kpi:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transform: translateY(-1px);
}
.maux-kpi-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}
.maux-kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.maux-kpi-value { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 6px; }
.maux-kpi-sub   { font-size: 11px; color: var(--text-muted); }
.maux-kpi-trend { font-size: 11px; font-weight: 600; }
.maux-kpi-trend.up   { color: var(--success); }
.maux-kpi-trend.down { color: var(--danger); }
.maux-kpi-trend.warn { color: var(--warning); }

/* Page header — más limpio, alineación mejorada */
.maux-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.maux-page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.2;
}
.maux-page-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}
.maux-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Cards — sombra más definida, header más limpio */
.maux-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.maux-card-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  min-height: 48px;
}
.maux-card-title { font-size: 13px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.maux-card-sub   { font-size: 11px; color: var(--text-muted); }

/* Tabla — filas más compactas, zebra sutil */
.maux-table th {
  background: #f8fafc;
  font-size: 10.5px;
  padding: 9px 14px;
  letter-spacing: .05em;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}
.maux-table td { padding: 10px 14px; font-size: 12.5px; }
.maux-table tbody tr:nth-child(even) td { background: #fafbfc; }
.maux-table tbody tr:hover td { background: var(--blue-xlight) !important; }

/* Inputs — foco más visible */
.maux-input, .maux-select, .maux-textarea {
  transition: border-color .15s, box-shadow .15s;
  background: var(--surface);
}
.maux-input:focus, .maux-select:focus, .maux-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,58,140,.12);
  outline: none;
}
.maux-input::placeholder { color: var(--text-xs); }
.maux-input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(185,28,28,.1); }
.maux-input.is-ok    { border-color: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,.1); }

/* Validación inline */
.maux-field-msg {
  font-size: 11px;
  margin-top: 4px;
  display: none;
}
.maux-field-msg.show { display: block; }
.maux-field-msg.error { color: var(--danger); }
.maux-field-msg.ok    { color: var(--success); }

/* Botones — ripple en active, variante ghost */
.maux-btn { user-select: none; }
.maux-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.maux-btn-ghost:hover { background: var(--bg); border-color: var(--border); color: var(--text); }

/* Topbar badge periodo — más llamativo */
.maux-periodo-badge {
  display: inline-flex; align-items: center;
  background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(27,58,140,.3);
}

/* Formulario — card con secciones coloreadas */
.maux-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.maux-form-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: #fff;
}
.maux-form-card-header h2 {
  font-size: 16px; font-weight: 700; margin: 0 0 2px; color: #fff;
}
.maux-form-card-header p { font-size: 12px; margin: 0; opacity: .7; color: #fff; }
.maux-form-card-body { padding: 24px; }
.maux-form-card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  display: flex; align-items: center; gap: 8px;
}

/* Grid de formulario */
.maux-form-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.maux-form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.maux-form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.maux-form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.maux-form-row.col-1-2 { grid-template-columns: 1fr 2fr; }
.maux-form-row.col-2-1 { grid-template-columns: 2fr 1fr; }
@media (max-width: 700px) {
  .maux-form-row.cols-3,
  .maux-form-row.cols-4,
  .maux-form-row.cols-2,
  .maux-form-row.col-1-2,
  .maux-form-row.col-2-1 { grid-template-columns: 1fr; }
}

/* RUT input — monospace */
.maux-input-rut { font-family: 'DM Mono', monospace; letter-spacing: .05em; }

/* Indicador de validación junto al label */
.maux-label-wrap {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 5px;
}
.maux-label-wrap .maux-label { margin-bottom: 0; }
.maux-rut-status {
  font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px;
  transition: all .2s;
}
.maux-rut-status.checking { background: var(--warning-bg); color: var(--warning); }
.maux-rut-status.ok       { background: var(--success-bg); color: var(--success); }
.maux-rut-status.error    { background: var(--danger-bg);  color: var(--danger); }

/* Spinner inline */
@keyframes spin { to { transform: rotate(360deg); } }
.maux-spinner {
  width: 14px; height: 14px; border: 2px solid var(--border);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .6s linear infinite; display: inline-block;
}

/* Sidebar footer usuario */
.maux-sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0; overflow: hidden;
}
.maux-sidebar-footer-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--steel); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.maux-sidebar-footer-info { overflow: hidden; transition: opacity var(--transition); }
.maux-sidebar.collapsed .maux-sidebar-footer-info { opacity: 0; }
.maux-sidebar-footer-name { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maux-sidebar-footer-role { font-size: 10px; color: rgba(255,255,255,.4); }

/* ── Sidebar: secciones colapsables ───────────────────────────────────────
   Añadir al final de maux-admin.css
   ─────────────────────────────────────────────────────────────────────── */

/* El label de sección se convierte en botón */
.maux-nav-label.maux-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 14px 4px;
  color: rgba(255,255,255,.3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  transition: color var(--transition), opacity var(--transition);
}
.maux-nav-label.maux-section-toggle:hover {
  color: rgba(255,255,255,.55);
}

/* Chevron animado */
.maux-section-chevron {
  width: 12px; height: 12px;
  fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform var(--transition);
}

/* Cuerpo de la sección: animación smooth */
.maux-section-body {
  overflow: hidden;
  transition: max-height 0.28s cubic-bezier(.4,0,.2,1),
              opacity    0.22s ease;
  max-height: 600px; /* suficiente para cualquier sección */
  opacity: 1;
}

/* Sidebar colapsado: ocultar chevron, mostrar sección completa al hover */
.maux-sidebar.collapsed .maux-section-chevron { display: none; }
.maux-sidebar.collapsed .maux-section-body {
  max-height: 600px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}