/* ========================================
   🎨 LuchelyAPP - Modern CSS Design
   ======================================== */

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

:root {
    /* Color Palette - Modern & Vibrant */
    --primary: #4F46E5;
    /* Indigo 600 */
    --primary-dark: #4338CA;
    /* Indigo 700 */
    --primary-light: #818CF8;
    /* Indigo 400 */

    --secondary: #10B981;
    /* Emerald 500 */
    --accent: #F59E0B;
    /* Amber 500 */

    --danger: #EF4444;
    /* Red 500 */
    --danger-dark: #B91C1C;
    /* Red 700 */

    --success: #10B981;
    /* Emerald 500 */
    --warning: #F59E0B;
    /* Amber 500 */

    /* Neutrals */
    --dark: #111827;
    /* Gray 900 */
    --gray-900: #111827;
    --gray-800: #1F2937;
    --gray-700: #374151;
    --gray-600: #4B5563;
    --gray-500: #6B7280;
    --gray-400: #9CA3AF;
    --gray-300: #D1D5DB;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --gray-50: #F9FAFB;
    --white: #FFFFFF;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Typography */
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --header-height: 70px;

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* White Label Variables (Defaults) */
    --bg-color: var(--gray-50);
    --card-bg: var(--white);
    --text-color: var(--gray-800);
}

/* ========================================
   🔧 Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 1200px;
    /* Reduced for better proportions */
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   🎯 Header
   ======================================== */

header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
    background: var(--gray-100);
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
}

/* ========================================
   🔘 Buttons
   ======================================== */

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

/* Primary */
.btn {
    background: var(--primary);
    color: var(--white);
}

.btn:hover {
    background: var(--primary-dark);
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: var(--danger-dark);
}

/* Secondary */
.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

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

/* Action Buttons (Edit/Delete) */
.action-btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-edit {
    background: #EFF6FF;
    /* Blue 50 */
    color: var(--primary);
}

.btn-edit:hover {
    background: #DBEAFE;
    /* Blue 100 */
    color: var(--primary-dark);
}

.btn-delete {
    background: #FEF2F2;
    /* Red 50 */
    color: var(--danger);
}

.btn-delete:hover {
    background: #FEE2E2;
    /* Red 100 */
    color: var(--danger-dark);
}

/* ========================================
   📑 Tabs
   ======================================== */

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    overflow-x: auto;
    /* Scroll on mobile */
}

.tab-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--gray-900);
    background: var(--gray-50);
}

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

/* ========================================
   📊 Tables & Cards
   ======================================== */

.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

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

thead {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    font-size: 0.95rem;
    vertical-align: middle;
}

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

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

td img {
    border-radius: var(--radius-sm);
    width: 48px;
    height: 48px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   🏷️ Badges
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-pendiente {
    background: #FEF3C7;
    color: #B45309;
}

.badge-preparando {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-listo {
    background: #D1FAE5;
    color: #065F46;
}

.badge-entregado {
    background: #E0E7FF;
    color: #3730A3;
}

.badge-cancelado {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-active {
    background: #D1FAE5;
    color: #065F46;
}

.badge-inactive {
    background: #F3F4F6;
    color: #374151;
}

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

.badge-en_ruta {
    background: #E0F2FE;
    color: #075985;
}

.badge-suspended {
    background: #FEE2E2;
    color: #991B1B;
}

.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.filter-bar .form-group {
    margin: 0;
}

.delivery-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.delivery-actions .btn {
    min-width: 96px;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-weight: 600;
}

.subtab-switch {
    display: inline-flex;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f6f7fb 0%, #ffffff 100%);
    padding: 0.45rem;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.subtab-btn {
    border: none;
    background: transparent;
    padding: 0.65rem 1.3rem;
    border-radius: 12px;
    font-weight: 700;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.18s ease;
    letter-spacing: 0.01em;
}

.subtab-btn.active {
    background: linear-gradient(135deg, #5f3bf4 0%, #7f5bff 100%);
    color: #fff;
    box-shadow: 0 10px 25px rgba(95, 59, 244, 0.25);
    transform: translateY(-1px);
}

.form-hint {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.form-hint.error {
    color: #b91c1c;
}

.form-hint.success {
    color: #15803d;
}

.section-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1 1 200px;
    min-width: 200px;
}

.assign-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.assign-card .form-group {
    flex: 1 1 200px;
    min-width: 200px;
    margin: 0;
}

.assign-card .btn-assign {
    align-self: flex-end;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #5f3bf4 0%, #7f5bff 100%);
    color: #fff;
    border: none;
    box-shadow: 0 10px 25px rgba(95, 59, 244, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.assign-card .btn-assign:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(95, 59, 244, 0.25);
}

.assign-card .btn-assign:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(95, 59, 244, 0.2);
}

.form-row .btn-add-container {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    margin-left: auto;
}

.btn-add-delivery {
    background: linear-gradient(135deg, #5f3bf4 0%, #7f5bff 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(95, 59, 244, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 48px;
}

.btn-add-delivery:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(95, 59, 244, 0.25);
}

.btn-add-delivery:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(95, 59, 244, 0.2);
}

.hidden {
    display: none !important;
}

.state-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0.5rem 2.5rem 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--gray-300);
    background: var(--white) url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23667085\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"6 9 12 15 18 9\"/></svg>') no-repeat right 0.75rem center;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    min-width: 170px;
}

.state-select[data-state="pendiente"] {
    border-color: #F59E0B;
    color: #B45309;
    background-color: #FFFBEB;
}

.state-select[data-state="asignado"] {
    border-color: #7C3AED;
    color: #5B21B6;
    background-color: #F5F3FF;
}

.state-select[data-state="en_ruta"] {
    border-color: #0EA5E9;
    color: #075985;
    background-color: #ECFEFF;
}

.state-select[data-state="entregado"] {
    border-color: #22C55E;
    color: #166534;
    background-color: #ECFDF3;
}

.state-select[data-state="cancelado"] {
    border-color: #EF4444;
    color: #991B1B;
    background-color: #FEF2F2;
}

.state-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(93, 52, 240, 0.1);
}

.option-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.option-dot .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-pendiente {
    background: #F59E0B;
}

.dot-asignado {
    background: #7C3AED;
}

.dot-en_ruta {
    background: #0EA5E9;
}

.dot-entregado {
    background: #4ADE80;
}

.dot-cancelado {
    background: #EF4444;
}

.note-muted {
    color: var(--gray-600);
    max-width: 160px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   📝 Forms & Modals
   ======================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    /* Darker overlay */
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleUp 0.2s ease-out;
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    font-size: 1.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {}

.top-list li:last-child {
    border-bottom: none;
}

.top-list .count {
    font-weight: 700;
    color: var(--primary);
    background: #EEF2FF;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.8rem;
}

/* ========================================
   🎨 Product Catalog (Waiter View)
   ======================================== */

#categoryFilters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

#categoryFilters button {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

#categoryFilters button:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

#categoryFilters button.active-filter {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

#catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
}

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

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-card h3 {
    padding: 1rem 1rem 0.5rem;
    font-size: 1.1rem;
    color: var(--gray-900);
    font-weight: 700;
}

.product-card p {
    padding: 0 1rem 1rem;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 800;
    margin-top: auto;
}

/* ========================================
   🛒 Cart
   ======================================== */

#cartPanel {
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    display: flex;
    flex-direction: column;
}

#cartPanel.open {
    transform: translateX(0);
}

#cartPanel h2 {
    padding: 1.5rem;
    background: var(--white);
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid var(--gray-100);
}

.cart-total {
    padding: 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* ========================================
   🔔 Notifications (Toast)
   ======================================== */

/* No specific toast styles provided in the new content, keeping the old keyframes for now */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   📱 Responsive Design
   ======================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding: 1rem;
    }

    header {
        padding: 0 1rem;
    }

    header h1 {
        font-size: 1.25rem;
    }

    .user-info span {
        display: none;
        /* Hide username on mobile to save space */
    }

    .tabs {
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    /* Mobile Tables (Card View) */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius);
        margin-bottom: 1rem;
        box-shadow: var(--shadow-sm);
        padding: 1rem;
    }

    td {
        border: none;
        position: relative;
        padding: 0.5rem 0 0.5rem 40%;
        text-align: right;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--gray-500);
        font-size: 0.85rem;
    }

    td:first-child {
        padding-top: 0;
    }

    td:last-child {
        padding-bottom: 0;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--gray-100);
        justify-content: flex-end;
        width: 100%;
        padding-left: 0;
    }

    td:last-child:before {
        display: none;
    }

    .action-btn-group {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ========================================
    Utility Classes
   ======================================== */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
    Login Page
   ======================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.login-container::before,
.login-container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.login-container::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    top: -250px;
    left: -250px;
}

.login-container::after {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: 7s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37), 0 0 0 1px rgba(255, 255, 255, 0.18);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form h2 {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark), #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    position: relative;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.login-form h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.login-form .form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.login-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    position: relative;
    overflow: hidden;
}

.login-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.login-form .btn:hover::before {
    left: 100%;
}

.login-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.login-form .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

.login-form #errorMsg {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger);
    font-size: 0.9rem;
    font-weight: 500;
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

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

    .login-form {
        padding: 2rem 1.5rem;
    }

    .login-form h2 {
        font-size: 2rem;
    }

    .login-container::before,
    .login-container::after {
        display: none;
    }
}

/* Logo Styles */
.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 1rem;
    display: block;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .header-logo {
        width: 32px;
        height: 32px;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }
}

/* ========================================
    Order Details Modal - Modern Design
   ======================================== */

.modal-large {
    max-width: 900px;
}

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

.modal-header h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: 1.75rem;
}

.btn-close {
    background: var(--gray-100);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--danger);
    color: var(--white);
    transform: rotate(90deg);
}

.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition);
}

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

.detail-card-full {
    grid-column: 1 / -1;
}

.detail-card-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.btn-icon-small {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.detail-card-body {
    padding: 1.25rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.detail-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.detail-value {
    color: var(--gray-900);
    font-weight: 500;
}

/* Notes Section */
.notes-display {
    min-height: 60px;
    padding: 0.75rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.notes-edit {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    resize: vertical;
    transition: var(--transition);
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.notes-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.product-action {
    border: none;
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.product-action.edit {
    background: linear-gradient(135deg, #5c6fff, #4a54e4);
    color: white;
    box-shadow: 0 8px 16px rgba(74, 84, 228, 0.25);
}

.product-action.edit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(74, 84, 228, 0.3);
}

.product-action.ghost {
    background: white;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
}

.product-action.ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

/* Order action chips */
.order-action {
    border: 1px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-800);
    padding: 0.4rem 0.9rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 96px;
    text-align: center;
}

.order-action:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.order-action.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    padding: 0.4rem 0.85rem;
}

.order-action-select {
    border: 1px solid var(--gray-200);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    color: var(--gray-800);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 140px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.order-action-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 116, 203, 0.15);
}

.order-action-select.status-preparando {
    border-color: #f4c95d;
    background: #fffaf0;
}

.order-action-select.status-pendiente {
    border-color: #d9dde3;
    background: #f9fafb;
}

.order-action-select.status-listo {
    border-color: #7dcfb6;
    background: #f4fffa;
}

.order-action-select.status-entregado {
    border-color: #9bb8ff;
    background: #f6f8ff;
}

.order-action-select.status-cancelado {
    border-color: #ef9a9a;
    background: #fff7f7;
}

.order-action[data-status="preparando"] {
    border-color: #f4c95d;
    background: #fff9eb;
    color: #9b6c00;
}

.order-action[data-status="listo"] {
    border-color: #7dcfb6;
    background: #f3fffb;
    color: #1d8a70;
}

.order-action[data-status="entregado"] {
    border-color: #9bb8ff;
    background: #f5f8ff;
    color: #2a5fb8;
}

.order-action[data-status="cancelado"] {
    border-color: #ef9a9a;
    background: #fff6f6;
    color: #b23b3b;
}

/* Order Total */
.order-total {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-top: 1rem;
    border: 2px solid var(--primary-light);
}

.total-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
}

.total-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

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

/* Toast Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

/* Responsive Order Details Modal */
@media (max-width: 768px) {
    .modal-large {
        max-width: 100%;
        margin: 0;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .order-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .detail-card-header {
        padding: 0.875rem 1rem;
    }

    .detail-card-body {
        padding: 1rem;
    }

    .total-label {
        font-size: 1.1rem;
    }

    .total-value {
        font-size: 1.5rem;
    }
}

/* ========================================
    Product Catalog Styles
   ======================================== */

.catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card .product-desc {
    color: var(--gray-600);
    font-size: 0.95rem;
    min-height: 2.4em;
    margin: 0.35rem 1rem 0.35rem;
}

.product-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--gray-100);
}

.product-details {
    padding: 1.25rem;
}

.product-details h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 1rem 0;
}

.product-details .btn {
    width: 100%;
}

@media (max-width: 768px) {
    .catalog {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-image {
        height: 150px;
    }

    .product-details {
        padding: 1rem;
    }

    .product-details h3 {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.25rem;
    }
}

/* ========================================
    Notification Center Styles
   ======================================== */

.notification-btn {
    position: relative;
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-notifications-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-notifications-btn:hover {
    background: var(--gray-200);
    color: var(--danger);
}

/* ========================================
   Catalog filters (waiter)
   ======================================== */
.catalog-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 1rem;
    width: 100%;
}

.filter-copy h2 {
    margin: 0.15rem 0;
    font-size: 1.15rem;
    color: var(--gray-800);
}

.filter-copy .muted {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.95rem;
}

.filter-copy .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--primary);
    margin: 0;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.search-field input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 116, 203, 0.15);
    outline: none;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    overflow: hidden;
    max-height: 130px;
    padding: 0.1rem;
    width: 100%;
    align-content: flex-start;
}

.category-chips button {
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-700);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.95rem;
}

.category-chips button:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.category-chips button.active-filter {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(56, 116, 203, 0.12);
}

@media (max-width: 900px) {
    .catalog-filters {
        padding: 0.9rem;
    }

    .filter-copy h2 {
        font-size: 1rem;
    }

    .category-chips {
        max-height: none;
    }
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    display: none;
    border: 2px solid var(--white);
}

.notification-badge.active {
    display: inline-block;
}

.notifications-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.notifications-panel.open {
    right: 0;
}

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

.notifications-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notification-item {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.notification-item.unread {
    background: var(--gray-50);
    border-left-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.notification-item:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .notifications-panel {
        width: 100%;
        right: -100%;
    }
}

/* ========================================
    Notification Center Styles (Updated)
   ======================================== */

.notification-btn {
    position: relative;
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
    /* Ensure badge is not clipped */
}

.close-notifications-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-notifications-btn:hover {
    background: var(--gray-200);
    color: var(--danger);
}

/* ========================================
   🔔 Modern Notifications (Toasts)
   ======================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    border-left: 4px solid transparent;
}

.toast.closing {
    animation: slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.toast-message {
    color: var(--gray-600);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Toast Variants */
.toast-success {
    border-left-color: var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
    background: #D1FAE5;
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-error .toast-icon {
    color: var(--danger);
    background: #FEE2E2;
}

.toast-info {
    border-left-color: var(--primary);
}

.toast-info .toast-icon {
    color: var(--primary);
    background: #E0E7FF;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ========================================
   🛑 Custom Confirm Modal
   ======================================== */

.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

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

.confirm-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

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

.confirm-icon {
    width: 60px;
    height: 60px;
    background: #FEF2F2;
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.confirm-icon svg {
    width: 32px;
    height: 32px;
}

.confirm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.confirm-message {
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-actions button {
    flex: 1;
    padding: 0.75rem;
}

/* Toast Notifications */
.toast {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    margin-bottom: 1rem;
    border-left: 5px solid var(--primary-color);
    animation: slideInRight 0.3s ease-out forwards;
    pointer-events: auto;
    min-width: 320px;
    max-width: 400px;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
    color: var(--gray-900);
}

.toast-message {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.toast.closing {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

/* Filter Controls */
.filter-container {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    border: 1px solid var(--gray-200);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--gray-700);
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
}

.filter-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.filter-date-input {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.filter-btn {
    padding: 8px 16px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-1px);
}

/* ========================================
   📈 Dashboard Charts
   ======================================== */
.chart-container {
    position: relative;
    height: 400px;
    /* Limit chart height */
    width: 100%;
    margin-bottom: 2rem;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.top-products-container {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

/* Premium Stats Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* Clickable feedback */
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #9333ea);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.stat-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-info p {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* Tabs Logic */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   🖥️ Desktop / Large Screen Optimizations
   ======================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
        /* Charts take 2/3, Top Products 1/3 */
    }
}

/* ========================================
   🦶 Global Footer
   ======================================== */
.app-footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--white);
    color: var(--gray-500);
    border-top: 1px solid var(--gray-200);
    margin-top: 3rem;
    font-size: 0.9rem;
}

.app-footer p {
    margin: 0;
}