/* ============================================================
   Mr. Giova Gourmet — Design System
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────── */
:root {
    --red:    #CC2222;
    --red-dk: #A81A1A;
    --yellow: #F5C518;
    --black:  #1A1A1A;
    --white:  #FFFFFF;

    --surface:     #FAFAF8;
    --surface-2:   #FFFFFF;
    --dark-bg:     #1A1A1A;
    --dark-card:   #252020;

    --text-1: #1A1A1A;
    --text-2: #555555;
    --text-3: #999999;

    --border:  rgba(0,0,0,0.10);
    --border2: rgba(0,0,0,0.18);

    --shadow-sm: 0 2px 8px  rgba(0,0,0,0.09);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.13);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.18);

    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 22px;
    --r-xl: 32px;

    --t: 0.2s ease;
    --font-d: 'Playfair Display', Georgia, serif;
    --font-b: 'Inter', system-ui, -apple-system, sans-serif;

    --header-h: 64px;
    --tab-h:    52px;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-b); color: var(--text-1); background: var(--surface); line-height: 1.5; }
img  { display: block; max-width: 100%; }
a    { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ── Scrollbar thin ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

/* ============================================================
   SPLASH PAGE
   ============================================================ */
.page-splash {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--black);
}

.splash-bg {
    position: absolute; inset: 0;
    background:
        linear-gradient(160deg, rgba(204,34,34,0.55) 0%, rgba(26,26,26,0.95) 60%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23F5C51822'/%3E%3C/svg%3E");
    background-size: cover, 60px 60px;
}

.splash-particles {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 30%, var(--yellow) 0%, transparent 100%),
        radial-gradient(2px 2px at 70% 20%, var(--red) 0%, transparent 100%),
        radial-gradient(1px 1px at 85% 65%, var(--yellow) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 75%, rgba(255,255,255,0.4) 0%, transparent 100%);
    opacity: 0.6;
}

.splash-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column;
    align-items: center; gap: 20px;
    padding: 40px 24px;
    text-align: center;
}

.splash-logo-wrap {
    width: 120px; height: 120px;
    border-radius: 50%;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 6px rgba(245,197,24,0.3), var(--shadow-lg);
    animation: pulse-ring 3s ease-in-out infinite;
}

.splash-logo-wrap svg { width: 72px; height: 72px; }

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 6px rgba(245,197,24,0.3), var(--shadow-lg); }
    50%       { box-shadow: 0 0 0 14px rgba(245,197,24,0.12), var(--shadow-lg); }
}

.splash-brand {
    font-family: var(--font-d);
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 900;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.splash-brand span { color: var(--yellow); }

.splash-slogan {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    color: rgba(255,255,255,0.75);
    font-style: italic;
    max-width: 300px;
    line-height: 1.6;
    animation: fade-in-up 1s 0.4s both;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--red);
    color: var(--white);
    font-size: 1rem; font-weight: 700;
    padding: 16px 40px;
    border-radius: var(--r-xl);
    box-shadow: 0 4px 20px rgba(204,34,34,0.45);
    transition: transform var(--t), box-shadow var(--t), background var(--t);
    animation: fade-in-up 1s 0.7s both;
}
.btn-primary:hover { background: var(--red-dk); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(204,34,34,0.5); }
.btn-primary:active { transform: translateY(0); }

.splash-divider {
    width: 48px; height: 2px;
    background: linear-gradient(90deg, var(--red), var(--yellow));
    border-radius: 1px;
    animation: fade-in-up 1s 0.9s both;
}

.social-links {
    display: flex; gap: 16px;
    animation: fade-in-up 1s 1.1s both;
}

.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-size: 1.2rem;
    border: 1px solid rgba(255,255,255,0.2);
    transition: background var(--t), transform var(--t);
}
.social-link:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }

.splash-badge {
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    animation: fade-in-up 1s 1.3s both;
}

/* ============================================================
   MENU PAGE — HEADER
   ============================================================ */
.menu-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h);
    background: var(--black);
    display: flex; align-items: center;
    padding: 0 16px;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-logo {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.header-brand {
    flex: 1;
    font-family: var(--font-d);
    font-size: 1.05rem; font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.header-brand small {
    display: block;
    font-family: var(--font-b);
    font-size: 0.65rem; font-weight: 400;
    color: var(--yellow);
    text-transform: uppercase; letter-spacing: 0.1em;
}

.header-search-btn {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    transition: background var(--t);
    flex-shrink: 0;
}
.header-search-btn:hover { background: rgba(255,255,255,0.2); }

/* ── Search overlay ─────────────────────────────────── */
.search-overlay {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: var(--black);
    height: var(--header-h);
    display: flex; align-items: center; padding: 0 16px; gap: 12px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}
.search-overlay.open { transform: translateY(0); }

.search-input {
    flex: 1;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--r-xl);
    color: var(--white);
    padding: 10px 18px;
    font-size: 0.95rem;
}
.search-input::placeholder { color: rgba(255,255,255,0.45); }

.search-close {
    background: none; color: var(--white);
    font-size: 1.4rem; padding: 6px;
}

/* ── Category tabs ──────────────────────────────────── */
.tabs-bar {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; z-index: 99;
    height: var(--tab-h);
    background: var(--black);
    border-bottom: 2px solid rgba(245,197,24,0.3);
    overflow-x: auto; overflow-y: hidden;
    display: flex; align-items: center;
    gap: 6px; padding: 0 12px;
    scrollbar-width: none;
}
.tabs-bar::-webkit-scrollbar { display: none; }

.tab-btn {
    flex-shrink: 0;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.65);
    font-size: 0.8rem; font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--r-xl);
    white-space: nowrap;
    transition: background var(--t), color var(--t);
    border: 1px solid transparent;
}
.tab-btn:hover { background: rgba(255,255,255,0.14); color: var(--white); }
.tab-btn.active {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    box-shadow: 0 2px 10px rgba(204,34,34,0.4);
}

/* ── Search + Filter bar (sticky bajo tabs) ─────────── */
.search-filter-bar {
    position: fixed;
    top: calc(var(--header-h) + var(--tab-h));
    left: 0; right: 0; z-index: 97;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.search-inline-wrap {
    flex: 1; position: relative;
}
.search-inline-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); pointer-events: none;
}
.search-inline-input {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-xl);
    padding: 9px 14px 9px 36px;
    font-size: 0.88rem; color: var(--text-1);
    transition: border-color var(--t);
}
.search-inline-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(204,34,34,0.1);
    outline: none;
}
.search-inline-input::placeholder { color: var(--text-3); }

.filter-toggle {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 600; color: var(--text-2);
    cursor: pointer; user-select: none; white-space: nowrap;
    flex-shrink: 0;
}
.toggle-label-text { display: none; }
@media (min-width: 400px) { .toggle-label-text { display: inline; } }

.results-bar {
    position: fixed;
    top: calc(var(--header-h) + var(--tab-h) + 50px);
    left: 0; right: 0; z-index: 96;
    padding: 4px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.results-count { font-size: 0.75rem; color: var(--text-3); }

.toggle-switch {
    position: relative; width: 36px; height: 20px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute; inset: 0;
    background: var(--border2); border-radius: 10px;
    transition: background var(--t);
}
.toggle-track::after {
    content: '';
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: white; border-radius: 50%;
    transition: transform var(--t);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input:checked + .toggle-track { background: var(--red); }
input:checked + .toggle-track::after { transform: translateX(16px); }

.results-count { font-size: 0.78rem; color: var(--text-3); }

/* ── Menu content ────────────────────────────────────── */
.menu-body {
    padding: 0 0 80px;
    /* Header 64 + Tabs 52 + Search 50 + Results 26 = 192px */
    margin-top: calc(var(--header-h) + var(--tab-h) + 76px);
}

/* ── Featured section ───────────────────────────────── */
.featured-section {
    padding: 20px 0 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.section-header {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px 12px;
}

.section-title {
    font-family: var(--font-d);
    font-size: 1.15rem; font-weight: 700;
    color: var(--text-1);
}

.section-badge {
    background: var(--yellow);
    color: var(--black);
    font-size: 0.65rem; font-weight: 800;
    padding: 2px 8px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.08em;
}

.featured-scroll {
    display: flex; gap: 12px;
    padding: 0 16px 20px;
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none;
}
.featured-scroll::-webkit-scrollbar { display: none; }

/* ── Featured card (horizontal scroll) ─────────────── */
.featured-card {
    flex-shrink: 0; width: 180px;
    background: var(--surface-2);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform var(--t), box-shadow var(--t);
}
.featured-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.featured-card .card-img {
    width: 100%; height: 120px;
    object-fit: cover;
    background: #f0ebe4;
}

.featured-card .card-body {
    padding: 10px;
}

.featured-card .card-name {
    font-size: 0.82rem; font-weight: 700;
    color: var(--text-1); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.featured-card .card-price {
    font-size: 0.88rem; font-weight: 800;
    color: var(--red); margin-top: 4px;
}

/* ── Category sections ──────────────────────────────── */
.category-section {
    padding: 20px 0 8px;
    border-bottom: 1px solid var(--border);
}

.category-section-title {
    font-family: var(--font-d);
    font-size: 1.05rem; font-weight: 700;
    color: var(--text-1);
    padding: 0 16px 14px;
    display: flex; align-items: center; gap: 8px;
}

.category-section-title::before {
    content: '';
    display: inline-block; width: 4px; height: 18px;
    background: var(--red); border-radius: 2px;
}

/* ── Dish grid ──────────────────────────────────────── */
.dish-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
}

@media (min-width: 480px)  { .dish-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 680px)  { .dish-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .dish-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .dish-grid { grid-template-columns: repeat(5, 1fr); } }

/* ── Dish card ──────────────────────────────────────── */
.dish-card {
    background: var(--surface-2);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform var(--t), box-shadow var(--t);
    position: relative;
}
.dish-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dish-card.unavailable { opacity: 0.72; }

.dish-card .card-img-wrap {
    position: relative; width: 100%; height: 140px; overflow: hidden;
}

.dish-card .card-img {
    width: 100%; height: 100%; object-fit: cover; background: #f0ebe4;
    transition: transform 0.35s ease;
}
.dish-card:hover .card-img { transform: scale(1.05); }

.badge-featured {
    position: absolute; top: 8px; left: 8px;
    background: var(--yellow);
    color: var(--black);
    font-size: 0.62rem; font-weight: 800;
    padding: 3px 8px; border-radius: 20px;
    display: flex; align-items: center; gap: 3px;
    text-transform: uppercase; letter-spacing: 0.06em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.badge-unavailable {
    position: absolute; inset: 0;
    background: rgba(26,26,26,0.62);
    display: flex; align-items: center; justify-content: center;
}

.badge-unavailable span {
    background: var(--red);
    color: var(--white);
    font-size: 0.68rem; font-weight: 800;
    padding: 4px 12px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.1em;
}

.dish-card .card-body {
    padding: 10px 12px 12px;
}

.dish-card .card-name {
    font-size: 0.85rem; font-weight: 700;
    color: var(--text-1); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.dish-card .card-desc {
    font-size: 0.75rem; color: var(--text-3);
    margin-top: 3px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}

.dish-card .card-price {
    font-size: 0.9rem; font-weight: 800;
    color: var(--red); margin-top: 6px;
}

/* ── Dish detail modal ──────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.dish-modal {
    background: var(--surface-2);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    width: 100%; max-width: 600px;
    max-height: 92vh; overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.modal-overlay.open .dish-modal { transform: translateY(0); }

.modal-img-wrap { width: 100%; height: 260px; overflow: hidden; }
.modal-img { width: 100%; height: 100%; object-fit: cover; background: #f0ebe4; }

/* Close button — posicionado relativo a .dish-modal, NO dentro del img-wrap */
.dish-modal { position: relative; }
.modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 30;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--t);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.modal-close:hover, .modal-close:active { background: rgba(0,0,0,0.85); }

/* Botón Volver al fondo del modal */
.btn-modal-back {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 18px;
    background: var(--red);
    color: var(--white); font-size: 0.9rem; font-weight: 700;
    border-top: none;
    transition: background var(--t);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.btn-modal-back:hover, .btn-modal-back:active { background: var(--red-dk); }

.modal-body { padding: 20px 20px 32px; }

.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.modal-name {
    font-family: var(--font-d);
    font-size: 1.4rem; font-weight: 900;
    color: var(--text-1); line-height: 1.2;
}

.modal-badge-star {
    flex-shrink: 0;
    background: var(--yellow);
    color: var(--black);
    font-size: 0.68rem; font-weight: 800;
    padding: 4px 10px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-top: 4px;
}

.modal-desc {
    font-size: 0.92rem; color: var(--text-2);
    margin-top: 10px; line-height: 1.6;
}

.modal-prices {
    margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px;
}

.price-chip {
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-md);
    padding: 8px 16px;
    display: flex; flex-direction: column; align-items: center;
    min-width: 100px;
}
.price-chip .variant { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.price-chip .amount  { font-size: 1.05rem; font-weight: 800; color: var(--red); }

.price-single { font-size: 1.4rem; font-weight: 900; color: var(--red); margin-top: 14px; }

.modal-availability {
    margin-top: 16px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.82rem; font-weight: 600;
    padding: 6px 14px; border-radius: 20px;
}
.modal-availability.avail   { background: #e8f5e9; color: #2e7d32; }
.modal-availability.unavail { background: #ffebee; color: #c62828; }

/* ── Empty state ─────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-3);
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* ── Skeleton loader ─────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--r-sm);
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--surface-2);
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.skeleton-img  { height: 140px; }
.skeleton-body { padding: 10px 12px 12px; }
.skeleton-line { height: 12px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-line:last-child { width: 50%; }

/* ── No results ─────────────────────────────────────── */
.no-results {
    padding: 40px 16px; text-align: center; color: var(--text-3);
    font-size: 0.9rem;
}

/* ============================================================
   ADMIN — LOGIN PAGE
   ============================================================ */
.page-login {
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    background: var(--black);
    padding: 24px;
}

.login-card {
    background: var(--surface-2);
    border-radius: var(--r-lg);
    padding: 40px 32px;
    width: 100%; max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center; margin-bottom: 32px;
}

.login-logo {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
}

.login-title {
    font-family: var(--font-d);
    font-size: 1.4rem; font-weight: 900; color: var(--text-1);
}

.login-sub {
    font-size: 0.82rem; color: var(--text-3); margin-top: 4px;
}

.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 0.82rem; font-weight: 600; color: var(--text-2);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-sm);
    padding: 12px 16px;
    font-size: 0.95rem; color: var(--text-1);
    transition: border-color var(--t), box-shadow var(--t);
}
.form-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(204,34,34,0.12);
}

.btn-login {
    width: 100%;
    background: var(--red);
    color: var(--white);
    font-size: 1rem; font-weight: 700;
    padding: 14px;
    border-radius: var(--r-md);
    transition: background var(--t), transform var(--t);
    margin-top: 8px;
}
.btn-login:hover { background: var(--red-dk); }
.btn-login:active { transform: scale(0.98); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.login-error {
    background: #ffebee; border: 1px solid #ffcdd2;
    color: #c62828; border-radius: var(--r-sm);
    padding: 10px 14px; font-size: 0.84rem;
    margin-top: 14px; display: none;
}
.login-error.show { display: block; }

/* ============================================================
   ADMIN — DASHBOARD
   ============================================================ */
.page-admin { background: var(--surface); min-height: 100vh; }

.admin-header {
    background: var(--black);
    padding: 0 20px;
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: sticky; top: 0; z-index: 100;
}

.admin-header-brand {
    display: flex; align-items: center; gap: 10px;
}

.admin-logo {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--red);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}

.admin-header-brand h1 {
    font-family: var(--font-d);
    font-size: 1rem; font-weight: 700; color: var(--white);
}

.admin-header-brand span {
    font-size: 0.65rem; color: var(--yellow);
    text-transform: uppercase; letter-spacing: 0.1em;
}

.admin-header-actions { display: flex; gap: 10px; align-items: center; }

.btn-outline-white {
    background: none;
    border: 1.5px solid rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem; font-weight: 600;
    padding: 7px 16px; border-radius: var(--r-md);
    transition: all var(--t);
}
.btn-outline-white:hover { border-color: white; color: white; }

.btn-view-menu {
    background: var(--yellow);
    color: var(--black);
    font-size: 0.8rem; font-weight: 700;
    padding: 7px 16px; border-radius: var(--r-md);
    transition: background var(--t);
}
.btn-view-menu:hover { background: #e8b800; }

/* ── Admin category tabs ────────────────────────────── */
.admin-cat-tabs {
    position: sticky; top: 60px; z-index: 90;
    background: var(--black);
    border-bottom: 2px solid rgba(245,197,24,0.3);
    overflow-x: auto; overflow-y: hidden;
    display: flex; align-items: center;
    gap: 6px; padding: 8px 12px;
    scrollbar-width: none;
}
.admin-cat-tabs::-webkit-scrollbar { display: none; }
.admin-cat-tabs .tab-btn {
    flex-shrink: 0; font-size: 0.75rem;
}

/* ── Logo image ─────────────────────────────────────── */
.splash-logo-wrap,
.header-logo,
.login-logo,
.admin-logo {
    overflow: hidden;
}
.logo-img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* ── Stats ──────────────────────────────────────────── */
.stats-bar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; padding: 20px;
}

@media (max-width: 600px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
    background: var(--surface-2);
    border-radius: var(--r-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: center;
}

.stat-icon { font-size: 1.5rem; margin-bottom: 6px; }
.stat-value { font-size: 1.6rem; font-weight: 900; color: var(--text-1); }
.stat-label { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.stat-card.stat-red    .stat-value { color: var(--red); }
.stat-card.stat-yellow .stat-value { color: #b8900e; }
.stat-card.stat-green  .stat-value { color: #2e7d32; }

/* ── Admin toolbar ──────────────────────────────────── */
.admin-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 0 20px 16px;
}

.toolbar-search {
    flex: 1; min-width: 200px;
    position: relative;
}
.toolbar-search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-3); font-size: 0.9rem; pointer-events: none;
}
.toolbar-search input {
    width: 100%;
    background: var(--surface-2);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-md);
    padding: 10px 14px 10px 36px;
    font-size: 0.88rem; color: var(--text-1);
}
.toolbar-search input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,34,34,0.1); }

.toolbar-select {
    background: var(--surface-2);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-md);
    padding: 10px 14px;
    font-size: 0.88rem; color: var(--text-1);
    min-width: 150px;
    cursor: pointer;
}
.toolbar-select:focus { border-color: var(--red); }

.btn-add {
    background: var(--red);
    color: var(--white);
    font-size: 0.88rem; font-weight: 700;
    padding: 10px 20px; border-radius: var(--r-md);
    display: flex; align-items: center; gap: 6px;
    transition: background var(--t);
    white-space: nowrap;
}
.btn-add:hover { background: var(--red-dk); }

/* ── Admin table ─────────────────────────────────────── */
.table-wrap {
    padding: 0 20px 40px;
    overflow-x: auto;
}

.admin-table {
    width: 100%; border-collapse: collapse;
    background: var(--surface-2);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    min-width: 700px;
}

.admin-table thead tr {
    background: var(--black);
}

.admin-table th {
    padding: 12px 14px;
    font-size: 0.72rem; font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase; letter-spacing: 0.1em;
    text-align: left; white-space: nowrap;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--t);
}
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface); }

.admin-table td {
    padding: 12px 14px;
    font-size: 0.85rem; vertical-align: middle;
}

.table-img {
    width: 48px; height: 48px; border-radius: var(--r-sm);
    object-fit: cover; background: var(--surface);
}

.table-dish-name {
    font-weight: 600; color: var(--text-1);
    max-width: 200px;
}
.table-dish-name small { display: block; font-weight: 400; color: var(--text-3); font-size: 0.75rem; }

.table-cat-badge {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.75rem; color: var(--text-2);
    white-space: nowrap;
}

.table-price { font-weight: 700; color: var(--red); white-space: nowrap; }

/* Inline toggles */
.inline-toggle {
    position: relative; width: 40px; height: 22px;
    cursor: pointer;
}
.inline-toggle input { opacity: 0; width: 0; height: 0; }
.toggle-t {
    position: absolute; inset: 0;
    background: var(--border2); border-radius: 11px;
    transition: background var(--t);
}
.toggle-t::after {
    content: '';
    position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: white; border-radius: 50%;
    transition: transform var(--t);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.inline-toggle input:checked + .toggle-t { background: #16a34a; }
.inline-toggle input:checked + .toggle-t::after { transform: translateX(18px); }

/* Admin form toggles — green when active (Disponible / Estrella) */
.page-admin input:checked + .toggle-track { background: #16a34a; }

.featured-star {
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform var(--t);
}
.featured-star:hover { transform: scale(1.2); }
.featured-star.on  { color: var(--yellow); }
.featured-star.off { color: var(--border2); }

/* Actions */
.actions { display: flex; gap: 6px; }

.btn-icon {
    width: 32px; height: 32px; border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; transition: background var(--t);
}
.btn-icon-edit   { background: #e3f2fd; color: #1565c0; }
.btn-icon-edit:hover   { background: #bbdefb; }
.btn-icon-delete { background: #ffebee; color: #c62828; }
.btn-icon-delete:hover { background: #ffcdd2; }

/* ── Admin modal (form) ──────────────────────────────── */
.admin-modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.admin-modal-overlay.open { opacity: 1; pointer-events: all; }

.admin-modal {
    background: var(--surface-2);
    border-radius: var(--r-lg);
    width: 100%; max-width: 560px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.96) translateY(16px);
    transition: transform 0.25s ease;
}
.admin-modal-overlay.open .admin-modal { transform: scale(1) translateY(0); }

.admin-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: var(--surface-2); z-index: 1;
}

.admin-modal-header h2 {
    font-family: var(--font-d);
    font-size: 1.1rem; font-weight: 700;
}

.modal-x {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--text-2);
    transition: background var(--t);
}
.modal-x:hover { background: var(--border); }

.admin-modal-body { padding: 20px 24px 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 16px; }

.form-textarea {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    font-size: 0.88rem; color: var(--text-1);
    resize: vertical; min-height: 80px;
    transition: border-color var(--t);
}
.form-textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,34,34,0.1); }

.form-select {
    width: 100%;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-sm);
    padding: 10px 14px;
    font-size: 0.88rem; color: var(--text-1);
    cursor: pointer;
}
.form-select:focus { border-color: var(--red); }

/* Image upload */
.img-upload-area {
    border: 2px dashed var(--border2);
    border-radius: var(--r-md);
    padding: 20px;
    text-align: center; cursor: pointer;
    transition: border-color var(--t), background var(--t);
    position: relative;
}
.img-upload-area:hover { border-color: var(--red); background: rgba(204,34,34,0.03); }
.img-upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-preview { width: 100%; height: 140px; object-fit: cover; border-radius: var(--r-sm); margin-top: 10px; }
.img-placeholder { color: var(--text-3); font-size: 0.82rem; }
.img-placeholder svg { width: 32px; height: 32px; margin: 0 auto 8px; color: var(--text-3); }

/* Price variants */
.prices-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

.price-row {
    display: flex; align-items: center; gap: 8px;
}
.price-row input {
    flex: 1;
    background: var(--surface);
    border: 1.5px solid var(--border2);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    font-size: 0.88rem;
}
.price-row input:focus { border-color: var(--red); }
.price-row .input-variant { flex: 1.2; }
.price-row .input-price  { flex: 1; }

.btn-remove-price {
    width: 28px; height: 28px; border-radius: 50%;
    background: #ffebee; color: #c62828;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
    transition: background var(--t);
}
.btn-remove-price:hover { background: #ffcdd2; }

.btn-add-price {
    background: none;
    border: 1.5px dashed var(--border2);
    border-radius: var(--r-sm);
    padding: 8px 14px;
    font-size: 0.82rem; color: var(--text-2);
    display: flex; align-items: center; gap: 6px;
    transition: border-color var(--t), color var(--t);
    margin-top: 4px;
}
.btn-add-price:hover { border-color: var(--red); color: var(--red); }

/* Form toggles row */
.toggles-row {
    display: flex; gap: 20px; flex-wrap: wrap; margin-top: 4px;
}
.toggle-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; font-weight: 600; color: var(--text-2);
    cursor: pointer; user-select: none;
}

/* Modal footer */
.admin-modal-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    position: sticky; bottom: 0;
    background: var(--surface-2);
}

.btn-cancel {
    background: var(--surface);
    color: var(--text-2);
    font-size: 0.88rem; font-weight: 600;
    padding: 10px 20px; border-radius: var(--r-md);
    border: 1.5px solid var(--border2);
    transition: background var(--t);
}
.btn-cancel:hover { background: var(--border); }

.btn-save {
    background: var(--red); color: var(--white);
    font-size: 0.88rem; font-weight: 700;
    padding: 10px 24px; border-radius: var(--r-md);
    transition: background var(--t);
    display: flex; align-items: center; gap: 6px;
}
.btn-save:hover { background: var(--red-dk); }
.btn-save:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Confirm delete modal ───────────────────────────── */
.confirm-overlay {
    position: fixed; inset: 0; z-index: 600;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
.confirm-overlay.open { opacity: 1; pointer-events: all; }

.confirm-box {
    background: var(--surface-2);
    border-radius: var(--r-lg);
    padding: 28px 24px 24px;
    max-width: 360px; width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}
.confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-icon { font-size: 2.5rem; margin-bottom: 12px; }
.confirm-title { font-family: var(--font-d); font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.confirm-desc  { font-size: 0.85rem; color: var(--text-2); line-height: 1.5; }
.confirm-btns  { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

.btn-danger {
    background: var(--red); color: var(--white);
    font-size: 0.9rem; font-weight: 700;
    padding: 10px 24px; border-radius: var(--r-md);
    transition: background var(--t);
}
.btn-danger:hover { background: var(--red-dk); }

/* ── Toast ───────────────────────────────────────────── */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
    background: var(--black); color: var(--white);
    padding: 12px 24px; border-radius: var(--r-xl);
    font-size: 0.88rem; font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 900; white-space: nowrap;
    transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.35s ease;
    opacity: 0;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid #4caf50; }
.toast.error   { border-left: 4px solid var(--red); }

/* ── Upload progress ────────────────────────────────── */
.upload-progress {
    height: 4px; background: var(--surface);
    border-radius: 2px; overflow: hidden;
    margin-top: 8px; display: none;
}
.upload-progress.show { display: block; }
.upload-bar {
    height: 100%; background: var(--red);
    border-radius: 2px; width: 0;
    transition: width 0.3s ease;
}

/* ── Responsive fixes ────────────────────────────────── */
@media (max-width: 400px) {
    .stats-bar { gap: 8px; padding: 14px; }
    .stat-value { font-size: 1.3rem; }
    .admin-toolbar { padding: 0 14px 12px; }
    .table-wrap { padding: 0 14px 30px; }
}
