/* ==========================================================================
   Rishav Car Bazar - Ultra-Premium Luxury Automotive ERP Theme
   Modern, responsive, glassmorphic design with mobile-first offcanvas navigation
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --erp-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --erp-primary: #cba158;
    --erp-primary-hover: #dfbc77;
    --erp-primary-subtle: rgba(203, 161, 88, 0.15);
    
    --erp-secondary: #07162c;
    --erp-dark: #040d1a;
    --erp-dark-card: #0a1830;
    
    --erp-sidebar-bg: linear-gradient(180deg, #07162c 0%, #030914 100%);
    --erp-sidebar-hover: rgba(203, 161, 88, 0.1);
    --erp-sidebar-text: #94a3b8;
    --erp-sidebar-active: #cba158;
    
    --erp-body-bg: #f8fafc;
    --erp-card-bg: #ffffff;
    --erp-border: #e2e8f0;
    --erp-border-subtle: rgba(226, 232, 240, 0.8);
    
    --erp-shadow-sm: 0 1px 3px rgba(7, 22, 44, 0.04);
    --erp-shadow: 0 4px 20px -2px rgba(7, 22, 44, 0.06), 0 2px 6px -1px rgba(7, 22, 44, 0.04);
    --erp-shadow-lg: 0 10px 30px -4px rgba(7, 22, 44, 0.1);
    --erp-shadow-glow: 0 0 25px rgba(203, 161, 88, 0.25);
    
    --erp-radius-sm: 8px;
    --erp-radius: 14px;
    --erp-radius-lg: 20px;
}

body {
    background-color: var(--erp-body-bg);
    font-family: var(--erp-font);
    color: #1e293b;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Layout & Responsive Offcanvas Sidebar
   ========================================================================== */

#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Desktop Sidebar */
#sidebar-wrapper {
    width: 275px;
    min-height: 100vh;
    background: var(--erp-sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.sidebar-scrollable {
    overflow-y: auto;
    flex-grow: 1;
    padding-bottom: 2rem;
}

/* Custom Slim Scrollbar */
.sidebar-scrollable::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scrollable::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

/* Content Area offset on desktop */
#page-content-wrapper {
    margin-left: 275px;
    width: calc(100% - 275px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile Sidebar Behavior (< 992px) */
@media (max-width: 991.98px) {
    #sidebar-wrapper {
        transform: translateX(-100%);
    }
    
    #sidebar-wrapper.show {
        transform: translateX(0);
    }
    
    #page-content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Backdrop overlay when sidebar is open */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(7, 10, 19, 0.7);
        backdrop-filter: blur(6px);
        z-index: 1035;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }
}

/* ==========================================================================
   Sidebar Brand & Nav Items
   ========================================================================== */

.sidebar-brand-box {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dfbc77 0%, #cba158 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #07162c;
    font-size: 1.35rem;
    box-shadow: 0 4px 15px rgba(203, 161, 88, 0.35);
}

.sidebar-category {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1.15rem 1.4rem 0.35rem;
    color: #64748b;
    font-weight: 700;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.15rem;
    margin: 0.15rem 0.85rem;
    border-radius: 10px;
    color: var(--erp-sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar-nav-link .nav-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #94a3b8;
}

.sidebar-nav-link:hover {
    color: #ffffff;
    background: var(--erp-sidebar-hover);
    transform: translateX(3px);
}

.sidebar-nav-link:hover .nav-icon-wrap {
    background: rgba(203, 161, 88, 0.2);
    color: #dfbc77;
}

.sidebar-nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(203, 161, 88, 0.2) 0%, rgba(203, 161, 88, 0.05) 100%);
    border: 1px solid rgba(203, 161, 88, 0.35);
    font-weight: 600;
}

.sidebar-nav-link.active .nav-icon-wrap {
    background: linear-gradient(135deg, #dfbc77 0%, #cba158 100%);
    color: #07162c;
    box-shadow: 0 2px 10px rgba(203, 161, 88, 0.4);
}

.sidebar-nav-link .nav-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

/* ==========================================================================
   Sidebar Accordion Groups & Dropdowns
   ========================================================================== */

.sidebar-group {
    margin-bottom: 0.2rem;
}

.sidebar-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 1.7rem);
    margin: 0.15rem 0.85rem;
    padding: 0.65rem 1rem;
    background: transparent;
    border: none;
    color: var(--erp-sidebar-text);
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.sidebar-dropdown-btn:hover {
    color: #ffffff;
    background: var(--erp-sidebar-hover);
}

.sidebar-dropdown-btn:hover .nav-icon-wrap {
    background: rgba(203, 161, 88, 0.2);
    color: #dfbc77;
}

.sidebar-dropdown-btn.active,
.sidebar-dropdown-btn[aria-expanded="true"] {
    color: #ffffff;
    background: rgba(203, 161, 88, 0.12);
}

.sidebar-dropdown-btn.active .nav-icon-wrap,
.sidebar-dropdown-btn[aria-expanded="true"] .nav-icon-wrap {
    background: linear-gradient(135deg, #dfbc77 0%, #cba158 100%);
    color: #07162c;
    box-shadow: 0 2px 10px rgba(203, 161, 88, 0.4);
}

.nav-chevron {
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.25s ease, color 0.25s ease;
}

.sidebar-dropdown-btn[aria-expanded="true"] .nav-chevron,
.sidebar-dropdown-btn:not(.collapsed) .nav-chevron {
    transform: rotate(180deg);
    color: #cba158;
}

.submenu-collapse {
    transition: height 0.22s ease;
}

.submenu-inner {
    padding-left: 1.15rem;
    padding-top: 0.25rem;
    padding-bottom: 0.35rem;
    border-left: 1.5px dashed rgba(203, 161, 88, 0.25);
    margin-left: 2.15rem;
    margin-right: 0.85rem;
}

.submenu-nav-link {
    display: flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    border-radius: 8px;
    transition: all 0.18s ease;
    margin-bottom: 2px;
}

.submenu-nav-link:hover {
    color: #dfbc77;
    background: rgba(203, 161, 88, 0.1);
    transform: translateX(3px);
}

.submenu-nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(203, 161, 88, 0.25) 0%, rgba(203, 161, 88, 0.08) 100%);
    border-left: 3px solid #cba158;
    font-weight: 600;
}

.dot-icon {
    font-size: 0.35rem;
    margin-right: 8px;
    color: #64748b;
    transition: all 0.2s ease;
}

.submenu-nav-link:hover .dot-icon,
.submenu-nav-link.active .dot-icon {
    color: #cba158;
    transform: scale(1.2);
}

/* ==========================================================================
   Glassmorphic Top Navigation
   ========================================================================== */

.top-navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--erp-border);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.03);
}

.menu-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--erp-border);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    transition: all 0.2s ease;
    cursor: pointer;
}

.menu-toggle-btn:hover {
    background: #f1f5f9;
    color: var(--erp-primary);
    border-color: #cbd5e1;
}

.user-avatar-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
    font-size: 0.95rem;
    border: 2px solid #ffffff;
}

/* ==========================================================================
   Modern Stat & KPI Cards
   ========================================================================== */

.stat-card {
    background: var(--erp-card-bg);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    padding: 1.35rem 1.25rem;
    box-shadow: var(--erp-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--erp-shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
}

.stat-card .stat-value {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 0.35rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* Accent Gradients for Stat Cards */
.stat-icon.primary { background: rgba(203, 161, 88, 0.15); color: #cba158; }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.info { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.dark { background: rgba(7, 22, 44, 0.1); color: #07162c; }

/* ==========================================================================
   Premium Content Cards, Tables & Badges
   ========================================================================== */

.card {
    border-radius: var(--erp-radius);
    border: 1px solid var(--erp-border);
    box-shadow: var(--erp-shadow);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--erp-border);
    padding: 1.15rem 1.35rem;
    border-top-left-radius: var(--erp-radius) !important;
    border-top-right-radius: var(--erp-radius) !important;
}

.table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: none;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table td {
    padding: 0.95rem 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
    border-color: #f1f5f9;
}

.table-hover tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.8);
}

/* Status Badges */
.badge {
    padding: 0.4em 0.75em;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

/* Modern Form Controls */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--erp-primary);
    box-shadow: 0 0 0 3px rgba(203, 161, 88, 0.2);
}

.btn {
    border-radius: 10px;
    padding: 0.55rem 1.15rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #dfbc77 0%, #cba158 100%);
    border: none;
    color: #07162c !important;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(203, 161, 88, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ecd39d 0%, #dfbc77 100%);
    box-shadow: 0 4px 16px rgba(203, 161, 88, 0.4);
    transform: translateY(-1px);
    color: #07162c !important;
}

.btn-gold {
    background: linear-gradient(135deg, #dfbc77 0%, #cba158 100%);
    border: none;
    color: #07162c !important;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(203, 161, 88, 0.25);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #ecd39d 0%, #dfbc77 100%);
    box-shadow: 0 4px 16px rgba(203, 161, 88, 0.4);
    transform: translateY(-1px);
    color: #07162c !important;
}

/* ==========================================================================
   Luxury Glassmorphic Login Screen
   ========================================================================== */

.login-page-body {
    background: radial-gradient(circle at 15% 50%, rgba(203, 161, 88, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(7, 22, 44, 0.85) 0%, transparent 50%),
                linear-gradient(135deg, #07162c 0%, #030a14 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card-luxury {
    width: 100%;
    max-width: 480px;
    background: rgba(7, 22, 44, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(203, 161, 88, 0.3);
    border-radius: var(--erp-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(203, 161, 88, 0.15);
    overflow: hidden;
}

.login-header-luxury {
    padding: 2.25rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(203, 161, 88, 0.15);
}

.login-body-luxury {
    padding: 2rem;
}

.login-input-dark {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.login-input-dark:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #cba158 !important;
    box-shadow: 0 0 0 3px rgba(203, 161, 88, 0.25) !important;
}

.login-input-dark::placeholder {
    color: #64748b !important;
}

.input-addon-dark {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #94a3b8 !important;
}

.btn-toggle-password {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    color: #94a3b8;
    padding: 0 0.85rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-password:hover {
    color: #cba158;
    background: rgba(255, 255, 255, 0.1);
}

.demo-account-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(203, 161, 88, 0.2);
    color: #cbd5e1;
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.demo-account-chip:hover {
    background: rgba(203, 161, 88, 0.2);
    border-color: rgba(203, 161, 88, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Card Accent Utilities */
.card-accent-blue { border-left: 4px solid #0284c7 !important; }
.card-accent-green { border-left: 4px solid #16a34a !important; }
.card-accent-purple { border-left: 4px solid #9333ea !important; }
.card-accent-yellow { border-left: 4px solid #d97706 !important; }
.card-accent-gold { border-left: 4px solid #cba158 !important; }
.card-accent-red { border-left: 4px solid #ef4444 !important; }

.bg-soft-primary { background: rgba(203, 161, 88, 0.15) !important; color: #b8860b !important; }
.bg-soft-gold { background: rgba(203, 161, 88, 0.15) !important; color: #b8860b !important; }
.bg-soft-success { background: rgba(22, 163, 74, 0.1) !important; color: #16a34a !important; }
.bg-soft-info { background: rgba(2, 132, 199, 0.1) !important; color: #0284c7 !important; }
.bg-soft-warning { background: rgba(217, 119, 6, 0.1) !important; color: #d97706 !important; }
.bg-soft-purple { background: rgba(147, 51, 234, 0.1) !important; color: #9333ea !important; }
.bg-soft-danger { background: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; }

/* Mobile Table & Card Responsiveness */
.table-responsive {
    border-radius: var(--erp-radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767.98px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }

    .stat-card {
        padding: 1rem !important;
    }

    .stat-card .stat-value {
        font-size: 1.35rem;
    }
}

/* CRM Utilities */
.hover-elevate {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-elevate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.09) !important;
}

.ring-active {
    box-shadow: 0 0 0 2px #cba158, 0 4px 15px rgba(203, 161, 88, 0.3) !important;
}

.hover-gold:hover {
    color: #cba158 !important;
}

.btn-xs {
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    border-radius: 4px;
}

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

