/*
 * Logistica App - CSS Styles
 * Based on AlpeFresh Marketplace Design System
 * Navy (#003366) + Gold (#fdb714) Color Scheme
 */

/* ========================================
   CSS VARIABLES / CUSTOM PROPERTIES
   ======================================== */
:root {
    /* Primary Colors - Navy */
    --navy: #003366;
    --navy-light: #004080;
    --navy-dark: #002244;
    --primary-50: #e6f0ff;
    --primary-100: #cce0ff;
    --primary-200: #99c2ff;
    --primary-300: #66a3ff;
    --primary-400: #3385ff;
    --primary-500: #0066ff;
    --primary-600: #0052cc;
    --primary-700: #003d99;
    --primary-800: #003366;
    --primary-900: #001a33;

    /* Accent Colors - Gold */
    --gold: #fdb714;
    --gold-light: #fdc844;
    --gold-dark: #e5a50f;
    --accent-50: #fffbeb;
    --accent-100: #fef3c7;
    --accent-200: #fde68a;
    --accent-300: #fcd34d;
    --accent-400: #fdb714;
    --accent-500: #f59e0b;
    --accent-600: #d97706;
    --accent-700: #b45309;
    --accent-800: #92400e;
    --accent-900: #78350f;

    /* Grayscale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: #1e40af;

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

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: var(--gray-50);
    min-height: 100vh;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.text-navy { color: var(--navy); }
.text-gold { color: var(--gold); }
.text-gray { color: var(--gray-600); }
.text-white { color: #ffffff; }
.text-success { color: var(--success-dark); }
.text-warning { color: var(--warning-dark); }
.text-danger { color: var(--danger-dark); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: var(--spacing-xl) 0;
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Grid System */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ========================================
   SPACING UTILITIES
   ======================================== */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.m-6 { margin: 1.5rem; }
.m-8 { margin: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

/* ========================================
   BACKGROUNDS
   ======================================== */
.bg-white { background-color: #ffffff; }
.bg-navy { background-color: var(--navy); }
.bg-navy-light { background-color: var(--navy-light); }
.bg-gold { background-color: var(--gold); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-gray-100 { background-color: var(--gray-100); }
.bg-gray-200 { background-color: var(--gray-200); }

.bg-success { background-color: var(--success-light); }
.bg-warning { background-color: var(--warning-light); }
.bg-danger { background-color: var(--danger-light); }
.bg-info { background-color: var(--info-light); }

/* Gradient backgrounds */
.bg-gradient-navy {
    background: linear-gradient(180deg, var(--navy), var(--navy-light));
}

/* ========================================
   BORDERS & RADIUS
   ======================================== */
.border { border: 1px solid var(--gray-200); }
.border-2 { border: 2px solid var(--gray-200); }
.border-gray { border-color: var(--gray-300); }
.border-navy { border-color: var(--navy); }
.border-gold { border-color: var(--gold); }

.border-t { border-top: 1px solid var(--gray-200); }
.border-b { border-bottom: 1px solid var(--gray-200); }
.border-l { border-left: 1px solid var(--gray-200); }

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

/* ========================================
   SHADOWS
   ======================================== */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary Button - Navy */
.btn-primary {
    background-color: var(--navy);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-700);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* Secondary Button - Outline */
.btn-secondary {
    background-color: #ffffff;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--gray-50);
}

/* Accent Button - Gold */
.btn-accent {
    background-color: var(--gold);
    color: var(--navy);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.btn-accent:hover:not(:disabled) {
    background-color: var(--accent-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
}

/* Success Button */
.btn-success {
    background-color: var(--success);
    color: #ffffff;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Full width button */
.btn-block {
    width: 100%;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.card-hover {
    transition: all var(--transition-slow);
}

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

.stat-card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
}

.stat-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--navy);
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-input,
.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.form-input:focus,
.input-field:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-input::placeholder,
.input-field::placeholder {
    color: var(--gray-400);
}

/* Select */
.form-select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 1rem;
    color: var(--gray-900);
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    appearance: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.form-select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--gray-900);
    background-color: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    resize: vertical;
    min-height: 100px;
    transition: all var(--transition-normal);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Error state */
.form-input.error,
.form-select.error {
    border-color: var(--danger);
}

.form-error {
    font-size: 0.875rem;
    color: var(--danger);
    margin-top: 0.25rem;
}

/* ========================================
   6-DIGIT CODE INPUT (Authentication)
   ======================================== */
.code-input-container {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.code-input {
    width: 3.5rem;
    height: 4rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy);
    background-color: #ffffff;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.code-input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.code-input.filled {
    border-color: var(--navy);
    background-color: var(--primary-50);
}

.code-input.error {
    border-color: var(--danger);
    background-color: var(--danger-light);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ========================================
   BADGES & STATUS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success-dark);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger-dark);
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info-dark);
}

.badge-navy {
    background-color: var(--primary-100);
    color: var(--navy);
}

.badge-gold {
    background-color: var(--accent-100);
    color: var(--accent-800);
}

/* Status dot indicator */
.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active { background-color: var(--success); }
.status-dot.warning { background-color: var(--warning); }
.status-dot.danger { background-color: var(--danger); }
.status-dot.info { background-color: var(--info); }

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    background: linear-gradient(180deg, var(--navy), var(--navy-light));
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    background-color: var(--gold);
    color: var(--navy);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}

.nav-title h1 {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
}

.nav-title p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: background-color var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link-accent {
    background-color: var(--gold);
    color: var(--navy);
}

.nav-link-accent:hover {
    background-color: var(--accent-500);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
    }

    .nav-links.show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navy);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.table th {
    background-color: var(--gray-50);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-900);
}

.table tr:hover {
    background-color: var(--gray-50);
}

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

/* ========================================
   ALERTS & MESSAGES
   ======================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success-dark);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background-color: var(--warning-light);
    color: var(--warning-dark);
    border-left: 4px solid var(--warning);
}

.alert-danger {
    background-color: var(--danger-light);
    color: var(--danger-dark);
    border-left: 4px solid var(--danger);
}

.alert-info {
    background-color: var(--info-light);
    color: var(--info-dark);
    border-left: 4px solid var(--info);
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ========================================
   LOGIN PAGE SPECIFIC
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 1rem;
}

.login-card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-text {
    display: inline-block;
    background-color: var(--gold);
    color: var(--navy);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.5rem;
}

.login-title {
    text-align: center;
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

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

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

.cursor-pointer { cursor: pointer; }

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

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================
   DELIVERY STATUS COLORS (BerryTrack style)
   ======================================== */
.status-en-camino {
    background-color: var(--info-light);
    color: var(--info-dark);
}

.status-programado {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.status-retrasado {
    background-color: var(--danger-light);
    color: var(--danger-dark);
}

.status-entregado {
    background-color: var(--success-light);
    color: var(--success-dark);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 640px) {
    .sm\:hidden { display: none; }
    .container { padding: 0 1rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .code-input {
        width: 2.75rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }

    .code-input-container {
        gap: 0.5rem;
    }
}

@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.mobile-nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.mobile-nav-menu.show {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, var(--navy), var(--navy-light));
    color: #ffffff;
}

.mobile-nav-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-nav-user {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.mobile-nav-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: background-color var(--transition-fast);
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    background-color: var(--gray-100);
}

.mobile-nav-item i {
    width: 1.25rem;
    text-align: center;
    color: var(--navy);
}

.mobile-nav-item-danger {
    color: var(--danger);
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.mobile-nav-item-danger i {
    color: var(--danger);
}

body.menu-open {
    overflow: hidden;
}

/* Nav user badge in desktop */
.nav-user {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-text {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.footer-version {
    color: var(--gray-400);
    font-size: 0.75rem;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .navbar,
    .btn,
    .no-print,
    .footer {
        display: none !important;
    }

    body {
        background: #ffffff;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
