/* ── Mary & Jane's — clean dispensary storefront (Leafly-inspired) ─────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* surfaces */
    --white: #ffffff;
    --paper: #f4f8f5;          /* soft section background */
    --paper-2: #eef4ef;
    --ink: #16241c;            /* near-black, green undertone */
    --muted: #5f6f66;
    --line: #e2e9e4;

    /* brand green */
    --green: #1c8a4e;          /* primary CTA */
    --green-deep: #14663a;     /* hover / dark green */
    --green-ink: #0e3d25;      /* darkest — footer, headings */
    --green-soft: #e7f3ec;     /* tint fills */

    /* strain-type accents */
    --indica: #6d49c9;  --indica-soft: #eeeafc;
    --hybrid: #0f9d8f;  --hybrid-soft: #e2f5f2;
    --sativa: #e2870f;  --sativa-soft: #fbefda;

    /* legacy aliases (kept so dashboard/admin/driver rules stay coherent) */
    --pink: #22b06a;  --pink-deep: #178a52;
    --mint: #22b06a;
    --amber: #e2870f;
    --purple: #6d49c9;
    --cream: #f4f8f5;
    --sunset: #e2870f;
    --border: #e2e9e4;

    --shadow: 0 8px 26px rgba(15, 45, 28, .09);
    --shadow-sm: 0 2px 10px rgba(15, 45, 28, .07);
    --font-head: 'Poppins', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    /* kept for any legacy references */
    --font-display: 'Poppins', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--green-deep); }

/* ── Announcement bar ── */
.announce {
    background: var(--green-ink); color: #eaf5ee;
    text-align: center; font-size: .8rem; font-weight: 500;
    padding: .5rem 1rem; letter-spacing: .01em;
}

/* Brand wordmark face — self-hosted so the lockup is crisp at any size */
@font-face {
    font-family: 'Recoleta';
    src: url('fonts/recoleta-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ── Brand wordmark ── */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--green-ink); }
.leaf-mark { width: 30px; height: 30px; display: block; flex: none; color: var(--green); }
.wordmark {
    font-family: 'Recoleta', var(--font-head); font-weight: 700; font-size: 1.2rem;
    text-transform: uppercase; letter-spacing: 0; color: var(--green-ink); line-height: 1.02; white-space: nowrap;
}
.wordmark .amp { color: var(--green); }
/* two-line lockup: MARY & JANE'S over a centered "Flower Delivery" */
.wordmark-lockup { display: flex; flex-direction: column; align-items: center; gap: .06rem; }
.wordmark-sub {
    font-family: 'Recoleta', var(--font-head); font-weight: 700; font-size: .95rem;
    letter-spacing: 0; text-transform: none; color: var(--green-ink);
    line-height: 1.02; white-space: nowrap;
}
.footer-brand .wordmark-sub { color: #eaf5ee; }
@media (max-width: 560px) {
    .navbar { padding: .6rem .7rem; }
    .navbar .brand { gap: .45rem; }
    .navbar .nav-links { gap: .6rem; }
    .navbar .wordmark { font-size: 1rem; }
    .navbar .wordmark-sub { font-size: .8rem; letter-spacing: 0; }
    .navbar .leaf-mark { width: 23px; height: 23px; }
    .navbar .pill-btn { padding: .45rem .7rem; font-size: .8rem; }
    .navbar .nav-links a { font-size: .84rem; white-space: nowrap; }
}
/* compact brand lockup used on auth + dashboard pages */
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: var(--green-ink); white-space: nowrap; }
.brand-swirl { width: 28px; height: 28px; background: var(--green); flex: none; box-shadow: var(--shadow-sm); }
.brand-logo { height: 34px; width: auto; display: block; }

/* ── Nav ── */
.navbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: .7rem 1.5rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a {
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.nav-links a:hover { color: var(--green); }
.pill-btn {
    display: inline-block;
    font-family: var(--font-body); font-weight: 600; font-size: .9rem;
    padding: .55rem 1.2rem; 
    border: 1px solid var(--green);
    background: var(--green); color: #fff !important;
    cursor: pointer; text-decoration: none;
    transition: background .14s ease, transform .12s ease;
}
.pill-btn:hover { background: var(--green-deep); border-color: var(--green-deep); transform: translateY(-1px); }
.pill-btn.ghost { background: #fff; color: var(--green-deep) !important; border-color: var(--line); }
.pill-btn.ghost:hover { border-color: var(--green); background: var(--green-soft); }
.pill-btn.mint { background: var(--green); }

/* ── Hero ── */
.hero-feature {
    text-align: center;
    padding: 4rem 1.4rem 3.4rem;
    background:
        radial-gradient(120% 90% at 50% -20%, var(--green-soft) 0%, rgba(231,243,236,0) 60%),
        linear-gradient(180deg, #fbfefb 0%, #f1f7f2 100%);
    border-bottom: 1px solid var(--line);
}
.hero-eyebrow {
    display: inline-block; font-weight: 700; font-size: .74rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--green-deep);
    background: var(--green-soft); border: 1px solid #cfe6d8;
    padding: .35rem .85rem; margin-bottom: 1.3rem;
}
.hero-title {
    font-family: var(--font-head); font-weight: 800;
    font-size: clamp(2.3rem, 6vw, 4rem);
    line-height: 1.02; letter-spacing: -.03em; color: var(--green-ink);
    max-width: 14ch; margin: 0 auto;
}
.hero-title .accent { color: var(--green); }
.hero-sub {
    margin: 1.1rem auto 0; max-width: 46ch;
    font-size: 1.08rem; color: var(--muted); font-weight: 400;
}
.hero-ctas { margin-top: 1.9rem; display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.cta-btn {
    display: inline-block; font-family: var(--font-body);
    font-size: 1rem; font-weight: 600;
    background: var(--green); color: #fff; text-decoration: none;
    padding: .85rem 1.9rem; border: 1px solid var(--green);
    box-shadow: 0 8px 20px rgba(28, 138, 78, .22);
    transition: transform .12s ease, background .14s ease;
}
.cta-btn:hover { transform: translateY(-2px); background: var(--green-deep); }
.cta-btn.ghost {
    background: #fff; color: var(--green-deep); border-color: var(--line); box-shadow: none;
}
.cta-btn.ghost:hover { border-color: var(--green); background: var(--green-soft); }

.hero-props {
    display: flex; justify-content: center; gap: 2.4rem; flex-wrap: wrap;
    padding: 1.1rem 1rem;
    background: var(--white); border-bottom: 1px solid var(--line);
}
.hero-props span {
    font-size: .82rem; font-weight: 600; color: var(--ink);
    display: inline-flex; align-items: center; gap: .45rem;
}
.hero-props span::before { content: '✓'; color: var(--green); font-weight: 800; }

/* ── Section headings ── */
.section-head { text-align: center; margin: 3.6rem auto 1.8rem; padding: 0 1.4rem; max-width: 720px; }
.section-head h2 {
    font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    letter-spacing: -.02em; color: var(--green-ink);
}
.section-head .rule { width: 54px; height: 4px; background: var(--green); margin: .8rem auto 0; }
.section-head p { margin-top: .7rem; color: var(--muted); font-size: 1.02rem; }

/* ── Shop-by-type tiles ── */
.vibe-wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.4rem; }
.vibe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.vibe-tile {
    position: relative; overflow: hidden; cursor: pointer;
    border: 1px solid var(--line); background: var(--white);
    background-image: var(--tile-img); background-size: cover; background-position: center;
    padding: 1.6rem 1.4rem; min-height: 230px;
    display: flex; flex-direction: column; justify-content: flex-end; gap: .2rem;
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
    box-shadow: var(--shadow-sm);
}
.vibe-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* Scrim over the artwork: near-opaque behind the text at the bottom, clearing
   toward the top so the illustration reads. Tinted with the strain-type color. */
.vibe-tile::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    /* Anchored in px, not %, because the text block always occupies the bottom
       ~115px whatever the tile height — keeps contrast identical at every size. */
    background: linear-gradient(to top,
        rgba(255,255,255,.97) 0px,
        rgba(255,255,255,.94) 96px,
        rgba(255,255,255,.62) 124px,
        rgba(255,255,255,.12) 100%);
    transition: opacity .14s ease;
}
.vibe-tile:hover::before { opacity: .9; }
.vibe-tile .vibe-sub {
    position: relative; z-index: 1;
    font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--tile-ink);
}
.vibe-tile .vibe-label {
    position: relative; z-index: 1;
    font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
    letter-spacing: -.02em; color: var(--green-ink);
}
.vibe-tile .vibe-note { position: relative; z-index: 1; font-size: .86rem; color: var(--muted); margin-top: .15rem; }
.vibe-tile.indica { --tile-soft: var(--indica-soft); --tile-ink: var(--indica); --tile-img: url('img/vibe/relax.jpg'); }
.vibe-tile.hybrid { --tile-soft: var(--hybrid-soft); --tile-ink: var(--hybrid); --tile-img: url('img/vibe/balance.jpg'); }
.vibe-tile.sativa { --tile-soft: var(--sativa-soft); --tile-ink: var(--sativa); --tile-img: url('img/vibe/energize.jpg'); }
.vibe-tile.active { border-color: var(--tile-ink); box-shadow: 0 0 0 2px var(--tile-ink) inset, var(--shadow); }

/* filter chips */
.filter-row { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 1.6rem 0 0; }
.filter-chip {
    font-family: var(--font-body); font-weight: 600; font-size: .88rem;
    padding: .5rem 1.15rem; cursor: pointer;
    border: 1px solid var(--line); background: var(--white); color: var(--ink);
    transition: all .12s ease;
}
.filter-chip:hover { border-color: var(--green); color: var(--green-deep); }
.filter-chip.active { background: var(--green-ink); border-color: var(--green-ink); color: #fff; }

/* ── Menu ── */
.menu-wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.4rem 3.4rem; }
.cat-title {
    font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; margin: 2.4rem 0 1.1rem;
    letter-spacing: -.02em; display: flex; align-items: center; gap: .9rem; color: var(--green-ink);
}
.cat-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }

.product-card {
    background: var(--white);
    border: 1px solid var(--line); 
    box-shadow: var(--shadow-sm);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e3d8; }
.strain-visual {
    position: relative; height: 158px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-bottom: 1px solid var(--line);
    color: #fff;
}
.strain-visual .leaf-watermark { width: 62px; height: 62px; opacity: .9; }
.product-photo { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* strain-type gradient fills */
.strain-visual.indica { background: linear-gradient(140deg, #8a63e6, #5a37b0); }
.strain-visual.hybrid { background: linear-gradient(140deg, #2bc0af, #0c8073); }
.strain-visual.sativa { background: linear-gradient(140deg, #f2a43a, #d3760a); }
/* legacy fills kept as green so any old data still renders */
.strain-visual.pink, .strain-visual.amber, .strain-visual.purple, .strain-visual.mint {
    background: linear-gradient(140deg, #34b06f, var(--green-deep));
}
.product-body { padding: 1rem 1.05rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.product-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.product-name { font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.product-price { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--green-deep); white-space: nowrap; }
.product-meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.mini-chip {
    font-size: .68rem; font-weight: 600; letter-spacing: .02em;
    border: 1px solid var(--line); padding: .2rem .55rem; background: var(--paper); color: var(--muted);
}
.product-desc { font-size: .88rem; color: var(--muted); flex: 1; line-height: 1.5; }
.add-btn {
    margin-top: .4rem; width: 100%;
    font-family: var(--font-body); font-weight: 600; font-size: .9rem;
    padding: .68rem; border: 1px solid var(--green);
    background: var(--green); color: #fff; cursor: pointer;
    transition: background .12s ease;
}
.add-btn:hover { background: var(--green-deep); }

/* type chip (colored per strain type) */
.type-chip {
    align-self: flex-start;
    font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    padding: .22rem .6rem;
}
.type-chip.indica { background: var(--indica-soft); color: #4d2e9e; }
.type-chip.hybrid { background: var(--hybrid-soft); color: #0a6b60; }
.type-chip.sativa { background: var(--sativa-soft); color: #a35c06; }

.sticker-tag {
    position: absolute; top: .7rem; left: .7rem; z-index: 2;
    font-size: .64rem; font-weight: 700; letter-spacing: .04em;
    background: #fff; color: var(--green-ink); 
    padding: .26rem .62rem; box-shadow: var(--shadow-sm);
}
.chip {
    font-size: .78rem; font-weight: 600;
    border: 1px solid var(--line); padding: .34rem .85rem;
    background: var(--white); color: var(--ink);
}
.chip.pink, .chip.mint, .chip.amber { background: var(--green-soft); border-color: #cfe6d8; color: var(--green-deep); }

/* ── Value band ── */
.brand-band {
    position: relative; text-align: center;
    padding: 3.8rem 1.4rem;
    background: var(--green-ink); color: #eaf5ee;
    margin-top: 1rem;
}
.brand-band .band-logo { display: none; }
.brand-band h2 {
    font-family: var(--font-head); font-weight: 700; font-size: clamp(1.7rem, 4vw, 2.4rem);
    letter-spacing: -.02em; color: #fff;
}
.brand-band p { max-width: 620px; margin: 1rem auto 0; font-size: 1.04rem; color: #bfe0cd; }
.brand-band .badges { margin-top: 1.8rem; display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.brand-band .chip { background: rgba(255,255,255,.08); color: #eaf5ee; border-color: rgba(255,255,255,.22); }

/* ── Testimonials ── */
.quotes-wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.4rem 3.8rem; }
.quote-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.3rem; }
.quote-card {
    background: var(--white); border: 1px solid var(--line); 
    box-shadow: var(--shadow-sm); padding: 1.5rem;
}
.quote-card .stars { color: #f2a43a; letter-spacing: .12em; font-size: 1rem; }
.quote-card p { margin: .7rem 0 .9rem; font-size: .96rem; color: var(--ink); }
.quote-card .who { font-weight: 600; font-size: .84rem; color: var(--muted); }

/* ── Cart drawer ── */
.drawer-backdrop {
    position: fixed; inset: 0; background: rgba(14, 61, 37, .38); z-index: 90;
    opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100%);
    background: var(--white); border-left: 1px solid var(--line); z-index: 100;
    transform: translateX(102%); transition: transform .22s ease;
    display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(15,45,28,.12);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--green-ink); }
.drawer-close { background: none; border: none; font-size: 1.7rem; cursor: pointer; line-height: 1; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.1rem 1.3rem; }
.cart-line {
    display: flex; justify-content: space-between; align-items: center; gap: .6rem;
    background: var(--paper); border: 1px solid var(--line); 
    padding: .7rem .85rem; margin-bottom: .6rem;
}
.cart-line .qty-controls { display: flex; align-items: center; gap: .55rem; }
.qty-controls button {
    width: 28px; height: 28px; border: 1px solid var(--green);
    background: #fff; color: var(--green-deep); font-weight: 700; cursor: pointer; line-height: 1;
}
.qty-controls button:hover { background: var(--green-soft); }
.cart-total-row {
    display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem;
    padding: .9rem 0; border-top: 1px solid var(--line); margin-top: .6rem; color: var(--green-ink);
}
.drawer-foot { padding: 1.1rem 1.3rem; border-top: 1px solid var(--line); }
.field { margin-bottom: .7rem; }
.field label { display: block; font-size: .76rem; font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.field input, .field textarea, .field select {
    width: 100%; font-family: var(--font-body); font-size: .95rem;
    padding: .62rem .78rem; border: 1px solid var(--line); background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: transparent; }
.field-row { display: flex; gap: .6rem; }
.field-row .field { flex: 1; }
.wide-btn {
    width: 100%; font-family: var(--font-body); font-weight: 600; font-size: 1rem;
    padding: .9rem; border: 1px solid var(--green);
    background: var(--green); color: #fff; cursor: pointer;
    transition: background .12s ease;
}
.wide-btn:hover { background: var(--green-deep); }
.wide-btn:disabled { opacity: .55; cursor: not-allowed; }
.form-error { color: #c0392b; font-size: .86rem; font-weight: 500; margin: .4rem 0; min-height: 1.1em; }

/* ── Order view ── */
.order-wrap { max-width: 680px; margin: 0 auto; padding: 2.4rem 1.4rem 4rem; }
.order-card {
    background: var(--white); border: 1px solid var(--line); 
    box-shadow: var(--shadow-sm); padding: 1.5rem; margin-bottom: 1.4rem;
}
.order-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; }
.order-head h2 { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--green-ink); }
.status-badge {
    font-size: .74rem; font-weight: 700; letter-spacing: .02em;
    padding: .32rem .8rem; color: #fff;
}
.status-badge.pending   { background: var(--amber); }
.status-badge.confirmed { background: var(--hybrid); }
.status-badge.en_route  { background: var(--green); }
.status-badge.delivered { background: var(--green-deep); }
.status-badge.cancelled { background: #c0392b; }
.status-msg { margin-top: .8rem; font-weight: 500; color: var(--ink); }
.timeline { display: flex; margin-top: 1.1rem; gap: .35rem; }
.timeline .step { flex: 1; height: 8px; background: var(--line); }
.timeline .step.done { background: var(--green); }
.order-items { margin-top: 1.1rem; font-size: .93rem; }
.order-items .row { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--line); }

.chat-box {
    background: var(--white); border: 1px solid var(--line); 
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; height: 420px;
}
.chat-head { padding: .9rem 1.3rem; border-bottom: 1px solid var(--line); font-family: var(--font-head); font-weight: 700; color: var(--green-ink); }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.bubble {
    max-width: 78%; padding: .55rem .85rem; font-size: .92rem;
}
.bubble.driver { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.customer { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-input { display: flex; gap: .6rem; padding: .8rem; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; padding: .6rem .85rem; border: 1px solid var(--line); font-family: var(--font-body); }
.chat-input button {
    padding: .6rem 1.2rem; border: none; 
    background: var(--green); color: #fff; font-weight: 600; cursor: pointer;
}

/* ── Footer ── */
.site-footer { background: var(--green-ink); color: #cfe4d6; padding: 3.4rem 1.5rem 2rem; }
.footer-inner { max-width: 1140px; margin: 0 auto; }
.footer-logo { display: none; }
.footer-headline { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.12; letter-spacing: -.02em; color: #fff; }
.footer-headline .accent { color: #5fce8f; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; margin-top: 2rem; font-size: .9rem; }
.footer-grid strong { color: #fff; }
.footer-grid a { color: #cfe4d6; }
.footer-grid a:hover { color: #fff; }
.footer-note { margin-top: 2rem; font-size: .76rem; color: #7fa891; max-width: 780px; line-height: 1.6; }

/* ── Auth pages ── */
.auth-wrap { max-width: 440px; margin: 3.5rem auto; padding: 0 1.4rem; }
.auth-card {
    background: var(--white); border: 1px solid var(--line); 
    box-shadow: var(--shadow); padding: 1.8rem;
}
.auth-card h1 { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; margin-bottom: 1.1rem; text-align: center; color: var(--green-ink); }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 1.3rem; }
.auth-tabs button {
    flex: 1; padding: .6rem; font-weight: 600; font-family: var(--font-body);
    font-size: .9rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
}
.auth-tabs button.active { background: var(--green); border-color: var(--green); color: #fff; }
.auth-divider { text-align: center; color: var(--muted); font-size: .82rem; margin: 1rem 0; }

/* ── Dashboard (admin & driver) — dark, green accent ───────────────────────── */
body.dashboard { background: #0f1a14; color: #e7f0ea; }
body.dashboard .navbar { background: #0f1a14; border-color: #24382c; }
body.dashboard .brand, body.dashboard .wordmark { color: #e7f0ea; }
body.dashboard .brand-name { color: #e7f0ea; }
body.dashboard .brand-swirl { background: #5fce8f; }
body.dashboard .wordmark .amp { color: #5fce8f; }
body.dashboard .leaf-mark { color: #5fce8f; }
body.dashboard .nav-links a { color: #e7f0ea; }
body.dashboard .nav-links a:hover { color: #5fce8f; }
.dash-wrap { max-width: 1200px; margin: 0 auto; padding: 1.6rem 1.4rem 4rem; }
.dash-tabs { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.dash-tabs button {
    font-family: var(--font-body); font-weight: 600; font-size: .92rem;
    padding: .5rem 1.15rem; border: 1px solid #2c4536;
    background: transparent; color: #e7f0ea; cursor: pointer;
}
.dash-tabs button.active { background: var(--green); border-color: var(--green); color: #fff; }
.panel {
    background: #16261d; border: 1px solid #24382c; 
    padding: 1.3rem; margin-bottom: 1.2rem;
}
.panel h2 { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; margin-bottom: 1rem; color: #5fce8f; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dash-table th { text-align: left; padding: .55rem .6rem; color: #8fae9c; font-weight: 600; border-bottom: 1px solid #2c4536; }
.dash-table td { padding: .58rem .6rem; border-bottom: 1px solid #1f2f26; vertical-align: middle; }
.dash-table tr:hover td { background: #1b2c22; }
.dash-table select, .dash-table input {
    background: #0f1a14; color: #e7f0ea; border: 1px solid #35513f;
    padding: .32rem .5rem; font-family: var(--font-body); font-size: .86rem;
}
.dash-btn {
    font-family: var(--font-body); font-weight: 600; font-size: .85rem;
    padding: .45rem .95rem; border: none;
    background: var(--green); color: #fff; cursor: pointer;
}
.dash-btn.mint { background: var(--hybrid); }
.dash-btn.subtle { background: #2c4536; color: #e7f0ea; }
.dash-btn.danger { background: #c0392b; color: #fff; }
.dash-btn:disabled { opacity: .5; cursor: not-allowed; }
.dash-field { margin-bottom: .75rem; }
.dash-field label { display: block; font-size: .74rem; font-weight: 600; color: #8fae9c; margin-bottom: .28rem; }
.dash-field input, .dash-field textarea, .dash-field select {
    width: 100%; background: #0f1a14; color: #e7f0ea; border: 1px solid #35513f;
    padding: .55rem .7rem; font-family: var(--font-body); font-size: .92rem;
}
.dash-field-row { display: flex; gap: .7rem; }
.dash-field-row .dash-field { flex: 1; }

.scan-frame {
    position: relative; width: min(90vw, 380px); aspect-ratio: 1 / 1; margin: 0 auto;
    overflow: hidden; border: 3px solid var(--green);
    background: #000;
}
.scan-frame.hidden { display: none; }
.scan-frame video { width: 100%; height: 100%; object-fit: cover; }
.scan-status { color: #e7f0ea; font-size: .92rem; text-align: center; margin: 1rem auto 0; max-width: 380px; }
.dash-check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; margin-bottom: .6rem; }
.dash-check input { width: auto; }
.orders-layout { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 900px) { .orders-layout { grid-template-columns: 380px 1fr; } }
.order-row { padding: .75rem .85rem; border: 1px solid #2c4536; margin-bottom: .6rem; cursor: pointer; }
.order-row:hover, .order-row.selected { border-color: var(--green); background: #1b2c22; }
.order-row .top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.order-row .sub { font-size: .8rem; color: #8fae9c; margin-top: .2rem; }
.dash-chat { display: flex; flex-direction: column; height: 300px; border: 1px solid #2c4536; }
.dash-chat .chat-body { padding: .8rem; }
.dash-chat .bubble.driver { background: #2c4536; color: #e7f0ea; border-color: #35513f; }
.dash-chat .bubble.customer { background: var(--green); color: #fff; border-color: var(--green-deep); }
.dash-chat .chat-input { border-top: 1px solid #2c4536; }
.dash-chat .chat-input input { background: #0f1a14; color: #e7f0ea; border: 1px solid #35513f; }
.status-btns { display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem 0; }
.muted-note { color: #8fae9c; font-size: .84rem; }

/* ── Consent modal (courier location sharing) ── */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(9, 20, 14, .72); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-card {
    background: #16261d; border: 1px solid #24382c; 
    padding: 1.5rem; max-width: 460px; width: 100%; color: #e7f0ea; box-shadow: var(--shadow);
}
.modal-card h2 { font-family: var(--font-head); font-weight: 700; color: #5fce8f; font-size: 1.25rem; margin-bottom: .8rem; }
.modal-card p { font-size: .92rem; margin-bottom: .8rem; line-height: 1.55; }
.modal-card ul { margin: 0 0 .9rem 1.1rem; font-size: .9rem; line-height: 1.55; }
.modal-card ul li { margin-bottom: .4rem; }
.modal-card a { color: #5fce8f; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }

/* ── Courier shift + location sharing ── */
.shift-panel { padding: 1rem 1.2rem; }
.shift-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.shift-state { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: #5fce8f; }
.shift-panel .dash-btn { font-size: .9rem; padding: .55rem 1.2rem; }
.share-banner {
    margin-top: .9rem; padding: .65rem .85rem; 
    background: rgba(34, 176, 106, .14); border: 1px solid rgba(34, 176, 106, .4);
    color: #7fe0ab; font-size: .86rem; font-weight: 500;
}

/* ── Live map (Leaflet) ── */
.fleet-map { height: 420px; overflow: hidden; border: 1px solid #24382c; }
.fleet-map .leaflet-container { background: #0c130f; font-family: var(--font-body); }
.fleet-map .leaflet-popup-content-wrapper, .fleet-map .leaflet-popup-tip { background: #16261d; color: #e7f0ea; }
.fleet-map .leaflet-popup-content { font-size: .86rem; line-height: 1.45; }
.fleet-map .leaflet-popup-content strong { color: #5fce8f; }
.map-pin {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; font-size: 14px;
    border: 2px solid #0f1a14; box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.map-pin.driver { background: var(--green); }
.map-pin.driver.stale { background: #8fae9c; filter: grayscale(.4); }
.map-pin.order-pending { background: var(--amber); transform: rotate(-45deg); }
.map-pin.order-pending > * { transform: rotate(45deg); }
.map-pin.order-active { background: var(--hybrid); transform: rotate(-45deg); }
.map-pin.order-active > * { transform: rotate(45deg); }
.map-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: .7rem; font-size: .8rem; color: #8fae9c; }
.map-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend-dot { width: 12px; height: 12px; display: inline-block; }
.legend-dot.driver { background: var(--green); }
.legend-dot.order-pending { background: var(--amber); }
.legend-dot.order-active { background: var(--hybrid); }

/* ── Nearest-courier suggestion (order assign) ── */
.suggest-box { margin-top: .5rem; font-size: .84rem; color: #e7f0ea; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.suggest-box .suggest-label { color: #8fae9c; }
.suggest-box .dash-btn { padding: .3rem .8rem; font-size: .78rem; }

/* ── Fleet: on-shift courier list ── */
.fleet-list { display: flex; flex-direction: column; }
.fleet-row {
    display: grid; grid-template-columns: 14px 1fr auto auto; align-items: center; gap: .8rem;
    padding: .58rem .2rem; border-bottom: 1px solid #1f2f26; font-size: .9rem;
}
.fleet-row:last-child { border-bottom: none; }
.fleet-dot { width: 10px; height: 10px; }
.fleet-dot.live { background: var(--green); box-shadow: 0 0 0 3px rgba(34,176,106,.2); }
.fleet-dot.stale { background: #8fae9c; }
.fleet-name { font-weight: 600; }
.fleet-loc { color: #8fae9c; font-variant-numeric: tabular-nums; font-size: .84rem; }
.fleet-age { color: #8fae9c; font-size: .82rem; white-space: nowrap; }
@media (max-width: 640px) {
    .fleet-row { grid-template-columns: 14px 1fr auto; }
    .fleet-loc { grid-column: 2 / 4; font-size: .8rem; }
}

/* ── Dashboard: stat tiles, trend charts, top-products/pages ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; }
.stat-tile { background: #0f1a14; border: 1px solid #24382c; padding: .95rem 1rem; }
.stat-tile .stat-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #8fae9c; }
.stat-tile .stat-value { font-size: 1.6rem; font-weight: 700; margin-top: .3rem; }
.stat-tile .stat-delta { font-size: .78rem; font-weight: 600; margin-top: .25rem; }
.stat-tile .stat-delta.up { color: #5fce8f; }
.stat-tile .stat-delta.down { color: #e57373; }
.stat-tile .stat-delta.flat { color: #8fae9c; }

.chart-card, .bar-card { margin-top: 1.4rem; }
.chart-card h3, .bar-card h3 {
    font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    color: #8fae9c; margin-bottom: .6rem;
}
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-axis-label { fill: #8fae9c; font-size: 10px; font-family: var(--font-body); }
.chart-tooltip {
    position: absolute; pointer-events: none; z-index: 5;
    background: #0c130f; border: 1px solid #35513f; 
    padding: .4rem .6rem; font-size: .78rem; white-space: nowrap;
    transform: translate(-50%, -115%); opacity: 0; transition: opacity .1s ease;
}
.chart-tooltip.show { opacity: 1; }
.chart-tooltip .tt-value { color: #e7f0ea; font-weight: 700; }
.chart-tooltip .tt-label { color: #8fae9c; margin-top: .1rem; }

.bar-list { display: flex; flex-direction: column; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 70px; align-items: center; gap: .6rem; font-size: .84rem; }
.bar-row .bar-name { color: #e7f0ea; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: #0f1a14; height: 18px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); }
.bar-row .bar-value { text-align: right; color: #8fae9c; font-variant-numeric: tabular-nums; }

.ga-setup ol { margin: .6rem 0 0 1.2rem; color: #e7f0ea; font-size: .88rem; line-height: 1.65; }
.ga-setup ol li { margin-bottom: .3rem; }
.ga-setup code {
    background: #0f1a14; border: 1px solid #24382c; 
    padding: .1rem .4rem; font-size: .84rem; font-family: var(--font-body);
}

.top-pages-table { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: .2rem; }
.top-pages-table td { padding: .42rem .3rem; border-bottom: 1px solid #1f2f26; }
.top-pages-table td:first-child { font-family: monospace; font-size: .82rem; }
.top-pages-table td:last-child { text-align: right; color: #8fae9c; font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
    .bar-row { grid-template-columns: 90px 1fr 60px; }
}
.toast {
    position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
    background: var(--green-ink); color: #eaf5ee; border: 1px solid var(--green);
    padding: .65rem 1.35rem; font-weight: 500; z-index: 200;
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.toast.show { opacity: 1; }
.hidden { display: none !important; }

/* tier grid in product form */
.tier-grid { width: 100%; border-collapse: collapse; font-size: .86rem; margin-top: .4rem; }
.tier-grid th, .tier-grid td { padding: .38rem .5rem; border-bottom: 1px solid #1f2f26; text-align: left; }
.tier-grid input[type="number"] { width: 90px; }

@media (max-width: 760px) {
    .vibe-grid { grid-template-columns: 1fr; }
    .vibe-tile { min-height: 200px; }
    .hero-props { gap: 1rem; }
}
@media (max-width: 640px) {
    .field-row, .dash-field-row { flex-direction: column; gap: 0; }
    .hero-feature { padding: 3rem 1.2rem 2.6rem; }
}

/* Square corners on Leaflet map controls (vendor CSS stays stock) */
.leaflet-bar, .leaflet-bar a, .leaflet-popup-content-wrapper, .leaflet-control-attribution { border-radius: 0 !important; }

/* ── Product detail modal (Leafly-style, opens in-page) ── */
.pd-backdrop {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(10, 28, 17, .5);
    display: flex; align-items: center; justify-content: center;
    padding: 1.2rem;
    opacity: 0; pointer-events: none; transition: opacity .16s ease;
}
.pd-backdrop.open { opacity: 1; pointer-events: auto; }
.pd-modal {
    background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
    width: 100%; max-width: 900px; max-height: calc(100dvh - 2.4rem);
    overflow-y: auto; position: relative;
    transform: translateY(14px); transition: transform .16s ease;
}
.pd-backdrop.open .pd-modal { transform: none; }
.pd-close {
    position: absolute; top: .4rem; right: .55rem; z-index: 2;
    background: var(--white); border: 1px solid var(--line);
    width: 2.1rem; height: 2.1rem; line-height: 1;
    font-size: 1.35rem; color: var(--muted); cursor: pointer;
}
.pd-close:hover { color: var(--ink); }
.pd-grid { display: grid; grid-template-columns: 330px 1fr; }
.pd-visual {
    position: relative; min-height: 300px;
    height: auto; /* let the panel stretch to the full modal height (base .strain-visual pins height) */
    display: flex; align-items: center; justify-content: center;
    color: #fff; overflow: hidden;
    border-right: 1px solid var(--line); border-bottom: none;
}
.pd-visual .leaf-watermark { width: 96px; height: 96px; opacity: .9; }
.pd-visual .product-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.pd-info { padding: 1.6rem 1.7rem 1.7rem; }
.pd-name { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; color: var(--green-ink); }
.pd-aka { color: var(--muted); font-size: .92rem; margin-top: .1rem; }
.pd-badges { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.pd-section { margin-top: 1.15rem; }
.pd-label {
    font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--muted); margin-bottom: .45rem;
}
.pd-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.pd-chip {
    font-size: .8rem; font-weight: 600; padding: .3rem .7rem;
    background: var(--paper); border: 1px solid var(--line); color: var(--ink);
    display: inline-flex; align-items: center; gap: .4rem;
}
.terp-dot { width: .62rem; height: .62rem; display: inline-block; }
.pd-meter-row { display: flex; align-items: center; gap: .6rem; font-size: .78rem; color: var(--muted); font-weight: 600; }
.pd-meter { flex: 1; height: 6px; background: var(--paper-2); border: 1px solid var(--line); position: relative; }
.pd-meter-fill { position: absolute; top: -1px; bottom: -1px; width: 14px; margin-left: -7px; background: var(--green); }
.pd-lineage { font-size: .92rem; }
.pd-lineage strong { font-family: var(--font-head); }
.pd-desc { font-size: .95rem; line-height: 1.65; color: var(--ink); }
.pd-disclaimer { font-size: .74rem; color: var(--muted); margin-top: .55rem; line-height: 1.45; }
.pd-buy {
    display: flex; align-items: center; gap: 1rem; margin-top: 1.35rem;
    padding-top: 1.15rem; border-top: 1px solid var(--line);
}
.pd-price { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; color: var(--green-deep); }
.pd-size { color: var(--muted); font-size: .9rem; }
.pd-buy .add-btn { margin: 0; width: auto; flex: 1; max-width: 260px; margin-left: auto; }
@media (max-width: 760px) {
    .pd-grid { grid-template-columns: 1fr; }
    .pd-visual { min-height: 210px; border-right: none; border-bottom: 1px solid var(--line); }
    .pd-buy { flex-wrap: wrap; }
}
body.pd-open { overflow: hidden; }

/* ── Hero promo slider ── */
/* Horizontal padding lives on the slides, not the container — otherwise the
   neighbouring slide shows through the padding gutter while sliding. */
.hero-feature { position: relative; overflow: hidden; padding-left: 0; padding-right: 0; }
.hero-track { display: flex; align-items: stretch; transition: transform .45s ease; }
.hero-slide { flex: 0 0 100%; min-width: 100%; padding: 0 1.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
@media (max-width: 675px) { .hero-slide { padding: 0 1.2rem; } }
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 2.6rem; height: 2.6rem; line-height: 1;
    background: rgba(255, 255, 255, .85); border: 1px solid var(--line);
    color: var(--green-ink); font-size: 1.5rem; cursor: pointer;
    transition: background .12s ease, border-color .12s ease;
}
.hero-arrow:hover { background: var(--white); border-color: var(--green); }
.hero-arrow.prev { left: .9rem; }
.hero-arrow.next { right: .9rem; }
.hero-dots { display: flex; justify-content: center; gap: .45rem; margin-top: 1.6rem; }
.hero-dots:empty { margin-top: 0; }
.hero-dot {
    width: 26px; height: 4px; padding: 0; border: none; cursor: pointer;
    background: #cfdfd4; transition: background .15s ease;
}
.hero-dot.active { background: var(--green); }
.hero-dot:hover { background: var(--green-deep); }
@media (max-width: 560px) {
    .hero-arrow { display: none; } /* swipe instead */
}

/* footer sits on dark green — flip the black logo to white */
.footer-brand .brand-logo { filter: invert(1); }
@media (max-width: 560px) {
    .navbar .brand-logo { height: 24px; }
}

/* ── Message + order timestamps ── */
.bubble { display: flex; flex-direction: column; }
.bubble-text { overflow-wrap: anywhere; }
/* Bubbles sit on four backgrounds (paper, green, dark green) across the customer
   and staff chats — inherit the parent's text colour and dim it, since any fixed
   grey legible on one of them disappears on the others. */
.bubble-time {
    align-self: flex-end; margin-top: .18rem;
    font-size: .7rem; font-weight: 500; line-height: 1;
    color: inherit; opacity: .68;
    font-variant-numeric: tabular-nums;
    user-select: none;
}
.order-meta { font-size: .82rem; color: var(--muted); margin: .35rem 0 .2rem; }
body.dashboard .order-meta { color: #8fae9c; }
/* tabular figures so the relative time ticking over does not reflow the line */
.order-age { opacity: .85; font-variant-numeric: tabular-nums; }
#notifyBtn { font-size: .76rem; padding: .34rem .75rem; white-space: nowrap; flex-shrink: 0; }

/* ── Order editing + PWA install prompt ── */
.edit-window {
    display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
    background: var(--paper); border: 1px solid var(--line);
    padding: .6rem .8rem; margin: .6rem 0; font-size: .88rem;
}
.edit-window .pill-btn { padding: .3rem .8rem; font-size: .82rem; }
.edit-banner {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap;
    background: var(--green-ink); color: #fff;
    padding: .55rem .9rem; font-size: .88rem; text-align: center;
}
.edit-banner .pill-btn { padding: .25rem .7rem; font-size: .8rem; border-color: rgba(255,255,255,.5); color: #fff; }
.install-banner {
    background: var(--green-ink); color: #fff;
    padding: .6rem 1rem; font-size: .86rem; line-height: 1.5; text-align: center;
}
/* Admin edit modal: wider than the consent-style modals it borrows from. */
.modal-wide { max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; }
.em-item-row {
    display: grid; grid-template-columns: 1fr 4.5rem 5rem 2.2rem;
    align-items: center; gap: .5rem; padding: .3rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.em-item-name { font-size: .9rem; overflow-wrap: anywhere; }
.em-item-price { font-size: .9rem; text-align: right; font-variant-numeric: tabular-nums; }
.em-qty { width: 100%; }
.em-add-row { display: flex; gap: .5rem; margin-top: .6rem; }
.em-add-row select { flex: 1; min-width: 0; }
.em-error { color: #ff9d9d; font-size: .88rem; min-height: 1.1em; margin: .4rem 0 0; }

/* ── Narrow-screen navbars ──
   Both navbars laid their children out with nowrap text and no shrink allowance,
   so below ~430px the brand and the links overlapped instead of yielding. Let the
   brand give up space first, then drop it in stages. */
.navbar .brand { min-width: 0; flex-shrink: 1; overflow: hidden; }
.navbar .nav-links { flex-shrink: 0; }

@media (max-width: 430px) {
    .navbar { padding: .55rem .6rem; gap: .5rem; }
    .navbar .wordmark { font-size: .92rem; }
    .navbar .wordmark-sub { display: none; }   /* keep the name, drop the descriptor */
    .navbar .brand-logo { height: 26px; }
    .navbar .nav-links { gap: .55rem; }
    .navbar .nav-links a { font-size: .8rem; }
    .navbar .pill-btn { padding: .42rem .6rem; font-size: .78rem; }
}
@media (max-width: 360px) {
    /* Out of room: the logo alone still reads as the brand. */
    .navbar .wordmark-lockup { display: none; }
}

/* The staff navbar carries more links plus the alerts button — on a phone it needs
   a second row rather than a squeeze. */
@media (max-width: 760px) {
    body.dashboard .navbar { flex-wrap: wrap; padding: .55rem .7rem; gap: .35rem .6rem; }
    body.dashboard .navbar .nav-links {
        width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: .5rem .9rem;
    }
    body.dashboard .brand-name { font-size: 1rem; }
    body.dashboard .nav-links a { font-size: .82rem; }
    body.dashboard #notifyBtn { font-size: .74rem; padding: .3rem .6rem; }
}
