/* ============================================
   SHENIN — ESTILOS GLOBALES
   Paleta: Azul marino · Blanco · Negro
   Minimalista, elegante, redondeado
   ============================================ */

/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta principal */
    --navy-deepest:  #06111f;
    --navy-deep:     #0d1b2a;
    --navy-mid:      #1e3a5f;
    --navy-light:    #2c5f7f;
    --navy-accent:   #3d7fa6;
    --navy-soft:     #5b9ec9;

    /* Superficies claras */
    --white:         #ffffff;
    --surface:       #f4f7fa;
    --surface-2:     #e8f1f8;
    --border:        #d4e0ec;
    --border-subtle: #e9eef4;

    /* Texto */
    --text-primary:  #0d1b2a;
    --text-secondary:#4a6278;
    --text-muted:    #8ba3b8;

    /* Sombras */
    --shadow-xs: 0 1px 4px rgba(13,27,42,.07);
    --shadow-sm: 0 2px 8px rgba(13,27,42,.09);
    --shadow-md: 0 4px 16px rgba(13,27,42,.12);
    --shadow-lg: 0 10px 40px rgba(13,27,42,.15);
    --shadow-xl: 0 20px 60px rgba(13,27,42,.2);

    /* Transiciones */
    --t-fast:   0.15s ease;
    --t-normal: 0.25s ease;
    --t-slow:   0.4s ease;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   PÁGINA DE AUTENTICACIÓN (login)
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--surface);
}

/* Formas geométricas animadas de fondo */
.shapes-background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border: 2px solid;
    opacity: 0.1;
    animation: float-shape 6s ease-in-out infinite;
}

.shape-1 { width: 40px; height: 40px; border-color: var(--navy-mid); top: 10%; left: 10%; transform: rotate(45deg); animation-delay: 0s; }
.shape-2 { width: 30px; height: 30px; border-color: var(--navy-light); top: 20%; right: 15%; border-radius: 50%; animation-delay: 0.5s; }
.shape-3 { width: 35px; height: 35px; border-color: var(--navy-accent); bottom: 20%; left: 12%; transform: rotate(15deg); animation-delay: 1s; }
.shape-4 { width: 25px; height: 25px; border-color: var(--navy-deep); bottom: 15%; right: 18%; border-radius: 50%; animation-delay: 0.3s; }
.shape-5 { width: 32px; height: 32px; border-color: var(--navy-mid); top: 60%; left: 5%; transform: rotate(30deg); animation-delay: 0.7s; }
.shape-6 { width: 28px; height: 28px; border-color: var(--navy-light); top: 12%; right: 40%; border-radius: 50%; animation-delay: 1.2s; }

.circle-decor {
    position: fixed;
    border: 2px solid rgba(30,58,95,.05);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.circle-1 { width: 400px; height: 400px; top: -100px; right: -100px; animation: pulse-circle 8s ease-in-out infinite; }
.circle-2 { width: 350px; height: 350px; bottom: -80px; left: -80px; animation: pulse-circle 7s ease-in-out infinite 1s; }
.circle-3 { width: 200px; height: 200px; top: 25%; left: 8%; animation: pulse-circle 6s ease-in-out infinite 0.5s; }

@keyframes float-shape {
    0%, 100% { transform: translateY(0) rotate(var(--rotation, 45deg)); opacity: 0.1; }
    50%       { transform: translateY(-20px) rotate(var(--rotation, 45deg)); opacity: 0.2; }
}

@keyframes pulse-circle {
    0%, 100% { transform: scale(1);   opacity: 0.05; }
    50%       { transform: scale(1.1); opacity: 0.09; }
}

/* Auth wrapper */
.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

/* Tarjeta principal */
.auth-card-modern {
    background: var(--white);
    border-radius: 28px;
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-subtle);
    position: relative;
    animation: slideUp 0.5s ease;
}

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

/* Botón volver */
.back-button { margin-bottom: 24px; }

.back-button a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--t-fast);
}

.back-button a:hover { color: var(--navy-mid); }
.back-button svg { width: 20px; height: 20px; fill: currentColor; }

/* Header auth */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.logo-icon { width: 40px; height: 40px; fill: var(--white); }

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy-mid);
    margin-bottom: 8px;
    letter-spacing: -.3px;
}

.auth-header p { font-size: 15px; color: var(--text-muted); }

/* Formulario */
.auth-form-modern { margin-top: 32px; }

.form-group-modern { margin-bottom: 24px; }

.form-group-modern label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    font-size: 15px;
    transition: var(--t-fast);
    background: var(--white);
    color: var(--text-primary);
    font-family: inherit;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--navy-mid);
    box-shadow: 0 0 0 4px rgba(30,58,95,.08);
}

.input-wrapper input::placeholder { color: var(--text-muted); }

/* Input código */
.code-input-wrapper { display: flex; justify-content: center; }

.code-input {
    width: 100%;
    padding: 16px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 12px;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    transition: var(--t-fast);
}

.code-input:focus {
    outline: none;
    border-color: var(--navy-mid);
    box-shadow: 0 0 0 4px rgba(30,58,95,.08);
}

/* Toggle password */
.toggle-password-modern {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: var(--t-fast);
}

.toggle-password-modern:hover { background: var(--surface-2); }
.toggle-password-modern svg   { width: 22px; height: 22px; fill: var(--text-muted); }

/* Indicador de fuerza */
.password-strength { margin-top: 12px; }

.strength-bar {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-progress { height: 100%; width: 0; transition: all .3s ease; border-radius: 3px; }
.strength-progress.weak   { width: 33%; background: var(--navy-accent); opacity: .4; }
.strength-progress.medium { width: 66%; background: var(--navy-accent); opacity: .7; }
.strength-progress.strong { width: 100%; background: var(--navy-mid); }

.strength-text { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.strength-text.weak   { color: var(--navy-soft); }
.strength-text.medium { color: var(--navy-accent); }
.strength-text.strong { color: var(--navy-mid); }

.form-hint-modern { display: block; margin-top: 8px; color: var(--text-muted); font-size: 13px; }

.form-footer { margin: 16px 0; text-align: right; }

.link-modern {
    color: var(--navy-mid);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--t-fast);
}

.link-modern:hover { color: var(--navy-light); text-decoration: underline; }

/* Botones */
.btn-modern {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--t-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    user-select: none;
    -webkit-user-select: none;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    transform: translate(-50%, -50%);
    transition: width .6s, height .6s;
}

.btn-modern:hover::before { width: 320px; height: 320px; }
.btn-modern span { position: relative; z-index: 1; }

.btn-icon { width: 20px; height: 20px; fill: currentColor; position: relative; z-index: 1; }

.btn-primary {
    background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy-light) 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(13,27,42,.22);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--white);
    color: var(--navy-mid);
    border: 1.5px solid var(--navy-mid);
}

.btn-secondary:hover { background: var(--surface-2); transform: translateY(-2px); }

/* Alertas — solo en azul marino */
.alert {
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown .35s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-icon { width: 24px; height: 24px; flex-shrink: 0; fill: currentColor; margin-top: 2px; }
.alert ul   { list-style: none; margin: 0; padding: 0; }
.alert li   { margin: 4px 0; }
.alert p    { margin: 0; line-height: 1.5; }

/* error → azul oscuro con tono frío para distinguir */
.alert-error {
    background: rgba(13,27,42,.06);
    border-left: 4px solid var(--navy-mid);
    color: var(--navy-mid);
}

.alert-success {
    background: rgba(61,127,166,.1);
    border-left: 4px solid var(--navy-accent);
    color: var(--navy-mid);
}

.alert-info {
    background: var(--surface-2);
    border-left: 4px solid var(--navy-soft);
    color: var(--navy-mid);
}

.alert-warning {
    background: rgba(30,58,95,.07);
    border-left: 4px solid var(--navy-light);
    color: var(--navy-light);
}

/* Divisor */
.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--border-subtle);
}

.auth-divider span {
    position: relative;
    background: var(--white);
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Footer auth */
.auth-footer-modern {
    text-align: center;
    margin-top: 24px;
}

.auth-footer-modern p  { color: var(--text-muted); font-size: 14px; }
.auth-footer-modern a  { color: var(--navy-mid); text-decoration: none; font-weight: 600; transition: var(--t-fast); }
.auth-footer-modern a:hover { color: var(--navy-light); text-decoration: underline; }

/* ============================================
   NAVEGACIÓN
   ============================================ */

.navbar {
    background: #0d1b2a;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 24px rgba(13,27,42,.18);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 62px;
    gap: 8px;
}

/* Logo — mismo estilo que sidebar-brand */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon-box {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #1e3a5f, #2c5f7f);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.1);
    flex-shrink: 0;
}

.logo-icon-box svg { width: 20px; height: 20px; fill: #fff; }

.logo h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -.1px;
    line-height: 1.1;
}

.logo-sub {
    display: block;
    color: rgba(255,255,255,.28);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Menú — mismo patrón que sidebar-menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
}

.nav-menu li { position: relative; }

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 13.5px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.nav-menu a svg {
    width: 16px; height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.nav-menu a:hover {
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.88);
}

.nav-menu a.active {
    background: rgba(30,58,95,.6);
    color: #fff;
    border: 1px solid rgba(61,127,166,.25);
}

/* Línea activa — igual que sidebar */
.nav-menu li.active a::before,
.nav-menu a.active::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px; height: 3px;
    background: #3d7fa6;
    border-radius: 3px;
}

/* Badge de notificación en nav */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-mid);
    color: var(--white);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    margin-left: 2px;
}

/* ============================================
   DASHBOARD — EMPLEADO
   ============================================ */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 28px 64px;
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--navy-mid);
    margin-bottom: 4px;
    letter-spacing: -.3px;
}

.dashboard-header p { color: var(--text-muted); font-size: 15px; }

/* Badge fecha */
.header-date { flex-shrink: 0; }

.date-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 12px 18px;
    box-shadow: var(--shadow-xs);
}

.date-day   { font-size: 32px; font-weight: 700; color: var(--navy-mid); line-height: 1; }
.date-month { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); text-transform: capitalize; }
.date-year  { display: block; font-size: 12px; color: var(--text-muted); }

/* Tarjeta estado ponche */
.ponche-status-card {
    border-radius: 22px;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    border: 1px solid var(--border-subtle);
    animation: fadeIn .5s ease;
}

/* Unificado: azul muy suave para ambos estados */
.status-dentro {
    background: linear-gradient(135deg, var(--surface-2) 0%, #dbeafe 100%);
    border-color: #bfd8f0;
}

.status-fuera {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border-color: var(--border);
}

.ponche-status-left  { display: flex; align-items: center; gap: 14px; }
.ponche-status-right { display: flex; gap: 8px; flex-wrap: wrap; }

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dentro .status-dot {
    background: var(--navy-accent);
    box-shadow: 0 0 0 3px rgba(61,127,166,.2);
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-fuera .status-dot {
    background: var(--text-muted);
    box-shadow: 0 0 0 3px rgba(139,163,184,.2);
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(61,127,166,.2); }
    50%       { box-shadow: 0 0 0 7px rgba(61,127,166,.07); }
}

.status-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 2px;
}

.status-text { font-size: 18px; font-weight: 700; color: var(--text-primary); }

.ponche-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.ponche-chip svg { width: 14px; height: 14px; fill: currentColor; }
.ponche-chip.entrada { background: rgba(30,58,95,.1);    color: var(--navy-mid); }
.ponche-chip.salida  { background: rgba(61,127,166,.12); color: var(--navy-light); }

.no-ponche { color: var(--text-muted); font-size: 14px; }

/* Grid cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: var(--white);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-subtle);
    transition: var(--t-normal);
    animation: fadeIn .5s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--surface-2);
}

.dashboard-card.full-width { grid-column: 1 / -1; }

.dashboard-card h2 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 18px 12px;
    background: var(--surface-2);
    border-radius: 18px;
    border: 1px solid rgba(30,58,95,.06);
    transition: var(--t-fast);
}

.stat-item:hover { transform: scale(1.04); box-shadow: var(--shadow-sm); }

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy-mid);
    margin-bottom: 6px;
    line-height: 1;
}

/* stat-danger → tono azul más oscuro en lugar de rojo */
.stat-item.stat-danger .stat-number { color: var(--navy-deepest); opacity: .6; }

.stat-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }

/* QR */
.qr-container  { text-align: center; }
.qr-wrapper    { display: inline-block; position: relative; margin-bottom: 14px; }
.qr-image      { width: 190px; height: 190px; border-radius: 18px; border: 2px solid var(--border); }
.qr-overlay    { position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%); background: var(--navy-mid); color: var(--white); font-size: 10px; font-weight: 600; padding: 4px 12px; border-radius: 20px; white-space: nowrap; letter-spacing: .3px; }
.qr-info       { font-size: 14px; font-weight: 700; color: var(--text-secondary); margin-top: 16px; }
.qr-hint       { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.qr-sm         { width: 100px; height: 100px; border-radius: 12px; }

/* Tabla historial */
.table-wrapper { overflow-x: auto; }

.activity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.activity-table thead th {
    background: var(--surface-2);
    color: var(--navy-mid);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
}

.activity-table thead th:first-child { border-radius: 10px 0 0 10px; }
.activity-table thead th:last-child  { border-radius: 0 10px 10px 0; }

.activity-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.activity-table tbody tr:last-child td { border-bottom: none; }
.activity-table tbody tr:hover td      { background: var(--surface); }
.time-cell { font-weight: 700; color: var(--navy-mid); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* Solo variantes azul-marino para todos los estados */
.badge-success { background: rgba(30,58,95,.1);    color: var(--navy-mid); }
.badge-warning { background: rgba(44,95,127,.1);   color: var(--navy-light); }
.badge-danger  { background: rgba(13,27,42,.09);   color: var(--navy-deepest); }
.badge-info    { background: rgba(61,127,166,.12); color: var(--navy-accent); }
.badge-purple  { background: rgba(30,58,95,.07);   color: var(--navy-mid); }
.badge-orange  { background: rgba(91,158,201,.12); color: var(--navy-light); }
.badge-black   { background: rgba(13,27,42,.06);   color: var(--text-secondary); }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state svg { width: 40px; height: 40px; fill: var(--border); margin: 0 auto 12px; }
.empty-state p   { font-size: 14px; }

/* Footer */
.footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,.5);
    padding: 22px 0;
    text-align: center;
    margin-top: 48px;
    font-size: 13px;
}

/* Animación */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   PÁGINAS INTERNAS (cambiar password etc)
   ============================================ */

.auth-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 0 24px;
}

.auth-card {
    background: var(--white);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.auth-card h1 { font-size: 24px; font-weight: 700; color: var(--navy-mid); margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--t-fast);
    outline: none;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--navy-mid);
    box-shadow: 0 0 0 4px rgba(30,58,95,.08);
}

.password-container { position: relative; display: flex; align-items: center; }
.password-container input { padding-right: 48px; }

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 6px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: var(--t-fast);
    cursor: pointer;
}

.toggle-password:hover { background: var(--surface-2); }
.eye-icon { font-size: 16px; }

.form-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--text-muted); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--t-fast);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary  { background: linear-gradient(135deg, var(--navy-mid), var(--navy-light)); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-block    { width: 100%; justify-content: center; }
.btn-secondary { background: var(--white); color: var(--navy-mid); border: 1.5px solid var(--navy-mid); }
.btn-secondary:hover { background: var(--surface-2); }

.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--navy-mid); font-weight: 600; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .nav-container { flex-direction: column; height: auto; padding: 12px 16px; gap: 8px; }
    .nav-menu { flex-wrap: wrap; justify-content: center; gap: 2px; }
    .nav-menu a { padding: 7px 12px; font-size: 13px; }
    .dashboard-container { padding: 20px 16px 48px; }
    .dashboard-header { flex-direction: column; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-card.full-width { grid-column: 1; }
    .ponche-status-card { flex-direction: column; align-items: flex-start; }
    .auth-card { padding: 28px 20px; }
    .dashboard-card { padding: 20px; }
}

@media (max-width: 480px) {
    .date-badge { padding: 10px 14px; }
    .date-day   { font-size: 26px; }
    .auth-card-modern { padding: 32px 24px; }
}

/* Accesibilidad */
a:focus, button:focus, input:focus {
    outline: 2px solid var(--navy-accent);
    outline-offset: 2px;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }
/* ============================================
   KPI CARDS (asistencias / historial)
   ============================================ */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.kpi-card {
    background: var(--white);
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-xs);
    transition: var(--t-fast);
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.kpi-icon {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.kpi-icon svg { width: 22px; height: 22px; fill: var(--white); }

.kpi-blue   .kpi-icon { background: var(--navy-mid); }
.kpi-green  .kpi-icon { background: var(--navy-light); }
.kpi-purple .kpi-icon { background: var(--navy-accent); }
.kpi-red    .kpi-icon { background: var(--navy-deepest); }

.kpi-num   { display: block; font-size: 26px; font-weight: 700; color: var(--navy-mid); line-height: 1; }
.kpi-label { display: block; font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
.kpi-pct   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
