/**
 * CAJITAS ESTHER V2 - Estilos Modernos
 * Dark Theme con acentos rosa/purpura
 */

/* ========================================
   CSS Variables
======================================== */
:root {
    /* Colores de fondo */
    --bg-0: #09090b;
    --bg-1: #0f0f14;
    --bg-2: #16161d;
    --bg-3: #1c1c26;
    --bg-card: rgba(22, 22, 29, 0.8);
    --bg-hover: rgba(255, 255, 255, 0.03);

    /* Colores de texto */
    --text: #fafafa;
    --text-muted: rgba(250, 250, 250, 0.6);
    --text-dim: rgba(250, 250, 250, 0.4);

    /* Colores primarios */
    --primary: #f472b6;
    --primary-light: #fbcfe8;
    --primary-dark: #db2777;
    --primary-glow: rgba(244, 114, 182, 0.15);

    /* Colores secundarios */
    --violet: #a78bfa;
    --violet-glow: rgba(167, 139, 250, 0.15);

    /* Estados */
    --success: #4ade80;
    --success-bg: rgba(74, 222, 128, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.1);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.1);

    /* Bordes y sombras */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Tipografia */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Espaciado */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transiciones */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--primary-glow), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, var(--violet-glow), transparent);
    pointer-events: none;
    z-index: -1;
}

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

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

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

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }

/* ========================================
   Layout
======================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main-content {
    padding: 2rem 0 4rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

.flex {
    display: flex;
}

.flex-col { flex-direction: column; }
.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; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Margins & Paddings */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* ========================================
   Navigation
======================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius);
    transition: all var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-glow);
}

.nav-link .icon {
    opacity: 0.8;
}

/* Mobile menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

/* ========================================
   Cards
======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-2);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    box-shadow: var(--shadow), 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-lg), 0 0 30px var(--primary-glow);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #000;
}

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

.btn-ghost {
    background: transparent;
    border-color: transparent;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
}

.btn-block {
    width: 100%;
}

/* ========================================
   Forms
======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-label.required::after {
    content: ' *';
    color: var(--error);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

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

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

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

select.form-control {
    cursor: pointer;
    appearance: none;
    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='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-hint {
    margin-top: 0.375rem;
    font-size: 0.8rem;
    color: var(--text-dim);
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Input group */
.input-group {
    display: flex;
}

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

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

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ========================================
   Tables
======================================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: rgba(0, 0, 0, 0.3);
}

th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr {
    transition: background var(--transition);
}

tbody tr:hover {
    background: var(--bg-hover);
}

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

.table-actions {
    display: flex;
    gap: 0.25rem;
}

/* ========================================
   Badges
======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    background: color-mix(in srgb, var(--badge-color, var(--text-muted)) 15%, transparent);
    color: var(--badge-color, var(--text-muted));
    border: 1px solid color-mix(in srgb, var(--badge-color, var(--text-muted)) 30%, transparent);
}

.badge .icon {
    width: 14px;
    height: 14px;
}

.badge-sm {
    padding: 0.125rem 0.5rem;
    font-size: 0.7rem;
}

.badge-lg {
    padding: 0.375rem 1rem;
    font-size: 0.85rem;
}

/* ========================================
   KPI Cards
======================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

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

.kpi-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--kpi-color, var(--primary)) 15%, transparent);
    color: var(--kpi-color, var(--primary));
    margin-bottom: 1rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

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

.kpi-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.kpi-change.up {
    color: var(--success);
}

.kpi-change.down {
    color: var(--error);
}

/* ========================================
   Alerts
======================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
    color: var(--success);
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid color-mix(in srgb, var(--error) 30%, transparent);
    color: var(--error);
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
    color: var(--warning);
}

.alert-info {
    background: var(--info-bg);
    border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
    color: var(--info);
}

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

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

.modal {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition);
}

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

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

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

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

/* ========================================
   Tabs
======================================== */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   Timeline / Tracking
======================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 2px solid var(--timeline-color, var(--text-muted));
    z-index: 1;
}

.timeline-item.active .timeline-dot {
    background: var(--timeline-color, var(--primary));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--timeline-color, var(--primary)) 20%, transparent);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.timeline-desc {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========================================
   Empty State
======================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state .icon {
    width: 64px;
    height: 64px;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

/* ========================================
   Avatar
======================================== */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
}

/* ========================================
   Product Card
======================================== */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.product-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    aspect-ratio: 1;
    background: var(--bg-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 1.25rem;
}

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

.product-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

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

.product-stock {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ========================================
   Order Card
======================================== */
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--transition);
}

.order-card:hover {
    border-color: var(--border-light);
}

.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.order-number {
    font-weight: 600;
    font-family: var(--font-mono);
}

.order-customer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.order-info-item {
    text-align: center;
}

.order-info-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.order-info-value {
    font-weight: 600;
}

/* ========================================
   Customer Card
======================================== */
.customer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.customer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.customer-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.customer-code {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.customer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.customer-contact a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.customer-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.customer-stat {
    text-align: center;
}

.customer-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.customer-stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ========================================
   Receipt
======================================== */
.receipt {
    background: linear-gradient(180deg, #fefefe 0%, #f8f8f8 100%);
    color: #1a1a1a;
    max-width: 400px;
    margin: 2rem auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.receipt-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.receipt-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.receipt-tagline {
    opacity: 0.9;
    font-size: 0.9rem;
}

.receipt-body {
    padding: 1.5rem;
}

.receipt-section {
    margin-bottom: 1.5rem;
}

.receipt-section:last-child {
    margin-bottom: 0;
}

.receipt-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #ddd;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    font-size: 0.9rem;
}

.receipt-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid #1a1a1a;
}

.receipt-footer {
    background: #f0f0f0;
    padding: 1.5rem;
    text-align: center;
}

.receipt-qr {
    width: 80px;
    height: 80px;
    background: white;
    margin: 0 auto 1rem;
    border-radius: var(--radius-sm);
}

.receipt-tracking {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.receipt-date {
    font-size: 0.8rem;
    color: #666;
}

.receipt-watermark {
    position: relative;
}

.receipt-watermark::after {
    content: attr(data-status);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 4rem;
    font-weight: 900;
    opacity: 0.06;
    pointer-events: none;
    white-space: nowrap;
}

/* ========================================
   Public Tracking Page
======================================== */
.tracking-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.tracking-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.tracking-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
}

.tracking-header h1 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tracking-code {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.tracking-body {
    padding: 2rem;
}

.tracking-status {
    text-align: center;
    margin-bottom: 2rem;
}

.tracking-status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-glow);
    color: var(--primary);
}

.tracking-status-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.tracking-timeline {
    padding-left: 2.5rem;
}

.tracking-footer {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.tracking-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   Login Page
======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
}

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

.login-logo h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.login-logo p {
    color: var(--text-muted);
}

/* ========================================
   Page Header
======================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
}

/* ========================================
   Filters
======================================== */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* ========================================
   Pagination
======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all var(--transition);
}

.pagination a:hover {
    background: var(--bg-hover);
    color: var(--text);
}

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

.pagination .disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* ========================================
   Utilities
======================================== */
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.overflow-hidden { overflow: hidden; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.w-full { width: 100%; }
.h-full { height: 100%; }
.rounded { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: var(--shadow); }
.border { border: 1px solid var(--border); }

/* ========================================
   Responsive
======================================== */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .navbar-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-1);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        flex-direction: column;
    }

    .navbar-nav.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

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

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions {
        justify-content: stretch;
    }

    .page-actions .btn {
        flex: 1;
    }

    .filters {
        flex-direction: column;
    }

    .table-wrapper {
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .order-info {
        grid-template-columns: 1fr;
    }

    .customer-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .modal {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    body {
        background: white;
        color: black;
    }

    body::before {
        display: none;
    }

    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .receipt {
        box-shadow: none;
        max-width: 100%;
    }

    .card {
        background: white;
        border: 1px solid #ddd;
    }
}
