/* ===== GLOBAL RESET & VARIABLES ===== */
:root {
    /* SonCasa Brand Colors */
    --primary-color: #0D556B; /* Blue Sapphire */
    --primary-dark: #094450; /* Darker Blue Sapphire */
    --secondary-color: #25968E; /* Secondary Blue */
    --accent-color: #BE8E16; /* Dark Goldenrod */
    --success-color: #25968E; /* Secondary Blue for success */
    --warning-color: #BE8E16; /* Dark Goldenrod for warnings */
    --danger-color: #BE8E16; /* Dark Goldenrod for danger actions */
    
    /* SonCasa Brand Gradients */
    --primary-gradient: linear-gradient(135deg, #0D556B 0%, #25968E 100%);
    --secondary-gradient: linear-gradient(135deg, #BE8E16 0%, #0D556B 100%);
    --dark-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    
    /* SonCasa Accent Colors */
    --neon-blue: #0D556B; /* Blue Sapphire */
    --neon-purple: #25968E; /* Secondary Blue */
    --neon-green: #BE8E16; /* Dark Goldenrod */
    --neon-orange: #BDD7E5; /* Columbia Blue */
    --brand-cream: #FFEBD7; /* Antique White */
    
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-neon: 0 0 30px rgba(13, 85, 107, 0.4);
    --shadow-glow: 0 0 40px rgba(13, 85, 107, 0.6);
    --blur-strong: blur(20px);
    --border-radius: 20px;
    --border-radius-lg: 24px;
}

/* ===== ULTRA MODERN SIDEBAR STYLES ===== */
.sidebar {
    width: 300px;
    background: linear-gradient(180deg, rgba(15, 15, 25, 0.98) 0%, rgba(25, 25, 40, 0.95) 100%);
    backdrop-filter: blur(30px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-header {
    padding: 35px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(13, 85, 107, 0.1) 0%, transparent 70%);
    animation: rotate-glow 20s linear infinite;
}

@keyframes rotate-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.soncasa-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0D556B 0%, #25968E 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4),
                0 0 40px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.soncasa-logo:hover .logo-icon::before {
    left: 100%;
}

.logo-icon:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5),
                0 0 50px rgba(102, 126, 234, 0.3);
}

.platform-title {
    font-size: 1.75em;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #0D556B 50%, #25968E 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.platform-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85em;
    margin: 6px 0 0 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ===== MODERN NAVIGATION MENU ===== */
.nav-menu {
    flex: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    background: transparent;
    border: 2px solid transparent;
}

/* Hover Effect */
.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Active/Selected State with Rounded Edges */
.nav-item.active {
    background: linear-gradient(135deg, #0D556B 0%, #25968E 100%);
    color: white;
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4),
                0 0 40px rgba(102, 126, 234, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Icon Styling */
.nav-item i {
    font-size: 1.1rem;
    width: 24px;
    margin-right: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active i {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* Text Styling */
.nav-item-text {
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    flex: 1;
}

/* Badge Styling with Rounded Edges */
.nav-item-badge {
    background: linear-gradient(135deg, #BE8E16 0%, #0D556B 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 12px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-left: auto;
    box-shadow: 0 4px 12px rgba(0, 245, 255, 0.3),
                0 0 20px rgba(0, 245, 255, 0.2);
    transition: all 0.3s ease;
}

.nav-item:hover .nav-item-badge {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 245, 255, 0.4),
                0 0 25px rgba(0, 245, 255, 0.3);
}

.nav-item.active .nav-item-badge {
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    color: #0D556B;
    font-weight: 800;
}

/* ===== MAIN CONTENT ADJUSTMENT ===== */
.main-content {
    margin-left: 300px;
    min-height: 100vh;
    background: transparent;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR FOOTER & LOGOUT BUTTON ===== */
.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: rgba(190, 142, 22, 0.1);
    border: 1px solid rgba(190, 142, 22, 0.3);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(190, 142, 22, 0.2);
    border-color: rgba(190, 142, 22, 0.5);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(190, 142, 22, 0.2),
                inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.logout-btn i {
    font-size: 1.1rem;
    width: 24px;
    margin-right: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover i {
    transform: scale(1.1);
    color: #BE8E16;
}

.logout-btn .nav-item-text {
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    flex: 1;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0 20px 20px 0;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .nav-item {
        padding: 12px 16px;
    }
    
    .sidebar-header {
        padding: 25px 20px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item {
    animation: slide-in 0.3s ease-out;
    animation-fill-mode: both;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }