/* ============================================================
   SABOREXPRESS - Design System Unificado
   ============================================================
   CSS centralizado para todos os 3 módulos:
   cliente, entregador e restaurante.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* =================== DESIGN TOKENS =================== */

:root {
    /* Primary Brand */
    --sabor-primary: #ea1d2c;
    --sabor-primary-dark: #c01824;
    --sabor-primary-light: #ffeaec;

    /* Secondary / Success */
    --sabor-secondary: #00a082;
    --sabor-secondary-dark: #00876d;

    /* Neutrals */
    --sabor-dark: #1f2937;
    --sabor-dark-muted: #4b5563;
    --sabor-text: #2e2e2e;
    --sabor-text-muted: #757575;
    --sabor-light: #f3f4f6;
    --sabor-background: #fafafa;
    --sabor-white: #ffffff;
    --sabor-border: #e5e7eb;
    --sabor-border-light: #eee;

    /* Semantic Colors */
    --sabor-success: #10b981;
    --sabor-warning: #f59e0b;
    --sabor-info: #3b82f6;
    --sabor-danger: #ef4444;
    --sabor-purple: #8b5cf6;
    --sabor-cyan: #06b6d4;
    --sabor-orange: #f97316;

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

    /* Border Radius */
    --sabor-radius-sm: 8px;
    --sabor-radius-md: 12px;
    --sabor-radius-lg: 16px;
    --sabor-radius-xl: 20px;
    --sabor-radius-full: 30px;
    --sabor-radius-round: 50%;

    /* Shadows */
    --sabor-shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.04);
    --sabor-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --sabor-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.06);
    --sabor-shadow-xl: 0 10px 30px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --sabor-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sabor-transition-fast: all 0.15s ease;

    /* Font */
    --sabor-font: 'Outfit', sans-serif;
    --sabor-font-size-xs: 0.75rem;
    --sabor-font-size-sm: 0.85rem;
    --sabor-font-size-md: 0.95rem;
    --sabor-font-size-lg: 1.1rem;
    --sabor-font-size-xl: 1.25rem;
    --sabor-font-size-2xl: 1.75rem;

    /* Z-Index Layers */
    --sabor-z-header: 100;
    --sabor-z-sticky: 90;
    --sabor-z-cart: 110;
    --sabor-z-nav: 150;
    --sabor-z-drawer: 200;
    --sabor-z-modal: 300;
    --sabor-z-toast: 400;

    /* Legacy aliases (compatibilidade com módulos existentes) */
    --primary: var(--sabor-primary);
    --primary-dark: var(--sabor-primary-dark);
    --secondary: var(--sabor-secondary);
    --background: var(--sabor-background);
    --surface: var(--sabor-white);
    --text-main: var(--sabor-text);
    --text-muted: var(--sabor-text-muted);
    --white: var(--sabor-white);
    --dark: var(--sabor-dark);
    --dark-muted: var(--sabor-dark-muted);
    --light: var(--sabor-light);
    --success: var(--sabor-success);
    --warning: var(--sabor-warning);
    --info: var(--sabor-info);
    --border-radius: var(--sabor-radius-xl);
    --shadow: var(--sabor-shadow-lg);
    --transition: var(--sabor-transition);
    --danger: var(--sabor-danger);
    --border-light: var(--sabor-border-light);
}

/* =================== RESET & BASE =================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sabor-font);
    font-size: var(--sabor-font-size-md);
    background-color: var(--sabor-background);
    color: var(--sabor-text);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* =================== TYPOGRAPHY =================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

.text-muted { color: var(--sabor-text-muted); }
.text-primary { color: var(--sabor-primary); }
.text-success { color: var(--sabor-success); }
.text-sm { font-size: var(--sabor-font-size-sm); }
.text-xs { font-size: var(--sabor-font-size-xs); }

/* =================== BUTTONS =================== */

button {
    font-family: var(--sabor-font);
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: var(--sabor-radius-md);
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    cursor: pointer;
    transition: var(--sabor-transition-fast);
    font-family: var(--sabor-font);
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background-color: var(--sabor-primary);
    color: var(--sabor-white);
    width: fit-content;
    padding: 0.75rem 1.75rem;
    border-radius: var(--sabor-radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    cursor: pointer;
    transition: var(--sabor-transition-fast);
    font-family: var(--sabor-font);
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--sabor-primary-dark);
    box-shadow: 0 4px 16px rgba(234, 29, 44, 0.35);
    transform: translateY(-2px);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: var(--sabor-light);
    color: var(--sabor-dark);
    border: 1px solid var(--sabor-border);
    width: fit-content;
    padding: 0.75rem 1.75rem;
    border-radius: var(--sabor-radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    cursor: pointer;
    transition: var(--sabor-transition-fast);
    font-family: var(--sabor-font);
    white-space: nowrap;
}

.btn-secondary:hover {
    background-color: var(--sabor-border);
    border-color: var(--sabor-text-muted);
    transform: translateY(-2px);
}

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

.btn-success { background-color: var(--sabor-success); color: var(--sabor-white); }
.btn-danger { background-color: var(--sabor-danger); color: var(--sabor-white); }
.btn-ghost { background: transparent; color: var(--sabor-text-muted); }
.btn-ghost:hover { background: var(--sabor-light); color: var(--sabor-text); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: var(--sabor-font-size-xs); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--sabor-radius-round); display: flex; align-items: center; justify-content: center; }
.btn-checkout {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--sabor-secondary);
    color: var(--sabor-white);
    border: none;
    border-radius: 8px;
    font-size: var(--sabor-font-size-lg);
    font-weight: 700;
    cursor: pointer;
    transition: var(--sabor-transition);
}

.btn-checkout:hover {
    background-color: var(--sabor-secondary-dark);
    transform: translateY(-2px);
}

.btn-add {
    background: var(--sabor-primary-dark);
    color: var(--sabor-white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--sabor-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: var(--sabor-transition);
}

.btn-add:hover { transform: scale(1.1); }

.btn-finalize {
    width: fit-content;
    padding: 0.75rem 1.75rem;
    background-color: var(--sabor-secondary);
    color: var(--sabor-white);
    border: none;
    border-radius: var(--sabor-radius-full);
    font-size: var(--sabor-font-size-lg);
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--sabor-space-lg);
    box-shadow: 0 6px 20px rgba(0, 160, 130, 0.2);
    transition: var(--sabor-transition);
}

.btn-finalize:hover {
    background-color: var(--sabor-secondary-dark);
    transform: translateY(-2px);
}

.btn-add-modal {
    background-color: var(--sabor-primary);
    color: var(--sabor-white);
    padding: 0.9rem 2rem;
    border: none;
    border-radius: var(--sabor-radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--sabor-transition);
}

.btn-add-modal:hover { background-color: var(--sabor-primary-dark); }

.btn-filter {
    padding: 6px 14px;
    background: var(--sabor-white);
    border: 1px solid var(--sabor-border);
    border-radius: var(--sabor-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sabor-transition);
    font-family: var(--sabor-font);
}

.btn-filter.active {
    background: var(--sabor-primary);
    color: var(--sabor-white);
    border-color: var(--sabor-primary);
}

.btn-filter:hover:not(.active) {
    border-color: var(--sabor-primary);
    color: var(--sabor-primary);
}

/* =================== FORM ELEMENTS =================== */

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--sabor-border-light);
    border-radius: var(--sabor-radius-md);
    outline: none;
    font-size: var(--sabor-font-size-md);
    font-family: var(--sabor-font);
    background: var(--sabor-white);
    transition: var(--sabor-transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--sabor-primary);
    box-shadow: 0 0 0 3px rgba(234, 29, 44, 0.08);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* =================== CARDS =================== */

.card {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-lg);
    padding: var(--sabor-space-lg);
    box-shadow: var(--sabor-shadow-md);
    border: 1px solid var(--sabor-border);
    transition: var(--sabor-transition);
}

.card:hover { border-color: var(--sabor-primary); }

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

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

/* =================== BADGES / TAGS =================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--sabor-radius-full);
    font-size: var(--sabor-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-warning { background-color: #fef3c7; color: #d97706; }
.badge-info { background-color: #dbeafe; color: #2563eb; }
.badge-success { background-color: #d1fae5; color: #059669; }
.badge-danger { background-color: #fecaca; color: #dc2626; }
.badge-purple { background-color: #ede9fe; color: #7c3aed; }

/* =================== MODALS =================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--sabor-z-modal);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.2s ease;
}

.modal-card {
    background: var(--sabor-white);
    padding: var(--sabor-space-xl);
    border-radius: var(--sabor-radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 450px;
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-card h3 {
    margin-bottom: var(--sabor-space-sm);
    font-size: var(--sabor-font-size-xl);
}

/* =================== TABLES =================== */

.table-container { overflow-x: auto; }

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

table th {
    background-color: var(--sabor-light);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--sabor-border);
    font-size: var(--sabor-font-size-sm);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--sabor-border);
    font-size: var(--sabor-font-size-sm);
}

table tr:hover td { background-color: #f9fafb; }

/* =================== STATUS =================== */

.status-bar {
    padding: 0.65rem 1rem;
    border-radius: var(--sabor-radius-md);
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    border-left: 4px solid;
    line-height: 1.4;
    background: var(--sabor-light);
}

.status-badge {
    background: var(--sabor-success);
    color: var(--sabor-white);
    padding: 6px 14px;
    border-radius: var(--sabor-radius-full);
    font-size: var(--sabor-font-size-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-round);
    animation: pulse 2s infinite;
}

/* =================== PROGRESS BAR =================== */

.progress-bar {
    display: flex;
    gap: 6px;
    margin: 0.8rem 0;
    width: 100%;
}

.progress-segment {
    flex: 1;
    height: 6px;
    border-radius: 4px;
    background-color: var(--sabor-border);
    transition: background-color 0.3s ease;
}

.progress-segment.active { background-color: var(--sabor-primary); }
.progress-segment.done { background-color: var(--sabor-success); }

/* =================== ANIMATIONS =================== */

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

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

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

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

@keyframes timelinePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(234, 29, 44, 0.15); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(234, 29, 44, 0.08); }
}

/* =================== UTILITY CLASSES =================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--sabor-space-xs); }
.gap-sm { gap: var(--sabor-space-sm); }
.gap-md { gap: var(--sabor-space-md); }
.gap-lg { gap: var(--sabor-space-lg); }

.mt-sm { margin-top: var(--sabor-space-sm); }
.mt-md { margin-top: var(--sabor-space-md); }
.mt-lg { margin-top: var(--sabor-space-lg); }
.mb-sm { margin-bottom: var(--sabor-space-sm); }
.mb-md { margin-bottom: var(--sabor-space-md); }
.mb-lg { margin-bottom: var(--sabor-space-lg); }

.p-sm { padding: var(--sabor-space-sm); }
.p-md { padding: var(--sabor-space-md); }
.p-lg { padding: var(--sabor-space-lg); }

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

.w-full { width: 100%; }
.hidden { display: none; }
.relative { position: relative; }

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

/* =================== SCROLLBAR =================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* =============================================================
   MÓDULO CLIENTE (estilos específicos)
   ============================================================= */

/* Padding-bottom para bottom nav fixo (módulo cliente) */
body { padding-bottom: 90px; }
body:has(.restaurante-main) { padding-bottom: 0; }
body:has(.app-header) { padding-bottom: 0; }

/* Header */
header {
    background: var(--sabor-white);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: var(--sabor-z-header);
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 45px;
    height: 45px;
    background: var(--sabor-primary);
    color: var(--sabor-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.brand-name h1 { font-size: 1.15rem; font-weight: 700; }

.brand-name span {
    font-size: var(--sabor-font-size-xs);
    color: var(--sabor-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--sabor-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--sabor-transition);
}

.btn-logout:hover { color: var(--sabor-primary); }

/* Hero Banner */
.hero {
    position: relative;
    height: 220px;
    margin: 1.5rem 5%;
    border-radius: var(--sabor-radius-xl);
    overflow: hidden;
    box-shadow: var(--sabor-shadow-lg);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    color: var(--sabor-white);
}

.hero-overlay h2 { font-size: var(--sabor-font-size-2xl); margin-bottom: 0.25rem; }

/* Search */
.search-section { padding: 0.75rem 5%; }

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-full);
    box-shadow: var(--sabor-shadow-sm);
    border: 1px solid var(--sabor-border-light);
    transition: var(--sabor-transition);
}

.search-container:focus-within {
    border-color: var(--sabor-primary);
    box-shadow: 0 2px 16px rgba(234, 29, 44, 0.08);
}

.search-icon {
    position: absolute;
    left: 16px;
    color: #bbb;
    font-size: 0.95rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.85rem 2.5rem 0.85rem 2.8rem;
    border: none;
    border-radius: var(--sabor-radius-full);
    outline: none;
    font-size: var(--sabor-font-size-md);
    background: transparent;
    font-family: var(--sabor-font);
}

.search-input::placeholder { color: #bbb; }

.search-clear {
    position: absolute;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--sabor-light);
    border-radius: var(--sabor-radius-round);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sabor-text-muted);
    font-size: 1.1rem;
    transition: var(--sabor-transition);
}

.search-clear:hover { background: var(--sabor-border); color: var(--sabor-dark-muted); }

/* Categories */
.categories {
    padding: 0.75rem 5%;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    position: sticky;
    top: 65px;
    background: var(--sabor-background);
    z-index: var(--sabor-z-sticky);
    scrollbar-width: none;
}

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

.category-tab {
    padding: 0.6rem 1.2rem;
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-full);
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--sabor-border-light);
    transition: var(--sabor-transition);
}

.category-tab.active {
    background: var(--sabor-primary);
    color: var(--sabor-white);
    border-color: var(--sabor-primary);
}

/* Menu Grid */
.menu-section { padding: 0 5%; margin-bottom: 2rem; }

.menu-title { font-size: var(--sabor-font-size-xl); font-weight: 700; margin-bottom: 1rem; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-xl);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--sabor-shadow-lg);
    transition: var(--sabor-transition);
    border: 1px solid transparent;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--sabor-border-light);
}

.product-img {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.product-desc { font-size: var(--sabor-font-size-xs); color: var(--sabor-text-muted); line-height: 1.3; margin-bottom: 8px; }
.product-price-row { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-weight: 700; color: var(--sabor-primary); }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--sabor-white);
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.6rem 0 0.7rem 0;
    z-index: var(--sabor-z-nav);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.04);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: #9ca3af;
    font-size: var(--sabor-font-size-xs);
    font-weight: 600;
    transition: var(--sabor-transition);
    padding: 0.2rem 0.8rem;
    border-radius: var(--sabor-radius-md);
    position: relative;
}

.bottom-nav-item i { font-size: 1.2rem; transition: var(--sabor-transition); }
.bottom-nav-item.active { color: var(--sabor-primary); }
.bottom-nav-item.active i { transform: scale(1.05); }

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -0.6rem;
    width: 24px;
    height: 3px;
    background: var(--sabor-primary);
    border-radius: 0 0 4px 4px;
}

.bottom-nav-item:hover { color: var(--sabor-primary); }

/* Bottom Nav Badge */
.nav-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    background: var(--sabor-primary);
    color: var(--sabor-white);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(234, 29, 44, 0.3);
    animation: badgePopIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.nav-badge.hidden {
    display: none;
}

@keyframes badgePopIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.bottom-nav-item {
    position: relative;
}

/* Pulse animation when there's a new pending delivery */
.nav-badge.pulse {
    animation: badgePulse 1.5s ease-in-out infinite, badgePopIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 6px rgba(234, 29, 44, 0.3); }
    50% { box-shadow: 0 2px 12px rgba(234, 29, 44, 0.6); }
}

/* Profile */
.view-header { padding: 1.2rem 5% 0.5rem 5%; }

.profile-container { padding: 0 5% 2rem 5%; max-width: 600px; margin: 0 auto; }

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-xl);
    box-shadow: var(--sabor-shadow-lg);
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--sabor-primary), var(--sabor-primary-dark));
    border-radius: var(--sabor-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sabor-white);
    font-size: 1.5rem;
}

.profile-avatar-section h3 { font-size: var(--sabor-font-size-lg); font-weight: 700; }

.profile-form {
    background: var(--sabor-white);
    padding: var(--sabor-space-lg);
    border-radius: var(--sabor-radius-xl);
    box-shadow: var(--sabor-shadow-lg);
}

.form-row-cep {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: flex-end;
}

.form-row-cep .form-group { margin-bottom: 0; }

.form-row-cep button {
    height: 44px;
    padding: 0 1.2rem;
    white-space: nowrap;
    margin-bottom: 1.25rem;
    border-radius: var(--sabor-radius-md);
    border: 1px solid var(--sabor-border-light);
    background: var(--sabor-white);
    color: var(--sabor-text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--sabor-transition);
    font-family: var(--sabor-font);
}

.form-row-cep button:hover { background: var(--sabor-background); border-color: var(--sabor-primary); }

.profile-section-title {
    font-size: var(--sabor-font-size-md);
    font-weight: 700;
    margin: var(--sabor-space-lg) 0 var(--sabor-space-md) 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title i { color: var(--sabor-primary); }

.profile-success-msg {
    background: #f0fdf4;
    color: var(--sabor-success);
    padding: 0.75rem 1rem;
    border-radius: var(--sabor-radius-md);
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.profile-error-msg {
    background: #fef2f2;
    color: var(--sabor-danger);
    padding: 0.75rem 1rem;
    border-radius: var(--sabor-radius-md);
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

/* Order History */
.orders-list-container {
    padding: 0 5% 2rem 5%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.order-history-card {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-xl);
    padding: 1.25rem;
    box-shadow: var(--sabor-shadow-lg);
    border: 1px solid #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--sabor-transition);
}

.order-history-card:hover {
    border-color: var(--sabor-border-light);
    transform: translateY(-2px);
}

.order-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 6px;
}

.order-history-header .order-id { font-weight: 700; color: var(--sabor-primary); }
.order-history-header .order-time { font-size: var(--sabor-font-size-xs); color: var(--sabor-text-muted); }
.order-history-details { font-size: var(--sabor-font-size-sm); color: var(--sabor-text); line-height: 1.5; }
.order-history-details div { margin-bottom: 3px; }
.order-notes { font-size: var(--sabor-font-size-xs); color: var(--sabor-text-muted); font-style: italic; }
.order-delivery-info { font-size: var(--sabor-font-size-sm); color: var(--sabor-primary); font-weight: 600; }

.order-message-bubble {
    background: #eff6ff;
    border-left: 4px solid var(--sabor-info);
    padding: 8px 12px;
    border-radius: var(--sabor-radius-sm);
    font-size: var(--sabor-font-size-xs);
    color: #1e3a8a;
    margin-top: 4px;
}

.order-message-bubble ul { list-style: none; margin-top: 4px; padding-left: 0; }

.order-message-bubble.has-messages {
    border-left-color: var(--sabor-warning);
    background: #fefce8;
    animation: messageGlow 0.5s ease;
}

@keyframes messageGlow {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.order-message-badge {
    font-weight: 700;
    font-size: var(--sabor-font-size-sm);
    color: #92400e;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-message-badge i {
    animation: messagePulse 2s ease-in-out infinite;
}

@keyframes messagePulse {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.order-status-bar {
    padding: 0.65rem 1rem;
    border-radius: var(--sabor-radius-md);
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    border-left: 4px solid;
    margin-top: 4px;
    line-height: 1.4;
    background: var(--sabor-light);
}

/* Floating Cart */
.cart-bar {
    position: fixed;
    bottom: 75px;
    left: 5%;
    right: 5%;
    background: var(--sabor-primary);
    color: var(--sabor-white);
    padding: 1rem 1.5rem;
    border-radius: var(--sabor-radius-full);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(234, 29, 44, 0.3);
    cursor: pointer;
    z-index: var(--sabor-z-cart);
    transition: var(--sabor-transition);
}

.cart-bar:hover { transform: translateY(-3px); }

/* Checkout */
.checkout-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: calc(var(--sabor-z-drawer) - 1);
    animation: modalFadeIn 0.2s ease;
}

.checkout-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-xl) var(--sabor-radius-xl) 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
    z-index: var(--sabor-z-drawer);
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem 5%;
    touch-action: pan-y;
}

.checkout-drawer.open { bottom: 0; }

.checkout-drawer::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: -0.5rem auto 1rem auto;
}

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

.drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--sabor-text-muted);
}

/* Checkout Steps */
.checkout-step {
    padding: 6px 12px;
    border-radius: var(--sabor-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--sabor-light);
    color: var(--sabor-text-muted);
    transition: var(--sabor-transition);
}

.checkout-step.active { background: var(--sabor-primary); color: var(--sabor-white); }
.checkout-step.completed { background: #d1fae5; color: var(--sabor-success); }

/* Product Modal */
.product-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--sabor-z-modal);
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

@media(min-width: 768px) {
    .product-modal-backdrop { align-items: center; }
}

.product-modal {
    background: var(--sabor-white);
    width: 100%;
    max-width: 500px;
    border-radius: var(--sabor-radius-xl) var(--sabor-radius-xl) 0 0;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media(min-width: 768px) {
    .product-modal {
        border-radius: var(--sabor-radius-xl);
        animation: fadeIn 0.2s ease;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--sabor-radius-round);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--sabor-shadow-lg);
}

.product-modal img { width: 100%; height: 200px; object-fit: cover; }
.modal-body { padding: var(--sabor-space-lg); }
.modal-body h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }

.extra-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
}

.extra-row label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: var(--sabor-font-size-md);
}

.extra-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--sabor-primary); }

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--sabor-space-lg);
    border-top: 1px solid var(--sabor-border-light);
    padding-top: 1rem;
}

/* Timer */
.timer-container {
    background: linear-gradient(135deg, var(--sabor-primary), var(--sabor-primary-dark));
    color: var(--sabor-white);
    border-radius: var(--sabor-radius-xl);
    padding: 1.5rem;
    margin: 1.5rem 5%;
    text-align: center;
    box-shadow: 0 8px 25px rgba(234, 29, 44, 0.2);
}

.timer-container h3 { font-size: var(--sabor-font-size-lg); margin-bottom: 0.5rem; opacity: 0.95; }

.timer-display {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.25rem;
}

.timer-label { font-size: var(--sabor-font-size-sm); opacity: 0.85; }

.timer-progress {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
}

.timer-progress-fill {
    height: 100%;
    background: var(--sabor-white);
    border-radius: 4px;
    transition: width 1s linear;
}

/* Tracking */
.tracking-container { padding: 0 5% 2rem 5%; max-width: 500px; margin: 0 auto; }

.tracking-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2rem;
    padding-left: 30px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    z-index: 0;
}

.timeline-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    opacity: 0.4;
    transition: var(--sabor-transition);
}

.timeline-step.active { opacity: 1; }
.timeline-step.current .timeline-icon { animation: timelinePulse 2s ease-in-out infinite; }

.timeline-icon {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: var(--sabor-radius-round);
    background: var(--sabor-white);
    border: 3px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.65rem;
    color: #9ca3af;
    transition: var(--sabor-transition);
}

.timeline-step.active .timeline-icon {
    border-color: var(--sabor-success);
    background: var(--sabor-success);
    color: var(--sabor-white);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.timeline-step.current .timeline-icon {
    border-color: var(--sabor-primary);
    background: var(--sabor-primary);
    color: var(--sabor-white);
    box-shadow: 0 0 0 4px rgba(234, 29, 44, 0.15);
}

.timeline-content { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.timeline-content strong { font-size: 0.95rem; font-weight: 700; }
.timeline-content span { font-size: 0.8rem; color: var(--sabor-text-muted); }
.timeline-step.active .timeline-content strong { color: var(--sabor-text); }
.timeline-step.active .timeline-content span { color: var(--sabor-text-muted); }
.timeline-step.current .timeline-content strong { color: var(--sabor-primary); }

.tracking-status-card {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-xl);
    padding: var(--sabor-space-lg);
    box-shadow: var(--sabor-shadow-lg);
    text-align: center;
    border: 1px solid var(--sabor-border-light);
}

.tracking-order-id { font-size: 1.5rem; font-weight: 700; color: var(--sabor-primary); margin-bottom: 0.5rem; }
.tracking-current-status { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; color: var(--sabor-success); }

.tracking-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--sabor-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.tracking-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    width: 0%;
}

.tracking-time { font-size: 0.9rem; color: var(--sabor-text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; }

/* =============================================================
   MÓDULO ENTREGADOR (estilos específicos)
   ============================================================= */

.app-header {
    background: var(--sabor-white);
    padding: 1rem 5%;
    box-shadow: var(--sabor-shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: var(--sabor-z-header);
}

.driver-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.driver-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--sabor-radius-round);
    background: linear-gradient(135deg, var(--sabor-primary), var(--sabor-primary-dark));
    color: var(--sabor-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.app-content {
    flex: 1;
    padding: 1rem 5%;
    overflow-y: auto;
}

.dashboard-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.summary-chip {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-md);
    padding: 0.75rem 1rem;
    box-shadow: var(--sabor-shadow-sm);
    border: 1px solid var(--sabor-border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.summary-chip i { color: var(--sabor-success); font-size: 1.1rem; }
.summary-chip-label { font-weight: 400; font-size: var(--sabor-font-size-sm); color: var(--sabor-text-muted); }

.section-title {
    font-size: var(--sabor-font-size-md);
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-card {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-lg);
    padding: var(--sabor-space-lg);
    box-shadow: var(--sabor-shadow-md);
    border: 1px solid var(--sabor-border);
}

.delivery-card.completed {
    opacity: 0.85;
    background: #fafafa;
}

.delivery-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: var(--sabor-radius-full);
    font-size: var(--sabor-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.status-waiting { background: #fef3c7; color: #d97706; }
.status-transit { background: #dbeafe; color: #2563eb; }
.status-arrived { background: #f3e8ff; color: #7c3aed; }
.status-completed { background: #d1fae5; color: #059669; }

.address-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.address-step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.address-step i { margin-top: 2px; font-size: 1rem; color: var(--sabor-primary); }
.address-step.dest i { color: var(--sabor-secondary); }

.action-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: var(--sabor-radius-md);
    font-weight: 700;
    font-size: var(--sabor-font-size-sm);
    cursor: pointer;
    transition: var(--sabor-transition);
    font-family: var(--sabor-font);
}

.action-btn:hover { transform: translateY(-2px); }

.btn-action-start { background: var(--sabor-success); color: var(--sabor-white); }
.btn-action-arrive { background: var(--sabor-purple); color: var(--sabor-white); }
.btn-action-complete { background: var(--sabor-primary); color: var(--sabor-white); }

/* Finance View (Entregador) */

.finance-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.finance-card {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-lg);
    padding: 1rem;
    box-shadow: var(--sabor-shadow-sm);
    border: 1px solid var(--sabor-border-light);
    text-align: center;
    transition: var(--sabor-transition);
}

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

.finance-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--sabor-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem auto;
    font-size: 1rem;
}

.finance-card-icon.today {
    background: #dbeafe;
    color: #2563eb;
}

.finance-card-icon.week {
    background: #d1fae5;
    color: #059669;
}

.finance-card-icon.month {
    background: #fef3c7;
    color: #d97706;
}

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

.finance-card-label {
    font-size: var(--sabor-font-size-xs);
    color: var(--sabor-text-muted);
    margin-top: 2px;
}

.finance-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.finance-item {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-md);
    padding: 0.85rem 1rem;
    box-shadow: var(--sabor-shadow-sm);
    border: 1px solid var(--sabor-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--sabor-transition);
}

.finance-item:hover {
    border-color: var(--sabor-border);
}

.finance-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.finance-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--sabor-radius-round);
    background: var(--sabor-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sabor-primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.finance-item-info {
    display: flex;
    flex-direction: column;
}

.finance-item-order {
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
}

.finance-item-customer {
    font-size: var(--sabor-font-size-xs);
    color: var(--sabor-text-muted);
}

.finance-item-amount {
    font-weight: 700;
    color: var(--sabor-success);
    font-size: var(--sabor-font-size-md);
    white-space: nowrap;
}

.finance-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--sabor-text-muted);
}

.finance-empty i {
    font-size: 3rem;
    color: #ddd;
    display: block;
    margin-bottom: 1rem;
}

/* Login Container (Entregador + Restaurante) */
.login-container {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-xl);
    padding: var(--sabor-space-xl);
    box-shadow: var(--sabor-shadow-xl);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--sabor-primary), var(--sabor-primary-dark));
    border-radius: var(--sabor-radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    color: var(--sabor-white);
    font-size: 1.5rem;
}

.login-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.login-subtitle { font-size: var(--sabor-font-size-sm); color: var(--sabor-text-muted); margin-bottom: 2rem; }

/* =============================================================
   MÓDULO RESTAURANTE (estilos específicos)
   ============================================================= */

/* Dashboard Grid */
.dashboard-grid {
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.75rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: 1fr; padding: 1rem; gap: 1.25rem; }
}

.dashboard-stat-card {
    background: var(--sabor-white);
    border-radius: var(--sabor-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--sabor-shadow-md);
    border: 1px solid var(--sabor-border);
    text-align: center;
}

.dashboard-stat-card.success { border-left: 4px solid var(--sabor-success); }
.dashboard-stat-card.info { border-left: 4px solid var(--sabor-info); }
.dashboard-stat-card.warning { border-left: 4px solid var(--sabor-warning); }

.dashboard-stat-value { font-size: 1.75rem; font-weight: 700; color: var(--sabor-text); }
.dashboard-stat-label { font-size: var(--sabor-font-size-xs); color: var(--sabor-text-muted); margin-top: 0.25rem; }

/* Order List */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 4px;
}

.order-item {
    background: var(--sabor-white);
    border: 1px solid var(--sabor-border);
    border-radius: var(--sabor-radius-md);
    padding: 1.25rem;
    transition: var(--sabor-transition);
    cursor: pointer;
}

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

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

.order-header .order-id {
    font-weight: 700;
    color: var(--sabor-primary);
    font-size: 1.1rem;
}

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

.order-details {
    font-size: var(--sabor-font-size-md);
    color: var(--sabor-dark-muted);
    line-height: 1.6;
    margin-top: 0.5rem;
}

.order-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.order-detail-label { font-weight: 600; color: var(--sabor-text-muted); font-size: 0.85rem; }
.order-detail-value { text-align: right; }

/* Order Timer */
.order-timer {
    display: flex;
    gap: 12px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.order-timer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--sabor-font-size-sm);
    background: var(--sabor-light);
    padding: 6px 12px;
    border-radius: var(--sabor-radius-full);
}

.order-timer-item.urgent {
    background: #fef2f2;
    color: var(--sabor-danger);
}

.order-timer-item i { font-size: 0.8rem; }

/* Progress Bar V2 (multi-fase) */
.progress-bar-v2 {
    display: flex;
    gap: 4px;
    margin: 8px 0;
    width: 100%;
}

.progress-phase-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-phase-track {
    height: 6px;
    background: var(--sabor-light);
    border-radius: 3px;
    overflow: hidden;
}

.progress-phase-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-segment-active {
    animation: pulse 2s infinite;
}

.progress-phase-label {
    font-size: 0.6rem;
    color: var(--sabor-text-muted);
    white-space: nowrap;
    text-align: center;
}

/* Sidebar */
aside {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--sabor-dark);
    color: var(--sabor-white);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    z-index: var(--sabor-z-header);
    box-shadow: 2px 0 12px rgba(0,0,0,0.06);
}

aside .logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 1.5rem 1rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

aside .logo-container i { font-size: 1.5rem; color: var(--sabor-primary); }

aside nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    padding: 0 0.75rem;
}

aside nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1rem;
    border-radius: var(--sabor-radius-md);
    color: rgba(255,255,255,0.65);
    font-size: var(--sabor-font-size-sm);
    font-weight: 500;
    transition: var(--sabor-transition);
    border-left: 3px solid transparent;
}

aside nav a:hover {
    background: rgba(255,255,255,0.06);
    color: var(--sabor-white);
}

aside nav a.active {
    background: rgba(234, 29, 44, 0.12);
    color: var(--sabor-primary);
    font-weight: 700;
    border-left-color: var(--sabor-primary);
}

aside nav a i { width: 20px; text-align: center; font-size: 1rem; }

/* Restaurante Main */
.restaurante-main {
    margin-left: 260px;
    min-height: 100vh;
    background: var(--sabor-background);
}

.restaurante-main header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: var(--sabor-white);
    border-bottom: 1px solid var(--sabor-border);
    position: sticky;
    top: 0;
    z-index: var(--sabor-z-header);
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}

.restaurante-main header h1 { font-size: 1.5rem; font-weight: 700; }

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider { background-color: var(--sabor-success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* Config Users */
.config-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--sabor-border-light);
}

.config-user-item:last-child { border-bottom: none; }

.user-info { display: flex; flex-direction: column; gap: 2px; }
.user-name { font-weight: 600; font-size: var(--sabor-font-size-sm); }
.user-email { font-size: var(--sabor-font-size-xs); color: var(--sabor-text-muted); }
.user-badge { padding: 2px 8px; border-radius: var(--sabor-radius-full); font-size: 0.65rem; font-weight: 700; text-transform: uppercase; }
.badge-admin { background: #fef3c7; color: #d97706; }
.badge-gerente { background: #dbeafe; color: #2563eb; }
.badge-chef { background: #f3e8ff; color: #7c3aed; }
.badge-caixa { background: #d1fae5; color: #059669; }

.btn-delete-user {
    background: none;
    border: none;
    color: var(--sabor-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: var(--sabor-transition);
}

.btn-delete-user:hover { color: var(--sabor-danger); }

.btn-radius-remove {
    background: none;
    border: none;
    color: var(--sabor-danger);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* =================== PRODUCT UPLOAD AREA =================== */

.product-upload-area {
    margin-top: 4px;
}

.upload-placeholder {
    text-align: center;
    padding: 2rem 1rem;
    border: 2px dashed var(--sabor-border);
    border-radius: var(--sabor-radius-md);
    cursor: pointer;
    transition: var(--sabor-transition);
    background: var(--sabor-light);
}

.upload-placeholder:hover {
    border-color: var(--sabor-primary);
    background: var(--sabor-primary-light);
}

.upload-placeholder i {
    font-size: 2rem;
    color: var(--sabor-text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.upload-placeholder p {
    color: var(--sabor-dark-muted);
    font-weight: 600;
    font-size: var(--sabor-font-size-sm);
    margin-bottom: 4px;
}

.upload-placeholder span {
    color: var(--sabor-text-muted);
    font-size: var(--sabor-font-size-xs);
}

.upload-preview {
    position: relative;
    display: inline-block;
    width: 100%;
}

.upload-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--sabor-radius-md);
    border: 1px solid var(--sabor-border);
}

.upload-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--sabor-transition);
}

.upload-remove-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

/* CRM Table */
.crm-table th, .crm-table td { white-space: nowrap; }
.crm-table th:first-child, .crm-table td:first-child { padding-left: 1rem; }

/* Response */
@media(max-width: 768px) {
    aside { display: none; }
    .restaurante-main { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .card { padding: var(--sabor-space-md); }
    h1 { font-size: 1.35rem; }
    h2 { font-size: 1.15rem; }
    table th, table td { padding: 0.6rem; }
    .products-grid { grid-template-columns: 1fr; }
    .form-row-cep { grid-template-columns: 1fr; }
    .form-row-cep button { width: 100%; }
    .hero { height: 160px; margin: 1rem 5%; }
    .hero-overlay h2 { font-size: 1.5rem; }
}
