/* Shared visual foundations for the operational workspace and customer ordering. */
:root {
    --green: #176448;
    --ink: #1b3029;
    --muted: #66756e;
    --line: #e2e9e4;
    --canvas: #f5f7f6;
    --gold: #f4bc4d;
    --radius: 18px;
    --shadow-soft: 0 3px 18px rgb(24 57 42 / 4%);
}
[hidden] { display: none !important; }
body { -webkit-font-smoothing: antialiased; }
.app-workspace, .customer-app { font-size: 14px; line-height: 1.6; }
.app-workspace main, .customer-app main { min-width: 0; }
.app-workspace h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.045em; }
h2 { font-size: 20px; }
.page { padding: 30px clamp(20px, 3vw, 48px) 56px; }
.card, .stats article { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.card { padding: 24px; }
.btn, .quiet { min-height: 42px; border-radius: 10px; gap: 8px; font-size: 13px; }
.btn { box-shadow: 0 2px 3px rgb(16 58 40 / 6%); }
.btn.outline { border-color: #d7e1da; background: #fff; }
.btn.outline:hover { background: #f2f7f4; border-color: #94b4a3; }
.quiet.danger:hover { background: #fff0ed; }
input, select { border-color: #d6e0d9; border-radius: 10px; min-height: 44px; padding: 10px 12px; }
input:focus, select:focus { border-color: #419271; box-shadow: 0 0 0 3px rgb(23 100 72 / 11%); }
input[readonly] { background: #f7faf8; }
label { font-size: 13px; }
.check input { min-height: 0; }
.pill { padding: 5px 10px; font-size: 11px; background: #eaf5ee; color: #1a6846; }
.pill.amber { background: #fff4dd; color: #896017; }
.pill.cancelled { background: #fbecea; color: #a0493d; }
.pill.closed { background: #eef1f0; color: #68756d; }
.notice { border: 1px solid #cfe7d8; border-radius: 12px; font-size: 13px; }
.notice.warning { border-color: #f2ddb4; }
.success-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.success-notice .quiet { min-height: 32px; padding: 4px 10px; }
.skip-link { position: fixed; top: 8px; left: 16px; padding: 12px 20px; background: white; z-index: 200; border-radius: 10px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
#main-content:focus { outline: none; }

/* Navigation stays quiet while the current location is easy to identify. */
.shell { grid-template-columns: 242px minmax(0, 1fr); }
.rail { padding: 25px 18px 18px; gap: 24px; background: #fff; }
.rail .brand { padding: 0 8px; }
.rail .brand img { width: 68px; height: 68px; }
.rail .brand b { font-size: 22px; }
.rail-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.nav-close { display: none; }
.nav-section-label { font-size: 10px; letter-spacing: .13em; margin: 6px 12px -12px; color: #819087; }
.rail nav { gap: 5px; }
.rail nav a { padding: 10px 12px; border-radius: 11px; font-size: 12px; gap: 10px; min-height: 48px; }
.rail nav .nav-icon { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; background: #f3f6f4; }
.rail nav a.active { background: #edf6f0; border-color: transparent; box-shadow: none; }
.rail nav a.active .nav-icon { background: #176448; color: #fff; }
.rail nav a.active::after { background: #176448; width: 5px; height: 5px; }
.rail nav a:hover { transform: none; background: #f2f6f3; }
.rail-footer { padding-top: 16px; }
.top { min-height: 72px; padding: 14px clamp(20px, 3vw, 48px); background: rgb(255 255 255 / 96%); }
.top-location, .top-actions { display: flex; align-items: center; gap: 18px; min-width: 0; }
.top-location > span { font-size: 12px; }
.top-actions { gap: 22px; flex-shrink: 0; }
.customer-shortcut { font-size: 12px; color: var(--muted); }
.identity { border-color: var(--line); background: #f7faf8; padding: 5px 10px 5px 5px; }
.identity-avatar { background: #e8f1eb; }
.mobile-nav-toggle, .nav-backdrop { display: none; }

/* A compact overview makes operational information visible sooner. */
.dashboard-page .hero-meals { min-height: 220px; padding: 30px 34px; margin-bottom: 22px; border-radius: 22px; box-shadow: 0 12px 28px rgb(15 55 36 / 10%); }
.dashboard-page .hero-meals .hero-meals-copy { width: 52%; max-width: none; }
.dashboard-page .hero-meals h1 { font-size: clamp(30px, 3.2vw, 42px); margin: 10px 0; max-width: 100%; }
.dashboard-page .hero-meals .eyebrow { font-size: 10px; }
.dashboard-page .hero-meals .hero-meals-tagline { margin-bottom: 18px; }
.dashboard-page .hero-meals > img { width: 49%; height: 100%; top: 0; bottom: auto; object-fit: contain; right: 0; }
.stats { gap: 16px; margin: 20px 0 26px; }
.stats article { padding: 20px 22px; overflow: hidden; }
.stats article::after { display: none; }
.stats strong { font-size: 32px; font-variant-numeric: tabular-nums; line-height: 1.3; margin-top: 9px; font-weight: 750; }
.stats article > span { font-size: 12px; }
.stats article > small { margin-top: 8px; }
.dashboard-metrics article:first-child { background: #edf6f0; border-color: #d3e8dc; }
.dashboard-metrics article:last-child { background: #fffaf0; border-color: #f0e5c9; }
.dashboard-metrics .metric-label { display: flex; gap: 8px; align-items: center; }
.metric-label .ui-icon { width: 17px; height: 17px; color: #569076; }
.today-work { margin: 30px 0; }
.today-work .eyebrow { color: #718177; font-size: 10px; }
.today-work .today-stats strong { font-size: 28px; }
.today-work .split .card { box-shadow: none; }
.detailrow { padding: 13px 0; gap: 16px; }
.share-card { display: grid; grid-template-columns: 1fr minmax(240px, 1fr); align-items: center; gap: 24px; background: #f0f6f2; border-color: #d7e5dc; box-shadow: none; }
.share-card h2 { font-size: 18px; margin-bottom: 6px; }
.share-card p { font-size: 12px; margin-bottom: 12px; }
.share-control { display: flex; gap: 8px; }
.share-control input { flex: 1; min-width: 0; font-size: 12px; background: #fff; }
.share-card label { margin-bottom: 7px; font-size: 11px; }
.share-status { min-height: 20px; margin-top: 6px; font-size: 11px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 4px; }
.section-heading p { margin: 0; font-size: 12px; }
.heading form.row > input[type="month"] { width: auto; min-width: 180px; }
.heading form.row label.check { white-space: nowrap; margin: 0; }
th { background: #f7f9f7; font-weight: 650; font-size: 11px; letter-spacing: .025em; padding: 13px 14px; }
td { padding: 17px 14px; font-size: 13px; }
td strong, td b { font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbf9; }
.table-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-actions .btn { min-height: 34px; font-size: 11px; padding: 7px 12px; }
.stock-meter { width: min(100%, 130px); height: 5px; margin-top: 7px; overflow: hidden; background: #eaf0ec; border-radius: 9px; }
.stock-meter span { display: block; height: 100%; background: #429b72; border-radius: inherit; }
.stock-meter.low span { background: #e1ae43; }
.order-list-table td:last-child { min-width: 160px; }
.order-list-table td:last-child .btn { min-height: 34px; padding: 7px 10px; font-size: 11px; }
.order-filters { background: #f7faf8; padding: 16px; border-radius: 12px; }
.order-filters label { margin-bottom: 0; }
details.card > summary { min-height: 26px; }
.check-order-modal { border-radius: 20px; border-color: #dce6df; padding: 26px; }
.check-order-modal::backdrop { background: rgb(13 34 25 / 48%); backdrop-filter: blur(3px); }

/* The summary never overlays the customer or menu fields. */
.order-entry.order-entry--stock-open { padding-right: 0; }
.order-entry > .order-stock, .customer-page .order-entry > .order-stock { position: static; width: 100%; max-width: none; margin: 0 0 20px; box-shadow: none; }
.order-stock-toggle { min-height: 58px; padding: 12px 20px; background: #edf5f0; color: #28543e; }
.order-stock-toggle small { color: #647d6c; }
.order-stock-content { max-height: none; padding: 20px; }
.order-stock-row { padding: 10px 0; }
.order-entry > form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.order-entry > form > .card { margin: 0; min-width: 0; }
.order-entry > form > .card:not(.order-summary) { grid-column: 1; }
.order-entry > form > .order-summary { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 20px; bottom: auto; z-index: 1; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 22px; box-shadow: var(--shadow-soft); border-top: 3px solid #358962; }
.order-summary .summary-toggle { align-items: flex-start; gap: 10px; }
.order-summary .summary-toggle b { font-size: 16px; }
.order-summary .summary-toggle > span:last-child { font-size: 10px; padding-top: 4px; }
.order-summary .summary-line { font-size: 12px; gap: 10px; padding: 12px 0; }
.order-summary .summary-line small { font-size: 11px; margin-top: 5px; }
.order-summary .summary-total { margin: 20px 0; border-radius: 12px; padding: 14px; background: #f0f7f2; }
.order-summary .summary-total p { font-size: 11px; }
.order-summary .summary-total h2 { font-size: 22px; margin: 5px 0 0; }
.order-summary > .btn { width: 100%; min-height: 46px; }
.order-summary > .check { padding-bottom: 16px; font-size: 12px; }
.order-entry .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.order-entry .fields label { min-width: 0; }
.order-entry .line { padding: 20px 0; }
.order-entry .line .row { padding: 12px; background: #f6f9f7; border: 1px solid #e6ede8; border-radius: 12px; margin-bottom: 16px; justify-content: space-between; }
.order-entry .line .row .btn { min-height: 34px; font-size: 11px; padding: 7px 10px; }
.order-entry .line .hint { font-size: 12px; }
.order-entry .cuts, .customer-order-entry .cuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.order-entry .cuts label { border: 1px solid #e0e8e2; padding: 13px; border-radius: 12px; background: #fcfdfc; margin: 0; }
.order-entry .cuts label:focus-within { border-color: #84ac95; background: #f4f9f5; }
.order-entry .cuts label small { font-size: 11px; }
.order-entry .cuts input { background: white; }
.order-entry .cuts label.cut-over-limit { border-color: #dfb5ac; background: #fff7f5; }
.customer-header { padding-top: 14px; padding-bottom: 14px; }
.customer-header .brand img { width: 76px; height: 76px; }
.customer-hero { border-radius: 22px; }
.customer-po-card { border-top-width: 1px; padding: 26px; box-shadow: var(--shadow-soft); }
.customer-po-card .customer-date-tile { background: #eff6f0; border-color: #dce9df; color: var(--green); }
.customer-po-meta { background: #f6f9f6; }
.customer-po-actions .btn { border-radius: 11px; }
.customer-home-footer { padding-bottom: 20px; }

@media (min-width: 801px) {
    .rail { position: sticky; top: 0; height: 100dvh; }
}
@media (max-width: 1150px) and (min-width: 801px) {
    .shell { grid-template-columns: 216px minmax(0,1fr); }
    .rail { padding: 24px 12px 16px; }
    .rail nav a { font-size: 11px; gap: 8px; }
    .page { padding-left: 24px; padding-right: 24px; }
    .order-entry > form { grid-template-columns: minmax(0,1fr) 264px; gap: 16px; }
    .order-entry .fields { grid-template-columns: 1fr; }
    .customer-shortcut { display: none; }
}
@media (max-width: 800px) {
    .page { padding: 22px 18px 36px; }
    .shell { display: block; }
    .top { min-height: 66px; padding: 12px 18px; }
    .top-location { gap: 12px; }
    .top-location > span { font-size: 11px; }
    .top-location > span > .breadcrumb-divider { margin: 0 5px; }
    .customer-shortcut, .identity > small, .identity i { display: none; }
    .identity { font-size: 12px; }
    .navigation-ready .mobile-nav-toggle { display: inline-flex; min-height: 38px; padding: 8px 12px; font-size: 12px; }
    .navigation-ready .rail { position: fixed; top: 0; bottom: 0; left: 0; width: 270px; max-width: 82vw; height: 100dvh; z-index: 100; padding: 26px 18px; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 26px; overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
    .navigation-ready.nav-open .rail { transform: translateX(0); visibility: visible; }
    .navigation-ready .rail .brand { padding: 0 8px; margin: 0; }
    .navigation-ready .nav-close { display: inline-flex; padding: 6px 8px; font-size: 11px; }
    .navigation-ready .rail .nav-section-label { display: block; }
    .navigation-ready .rail nav { display: grid; order: initial; flex: none; padding: 0; overflow: visible; gap: 6px; }
    .navigation-ready .rail nav a { padding: 10px 12px; font-size: 12px; }
    .navigation-ready .rail nav .nav-label { display: inline; }
    .navigation-ready .rail-footer { display: block; margin: auto 0 0; padding-top: 18px; }
    .navigation-ready .rail-footer .signout { margin-top: 14px; }
    .navigation-ready .signout > small { display: block; }
    .navigation-ready .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 90; border: 0; padding: 0; background: rgb(17 35 25 / 42%); backdrop-filter: blur(3px); }
    .nav-open { overflow: hidden; }
    .dashboard-page .hero-meals { min-height: 210px; padding: 26px; }
    .dashboard-page .hero-meals h1 { font-size: 30px; }
    .dashboard-page .hero-meals > img { width: 49%; }
    .share-card { grid-template-columns: 1fr; gap: 10px; }
    .order-entry > form { display: flex; flex-direction: column; gap: 18px; }
    .order-entry > form > .card { width: 100%; }
    .order-entry > form > .order-summary { position: static; max-height: none; overflow: visible; padding: 22px; }
    .order-entry { padding-bottom: 0; }
    .order-entry input, .order-entry select { font-size: 16px; }
    .stats article { padding: 18px; }
    .stats strong { font-size: 27px; }
    .customer-page .customer-header { padding: 12px 18px; }
}
@media (max-width: 520px) {
    .card { padding: 20px; }
    .top-location > span { display: none; }
    .top-actions { gap: 8px; }
    .dashboard-page .hero-meals { min-height: 210px; padding: 24px; }
    .dashboard-page .hero-meals .hero-meals-copy { width: 100%; }
    .dashboard-page .hero-meals h1 { max-width: 68%; font-size: 29px; }
    .dashboard-page .hero-meals > img { width: 62%; right: -22%; opacity: .48; }
    .dashboard-page .hero-meals .hero-meals-tagline { font-size: 14px; }
    .stats { grid-template-columns: 1fr; gap: 10px; }
    .stats article { display: block; padding: 18px 20px; }
    .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-metrics article:last-child { grid-column: 1 / -1; }
    .dashboard-metrics strong { font-size: 28px; }
    .dashboard-metrics article > small { font-size: 11px; }
    .today-stats article { display: grid; grid-template-columns: 1fr auto; align-items: center; }
    .today-stats article > strong { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
    .today-stats article > small { margin-top: 3px; }
    .order-entry .fields { grid-template-columns: 1fr; }
    .order-entry .cuts { gap: 8px; }
    .order-entry .cuts label { padding: 11px; }
    .share-control { flex-wrap: wrap; }
    .share-control input { flex-basis: 100%; }
    .share-control .btn { width: 100%; }
    .share-card .btn.outline { width: 100%; }
    .order-filters { padding: 12px; }
    .customer-header { padding: 12px 18px; }
    .customer-header .brand img { width: 60px; height: 60px; }
    .customer-hero { padding: 26px 24px 18px; }
    .customer-hero h1 { font-size: 34px; }
    .customer-hero-copy > p { font-size: 13px; }
    .customer-hero-image { height: 170px; padding-top: 12px; }
    .customer-hero-image img { width: 90%; height: 165px; object-fit: contain; }
    .customer-hero-image > span { font-size: 10px; padding: 4px 10px; margin-top: -8px; }
}
@media (prefers-reduced-motion: reduce) {
    .navigation-ready .rail { transition: none; }
}
.kitchen-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:20px; align-items:start; }
.kitchen-order { border-top:5px solid #b75b17; font-size:18px; break-inside:avoid; }
.kitchen-order h2 { font-size:25px; overflow-wrap:anywhere; }
.kitchen-order h3 { font-size:21px; margin:0 0 10px; }
.kitchen-order .heading { align-items:start; flex-wrap:wrap; gap:12px; }
.kitchen-order .heading > strong { font-size:15px; }
.kitchen-order .btn { min-height:48px; width:100%; white-space:normal; }
.kitchen-delivered { border-top-color:#267449; }
.kitchen-location { font-weight:600; overflow-wrap:anywhere; }
.kitchen-item { border-top:1px solid #ddd; padding:16px 0; }
.kitchen-cut { display:inline-block; margin:4px 8px 4px 0; }
.kitchen-note { background:#fff3ce; color:#523b08; border-left:4px solid #ba7b14; padding:12px; overflow-wrap:anywhere; }
@media print {
    .kitchen-grid { display:block; }
    .kitchen-order { margin-bottom:20px; }
    .mobile-nav-toggle, .nav-backdrop, .skip-link, .top, .rail { display: none !important; }
    .page { padding: 0; }
    .card, .stats article { box-shadow: none; }
    .order-entry > form { display: block; }
    .order-entry > form > .order-summary { position: static; max-height: none; }
}
