/* ==========================================================================
   Abaseen design system
   One product, three interfaces (public site, waiter app, admin, kitchen).
   Neutral graphite base + brand orange reserved for "needs action" + a
   distinct red reserved for "urgent/overdue" + amber for "pending/upcoming".
   Flat surfaces, strong borders, color+shape status coding, no decoration
   that gets in the way of scanning under time pressure.
   ========================================================================== */

:root {
    /* Brand */
    --brand-orange: #F15A24;
    --brand-orange-dark: #C7440F;
    --brand-amber: #F59D22;
    --brand-maroon: #340F12;

    /* Semantic status roles — used consistently everywhere status appears */
    --status-ok: #2E7D4F;        /* free table, stock fine, nothing pending */
    --status-ok-bg: #E7F4EC;
    --status-active: var(--brand-orange); /* occupied, sent to kitchen, in progress */
    --status-active-bg: #FDEAE1;
    --status-pending: var(--brand-amber); /* reserved, awaiting decision, low stock */
    --status-pending-bg: #FEF3E0;
    --status-urgent: #C6293B;    /* overdue, critical stock, voided, error */
    --status-urgent-bg: #FBE6E9;
    --status-info: #2E5F8A;      /* billing/closing, informational */
    --status-info-bg: #E8F0F7;

    /* Neutral graphite scale — the calm base, not cream/beige */
    --ink-900: #1B1D1F;
    --ink-700: #3A3D42;
    --ink-500: #6B7076;
    --ink-300: #A6ABB1;
    --ink-150: #DADDE1;
    --ink-100: #ECEEF0;
    --ink-050: #F6F7F8;
    --paper: #FFFFFF;

    --radius-sm: 4px;
    --radius-md: 8px;
    --tap-min: 44px;

    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow-float: 0 2px 10px rgba(27, 29, 31, 0.16);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--font-ui);
    background: var(--ink-050);
    color: var(--ink-900);
    -webkit-font-smoothing: antialiased;
}

body { font-size: 16px; line-height: 1.45; }

h1, h2, h3 { font-family: var(--font-ui); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }

a { color: var(--brand-orange-dark); }
a:hover { color: var(--brand-orange); }

/* Hard safety net: no <img> anywhere can ever render at its raw native size,
   even one added later without its own sizing rule (our source PNGs are
   2000x2000 originals — unconstrained, they'd blow out the whole layout). */
img { max-width: 100%; height: auto; }

/* Numeric alignment for prices, quantities, timers */
.num, .price, td.num, .menu-item .price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

:focus-visible {
    outline: 3px solid var(--brand-orange);
    outline-offset: 2px;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--brand-orange);
    outline-offset: 2px;
}

/* ==========================================================================
   Public marketing site
   ========================================================================== */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 2rem;
    background: var(--brand-maroon);
    color: #fff;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.site-header a { color: #fff; text-decoration: none; }
.site-header .brand { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; font-weight: 800; letter-spacing: 0.02em; }
.site-header .brand img { width: 42px; height: 42px; border-radius: 50%; display: block; }
.site-header nav { display: flex; align-items: center; }
.site-header nav a {
    margin-left: 0.25rem;
    padding: 0.5rem 0.9rem;
    opacity: 0.85;
    font-weight: 600;
    border-radius: 999px;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}
.site-header nav a:hover, .site-header nav a.is-current { opacity: 1; background: rgba(255,255,255,0.12); }

/* Hero: full-bleed brand gradient with a faint diagonal texture, mascot, and a two-CTA row */
.hero {
    position: relative;
    padding: 4.5rem 2rem 4rem;
    text-align: center;
    background:
        repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 26px),
        linear-gradient(160deg, var(--brand-maroon) 0%, #521a20 100%);
    color: #fff;
    overflow: hidden;
}
.hero .hero-mark { width: 168px; height: 168px; margin-bottom: 1rem; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.hero .eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand-amber);
    margin-bottom: 0.6rem;
}
.hero h1 { font-size: 2.75rem; margin-bottom: 0.6rem; }
.hero p.lede { font-size: 1.15rem; opacity: 0.9; max-width: 46ch; margin-left: auto; margin-right: auto; }
.hero .hero-ctas { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }

.container { max-width: 1100px; margin: 0 auto; padding: 2rem; }
.section { padding: 3.5rem 0; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 2.25rem; }
.section-head .eyebrow { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-orange-dark); margin-bottom: 0.4rem; }
.section-head h2 { font-size: 1.9rem; color: var(--brand-maroon); margin-bottom: 0.5rem; }
.section-head p { color: var(--ink-500); margin: 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--ink-150); border-bottom: 1px solid var(--ink-150); }

/* Feature grid — "why Abaseen" style content with icons, no photography needed */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.feature-card { text-align: center; padding: 1.5rem 1.1rem; }
.feature-card .f-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--status-active-bg);
    color: var(--brand-orange-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-card .f-icon svg { width: 28px; height: 28px; }
.feature-card h3 { color: var(--brand-maroon); margin-bottom: 0.35rem; }
.feature-card p { color: var(--ink-500); font-size: 0.92rem; margin: 0; }

/* Signature dish teaser grid on the homepage */
.dish-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.dish-card {
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border-top: 4px solid var(--brand-orange);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dish-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(27,29,31,0.1); }
.dish-card .d-category { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-orange-dark); }
.dish-card h3 { margin: 0.3rem 0 0.4rem; font-size: 1.1rem; }
.dish-card .d-price { color: var(--brand-maroon); font-weight: 800; font-size: 1.15rem; }

/* CTA band before the footer */
.cta-band {
    background: var(--brand-orange);
    color: #fff;
    text-align: center;
    padding: 3rem 2rem;
}
.cta-band h2 { color: #fff; margin-bottom: 0.4rem; }
.cta-band p { opacity: 0.95; margin-bottom: 1.5rem; }
.cta-band .btn-secondary { background: var(--brand-maroon); }
.cta-band .btn-secondary:hover { background: #521a20; }

/* Pull quote accent (About page) */
.pull-quote {
    position: relative;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-maroon);
    padding: 0.5rem 0 0.5rem 1.5rem;
    border-left: 4px solid var(--brand-orange);
    margin: 2rem 0;
}
.calligraph-accent { width: 100%; max-width: 320px; opacity: 0.9; margin: 0 auto 1.5rem; display: block; }

/* Info cards (Contact page) */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.info-card { text-align: center; padding: 1.5rem 1rem; }
.info-card .f-icon { width: 48px; height: 48px; margin: 0 auto 0.75rem; border-radius: 50%; background: var(--status-active-bg); color: var(--brand-orange-dark); display: flex; align-items: center; justify-content: center; }
.info-card .f-icon svg { width: 24px; height: 24px; }
.info-card h3 { font-size: 0.95rem; margin-bottom: 0.25rem; }
.info-card p { margin: 0; color: var(--ink-500); font-size: 0.92rem; }

/* Menu accordion — real interactivity, not a static wall of text */
.menu-accordion { max-width: 760px; margin: 0 auto; }
.accordion-item { border: 1px solid var(--ink-150); border-radius: var(--radius-md); margin-bottom: 0.75rem; overflow: hidden; background: var(--paper); }
.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--brand-maroon);
    text-align: left;
}
.accordion-trigger .a-count { font-size: 0.78rem; font-weight: 700; color: var(--ink-500); text-transform: none; letter-spacing: normal; margin-left: 0.5rem; }
.accordion-trigger .a-chevron { flex: none; width: 20px; height: 20px; transition: transform 0.2s ease; color: var(--brand-orange); }
.accordion-item.is-open .a-chevron { transform: rotate(180deg); }
.accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.accordion-item.is-open .accordion-panel { max-height: 3000px; }
.accordion-panel-inner { padding: 0 1.25rem 1.1rem; }

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--ink-150);
}
.menu-item:last-child { border-bottom: none; }
.menu-item .name { font-weight: 700; }
.menu-item .desc { color: var(--ink-500); font-size: 0.88rem; margin-top: 0.15rem; }
.menu-item .price { text-align: right; white-space: nowrap; color: var(--brand-maroon); }

.site-footer {
    text-align: center;
    padding: 2.5rem 2rem;
    color: var(--ink-500);
    font-size: 0.9rem;
    border-top: 1px solid var(--ink-150);
    background: var(--paper);
}
.site-footer img { width: 32px; height: 32px; border-radius: 50%; vertical-align: middle; margin-right: 0.5rem; }
.site-footer .footer-links { margin-bottom: 0.75rem; }
.site-footer .footer-links a { margin: 0 0.6rem; color: var(--ink-700); font-weight: 600; }
.site-footer .footer-links a:hover { color: var(--brand-orange); }

@media (prefers-reduced-motion: reduce) {
    .dish-card, .accordion-panel, .a-chevron { transition: none; }
}

/* Login screens — same card shell for all four portals */
.login-shell {
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    padding: 2rem 1.75rem;
    text-align: center;
}
.login-card img { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 0.75rem; }
.login-card h1 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.login-card .form-group { text-align: left; }
.login-card .remember-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.25rem 0 1rem;
    text-align: left;
    font-size: 0.9rem;
    color: var(--ink-700);
}
.login-card .remember-row input { width: auto; min-height: auto; }
.login-card .pin-input {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.5em;
    padding-left: 1.5em; /* re-center for the letter-spacing */
}
.login-card .forgot-note { margin-top: 1rem; font-size: 0.85rem; color: var(--ink-500); }

/* ==========================================================================
   Shared portal chrome (admin / waiter / kitchen / pos)
   ========================================================================== */

.portal-body { background: var(--ink-050); padding-bottom: 5rem; }

.portal-nav {
    background: var(--ink-900);
    color: #fff;
    padding: 0.6rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 40;
}
.portal-nav > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.portal-nav strong { display: flex; align-items: center; gap: 0.5rem; margin-right: 0.5rem; font-weight: 800; letter-spacing: 0.01em; }
.portal-nav strong img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.portal-nav a {
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.3rem 0.1rem;
}
.portal-nav a:hover { color: #fff; }
.portal-nav > div:last-child { display: flex; align-items: center; gap: 0.9rem; font-size: 0.88rem; opacity: 0.9; }

main.container { max-width: 1200px; }

.card {
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* Data tables */
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
table.data-table th {
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-bottom: 2px solid var(--ink-150);
    color: var(--ink-500);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}
table.data-table td {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--ink-100);
    vertical-align: middle;
}
table.data-table tbody tr:hover { background: var(--ink-050); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: var(--tap-min);
    padding: 0.55rem 1.1rem;
    background: var(--brand-orange);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.1;
    transition: background-color 0.1s ease;
}
.btn:hover { background: var(--brand-orange-dark); color: #fff; }
.btn:active { background: var(--brand-orange-dark); }
.btn-secondary { background: var(--ink-700); }
.btn-secondary:hover { background: var(--ink-900); }
.btn-danger { background: var(--status-urgent); }
.btn-danger:hover { background: #a11f2e; }
.btn-ghost { background: transparent; color: var(--ink-700); border: 1px solid var(--ink-150); }
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); }
.btn-sm { min-height: 36px; padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 700; font-size: 0.9rem; color: var(--ink-700); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    min-height: var(--tap-min);
    padding: 0.55rem 0.7rem;
    border: 1.5px solid var(--ink-150);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-ui);
    background: var(--paper);
    color: var(--ink-900);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--brand-orange);
}
.form-group textarea { min-height: 80px; }

/* Status pills — color + shape, never color alone */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.6;
    white-space: nowrap;
}
.badge::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: none;
    background: currentColor;
}
/* free / ok = circle */
.badge-free, .badge-ok { background: var(--status-ok-bg); color: var(--status-ok); }
.badge-free::before, .badge-ok::before { border-radius: 50%; }
/* occupied / active = square */
.badge-occupied, .badge-active, .badge-sent { background: var(--status-active-bg); color: var(--status-active); }
.badge-occupied::before, .badge-active::before, .badge-sent::before { border-radius: 2px; }
/* reserved / pending = diamond */
.badge-reserved, .badge-pending_void, .badge-low, .badge-pending { background: var(--status-pending-bg); color: var(--status-pending); }
.badge-reserved::before, .badge-pending_void::before, .badge-low::before, .badge-pending::before { transform: rotate(45deg); border-radius: 1px; }
/* billing / info = rounded-corner tag */
.badge-billing, .badge-served { background: var(--status-info-bg); color: var(--status-info); }
.badge-billing::before, .badge-served::before { border-radius: 2px 2px 2px 8px; }
/* voided / urgent = ring */
.badge-voided, .badge-urgent { background: var(--status-urgent-bg); color: var(--status-urgent); }
.badge-voided::before, .badge-urgent::before {
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.alert { padding: 0.85rem 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-weight: 600; border: 1.5px solid transparent; }
.alert-error { background: var(--status-urgent-bg); color: var(--status-urgent); border-color: currentColor; }
.alert-success { background: var(--status-ok-bg); color: var(--status-ok); border-color: currentColor; }

/* ==========================================================================
   Waiter app — phone/tablet, one-handed, thumb-zone
   ========================================================================== */

.waiter-body { padding-bottom: 6rem; }

/* Table grid: color + shape status coding, big tiles */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
}
.table-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 108px;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--ink-900);
    background: var(--paper);
    box-shadow: 0 1px 3px rgba(27,29,31,0.08);
}
.table-tile .t-name { font-size: 1.35rem; font-weight: 800; }
.table-tile .t-meta { font-size: 0.82rem; color: var(--ink-500); font-weight: 600; }
.table-tile .t-status { display: flex; align-items: center; gap: 0.4rem; font-weight: 800; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-tile .t-status::before { content: ""; width: 12px; height: 12px; flex: none; }

.table-tile.status-free { border-color: var(--status-ok); }
.table-tile.status-free .t-status { color: var(--status-ok); }
.table-tile.status-free .t-status::before { border-radius: 50%; background: var(--status-ok); }

.table-tile.status-occupied { border-color: var(--status-active); background: var(--status-active-bg); }
.table-tile.status-occupied .t-status { color: var(--status-active); }
.table-tile.status-occupied .t-status::before { border-radius: 2px; background: var(--status-active); }

.table-tile.status-reserved { border-color: var(--status-pending); }
.table-tile.status-reserved .t-status { color: var(--status-pending); }
.table-tile.status-reserved .t-status::before { transform: rotate(45deg); background: var(--status-pending); }

.table-tile.status-billing { border-color: var(--status-info); background: var(--status-info-bg); }
.table-tile.status-billing .t-status { color: var(--status-info); }
.table-tile.status-billing .t-status::before { border-radius: 2px 2px 2px 8px; background: var(--status-info); }

/* Category chip scroller for order-taking */
.category-scroller {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--ink-150);
    position: sticky;
    top: 48px;
    z-index: 30;
    -webkit-overflow-scrolling: touch;
}
.category-chip {
    flex: none;
    min-height: var(--tap-min);
    padding: 0 1.1rem;
    display: flex;
    align-items: center;
    border-radius: 999px;
    background: var(--ink-100);
    color: var(--ink-700);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
}
.category-chip.is-active { background: var(--brand-orange); color: #fff; }

/* Menu item tap grid for adding items */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.item-tile {
    min-height: var(--tap-min);
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--ink-150);
    background: var(--paper);
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.item-tile:active { border-color: var(--brand-orange); background: var(--status-active-bg); }
.item-tile .i-name { font-weight: 700; font-size: 0.98rem; }
.item-tile .i-price { color: var(--brand-maroon); font-weight: 800; }

/* Running order list with locked/sent state */
.order-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--ink-100);
}
.order-line .ol-qty {
    flex: none;
    min-width: 2.4rem;
    height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink-100);
    border-radius: var(--radius-sm);
    font-weight: 800;
}
.order-line .ol-info { flex: 1; min-width: 0; }
.order-line .ol-name { font-weight: 700; }
.order-line .ol-note { font-size: 0.82rem; color: var(--ink-500); }
.order-line .ol-price { font-weight: 700; white-space: nowrap; }

.order-line.is-pending { background: var(--status-pending-bg); border-radius: var(--radius-sm); }
.order-line.is-pending .ol-qty { background: var(--status-pending); color: #fff; }

.order-line.is-locked { opacity: 0.62; }
.order-line.is-locked .ol-qty { background: var(--ink-150); }

.order-line.is-void-pending {
    opacity: 1;
    background: var(--status-urgent-bg);
    border-radius: var(--radius-sm);
}
.order-line.is-void-pending .ol-qty { background: var(--status-urgent); color: #fff; }

/* Sticky bottom action bar — thumb zone */
.thumb-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    gap: 0.6rem;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--ink-150);
    box-shadow: var(--shadow-float);
}
.thumb-bar .btn { flex: 1; min-height: 52px; font-size: 1.02rem; }

/* ==========================================================================
   Admin dashboard
   ========================================================================== */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.85rem; margin-bottom: 1rem; }
.stat-tile {
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
}
.stat-tile .s-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-500); font-weight: 700; }
.stat-tile .s-value { font-size: 1.9rem; font-weight: 800; margin-top: 0.15rem; }
.stat-tile.needs-action { border-color: var(--status-active); background: var(--status-active-bg); }
.stat-tile.needs-action .s-value { color: var(--brand-orange-dark); }
.stat-tile.urgent { border-color: var(--status-urgent); background: var(--status-urgent-bg); }
.stat-tile.urgent .s-value { color: var(--status-urgent); }

/* Approval queue — an inbox, not a table */
.approval-list { display: flex; flex-direction: column; gap: 0.75rem; }
.approval-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--paper);
    border: 1.5px solid var(--status-pending);
    border-left: 6px solid var(--status-pending);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
}
.approval-card.is-overdue { border-color: var(--status-urgent); border-left-color: var(--status-urgent); background: var(--status-urgent-bg); }
.approval-card .a-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--status-pending-bg);
    color: var(--status-pending);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}
.approval-card.is-overdue .a-icon { background: var(--status-urgent-bg); color: var(--status-urgent); }
.approval-card .a-body { flex: 1; min-width: 0; }
.approval-card .a-title { font-weight: 800; font-size: 1.02rem; }
.approval-card .a-meta { font-size: 0.85rem; color: var(--ink-500); margin-top: 0.15rem; }
.approval-card .a-reason { margin-top: 0.5rem; padding: 0.5rem 0.7rem; background: var(--ink-050); border-radius: var(--radius-sm); font-size: 0.92rem; }
.approval-card .a-elapsed { font-weight: 800; font-size: 0.85rem; }
.approval-card .a-elapsed.overdue { color: var(--status-urgent); }
.approval-card .a-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* Simple CSS bar chart — no external chart lib, no CDN */
.bar-chart { display: flex; align-items: flex-end; gap: 0.6rem; height: 180px; padding-top: 1rem; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 0.4rem; }
.bar-chart .bar-fill { width: 100%; max-width: 42px; background: var(--brand-orange); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-chart .bar-label { font-size: 0.72rem; color: var(--ink-500); text-align: center; }
.bar-chart .bar-value { font-size: 0.78rem; font-weight: 700; }

/* Low-stock inline indicator (shape + color, not just red text) */
.stock-pill { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; }
.stock-pill.low::before { content: "▲"; color: var(--status-pending); font-size: 0.7rem; }
.stock-pill.critical::before { content: "▲"; color: var(--status-urgent); font-size: 0.7rem; }
.stock-pill.ok::before { content: "●"; color: var(--status-ok); font-size: 0.55rem; }

/* ==========================================================================
   Kitchen display — large screen, viewed from a few feet away
   ========================================================================== */

.kds-body { background: var(--ink-900); color: #fff; }
.kds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.ticket {
    background: #262A2E;
    border-radius: var(--radius-md);
    border: 2px solid #3A3F45;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.ticket.is-new { border-color: var(--brand-orange); box-shadow: 0 0 0 3px rgba(241,90,36,0.35); }
.ticket.is-late { border-color: var(--status-urgent); box-shadow: 0 0 0 3px rgba(198,41,59,0.35); }
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; }
.ticket-head .t-table { font-size: 1.5rem; font-weight: 800; }
.ticket-head .t-batch { font-size: 0.9rem; color: #B9BEC4; font-weight: 700; }
.ticket-timer { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #B9BEC4; }
.ticket.is-late .ticket-timer { color: #FF7A85; }
.ticket-items { display: flex; flex-direction: column; gap: 0.4rem; }
.ticket-item { display: flex; gap: 0.6rem; font-size: 1.15rem; font-weight: 700; }
.ticket-item .qty { color: var(--brand-orange); min-width: 2ch; }
.ticket-item .note { display: block; font-size: 0.85rem; font-weight: 500; color: #B9BEC4; }
.ticket .btn { margin-top: 0.4rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
    .container { padding: 1.25rem; }
    h1 { font-size: 1.4rem; }
    .portal-nav { padding: 0.6rem 0.85rem; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .table-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    table.data-table { font-size: 0.85rem; }
    table.data-table th, table.data-table td { padding: 0.5rem; }
}
