/* =====================================================
   AFRO DÉLICES - Design System
   Application de gestion aux couleurs africaines
   ===================================================== */

/* =====================================================
   CSS Variables & Design Tokens
   ===================================================== */
:root {
    /* Primary Colors - African Spice Palette */
    --color-primary: #E07B39;
    --color-primary-light: #F4A574;
    --color-primary-dark: #C45E1A;

    /* Secondary - Baobab Green */
    --color-secondary: #2D5A27;
    --color-secondary-light: #4A7D43;
    --color-secondary-dark: #1A3A17;

    /* Accent - African Gold */
    --color-accent: #D4A84B;
    --color-accent-light: #E8C97A;
    --color-accent-dark: #B08A2E;

    /* Neutrals - Earth Tones */
    --color-bg-dark: #1A1410;
    --color-bg-card: #241C16;
    --color-bg-elevated: #2E241C;
    --color-bg-light: #F5F0E8;
    --color-bg-sand: #EDE5D8;

    /* Text Colors */
    --color-text-primary: #F5F0E8;
    --color-text-secondary: #B8A99A;
    --color-text-muted: #7A6A5A;
    --color-text-dark: #2C2416;

    /* Status Colors */
    --color-success: #4CAF50;
    --color-warning: #FF9800;
    --color-error: #F44336;
    --color-info: #2196F3;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(224, 123, 57, 0.3);

    /* Typography */
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --bottom-nav-height: 70px;
}

/* =====================================================
   Reset & Base Styles
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

.hidden {
    display: none !important;
}

/* =====================================================
   Splash Screen
   ===================================================== */
.splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, #2A1F18 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
}

.splash-logo {
    font-size: 5rem;
    margin-bottom: var(--space-lg);
    animation: pulse 2s ease-in-out infinite;
}

.splash-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-xl);
}

.splash-loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--color-bg-elevated);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   App Container & Layout
   ===================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* =====================================================
   Sidebar
   ===================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-bg-card);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.nav-item {
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-icon {
    font-size: 1.25rem;
}

.nav-label {
    font-weight: 500;
}

.sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.user-role {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* =====================================================
   Main Content
   ===================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =====================================================
   Header
   ===================================================== */
.header {
    height: var(--header-height);
    background: var(--color-bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    gap: var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--color-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--color-bg-dark);
    transform: scale(1.05);
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--color-bg-dark);
}

/* =====================================================
   Pages Container
   ===================================================== */
.pages-container {
    flex: 1;
    padding: var(--space-xl);
    overflow-y: auto;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   Stats Grid (Dashboard)
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.stat-orders::before {
    background: var(--color-primary);
}

.stat-card.stat-revenue::before {
    background: var(--color-accent);
}

.stat-card.stat-pending::before {
    background: var(--color-warning);
}

.stat-card.stat-clients::before {
    background: var(--color-secondary);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--color-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.stat-trend {
    font-size: 0.875rem;
    font-weight: 600;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.stat-trend.up {
    background: rgba(76, 175, 80, 0.15);
    color: var(--color-success);
}

.stat-trend.down {
    background: rgba(244, 67, 54, 0.15);
    color: var(--color-error);
}

/* =====================================================
   Dashboard Grid
   ===================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
}

/* =====================================================
   Cards
   ===================================================== */
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-link {
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.card-link:hover {
    color: var(--color-primary-light);
}

.card-body {
    padding: var(--space-lg);
}

/* =====================================================
   Filters Bar
   ===================================================== */
.filters-bar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    flex: 1;
    max-width: 400px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--color-text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--color-text-muted);
}

.filter-chips {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.chip {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-secondary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.chip:hover {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}

.chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* =====================================================
   Data Lists
   ===================================================== */
.data-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* Order Item */
.order-item {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.order-item:hover {
    background: var(--color-bg-elevated);
    transform: translateX(4px);
}

.order-status {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
}

.order-status.pending {
    background: var(--color-warning);
}

.order-status.preparing {
    background: var(--color-info);
}

.order-status.ready {
    background: var(--color-primary);
}

.order-status.delivered {
    background: var(--color-success);
}

.order-info {
    flex: 1;
}

.order-id {
    font-weight: 600;
    color: var(--color-text-primary);
}

.order-client {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.order-meta {
    text-align: right;
}

.order-total {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 1.125rem;
}

.order-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Client Card */
.client-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
}

.client-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.client-name {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.client-contact {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.client-balance {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(212, 168, 75, 0.15);
    color: var(--color-accent);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Product Card */
.product-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-image {
    height: 120px;
    background: linear-gradient(135deg, var(--color-bg-elevated) 0%, var(--color-bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-content {
    padding: var(--space-lg);
}

.product-name {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.product-category {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.product-stock {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.product-stock.low {
    color: var(--color-error);
}

/* =====================================================
   Bottom Navigation (Mobile)
   ===================================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--color-bg-card);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0 var(--space-md);
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.bottom-nav-item.active {
    color: var(--color-primary);
}

.bottom-nav-icon {
    font-size: 1.5rem;
}

.bottom-nav-label {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bottom-nav-fab {
    position: relative;
    top: -20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-glow);
    color: white;
}

.bottom-nav-fab .bottom-nav-icon {
    font-size: 1.75rem;
}

/* =====================================================
   Modal
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-error);
    color: white;
}

.modal-body {
    padding: var(--space-lg);
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =====================================================
   Form Elements
   ===================================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(224, 123, 57, 0.15);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B8A99A' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-color: var(--color-success);
}

.toast.error {
    border-color: var(--color-error);
}

.toast.warning {
    border-color: var(--color-warning);
}

.toast.info {
    border-color: var(--color-info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =====================================================
   Empty State
   ===================================================== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

/* =====================================================
   Loading Skeleton
   ===================================================== */
.skeleton {
    background: linear-gradient(90deg,
            var(--color-bg-elevated) 25%,
            var(--color-bg-card) 50%,
            var(--color-bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding-bottom: var(--bottom-nav-height);
    }

    .menu-toggle {
        display: flex;
    }

    .bottom-nav {
        display: flex;
    }

    .header {
        padding: 0 var(--space-md);
    }

    .pages-container {
        padding: var(--space-md);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-text {
        display: none;
    }

    .btn-primary {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .filter-chips {
        overflow-x: auto;
        padding-bottom: var(--space-sm);
    }
}