/* ============================================================
   KULA — interface stylesheet
   Identity: KULA navy + white, rounded strokes, clean surfaces.
   Money is the hero; surfaces stay flat and printed.
   ============================================================ */

:root {
    --navy: #16375e;
    --navy-soft: #1e4b7a;
    --navy-hover: #1f4c80;
    --accent: #ffffff;
    --warn: #e0a02e;
    --tomato: #c7462a;
    --mchicha: #2e7a52;
    --limestone: #eef1f6;
    --paper: #ffffff;
    --ink: #16202f;
    --muted: #5c6572;
    --line: #d5dbe4;
    --line-strong: #16202f;

    --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;

    --radius: 2px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--limestone);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1rem;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
}

.site-header :focus-visible,
.auth-aside :focus-visible,
.board :focus-visible {
    outline-color: #fff;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--accent);
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

/* ---------- kanga trim ---------- */

.kanga-strip {
    height: 8px;
    background: repeating-linear-gradient(
        135deg,
        var(--navy) 0 10px,
        var(--accent) 10px 13px,
        var(--navy) 13px 23px,
        var(--accent) 23px 26px
    );
}

/* ---------- shell ---------- */

.shell {
    width: min(1120px, 100% - 40px);
    margin-inline: auto;
}

.shell-narrow {
    width: min(780px, 100% - 40px);
    margin-inline: auto;
}

main {
    min-height: 62vh;
}

.page {
    padding-bottom: 8px;
}

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--navy);
    color: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
}

.brand-mark {
    width: 13px;
    height: 13px;
    background: var(--accent);
    border-radius: 50%;
    flex: none;
}

.brand:hover .brand-mark {
    background: rgba(255, 255, 255, 0.55);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    display: inline-block;
    padding: 9px 12px;
    color: #c6d1e1;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    border-radius: var(--radius);
    transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

.main-nav a.is-active {
    background: var(--accent);
    color: var(--navy);
    font-weight: 600;
}

.main-nav a.nav-cta {
    margin-left: 6px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
}

.main-nav a.nav-cta:hover {
    background: #fff;
    color: var(--navy);
}

.header-user {
    color: #8fa1ba;
    font-size: 13px;
    white-space: nowrap;
}

/* Mobile menu (details/summary keeps it JS-free) */
.nav-menu {
    display: none;
    position: relative;
    margin-left: auto;
}

.nav-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.nav-menu summary::-webkit-details-marker {
    display: none;
}

.nav-menu summary::after {
    content: "▾";
    font-size: 11px;
    line-height: 1;
}

.nav-menu[open] summary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--navy);
}

.nav-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 60;
    min-width: 220px;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--ink);
    display: grid;
    gap: 2px;
}

.nav-menu-panel a {
    padding: 10px 12px;
    color: var(--ink);
    font-size: 15px;
    text-decoration: none;
}

.nav-menu-panel a:hover {
    background: #eef1f6;
}

.nav-menu-panel a.is-active {
    background: var(--navy);
    color: var(--accent);
    font-weight: 600;
}

.nav-menu-panel a.nav-cta {
    border: 1px solid var(--line);
    text-align: center;
    font-weight: 600;
}

/* ---------- page heading ---------- */

.page-head {
    padding: 44px 0 24px;
    border-bottom: 1px solid var(--line-strong);
    margin-bottom: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.page-head h1 {
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.035em;
}

.page-head .lede {
    max-width: 56ch;
    margin-top: 10px;
    color: var(--muted);
    font-size: 1.02rem;
}

.page-context {
    color: var(--muted);
    font-size: 14px;
    padding-bottom: 6px;
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--accent);
}

.btn-primary:hover {
    background: var(--navy-hover);
    border-color: var(--navy-hover);
}

.btn-secondary {
    background: transparent;
    border-color: var(--navy);
    color: var(--navy);
}

.btn-secondary:hover {
    background: var(--navy);
    color: #fff;
}

.btn-ghost {
    border-color: var(--line);
    color: var(--ink);
    background: var(--paper);
}

.btn-ghost:hover {
    border-color: var(--ink);
}

.btn-danger {
    background: var(--tomato);
    border-color: var(--tomato);
    color: #fff;
}

.btn-danger:hover {
    background: #a93a22;
    border-color: #a93a22;
}

.btn-sm {
    min-height: 36px;
    padding: 0 13px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ---------- panels ---------- */

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.panel-flush {
    padding: 0;
}

.panel + .panel {
    margin-top: 20px;
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 650;
}

.panel-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    border-bottom: 1px solid var(--navy);
    padding-bottom: 1px;
}

.panel-link:hover {
    color: var(--navy-hover);
}

/* ---------- alerts ---------- */

.alert {
    padding: 13px 16px;
    border-left: 4px solid var(--navy);
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 15px;
    background: #e8ecf4;
    color: var(--navy-soft);
}

.alert-success {
    border-color: var(--mchicha);
    background: #e7f2ea;
    color: #1f5537;
}

.alert-error {
    border-color: var(--tomato);
    background: #fbeae5;
    color: #7e2715;
}

.alert-info {
    border-color: var(--navy);
    background: #e8ecf4;
    color: var(--navy-soft);
}

/* ---------- forms ---------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.field label,
.field-label {
    font-size: 14px;
    font-weight: 600;
}

.field .hint {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.input,
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #c9d2de;
    border-radius: var(--radius);
    background: var(--paper);
    font-size: 16px;
}

.field textarea {
    min-height: 90px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(22, 55, 94, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row .field {
    margin-bottom: 0;
}

.form-actions {
    margin-top: 22px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.field-money {
    display: flex;
    align-items: stretch;
    border: 1px solid #c9d2de;
    border-radius: var(--radius);
    background: var(--paper);
}

.field-money:focus-within {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(22, 55, 94, 0.15);
}

.field-money .prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 600;
    color: var(--muted);
    border-right: 1px solid var(--line);
    background: #f6f8fb;
}

.field-money input {
    border: 0;
    min-height: 46px;
    padding: 11px 13px;
    width: 100%;
    background: transparent;
}

.field-money input:focus {
    outline: none;
    box-shadow: none;
}

/* ---------- money ---------- */

.money,
.num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* ---------- hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: clamp(32px, 6vw, 72px);
    align-items: start;
    padding: 56px 0 44px;
}

.hero h1 {
    font-size: clamp(2.8rem, 6.2vw, 5.1rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.97;
    max-width: 13ch;
}

.hero .lede {
    max-width: 50ch;
    margin: 22px 0 28px;
    color: var(--muted);
    font-size: 1.06rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 38px;
    padding-top: 16px;
    border-top: 2px solid var(--ink);
    max-width: 420px;
}

.hero-note .note-label {
    color: var(--muted);
    font-size: 14px;
}

.hero-note .note-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin-top: 2px;
}

.hero-note .note-value span {
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
}

.hero-copy {
    animation: rise 0.5s ease-out both;
}

.hero-board {
    animation: rise 0.5s ease-out 0.08s both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- menu board (navy) ---------- */

.board {
    position: relative;
    background: var(--navy);
    color: #fff;
    padding: 26px 24px;
    border-radius: var(--radius);
}

.board::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    pointer-events: none;
}

.board h2 {
    position: relative;
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.board .board-sub {
    position: relative;
    margin: 6px 0 0;
    color: #9fb0c7;
    font-size: 13px;
}

.board-list {
    position: relative;
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.board-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 15px;
}

.board-list .item-name {
    color: #e8edf5;
}

.board-list .item-price {
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.board-list .item-sub {
    display: block;
    color: #8fa1ba;
    font-size: 12px;
    margin-top: 1px;
}

/* ---------- sections & kitchen rows ---------- */

.section-block {
    padding: 20px 0 12px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.section-head h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}

.section-head p {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

.kitchen-list {
    border-top: 1px solid var(--ink);
}

.kitchen-row {
    display: grid;
    grid-template-columns: 104px 1fr auto auto;
    gap: 24px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.kitchen-thumb {
    display: block;
    width: 104px;
    height: 78px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--limestone);
}

.kitchen-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kitchen-area {
    color: var(--muted);
    font-size: 12px;
    border-left: 1px solid var(--line);
    padding-left: 10px;
}

.kitchen-name {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.kitchen-meta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 3px;
}

.kitchen-price {
    text-align: right;
    font-weight: 600;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.kitchen-price span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.ledger-dish {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ledger-thumb {
    display: block;
    width: 46px;
    height: 35px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--limestone);
}

.photo-placeholder {
    display: block;
    position: relative;
    overflow: hidden;
    background: #e4e9f1;
    border: 1px solid var(--line);
}

.photo-placeholder::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    background: var(--navy);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
}

/* ---------- budget ---------- */

.budget-hero {
    display: grid;
    grid-template-columns: minmax(0, auto) 1fr;
    gap: clamp(24px, 5vw, 56px);
    align-items: end;
    padding: 30px;
    background: var(--paper);
    border: 1px solid var(--line);
}

.budget-number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5.3rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
}

.budget-number small {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.3;
}

.gauge {
    height: 22px;
    background: #dde3ec;
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    background: var(--mchicha);
    transition: width 0.4s ease;
}

.gauge-fill.is-warn {
    background: var(--warn);
}

.gauge-fill.is-over {
    background: var(--tomato);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.budget-callout {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
}

.budget-callout.is-over {
    color: var(--tomato);
}

.budget-callout.is-warn {
    color: var(--warn);
}

.budget-callout.is-good {
    color: var(--mchicha);
}

/* ---------- stats ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--line);
    margin: 0;
}

.stat {
    padding: 16px 18px 16px 0;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: 0;
}

.stat dt {
    color: var(--muted);
    font-size: 13px;
}

.stat dd {
    margin: 3px 0 0;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

/* ---------- ledger / tables ---------- */

.table-scroll {
    overflow-x: auto;
}

.ledger {
    width: 100%;
    border-collapse: collapse;
}

.ledger th {
    padding: 10px 10px;
    border-bottom: 1px solid var(--ink);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.ledger td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.ledger tr:last-child td {
    border-bottom: 0;
}

.ledger .num {
    text-align: right;
    white-space: nowrap;
}

.ledger .strong {
    font-weight: 600;
}

/* ---------- chips ---------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.chip-placed {
    background: #e7ecf5;
    color: #1c3d6e;
}

.chip-confirmed {
    background: #e8f2e9;
    color: #23603f;
}

.chip-preparing {
    background: #fcf0d8;
    color: #7a5200;
}

.chip-ready {
    background: #e4f0ea;
    color: #1f5c42;
}

.chip-delivered {
    background: #e3edf0;
    color: #1c4e5c;
}

.chip-cancelled {
    background: #fbe7e2;
    color: #8a2b15;
}

.chip-pending {
    background: #fcf0d8;
    color: #7a5200;
}

.chip-approved {
    background: #e8f2e9;
    color: #23603f;
}

.chip-paid {
    background: #e3edf0;
    color: #1c4e5c;
}

.chip-rejected {
    background: #fbe7e2;
    color: #8a2b15;
}

.chip-available {
    background: #e8f2e9;
    color: #23603f;
}

.chip-unavailable {
    background: #eceae4;
    color: #6b6355;
}

/* ---------- order stepper ---------- */

.steps {
    display: flex;
    gap: 0;
    margin: 18px 0 6px;
    padding: 0;
    list-style: none;
}

.step {
    position: relative;
    flex: 1;
    padding-top: 18px;
    color: #9aa39a;
    font-size: 12px;
    font-weight: 500;
}

.step::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line);
}

.step::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line);
}

.step:first-child::before {
    left: 0;
}

.step.done {
    color: var(--ink);
}

.step.done::before,
.step.done::after {
    background: var(--mchicha);
}

.step.current {
    color: var(--ink);
    font-weight: 600;
}

.step.current::after {
    background: var(--navy);
    box-shadow: 0 0 0 4px rgba(22, 55, 94, 0.28);
}

/* ---------- order cards ---------- */

.order-card {
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 20px 22px;
}

.order-card + .order-card {
    margin-top: 14px;
}

.order-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.order-top h3 {
    font-size: 1.2rem;
}

.order-sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.order-items {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
}

.order-items li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
}

.order-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.order-total {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

/* ---------- cart ---------- */

.cart-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.85fr;
    gap: 28px;
    align-items: start;
}

.cart-item {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.cart-thumb {
    display: block;
    width: 76px;
    height: 57px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--limestone);
}

.cart-item:first-child {
    border-top: 1px solid var(--ink);
}

.cart-item h3 {
    font-size: 1.15rem;
}

.cart-item .unit {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--paper);
}

.qty button {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.qty button:hover {
    background: #eef1f6;
}

.qty .qty-value {
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.cart-line-total {
    min-width: 90px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.text-link {
    color: var(--muted);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.text-link:hover {
    color: var(--tomato);
}

.summary {
    position: sticky;
    top: 92px;
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: 24px;
}

.summary h2 {
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.summary-line.muted {
    color: var(--muted);
    font-size: 13px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding-top: 13px;
    border-top: 1px solid var(--ink);
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.summary .field {
    margin-top: 18px;
    margin-bottom: 14px;
}

/* ---------- restaurant board ---------- */

.board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(230px, 1fr));
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.column {
    background: #e4e9f1;
    border: 1px solid var(--line);
    min-height: 220px;
}

.column-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
}

.column-head .count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.ticket {
    background: var(--paper);
    border: 1px solid var(--line);
    margin: 10px;
    padding: 14px;
}

.ticket-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    font-weight: 600;
}

.ticket-meta {
    color: var(--muted);
    font-size: 13px;
    margin: 4px 0 10px;
}

.ticket-total {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ticket-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.column-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 14px;
}

/* ---------- menu management ---------- */

.menu-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.8fr;
    gap: 28px;
    align-items: start;
}

.menu-aside {
    position: sticky;
    top: 92px;
}

.menu-category {
    border-top: 1px solid var(--ink);
    padding-top: 12px;
    margin-top: 26px;
}

.menu-category:first-of-type {
    margin-top: 0;
}

.menu-category-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.menu-category-head h2 {
    font-size: 1.35rem;
}

.menu-item {
    display: grid;
    grid-template-columns: 64px 1fr auto auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.menu-item-photo {
    display: block;
    width: 64px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--limestone);
}

.menu-item .name {
    font-weight: 600;
}

.menu-item .desc {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

.menu-item .price {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.availability-form select {
    min-height: 34px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: 13px;
    border-radius: var(--radius);
}

details.panel summary {
    cursor: pointer;
    list-style: none;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 650;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

details.panel summary::-webkit-details-marker {
    display: none;
}

details.panel summary::after {
    content: "+";
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 400;
    color: var(--muted);
}

details.panel[open] summary::after {
    content: "–";
}

details.panel summary + * {
    margin-top: 18px;
}

/* ---------- payouts ---------- */

.payout-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 28px;
    align-items: start;
}

/* ---------- auth ---------- */

.auth-page {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--limestone);
}

.auth-aside {
    position: relative;
    background: var(--navy);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    overflow: hidden;
}

.auth-aside .brand {
    font-size: 30px;
}

.auth-aside h1 {
    font-size: clamp(2.4rem, 4.6vw, 4.1rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.98;
    max-width: 12ch;
}

.auth-aside p {
    color: #b9c5d6;
    max-width: 42ch;
    margin-top: 18px;
}

.auth-aside .aside-note {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: #8fa1ba;
    font-size: 13px;
}

.auth-aside .aside-note::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    flex: none;
}

.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 24px;
}

.auth-card {
    width: min(420px, 100%);
}

.auth-card h2 {
    font-size: 2rem;
    font-weight: 700;
}

.auth-sub {
    color: var(--muted);
    margin: 8px 0 26px;
}

.auth-foot {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-foot a {
    color: var(--navy);
    font-weight: 600;
}

.demo-box {
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.demo-box summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
}

.demo-box ul {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.demo-box li {
    padding: 3px 0;
}

.demo-box strong {
    color: var(--ink);
    font-weight: 600;
}

.role-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.role-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-choice label {
    display: block;
    padding: 13px 14px;
    border: 1px solid var(--line);
    background: var(--paper);
    cursor: pointer;
}

.role-choice label strong {
    display: block;
    font-size: 14px;
}

.role-choice label span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.role-choice input:checked + label {
    border-color: var(--navy);
    box-shadow: inset 0 0 0 1px var(--navy);
    background: #eef1f6;
}

/* ---------- empty states ---------- */

.empty {
    padding: 42px 24px;
    text-align: center;
    border: 1px dashed var(--line);
    background: #f7f8f4;
}

.empty h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.empty p {
    color: var(--muted);
    margin: 0 auto 16px;
    max-width: 42ch;
}

/* ---------- footer ---------- */

.site-footer {
    margin-top: 64px;
    background: var(--navy);
    color: #a9b6c9;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 26px 0;
    font-size: 13px;
}

.footer-inner p {
    margin: 0;
}

.footer-inner .tagline {
    color: #d7dfe9;
}

/* ---------- extra components ---------- */

.action-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0;
    margin: 28px 0 8px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--line);
}

.action-link {
    display: block;
    padding: 18px 20px 18px 0;
    border-right: 1px solid var(--line);
    text-decoration: none;
    transition: background 0.15s ease;
}

.action-link:last-child {
    border-right: 0;
}

.action-link:hover {
    background: rgba(255, 255, 255, 0.55);
}

.action-link strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.action-link span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

.menu-list {
    border-top: 1px solid var(--ink);
}

.menu-row {
    display: grid;
    grid-template-columns: 120px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.menu-photo {
    display: block;
    width: 120px;
    height: 90px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--limestone);
}

.menu-row-name {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.menu-row-desc {
    color: var(--muted);
    font-size: 14px;
    margin-top: 2px;
}

.menu-row-time {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.menu-row-price {
    font-weight: 600;
    white-space: nowrap;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    gap: 28px;
    align-items: start;
}

.account-list {
    margin: 0;
}

.account-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.account-list > div:last-child {
    border-bottom: 0;
}

.account-list dt {
    color: var(--muted);
}

.account-list dd {
    margin: 0;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.cart-list {
    border-top: 1px solid var(--ink);
}

.cart-item:first-child {
    border-top: 0;
}

.budget-check {
    margin: 14px 0 4px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    border-left: 3px solid var(--mchicha);
    background: #e7f2ea;
    color: #1f5537;
}

.budget-check.is-over {
    border-color: var(--tomato);
    background: #fbeae5;
    color: #7e2715;
}

.budget-check a {
    color: inherit;
    font-weight: 600;
}

.qty form {
    display: inline-flex;
    margin: 0;
}

.role-choice input:focus-visible + label {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .menu-row {
        grid-template-columns: 84px 1fr auto;
        gap: 12px;
    }

    .menu-photo {
        width: 84px;
        height: 63px;
    }

    .menu-row form,
    .menu-row > a.btn {
        grid-column: 2 / -1;
    }

    .menu-row .btn {
        justify-self: start;
    }

    .menu-item {
        grid-template-columns: 64px 1fr auto;
        gap: 10px 12px;
    }

    .menu-item .availability-form {
        grid-column: 1 / -1;
    }

    .action-link {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-left: 0;
    }

    .action-link:last-child {
        border-bottom: 0;
    }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .hero,
    .cart-grid,
    .menu-grid,
    .payout-grid,
    .auth-page {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 38px;
        gap: 32px;
    }

    .hero h1 {
        max-width: 16ch;
    }

    .budget-hero {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .summary,
    .menu-aside {
        position: static;
    }

    .auth-aside {
        padding: 32px 24px;
        gap: 28px;
    }

    .auth-aside h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        max-width: 18ch;
    }

    .auth-aside .aside-note {
        display: none;
    }

    .board-grid {
        grid-template-columns: repeat(4, minmax(240px, 1fr));
    }
}

@media (max-width: 680px) {
    .shell,
    .shell-narrow {
        width: min(100% - 28px, 1120px);
    }

    .header-inner {
        gap: 12px;
        min-height: 60px;
    }

    .brand {
        font-size: 24px;
    }

    .header-user {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .nav-menu {
        display: block;
    }

    .page-head {
        padding: 30px 0 18px;
        margin-bottom: 22px;
    }

    .panel {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .kitchen-row {
        grid-template-columns: 76px 1fr auto;
        gap: 10px 16px;
    }

    .kitchen-thumb {
        width: 76px;
        height: 57px;
    }

    .kitchen-row .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .stat {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 14px 0;
    }

    .stat:last-child {
        border-bottom: 0;
    }

    .cart-item {
        grid-template-columns: 64px 1fr;
    }

    .cart-thumb {
        width: 64px;
        height: 48px;
    }

    .cart-controls {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .steps {
        overflow-x: auto;
    }

    .step {
        min-width: 64px;
    }

    .site-footer {
        margin-top: 44px;
    }

    .board-grid {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .column {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
    }
}
