/* ===============================
   BASE ORIGINAL TUYA (RESPETADA)
   =============================== */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 0;
}

/* ===============================
   FASE 35 — MEJORAS VISUALES
   =============================== */

/* ===== Layout general ===== */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #1f2937;
}

.main-container {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

/* ===== Títulos ===== */
h1, .h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h2, .h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

/* ===== Cards ===== */
.card {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

/* ===== Navbar ===== */
.navbar {
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

    .navbar-brand span {
        font-weight: 400;
        text-transform: none;
        letter-spacing: 0;
        font-size: 0.9rem;
        opacity: 0.85;
    }

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.92rem;
    padding-inline: 0.9rem;
}

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        color: #ffffff !important;
    }

.nav-item + .nav-item {
    margin-left: 0.1rem;
}

/* Dropdowns */
.dropdown-menu {
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

/* Zona usuario */
.nav-user-area {
    font-size: 0.9rem;
}

/* ===== Tablas ===== */
.table {
    background-color: #ffffff;
}

    .table thead th {
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        font-weight: 600;
        background-color: #f3f4f6;
    }

    .table td {
        vertical-align: middle;
        font-size: 0.9rem;
    }

    .table tbody tr {
        background-color: #fff !important;
        color: #1f2937 !important;
    }

    /* acciones */
    .table .acciones {
        text-align: center;
        white-space: nowrap;
    }

/* ===== Badges para estados ===== */
.badge-pendiente {
    background-color: #f59e0b !important;
    color: #fff;
}

.badge-parcial {
    background-color: #3b82f6 !important;
    color: #fff;
}

.badge-pagada {
    background-color: #10b981 !important;
    color: #fff;
}

.badge-anulado {
    background-color: #dc2626 !important;
    color: #fff;
}

.badge-inactivo {
    background-color: #6b7280 !important;
    color: #fff;
}

/* ===== Formularios ===== */
.form-label {
    font-weight: 600;
}

.form-control, .form-select {
    border-radius: 0.5rem;
}

/* ===== Alerts ===== */
.alert {
    border-radius: 0.6rem;
    font-size: 0.92rem;
}

/* ===== Botones ===== */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

.btn-primary,
.btn-warning,
.btn-danger,
.btn-outline-secondary {
    font-size: 0.83rem;
}

/* ===== Dashboard ===== */
.dashboard-card {
    border-radius: 0.85rem;
    padding: 1.2rem;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

    .dashboard-card h3 {
        font-size: 1.1rem;
        font-weight: 600;
    }

.dashboard-metric {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0.4rem;
}

/* ===== Impresión ===== */
@media print {
    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    .no-print {
        display: none !important;
    }
}

/* ===============================
   LOGIN — FASE 44
   =============================== */

.login-page {
    min-height: calc(100vh - 80px);
    background: radial-gradient(circle at top, #eef2ff 0, #e5e7eb 40%, #d4d4d8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
}

.login-card-wrapper {
    max-width: 420px;
    width: 100%;
}

.login-card {
    border-radius: 1rem !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background-color: #ffffffcc;
    backdrop-filter: blur(6px);
}

@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card-animated {
    animation: loginFadeUp 0.35s ease-out;
}

/* ===== Inputs ===== */
.login-card .form-control {
    border-radius: 0.6rem;
}

.login-card .btn-primary {
    border-radius: 0.6rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .login-page {
        background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
    }

    .login-card {
        background-color: #020617f2;
        border-color: rgba(148,163,184,0.5);
        color: #e5e7eb;
    }

        .login-card .form-label {
            color: #e5e7eb;
        }

        .login-card .form-control {
            background-color: #020617;
            color: #e5e7eb;
            border-color: #1e293b;
        }

            .login-card .form-control::placeholder {
                color: #64748b;
            }
}

/* ===============================
   FOOTER MINIMALISTA (ESTÁTICO)
   =============================== */

.app-footer {
    position: static;
    width: 100%;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding-top: 4px;
    padding-bottom: 4px;
    margin-top: 16px;
}

    .app-footer .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

footer {
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 576px) {

    .dashboard-card {
        padding: 0.95rem 1rem;
    }

    .dashboard-metric {
        font-size: 1.4rem;
    }

    .table-responsive {
        border-radius: 0.75rem;
        overflow: hidden;
    }

        .table-responsive > .table {
            margin-bottom: 0;
        }

    footer {
        text-align: center;
        font-size: 0.72rem;
    }
}
