/* =========================================================================
   Zoelicious Cookout — mobile-first theme
   Palette: Haitian flag blue + red, black lettering, cream background.
   ========================================================================= */
:root {
    --zoe-blue: #00209F;      /* Haitian flag blue   */
    --zoe-blue-deep: #001A7A;
    --zoe-red: #D21034;       /* Haitian flag red    */
    --zoe-red-bright: #EE1C25;
    --zoe-black: #141414;
    --zoe-cream: #FBF3E2;
    --zoe-cream-2: #FFFDF7;
    --zoe-line: #E6DCC4;
    --zoe-green: #1F8A4C;     /* paid / success      */
    --zoe-amber: #C9820A;     /* pending             */
    --shadow: 0 4px 14px rgba(0, 0, 0, .10);
    --radius: 14px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    color: var(--zoe-black);
    background: var(--zoe-cream);
    line-height: 1.5;
    min-height: 100vh;
}

/* Flag accent bar (blue over red, like the flag). */
.flag-bar { height: 6px; display: flex; flex-direction: column; }
.flag-bar i { flex: 1; }
.flag-bar .b { background: var(--zoe-blue); }
.flag-bar .r { background: var(--zoe-red); }

/* ---------- Header ---------- */
.site-header {
    background: var(--zoe-cream-2);
    border-bottom: 1px solid var(--zoe-line);
    position: sticky; top: 0; z-index: 50;
}
.site-header .bar {
    max-width: 960px; margin: 0 auto;
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem 1rem;
}
.nav-toggle {
    background: none; border: 0; cursor: pointer;
    width: 44px; height: 44px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--zoe-blue);
}
.nav-toggle:hover { background: #0000000d; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 24px; height: 3px;
    background: var(--zoe-blue); border-radius: 2px; position: relative;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; }

.brand { flex: 1; text-align: center; text-decoration: none; line-height: 1; }
.brand img { max-height: 56px; width: auto; vertical-align: middle; }
.brand .wordmark { font-weight: 900; font-style: italic; letter-spacing: .5px; font-size: 1.6rem; }
.brand .wordmark .zoe { color: var(--zoe-red); }
.brand .wordmark .lic { color: var(--zoe-blue); }
.brand .cookout {
    display: block; font-style: normal; font-weight: 900; letter-spacing: 3px;
    color: var(--zoe-black); font-size: .8rem; margin-top: 2px;
}

.cart-link {
    position: relative; width: 44px; height: 44px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--zoe-blue); text-decoration: none; font-size: 1.4rem;
}
.cart-link:hover { background: #0000000d; }
.cart-badge {
    position: absolute; top: 2px; right: 2px;
    background: var(--zoe-red); color: #fff; font-size: .7rem; font-weight: 800;
    min-width: 20px; height: 20px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* Collapsible nav */
.site-nav { display: none; border-top: 1px solid var(--zoe-line); background: var(--zoe-cream-2); }
.site-nav.open { display: block; }
.site-nav a {
    display: block; padding: .9rem 1.25rem; text-decoration: none;
    color: var(--zoe-black); font-weight: 600; border-bottom: 1px solid var(--zoe-line);
}
.site-nav a:hover { background: var(--zoe-cream); color: var(--zoe-blue); }
.site-nav .install-link { display: block; width: 100%; text-align: left; padding: .9rem 1.25rem; border: 0; background: none; font: inherit; color: var(--zoe-red); font-weight: 700; cursor: pointer; }
.site-nav .install-link:hover { background: var(--zoe-cream); }

/* ---------- Layout ---------- */
.container { max-width: 960px; margin: 0 auto; padding: 1rem; }
main { padding-bottom: 3rem; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--zoe-blue) 0%, var(--zoe-blue-deep) 55%, var(--zoe-red) 130%);
    color: #fff; border-radius: var(--radius); padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow); text-align: center;
}
.hero h1 { margin: .25rem 0 .5rem; font-size: 1.8rem; font-weight: 900; }
.hero .meta { display: grid; gap: .35rem; margin: 1rem 0; font-size: 1.05rem; }
.hero .meta .row { display: flex; gap: .5rem; justify-content: center; align-items: center; }
.hero p.desc { opacity: .95; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer;
    border: 2px solid transparent; border-radius: 12px; padding: .85rem 1.4rem;
    min-height: 52px; transition: transform .05s ease, filter .15s ease; width: auto;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.2rem; padding: 1rem 1.5rem; min-height: 60px; }
.btn-red { background: var(--zoe-red); color: #fff; }
.btn-red:hover { filter: brightness(1.07); }
.btn-blue { background: var(--zoe-blue); color: #fff; }
.btn-blue:hover { filter: brightness(1.12); }
.btn-dark { background: var(--zoe-black); color: #fff; }
.btn-outline { background: transparent; color: var(--zoe-blue); border-color: var(--zoe-blue); }
.btn-green { background: var(--zoe-green); color: #fff; }
.btn-ghost { background: #fff; color: var(--zoe-black); border-color: var(--zoe-line); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
    background: var(--zoe-cream-2); border: 1px solid var(--zoe-line);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; margin-bottom: 1rem;
}
.card h2, .card h3 { margin-top: 0; }
.section-title {
    font-size: 1.25rem; font-weight: 900; margin: 1.5rem 0 .75rem;
    color: var(--zoe-blue); display: flex; align-items: center; gap: .5rem;
}

/* Menu item / selectable card */
.item {
    display: flex; align-items: center; gap: .9rem; padding: .9rem;
    border: 2px solid var(--zoe-line); border-radius: 12px; background: #fff; margin-bottom: .65rem;
}
.item.soldout { opacity: .55; }
.item .lowstock { color: var(--zoe-red); font-weight: 800; font-size: .82rem; margin-top: .15rem; }
.item .thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; border: 1px solid var(--zoe-line); cursor: zoom-in; }

.data tr.row-active { background: #eef3ff; }

/* Big color-coded order status banner (confirmation + scan pages) */
.status-banner { text-align: center; color: #fff; font-weight: 900; font-size: 1.4rem; letter-spacing: 1px; text-transform: uppercase; padding: .85rem 1rem; border-radius: 12px; margin-top: .8rem; box-shadow: var(--shadow); }
.status-banner .sb-sub { display: block; font-size: .8rem; font-weight: 700; letter-spacing: .5px; opacity: .9; text-transform: none; margin-top: .15rem; }

/* Staff chat inbox */
.chat-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; align-items: start; }
.chat-list { max-height: 72vh; overflow-y: auto; }
.chat-row { display: block; padding: .5rem .6rem; border-radius: 8px; text-decoration: none; color: inherit; border: 1px solid transparent; margin-top: .25rem; }
.chat-row:hover { background: var(--zoe-cream, #fbf6ea); }
.chat-row.active { background: #eef3ff; border-color: var(--zoe-blue); }
@media (max-width: 760px) { .chat-grid { grid-template-columns: 1fr; } }

/* Customer chat widget */
#zoeChat { position: fixed; right: 1rem; bottom: 1rem; z-index: 1500; }
.zchat-bubble { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--zoe-red); color: #fff; font-size: 1.6rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; }
.zchat-panel { position: absolute; right: 0; bottom: 70px; width: 330px; max-width: 86vw; background: #fff; border: 1px solid var(--zoe-line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.zchat-head { background: var(--zoe-blue); color: #fff; padding: .7rem .9rem; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.zchat-head button { background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; }
.zchat-body { padding: .8rem; }
.zchat-msgs { height: 300px; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: .4rem; padding: .2rem; }
.zmsg { padding: .45rem .7rem; border-radius: 12px; max-width: 85%; font-size: .92rem; line-height: 1.3; word-wrap: break-word; }
.zmsg.me { align-self: flex-end; background: var(--zoe-blue); color: #fff; border-bottom-right-radius: 4px; }
.zmsg.staff { align-self: flex-start; background: #eef1f5; color: #1f2733; border-bottom-left-radius: 4px; }
.zmsg.sys { align-self: center; background: #fdf1da; color: #7a5a16; font-size: .85rem; text-align: center; }
.zchat-input { display: flex; gap: .4rem; padding: .6rem .8rem; border-top: 1px solid var(--zoe-line); }
.zchat-input input { flex: 1; min-width: 0; }
.zchat-input .btn { min-width: 3rem; }

/* Tap-to-zoom lightbox for menu photos */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* Image dropzone (click / drag & drop / paste) */
.dropzone { border: 2px dashed #c3cad6; border-radius: 10px; padding: .9rem; text-align: center; cursor: pointer; background: #fbfcfe; transition: border-color .15s, background .15s; }
.dropzone:hover { border-color: var(--zoe-blue); }
.dropzone.dragover { border-color: var(--zoe-blue); background: #eef3ff; }
.dropzone .dz-prompt { color: #66707e; font-size: .9rem; }
.dropzone .dz-preview { display: block; max-width: 120px; max-height: 120px; margin: .5rem auto 0; border-radius: 8px; object-fit: cover; }
.item .info { flex: 1; min-width: 0; }
.item .name { font-weight: 800; }
.item .desc { font-size: .9rem; color: #555; }
.item .price { font-weight: 900; color: var(--zoe-red); white-space: nowrap; font-size: 1.05rem; }

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; border: 2px solid var(--zoe-line); border-radius: 10px; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: 0; background: #fff; font-size: 1.3rem; font-weight: 800; color: var(--zoe-blue); cursor: pointer; }
.qty button:hover { background: var(--zoe-cream); }
/* Two classes (.qty .qty-input) so this beats the global input[type=number]{width:100%} rule
   regardless of source order — otherwise the qty box stretches and squashes the item text. */
.qty .qty-input { width: 44px; height: 40px; padding: 0; text-align: center; border: 0; border-left: 2px solid var(--zoe-line); border-right: 2px solid var(--zoe-line); border-radius: 0; font-size: 1.05rem; font-weight: 800; background: #fff; -moz-appearance: textfield; }
.qty .qty-input::-webkit-outer-spin-button, .qty .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty button { flex: 0 0 auto; }
/* Staff pages (e.g. New Order) pack many rows — use more compact steppers there. */
.staff-content .qty button { width: 32px; height: 34px; font-size: 1.1rem; }
.staff-content .qty .qty-input { width: 36px; height: 34px; font-size: .95rem; }

/* Chips (included sides) */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { background: var(--zoe-blue); color: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 700; }
.chip.optional { background: #fff; color: var(--zoe-blue); border: 2px solid var(--zoe-blue); }
/* A .chip is a <label>; inside .staff-content the generic label color would override it,
   making the white-on-blue text unreadable. Keep chip text white there. */
.staff-content label.chip { color: #fff; }
.staff-content label.chip.optional { color: var(--zoe-blue); }

/* Forms */
label { font-weight: 700; display: block; margin: .75rem 0 .3rem; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password],
input[type=date], input[type=datetime-local], input[type=time], input[type=file], input[type=search],
input[type=url], input:not([type]), textarea, select {
    width: 100%; padding: .8rem; font-size: 1rem; border: 2px solid var(--zoe-line);
    border-radius: 10px; background: #fff; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--zoe-blue); }
.field-hint { font-size: .85rem; color: #666; margin-top: .25rem; }
/* Language switcher (flags) in the header */
.bar-right { display: flex; align-items: center; gap: .5rem; }
.lang-switch { display: flex; gap: .35rem; align-items: center; }
.lang-flag { display: inline-flex; align-items: center; justify-content: center; padding: 4px; border-radius: 6px; border: 2px solid transparent; line-height: 0; opacity: .45; transition: opacity .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.lang-flag img, .lang-flag .flag { width: 26px; height: 18px; display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.lang-flag .flag-text { font-size: .8rem; font-weight: 800; color: var(--zoe-blue); }
.lang-flag:hover { opacity: .8; }
.lang-flag.active { opacity: 1; border-color: var(--zoe-blue); background: rgba(0,32,159,.08); }
/* Ticket scan — order checkmarks */
.check-label { font-weight: 700; margin: .7rem 0 .3rem; }
.check-list { display: flex; flex-direction: column; gap: .45rem; }
.check-row { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border: 1.5px solid var(--zoe-line); border-radius: 10px; font-weight: 600; cursor: pointer; user-select: none; }
.check-row input[type=checkbox] { width: 24px; height: 24px; flex: 0 0 auto; accent-color: var(--zoe-blue); }
.check-row:has(input:checked) { border-color: var(--zoe-blue); background: rgba(0,32,159,.06); }
/* Public FAQ accordion */
.faq-item { border-bottom: 1px solid var(--zoe-line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 800; padding: .8rem 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "＋"; color: var(--zoe-red); font-weight: 900; margin-right: .5rem; }
.faq-item[open] summary::before { content: "－"; }
.faq-answer { padding: 0 0 .9rem 1.5rem; color: #444; line-height: 1.5; }
/* Phone input with a fixed country/area prefix */
.phone-group { display: flex; align-items: stretch; }
.phone-group .phone-prefix { display: flex; align-items: center; padding: 0 .8rem; font-weight: 800; color: var(--zoe-blue); background: var(--zoe-cream, #fbf6ea); border: 2px solid var(--zoe-line); border-right: 0; border-radius: 10px 0 0 10px; white-space: nowrap; }
.phone-group input { border-radius: 0 10px 10px 0 !important; flex: 1; min-width: 0; }
/* When the prefix is a picker (+1721 / +590), keep it looking like the fixed span but selectable.
   Fixed basis so the select stays narrow and the number input keeps the remaining width. */
.phone-group select.phone-prefix { flex: 0 0 auto; width: 6rem; cursor: pointer; font: inherit; font-weight: 800; padding-right: 1.4rem; }
.staff-content .phone-group .phone-prefix { border-width: 1px; border-right: 0; border-radius: 8px 0 0 8px; }
.staff-content .phone-group input { border-radius: 0 8px 8px 0 !important; }
.pw-field { position: relative; }
.pw-field input { padding-right: 2.8rem; }
.pw-toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1.15rem; line-height: 1; padding: .25rem; }
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.share-row .btn { flex: 1 1 auto; min-width: 90px; }
/* The hero has a dark gradient, so the default blue/outline share buttons are hard to read
   there — give them a solid light background with brand-blue text for clear contrast. */
.hero .share-row .btn { background: #fff; color: var(--zoe-blue); border: 2px solid #fff; font-weight: 800; }
.hero .share-row .btn:hover { background: var(--zoe-cream); color: var(--zoe-blue); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.radio-card { border: 2px solid var(--zoe-line); border-radius: 12px; padding: 1rem; text-align: center; cursor: pointer; font-weight: 800; background: #fff; }
.radio-card input { display: none; }
.radio-card.selected { border-color: var(--zoe-blue); background: #00209f12; color: var(--zoe-blue); }

/* Totals */
.totals { border-top: 2px dashed var(--zoe-line); margin-top: .75rem; padding-top: .75rem; }
.totals .row { display: flex; justify-content: space-between; padding: .25rem 0; }
.totals .grand { font-size: 1.35rem; font-weight: 900; color: var(--zoe-red); border-top: 1px solid var(--zoe-line); margin-top: .35rem; padding-top: .5rem; }

/* Badges / statuses */
.badge { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.badge-paid { background: #e3f5ea; color: var(--zoe-green); }
.badge-pending { background: #fdf1da; color: var(--zoe-amber); }
.badge-comp { background: #efe3fb; color: #7b2cbf; }
.badge-failed { background: #fde3e3; color: var(--zoe-red); }
.badge-blue { background: #e3e8fb; color: var(--zoe-blue); }
.badge-gray { background: #eee; color: #555; }

/* Alerts */
.alert { padding: .9rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 600; }
.alert-success { background: #e3f5ea; color: #14693a; border: 1px solid #bfe6cd; }
.alert-error { background: #fde3e3; color: #8c1020; border: 1px solid #f3c2c2; }
.alert-info { background: #e3e8fb; color: #142a8a; border: 1px solid #c3cdf3; }

/* QR confirmation */
.qr-box { text-align: center; }
.qr-box img { width: 240px; max-width: 80vw; height: auto; border: 8px solid #fff; border-radius: 12px; box-shadow: var(--shadow); }

/* Tables (staff) */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
table.data th, table.data td { text-align: left; padding: .7rem .65rem; border-bottom: 1px solid var(--zoe-line); font-size: .92rem; }
table.data th { background: var(--zoe-blue); color: #fff; font-weight: 700; }
table.data th.num, table.data td.num { text-align: right; white-space: nowrap; }
table.data tfoot th { background: var(--zoe-cream); color: var(--zoe-ink, inherit); }
table.data tr:hover td { background: var(--zoe-cream); }

/* Dashboard stat tiles */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.stat { background: var(--zoe-cream-2); border: 1px solid var(--zoe-line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.stat .n { font-size: 1.7rem; font-weight: 900; color: var(--zoe-blue); }
.stat .l { font-size: .85rem; color: #555; font-weight: 600; }
.stat.red .n { color: var(--zoe-red); }
.stat.green .n { color: var(--zoe-green); }

/* ===== Staff shell: left sidebar + content ===== */
.staff-shell { display: flex; min-height: 100vh; }
.staff-sidebar {
    width: 250px; flex-shrink: 0; background: linear-gradient(180deg, var(--zoe-blue) 0%, var(--zoe-blue-deep) 100%);
    color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 60;
}
.staff-sidebar .sb-brand { padding: 1.1rem 1.1rem .6rem; display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.staff-sidebar .sb-brand .wm { font-weight: 900; font-style: italic; font-size: 1.25rem; line-height: 1; }
.staff-sidebar .sb-brand .wm .z { color: #fff; } .staff-sidebar .sb-brand .wm .l { color: #ffd9df; }
.staff-sidebar .sb-brand .sub { font-size: .62rem; letter-spacing: 2px; opacity: .85; font-weight: 800; }
.staff-sidebar nav { flex: 1; padding: .4rem 0; }
.staff-sidebar .group-label { font-size: .66rem; letter-spacing: 1.5px; text-transform: uppercase; opacity: .6; padding: .9rem 1.1rem .3rem; font-weight: 800; }
.staff-sidebar nav a {
    display: flex; align-items: center; gap: .8rem; padding: .72rem 1.1rem; color: #fff; text-decoration: none;
    font-weight: 600; font-size: .95rem; border-left: 4px solid transparent;
}
.staff-sidebar nav a i { width: 20px; text-align: center; font-size: 1rem; opacity: .9; }
.staff-sidebar nav a:hover { background: rgba(255,255,255,.10); }
.staff-sidebar nav .install-link { display: flex; align-items: center; gap: .8rem; padding: .72rem 1.1rem; color: #fff; font: inherit; font-size: .92rem; }
.staff-sidebar nav .install-link i { width: 20px; text-align: center; opacity: .9; }
.staff-sidebar nav .install-link:hover { background: rgba(255,255,255,.10); }
.staff-sidebar nav a.active { background: rgba(255,255,255,.16); border-left-color: var(--zoe-red); }
.staff-sidebar nav a .sb-badge { margin-left: auto; background: var(--zoe-red); color: #fff; font-size: .72rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.staff-sidebar .sb-foot { border-top: 1px solid rgba(255,255,255,.15); padding: .9rem 1.1rem; }
.staff-sidebar .sb-foot .who { font-size: .9rem; font-weight: 700; }
.staff-sidebar .sb-foot .role { font-size: .7rem; opacity: .8; }

.staff-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.staff-content { flex: 1; }
.staff-topbar { display: none; align-items: center; gap: .6rem; background: var(--zoe-cream-2); border-bottom: 1px solid var(--zoe-line); padding: .5rem .8rem; position: sticky; top: 0; z-index: 40; }
.staff-topbar .ham { background: none; border: 0; font-size: 1.4rem; color: var(--zoe-blue); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.staff-topbar .ham:hover { background: #0000000d; }
.staff-topbar .tb-title { font-weight: 900; font-style: italic; color: var(--zoe-blue); }
.staff-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }

/* App-style quick action bar. Shown as an in-flow footer toolbar on desktop and pinned
   to the bottom of the screen on mobile (see the media query below). */
.staff-quickbar {
    display: flex; background: #fff; border-top: 1px solid var(--zoe-line, #e2e5ea);
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.staff-quickbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem;
    padding: .55rem .25rem; text-decoration: none; color: #1f2733; font-size: .7rem; font-weight: 700;
}
.staff-quickbar a:hover { background: var(--zoe-cream, #fff7ef); }
.staff-quickbar a i { font-size: 1.2rem; color: var(--zoe-blue); }
.staff-quickbar a.active, .staff-quickbar a.active i { color: var(--zoe-red); }

@media (max-width: 900px) {
    .staff-topbar { display: flex; }
    .staff-sidebar {
        position: fixed; left: 0; top: 0; height: 100vh; transform: translateX(-100%);
        transition: transform .22s ease; box-shadow: 2px 0 16px rgba(0,0,0,.25);
    }
    .staff-shell.nav-open .staff-sidebar { transform: translateX(0); }
    .staff-shell.nav-open .staff-backdrop { display: block; }

    /* Show the quick action bar fixed at the bottom (sidebar is off-canvas here). */
    .staff-quickbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        background: #fff; border-top: 1px solid var(--zoe-line, #e2e5ea);
        box-shadow: 0 -2px 10px rgba(0,0,0,.07); padding-bottom: env(safe-area-inset-bottom);
    }
    .staff-content { padding-bottom: 4.5rem; }
}

/* ===== Professional staff theme (scoped to the staff content area) ===== */
.staff-content {
    --s-bg: #eef1f5; --s-card: #ffffff; --s-border: #e2e5ea; --s-border-2: #eef0f3;
    --s-text: #1f2733; --s-muted: #66707e; --s-head: #f6f7f9;
    background: var(--s-bg); color: var(--s-text);
}
.staff-content .container { max-width: 1120px; padding: 1.4rem 1.4rem 3rem; }
.staff-content h1 { font-size: 1.5rem; font-weight: 700; font-style: normal; color: var(--s-text); letter-spacing: -.01em; margin: 0 0 .25rem; }
/* The dark ".staff-content h1" color otherwise overrides the white hero text (equal specificity,
   defined later), making the number unreadable on the blue hero. Keep hero headings white. */
.staff-content .hero h1 { color: #fff; }
.staff-content h2 { font-size: 1.2rem; font-weight: 700; font-style: normal; color: var(--s-text); }
.staff-content h3 { font-size: 1.02rem; font-weight: 700; color: var(--s-text); }
.staff-content .section-title {
    color: var(--s-text); font-size: 1.05rem; font-weight: 700; letter-spacing: 0;
    border-bottom: 1px solid var(--s-border); padding-bottom: .5rem; margin: 1.75rem 0 1rem;
}
.staff-content .card {
    background: var(--s-card); border: 1px solid var(--s-border); border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04); padding: 1.15rem 1.25rem;
}
.staff-content .muted, .staff-content .field-hint { color: var(--s-muted); }

/* Inputs */
.staff-content label { font-weight: 600; color: #3a4250; font-size: .88rem; margin: .85rem 0 .3rem; }
.staff-content input[type=text], .staff-content input[type=tel], .staff-content input[type=email],
.staff-content input[type=number], .staff-content input[type=password], .staff-content input[type=date],
.staff-content input[type=search], .staff-content input[type=url], .staff-content input:not([type]),
.staff-content textarea, .staff-content select {
    width: 100%; border: 1px solid #d3d8e0; border-radius: 8px; font-size: .95rem; padding: .6rem .7rem; background: #fff;
}
.staff-content input:focus, .staff-content textarea:focus, .staff-content select:focus { border-color: var(--zoe-blue); box-shadow: 0 0 0 3px rgba(0,32,159,.12); }

/* Buttons — flatter, tighter, professional */
.staff-content .btn { border-radius: 8px; font-weight: 600; font-size: .92rem; min-height: 42px; padding: .55rem 1.1rem; box-shadow: none; }
.staff-content .btn-lg { font-size: 1rem; min-height: 48px; }
.staff-content .btn-blue { background: var(--zoe-blue); }
.staff-content .btn-ghost { background: #fff; border-color: #d3d8e0; color: #3a4250; }
.staff-content .btn-ghost:hover { background: #f3f5f8; }
.staff-content .btn-dark { background: #2a3340; }

/* Tables */
.staff-content table.data { border: 1px solid var(--s-border); border-radius: 10px; }
.staff-content table.data th {
    background: var(--s-head); color: #5a6473; font-weight: 600; text-transform: uppercase;
    font-size: .72rem; letter-spacing: .04em; border-bottom: 1px solid var(--s-border);
}
.staff-content table.data td { border-bottom: 1px solid var(--s-border-2); }
.staff-content table.data tr:last-child td { border-bottom: 0; }
.staff-content table.data tr:hover td { background: #f7f9fc; }

/* Stat tiles */
.staff-content .stats { gap: 1rem; }
.staff-content .stat { background: var(--s-card); border: 1px solid var(--s-border); border-radius: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.04); padding: 1.1rem 1.2rem; }
.staff-content .stat .n { font-size: 1.6rem; font-weight: 700; color: var(--s-text); }
.staff-content .stat .l { font-size: .74rem; color: var(--s-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-top: .2rem; }
.staff-content .stat.green .n { color: var(--zoe-green); }
.staff-content .stat.red .n { color: var(--zoe-red); }
.staff-content .stat.blue .n { color: var(--zoe-blue); }

/* Badges a touch flatter */
.staff-content .badge { border-radius: 6px; font-weight: 600; }

.staff-topbar .tb-title { font-style: normal; font-weight: 700; }

/* Button spacing / rhythm in the staff area */
.staff-content .flex-between { gap: .85rem; row-gap: .6rem; }
.staff-content .grid-2 { gap: 1rem; }
.staff-content .btn + .btn { margin-left: .45rem; }
.staff-content .btn-block + .btn-block { margin-left: 0; }            /* stacked full-width buttons shouldn't indent */
.staff-content td form { display: inline-block; margin: 0 .15rem 0 0; }
.staff-content td form + form { margin-left: 0; }
.staff-content td .btn { margin: .1rem 0; }
.staff-content .card form .btn-block { margin-top: 1rem; }            /* breathing room above a form's submit */
.staff-content .card > .btn:first-child,
.staff-content .card > form:first-child .btn-block { margin-top: 0; }
/* Inline button groups (e.g. All / Mine toggles) wrap nicely on mobile */
.staff-content .btn-group-inline { display: inline-flex; gap: .45rem; flex-wrap: wrap; }

/* Map picker (Leaflet + OpenStreetMap) */
.map-picker { margin: .35rem 0 .25rem; }
.map-canvas { height: 300px; max-height: 55vh; width: 100%; border: 2px solid var(--zoe-line); border-radius: 12px; z-index: 0; }
.map-canvas.leaflet-container { background: #e8ecef; }
.map-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.map-tools .btn { min-height: 42px; }
.leaflet-control-attribution { font-size: .65rem; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 100; padding: 1rem; overflow-y: auto; }
.modal-overlay.open { display: flex; align-items: flex-start; justify-content: center; }
.modal-box { background: var(--zoe-cream-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; max-width: 640px; width: 100%; margin: 2rem auto; }
.modal-box textarea { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .85rem; }

/* Utility */
.muted { color: #666; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.btn-sm { padding: .3rem .55rem; font-size: .85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }
.hidden { display: none !important; }
footer.site-footer { text-align: center; padding: 1.5rem 1rem; color: #777; font-size: .85rem; border-top: 1px solid var(--zoe-line); }

@media (min-width: 700px) {
    .stats { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 2.2rem; }
}

/* ---------- Sales report ---------- */
.print-header { display: none; }
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: .8rem 0; }
@media (max-width: 640px) { .report-summary { grid-template-columns: 1fr 1fr; } }
.rs-tile { background: #fff; border: 1px solid var(--zoe-line); border-radius: 10px; padding: .7rem .8rem; }
.rs-label { font-size: .75rem; font-weight: 700; color: #666; text-transform: uppercase; letter-spacing: .3px; }
.rs-num { font-size: 1.35rem; font-weight: 900; color: var(--zoe-blue); }
.rs-sub { font-size: .85rem; color: #666; }
.report-section h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.report-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.report-table th, .report-table td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--zoe-line); vertical-align: top; }
.report-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .3px; color: #666; }
.report-table tfoot td { border-top: 2px solid var(--zoe-line); border-bottom: 0; }
.report-table .ta-r { text-align: right; }
.biz-group { margin-bottom: 1rem; }
.biz-head { padding: .4rem .5rem; background: var(--zoe-cream, #fbf6ea); border-radius: 8px; }

@media print {
    .staff-sidebar, .staff-quickbar, .staff-topbar, .staff-backdrop, .no-print,
    .install-link, .sb-foot { display: none !important; }
    .staff-main, .staff-content, .container { margin: 0 !important; padding: 0 !important; max-width: none !important; }
    body, .staff-shell, .staff-content { background: #fff !important; }
    .print-header { display: block; margin-bottom: .5rem; }
    .card, .report-section { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; page-break-inside: avoid; margin-bottom: .6rem; }
    .rs-tile { border: 1px solid #ccc !important; }
    .biz-group { break-inside: avoid; page-break-inside: avoid; }
    a[href]:after { content: ""; } /* don't print URLs */
}
