/* ========================================
   Sistema de Parqueadero - Estilos
   Diseño pensado para fácil uso
   ======================================== */

:root {
    --azul-oscuro: #1a3a5c;
    --azul-medio:  #1e4976;
    --naranja:     #e67e22;
    --naranja-hover: #d35400;
}

body {
    font-size: 17px;
    background-color: #f0f2f5;
    color: #212529;
}

/* ---- NAVBAR ---- */
.nav-principal {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-medio) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    min-height: 62px;
}
.nav-principal .navbar-brand {
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}
.nav-principal .nav-link {
    font-size: 1rem;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    transition: background 0.2s;
}
.nav-principal .nav-link:hover,
.nav-principal .nav-link.active {
    background: rgba(255,255,255,0.15);
}
.nav-principal .nav-link.active {
    font-weight: 600;
    border-bottom: 2px solid var(--naranja);
}

/* ---- CARDS ---- */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0.9rem 1.25rem;
}

/* ---- STAT CARDS (dashboard) ---- */
.stat-card {
    border-left: 5px solid;
    transition: transform 0.15s;
}
.stat-card:hover {
    transform: translateY(-3px);
}
.stat-card .stat-icon {
    font-size: 2.8rem;
    opacity: 0.25;
}
.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card.border-success { border-left-color: #198754; }
.stat-card.border-warning { border-left-color: #ffc107; }
.stat-card.border-info    { border-left-color: #0dcaf0; }
.stat-card.border-danger  { border-left-color: #dc3545; }
.stat-card.border-primary { border-left-color: var(--azul-oscuro); }

/* ---- TABLES ---- */
.table {
    font-size: 1rem;
    vertical-align: middle;
}
.table thead th {
    background: var(--azul-oscuro);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    white-space: nowrap;
}
.table-hover tbody tr:hover {
    background-color: #e8f0fe;
}

/* ---- BUTTONS ---- */
.btn {
    font-size: 1rem;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-weight: 500;
}
.btn-lg {
    font-size: 1.1rem;
    padding: 0.7rem 1.5rem;
}
.btn-xl {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    border-radius: 10px;
}
.btn-naranja {
    background-color: var(--naranja);
    color: white;
    border: none;
}
.btn-naranja:hover {
    background-color: var(--naranja-hover);
    color: white;
}

/* ---- BADGES ---- */
.badge {
    font-size: 0.85rem;
    padding: 0.4em 0.75em;
    border-radius: 6px;
}

/* ---- FORMS ---- */
.form-label {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}
.form-control,
.form-select {
    font-size: 1.05rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    border: 1.5px solid #ced4da;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--azul-oscuro);
    box-shadow: 0 0 0 0.2rem rgba(26,58,92,0.2);
}
.form-control-lg,
.form-select-lg {
    font-size: 1.15rem;
}

/* ---- PAGE TITLE ---- */
.page-title {
    color: var(--azul-oscuro);
    font-weight: 700;
    font-size: 1.6rem;
    border-left: 5px solid var(--naranja);
    padding-left: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ---- VEHICLE CARDS (operario dashboard) ---- */
.vehiculo-card {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.vehiculo-card:hover {
    border-color: var(--azul-oscuro);
    box-shadow: 0 4px 15px rgba(26,58,92,0.15);
}
.vehiculo-card .placa {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--azul-oscuro);
}
.vehiculo-card .tipo-icon {
    font-size: 2rem;
    color: #6c757d;
}
.vehiculo-card .tiempo {
    font-size: 1rem;
    color: #198754;
    font-weight: 600;
}
.vehiculo-card .costo-actual {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--naranja);
}

/* ---- QUICK ACTION BUTTONS (operario) ---- */
.btn-accion {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    min-height: 120px;
}
.btn-accion:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.btn-accion i {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* ---- ALERTS ---- */
.alert {
    font-size: 1rem;
    border-radius: 10px;
    border: none;
}

/* ---- LOGIN ---- */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-medio) 60%, #2c5f8a 100%);
    display: flex;
    align-items: center;
}
.login-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-header {
    background: rgba(255,255,255,0.05);
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    color: white;
}
.login-header .login-icon {
    font-size: 4rem;
    color: var(--naranja);
    margin-bottom: 0.75rem;
}
.login-body {
    background: white;
    padding: 2rem;
}

/* ---- MODALS ---- */
.modal-header {
    background: var(--azul-oscuro);
    color: white;
}
.modal-header .btn-close {
    filter: invert(1);
}

/* ---- RESPONSIVE ---- */

/* Tablet y abajo — navbar colapsado */
@media (max-width: 991px) {
    .nav-principal .navbar-collapse {
        padding: 0.5rem 0;
        border-top: 1px solid rgba(255,255,255,0.15);
        margin-top: 0.5rem;
    }
    .nav-principal .nav-link {
        padding: 0.55rem 0.75rem;
        border-radius: 6px;
        margin-bottom: 2px;
    }
    /* En menú vertical el active usa borde izquierdo, no inferior */
    .nav-principal .nav-link.active {
        border-bottom: none;
        border-left: 4px solid var(--naranja);
        padding-left: 0.9rem;
    }
}

/* Tablet (~768px) */
@media (max-width: 768px) {
    body { font-size: 15px; }

    .page-title {
        font-size: 1.2rem;
        padding-left: 0.6rem;
        margin-bottom: 1rem;
    }

    .stat-card .stat-number { font-size: 1.7rem; }
    .stat-card .stat-label  { font-size: 0.8rem; }

    .table { font-size: 0.88rem; }
    .table thead th { font-size: 0.82rem; padding: 0.45rem 0.5rem; }
    .table td, .table th { padding: 0.45rem 0.5rem; }

    .card-header {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }

    .btn-xl {
        font-size: 1.1rem;
        padding: 0.85rem 1.5rem;
    }
    .btn-accion { min-height: 80px; padding: 1rem 0.5rem; }
    .btn-accion i { font-size: 1.8rem; }

    .vehiculo-card .placa    { font-size: 1.25rem; }
    .vehiculo-card .tipo-icon { font-size: 1.6rem; }
    .vehiculo-card .costo-actual { font-size: 1rem; }

    /* Botones del modal apilados */
    .modal-footer {
        flex-direction: column;
        gap: 0.4rem;
    }
    .modal-footer .btn { width: 100%; }
}

/* Móvil pequeño (~576px) */
@media (max-width: 576px) {
    body { font-size: 14px; }

    .page-title {
        font-size: 1.05rem;
        border-left-width: 3px;
        margin-bottom: 0.85rem;
    }

    .stat-card .stat-number { font-size: 1.4rem; }

    .badge { font-size: 0.72rem; padding: 0.3em 0.6em; }

    .table       { font-size: 0.8rem; }
    .table thead th { font-size: 0.78rem; }

    .btn     { font-size: 0.9rem;  padding: 0.45rem 0.9rem; }
    .btn-lg  { font-size: 0.98rem; padding: 0.6rem 1.1rem; }
    .btn-xl  { font-size: 1rem;    padding: 0.75rem 1.2rem; }

    .card-header { padding: 0.55rem 0.85rem; font-size: 0.9rem; }
    .form-label  { font-size: 0.95rem; }

    .login-header { padding: 1.5rem 1.25rem 1rem; }
    .login-body   { padding: 1.25rem; }

    .btn-accion { min-height: 70px; padding: 0.75rem 0.4rem; font-size: 0.9rem; }
    .btn-accion i { font-size: 1.5rem; margin-bottom: 0.3rem; }

    /* Ocultar columnas menos importantes en tablas de admin */
    .table-mobile-hide { display: none; }
}
