/*
 * =================================================================
 *  Veré Óptica Xpress - Sistema Integral
 *  Paleta: #0099BB | #007F9B | #4A4037 | #FFFFEF | #F5F7F8 | #D9E3E6
 *  Font: Poppins (similar a vereopticas.com)
 * =================================================================
 */

:root {
    --vere-primary: #0099BB;
    --vere-primary-dark: #007F9B;
    --vere-brown: #4A4037;
    --vere-cream: #FFFFEF;
    --vere-gray-light: #F5F7F8;
    --vere-gray-border: #D9E3E6;
    --sidebar-width: 260px;
    --navbar-height: 60px;
}

/* ===== GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--vere-gray-light);
    color: var(--vere-brown);
    font-size: 0.9rem;
}

a {
    color: var(--vere-primary);
    text-decoration: none;
}
a:hover {
    color: var(--vere-primary-dark);
}

/* ===== SIDEBAR ===== */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--vere-primary-dark) 0%, #005f73 100%);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

#sidebar::-webkit-scrollbar {
    width: 4px;
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
}

.sidebar-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.sidebar-brand-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-user {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vere-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.avatar-circle.avatar-sm {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
}
.avatar-circle.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

.sidebar-menu {
    flex: 1;
    padding: 0.5rem 0;
}

.sidebar-menu .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.55rem 1.25rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.sidebar-menu .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.12);
    border-left-color: white;
    font-weight: 500;
}

.sidebar-menu .nav-link.disabled {
    color: rgba(255,255,255,0.35);
    pointer-events: none;
}

.sidebar-menu .nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.nav-section {
    color: rgba(255,255,255,0.4);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.25rem 0.35rem;
}

/* ===== MAIN CONTENT ===== */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.content-wrapper {
    flex: 1;
    padding: 1.5rem;
}

/* ===== TOP NAVBAR ===== */
.top-navbar {
    height: var(--navbar-height);
    background: white;
    border-bottom: 1px solid var(--vere-gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.top-navbar .breadcrumb-item a {
    color: var(--vere-primary);
}

/* ===== FOOTER ===== */
.app-footer {
    padding: 0.75rem 1.5rem;
    background: white;
    border-top: 1px solid var(--vere-gray-border);
    color: #888;
    font-size: 0.78rem;
}

/* ===== BUTTONS ===== */
.btn-vere {
    background: var(--vere-primary);
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}
.btn-vere:hover {
    background: var(--vere-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 153, 187, 0.3);
}

.btn-outline-vere {
    border: 1px solid var(--vere-primary);
    color: var(--vere-primary);
    background: transparent;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
}
.btn-outline-vere:hover {
    background: var(--vere-primary);
    color: white;
}
.btn-outline-vere.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ===== CARDS ===== */
.card {
    border-radius: 0.5rem;
}

.card-stat {
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08) !important;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.bg-vere-light {
    background: rgba(0, 153, 187, 0.1);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--vere-gray-light);
    padding: 1rem;
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 880px;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.login-brand {
    width: 45%;
    background: linear-gradient(135deg, var(--vere-primary) 0%, var(--vere-primary-dark) 50%, #005f73 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}

.login-brand-content {
    text-align: center;
}

.login-logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.login-form-wrapper {
    width: 55%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
}

.login-form-content {
    width: 100%;
    max-width: 360px;
}

/* ===== FORMS ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--vere-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 153, 187, 0.15);
}

.input-group-text {
    border-color: #dee2e6;
}

/* ===== SIDEBAR BACKDROP (mobile) ===== */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1035;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.show {
        transform: translateX(0);
    }
    #main-content {
        margin-left: 0;
    }
    .sidebar-backdrop.show {
        display: block !important;
    }

    /* Login responsive */
    .login-card {
        flex-direction: column;
        max-width: 440px;
    }
    .login-brand {
        width: 100%;
        padding: 2rem;
    }
    .login-brand-content .mt-4 {
        display: none;
    }
    .login-form-wrapper {
        width: 100%;
        padding: 2rem;
    }
}

@media (max-width: 575.98px) {
    .content-wrapper {
        padding: 1rem;
    }
    .login-brand {
        padding: 1.5rem;
    }
    .login-form-wrapper {
        padding: 1.5rem;
    }
}

/* ===== DATATABLE-LIKE TABLE ===== */
.table-vere thead th {
    background: var(--vere-gray-light);
    border-bottom: 2px solid var(--vere-gray-border);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    white-space: nowrap;
}
.table-vere tbody tr:hover {
    background: rgba(0, 153, 187, 0.03);
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

/* ===== DROPDOWN ===== */
.dropdown-menu {
    border: 1px solid var(--vere-gray-border);
    border-radius: 0.5rem;
    font-size: 0.85rem;
}
.dropdown-item:active {
    background: var(--vere-primary);
}

/* ===== SCROLLBAR GLOBAL ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}
