:root {
    --bg: #f4f7f8;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --ink: #12202b;
    --muted: #5b6b76;
    --soft: #84919a;
    --line: rgba(18, 32, 43, 0.08);
    --accent: #0e7c75;
    --accent-deep: #0a5f5a;
    --accent-soft: rgba(14, 124, 117, 0.12);
    --danger: #c44b4b;
    --danger-soft: rgba(196, 75, 75, 0.1);
    --ok: #2f7d4a;
    --ok-soft: rgba(47, 125, 74, 0.12);
    --radius: 20px;
    --shadow: 0 10px 30px rgba(18, 32, 43, 0.06);
    --shadow-soft: 0 4px 14px rgba(18, 32, 43, 0.04);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

/* ——— Public menu ——— */

.menu-page {
    position: relative;
    overflow-x: hidden;
}

.menu-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 90% 55% at 50% -15%, rgba(14, 124, 117, 0.14), transparent 58%),
        radial-gradient(ellipse 50% 40% at 100% 20%, rgba(56, 140, 180, 0.08), transparent 55%),
        radial-gradient(ellipse 45% 35% at 0% 60%, rgba(14, 124, 117, 0.06), transparent 50%),
        linear-gradient(180deg, #eef4f5 0%, #f7fafb 45%, #f4f7f8 100%);
}

.menu-hero {
    text-align: center;
    padding: clamp(2.5rem, 6vw, 3.75rem) 1.25rem 1.5rem;
    animation: rise 0.7s ease both;
}

.menu-eyebrow {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.menu-brand {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 9vw, 4.2rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.menu-tagline {
    margin: 0.9rem auto 0;
    max-width: 24rem;
    color: var(--muted);
    font-weight: 400;
    font-size: 1.02rem;
}

.menu-tools {
    max-width: 760px;
    margin: 0.35rem auto 0;
    padding: 0 1.1rem;
    animation: rise 0.75s ease 0.05s both;
}

.menu-search {
    position: relative;
}

.menu-search input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.85rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.menu-search input:focus {
    border-color: rgba(14, 124, 117, 0.45);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.menu-search svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--soft);
    pointer-events: none;
}

.cat-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(244, 247, 248, 0.88);
    border-bottom: 1px solid var(--line);
    margin-top: 1rem;
    animation: rise 0.8s ease 0.08s both;
}

.cat-nav-track {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.75rem 1.1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cat-nav-track::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    flex: 0 0 auto;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.cat-chip.is-active,
.cat-chip:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.cat-chip:active {
    transform: scale(0.97);
}

.menu-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.35rem 1.1rem 5rem;
}

.menu-section {
    margin-bottom: 2.25rem;
    scroll-margin-top: 5.5rem;
    animation: rise 0.65s ease both;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 4vw, 2.05rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.section-count {
    color: var(--soft);
    font-size: 0.85rem;
    font-weight: 500;
}

.product-list {
    display: grid;
    gap: 0.75rem;
}

.product-card {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 0.95rem;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(14, 124, 117, 0.2);
}

.product-card.is-hidden {
    display: none;
}

.product-media {
    width: 104px;
    height: 104px;
    border-radius: 16px;
    overflow: hidden;
    background: #e8eef0;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.04);
}

.product-media--empty {
    display: grid;
    place-items: center;
    background:
        linear-gradient(145deg, rgba(14, 124, 117, 0.14), transparent 62%),
        #e8eef0;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
}

.product-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.product-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.product-top h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.product-price {
    margin: 0;
    flex-shrink: 0;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
}

.product-contents {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.product-desc {
    margin: 0;
    color: var(--soft);
    font-size: 0.84rem;
}

.product-allergens {
    margin: 0.35rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.allergen-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--danger);
}

.allergen-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: var(--danger-soft);
    color: #9a3b3b;
    font-size: 0.72rem;
    font-weight: 500;
}

.menu-empty,
.menu-footer,
.menu-no-results {
    text-align: center;
    color: var(--soft);
    padding: 2rem 1rem;
}

.menu-no-results {
    display: none;
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    margin: 1.25rem 1.1rem 0;
}

.menu-no-results.is-visible {
    display: block;
}

.menu-footer {
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    padding-bottom: 2.75rem;
    margin-top: 1rem;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 640px) {
    .product-card {
        grid-template-columns: 128px 1fr;
        padding: 1rem;
        gap: 1.15rem;
    }

    .product-media {
        width: 128px;
        height: 128px;
        border-radius: 18px;
    }

    .product-top h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .product-card {
        grid-template-columns: 88px 1fr;
        gap: 0.8rem;
        padding: 0.75rem;
    }

    .product-media {
        width: 88px;
        height: 88px;
        border-radius: 14px;
    }

    .product-top {
        flex-direction: column;
        gap: 0.4rem;
    }

    .product-price {
        align-self: flex-start;
    }
}

/* ——— Admin ——— */

.admin-body {
    background:
        radial-gradient(ellipse 70% 40% at 0% 0%, rgba(14, 124, 117, 0.1), transparent 55%),
        radial-gradient(ellipse 50% 35% at 100% 0%, rgba(56, 140, 180, 0.07), transparent 50%),
        var(--bg);
    min-height: 100vh;
}

.admin-shell {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.25rem;
}

.admin-top {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-brand {
    font-family: var(--font-display);
    font-size: 1.85rem;
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-brand span {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-nav a {
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    color: var(--muted);
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 1.35rem;
    margin-bottom: 1.15rem;
    box-shadow: var(--shadow-soft);
}

.panel h2 {
    margin: 0 0 1rem;
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-head h2 {
    margin: 0;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
}

.stat {
    padding: 1.05rem;
    border-radius: 16px;
    background: linear-gradient(160deg, #f7fbfb, #eef5f5);
    border: 1px solid var(--line);
}

.stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.4rem;
    color: var(--accent-deep);
}

.stat span {
    color: var(--muted);
    font-size: 0.85rem;
}

.flash {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.flash-ok {
    background: var(--ok-soft);
    color: #21663a;
    border: 1px solid rgba(47, 125, 74, 0.22);
}

.flash-err {
    background: var(--danger-soft);
    color: #9a3b3b;
    border: 1px solid rgba(196, 75, 75, 0.22);
}

.form-grid {
    display: grid;
    gap: 0.9rem;
}

.form-row {
    display: grid;
    gap: 0.35rem;
}

.form-row label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #f8fbfb;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    border-color: rgba(14, 124, 117, 0.45);
    background: #fff;
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-row textarea {
    min-height: 90px;
    resize: vertical;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.72rem 1.15rem;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(14, 124, 117, 0.22);
}

.btn-primary:hover {
    background: var(--accent-deep);
}

.btn-ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.btn-danger {
    background: var(--danger-soft);
    color: #9a3b3b;
    border-color: rgba(196, 75, 75, 0.22);
}

.btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 9px;
}

.table-wrap {
    overflow-x: auto;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.data th,
table.data td {
    text-align: left;
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

table.data th {
    color: var(--soft);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: #e8eef0;
}

.thumb-empty {
    display: grid;
    place-items: center;
    color: var(--soft);
    font-size: 0.7rem;
    background: #e8eef0;
    border-radius: 12px;
    width: 48px;
    height: 48px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 0 0 0.35rem;
    font-family: var(--font-display);
    font-size: 2.2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.login-card .hint {
    text-align: center;
    color: var(--muted);
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}

.qr-box {
    display: grid;
    gap: 1rem;
    justify-items: start;
}

.qr-box img {
    width: 220px;
    height: 220px;
    background: #fff;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent-deep);
}

.badge-off {
    background: rgba(132, 145, 154, 0.15);
    color: var(--soft);
}
