/* ============================================================
   CLIPPY — CSS Principal
   Diseño accesible: fuentes grandes, alto contraste, botones grandes
   ============================================================ */

/* Variables de color Clippy */
:root {
    --clippy-blue:       #dc3545;
    --clippy-blue-dark:  #b02a37;
    --clippy-green:      #198754;
    --clippy-red:        #dc3545;
    --clippy-bg:         #f4f6f9;
    --clippy-card:       #ffffff;
    --clippy-text:       #212529;
    --clippy-muted:      #6c757d;
    --clippy-border:     #dee2e6;
    --clippy-radius:     10px;
}

/* === BASE === */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 17px;           /* ↑ más grande que el estándar 16px */
    background-color: var(--clippy-bg);
    color: var(--clippy-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === TIPOGRAFÍA GRANDE (adultos mayores) === */
h1 { font-size: 1.9rem; font-weight: 600; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem;  font-weight: 600; }

label {
    font-size: 1rem;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 6px;
}

/* === FORMULARIOS GRANDES === */
.form-control,
.form-select {
    font-size: 1.05rem;
    padding: 10px 14px;
    border-radius: var(--clippy-radius);
    border: 2px solid var(--clippy-border);
    transition: border-color .15s, box-shadow .15s;
    min-height: 48px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--clippy-blue);
    box-shadow: 0 0 0 3px rgba(220,53,69,.2);
}

/* Campo QR — muy grande y visible */
#qr_input {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    background-color: #fff9e6;
    border-color: #ffc107;
    border-width: 3px;
}
#qr_input:focus {
    border-color: #fd7e14;
    box-shadow: 0 0 0 4px rgba(255,193,7,.3);
}

/* === BOTONES GRANDES === */
.btn {
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: var(--clippy-radius);
    font-weight: 600;
    transition: all .15s;
}
.btn-lg {
    font-size: 1.2rem;
    padding: 14px 28px;
}
.btn-xl {
    font-size: 1.4rem;
    padding: 18px 36px;
    border-radius: 14px;
}

/* Botón registrar — GRANDE y verde, imposible de no ver */
.btn-registrar {
    background: var(--clippy-green);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 18px 40px;
    border-radius: 14px;
    width: 100%;
    letter-spacing: .5px;
    box-shadow: 0 4px 12px rgba(25,135,84,.3);
}
.btn-registrar:hover {
    background: #146c43;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(25,135,84,.4);
}
.btn-registrar:active {
    transform: translateY(0);
}

/* === CARDS === */
.card {
    border: 1px solid var(--clippy-border);
    border-radius: var(--clippy-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    background: var(--clippy-card);
}
.card-header {
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--clippy-radius) var(--clippy-radius) 0 0 !important;
    padding: 14px 18px;
}

/* === TABLA === */
.table {
    font-size: 1rem;
}
.table th {
    font-size: .9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--clippy-muted);
    background: #f8f9fa;
    border-bottom: 2px solid var(--clippy-border);
    padding: 12px 14px;
}
.table td {
    padding: 12px 14px;
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background-color: #fde8ea;
}

/* === BADGE ROL === */
.badge-admin    { background: #dc3545; color: #fff; }
.badge-guardia  { background: #198754; color: #fff; }
.badge-jefatura { background: #fd7e14; color: #fff; }
.badge-auditor  { background: #6f42c1; color: #fff; }
.badge-purple   { background: #6f42c1; color: #fff; }

/* === ALERTA DE ÉXITO GRANDE === */
.alert-registro-ok {
    font-size: 1.3rem;
    font-weight: 600;
    padding: 20px 24px;
    border-radius: 12px;
    border: 2px solid #198754;
    background: #d1e7dd;
    color: #0a3622;
    text-align: center;
    animation: fadeInDown .3s ease;
}
.alert-registro-error {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 18px 22px;
    border-radius: 12px;
    border: 2px solid #dc3545;
    background: #f8d7da;
    color: #58151c;
    text-align: center;
    animation: fadeInDown .3s ease;
}

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

/* === PANEL VEHÍCULO (resultado del scan QR) === */
#vehiculo-panel {
    background: #fde8ea;
    border: 2px solid #dc3545;
    border-radius: 12px;
    padding: 18px;
    animation: fadeInDown .2s ease;
}
#vehiculo-panel .v-patente {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--clippy-blue);
}
#vehiculo-panel .v-info {
    font-size: 1.1rem;
    color: #343a40;
}

/* === SLIDER COMBUSTIBLE === */
.combustible-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.combustible-btn {
    flex: 1;
    min-width: 90px;
    padding: 10px 6px;
    font-size: .9rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid var(--clippy-border);
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
    transition: all .15s;
    user-select: none;
}
.combustible-btn:hover,
.combustible-btn.selected {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220,53,69,.25);
}
.combustible-btn .icon { font-size: 1.4rem; display: block; }

/* === BADGE TIPO MOVIMIENTO === */
.badge-entrada { background: #198754; color: #fff; font-size: 1rem; padding: 6px 14px; }
.badge-salida  { background: #dc3545; color: #fff; font-size: 1rem; padding: 6px 14px; }

/* === BOTONES TIPO ENTRADA/SALIDA === */
.tipo-btn {
    flex: 1;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 12px;
    border: 3px solid transparent;
    transition: all .15s;
    cursor: pointer;
}
.tipo-btn.entrada {
    background: #d1e7dd;
    color: #0a3622;
    border-color: #198754;
}
.tipo-btn.salida {
    background: #f8d7da;
    color: #58151c;
    border-color: #dc3545;
}
.tipo-btn.selected.entrada {
    background: #198754;
    color: #fff;
    box-shadow: 0 4px 12px rgba(25,135,84,.3);
}
.tipo-btn.selected.salida {
    background: #dc3545;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220,53,69,.3);
}

/* === BOTONES CATEGORIA (Empresa / Visita) === */
.cat-btn {
    flex: 1;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 12px;
    border: 3px solid #dee2e6;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}
.cat-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}
.cat-btn.active {
    background: #198754;
    color: #fff;
    border-color: #198754;
    box-shadow: 0 4px 12px rgba(25,135,84,.3);
}

/* === NAVBAR OVERRIDES === */
.navbar-brand { font-size: 1.3rem; }
.nav-link      { font-size: 1rem;   }

/* === LOGIN PAGE === */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc3545 0%, #7a1520 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
    padding: 40px 36px;
    background: #fff;
}
.login-logo {
    font-size: 3rem;
    color: var(--clippy-blue);
}
.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--clippy-blue);
}
.login-subtitle {
    color: var(--clippy-muted);
    font-size: 1rem;
}

/* === STATS CARDS (dashboard) === */
.stat-card {
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(0,0,0,.08);
}
.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .9rem; color: var(--clippy-muted); font-weight: 500; }

/* === UTILIDADES === */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cursor-pointer { cursor: pointer; }
.fs-7 { font-size: .85rem; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body { font-size: 16px; }
    .btn-xl { font-size: 1.2rem; padding: 14px 24px; }
    .stat-value { font-size: 1.5rem; }
    .login-card { margin: 20px; padding: 28px 20px; }
}

/* === PRINT (para QR) === */
@media print {
    .navbar, .footer, .no-print { display: none !important; }
    .print-only { display: block !important; }
    body { background: #fff; font-size: 14px; }
}
.print-only { display: none; }
