/* Modern Navigation System - 2025 Premium Design */

/* ===== VARIABLES ===== */
:root {
    /* Light Mode Colors - Vibrant Purple Theme */
    --nav-bg-light: linear-gradient(180deg, #7C3AED 0%, #0a0a0a  100%);
    --nav-bg-solid-light: #7C3AED;
    --nav-border-light: rgba(255, 255, 255, 0.2);
    --nav-text-light: #FFFFFF;
    --nav-hover-light: rgba(255, 255, 255, 0.15);
    --nav-active-light: #FBBF24;
    --nav-active-bg-light: rgba(251, 191, 36, 0.2);
    
    /* Dark Mode Colors - Deep Purple Theme */
    --nav-bg-dark: linear-gradient(180deg, #4C1D95 0%, #7E22CE 100%);
    --nav-bg-solid-dark: #4C1D95;
    --nav-border-dark: rgba(255, 255, 255, 0.1);
    --nav-text-dark: #FFFFFF;
    --nav-hover-dark: rgba(255, 255, 255, 0.1);
    --nav-active-dark: #06B6D4;
    --nav-active-bg-dark: rgba(6, 182, 212, 0.2);
    
    /* Sidebar Dimensions */
    --sidebar-collapsed: 80px;
    --sidebar-expanded: 250px;
    --sidebar-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Header */
    --header-height: 70px;
    
    /* Border Radius - More Rounded */
    --nav-radius: 16px;
    --nav-radius-large: 20px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* ===== LAYOUT RESET ===== */
.modern-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

/* ===== SIDEBAR ===== */
.modern-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-expanded);
    background: var(--nav-bg-light);
    border-right: 1px solid var(--nav-border-light);
    border-radius: 0 var(--nav-radius-large) var(--nav-radius-large) 0;
    box-shadow: var(--shadow-xl);
    transition: all var(--sidebar-transition);
    margin-left: calc(-1 * var(--sidebar-expanded));
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

html.dark .modern-sidebar {
    background: var(--nav-bg-dark);
    border-right-color: var(--nav-border-dark);
}

.modern-sidebar.expanded {
    margin-left: 0;
}

/* RTL Support */
[dir="rtl"] .modern-sidebar {
    left: auto;
    right: 0;
    margin-left: 0;
    margin-right: calc(-1 * var(--sidebar-expanded));
    border-right: none;
    border-left: 1px solid var(--nav-border-light);
    border-radius: var(--nav-radius-large) 0 0 var(--nav-radius-large);
}

[dir="rtl"] .modern-sidebar.expanded {
    margin-right: 0;
}

[dir="rtl"] html.dark .modern-sidebar {
    border-left-color: var(--nav-border-dark);
}

/* Sidebar Logo Area */
.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--nav-border-light);
    flex-shrink: 0;
}

html.dark .sidebar-logo {
    border-bottom-color: var(--nav-border-dark);
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--nav-active-light) !important;
    opacity: 0;
    transition: opacity var(--sidebar-transition);
    white-space: nowrap;
}

html.dark .sidebar-logo .logo-text {
    color: var(--nav-active-dark) !important;
}

.modern-sidebar.expanded .logo-text {
    opacity: 1;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 8px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: var(--nav-border-light);
    border-radius: 4px;
}

html.dark .sidebar-nav::-webkit-scrollbar-thumb {
    background-color: var(--nav-border-dark);
}

/* Navigation Items */
.nav-item {
    position: relative;
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--nav-text-light) !important;
    text-decoration: none;
    border-radius: var(--nav-radius);
    transition: all 200ms ease;
    position: relative;
    overflow: hidden;
}

html.dark .nav-link {
    color: var(--nav-text-dark) !important;
}

.nav-link:hover {
    background-color: var(--nav-hover-light);
    transform: translateX(4px);
}

[dir="rtl"] .nav-link:hover {
    transform: translateX(-4px);
}

html.dark .nav-link:hover {
    background-color: var(--nav-hover-dark);
}

.nav-link.active {
    background: rgba(251, 191, 36, 0.25) !important;
    color: #FBBF24 !important;
    font-weight: 700;
    position: relative;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 60%;
    background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

[dir="rtl"] .nav-link.active::before {
    right: auto;
    left: 8px;
}

html.dark .nav-link.active {
    background: rgba(6, 182, 212, 0.25) !important;
    color: #06B6D4 !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

html.dark .nav-link.active::before {
    background: linear-gradient(180deg, #06B6D4 0%, #0891B2 100%);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.nav-link .nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-link .nav-text {
    margin-left: 12px;
    opacity: 0;
    transition: opacity var(--sidebar-transition);
    white-space: nowrap;
}

[dir="rtl"] .nav-link .nav-text {
    margin-left: 0;
    margin-right: 12px;
}

.modern-sidebar.expanded .nav-text {
    opacity: 1;
}

/* ===== HEADER ===== */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #FFFFFF;
    border: none;
    border-radius: 0 0 var(--nav-radius-large) var(--nav-radius-large);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 20px;
    z-index: 1000;
    transition: all var(--sidebar-transition);
}

.modern-sidebar.expanded ~ .modern-header {
    margin-left: var(--sidebar-expanded);
}

[dir="rtl"] .modern-sidebar.expanded ~ .modern-header {
    margin-left: 0;
    margin-right: var(--sidebar-expanded);
}

html.dark .modern-header {
    background: #1A1A1A;
    box-shadow: var(--shadow-md);
}

[dir="rtl"] .modern-header {
    border-radius: 0 0 var(--nav-radius-large) var(--nav-radius-large);
}

.modern-header.scrolled {
    box-shadow: var(--shadow-lg);
}

/* Hamburger Menu */
.hamburger-menu {
    width: 45px;
    height: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: #F3F4F6;
    border: none;
    padding: 10px;
    border-radius: var(--nav-radius);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.hamburger-menu:hover {
    background: #E5E7EB;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

html.dark .hamburger-menu {
    background: #2A2A2A;
}

html.dark .hamburger-menu:hover {
    background: #3A3A3A;
}

.hamburger-line {
    width: 22px;
    height: 2.5px;
    background-color: #6B7280 !important;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

html.dark .hamburger-line {
    background-color: #D1D5DB !important;
}

.hamburger-line:not(:last-child) {
    margin-bottom: 5px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Header Right Section */
.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

[dir="rtl"] .header-right {
    margin-left: 0;
    margin-right: auto;
}

/* ===== MAIN CONTENT ===== */
.modern-content {
    margin-left: 0;
    margin-top: var(--header-height);
    padding: 32px;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    transition: all var(--sidebar-transition);
}

.modern-sidebar.expanded ~ .modern-content {
    margin-left: var(--sidebar-expanded);
    width: calc(100% - var(--sidebar-expanded));
}

[dir="rtl"] .modern-sidebar.expanded ~ .modern-content {
    margin-left: 0;
    margin-right: var(--sidebar-expanded);
}

html.dark .modern-content {
    background: linear-gradient(135deg, #1A1A1A 0%, #0A0A0A 100%);
}

/* Content Cards */
.modern-content .card {
    border-radius: var(--nav-radius-large);
    box-shadow: var(--shadow-md);
    border: none;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-content .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ===== TOOLTIP ===== */
.nav-tooltip {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--nav-text-light);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 1001;
}

html.dark .nav-tooltip {
    background-color: var(--nav-text-dark);
    color: var(--nav-bg-dark);
}

[dir="rtl"] .nav-tooltip {
    left: auto;
    right: 70px;
}

.nav-item:hover .nav-tooltip {
    opacity: 1;
}

.modern-sidebar.expanded .nav-tooltip {
    display: none;
}

/* ===== RESPONSIVE ===== */
/* Overlay - Disabled for push mode */
.sidebar-overlay {
    display: none;
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-item {
    animation: slideIn 300ms ease forwards;
}

.nav-item:nth-child(1) { animation-delay: 50ms; }
.nav-item:nth-child(2) { animation-delay: 100ms; }
.nav-item:nth-child(3) { animation-delay: 150ms; }
.nav-item:nth-child(4) { animation-delay: 200ms; }
.nav-item:nth-child(5) { animation-delay: 250ms; }
.nav-item:nth-child(6) { animation-delay: 300ms; }

/* ===== SMOOTH TRANSITIONS ===== */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 200ms;
    transition-timing-function: ease-in-out;
}

button, a {
    transition-property: all;
}
