/* Importamos fuente premium 'Outfit' de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* Forzamos el modo oscuro en toda la página y definimos la fuente base */
body {
    background-color: #0f111a !important;
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif !important;
    transition: background-color 0.4s ease;
}

/* Navbar Adaptada */
.navbar-custom {
    background: rgba(15, 17, 26, 0.8) !important;
    border-bottom: 1px solid #1e2136;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.navbar-custom .nav-link {
    font-weight: 500;
    opacity: 0.85;
    transition: all 0.2s;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 6px;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

/* OVERRIDES: Reemplazamos las Cards globales por Dark Cards */
.card {
    background-color: #1a1d2d !important;
    border: 1px solid #2a2e45 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    color: #e2e8f0;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-2px);
}

/* Textos oscuros del bootstrap ahora son blancos */
.text-dark,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.card-title {
    color: #ffffff !important;
}

/* Textos muted para labels y ayudas */
.text-muted {
    color: #94a3b8 !important;
}

/* OVERRIDES: Inputs y Forms */
label,
.form-label {
    color: #94a3b8 !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
}

.form-control,
.form-select {
    background-color: #131522 !important;
    border: 1px solid #2a2e45 !important;
    color: #f8fafc !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-weight: 400 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #171a2b !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

.input-group-text {
    background-color: #1e2136 !important;
    border: 1px solid #2a2e45 !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

/* OVERRIDES: Tablas y Grillas */
.table {
    border-color: #2a2e45 !important;
    color: #e2e8f0 !important;
}

.table-light,
.table thead th {
    background-color: #1e2136 !important;
    color: #94a3b8 !important;
    border-color: #2a2e45 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #2a2e45 !important;
}

.table-hover tbody tr:hover td {
    background-color: rgba(99, 102, 241, 0.05) !important;
    color: #ffffff !important;
}

.table td,
.table th {
    border-color: #2a2e45 !important;
    background-color: transparent !important;
    color: #e2e8f0 !important;
}

/* Botones Premium */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35) !important;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5) !important;
}

.btn-outline-dark {
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

.btn-outline-dark:hover {
    background-color: #1e293b !important;
    border-color: #64748b !important;
    color: #fff !important;
}

/* Modals y SweetAlert Fixes para Dark Theme */
.modal-content,
div:where(.swal2-container) div:where(.swal2-popup) {
    background-color: #1a1d2d !important;
    border: 1px solid #2a2e45 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    color: #e2e8f0 !important;
}

div:where(.swal2-container) h2:where(.swal2-title) {
    color: #ffffff !important;
}

div:where(.swal2-container) div:where(.swal2-html-container) {
    color: #94a3b8 !important;
}

.dev-badge {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #f59e0b;
    color: #000;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.main-content {
    min-height: 80vh;
}

/* Base Form Structure para Login */
.login-body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 10%, #1a1d2d 0%, #0f111a 100%) !important;
}

.login-card {
    border: 1px solid #2a2e45 !important;
    border-radius: 16px !important;
    background-color: #1a1d2d !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4) !important;
    width: 100%;
    max-width: 420px;
    margin: 15px;
}

/* Soporte retro-compatibilidad para las clases que quedaron en configuraciones */
.dark-card {
    background: transparent;
    /* Hereda base de .card */
}

.dark-header {
    color: #fff !important;
}

.dark-label {
    /* Hereda de .form-label */
}

.dark-input {
    /* Hereda de .form-control */
}

.dark-text-muted {
    color: #64748b !important;
    font-size: 0.75rem;
}

.btn-glow {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: white;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    color: white;
}

.section-title {
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2e45;
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    font-size: 1rem;
}

.icon-wrapper.success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

.icon-wrapper.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* Pagarés Formularios Overrides */
.form-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2e45;
}

.legal-alert {
    background-color: rgba(245, 158, 11, 0.05) !important;
    border-left: 5px solid #f59e0b !important;
}

.required-asterisk {
    color: #ef4444;
    /* Rojo Tailwind */
    font-weight: bold;
}

.modern-input {
    /* Ya hereda de form-control, la dejamos neutral en Dark Glass */
}

.custom-card {
    /* Utiliza los estilos base rediseñados globalmente para .card */
}