/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #151d2e;
    --bg-card-hover: #1a2440;
    --bg-elevated: #1e2a42;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #60a5fa;

    --border-color: rgba(148, 163, 184, 0.08);
    --border-color-light: rgba(148, 163, 184, 0.15);
    --border-color-hover: rgba(148, 163, 184, 0.25);

    --green-bg: rgba(34, 197, 94, 0.12);
    --green-border: rgba(34, 197, 94, 0.3);
    --green-text: #4ade80;
    --green-glow: rgba(34, 197, 94, 0.2);

    --amber-bg: rgba(251, 191, 36, 0.12);
    --amber-border: rgba(251, 191, 36, 0.3);
    --amber-text: #fbbf24;
    --amber-glow: rgba(251, 191, 36, 0.2);

    --red-bg: rgba(239, 68, 68, 0.12);
    --red-border: rgba(239, 68, 68, 0.3);
    --red-text: #f87171;

    --blue-bg: rgba(96, 165, 250, 0.12);
    --blue-border: rgba(96, 165, 250, 0.3);
    --blue-text: #60a5fa;

    --purple-bg: rgba(168, 85, 247, 0.12);
    --purple-border: rgba(168, 85, 247, 0.3);
    --purple-text: #c084fc;

    --cyan-bg: rgba(34, 211, 238, 0.12);
    --cyan-border: rgba(34, 211, 238, 0.3);
    --cyan-text: #22d3ee;

    --gradient-blue: linear-gradient(135deg, #3b82f6, #6366f1);

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);

    --font-main: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

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

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(59, 130, 246, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 80% 50%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-md);
    animation: fadeIn 0.5s ease-out;
}

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

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-blue);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

.airtable-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--green-bg);
    color: var(--green-text);
    border: 1px solid var(--green-border);
}

.refresh-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.refresh-btn:hover {
    color: var(--blue-text);
    border-color: var(--blue-border);
    background: var(--blue-bg);
}

.refresh-btn:active { transform: scale(0.9); }

.refresh-btn.spinning svg { animation: spin 0.7s linear infinite; }

.header-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    font-weight: 500;
    direction: ltr;
    display: none;
}

@media (min-width: 640px) {
    .header-date { display: block; }
}

/* ============================================
   SUMMARY STRIP
   ============================================ */
.summary-strip {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-md);
    overflow-x: auto;
    animation: fadeInUp 0.5s ease-out 0.05s both;
}

.summary-strip::-webkit-scrollbar { display: none; }

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: fit-content;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    direction: ltr;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-green .stat-value { color: var(--green-text); }
.stat-amber .stat-value { color: var(--amber-text); }
.stat-purple .stat-value { color: var(--purple-text); }
.stat-cyan .stat-value { color: var(--cyan-text); }
.stat-red .stat-value { color: var(--red-text); }

.stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color-light);
    flex-shrink: 0;
}

/* ============================================
   TOOLBAR
   ============================================ */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

.filter-group {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-card);
    padding: 3px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.filter-btn.active {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.filter-count {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    padding: 1px 7px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    transition: all var(--transition-fast);
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    transition: border-color var(--transition-fast);
    min-width: 180px;
    flex: 1;
    max-width: 280px;
}

.search-box:focus-within {
    border-color: var(--blue-text);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.08);
}

.search-box svg { color: var(--text-muted); flex-shrink: 0; }

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.82rem;
    width: 100%;
    direction: rtl;
}

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

/* ============================================
   ORDER CARDS
   ============================================ */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.5s ease-out 0.15s both;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: cardIn 0.35s ease-out both;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    transition: all var(--transition-base);
}

.order-card.status-not-yet::before { background: var(--amber-text); }
.order-card.status-done::before { background: var(--green-text); }

.order-card:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
    transform: translateX(-2px);
}

.order-card.status-done {
    opacity: 0.6;
}
.order-card.status-done:hover {
    opacity: 0.85;
}

/* Card layout */
.card-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.card-customer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.card-customer-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

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

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    direction: ltr;
    text-align: right;
}

.card-phone {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    direction: ltr;
    text-align: right;
}

.card-phone a {
    color: var(--blue-text);
    text-decoration: none;
}
.card-phone a:hover { text-decoration: underline; }

.card-shipping-btn {
    flex-shrink: 0;
}

/* Card middle row */
.card-row-mid {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.tag-product {
    background: var(--purple-bg);
    color: var(--purple-text);
    border: 1px solid var(--purple-border);
}

.tag-payment {
    background: var(--blue-bg);
    color: var(--blue-text);
    border: 1px solid var(--blue-border);
}

.tag-paid-status {
    background: var(--green-bg);
    color: var(--green-text);
    border: 1px solid var(--green-border);
}

.tag-unpaid-status {
    background: var(--red-bg);
    color: var(--red-text);
    border: 1px solid var(--red-border);
}

/* Card bottom row */
.card-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.card-money {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.82rem;
    font-weight: 600;
    direction: ltr;
    text-align: right;
}

.money-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.money-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.money-value {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

.money-total { color: var(--text-primary); }
.money-paid { color: var(--green-text); }
.money-remaining { color: var(--amber-text); }
.money-remaining.zero { color: var(--text-muted); }

.card-notes-preview {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   SHIPPING BUTTON
   ============================================ */
.shipping-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
    white-space: nowrap;
}

.shipping-btn:active { transform: scale(0.93); }

.shipping-btn.not-yet {
    background: var(--amber-bg);
    border-color: var(--amber-border);
    color: var(--amber-text);
    animation: pulseAmber 2.5s ease-in-out infinite;
}

.shipping-btn.not-yet:hover {
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 14px var(--amber-glow);
    animation: none;
}

.shipping-btn.done {
    background: var(--green-bg);
    border-color: var(--green-border);
    color: var(--green-text);
}

.shipping-btn.done:hover {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 14px var(--green-glow);
}

@keyframes pulseAmber {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.25); }
    50% { box-shadow: 0 0 0 5px rgba(251, 191, 36, 0); }
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 2;
}

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

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

.modal-header {
    margin-bottom: var(--space-lg);
}

.modal-customer {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.modal-meta a { color: var(--blue-text); text-decoration: none; }
.modal-meta a:hover { text-decoration: underline; }

.modal-section {
    margin-bottom: var(--space-lg);
}

.modal-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
}

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

.modal-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    text-align: center;
}

.modal-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.modal-stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    direction: ltr;
}

.modal-address {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-notes {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.modal-shipping-area {
    display: flex;
    justify-content: center;
    padding-top: var(--space-sm);
}

.modal-shipping-area .shipping-btn {
    padding: 10px 28px;
    font-size: 0.88rem;
}

/* ============================================
   ICON BUTTONS
   ============================================ */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

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

.icon-btn:active { transform: scale(0.93); }

.header-print-btn { display: none; }
@media (min-width: 640px) {
    .header-print-btn { display: inline-flex; }
}

/* Card action buttons */
.card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.card-right-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Add button */
.add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--gradient-blue);
    color: white;
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.add-btn:hover {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.add-btn:active { transform: scale(0.96); }

/* Modal action buttons */
.modal-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.modal-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    background: var(--bg-elevated);
}

.modal-action-btn.print-order-btn:hover {
    color: var(--blue-text);
    border-color: var(--blue-border);
    background: var(--blue-bg);
}

.modal-action-btn.edit-order-btn:hover {
    color: var(--amber-text);
    border-color: var(--amber-border);
    background: var(--amber-bg);
}

.modal-action-btn.delete-order-btn:hover {
    color: var(--red-text);
    border-color: var(--red-border);
    background: var(--red-bg);
}

/* ============================================
   ADD / EDIT FORM
   ============================================ */
.add-order-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.85rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--blue-text);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.08);
}

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

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

.form-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.btn-primary {
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient-blue);
    color: white;
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    padding: 9px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    color: var(--text-muted);
}

.empty-state p {
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: var(--space-sm);
}

/* Loading Spinner */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color-light);
    border-top-color: var(--blue-text);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto;
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-main);
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    backdrop-filter: blur(12px);
    white-space: nowrap;
}

.toast.toast-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--green-border);
    color: var(--green-text);
}

.toast.toast-info {
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid var(--blue-border);
    color: var(--blue-text);
}

.toast.toast-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--red-border);
    color: var(--red-text);
}

.toast.exit { animation: toastOut 0.3s ease-in forwards; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-lg) 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(16px) scale(0.85); }
}

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

@keyframes statusPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.12); }
    60% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

.status-changed { animation: statusPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    html { font-size: 13px; }

    .app-container { padding: 0 var(--space-sm); }

    .toolbar { flex-direction: column; align-items: stretch; }
    .search-box { max-width: none; }

    .card-money { gap: var(--space-sm); }

    .modal-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body::before { display: none; }

    .header,
    .toolbar,
    .card-actions,
    .card-right-actions,
    .shipping-btn,
    .icon-btn,
    .add-btn,
    .footer,
    .modal-overlay,
    .toast-container {
        display: none !important;
    }

    .app-container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .summary-strip {
        border: 1px solid #333;
        background: white;
        color: black;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .stat-value { color: black !important; }
    .stat-label { color: #555 !important; }
    .stat-divider { background: #ccc !important; }

    .order-card {
        border: 1px solid #ddd;
        background: white;
        color: black;
        box-shadow: none;
        page-break-inside: avoid;
        break-inside: avoid;
        cursor: default;
    }

    .order-card:hover { transform: none; }

    .card-customer-name { color: black !important; }
    .card-date,
    .card-phone { color: #555 !important; }
    .card-phone a { color: #0066cc !important; }

    .tag {
        border: 1px solid #ddd;
        background: #f5f5f5 !important;
        color: #333 !important;
    }

    .money-label { color: #888 !important; }
    .money-value { color: black !important; }
    .money-paid { color: #222 !important; }
    .money-remaining { color: #222 !important; }
    .money-remaining.zero { color: #999 !important; }
    .card-notes-preview { color: #555 !important; }

    .order-card.status-done { opacity: 1 !important; }
}
