/* GroworaConnect design system - shared by the MAUI app and the web app. */
:root {
    --bg: #F4F6FB; --surface: #FFFFFF; --surface-2: #F7F8FC; --line: #E6E9F2; --line-strong: #D5DAE6;
    --text: #0E1A3A; --text-2: #4A5677; --muted: #7C87A3;
    --primary: #2F6BFF; --primary-600: #1F55E0; --primary-50: #EAF1FF;
    --violet: #6C4CF5; --violet-50: #F0ECFF;
    --green: #1FA463; --green-50: #E7F7EF; --whatsapp: #25A55F;
    --orange: #F28C28; --orange-50: #FFF2E5; --red: #E5484D; --red-50: #FDECEC; --amber: #F5A623;
    --pink-50: #FDEBF3; --teal-50: #E5F6F6;
    --radius: 14px; --radius-sm: 10px; --radius-lg: 20px;
    --shadow: 0 1px 2px rgba(14, 26, 58, .05), 0 4px 16px rgba(14, 26, 58, .06);
    --shadow-lg: 0 10px 40px rgba(14, 26, 58, .12);
    --font: "Segoe UI", "Inter", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
    color-scheme: light;
}
/* dark: the device setting (Automatic), unless the user picked Light; or the user picked Dark */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0B1120; --surface: #121A2E; --surface-2: #17213A; --line: #233052; --line-strong: #2E3D63;
        --text: #E8EDF8; --text-2: #B3BED6; --muted: #8592AF;
        --primary: #5B8CFF; --primary-600: #7AA2FF; --primary-50: #1A2747; --violet: #9077FF; --violet-50: #241F45;
        --green-50: #12301F; --orange-50: #33240F; --red-50: #3A1719; --pink-50: #3A1A2A; --teal-50: #0F2E2E;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0B1120; --surface: #121A2E; --surface-2: #17213A; --line: #233052; --line-strong: #2E3D63;
    --text: #E8EDF8; --text-2: #B3BED6; --muted: #8592AF;
    --primary: #5B8CFF; --primary-600: #7AA2FF; --primary-50: #1A2747; --violet: #9077FF; --violet-50: #241F45;
    --green-50: #12301F; --orange-50: #33240F; --red-50: #3A1719; --pink-50: #3A1A2A; --teal-50: #0F2E2E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; }
/* underline text links on real mouse hover only (a tapped button/chip on a phone otherwise stays underlined) */
@media (hover: hover) { a:hover { text-decoration: underline; } }
a.btn, a.chip, a.card-link, a.icon-btn, a.brand, .nav a, .tabbar a, .mobile-tabs a, .dash aside a { text-decoration: none !important; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 6.4vw, 30px); font-weight: 800; } h2 { font-size: 21px; font-weight: 750; } h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1:focus, h1:focus-visible { outline: none; }   /* FocusOnNavigate moves focus to the page heading for screen readers */

/* ---------- layout ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
main.page { flex: 1; padding: 20px 0 96px; }
@media (min-width: 900px) { main.page { padding-bottom: 48px; } }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap-ok { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gw { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head a { font-weight: 650; font-size: 14px; display: inline-flex; gap: 4px; align-items: center; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.bold { font-weight: 700; } .center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hide-sm { } .show-sm { display: none; }
@media (max-width: 899px) { .hide-sm { display: none !important; } .show-sm { display: initial; } }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px);
          border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-weight: 800; font-size: 19px; line-height: 1; }
.brand-name b { color: var(--primary); }
.brand-tag { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; margin-top: 3px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { white-space: nowrap; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { color: var(--primary); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 3px; border-radius: 3px; background: var(--primary); }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0;
            background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none !important; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.badge-dot { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red);
             color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff;
          display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }

/* bottom tab bar (phones): Home, Explore, Post, Messages, Profile */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
          display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted);
            text-decoration: none; padding: 4px 0; position: relative; }
.tabbar a.active { color: var(--primary); }
.tabbar .post { margin-top: -22px; }
.tabbar .post span.fab { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff;
                         display: grid; place-items: center; box-shadow: 0 6px 18px rgba(47, 107, 255, .4); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px;
       border: 1px solid transparent; font-weight: 650; font-size: 14.5px; cursor: pointer; text-decoration: none !important; white-space: nowrap;
       transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(47, 107, 255, .28); }
.btn-primary:hover { background: var(--primary-600); }
.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 4px 14px rgba(108, 76, 245, .28); }
.btn-green { background: var(--whatsapp); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-danger { background: var(--red-50); color: var(--red); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 650;
        background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill.green { background: var(--green-50); color: var(--green); } .pill.blue { background: var(--primary-50); color: var(--primary); }
.pill.violet { background: var(--violet-50); color: var(--violet); } .pill.orange { background: var(--orange-50); color: var(--orange); }
.pill.red { background: var(--red-50); color: var(--red); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
        background: var(--surface); font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--text-2); white-space: nowrap; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 650; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong);
                                       background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.error-box { background: var(--red-50); color: var(--red); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.ok-box { background: var(--green-50); color: var(--green); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px; }
.card-link { display: block; color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.listing { overflow: hidden; display: flex; flex-direction: column; }
.listing .art { height: 128px; }
.listing .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.listing .title { font-weight: 700; font-size: 15px; }
.listing .foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
                 gap: 6px; font-weight: 650; font-size: 13.5px; color: var(--whatsapp); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 650; color: var(--text); }
.rating svg { color: var(--amber); }
.rating .muted { font-weight: 500; }
.price { font-weight: 750; color: var(--text); }
.price small { font-weight: 500; color: var(--muted); font-size: 12px; }
.ribbon { position: absolute; top: 10px; right: 10px; }

/* category/listing art tiles (no stock photos: gradient + icon/emoji) */
.art { position: relative; display: grid; place-items: center; border-radius: 0; overflow: hidden; color: #fff; }
.art .glyph { width: 44%; max-width: 64px; height: auto; opacity: .95; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .18)); }
.art .emoji { font-size: 52px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 80% 0%, rgba(255, 255, 255, .28), transparent 55%); }
.art.round { border-radius: var(--radius-sm); }

.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: var(--radius);
            background: var(--surface); border: 1px solid var(--line); text-decoration: none !important; color: var(--text); font-weight: 650;
            font-size: 13px; text-align: center; transition: transform .15s, box-shadow .15s; line-height: 1.25; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-tile .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.cat-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .cat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) {
    .wrap { padding: 0 14px; }
    .cat-row { gap: 8px; }
    .cat-tile { padding: 10px 4px; font-size: 11.5px; gap: 6px; }
    .cat-tile .ic { width: 42px; height: 42px; border-radius: 12px; }
    h2 { font-size: 18px; }
    .section-head a { white-space: nowrap; }
    .grid.g4, .grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .listing .art { height: 96px; }
    .detail-head .actions .btn { flex: 1; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); min-height: 340px; display: flex; align-items: center;
        background: linear-gradient(180deg, #DCEBFF 0%, #EEF5FF 55%, #FFF6E8 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero { background: linear-gradient(180deg, #13244A 0%, #142040 60%, #2A2433 100%); } }
:root[data-theme="dark"] .hero { background: linear-gradient(180deg, #13244A 0%, #142040 60%, #2A2433 100%); }
.hero-scene { position: absolute; inset: 0; width: 100%; height: 100%;
              -webkit-mask-image: linear-gradient(90deg, transparent 22%, #000 52%); mask-image: linear-gradient(90deg, transparent 22%, #000 52%); }
@media (max-width: 700px) { .hero-scene { opacity: .35; -webkit-mask-image: none; mask-image: none; } }
.hero-copy { position: relative; padding: 36px 40px; max-width: 640px; }
.hero h1 { font-size: 44px; line-height: 1.08; font-weight: 850; }
.hero h1 span { color: var(--primary); }
.hero p.lead { margin: 14px 0 22px; font-size: 16.5px; color: var(--text-2); max-width: 470px; }
@media (max-width: 700px) { .hero h1 { font-size: 28px; } .hero-copy { padding: 24px 18px; max-width: 100%; min-width: 0; } .hero { min-height: 280px; }
                            .hero p.lead { font-size: 14.5px; } .searchbar { min-width: 0; } }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 16px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-lg);
             border: 1px solid var(--line); }
.searchbar input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; height: 42px; }
.searchbar .loc { display: flex; align-items: center; gap: 6px; padding: 0 12px; border-left: 1px solid var(--line); color: var(--text-2); font-weight: 600;
                  font-size: 14px; white-space: nowrap; cursor: pointer; background: none; border-top: 0; border-bottom: 0; border-right: 0; height: 32px; }
@media (max-width: 560px) { .searchbar .loc { display: none; } }

.loc-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
           background: var(--surface-2); font-weight: 650; font-size: 13.5px; cursor: pointer; color: var(--text); }

/* promo banners */
.banner { position: relative; overflow: hidden; border-radius: var(--radius); padding: 22px 24px; min-height: 150px; display: flex; flex-direction: column;
          justify-content: center; gap: 8px; color: #fff; text-decoration: none !important; }
.banner h3 { font-size: 24px; font-weight: 850; font-style: italic; }
.banner p { max-width: 280px; opacity: .92; font-size: 14px; }
.banner .btn { align-self: flex-start; margin-top: 6px; }
.banner.food { background: linear-gradient(110deg, #4A1F0E 0%, #8A3A12 55%, #C4651F 100%); }
.banner.food h3 { color: #FFC34D; }
.banner.business { background: linear-gradient(110deg, #DDF3E4 0%, #EAF7EE 60%, #F6FBF3 100%); color: #0E3A22; }
.banner.business h3 { font-style: normal; color: #0E3A22; font-size: 21px; }
.banner .deco { position: absolute; right: 18px; bottom: 6px; font-size: 76px; line-height: 1; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .25)); }
.banner .btn { background: #F5A623; color: #2B1606; }
.banner.business .btn { background: var(--whatsapp); color: #fff; }

.post-card { background: linear-gradient(160deg, var(--violet-50), var(--primary-50)); border: 1px solid var(--line); border-radius: var(--radius);
             padding: 20px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; min-height: 210px; }
.post-card .worker { position: absolute; right: 8px; bottom: 0; width: 120px; }

/* ---------- side menu dashboard shell ---------- */
.dash { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.dash > section { min-width: 0; }   /* the chip row scrolls instead of widening the page */
@media (max-width: 899px) { .dash { grid-template-columns: minmax(0, 1fr); } .dash > aside { display: none; } }
.sidemenu { position: sticky; top: 86px; padding: 10px; }
.sidemenu .grp { font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; }
.sidemenu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 14px;
              text-decoration: none; }
.sidemenu a:hover { background: var(--surface-2); color: var(--text); }
.sidemenu a.active { background: var(--primary-50); color: var(--primary); }
.mobile-tabs { display: none; }
@media (max-width: 899px) { .mobile-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; } .mobile-tabs > * { flex: none; }
    .mobile-tabs { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 32px; } }

.stat { padding: 16px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.stat .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.stat .v { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat.blue { background: var(--primary-50); } .stat.blue .ic { background: var(--primary); }
.stat.purple { background: var(--violet-50); } .stat.purple .ic { background: var(--violet); }
.stat.orange { background: var(--orange-50); } .stat.orange .ic { background: var(--orange); }
.stat.green { background: var(--green-50); } .stat.green .ic { background: var(--green); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 12px;
            border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { background: none; border: 0; padding: 10px 2px; font-weight: 650; color: var(--muted); cursor: pointer; position: relative;
                        white-space: nowrap; text-decoration: none; }
.tabs .on { color: var(--primary); }
.tabs .on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px; background: var(--primary); }

.list-item { display: flex; gap: 14px; padding: 14px; align-items: flex-start; }
.list-item + .list-item { border-top: 1px solid var(--line); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--surface-2); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite;
            border-radius: var(--radius); }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.splash { min-height: 100vh; display: grid; place-items: center; }

/* modal + toasts */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(8, 14, 30, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: var(--radius-lg);
         box-shadow: var(--shadow-lg); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .content { padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 18px -20px -20px; padding: 14px 20px; border-top: 1px solid var(--line); }
.toasts { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: 88px; display: flex; flex-direction: column; gap: 8px;
          width: min(92vw, 420px); }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast { background: var(--text); color: var(--surface); border-radius: 12px; padding: 12px 16px; font-weight: 600; box-shadow: var(--shadow-lg);
         border: 0; width: 100%; text-align: left; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.35;
         display: flex; gap: 10px; align-items: center; animation: up .2s ease-out; }
.toast.error { background: var(--red); color: #fff; } .toast.ok { background: var(--green); color: #fff; }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }

/* detail page header */
.detail-head { display: grid; grid-template-columns: 120px 1fr auto; gap: 18px; align-items: center; padding: 18px; }
.detail-head .art { width: 120px; height: 120px; border-radius: 50%; }
@media (max-width: 700px) { .detail-head { grid-template-columns: 84px 1fr; } .detail-head .art { width: 84px; height: 84px; } .detail-head .actions { grid-column: 1 / -1; } }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week .d { padding: 8px 4px; border-radius: 10px; text-align: center; font-size: 12px; background: var(--surface-2); }
.week .d.on { background: var(--green-50); color: var(--green); font-weight: 650; }
.week .d.today { outline: 2px solid var(--primary); }

/* chat */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 180px); min-height: 460px; overflow: hidden; }
@media (max-width: 899px) { .chat { grid-template-columns: 1fr; height: calc(100vh - 170px); } .chat.open .convs { display: none; } .chat:not(.open) .thread { display: none; } }
.convs { border-right: 1px solid var(--line); overflow-y: auto; }
.conv { display: flex; gap: 10px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--line); text-decoration: none !important; color: inherit; }
.conv:hover, .conv.on { background: var(--surface-2); }
.thread { display: flex; flex-direction: column; min-width: 0; }
.thread .msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.bubble { max-width: 72%; padding: 9px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start;
          white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; border-color: var(--primary); }
.bubble .t { display: block; font-size: 11px; opacity: .7; margin-top: 3px; text-align: right; }
.composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }

.auth-card { max-width: 440px; margin: 24px auto; padding: 28px; }
.stars-input { display: flex; gap: 6px; }
.stars-input button { background: none; border: 0; cursor: pointer; padding: 2px; color: var(--line-strong); }
.stars-input button.on { color: var(--amber); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.status-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.status-steps span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 650; }
.status-steps span.done { background: var(--green-50); color: var(--green); }
.status-steps span.now { background: var(--primary); color: #fff; }

/* ---- uploaded photos ---- */
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery .shot { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2, #eef1f6); }
.gallery .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .shot button { position: absolute; top: 6px; right: 6px; }
.upload { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.cover-photo { height: 180px; border-radius: var(--radius); overflow: hidden; position: relative; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 700px) { .cover-photo { height: 130px; } .gallery { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } }

/* ---- cart and orders ---- */
.cart-bar { position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 14px 18px;
    border-radius: var(--radius); background: var(--green); color: #fff; font-weight: 700; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.cart-bar:hover { color: #fff; filter: brightness(1.05); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: var(--surface-2); color: var(--text); font-size: 16px; cursor: pointer; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }
.order-lines { margin: 8px 0; padding: 0; list-style: none; font-size: 14px; color: var(--text-2); }
.order-lines li { display: flex; justify-content: space-between; padding: 3px 0; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice label { flex: 1 1 140px; display: flex; gap: 8px; align-items: center; padding: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }

/* phones: keep the top bar on one line (logo + location + Login) */
@media (max-width: 480px) {
    .brand-tag { display: none; }
    .brand-name { font-size: 17px; }
    .topbar .wrap { gap: 8px; }
}

/* phones: text fits its box instead of being cut */
input::placeholder, textarea::placeholder { text-overflow: ellipsis; }
input { text-overflow: ellipsis; min-width: 0; }
@media (max-width: 480px) {
    h2 { font-size: 19px; }
    .section-head h2 { font-size: 18px; }
    .chip { height: 34px; padding: 0 12px; font-size: 13.5px; }
}

/* small phones: the top bar keeps logo, location, cart, bell and profile on one line (light/dark lives in Settings) */
@media (max-width: 480px) {
    .hide-xs { display: none !important; }
    .topbar .wrap > .row { gap: 2px !important; }
    .topbar .icon-btn { width: 38px; height: 38px; }
}

/* ---- maps ---- */
.map { width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.map-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px;
    border-radius: var(--radius); background: var(--surface-2); border: 1px dashed var(--line-strong); color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--primary); color: #fff; }
.track-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.track-stats > div { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.track-stats b { display: block; font-size: 18px; }
