/* =============================================
   WebFlores — Design System Mobile-First
   =============================================
   Paleta: Greens + Floral Accents
   Tipografia: Inter (Google Fonts)
   Layout: Mobile-first (360px+)
   ============================================= */

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

/* =============================================
   CSS Custom Properties (Design Tokens)
   ============================================= */
:root {
    /* Colors - Floral Green Palette */
    --color-primary: #16a34a;
    --color-primary-light: #22c55e;
    --color-primary-dark: #15803d;
    --color-primary-50: #f0fdf4;
    --color-primary-100: #dcfce7;
    --color-primary-200: #bbf7d0;
    --color-primary-500: #22c55e;
    --color-primary-600: #16a34a;
    --color-primary-700: #15803d;
    --color-primary-900: #14532d;

    /* Accent - Rose Pink */
    --color-accent: #e11d48;
    --color-accent-light: #fb7185;
    --color-accent-50: #fff1f2;

    /* Neutral */
    --color-bg: #f8faf9;
    --color-surface: #ffffff;
    --color-surface-hover: #f0fdf4;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;

    /* Status Colors */
    --status-pendente: #f59e0b;
    --status-confirmado: #3b82f6;
    --status-preparando: #a855f7;
    --status-em-rota: #06b6d4;
    --status-entregue: #22c55e;
    --status-cancelado: #ef4444;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius - Apple Style */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Shadows - Soft Apple Style */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.02);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.06);
    --shadow-colored: 0 8px 24px rgba(22, 163, 74, 0.35);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-xs: 0.75rem;
    --font-sm: 0.8125rem;
    --font-base: 0.9375rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;

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

    /* Layout */
    --bottom-nav-height: 64px;
    --header-height: 56px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0f1a14;
        --color-surface: #1a2e23;
        --color-surface-hover: #223d2e;
        --color-border: #2d4a38;
        --color-border-light: #243a2d;
        --color-text: #e2e8f0;
        --color-text-secondary: #94a3b8;
        --color-text-muted: #64748b;
        --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
        --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
        --shadow-lg: 0 10px 15px rgba(0,0,0,0.35);
        --shadow-xl: 0 20px 25px rgba(0,0,0,0.4);
    }
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-base);
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* =============================================
   Login Page
   ============================================= */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #0f4a26 0%, #16a34a 50%, #22c55e 100%);
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
}

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

.login-page::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(225,29,72,0.15) 0%, transparent 70%);
    bottom: -60px;
    left: -60px;
    border-radius: 50%;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) var(--space-lg);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 36px;
}

.login-logo h1 {
    color: #fff;
    font-size: var(--font-2xl);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-logo p {
    color: rgba(255,255,255,0.7);
    font-size: var(--font-sm);
    margin-top: var(--space-xs);
}

.login-form .form-group {
    margin-bottom: var(--space-md);
}

.login-form label {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: var(--font-sm);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: var(--font-base);
    transition: var(--transition-fast);
    outline: none;
}

.login-form input::placeholder {
    color: rgba(255,255,255,0.4);
}

.login-form input:focus {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.login-error {
    background: rgba(239,68,68,0.2);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fecaca;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    margin-bottom: var(--space-md);
    display: none;
    animation: shake 0.4s ease;
}

.login-error.show { display: block; }

/* =============================================
   App Shell
   ============================================= */
.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-md);
    gap: var(--space-sm);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-brand {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-title {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.3px;
    min-width: 0;
}

.header-subtitle {
    font-size: var(--font-xs);
    color: var(--color-text-muted);
    font-weight: 400;
}

.header-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.header-action:hover {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}

/* Main Content */
.app-content {
    flex: 1;
    padding: var(--space-md);
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--space-lg));
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    transition: var(--transition-fast);
}

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

.nav-item.active svg {
    transform: scale(1.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 0 0 4px 4px;
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    min-width: 18px;
    height: 18px;
    background: var(--color-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    font-weight: 600;
    transition: var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
}

.btn svg { width: 20px; height: 20px; }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-colored);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.35);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--color-primary-100);
    color: var(--color-primary-700);
}

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

.btn-danger {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239,68,68,0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn-ghost:hover {
    background: var(--color-surface-hover);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #1fb855;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: var(--font-sm);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 16px 24px;
    font-size: var(--font-lg);
}

/* FAB */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--space-md));
    right: var(--space-md);
    z-index: 90;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-colored);
    transition: var(--transition-normal);
    animation: scaleIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
}

.fab:active { transform: scale(0.95); }

.fab svg { width: 28px; height: 28px; }

/* =============================================
   Cards
   ============================================= */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: var(--transition-fast);
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.card-title {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--color-text);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.kpi-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--kpi-color, var(--color-primary));
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-sm);
    font-size: 20px;
}

.kpi-value {
    font-size: var(--font-2xl);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -1px;
    line-height: 1.1;
}

.kpi-label {
    font-size: var(--font-xs);
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Item Cards (Lists) */
.item-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: var(--transition-fast);
    cursor: pointer;
    margin-bottom: var(--space-sm);
    text-decoration: none;
    color: inherit;
}

.item-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-200);
}

.item-card:active {
    transform: scale(0.99);
}

.item-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-primary-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    color: var(--color-primary);
    font-weight: 700;
    overflow: hidden;
}

.item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    font-size: var(--font-base);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-detail {
    font-size: var(--font-sm);
    color: var(--color-text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    text-align: right;
    flex-shrink: 0;
}

.item-price {
    font-weight: 700;
    font-size: var(--font-base);
    color: var(--color-text);
}

.item-stock {
    font-size: var(--font-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.item-stock.low {
    color: var(--color-accent);
    font-weight: 600;
}

/* =============================================
   Status Badge
   ============================================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-pendente { background: rgba(245,158,11,0.12); color: #d97706; }
.status-confirmado { background: rgba(59,130,246,0.12); color: #2563eb; }
.status-preparando { background: rgba(168,85,247,0.12); color: #7c3aed; }
.status-em_rota, .status-em-rota { background: rgba(6,182,212,0.12); color: #0891b2; }
.status-entregue { background: rgba(34,197,94,0.12); color: #16a34a; }
.status-cancelado, .status-cancelada { background: rgba(239,68,68,0.12); color: #dc2626; }
.status-aguardando { background: rgba(245,158,11,0.12); color: #d97706; }
.status-reagendada { background: rgba(249,115,22,0.12); color: #ea580c; }

/* =============================================
   Bottom Sheet Modal
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

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

.modal-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 201;
    background: var(--color-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: var(--safe-area-bottom);
}

.modal-sheet.active {
    transform: translateY(0);
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    margin: var(--space-sm) auto var(--space-md);
}

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

.modal-title {
    font-size: var(--font-lg);
    font-weight: 700;
}

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

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

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

.modal-footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-sm);
}

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

.form-label {
    display: block;
    font-size: var(--font-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.form-input {
    width: 100%;
    padding: 12px var(--space-md);
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: var(--font-base);
    transition: var(--transition-fast);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
    background: var(--color-surface);
}

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

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-sm);
}

.form-hint {
    font-size: var(--font-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* =============================================
   Search Bar
   ============================================= */
.search-bar {
    position: relative;
    margin-bottom: var(--space-md);
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: var(--font-base);
    transition: var(--transition-fast);
    outline: none;
}

.search-bar input:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.search-bar svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
}

/* =============================================
   Tabs / Filters
   ============================================= */
.tabs {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: var(--space-md);
    padding-bottom: 2px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
    padding: 8px 16px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: var(--font-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition-fast);
    cursor: pointer;
}

.tab:hover {
    border-color: var(--color-primary-200);
    color: var(--color-primary);
}

.tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* =============================================
   Entregas - Kanban Mobile
   ============================================= */
.kanban-header {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: var(--space-md);
    padding-bottom: 2px;
}

.kanban-header::-webkit-scrollbar { display: none; }

.kanban-tab {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 10px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
    font-weight: 600;
    white-space: nowrap;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.kanban-tab .count {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.kanban-tab.active {
    border-color: var(--tab-color, var(--color-primary));
    background: var(--tab-color, var(--color-primary));
    color: #fff;
}

.kanban-tab.active .count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.delivery-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    border-left: 4px solid var(--delivery-color, var(--color-primary));
    transition: var(--transition-fast);
}

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

.delivery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.delivery-id {
    font-weight: 700;
    font-size: var(--font-sm);
    color: var(--color-primary);
}

.delivery-time {
    font-size: var(--font-xs);
    color: var(--color-text-muted);
}

.delivery-customer {
    font-weight: 600;
    font-size: var(--font-base);
    margin-bottom: 4px;
}

.delivery-address {
    font-size: var(--font-sm);
    color: var(--color-text-secondary);
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    line-height: 1.4;
}

.delivery-address svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.delivery-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.delivery-item-tag {
    padding: 2px 8px;
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
}

.delivery-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border-light);
}

.delivery-value {
    font-weight: 700;
    font-size: var(--font-lg);
    color: var(--color-text);
}

.delivery-actions {
    display: flex;
    gap: var(--space-xs);
}

/* =============================================
   Charts
   ============================================= */
.chart-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.chart-title {
    font-weight: 700;
    font-size: var(--font-base);
    margin-bottom: var(--space-md);
}

/* =============================================
   Section
   ============================================= */
.section-title {
    font-size: var(--font-lg);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

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

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.empty-state p {
    color: var(--color-text-muted);
    font-size: var(--font-sm);
}

/* =============================================
   Toast Notifications
   ============================================= */
.toast-container {
    position: fixed;
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
    max-width: 500px;
    margin: 0 auto;
}

.toast {
    background: var(--color-text);
    color: #fff;
    padding: 14px var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto;
}

.toast.success { background: #16a34a; }
.toast.error { background: #dc2626; }
.toast.warning { background: #d97706; }
.toast.info { background: #2563eb; }

/* =============================================
   Summary Stats Row
   ============================================= */
.stats-row {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.stats-row::-webkit-scrollbar { display: none; }

.stat-chip {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.stat-chip .stat-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
}

/* =============================================
   Loading
   ============================================= */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
    border-color: rgba(255,255,255,0.3);
    border-top-color: #fff;
}

.skeleton {
    background: linear-gradient(90deg, var(--color-border-light) 25%, var(--color-border) 50%, var(--color-border-light) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* =============================================
   Pedido Detail
   ============================================= */
.pedido-detail-items {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.pedido-item-row {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    gap: var(--space-sm);
}

.pedido-item-row:last-child { border-bottom: none; }

.pedido-item-qty {
    width: 28px;
    height: 28px;
    background: var(--color-primary-100);
    color: var(--color-primary-700);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-sm);
    font-weight: 700;
    flex-shrink: 0;
}

.pedido-item-name { flex: 1; font-size: var(--font-sm); }
.pedido-item-price { font-weight: 600; font-size: var(--font-sm); }

.pedido-total-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    font-weight: 700;
    background: var(--color-primary-50);
}

/* =============================================
   Quantity Stepper
   ============================================= */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.qty-stepper button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: none;
    color: var(--color-text);
    font-size: 18px;
    transition: var(--transition-fast);
}

.qty-stepper button:hover { background: var(--color-primary-100); color: var(--color-primary); }

.qty-stepper input {
    width: 48px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 600;
    background: transparent;
    color: var(--color-text);
    font-size: var(--font-base);
    outline: none;
}

/* =============================================
   Notifications / Alerts
   ============================================= */
.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: var(--font-sm);
}

.alert-warning {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.2);
    color: #92400e;
}

.alert-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.2);
    color: #14532d;
}

.alert-info {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.2);
    color: #1e3a5f;
}

/* =============================================
   WhatsApp Button
   ============================================= */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #25d366;
    color: #fff;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    transition: var(--transition-fast);
    text-decoration: none;
}

.whatsapp-link:hover { background: #1fb855; transform: scale(1.05); }

.whatsapp-link svg { width: 16px; height: 16px; }

/* =============================================
   Animations
   ============================================= */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in { animation: fadeIn 0.3s ease; }
.slide-up { animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

/* Stagger children */
.stagger > * {
    animation: slideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 50ms; }
.stagger > *:nth-child(3) { animation-delay: 100ms; }
.stagger > *:nth-child(4) { animation-delay: 150ms; }
.stagger > *:nth-child(5) { animation-delay: 200ms; }
.stagger > *:nth-child(6) { animation-delay: 250ms; }
.stagger > *:nth-child(7) { animation-delay: 300ms; }
.stagger > *:nth-child(8) { animation-delay: 350ms; }
.stagger > *:nth-child(9) { animation-delay: 400ms; }
.stagger > *:nth-child(10) { animation-delay: 450ms; }

/* =============================================
   Responsive: Tablet+
   ============================================= */
@media (min-width: 768px) {
    .app-content {
        max-width: 720px;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .login-card {
        padding: var(--space-2xl);
    }
}

/* =============================================
   Utilities
   ============================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-sm { font-size: var(--font-sm); }
.text-xs { font-size: var(--font-xs); }
.font-bold { font-weight: 700; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.gap-sm { gap: var(--space-sm); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }
