/* ================================================
   REDESIGN CORE - GLOBAL STYLES
   Shared components for the modern dashboard theme
   ================================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* CSS Variables for Consistent Theming */
:root {
    /* Primary Blues */
    --navy-dark: #0a1628;
    --navy: #0f2744;
    --navy-light: #1a3a5c;
    --blue-primary: #1e5bb8;
    --blue-accent: #3b82f6;
    --blue-light: #60a5fa;
    --vt-red: #ff1f2e;
    --vt-orange: #ff8a00;

    /* Whites & Neutrals */
    --white: #ffffff;
    --white-blue: #f0f6ff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;

    /* Accents */
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --green: #10b981;
    --red: #ef4444;
    --orange: #f97316;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(15, 39, 68, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 39, 68, 0.08);
    --shadow-lg: 0 8px 30px rgba(15, 39, 68, 0.12);
    --shadow-xl: 0 20px 50px rgba(15, 39, 68, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, var(--white-blue) 0%, var(--gray-50) 50%, var(--white) 100%);
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}

body.sidebar-open {
    overflow: hidden;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
    width: 228px;
    background: linear-gradient(180deg, #111827 0%, #172033 46%, #0b101a 100%);
    color: white;
    padding: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1200;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 8px 0 28px rgba(6, 10, 18, 0.24);
    transition: transform var(--transition-normal);
}

/* Mobile Header & Sidebar Overlay */
.mobile-dashboard-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(180deg, #111827 0%, #172033 100%);
    padding: 0 16px;
    z-index: 1100;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 22px rgba(6, 10, 18, 0.22);
}

.mobile-logo img {
    height: 62px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1150;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar::before {
    display: none;
}

.sidebar-logo {
    min-height: 118px;
    padding: 18px 16px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.sidebar-logo img {
    max-width: 178px;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
    transition: transform var(--transition-normal), filter var(--transition-normal);
}

.sidebar-logo img:hover {
    transform: scale(1.05);
}

.sidebar-partner-label {
    display: block;
    margin-top: -8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    transform: translateY(-6px);
}

.sidebar-partner-logo {
    display: flex;
    justify-content: center;
    margin-top: -8px;
    padding: 2px 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sidebar-partner-logo img {
    display: block;
    width: 168px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: none;
}

.sidebar-partner-logo img:hover {
    transform: none;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 14px 18px;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar-nav>a,
.sidebar-nav .nav-item-dropdown>a.nav-has-dropdown {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 42px;
    padding: 11px 12px;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    margin: 4px 0;
    border-radius: 8px;
}

.sidebar-nav>a::before,
.sidebar-nav .nav-item-dropdown>a.nav-has-dropdown::before {
    display: none;
}

.sidebar-nav>a:hover,
.sidebar-nav .nav-item-dropdown>a.nav-has-dropdown:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav>a:hover::before,
.sidebar-nav .nav-item-dropdown>a.nav-has-dropdown:hover::before {
    display: none;
}

.sidebar-nav>a.active,
.sidebar-nav .nav-item-dropdown>a.nav-has-dropdown.active {
    background: linear-gradient(135deg, var(--vt-red) 0%, var(--vt-orange) 100%);
    color: white;
    box-shadow: 0 10px 22px rgba(255, 79, 18, 0.22);
}

.sidebar-nav>a.active::before,
.sidebar-nav .nav-item-dropdown>a.nav-has-dropdown.active::before {
    display: none;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: rgba(226, 232, 240, 0.72);
    opacity: 0.9;
}

.sidebar-nav>a.active i,
.sidebar-nav .nav-item-dropdown>a.nav-has-dropdown.active i {
    color: white;
}

/* Sidebar Dropdown */
.nav-item-dropdown {
    margin: 2px 0;
}

.sidebar-dropdown {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 4px 0 8px;
    border-radius: 8px;
    overflow: hidden;
    animation: slideDown var(--transition-normal) ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-dropdown.show {
    display: block;
}

.sidebar-dropdown a {
    display: block;
    padding: 10px 16px 10px 42px;
    font-size: 12px;
    color: rgba(226, 232, 240, 0.72);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sidebar-dropdown a:hover {
    color: white;
    background: rgba(255, 138, 0, 0.14);
    padding-left: 44px;
}

.sidebar-dropdown a.active {
    color: white;
    background: rgba(255, 138, 0, 0.14);
}

.sidebar-divider {
    border-top-color: rgba(255, 255, 255, 0.09) !important;
}

.btn-login-sidebar {
    background: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
}

.nav-has-dropdown {
    justify-content: space-between;
}

.nav-link-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dropdown-icon {
    font-size: 10px;
    transition: transform var(--transition-normal);
    opacity: 0.6;
}

.nav-has-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

/* ================================================
   MAIN CONTENT
   ================================================ */
.main-content-dashboard {
    flex: 1;
    margin-left: 228px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Stabilizer for flex-box overflow */
}

/* Responsive Handling */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 264px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-dashboard-header {
        display: flex;
    }

    .main-content-dashboard {
        margin-left: 0;
        padding-top: 56px;
    }

    .sidebar-logo {
        padding: 18px 16px 12px;
    }

    .sidebar-logo img {
        max-width: 178px;
    }
}

@media (max-width: 480px) {
    .mobile-dashboard-header {
        height: 52px;
        padding: 0 12px;
    }

    .main-content-dashboard {
        padding-top: 52px;
    }
}
