﻿:root {
    /* Color Palette - Vibrant & Elegant */
    --accent-vibrant: #7C3AED; /* Deep Purple */
    --accent-vibrant-light: #A78BFA;
    --primary-bg: #F8FAFC;
    --sidebar-bg: rgba(15, 23, 42, 0.95); /* Deep Slate Glass */
    --header-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--primary-bg);
    color: #1E293B;
    overflow-x: hidden;
}

/* Layout Container */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Premium Glassmorphism */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    color: white;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #A78BFA, #7C3AED);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    padding: 0 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
    text-decoration: none !important;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateX(4px);
}

.nav-link.active {
    background: var(--accent-vibrant);
    color: white !important;
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.4);
}

.nav-link .icon {
    font-size: 1.25rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
}

/* Main Content Area */
.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--primary-bg);
}

/* Topbar - Sleek and Blurred */
.topbar {
    height: 70px;
    background: var(--header-bg) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    color: #0F172A !important;
}

.societe-libelle {
    font-weight: 600;
    font-size: 1.125rem;
    color: #0F172A;
}

/* Premium Buttons */
.btn-primary {
    background-color: var(--accent-vibrant);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: #6D28D9;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.3);
}

/* Card Overhaul */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    background: white;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Responsive Overrides */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -280px;
        height: 100vh;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .app-layout.collapsed .sidebar {
        left: 0;
    }
}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 950;
    display: none;
}

.sidebar.open ~ .backdrop {
    display: block;
}

/* Login Page Specific Styling */
.login-wrapper {
    position: relative;
    height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.login-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("https://images.unsplash.com/photo-1557683316-973673baf926?q=80&w=2000&auto=format&fit=crop") no-repeat center center;
    background-size: cover;
    opacity: 0.2;
    z-index: 1;
}

.login-card {
    z-index: 2;
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-gradient {
    background: linear-gradient(to right, #7C3AED, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--accent-vibrant);
}

.user-badge {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    font-weight: 500;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}


/* Product Grid & Cards Redesign */
.catalog-container {
    background: #F8FAFC;
    min-height: calc(100vh - 70px);
}

.product-premium-card {
    background: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.product-premium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(124, 58, 237, 0.1), 0 10px 10px -5px rgba(124, 58, 237, 0.04) !important;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 99px;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

.text-vibrant {
    color: var(--accent-vibrant);
}

.bg-light-success {
    background: #DCFCE7;
}

.bg-light-danger {
    background: #FEE2E2;
}

.premium-combo .dxbl-input-text {
    border-radius: 12px !important;
    border: none !important;
    background: #F1F5F9 !important;
    padding: 0.6rem 1rem !important;
}

.text-xs {
    font-size: 0.7rem;
}

