/* ═══════════════════════════════════════════════════════════════
   DBM Panel — User Panel (matches admin panel design)
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary: #6c3ce9;
    --primary-light: #8b5cf6;
    --primary-dark: #5521b9;
    --bg-body: #f0f2f8;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
    --sidebar-width: 260px;
    --radius: 18px;
    --radius-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: linear-gradient(180deg, #510bc4 0%, #aa0d9b 50%, #e60067 100%) !important;
    background-attachment: fixed !important;
    color: #1e293b !important;
    min-height: 100vh;
    display: flex !important;
    overflow-x: hidden !important;
    -webkit-font-smoothing: antialiased;
}

/* ===== SIDEBAR — dark gradient like admin ===== */
.sidebar {
    width: var(--sidebar-width) !important;
    background: linear-gradient(180deg, #1e1145 0%, #2d1b69 40%, #3b2380 100%) !important;
    border-right: none !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0; left: 0;
    z-index: 1000 !important;
    transform: translate3d(0, 0, 0) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15) !important;
    display: flex !important;
    flex-direction: column !important;
}
.sidebar-header {
    padding: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    flex-shrink: 0 !important;
}
.sidebar-header .logo {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-decoration: none !important;
    text-shadow: 0 2px 8px rgba(108,60,233,0.4) !important;
}
.nav-menu {
    padding: 0.75rem !important;
    list-style: none !important;
    flex: 1 !important;
    overflow-y: auto !important;
}
.nav-menu::-webkit-scrollbar { display: none !important; }
.nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 0.7rem 1rem !important;
    color: rgba(255,255,255,0.65) !important;
    text-decoration: none !important;
    border-radius: var(--radius-sm) !important;
    transition: all 0.25s !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    margin-bottom: 2px !important;
    gap: 12px !important;
}
.nav-link i {
    width: 20px !important;
    text-align: center !important;
    font-size: 1rem !important;
    color: rgba(255,255,255,0.4) !important;
}
.nav-link:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    transform: translateX(4px) !important;
}
.nav-link:hover i { color: #a78bfa !important; }
.nav-link.active {
    background: linear-gradient(135deg, rgba(108,60,233,0.4), rgba(139,92,246,0.3)) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(108,60,233,0.3) !important;
}
.nav-link.active i { color: #c4b5fd !important; }

/* ===== MAIN CONTAINER ===== */
.main-container {
    flex: 1 !important;
    margin-left: var(--sidebar-width) !important;
    padding: 1.5rem 2rem !important;
    transition: all 0.3s !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
    background: linear-gradient(135deg, #ffffff, #f8f9ff) !important;
    padding: 1rem 1.5rem !important;
    border-radius: var(--radius) !important;
    border: 1px solid rgba(108,60,233,0.1) !important;
    box-shadow: 0 4px 20px rgba(108,60,233,0.06) !important;
}
.top-brand { display: flex !important; align-items: center !important; gap: 12px !important; }
.top-brand .brand-icon {
    width: 38px !important; height: 38px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 1.1rem !important; color: #fff !important; flex-shrink: 0 !important;
    box-shadow: 0 4px 15px rgba(108,60,233,0.25) !important;
}
.top-brand h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
}

/* ===== HAMBURGER — top right ===== */
.hamburger {
    display: none !important;
    width: 42px !important;
    height: 42px !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, rgba(108, 60, 233, 0.08), rgba(139, 92, 246, 0.06)) !important;
    border: 1px solid rgba(108, 60, 233, 0.2) !important;
    border-radius: 12px !important;
    position: relative !important;
    z-index: 1100 !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s !important;
}
.hamburger:hover {
    background: linear-gradient(135deg, rgba(108, 60, 233, 0.15), rgba(139, 92, 246, 0.1)) !important;
    border-color: rgba(108, 60, 233, 0.35) !important;
    box-shadow: 0 4px 12px rgba(108, 60, 233, 0.15) !important;
}
.hamburger span {
    display: block !important;
    width: 20px !important;
    height: 2px !important;
    background: var(--primary) !important;
    border-radius: 4px !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    transition: all 0.3s !important;
}
.hamburger span:nth-child(1) { top: 13px !important; }
.hamburger span:nth-child(2) { top: 50% !important; transform: translate(-50%, -50%) !important; }
.hamburger span:nth-child(3) { bottom: 13px !important; }
.hamburger.active span:nth-child(1) { top: 50% !important; transform: translate(-50%, -50%) rotate(45deg) !important; }
.hamburger.active span:nth-child(2) { opacity: 0 !important; transform: translate(-50%, -50%) scaleX(0) !important; }
.hamburger.active span:nth-child(3) { top: 50% !important; transform: translate(-50%, -50%) rotate(-45deg) !important; }

/* ===== MENU OVERLAY ===== */
.menu-overlay {
    position: fixed !important;
    top: 0; left: 0;
    width: 100% !important; height: 100% !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(6px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: 0.3s !important;
    z-index: 998 !important;
}
.menu-overlay.active { opacity: 1 !important; visibility: visible !important; }

/* ===== WELCOME STRIP ===== */
.welcome-strip {
    color: var(--text-dark) !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 1.5rem !important;
}
.welcome-strip i { color: var(--primary) !important; }
.welcome-strip span { color: var(--primary) !important; font-weight: 800 !important; }

/* ===== BOX / CARDS ===== */
.box {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: var(--radius) !important;
    border: 1px solid rgba(108,60,233,0.08) !important;
    box-shadow: 0 8px 32px rgba(108,60,233,0.08) !important;
    transition: all 0.4s ease !important;
    min-width: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}
.box::before {
    content: '' !important;
    position: absolute !important;
    top: 0; left: 0; right: 0;
    height: 3px !important;
    background: linear-gradient(90deg, #6c3ce9, #8b5cf6, #a78bfa) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
.box-title {
    margin-bottom: 1.5rem !important;
    font-size: 1.3rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: var(--text-dark) !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
}
.box-title i { color: var(--primary) !important; font-size: 1.2rem !important; }

/* ===== STAT CARDS ===== */
.dashboard-stats {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
}
.stat-card {
    background: #ffffff !important;
    padding: 1.8rem !important;
    border-radius: var(--radius) !important;
    border: 1px solid rgba(108,60,233,0.08) !important;
    box-shadow: 0 4px 20px rgba(108,60,233,0.06) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    min-width: 0 !important;
}
.stat-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 30px rgba(108,60,233,0.12) !important;
}
.stat-card .sc-icon {
    width: 60px !important; height: 60px !important;
    border-radius: 14px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 1.6rem !important;
    flex-shrink: 0 !important;
}
.stat-card .sc-icon.purple { background: linear-gradient(135deg, rgba(108,60,233,0.12), rgba(139,92,246,0.08)) !important; color: var(--primary) !important; }
.stat-card .sc-icon.green { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06)) !important; color: var(--success) !important; }
.stat-card .sc-icon.orange { background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.06)) !important; color: var(--warning) !important; }
.stat-card .sc-icon.blue { background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.06)) !important; color: #3b82f6 !important; }
.stat-card .sc-content { min-width: 0 !important; flex: 1 !important; }
.stat-card h4 { font-size: 0.8rem !important; color: var(--text-muted) !important; text-transform: uppercase !important; letter-spacing: 1px !important; font-weight: 700 !important; margin-bottom: 6px !important; }
.stat-card .value { font-size: 1.8rem !important; font-weight: 800 !important; color: var(--text-dark) !important; letter-spacing: -0.5px !important; overflow-wrap: break-word !important; }

/* ===== QUICK ACTION CARDS ===== */
.quick-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
    margin-bottom: 1.5rem !important;
}
.quick-card {
    background: #ffffff !important;
    border-radius: var(--radius) !important;
    padding: 1.2rem 1rem !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(108,60,233,0.06) !important;
    border: 1px solid rgba(108,60,233,0.08) !important;
}
.quick-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(108,60,233,0.12) !important;
}
.quick-card .qc-icon {
    width: 44px !important; height: 44px !important;
    border-radius: 12px !important;
    margin: 0 auto 10px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    font-size: 1.15rem !important;
}
.quick-card .qc-icon.purple { background: linear-gradient(135deg, rgba(108,60,233,0.12), rgba(139,92,246,0.08)) !important; color: var(--primary) !important; }
.quick-card .qc-icon.green { background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(16,185,129,0.06)) !important; color: var(--success) !important; }
.quick-card .qc-icon.orange { background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.06)) !important; color: var(--warning) !important; }
.quick-card .qc-icon.blue { background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(59,130,246,0.06)) !important; color: #3b82f6 !important; }
.quick-card .qc-label { font-size: 0.75rem !important; font-weight: 700 !important; color: var(--text-dark) !important; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.5rem !important; }
.form-group label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    letter-spacing: 0.3px !important;
}
.form-control {
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    background: #f8fafc !important;
    border: 2px solid rgba(0,0,0,0.06) !important;
    border-radius: 14px !important;
    color: var(--text-dark) !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
}
.form-control:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(108,60,233,0.1) !important;
    background: #fff !important;
}

/* ===== BUTTONS ===== */
.btn-order, .btn-primary {
    background: linear-gradient(135deg, #6c3ce9, #8b5cf6) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    padding: 0.85rem 2rem !important;
    box-shadow: 0 6px 20px rgba(108,60,233,0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}
.btn-order:hover, .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(108,60,233,0.4) !important;
}

/* ===== SELECT2 ===== */
.select2-container--default .select2-selection--single {
    border: 2px solid rgba(0,0,0,0.06) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    height: 48px !important;
    padding: 0 2.5rem 0 1rem !important;
    display: flex !important;
    align-items: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-dark) !important;
    font-weight: 600 !important;
    line-height: normal !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 10px !important;
}
.select2-container { width: 100% !important; max-width: 100% !important; }
.select2-dropdown { background: #ffffff !important; border: 1px solid rgba(0,0,0,0.08) !important; border-radius: 20px !important; box-shadow: 0 25px 80px rgba(0,0,0,0.2) !important; }
.select2-results__option { padding: 10px 14px !important; font-size: 14px !important; color: #1e293b !important; border-bottom: 1px solid #f1f5f9 !important; }
.select2-results__option--highlighted[aria-selected] { background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%) !important; color: white !important; border-radius: 8px !important; margin: 1px 3px !important; }
.select2-results__options { max-height: 375px !important; padding: 4px !important; }
.select2-results__options::-webkit-scrollbar { width: 5px !important; }
.select2-results__options::-webkit-scrollbar-thumb { background: rgba(92,0,255,0.2) !important; border-radius: 10px !important; }
.select2-search--dropdown { padding: 12px 16px !important; background: #f8fafc !important; border-bottom: 1px solid #e2e8f0 !important; }
.select2-search__field { border-radius: 12px !important; border: 2px solid rgba(92,0,255,0.1) !important; background: #fff !important; color: #1e293b !important; padding: 11px 16px !important; font-size: 14px !important; font-weight: 600 !important; }
.select2-search__field::placeholder { color: #94a3b8 !important; }
.select2-search__field:focus { border-color: #5c00ff !important; box-shadow: 0 0 0 3px rgba(92,0,255,0.1) !important; outline: none !important; }
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(108,60,233,0.1) !important;
}
.select2-dropdown {
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12) !important;
    overflow: hidden !important;
}
.select2-results__option--highlighted {
    background: rgba(108,60,233,0.08) !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
}
.select2-results__option[aria-selected="true"] {
    background: rgba(108,60,233,0.15) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

/* ===== TABLES ===== */
.table-responsive { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
table { width: 100% !important; border-collapse: separate !important; border-spacing: 0 !important; }
th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 0.8rem 1rem !important;
    border-bottom: 2px solid rgba(0,0,0,0.06) !important;
    text-align: left !important;
}
td {
    padding: 0.8rem 1rem !important;
    color: var(--text-body) !important;
    font-size: 0.85rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.04) !important;
}
tr:hover td { background: rgba(108,60,233,0.02) !important; }

/* ===== BADGES ===== */
.badge { padding: 4px 10px !important; border-radius: 8px !important; font-size: 0.7rem !important; font-weight: 700 !important; }
.badge-success { background: rgba(16,185,129,0.1) !important; color: #10b981 !important; }
.badge-danger { background: rgba(239,68,68,0.1) !important; color: #ef4444 !important; }
.badge-warning { background: rgba(245,158,11,0.1) !important; color: #f59e0b !important; }
.badge-info { background: rgba(59,130,246,0.1) !important; color: #3b82f6 !important; }

/* ===== RECOMMENDED SECTION ===== */
.rec-section {
    background: linear-gradient(135deg, rgba(251,146,60,0.06), rgba(249,115,22,0.03)) !important;
    border: 1.5px solid rgba(251,146,60,0.15) !important;
    border-radius: 20px !important;
    padding: 1.5rem !important;
}
.rec-title { color: var(--text-dark) !important; font-weight: 800 !important; }
.rec-card {
    background: #fff !important;
    border: 1.5px solid rgba(251,146,60,0.12) !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
}
.rec-card:hover { transform: translateY(-3px) !important; border-color: #f97316 !important; box-shadow: 0 8px 24px rgba(249,115,22,0.15) !important; }
.rec-card-name { color: var(--text-dark) !important; }
.rec-order-btn { background: linear-gradient(135deg, #fb923c, #f97316) !important; box-shadow: 0 4px 12px rgba(249,115,22,0.25) !important; }

/* ===== CHAT / TICKETS ===== */
.chat-messages { background: #f8fafc !important; border-radius: 16px !important; border: 1px solid rgba(0,0,0,0.06) !important; }
.message-bubble { border-radius: 16px !important; padding: 0.8rem 1rem !important; max-width: 75% !important; box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important; }
.chat-input input {
    border: 2px solid rgba(0,0,0,0.06) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    padding: 0.8rem 1rem !important;
}

/* ===== FILTER BAR ===== */
.filter-bar { gap: 8px !important; }
.filter-pill {
    background: rgba(108,60,233,0.06) !important;
    border: 1.5px solid rgba(108,60,233,0.12) !important;
    color: var(--primary) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    padding: 6px 14px !important;
    cursor: pointer !important;
    transition: all 0.25s !important;
}
.filter-pill:hover, .filter-pill.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(108,60,233,0.2) !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(108,60,233,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(108,60,233,0.25); }

/* ===== DARK MODE — same gradient, darker sidebar ===== */
body.dark-mode {
    background: linear-gradient(180deg, #3a0890 0%, #7a0a6e 50%, #b30050 100%) !important;
    background-attachment: fixed !important;
}
body.dark-mode .sidebar {
    background: linear-gradient(180deg, #1e1145 0%, #2d1b69 40%, #3b2380 100%) !important;
}
body.dark-mode .sidebar-header {
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
body.dark-mode .sidebar-header .logo {
    color: #fff !important;
}
body.dark-mode .nav-link {
    color: rgba(255,255,255,0.65) !important;
}
body.dark-mode .nav-link i {
    color: rgba(255,255,255,0.4) !important;
}
body.dark-mode .nav-link:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}
body.dark-mode .nav-link:hover i { color: #a78bfa !important; }
body.dark-mode .nav-link.active {
    background: linear-gradient(135deg, rgba(108,60,233,0.4), rgba(139,92,246,0.3)) !important;
    color: #fff !important;
}
body.dark-mode .nav-link.active i { color: #c4b5fd !important; }
body.dark-mode .top-bar {
    background: rgba(255,255,255,0.95) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}
body.dark-mode .box {
    background: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3) !important;
}
body.dark-mode .stat-card {
    background: #ffffff !important;
}
body.dark-mode .stat-card h4 { color: #64748b !important; }
body.dark-mode .stat-card .value { color: #1e293b !important; }
body.dark-mode .quick-card {
    background: #ffffff !important;
}
body.dark-mode .quick-card .qc-label { color: #1e293b !important; }
body.dark-mode .form-control {
    background: #f8fafc !important;
    border-color: rgba(0,0,0,0.08) !important;
    color: #1e293b !important;
}
body.dark-mode label { color: #475569 !important; }
body.dark-mode .welcome-strip { color: #ffffff !important; }
body.dark-mode .welcome-strip i { color: #00d2ff !important; }
body.dark-mode .welcome-strip span { color: #00d2ff !important; }
body.dark-mode .box-title { color: #1e293b !important; }
body.dark-mode th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
    color: #475569 !important;
}
body.dark-mode td { color: #334155 !important; }
body.dark-mode .select2-container--default .select2-selection--single {
    background: #f8fafc !important;
}
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
}
body.dark-mode .rec-section { background: rgba(255,255,255,0.95) !important; }
body.dark-mode .rec-card { background: #ffffff !important; }
body.dark-mode .rec-card-name { color: #1e293b !important; }
@media (max-width: 1024px) {
    .sidebar { transform: translate3d(-100%, 0, 0) !important; width: 260px !important; }
    .sidebar.active { transform: translate3d(0, 0, 0) !important; }
    .main-container { margin-left: 0 !important; padding: 1rem !important; }
    .hamburger { display: flex !important; }
}
.menu-overlay.active { opacity: 1 !important; visibility: visible !important; }

@media (max-width: 768px) {
    .main-container { padding: 0.8rem !important; }
    .top-bar { padding: 0.7rem 1rem !important; border-radius: var(--radius-sm) !important; margin-bottom: 1rem !important; }
    .top-brand h3 { font-size: 1rem !important; }
    .stat-card { padding: 1rem !important; border-radius: var(--radius-sm) !important; }
    .stat-card .value { font-size: 1.2rem !important; }
    .quick-grid { grid-template-columns: 1fr 1fr !important; gap: 0.6rem !important; }
    .box { padding: 1.2rem !important; }
    .box-title { font-size: 1.1rem !important; }
    .form-control { padding: 0.7rem 0.8rem !important; font-size: 0.9rem !important; }
    .btn-order, .btn-primary { padding: 0.7rem 1.5rem !important; }
    .welcome-strip { font-size: 0.92rem !important; color: #1e293b !important; display: flex !important; align-items: center !important; gap: 8px !important; }
    .welcome-strip i { color: #00d2ff !important; }
    .welcome-strip span { color: #00d2ff !important; font-weight: 700 !important; }
    table { min-width: 500px !important; }
    th, td { padding: 0.6rem 0.7rem !important; font-size: 0.75rem !important; }
    .chat-messages { height: 50vh !important; }
    .chat-input { flex-direction: column !important; }
    .chat-input input { width: 100% !important; }
    .chat-input button { width: 100% !important; }
    .filter-bar { overflow-x: auto !important; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch !important; }
    .filter-bar::-webkit-scrollbar { height: 0 !important; }
}

@media (max-width: 480px) {
    .main-container { padding: 0.6rem !important; }
    .top-bar { padding: 0.6rem 0.8rem !important; }
    .quick-grid { grid-template-columns: 1fr !important; }
    .box { padding: 1rem !important; }
    .sidebar { width: 250px !important; }
}
