:root {
    --red: #9f1239;
    --red-dark: #7f0d2e;
    --ink: #171717;
    --muted: #666;
    --line: #e7e5e4;
    --bg: #fafafa;
    --panel: #fff;
    --green: #15803d;
    --shadow: 0 18px 50px rgba(23, 23, 23, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 48px);
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: .2px;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #fff;
    background: var(--red);
}
nav {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #333;
    font-size: 14px;
}

.hero {
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    align-items: center;
    gap: 28px;
    padding: clamp(38px, 7vw, 86px) clamp(16px, 5vw, 72px);
    background:
        radial-gradient(circle at 88% 20%, rgba(159, 18, 57, .12), transparent 32%),
        linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}
.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: .97;
    letter-spacing: 0;
}
.lead {
    max-width: 620px;
    color: #3f3f46;
    font-size: 19px;
    line-height: 1.55;
}
.eyebrow {
    margin: 0 0 8px;
    color: var(--red);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 12px;
}
.hero-actions, .contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 16px;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}
.btn.primary {
    color: #fff;
    border-color: var(--red);
    background: var(--red);
}
.hero-plate {
    min-height: 410px;
    border-radius: 18px;
    display: flex;
    align-items: end;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.38)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 700'%3E%3Crect width='800' height='700' fill='%23fff'/%3E%3Ccircle cx='390' cy='345' r='250' fill='%23f1f5f9' stroke='%23e2e8f0' stroke-width='16'/%3E%3Ccircle cx='390' cy='345' r='166' fill='%23fff' stroke='%23e5e7eb' stroke-width='5'/%3E%3Cpath d='M240 330c110-80 205-78 304 0 31 25 21 81-20 94-93 30-180 30-268 0-41-14-48-69-16-94z' fill='%239f1239' opacity='.92'/%3E%3Cpath d='M280 316c72-45 145-45 220 0' fill='none' stroke='%23ffffff' stroke-width='18' stroke-linecap='round' opacity='.55'/%3E%3Ccircle cx='300' cy='405' r='36' fill='%2315803d'/%3E%3Ccircle cx='485' cy='410' r='34' fill='%23f59e0b'/%3E%3C/svg%3E") center / cover;
    box-shadow: var(--shadow);
}
.hero-plate div {
    width: 100%;
    padding: 22px;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.72));
}
.hero-plate strong, .hero-plate span { display: block; }
.hero-plate strong { font-size: 24px; }

.section {
    padding: clamp(34px, 6vw, 72px) clamp(16px, 5vw, 72px);
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}
.section h2, .panel-section h1, .panel-section h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: 0;
}
.grid { display: grid; gap: 16px; }
.cards, .menu-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.compact-menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.food-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}
.food-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.food-card h3, .food-card h4 { margin: 10px 0 8px; font-size: 20px; }
.food-card p { margin: 0 0 10px; color: var(--muted); line-height: 1.45; }
.food-photo {
    height: 150px;
    border-radius: 7px;
    overflow: hidden;
    background: #f1f5f9;
}
.food-photo img, .modal-photo img, .mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.empty-photo {
    display: grid;
    place-items: center;
    color: var(--red);
    font-size: 34px;
    font-weight: 900;
}
.pill {
    display: inline-flex;
    margin-top: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--red-dark);
    background: #fff1f2;
    font-size: 12px;
    font-weight: 800;
}
.empty {
    padding: 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
}
.order-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
    gap: 22px;
    align-items: center;
    background: #111827;
    color: #fff;
}
.order-section p { color: #d1d5db; }
.platforms { display: grid; gap: 10px; }
.platform {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
}
.platform.muted { color: #6b7280; }
.platform small { font-weight: 700; }
.menu-head { align-items: center; }
.search {
    width: min(100%, 340px);
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    background: #fff;
}
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 18px;
}
.category-tabs button {
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    background: #fff;
    cursor: pointer;
}
.category-tabs .active { color: #fff; border-color: var(--red); background: var(--red); }
.menu-accordion {
    display: grid;
    gap: 10px;
}
.menu-category {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.menu-category summary {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}
.menu-category summary::-webkit-details-marker { display: none; }
.menu-category-title strong,
.menu-category-title small {
    display: block;
}
.menu-category-title strong {
    font-size: 22px;
}
.menu-category-title small {
    margin-top: 3px;
    color: var(--muted);
}
.category-preview {
    display: flex;
    justify-content: flex-end;
    min-width: 118px;
}
.category-preview span {
    width: 46px;
    height: 46px;
    margin-left: -10px;
    border: 2px solid #fff;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-preview .empty-preview {
    display: grid;
    place-items: center;
    color: var(--red);
    font-weight: 900;
}
.menu-category[open] .chevron { transform: rotate(90deg); }
.menu-category .menu-grid {
    padding: 12px;
    border-top: 1px solid var(--line);
}
.compact-food-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    min-height: 122px;
}
.compact-food-card .food-photo {
    height: 96px;
}
.compact-food-card .empty-photo {
    font-size: 26px;
}
.compact-food-card h4 {
    margin: 2px 0 5px;
    font-size: 16px;
}
.compact-food-card p {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 7px;
    font-size: 13px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.compact-food-card .pill {
    margin: 0 0 5px;
}
.compact-food-body {
    min-width: 0;
}
.contact {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--line);
}
footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 22px clamp(16px, 5vw, 72px);
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}
.auth-box {
    width: min(100%, 440px);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}
.setup-box { width: min(100%, 760px); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-weight: 800; }
.form input, .form textarea, .form select, .inline-form input, .inline-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
}
.two-col { grid-template-columns: 1fr 1fr; }
.two-col .btn { grid-column: 1 / -1; }
.alert {
    margin: 0 0 16px;
    border-radius: 8px;
    padding: 12px;
    font-weight: 800;
}
.alert.success { color: #166534; background: #dcfce7; }
.alert.error { color: #991b1b; background: #fee2e2; }

.panel-shell {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 22px clamp(12px, 3vw, 28px) 56px;
}
.panel-section {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    background: #fff;
}
.daily-accordion {
    display: grid;
    gap: 8px;
}
.daily-category {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.daily-category summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}
.daily-category summary::-webkit-details-marker { display: none; }
.daily-category summary strong,
.daily-category summary small {
    display: block;
}
.daily-category summary strong {
    font-size: 22px;
}
.daily-category summary small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 15px;
}
.chevron {
    color: var(--red);
    font-size: 38px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform .15s ease;
}
.daily-category[open] .chevron {
    transform: rotate(90deg);
}
.toggle-list { display: grid; gap: 8px; }
.toggle-list.compact {
    gap: 0;
    border-top: 1px solid var(--line);
}
.toggle-row, .admin-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}
.toggle-row { cursor: pointer; }
.toggle-row.compact {
    grid-template-columns: 42px minmax(0, 1fr) 72px;
    gap: 8px;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    padding: 7px 10px;
}
.toggle-row.compact:last-child {
    border-bottom: 0;
}
.mini-photo {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.toggle-row.compact .mini-photo {
    width: 42px;
    height: 42px;
    border-radius: 7px;
}
.mini-photo.empty-photo { font-size: 22px; }
.toggle-row.compact .mini-photo.empty-photo { font-size: 17px; }
.toggle-row strong, .admin-item strong { display: block; }
.toggle-row small, .admin-item small { display: block; color: var(--muted); margin-top: 3px; }
.toggle-row.compact strong { font-size: 14px; }
.toggle-row.compact small {
    display: -webkit-box;
    max-width: 620px;
    margin-top: 1px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.toggle-desc {
    display: none;
    margin: 8px 0 0;
    color: #3f3f46;
    line-height: 1.4;
}
.toggle-row.show-desc .toggle-desc { display: block; }
.switch {
    min-width: 112px;
    border: 0;
    border-radius: 999px;
    padding: 10px 12px;
    color: #fff;
    background: #9ca3af;
    font-weight: 900;
    cursor: pointer;
}
.toggle-row.compact .switch {
    min-width: 64px;
    padding: 8px 10px;
    font-size: 12px;
}
.switch.on { background: var(--green); }
.admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
    gap: 22px;
    align-items: start;
}
.admin-form { margin-top: 12px; }
.check {
    display: inline-flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
}
.check input { width: auto; }
.preview-img {
    width: 150px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}
.admin-search { width: 100%; margin: 10px 0; }
.admin-list { display: grid; gap: 8px; max-height: 650px; overflow: auto; padding-right: 4px; }
.small-link { color: var(--red); font-weight: 900; }
.inline-form {
    display: grid;
    grid-template-columns: 1fr 1.7fr 80px auto auto;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}
.category-form {
    grid-template-columns: minmax(220px, 1fr) 100px auto;
    max-width: 620px;
}
.category-admin-list { display: grid; gap: 8px; margin-top: 12px; }
.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.user-list span {
    border-radius: 999px;
    padding: 8px 12px;
    background: #f1f5f9;
}

.modal[hidden] { display: none; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0,0,0,.58);
}
.modal-card {
    position: relative;
    width: min(100%, 500px);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    font-size: 24px;
    cursor: pointer;
}
.modal-photo {
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.modal-card h2 { margin: 14px 0 8px; }
.modal-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.modal-open { overflow: hidden; }

@media (max-width: 820px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    nav { width: 100%; overflow-x: auto; padding-bottom: 2px; }
    .hero, .order-section, .admin-grid { grid-template-columns: 1fr; }
    .hero { min-height: auto; }
    .hero-plate { min-height: 290px; }
    .section-head, .contact { flex-direction: column; align-items: stretch; }
    .search { width: 100%; }
    .two-col, .inline-form { grid-template-columns: 1fr; }
    .compact-menu-grid { grid-template-columns: 1fr; }
    .menu-category summary {
        grid-template-columns: 28px minmax(0, 1fr);
    }
    .category-preview {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: 6px;
    }
    .compact-food-card {
        grid-template-columns: 82px minmax(0, 1fr);
        min-height: 104px;
    }
    .compact-food-card .food-photo {
        height: 82px;
    }
    .toggle-row, .admin-item { grid-template-columns: 54px minmax(0, 1fr); }
    .toggle-row .switch, .admin-item .small-link { grid-column: 1 / -1; width: 100%; }
    footer { flex-direction: column; }
}
