:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
    --line: #dbe3ef;
    --primary: #0f766e;
    --primary-strong: #115e59;
    --accent: #c2410c;
    --accent-soft: #fff1e8;
    --navy: #0b1324;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 28px 80px rgba(15, 23, 42, 0.14);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --container: 1180px;
}

* { 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(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(194, 65, 12, 0.08), transparent 24%),
        linear-gradient(180deg, #fbfdff 0%, #f4f7fb 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: #eef2ff;
    color: #1e293b;
    font-family: Consolas, monospace;
}
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.page-shell { padding-bottom: 72px; }
.section { padding: 28px 0; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(219, 227, 239, 0.8);
}
.topbar-inner, .topnav, .hero-actions, .list-actions, .section-heading, .topnav a, .brand, .credential-row, .item-row, .hero-inline-stats {
    display: flex;
    align-items: center;
}
.topbar-inner { justify-content: space-between; min-height: 78px; gap: 24px; }
.brand { gap: 14px; }
.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), #38bdf8);
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow);
}
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 1rem; }
.brand-copy small {
    color: var(--muted);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.topnav { gap: 10px; flex-wrap: wrap; }
.topnav a {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
}
.topnav a:hover { background: #eef6f6; color: var(--primary-strong); }
.hero, .menu-hero { padding: 52px 0 18px; }
.hero-grid, .menu-hero-inner, .two-col-layout, .stats-grid, .items-grid, .builder-tools, .auth-stage, .showcase-cards, .workflow-list {
    display: grid;
    gap: 24px;
}
.hero-grid, .menu-hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: center; }
.hero-copy { display: grid; gap: 18px; }
.hero-inline-stats {
    gap: 10px;
    flex-wrap: wrap;
}
.hero-inline-stats span, .eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.eyebrow {
    width: fit-content;
    background: #e7f7f4;
    color: var(--primary-strong);
    text-transform: uppercase;
}
.hero-inline-stats span {
    background: rgba(15, 23, 42, 0.04);
    color: var(--muted);
}
h1, h2, h3 {
    margin: 0;
    letter-spacing: -0.03em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .94; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; color: var(--muted); line-height: 1.7; }
.panel-card, .auth-card, .table-card, .stat-card, .metric-card, .list-card, .menu-brand-card, .menu-item-card, .category-editor-card, .item-admin-card, .feature-card, .empty-state {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius-xl);
}
.panel-card, .auth-card, .feature-card, .empty-state { padding: 28px; }
.hero-visual { overflow: hidden; }
.mock-shell {
    padding: 18px;
    border-radius: 26px;
    background: linear-gradient(180deg, #e8f4f5 0%, #ffffff 100%);
    border: 1px solid #d7ebed;
}
.mock-toolbar { display: flex; gap: 8px; margin-bottom: 18px; }
.mock-toolbar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5e1;
}
.mock-menu-card {
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}
.mock-badge {
    width: fit-content;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--accent);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}
.mock-list { display: grid; gap: 12px; }
.mock-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #dbe3ef;
}
.mock-qr {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--navy), #1d4ed8);
    color: #fff;
    font-weight: 800;
}
.showcase-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card { display: grid; gap: 12px; }
.split-banner {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 24px;
    padding: 30px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    box-shadow: var(--shadow-strong);
}
.split-banner h2, .split-banner p, .split-banner strong, .split-banner span { color: inherit; }
.workflow-list article {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.workflow-list article:last-child { border-bottom: 0; }
.workflow-list strong {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
}
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card, .metric-card {
    padding: 22px;
    display: grid;
    gap: 8px;
}
.stat-card strong, .metric-card strong {
    font-size: 2rem;
    line-height: 1;
}
.hero-actions { gap: 14px; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    border: 0;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 700;
    transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    box-shadow: 0 14px 28px rgba(29, 78, 216, 0.18);
}
.btn-secondary { background: #eef4ff; color: #1d4ed8; }
.btn-danger { background: #fef2f2; color: #b91c1c; }
.btn-small { min-height: 38px; padding: 0 12px; border-radius: 12px; font-size: .86rem; }
.text-link { color: #1d4ed8; font-weight: 700; }
.alert {
    margin-top: 18px;
    padding: 15px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
}
.alert-success { background: #ecfdf5; color: #166534; }
.alert-error { background: #fef2f2; color: #991b1b; }
.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.1), transparent 24%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f4f7fb 100%);
}
.auth-shell { padding: 44px 0; }
.auth-stage { grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); align-items: stretch; }
.single-stage { grid-template-columns: 1fr; }
.auth-showcase {
    display: grid;
    gap: 22px;
    padding: 34px;
    border-radius: 34px;
    background: linear-gradient(160deg, #0f172a, #12304a 65%, #0f766e);
    color: #fff;
    box-shadow: var(--shadow-strong);
}
.auth-showcase .eyebrow {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.showcase-grid { grid-template-columns: 1fr; }
.showcase-grid article {
    display: grid;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.14);
}
.portal-login-card {
    display: grid;
    gap: 20px;
    align-content: start;
}
.wide-card { width: min(980px, 100%); }
.grid-form { display: grid; gap: 14px; }
.grid-form label, .form-divider {
    display: grid;
    gap: 8px;
    font-weight: 600;
}
.grid-form input, .grid-form textarea, .grid-form select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    outline: 0;
    background: #fff;
    font: inherit;
}
.grid-form input:focus, .grid-form textarea:focus, .grid-form select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.2);
}
.grid-form textarea { min-height: 110px; resize: vertical; }
.checkbox-row { display: flex !important; flex-direction: row; gap: 10px; align-items: center; }
.two-col-layout { grid-template-columns: minmax(320px, 420px) 1fr; }
.editor-layout { align-items: start; }
.sticky-card { position: sticky; top: 96px; }
.list-stack, .category-stack, .item-admin-list { display: grid; gap: 16px; }
.list-card, .category-editor-card { padding: 20px; }
.menu-list-card, .item-admin-card, .inline-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logo-preview, .thumb {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
}
.public-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
}
.qr-preview {
    width: 170px;
    height: 170px;
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
}
.qr-card {
    margin-top: 20px;
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}
.seed-box {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef7ff 100%);
    border: 1px solid #d9e7ff;
}
.compact-seed-box { margin-top: 12px; }
.credential-row {
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d9e7ff;
}
.credential-row:last-child { border-bottom: 0; padding-bottom: 0; }
.menu-brand-card {
    padding: 26px;
    display: grid;
    gap: 16px;
    justify-items: center;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
}
.menu-body { display: grid; gap: 24px; }
.category-block {
    display: grid;
    gap: 20px;
    padding: 24px;
}
.category-head { justify-content: space-between; }
.items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menu-item-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 24px;
}
.menu-item-card.featured {
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}
.menu-item-card img { width: 100%; height: 220px; object-fit: cover; }
.menu-item-copy { padding: 20px; display: grid; gap: 10px; }
.item-row { justify-content: space-between; gap: 16px; align-items: baseline; }
.item-row strong { color: var(--menu-accent, var(--primary)); }
.table-card { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
th {
    font-size: .76rem;
    color: var(--muted);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.muted { color: var(--muted); }
.form-divider {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--primary-strong);
}
.pill {
    display: inline-flex;
    width: fit-content;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ecfeff;
    color: #155e75;
    font-weight: 700;
}
.compact-form { align-content: start; }
.nested-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 28px; }
.empty-state { text-align: center; }
.template-minimal {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
}
.template-elegant {
    --bg: #f7f3ee;
    --surface: #fffdfa;
    --surface-soft: #f8f4ee;
    --text: #2b2118;
    --muted: #6b5d52;
}
.template-coastal {
    --bg: #eef8f6;
    --surface: #fcfffe;
    --surface-soft: #f2fbfa;
    --text: #103b37;
    --muted: #4d6f6a;
}
@media (max-width: 980px) {
    .hero-grid, .menu-hero-inner, .two-col-layout, .stats-grid, .items-grid, .nested-grid, .auth-stage, .showcase-cards, .split-banner {
        grid-template-columns: 1fr;
    }
    .sticky-card { position: static; }
}
@media (max-width: 640px) {
    .container { width: min(var(--container), calc(100% - 20px)); }
    .topbar-inner { padding: 10px 0; align-items: flex-start; }
    .topnav { width: 100%; justify-content: flex-start; }
    .menu-list-card, .item-admin-card, .inline-actions, .qr-card, .credential-row, .item-row {
        flex-direction: column;
        align-items: flex-start;
    }
    h1 { line-height: 1.02; }
    .hero, .menu-hero { padding-top: 28px; }
    .panel-card, .auth-card, .feature-card, .empty-state, .category-block { padding: 20px; }
}
