/**
 * Mobile CSS - Admin Mobile Multi Menu
 * 
 * CSS isolado e otimizado para toque.
 * Não depende de nenhum CSS desktop.
 * 
 * @author Multi Menu
 * @version 1.0.0
 */

/* ========= RESET & BASE ========= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========= CSS VARIABLES ========= */
:root {
    /* Colors */
    --primary: #5B21B6;
    --primary-dark: #4c1d95;
    --primary-light: #ede9fe;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Layout */
    --header-height: 56px;
    --bottom-nav-height: 64px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-top: env(safe-area-inset-top, 0px);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

/* ========= MOBILE BODY ========= */
.mobile-body {
    padding-top: calc(var(--header-height) + var(--safe-area-top));
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--spacing-md));
}

/* ========= HEADER ========= */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--header-height) + var(--safe-area-top));
    padding-top: var(--safe-area-top);
    background: var(--primary);
    color: white;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

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

.header-left,
.header-right {
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.header-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-back,
.btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: background 0.2s;
    position: relative;
}

.btn-back:active,
.btn-icon:active {
    background: rgba(255,255,255,0.2);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========= MAIN CONTENT ========= */
.mobile-main {
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    min-height: calc(100dvh - var(--header-height) - var(--bottom-nav-height));
    padding: var(--spacing-md);
}

/* ========= FILTERS & SEARCH ========= */
.filters-bar {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--gray-100);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
}

.search-input-wrapper svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--gray-800);
    outline: none;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.filter-row {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 120px;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
    font-size: 14px;
    color: var(--gray-700);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ========= BOTTOM NAVIGATION ========= */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: white;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--spacing-sm) var(--spacing-xs);
    color: var(--gray-500);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active svg {
    transform: scale(1.1);
}

.nav-item:active {
    background: var(--gray-100);
}

.nav-item-center {
    position: relative;
    margin-top: -20px;
}

.nav-fab {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(91, 33, 182, 0.4);
}

.nav-item-center.active .nav-fab {
    background: var(--primary-dark);
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 20px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========= STAT CARDS ========= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}

.stat-card--success { border-left-color: var(--success); }
.stat-card--warning { border-left-color: var(--warning); }
.stat-card--danger { border-left-color: var(--danger); }
.stat-card--info { border-left-color: var(--info); }
.stat-card--primary { border-left-color: var(--primary); }

.stat-card__header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.stat-card__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
}

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

.stat-card__icon svg {
    width: 18px;
    height: 18px;
}

.stat-card__title {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-card__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-card__trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: var(--spacing-xs);
}

.stat-card__trend--up { color: var(--success); }
.stat-card__trend--down { color: var(--danger); }
.stat-card__trend--neutral { color: var(--gray-500); }

/* ========= QUICK ACTIONS ========= */
.quick-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.quick-actions .btn-primary,
.quick-actions .btn-secondary {
    flex: 1;
    min-width: 140px;
}

/* ========= ORDER CARDS ========= */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.order-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:active {
    transform: scale(0.98);
}

.order-card__header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-100);
}

.order-card__number {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.order-card__time {
    font-size: 13px;
    color: var(--gray-500);
    margin-left: auto;
    margin-right: var(--spacing-sm);
}

.order-card__badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.order-card__badge--warning { background: var(--warning-light); color: #92400e; }
.order-card__badge--info { background: var(--info-light); color: #1e40af; }
.order-card__badge--primary { background: var(--primary-light); color: var(--primary); }
.order-card__badge--success { background: var(--success-light); color: #065f46; }
.order-card__badge--danger { background: var(--danger-light); color: #991b1b; }

.order-card__body {
    padding: var(--spacing-md);
}

.order-card__customer {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

.order-card__customer svg {
    color: var(--gray-400);
}

.order-card__info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: var(--spacing-sm);
}

.order-card__total {
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
}

.order-card__actions {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.btn-action {
    flex: 1;
    padding: 12px var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    text-align: center;
    text-decoration: none;
}

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

.btn-action--primary { background: var(--primary); color: white; }
.btn-action--success { background: var(--success); color: white; }
.btn-action--warning { background: var(--warning); color: white; }
.btn-action--danger { background: var(--danger); color: white; }
.btn-action--secondary { background: var(--gray-200); color: var(--gray-700); }

/* ========= PRODUCT CARDS ========= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
}

.product-card__image {
    position: relative;
    padding-top: 75%;
    background: var(--gray-100);
}

.product-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__unavailable {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__unavailable span {
    background: var(--danger);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.product-card__content {
    padding: var(--spacing-md);
}

.product-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__category {
    font-size: 12px;
    color: var(--gray-500);
}

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
}

.product-card__price {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
}

.product-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ========= TOGGLE SWITCH ========= */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    z-index: 2;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ========= EMPTY STATE ========= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    min-height: 300px;
    background: white;
    border-radius: var(--radius-lg);
}

.empty-state svg {
    color: var(--gray-300);
    margin-bottom: var(--spacing-md);
    width: 64px;
    height: 64px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: var(--spacing-lg);
    max-width: 260px;
}

.empty-state__icon {
    color: var(--gray-300);
    margin-bottom: var(--spacing-lg);
}

.empty-state__icon svg {
    width: 64px;
    height: 64px;
}

.empty-state__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
}

.empty-state__message {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: var(--spacing-lg);
    max-width: 260px;
}

/* ========= FAB (Floating Action Button) ========= */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--spacing-md));
    right: var(--spacing-md);
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 50;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fab:active {
    transform: scale(0.95);
}

.fab svg {
    width: 24px;
    height: 24px;
}

/* ========= BUTTONS ========= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px var(--spacing-lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.96);
    background: var(--primary-dark);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px var(--spacing-lg);
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:active {
    background: var(--gray-300);
}

/* ========= PAGINATION ========= */
.pagination {
    padding: var(--spacing-md) 0;
}

.pagination > div {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    align-items: center;
}

/* ========= SECTION HEADER ========= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.section-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* ========= TABS ========= */
.tabs {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    flex: 1;
    min-width: max-content;
    padding: 10px var(--spacing-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

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

.tabs-compact {
    margin-bottom: var(--spacing-md);
}

.tabs-compact .tab {
    padding: 8px var(--spacing-sm);
    font-size: 13px;
}

/* ========= SEARCH BAR ========= */
.search-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: white;
    border-radius: var(--radius-md);
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.search-bar svg {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 15px;
    color: var(--gray-800);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--gray-400);
}

/* ========= TOAST ========= */
.toast-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--spacing-md));
    left: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

.toast {
    background: var(--gray-800);
    color: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    pointer-events: auto;
}

.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--warning { background: var(--warning); }

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

/* ========= LOADING ========= */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========= PULL TO REFRESH ========= */
.ptr-indicator {
    position: fixed;
    top: calc(var(--header-height) + var(--safe-area-top));
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 50;
    transition: transform 0.3s;
}

.ptr-indicator.active {
    transform: translateX(-50%) translateY(10px);
}

.ptr-indicator svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

/* ========= LOGIN PAGE ========= */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.login-logo img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: var(--gray-800);
    margin-bottom: var(--spacing-xs);
}

.login-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--spacing-xs);
}

.form-input {
    width: 100%;
    padding: 14px var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--gray-800);
    background: var(--gray-50);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-error {
    font-size: 13px;
    color: var(--danger);
    margin-top: var(--spacing-xs);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--spacing-md);
}

/* ========= RESPONSIVE UTILITIES ========= */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.hidden { display: none !important; }
.visible { display: block !important; }

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-scaleIn { animation: scaleIn 0.3s ease; }

/* ========= PRODUCTS LIST ========= */
.products-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.product-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.product-card-image {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-400);
}

.product-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.product-badge.inactive {
    background: var(--gray-600);
    color: white;
}

.product-badge.promo {
    background: var(--danger);
    color: white;
}

.product-card-content {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 12px;
    color: var(--gray-500);
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.price-current {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
}

.price-current.promo {
    color: var(--danger);
}

.price-old {
    font-size: 13px;
    color: var(--gray-400);
    text-decoration: line-through;
}

.product-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-icon-sm {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    color: var(--gray-600);
    cursor: pointer;
    text-decoration: none;
}

.btn-icon-sm:active {
    background: var(--gray-200);
}

/* ========= CATEGORY CHIPS ========= */
.category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: var(--spacing-sm) 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    flex-shrink: 0;
    padding: 8px 14px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    white-space: nowrap;
}

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

/* ========= CUSTOMERS LIST ========= */
.customers-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.customer-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

.customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.customer-info {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.customer-phone {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--gray-500);
}

.customer-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.customer-stat {
    font-size: 12px;
    color: var(--gray-500);
}

.customer-stat.total {
    font-weight: 600;
    color: var(--success);
}

.customer-stat.muted {
    color: var(--gray-400);
}

.chevron {
    color: var(--gray-400);
    flex-shrink: 0;
}

/* ========= CUSTOMER DETAIL ========= */
.customer-header {
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.customer-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto var(--spacing-md);
}

.customer-detail-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--spacing-md);
}

.customer-contact-btns {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.btn-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-icon-circle.whatsapp {
    background: #25d366;
    color: white;
}

.btn-icon-circle.phone {
    background: var(--info);
    color: white;
}

.btn-icon-circle.edit {
    background: var(--gray-100);
    color: var(--gray-600);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.info-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.info-card.full {
    grid-column: span 2;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 500;
}

/* ========= CATEGORIES LIST ========= */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.category-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.category-card-image {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

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

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-400);
}

.category-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    padding: 2px 4px;
    font-size: 9px;
    font-weight: 600;
    border-radius: 4px;
}

.category-badge.inactive {
    background: var(--gray-600);
    color: white;
}

.category-card-content {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.category-stats {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

.category-card-actions {
    display: flex;
    gap: 8px;
}

/* ========= SETTINGS MENU ========= */
.settings-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-md);
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}

.user-info {
    flex: 1;
}

.user-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.user-avatar-xl {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    margin: 0 auto var(--spacing-lg);
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.user-role {
    font-size: 14px;
    color: var(--gray-500);
}

.settings-menu {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.settings-section {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-sm);
}

.settings-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--gray-100);
}

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

.settings-item:active {
    background: var(--gray-50);
}

.settings-item.danger {
    color: var(--danger);
}

.settings-item.danger .settings-item-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.settings-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-item-content {
    flex: 1;
}

.settings-item-title {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: inherit;
}

.settings-item-desc {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
}

.app-version {
    text-align: center;
    padding: var(--spacing-xl) 0;
    font-size: 13px;
    color: var(--gray-400);
}

/* ========= FORM ENHANCEMENTS ========= */
.mobile-form {
    padding: var(--spacing-md);
}

.form-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-sm);
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
}

.flex-1 {
    flex: 1;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--gray-50);
    overflow: hidden;
}

.input-with-prefix .prefix {
    padding: 14px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 500;
    border-right: 1px solid var(--gray-300);
}

.input-with-prefix .form-input {
    border: none;
    border-radius: 0;
}

.form-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 48px;
    height: 28px;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    position: relative;
    transition: background 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 15px;
    color: var(--gray-700);
}

.form-actions {
    padding: var(--spacing-md) 0;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* ========= IMAGE UPLOAD ========= */
.image-upload-area {
    width: 100%;
    aspect-ratio: 16/9;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    background: var(--gray-50);
}

.image-upload-area.small {
    width: 120px;
    height: 120px;
    aspect-ratio: 1;
    margin: 0 auto var(--spacing-md);
}

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

.image-placeholder {
    text-align: center;
    color: var(--gray-400);
}

.image-placeholder span {
    display: block;
    font-size: 13px;
    margin-top: var(--spacing-sm);
}

/* ========= HOUR ROW ========= */
.hour-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.hour-day {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.day-label {
    font-size: 14px;
    color: var(--gray-700);
}

.hour-times {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-input {
    width: 80px;
    padding: 8px;
    text-align: center;
}

.time-separator {
    font-size: 13px;
    color: var(--gray-500);
}

.toggle-switch.compact .toggle-slider {
    width: 40px;
    height: 24px;
}

.toggle-switch.compact .toggle-slider::after {
    width: 20px;
    height: 20px;
}

.toggle-switch.compact input:checked + .toggle-slider::after {
    transform: translateX(16px);
}

/* ========= PAYMENT METHODS ========= */
.payment-methods-list {
    display: flex;
    flex-direction: column;
}

.payment-method-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-100);
}

.payment-method-card:last-child {
    border-bottom: none;
}

.payment-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
}

.payment-info {
    flex: 1;
}

.payment-name {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-800);
}

.payment-desc {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
}

/* ========= DELIVERY ZONES ========= */
.delivery-zones-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.zone-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.zone-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-800);
}

.zone-areas {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.zone-fee {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.zone-fee.free {
    color: var(--success);
}

/* ========= INFO BOX ========= */
.info-box {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--info-light);
    border-radius: var(--radius-md);
    color: var(--info);
    font-size: 13px;
}

.info-box svg {
    flex-shrink: 0;
}

/* ========= STATS ROW ========= */
.stats-row {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
}

.stat-mini {
    flex: 1;
    text-align: center;
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.stat-mini .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-mini .stat-label {
    font-size: 12px;
    color: var(--gray-500);
}

/* ========= SECTION HEADER ========= */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* ========= SECTION ========= */
.section {
    background: white;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.section h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--spacing-md);
}

/* ========= ADDRESS ========= */
.address-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.address-card {
    background: var(--gray-50);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    position: relative;
}

.address-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.address-street {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
}

.address-complement {
    font-size: 13px;
    color: var(--gray-600);
}

.address-city {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ========= ORDERS MINI ========= */
.orders-mini-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.order-mini-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
}

.order-mini-info {
    flex: 1;
}

.order-mini-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.order-mini-date {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
}

.order-mini-total {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

/* ========= PROFILE ========= */
.profile-avatar-section {
    text-align: center;
    padding: var(--spacing-md) 0;
}

/* ========= ALERTS ========= */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    font-size: 14px;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
}

/* ========= EMPTY STATE SMALL ========= */
.empty-state.small {
    padding: var(--spacing-lg);
}

.empty-state.small svg {
    width: 48px;
    height: 48px;
}

.empty-state.small h3 {
    font-size: 16px;
}

.text-muted {
    color: var(--gray-500);
}
