:root {
    --primary-color: #001256;
    --secondary-color: #35D32F;
    --text-color: #333333;
    --neutral-gray: #f4f6f9;
    --border-color: #e0e0e0;
    --error-color: #e74c3c;
    --success-color: #27ae60;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--neutral-gray);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* --- MODERN SPLIT LAYOUT AUTHENTICATION --- */
body.auth-body {
    font-family: 'Open Sans', sans-serif;
    /* Use the specific image as full background, with a fallback color */
    background: #001256 var(--bg-image, url('../../src/images/elemento1.png')) no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2rem;
}

.auth-modern-wrapper {
    display: flex;
    max-width: 1300px;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.auth-modern-left {
    flex: 1;
    color: white;
    padding-right: 2rem;
}

.auth-modern-left .brand-logo {
    max-width: 260px;
    margin-bottom: 3rem;
    /* Adding a subtle drop shadow to make the logo pop if it's dark */
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.1));
}

.auth-modern-left h1 {
    font-weight: 700;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.auth-modern-left p.subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.auth-modern-left p.description {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
    max-width: 90%;
}

.auth-modern-right {
    flex: 0 0 620px;
}

.auth-modern-card {
    background: white;
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.auth-modern-card h3 {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-modern-card p.text-muted {
    text-align: center;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.modern-input {
    border-radius: 50px !important;
    padding: 0.8rem 1.5rem !important;
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.modern-input:focus {
    border-color: #001256 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(0, 25, 119, 0.1) !important;
}

.modern-btn-primary {
    border-radius: 50px;
    background-color: #35D32F;
    color: #1a1a1a;
    font-weight: 700;
    padding: 0.8rem;
    width: 100%;
    border: none;
    transition: all 0.3s;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(53, 211, 47, 0.3);
}

.modern-btn-primary:hover, .modern-btn-primary:focus {
    background-color: #2ebc2a;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(53, 211, 47, 0.4);
}

.modern-btn-primary:disabled {
    background-color: #8ce889;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Divider OR */
.divider-modern {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #a0a0a0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.divider-modern::before, .divider-modern::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}
.divider-modern::before { margin-right: .5em; }
.divider-modern::after { margin-left: .5em; }

/* Social Buttons */
.social-btn {
    border-radius: 50px;
    border: 1px solid #e9ecef;
    background: white;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
}
.social-btn:hover {
    background: #f8f9fa;
    color: #333;
}
.social-btn img {
    width: 18px;
    height: 18px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .auth-modern-wrapper {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
    }
    .auth-modern-left {
        text-align: center;
        padding-right: 0;
    }
    .auth-modern-left .description {
        margin: 0 auto;
    }
    .auth-modern-right {
        width: 100%;
        flex: auto;
    }
}


/* --- DASHBOARD REDESIGN (Mockup Match) --- */
.dashboard-layout {
    display: flex;
    width: 100vw;
    min-height: 100vh;
    font-family: 'Open Sans', sans-serif;
    background-color: #f4f6f9;
}

.sidebar {
    width: 250px;
    background-color: #001256; /* Brand Primary */
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header img {
    max-width: 160px;
}

.sidebar-menu {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-menu ul {
    list-style: none;
    padding-left: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #35D32F; /* Brand Secondary */
}

.sidebar-menu li a i, 
.sidebar-menu li a .material-symbols-outlined {
    width: 25px;
    font-size: 1.2rem;
    text-align: center;
    margin-right: 15px;
}


.sidebar-footer {
    padding: 1rem;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 0.7rem;
    background-color: rgba(255,255,255,0.1);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background-color: rgba(255,255,255,0.2);
    color: white;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 70px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* User Profile Dropdown Styled for Premium Look */
.user-profile-dropdown {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none !important;
}

/* Hide Bootstrap Default Arrow */
.user-profile-dropdown.dropdown-toggle::after {
    display: none !important;
}

.user-name {
    font-size: 0.9rem;
    color: #444;
    font-weight: 600;
}

.user-avatar-circle {
    width: 42px;
    height: 42px;
    background-color: #001256; /* Brand Primary */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 18, 86, 0.2);
    transition: transform 0.2s;
}

.user-profile-dropdown:hover .user-avatar-circle {
    transform: scale(1.05);
}

.user-avatar-circle .material-symbols-outlined {
    font-size: 24px;
}

.profile-arrow {
    font-size: 1.1rem !important;
    color: #001256;
    margin-left: -2px;
}

.dropdown-menu-profile {
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    border-radius: 12px !important;
    padding: 8px !important;
    min-width: 200px !important;
    margin-top: 15px !important;
    animation: fadeIn 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.dropdown-item-profile {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 8px 15px !important;
    color: #444 !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.dropdown-item-profile:hover {
    background-color: #f4f6f9 !important;
    color: #001256 !important;
}

.dropdown-item-profile .material-symbols-outlined {
    font-size: 1.2rem !important;
    opacity: 0.8;
}

/* Material Symbols Global Utility */
.material-symbols-outlined {
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  font-display: block;
}

.content-area {
    padding: 2rem;
    flex: 1;
}

.page-title {
    color: #001256;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.card {
    background-color: white;
    border-radius: 8px;
    border: none;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
    padding: 3rem 2rem;
}

.card h2 {
    color: #001256;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card p.text-muted {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* --- DATATABLES & MODALS --- */
.dataTables_wrapper .row { margin-bottom: 1rem; }
table.dataTable.table-striped>tbody>tr.odd>* { box-shadow: inset 0 0 0 9999px rgba(0,25,119,0.02); }
.page-item.active .page-link { background-color: #001256; border-color: #001256; }

.modal-content { border-radius: 16px; border: none; }
.modal-header { background-color: #001256; color: white; border-top-left-radius: 16px; border-top-right-radius: 16px; }
.modal-header .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* --- RESPONSIVE LAYOUT (MOBILE) --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Custom CSS Hamburger Icon */
.hamburger-menu {
    display: none; /* Oculto en PC por defecto */
    width: 28px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #001256;
    border-radius: 3px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex; 
        align-items: center;
        justify-content: center;
    }
    .sidebar-header img {
        max-width: 130px !important;
    }
    #closeSidebar span {
        font-size: 1.8rem !important;
    }
    .sidebar {
        position: fixed;
        left: -260px; /* Hide completely outside viewport */
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    
    .sidebar.show {
        left: 0; /* Slide in */
    }

    .topbar {
        padding: 0 1rem;
        height: 60px; /* Slightly shorter for mobile */
    }
    .sidebar-header {
        height: 60px; /* Match topbar height on mobile */
    }

    .content-area {
        padding: 1rem !important;
    }
    
    .card {
        padding: 1rem;
    }
}

