/* frontend/static/css/main.css */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar Layout */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
    overflow-x: hidden;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--inter-sidebar-bg);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1030;
    display: flex;
    flex-direction: column;
}

#sidebar.collapsed {
    margin-left: -260px;
}

#content-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--inter-bg-content);
}

/* Sidebar Header / Branding */
.sidebar-header {
    padding: 1.25rem 1.5rem;
    background: var(--inter-sidebar-header-bg);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Sidebar Profile Box */
.sidebar-profile {
    padding: 1.25rem 1.5rem;
    background: rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 0.75rem 0;
    list-style: none;
    margin-bottom: 0;
    overflow-y: auto;
    flex: 1;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar-menu .nav-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.6rem 1.5rem 0.3rem;
    color: #6c7b88;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-menu .nav-item {
    position: relative;
}

.sidebar-menu .nav-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--inter-sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.92rem;
}

.sidebar-menu .nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.sidebar-menu .nav-item.active > a {
    background-color: var(--inter-sidebar-active-bg);
    color: var(--inter-sidebar-text-active);
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(45, 85, 147, 0.25);
}

.sidebar-menu .nav-item a i {
    width: 22px;
    margin-right: 0.75rem;
    font-size: 1.05rem;
    text-align: center;
}

/* Submenu layout (collapse list) */
.sidebar-menu .collapse-menu {
    list-style: none;
    padding-left: 0;
    background-color: rgba(0, 0, 0, 0.15);
}

.sidebar-menu .collapse-menu a {
    padding: 0.55rem 1.5rem 0.55rem 2.75rem;
    font-size: 0.85rem;
}

.sidebar-menu .collapse-menu .nav-item.active > a {
    background-color: rgba(31, 54, 104, 0.25);
    color: var(--inter-sidebar-active-border);
    border-left: 3px solid var(--inter-sidebar-active-border);
}

/* Navbar customizations */
.navbar-toggler-btn {
    background: none;
    border: none;
    color: #555;
    font-size: 1.2rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.navbar-toggler-btn:hover {
    background-color: rgba(0,0,0,0.05);
    color: #000;
}

.vertical-divider {
    color: #dee2e6;
}

/* Tablas responsive fixes adicionales */
.table-responsive {
    border-radius: .375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
    border: 1px solid #e3e6f0;
}

.table th {
    background-color: #f8f9fc;
    color: #4e73df;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e3e6f0;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Campos de formulario deshabilitados o readonly: fondo visualmente distinguible */
.form-control:disabled,
.form-control[readonly] {
    background-color: var(--bs-secondary-bg);
    opacity: 1;
}

/* Utilidades para modales y forms */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
}

.modal-header {
    border-bottom: 1px solid #e3e6f0;
    background-color: #f8f9fc;
}

.modal-footer {
    border-top: 1px solid #e3e6f0;
    background-color: #f8f9fc;
}

.card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* =============================================================
   VARIABLES INSTITUCIONALES
   Extraídas de frontend/static/img/logo-inter.png
   ============================================================= */
:root {
    --inter-blue-primary: #2d5593;
    --inter-blue-primary-hover: #436498;
    --inter-blue-primary-dark: #24457a;
    --inter-blue-dark: #1f3668;
    --inter-blue-darker: #0d1a33;
    --inter-orange: #e96621;
    --inter-orange-hover: #e8753a;
    --inter-orange-dark: #c9571c;
    --inter-sidebar-bg: #1d305b;
    --inter-sidebar-header-bg: #1d305b;
    --inter-sidebar-active-bg: #1f3668;
    --inter-sidebar-active-border: #e96621;
    --inter-sidebar-text: #b8c7ce;
    --inter-sidebar-text-active: #e96621;
    --inter-navbar-bg: #ffffff;
    --inter-bg-content: #f4f6f9;
    --inter-card-bg: #ffffff;
    --inter-border-color: #e9ecef;
}

/* --- LOGIN PREMIUM GLASSMORPHISM --- */
:root {
    --login-bg-overlay: rgba(8, 20, 42, 0.82);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(14px);
    --input-focus-border: rgba(255, 255, 255, 0.4);
    --btn-gradient: linear-gradient(90deg, #1f6fd8 0%, #104ba3 100%);
    --btn-gradient-hover: linear-gradient(90deg, #2a81ed 0%, #155cb7 100%);
}

.login-wrapper {
    background: url('../img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-y: auto;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--login-bg-overlay);
    z-index: 1;
}

.login-content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 28px;
    padding: 3.5rem 2.5rem 2.5rem 2.5rem;
    color: #ffffff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 440px;
    transition: all 0.3s ease;
}

/* On extremely small screens, reduce padding */
@media (max-width: 480px) {
    .glass-card {
        padding: 2.5rem 1.75rem 2rem 1.75rem;
        border-radius: 24px;
        margin: 15px;
    }
}

.login-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
}

.login-logo-img {
    max-height: 90px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.glass-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.glass-input-group i.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 5;
}

.glass-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    padding: 1rem 1rem 1rem 3.2rem !important;
    width: 100%;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: var(--input-focus-border) !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

/* Visibility button for password */
.password-toggle-btn {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    padding: 0;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 5;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: #ffffff;
}

.glass-btn {
    background: var(--btn-gradient);
    border: none;
    border-radius: 14px;
    color: #ffffff;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(31, 111, 216, 0.3);
}

.glass-btn:hover {
    background: var(--btn-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 111, 216, 0.45);
}

.glass-btn:active {
    transform: translateY(0);
}

.glass-btn:disabled {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.glass-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 2rem 0 1.5rem 0;
}

.glass-link {
    color: #3b8cf6;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.glass-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

