/* ============================================
   PHARMACIE WEB CLIENT - STYLES PRINCIPAUX
   Design épuré, moderne et professionnel
   ============================================ */

/* Import Google Fonts - Inter pour un look moderne */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Font Awesome Icons styling */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item i,
.service-icon i,
.stat-icon i,
.step-icon i,
.empty-icon i {
    font-style: normal;
}

/* CSS Variables */
:root {
    /* Couleurs principales - Palette Teal raffinée */
    --primary: #0D9488;
    --primary-dark: #0F766E;
    --primary-light: #5EEAD4;
    --primary-50: #F0FDFA;
    --primary-100: #CCFBF1;
    --secondary: #14B8A6;
    --secondary-light: #99F6E4;

    /* Backgrounds - Plus doux et épurés */
    --bg-main: #F8FAFB;
    --bg-white: #FFFFFF;
    --bg-grey: #F1F5F9;
    --bg-card: #FFFFFF;
    --bg-subtle: #FAFCFD;
    --teal-50: #F0FDFA;

    /* Textes - Hiérarchie claire */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;

    /* États - Couleurs harmonieuses */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Paiements */
    --mtn-yellow: #FFCC00;
    --moov-blue: #0066B3;
    --orange-money: #FF6600;

    /* Ombres - Plus subtiles et élégantes */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
    --shadow-inner: inset 0 2px 4px 0 rgba(0,0,0,0.04);
    --shadow-primary: 0 4px 14px rgba(13, 148, 136, 0.25);

    /* Bordures - Plus fines et subtiles */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --border-radius: 10px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;

    /* Transitions - Fluides */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing system */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 15px;
    letter-spacing: -0.01em;
    padding-top: 64px; /* Compenser le header fixe */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

input, textarea, select {
    font-family: inherit;
    outline: none;
    font-size: inherit;
}

/* Focus states accessibles */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection styling */
::selection {
    background: var(--primary-100);
    color: var(--primary-dark);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0 var(--space-6);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-white);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--text-white);
    opacity: 0.9;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--text-white);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: var(--space-2);
}

.nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.9rem;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: var(--text-white);
}

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

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.12);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.notification-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(255,255,255,0.12);
    border-radius: var(--border-radius);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    background: rgba(255,255,255,0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.25);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-white);
    font-size: 1.25rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 100;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    background: rgba(255,255,255,0.25);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 50%, #065F46 100%);
    padding: 100px var(--space-6) 120px;
    text-align: center;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    margin-top: -64px; /* Compenser le padding-top du body pour que le hero commence directement sous le header */
    padding-top: 164px; /* 100px + 64px pour compenser le margin négatif */
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 800;
    margin-bottom: var(--space-5);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: var(--space-10);
    line-height: 1.7;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    display: flex;
    gap: 0;
    max-width: 560px;
    margin: 0 auto;
    background: var(--text-white);
    padding: 6px;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.hero-search input {
    flex: 1;
    padding: var(--space-4) var(--space-5);
    border: none;
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
    color: var(--text-primary);
    background: transparent;
}

.hero-search input::placeholder {
    color: var(--text-light);
}

.hero-search button {
    padding: var(--space-4) var(--space-6);
    background: var(--primary);
    color: var(--text-white);
    border-radius: calc(var(--border-radius-xl) - 4px);
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

.hero-search button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ============================================
   SERVICES SECTION (4 Cards)
   ============================================ */
.services {
    padding: 80px var(--space-6);
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: var(--space-8) var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-5);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   COMMENT ÇA MARCHE (3 Étapes)
   ============================================ */
.how-it-works {
    padding: 80px var(--space-6);
    background: var(--primary-50);
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 48px;
    left: 22%;
    right: 22%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 0;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 280px;
}

.step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-5);
    background: var(--primary);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    box-shadow: 0 0 0 6px var(--primary-50), var(--shadow-primary);
}

.step-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto var(--space-5);
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
    color: var(--text-white);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: var(--text-white);
}

.btn-success:hover {
    background: #059669;
    color: var(--text-white);
}

.btn-warning {
    background: var(--warning);
    color: var(--text-white);
}

.btn-warning:hover {
    background: #D97706;
    color: var(--text-white);
}

.btn-danger {
    background: var(--error);
    color: var(--text-white);
}

.btn-danger:hover {
    background: #DC2626;
    color: var(--text-white);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.85rem;
    border-radius: var(--border-radius-sm);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-white);
    padding: var(--space-5) var(--space-6);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

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

.card-footer {
    padding: var(--space-4) var(--space-6);
    background: var(--bg-grey);
    border-top: 1px solid var(--border-light);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.08);
}

.form-control::placeholder {
    color: var(--text-light);
}

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

.form-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: var(--space-1);
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    border-right: none;
}

.input-group .form-control:focus {
    border-right: 1px solid var(--primary);
}

.input-group .btn {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    background: var(--bg-grey);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-prefix + .form-control {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

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

select.form-control {
    cursor: pointer;
    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='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============================================
   ALERTS / TOASTS
   ============================================ */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.9rem;
}

.alert-success {
    background: var(--success-light);
    color: #047857;
    border: 1px solid #A7F3D0;
}

.alert-warning {
    background: var(--warning-light);
    color: #B45309;
    border: 1px solid #FDE68A;
}

.alert-error {
    background: var(--error-light);
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.alert-info {
    background: var(--info-light);
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: var(--space-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 280px;
    max-width: 400px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge i {
    font-size: 0.7rem;
}

.badge-pending {
    background: var(--warning-light);
    color: #B45309;
}

.badge-progress {
    background: var(--info-light);
    color: #1D4ED8;
}

.badge-paid {
    background: var(--success-light);
    color: #047857;
}

.badge-preparing {
    background: #F3E8FF;
    color: #7C3AED;
}

.badge-delivered {
    background: var(--success-light);
    color: #065F46;
}

.badge-cancelled {
    background: var(--error-light);
    color: #B91C1C;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--bg-grey);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.table td {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: var(--primary-50);
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: var(--space-6);
}

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

.modal {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 1.25rem;
}

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

.modal-body {
    padding: var(--space-6);
}

.modal-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    background: var(--bg-grey);
}

/* ============================================
   LOADING STATES
   ============================================ */
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--bg-grey) 25%, var(--border-color) 50%, var(--bg-grey) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius);
}

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

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #0F172A;
    color: var(--text-white);
    padding: 64px var(--space-6) 32px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-10);
}

.footer-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-5);
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-section ul li {
    margin-bottom: var(--space-3);
}

.footer-section li {
    font-size: 0.9rem;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.footer-section li i {
    width: 16px;
    color: var(--primary-light);
}

.footer-section a {
    color: #94A3B8;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    max-width: 1200px;
    margin: var(--space-10) auto 0;
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    color: #64748B;
    font-size: 0.85rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-light { color: var(--text-light) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mt-1 { margin-top: var(--space-2); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }
.mb-1 { margin-bottom: var(--space-2); }
.mb-2 { margin-bottom: var(--space-4); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }

.p-1 { padding: var(--space-2); }
.p-2 { padding: var(--space-4); }
.p-3 { padding: var(--space-6); }
.p-4 { padding: var(--space-8); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-2); }
.gap-2 { gap: var(--space-4); }
.gap-3 { gap: var(--space-6); }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-full { border-radius: var(--border-radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }

.transition { transition: var(--transition); }

/* Filter buttons */
.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

/* ============================================
   RESPONSIVE DESIGN - COMPREHENSIVE
   ============================================ */

/* === LARGE TABLETS & SMALL DESKTOPS (1024px) === */
@media (max-width: 1024px) {
    /* Mobile menu button - visible at 1024px */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }

    /* Footer */
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }

    /* Hero adjustments */
    .hero {
        padding: 80px var(--space-5) 100px;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    /* Steps container */
    .steps-container {
        gap: var(--space-6);
    }

    .steps-container::before {
        left: 18%;
        right: 18%;
    }

    /* Main content padding */
    .main-content {
        padding: var(--space-6);
    }

    /* Page header */
    .page-header {
        margin-bottom: var(--space-6);
    }
}

/* Quick Actions Mobile - Hidden by default on desktop */
.quick-actions-mobile {
    display: none;
}

/* === TABLETS (768px) === */
@media (max-width: 768px) {
    /* Header - Fixed on mobile */
    .header {
        padding: 0 var(--space-4);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .header-container {
        height: 60px;
    }

    /* Adjust logo and icons colors for white background */
    .logo {
        color: var(--primary);
    }
    .logo:hover {
        color: var(--primary-dark);
    }

    .notification-btn {
        background: var(--bg-grey);
        color: var(--text-primary);
    }
    .notification-btn:hover {
        background: var(--border-color);
    }

    .user-menu {
        background: var(--bg-grey);
        color: var(--text-primary);
    }
    .user-menu:hover {
        background: var(--border-color);
    }

    .user-avatar {
        background: var(--primary);
        color: var(--text-white);
    }

    .mobile-menu-btn {
        background: var(--bg-grey);
        color: var(--text-primary);
        width: 40px;
        height: 40px;
        border-radius: var(--border-radius);
    }
    .mobile-menu-btn:hover {
        background: var(--border-color);
    }

    /* Add padding to body to compensate for fixed header */
    body {
        padding-top: 60px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Logo */
    .logo {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    /* Header actions - hide labels on tablet */
    .header-actions .btn span {
        display: none;
    }

    .header-actions .btn {
        padding: var(--space-2) var(--space-3);
    }

    .user-name {
        display: none;
    }

    /* Page Header - Hidden on mobile/tablet */
    .page-header {
        display: none !important;
    }

    /* Quick Actions Mobile - Show on tablet/mobile */
    .quick-actions-desktop {
        display: none !important;
    }

    .quick-actions-mobile {
        display: block !important;
    }

    /* Hero Section */
    .hero {
        padding: 60px var(--space-4) 80px;
    }

    .hero::before,
    .hero::after {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: var(--space-8);
    }

    .hero-search {
        flex-direction: column;
        border-radius: var(--border-radius-lg);
        padding: var(--space-2);
        gap: var(--space-2);
    }

    .hero-search input {
        padding: var(--space-4);
        text-align: center;
    }

    .hero-search button {
        width: 100%;
        justify-content: center;
        padding: var(--space-4);
        border-radius: var(--border-radius);
    }

    /* Services Grid - 1 column */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .service-card {
        padding: var(--space-6) var(--space-5);
    }

    .service-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    /* How It Works */
    .how-it-works {
        padding: 60px var(--space-4);
    }

    .steps-container {
        flex-direction: column;
        gap: var(--space-6);
    }

    .steps-container::before {
        display: none;
    }

    .step {
        max-width: 100%;
    }

    .step-icon {
        width: 72px;
        height: 72px;
        font-size: 1.75rem;
    }

    /* Section Title */
    .section-title {
        margin-bottom: var(--space-8);
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .section-title p {
        font-size: 0.95rem;
    }

    /* Services section */
    .services {
        padding: 60px var(--space-4);
    }

    /* Footer */
    .footer {
        padding: 48px var(--space-4) 24px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-8);
    }

    .footer-section h4 {
        justify-content: center;
    }

    .footer-section li {
        justify-content: center;
    }

    /* Dashboard Layout */
    .dashboard {
        flex-direction: column;
        min-height: auto;
    }

    .main-content {
        padding: var(--space-5);
        min-height: calc(100vh - 60px);
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .page-title h1 {
        font-size: 1.25rem;
    }

    .page-title h1 i {
        font-size: 1.1rem;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .stat-card {
        padding: var(--space-5);
    }

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

    /* Cards */
    .card-body {
        padding: var(--space-5);
    }

    .card-header {
        padding: var(--space-4) var(--space-5);
    }

    /* Tables - Horizontal scroll */
    .table-container {
        margin: 0 calc(var(--space-5) * -1);
        padding: 0 var(--space-5);
    }

    .table th, .table td {
        padding: var(--space-3);
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Modal */
    .modal-overlay {
        padding: var(--space-4);
        align-items: flex-end;
    }

    .modal {
        max-width: 100%;
        max-height: 85vh;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }

    .modal-header {
        padding: var(--space-4) var(--space-5);
    }

    .modal-body {
        padding: var(--space-5);
    }

    .modal-footer {
        padding: var(--space-4) var(--space-5);
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Payment Methods */
    .payment-methods {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }

    .payment-method {
        padding: var(--space-4);
        display: flex;
        align-items: center;
        gap: var(--space-4);
        text-align: left;
    }

    .payment-method .method-icon {
        width: 48px;
        height: 48px;
        margin: 0;
        font-size: 1.25rem;
    }

    /* Toast */
    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
        top: 70px;
    }

    .toast {
        width: 100%;
        max-width: none;
        min-width: auto;
    }

    /* Auth Pages */
    .auth-page {
        padding: var(--space-4);
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-header {
        padding: var(--space-8) var(--space-5) var(--space-5);
    }

    .auth-body {
        padding: var(--space-2) var(--space-5) var(--space-6);
    }

    .auth-footer {
        padding: var(--space-4) var(--space-5);
    }

    /* Buttons */
    .btn {
        padding: var(--space-3) var(--space-4);
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: var(--space-4) var(--space-6);
    }

    /* Input Group */
    .input-group {
        flex-direction: column;
    }

    .input-group .form-control {
        border-radius: var(--border-radius);
        border-right: 1px solid var(--border-color);
    }

    .input-group .btn {
        border-radius: var(--border-radius);
        width: 100%;
    }

    /* Filter buttons wrap */
    .filter-btn {
        font-size: 0.8rem;
        padding: var(--space-2) var(--space-3);
    }

    /* Empty State */
    .empty-state {
        padding: var(--space-10) var(--space-4);
    }

    .empty-state .empty-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    /* Quick Actions Mobile Grid - 4 columns on tablet */
    .quick-actions-mobile .section-label {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: var(--space-4);
        display: flex;
        align-items: center;
        gap: var(--space-2);
    }

    .quick-actions-mobile .section-label i {
        color: var(--primary);
    }

    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
    }

    .quick-action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        transition: transform 0.2s ease;
    }

    .quick-action-item:active {
        transform: scale(0.95);
    }

    .quick-action-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
        margin-bottom: var(--space-2);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .quick-action-item span {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--text-secondary);
        text-align: center;
    }

    /* Stats Grid - 2x2 on tablet - same size as quick actions */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-3);
    }

    .stat-card {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: var(--space-3);
        min-height: 100px;
        justify-content: center;
    }

    .stat-card .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        margin-bottom: var(--space-2);
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 2px;
        line-height: 1;
    }

    .stat-card .stat-label {
        font-size: 0.68rem;
        color: var(--text-muted);
        text-transform: uppercase;
    }
}

/* === MOBILE PHONES (576px) === */
@media (max-width: 576px) {
    /* Stats Grid - keep 2x2 on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Hero */
    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    /* Flex utilities on mobile */
    .flex-between {
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    /* Buttons full width on mobile */
    .btn-block-mobile {
        width: 100%;
    }

    /* Card actions */
    .card .flex.gap-1 {
        flex-direction: column;
    }

    .card .flex.gap-1 .btn {
        width: 100%;
    }

    /* Auth logo smaller */
    .auth-logo {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .auth-header h1 {
        font-size: 1.2rem;
    }
}

/* === SMALL MOBILE PHONES (480px) === */
@media (max-width: 480px) {
    /* Header */
    .header {
        padding: 0 var(--space-3);
    }

    .header-container {
        height: 56px;
    }

    .logo span {
        display: none;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    /* Body padding for fixed header */
    body {
        padding-top: 56px;
    }

    /* Hero */
    .hero {
        padding: 40px var(--space-3) 60px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    /* Main Content - App style */
    .main-content {
        padding: var(--space-4);
        background: var(--bg-main);
    }

    /* Page Header - Hidden on mobile for dashboard (480px and below) */
    .page-header {
        display: none !important;
    }

    /* Stats Grid - 2x2 Grid App Style - Compact */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-3);
        border-radius: var(--border-radius-lg);
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-sm);
        min-height: 100px;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: var(--space-2);
        border-radius: var(--border-radius);
    }

    .stat-card .stat-value {
        font-size: 1.25rem;
        font-weight: 700;
        margin-bottom: 2px;
        line-height: 1;
    }

    .stat-card .stat-label {
        font-size: 0.65rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    /* Quick Actions - 2x2 Grid App Style */
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--space-3) !important;
    }

    .service-card {
        padding: var(--space-4) !important;
        border-radius: var(--border-radius-lg) !important;
        text-align: center;
        box-shadow: var(--shadow-sm);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .service-card:active {
        transform: scale(0.97);
    }

    .service-card .service-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.4rem !important;
        margin: 0 auto var(--space-3) !important;
        border-radius: var(--border-radius) !important;
    }

    .service-card h3 {
        font-size: 0.85rem !important;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.3;
    }

    /* Cards - App style rounded */
    .card {
        border-radius: var(--border-radius-lg);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

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

    .card-header {
        padding: var(--space-3) var(--space-4);
        font-size: 0.9rem;
    }

    .card-header h3 {
        font-size: 0.95rem;
    }

    /* Page Title when not in page-header */
    .page-title h1 {
        font-size: 1.1rem;
    }

    .page-title p {
        font-size: 0.8rem;
    }

    /* Buttons - Touch friendly */
    .btn {
        padding: var(--space-3) var(--space-4);
        font-size: 0.85rem;
        border-radius: var(--border-radius);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-sm {
        padding: var(--space-2) var(--space-3);
        font-size: 0.8rem;
        min-height: 36px;
    }

    /* Form Controls - Touch friendly */
    .form-control {
        padding: var(--space-3);
        font-size: 16px; /* Prevents iOS zoom */
        border-radius: var(--border-radius);
        min-height: 48px;
    }

    .form-label {
        font-size: 0.85rem;
    }

    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: var(--space-1) var(--space-2);
        border-radius: var(--border-radius-full);
    }

    /* Order items - Card style */
    .order-item, .notification-item {
        border-radius: var(--border-radius);
        margin-bottom: var(--space-3);
        padding: var(--space-4);
        background: var(--bg-white);
        box-shadow: var(--shadow-xs);
    }

    /* Tables - Card style on mobile */
    .table-container {
        margin: 0;
        padding: 0;
    }

    .table {
        display: block;
    }

    .table thead {
        display: none;
    }

    .table tbody {
        display: block;
    }

    .table tr {
        display: block;
        background: var(--bg-white);
        border-radius: var(--border-radius);
        margin-bottom: var(--space-3);
        padding: var(--space-3);
        box-shadow: var(--shadow-xs);
        border: 1px solid var(--border-light);
    }

    .table td {
        display: flex;
        justify-content: space-between;
        padding: var(--space-2) 0;
        border: none;
        font-size: 0.9rem;
    }

    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.8rem;
    }

    /* Recent orders list style */
    .order-card {
        background: var(--bg-white);
        border-radius: var(--border-radius);
        padding: var(--space-4);
        margin-bottom: var(--space-3);
        box-shadow: var(--shadow-xs);
        border: 1px solid var(--border-light);
    }

    /* ===== QUICK ACTIONS MOBILE APP STYLE ===== */
    /* Hide desktop version on mobile */
    .quick-actions-desktop {
        display: none !important;
    }

    /* Show mobile version */
    .quick-actions-mobile {
        display: block !important;
    }

    .quick-actions-mobile .section-label {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: var(--space-4);
        display: flex;
        align-items: center;
        gap: var(--space-2);
    }

    .quick-actions-mobile .section-label i {
        color: var(--primary);
    }

    /* Grid 4 colonnes style app */
    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
    }

    .quick-action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        transition: transform 0.2s ease;
    }

    .quick-action-item:active {
        transform: scale(0.92);
    }

    .quick-action-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.4rem;
        margin-bottom: var(--space-2);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .quick-action-item:hover .quick-action-icon {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    }

    .quick-action-item span {
        font-size: 0.7rem;
        font-weight: 500;
        color: var(--text-secondary);
        text-align: center;
        line-height: 1.2;
    }

    /* Table */
    .table th, .table td {
        padding: var(--space-2) var(--space-3);
        font-size: 0.8rem;
    }

    /* Section Title */
    .section-title h2 {
        font-size: 1.25rem;
    }

    .section-title p {
        font-size: 0.9rem;
    }

    /* Services */
    .services {
        padding: 40px var(--space-3);
    }

    .service-card {
        padding: var(--space-5) var(--space-4);
    }

    .service-icon {
        width: 56px;
        height: 56px;
        font-size: 1.35rem;
    }

    .service-card h3 {
        font-size: 1rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    /* How It Works */
    .how-it-works {
        padding: 40px var(--space-3);
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .step-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .step h3 {
        font-size: 1rem;
    }

    .step p {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer {
        padding: 32px var(--space-3) 20px;
    }

    .footer-section h4 {
        font-size: 0.9rem;
    }

    .footer-section li,
    .footer-section a {
        font-size: 0.85rem;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }

    /* Auth Pages */
    .auth-card {
        border-radius: var(--border-radius-lg);
    }

    .auth-header {
        padding: var(--space-6) var(--space-4) var(--space-4);
    }

    .auth-body {
        padding: var(--space-2) var(--space-4) var(--space-5);
    }

    .auth-footer {
        padding: var(--space-4);
        font-size: 0.85rem;
    }

    /* Modal */
    .modal-header h3 {
        font-size: 1rem;
    }

    /* Empty State */
    .empty-state {
        padding: var(--space-8) var(--space-3);
    }

    .empty-state .empty-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    .empty-state h3 {
        font-size: 1rem;
    }

    .empty-state p {
        font-size: 0.85rem;
    }

    /* Alert */
    .alert {
        padding: var(--space-3) var(--space-4);
        font-size: 0.85rem;
    }

    /* Toast */
    .toast {
        font-size: 0.85rem;
        padding: var(--space-3) var(--space-4);
    }
}

/* === EXTRA SMALL DEVICES (360px) === */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.35rem;
    }

    .header-actions {
        gap: var(--space-2);
    }

    .header-actions .btn {
        padding: var(--space-2);
    }

    .page-title h1 {
        font-size: 1rem;
    }

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

/* === LANDSCAPE ORIENTATION FOR SMALL DEVICES === */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 30px var(--space-4) 40px;
    }

    .hero h1 {
        font-size: 1.5rem;
        margin-bottom: var(--space-3);
    }

    .hero p {
        margin-bottom: var(--space-4);
    }

    .modal {
        max-height: 95vh;
    }

    .auth-page {
        padding: var(--space-3);
    }

    .auth-header {
        padding: var(--space-4) var(--space-5) var(--space-3);
    }

    .auth-logo {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        margin-bottom: var(--space-3);
    }
}

/* === PRINT STYLES === */
@media print {
    .header,
    .sidebar,
    .mobile-menu-btn,
    .mobile-sidebar-overlay,
    .toast-container,
    .modal-overlay {
        display: none !important;
    }

    .main-content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }
}

/* ============================================
   PAGE SPECIFIC - AUTH PAGES
   ============================================ */
.auth-page {
    min-height: calc(100vh - 64px); /* Compenser le header fixe */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 50%, #065F46 100%);
    padding: var(--space-6);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: var(--space-10) var(--space-8) var(--space-6);
}

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-5);
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.auth-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-body {
    padding: var(--space-2) var(--space-8) var(--space-8);
}

.auth-footer {
    text-align: center;
    padding: var(--space-5) var(--space-8);
    background: var(--bg-grey);
    border-top: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   PAGE SPECIFIC - DASHBOARD
   ============================================ */
.dashboard {
    display: flex;
    min-height: calc(100vh - 64px);
}

.sidebar {
    width: 260px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
    padding: var(--space-5) 0;
    position: fixed;
    top: 64px;
    left: 0;
    height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 100;
}

/* Ajouter un margin-left au main-content pour compenser le sidebar fixe */
.dashboard .main-content {
    margin-left: 260px;
}

.sidebar-menu {
    padding: 0 var(--space-3);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--border-radius);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
    transition: var(--transition);
}

.sidebar-item:hover {
    background: var(--primary-50);
    color: var(--primary);
}

.sidebar-item.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.sidebar-item i {
    width: 20px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-4) var(--space-4);
}

.main-content {
    flex: 1;
    padding: var(--space-8);
    background: var(--bg-main);
    min-width: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.page-title h1 i {
    color: var(--primary);
    font-size: 1.25rem;
}

.page-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

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

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: var(--space-4);
}

.stat-card .stat-icon.primary {
    background: var(--primary-50);
    color: var(--primary);
}

.stat-card .stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.stat-card .stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card .stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   PAYMENT METHODS
   ============================================ */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.payment-method {
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover {
    border-color: var(--primary);
}

.payment-method.selected {
    border-color: var(--primary);
    background: var(--teal-50);
}

.payment-method.mtn {
    --method-color: var(--mtn-yellow);
}

.payment-method.moov {
    --method-color: var(--moov-blue);
}

.payment-method.orange {
    --method-color: var(--orange-money);
}

.payment-method .method-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background: var(--method-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: bold;
}

/* ============================================
   STAR RATING
   ============================================ */
.star-rating {
    display: flex;
    gap: 5px;
}

.star-rating .star {
    font-size: 1.5rem;
    color: var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.star-rating .star.active,
.star-rating .star:hover {
    color: #FFB800;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
}

.empty-state .empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-5);
    background: var(--bg-grey);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-5);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   MOBILE SIDEBAR
   ============================================ */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 9999;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 20px;
        box-shadow: var(--shadow-xl);
        transform: translateX(-100%);
        background: var(--bg-white);
    }

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

    /* Enlever le margin-left sur mobile/tablet */
    .dashboard .main-content {
        margin-left: 0;
    }

    /* Sidebar header - Add app logo area */
    .sidebar::before {
        content: 'Pharmacie';
        display: block;
        padding: var(--space-4) var(--space-5);
        font-size: 1.35rem;
        font-weight: 700;
        color: var(--primary);
        border-bottom: 1px solid var(--border-light);
        margin-bottom: var(--space-2);
    }

    .sidebar-menu {
        padding: 0 var(--space-2);
    }

    /* Improve sidebar items touch target */
    .sidebar-item {
        padding: var(--space-3) var(--space-4);
        min-height: 50px;
        border-radius: 12px;
        margin-bottom: var(--space-1);
        font-weight: 500;
    }

    .sidebar-item:hover {
        background: var(--teal-50);
    }

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

    .sidebar-item.active i {
        color: white;
    }

    .sidebar-item i {
        font-size: 1.15rem;
        width: 24px;
        color: var(--text-muted);
    }

    .sidebar-divider {
        margin: var(--space-3) var(--space-4);
        border-color: var(--border-light);
    }

    /* Section labels */
    .sidebar-menu p {
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-light);
        letter-spacing: 0.05em;
    }

    /* Mobile sidebar overlay */
    .mobile-sidebar-overlay {
        display: none;
    }

    .mobile-sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* ============================================
   PAGE SPECIFIC RESPONSIVE STYLES
   ============================================ */

/* Map container */
#map {
    height: 400px;
    border-radius: var(--border-radius-lg);
    z-index: 1;
}

@media (max-width: 768px) {
    #map {
        height: 300px;
        border-radius: var(--border-radius);
    }
}

@media (max-width: 480px) {
    #map {
        height: 250px;
    }
}

/* Cards grid - responsive */
.cards-grid,
#pharmaciesList > div,
#hospitalsList > div,
#labsList > div,
#ambulancesList > div,
[style*="grid-template-columns: repeat(auto-fill, minmax(350px, 1fr))"],
[style*="grid-template-columns: repeat(auto-fill, minmax(300px, 1fr))"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 20px !important;
}

@media (max-width: 768px) {
    .cards-grid,
    #pharmaciesList > div,
    #hospitalsList > div,
    #labsList > div,
    #ambulancesList > div,
    [style*="grid-template-columns: repeat(auto-fill, minmax(350px, 1fr))"],
    [style*="grid-template-columns: repeat(auto-fill, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-4) !important;
    }
}

@media (max-width: 400px) {
    .cards-grid,
    #pharmaciesList > div,
    #hospitalsList > div,
    #labsList > div,
    #ambulancesList > div,
    [style*="grid-template-columns"],
    [style*="grid-template-columns: repeat(auto-fill, minmax(300px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* Card content adjustments for mobile */
@media (max-width: 576px) {
    .pharmacy-card .card-body,
    #hospitalsList .card-body,
    #labsList .card-body,
    #ambulancesList .card-body {
        padding: var(--space-4);
    }

    .pharmacy-card h4,
    #hospitalsList h3,
    #labsList h3,
    #ambulancesList h3 {
        font-size: 1rem;
    }

    /* Badges wrap on mobile */
    .card-body .badge {
        margin-bottom: var(--space-1);
    }
}

/* Filter buttons responsive */
.filter-btn-container,
[style*="display: flex"][style*="gap: 10px"][style*="flex-wrap: wrap"] {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .filter-btn-container .btn,
    [style*="display: flex"][style*="gap: 10px"] .btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        font-size: 0.75rem;
        padding: var(--space-2);
    }

    .filter-btn-container .btn[data-service="all"],
    [style*="display: flex"][style*="gap: 10px"] .btn:first-child {
        flex: 1 1 100%;
    }
}

/* Ordonnance page responsive */
.ordonnance-form-container {
    max-width: 100%;
}

@media (max-width: 768px) {
    .ordonnance-form-container .card-body {
        padding: var(--space-4);
    }

    /* File upload area */
    .upload-area {
        padding: var(--space-6) var(--space-4);
    }

    .upload-area i {
        font-size: 2rem;
    }
}

/* Touch-friendly interactive elements */
@media (max-width: 768px) {
    /* Ensure minimum touch target size of 44px */
    .btn,
    .sidebar-item,
    .payment-method,
    .filter-btn,
    input[type="checkbox"],
    input[type="radio"] {
        min-height: 44px;
    }

    /* Larger tap targets for phone links */
    a[href^="tel:"] {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        padding: var(--space-2) var(--space-3);
        background: var(--primary-50);
        border-radius: var(--border-radius-sm);
        margin: var(--space-1) 0;
    }
}

/* Improve readability on mobile */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1rem;
    }

    p {
        line-height: 1.6;
    }
}

/* Safe area for notch devices */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(var(--space-4), env(safe-area-inset-left));
        padding-right: max(var(--space-4), env(safe-area-inset-right));
    }

    .main-content {
        padding-bottom: max(var(--space-8), env(safe-area-inset-bottom));
    }

    .modal {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
}

.main-content {
    overflow-x: hidden;
}

/* Smooth scrolling for anchor links */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ORDERS LIST - MOBILE LISTVIEW STYLE
   ============================================ */

/* Par defaut : cacher la version mobile, afficher la version desktop */
.orders-list-mobile {
    display: none;
}

.orders-table-desktop {
    display: block;
}

/* Mobile : afficher ListView, cacher tableau */
@media (max-width: 768px) {
    .orders-list-mobile {
        display: block;
    }

    .orders-table-desktop {
        display: none;
    }
}

/* Style ListView mobile */
.orders-list-mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.order-list-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.order-list-item:last-child {
    border-bottom: none;
}

.order-list-item:active {
    background-color: var(--bg-grey);
}

.order-item-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 14px;
}

.order-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.order-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

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

.order-item-type {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.order-item-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.order-status-badge i {
    font-size: 0.65rem;
}

.order-responses {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.order-responses i {
    color: var(--primary);
}

.order-item-arrow {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Hover effect on desktop touch devices */
@media (hover: hover) {
    .order-list-item:hover {
        background-color: var(--bg-subtle);
    }
}

/* Re-show mobile list on mobile */
@media (max-width: 768px) {
    .orders-list-mobile {
        display: flex !important;
    }
}

/* ============================================
   CALL BUTTON - TEAL BACKGROUND FIX FOR MOBILE
   ============================================ */

/* Ensure call buttons have teal background on mobile */
a.btn.btn-primary,
a.btn-primary {
    background: var(--primary) !important;
    color: white !important;
}

a.btn.btn-primary:hover,
a.btn-primary:hover {
    background: var(--primary-dark) !important;
    color: white !important;
}

/* Mobile list cards styling for hospitals/labs */
@media (max-width: 768px) {
    /* Grid becomes single column on mobile */
    #hospitalsList > div,
    #labsList > div {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Card styling for mobile */
    #hospitalsList .card,
    #labsList .card {
        border-radius: 16px;
        box-shadow: var(--shadow-sm);
    }

    #hospitalsList .card .card-body,
    #labsList .card .card-body {
        padding: 16px;
    }

    /* Title smaller on mobile */
    #hospitalsList .card h3,
    #labsList .card h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    /* Buttons container - full width on mobile */
    #hospitalsList .card .flex.gap-1,
    #labsList .card .flex.gap-1 {
        display: flex;
        gap: 10px;
    }

    /* Call button - prominent teal style */
    #hospitalsList .card .btn-primary,
    #labsList .card .btn-primary {
        flex: 1;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
        color: white !important;
        border: none !important;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Localiser button - secondary style */
    #hospitalsList .card .btn-secondary,
    #labsList .card .btn-secondary {
        flex: 1;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    /* Badges smaller on mobile */
    #hospitalsList .badge,
    #labsList .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
        margin-bottom: 4px;
    }
}
