/* ============================================================
   NebedaHub styles
   Colours and fonts come from the NebedaHub prototype and are
   defined once here so they are easy to change.
   ============================================================ */

:root {
  --navy: #0c1220;
  --navy-2: #1a2338;
  --gold: #c9a24a;
  --gold-ink: #1a1608;
  --cream: #faf6ec;
  --card: #ffffff;
  --soft: #fbf8f1;
  --line: #e7e0cf;
  --ink: #1c1811;
  --muted: #8b8371;
  --on-navy: #f3ead1;
  --owed: #a33a2a;
  --paid: #2d6a3e;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

/* Each NebedaHub app has its own look: the same gold, on its own dark colour */
html[data-app="business"] { --navy: #1b1024; --navy-2: #2c1c3a; }
html[data-app="seller"] { --navy: #0f1d17; --navy-2: #1b3129; }
html[data-app="admin"] { --navy: #16181c; --navy-2: #2a2e36; }

* { box-sizing: border-box; }

/* Phones: nothing may make the page wider than the screen (iPhones otherwise shrink the whole app to fit) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

h1, h2, h3, .serif { font-family: var(--serif); }
h1 { margin: 0 0 6px; font-size: 30px; font-weight: 700; }
h2 { margin: 0 0 12px; font-size: 21px; font-weight: 700; }
h3 { margin: 0 0 4px; font-size: 18px; }
a { color: var(--navy); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.muted, .fl { color: var(--muted); }
.gold { color: var(--gold); }
.small-text { font-size: 12px; }
.nowrap { white-space: nowrap; }
.owed, .low { color: var(--owed); }
.paid { color: var(--paid); }
.centre { text-align: center; }

/* ---------- App bar (shared) ---------- */

.appbar {
  background: var(--navy);
  color: var(--on-navy);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 20px;
  padding-top: max(10px, env(safe-area-inset-top));
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .06em;
  color: var(--gold);
  text-decoration: none;
}
.shop-pill { font-size: 12px; opacity: .8; }
.shop-pill b { color: var(--on-navy); font-weight: 600; }

main { flex: 1; width: 100%; min-width: 0; }

.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 18px 16px 28px; overflow-wrap: anywhere; }
.link-button { background: none; border: none; color: var(--navy); text-decoration: underline; padding: 0 4px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--navy); color: var(--on-navy); padding: 10px 16px; border-radius: 10px;
  font-size: 13px; max-width: min(92vw, 440px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 50; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   Customer app — phone-sized, like the prototype
   ============================================================ */

.customer-view { display: flex; justify-content: center; padding: 24px 12px 0; }
.capp {
  width: 100%;
  min-width: 0;
  max-width: 400px;
  height: min(760px, calc(100vh - 150px));
  min-height: 560px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 24px 44px -20px rgba(0,0,0,.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.c-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 10px;
  font-family: var(--serif); font-weight: 700; font-size: 21px;
  flex: 0 0 auto;
}
.c-topbar .back {
  background: none; border: none; font-size: 26px; line-height: 1; padding: 0 6px 2px 0; color: var(--ink);
}
.content {
  flex: 1; overflow-y: auto;
  padding: 2px 18px 16px;
  display: flex; flex-direction: column; gap: 11px;
}
.content > * { flex-shrink: 0; } /* long screens scroll instead of squashing rows */
.bottomnav {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); justify-items: center; align-items: center;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--card);
  flex: 0 0 auto;
}
.bottomnav .item {
  background: none; border: none; font-size: 10.5px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; min-width: 0; padding: 4px 1px;
  white-space: nowrap;
}
.bottomnav .item span { font-size: 17px; }
.bottomnav .item.on { color: var(--navy); font-weight: 700; }
.bottomnav .plus {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: var(--gold); color: #fff; font-size: 22px; line-height: 1;
}

/* Home hero */
.capp.is-hero { background: var(--navy); }
.hero {
  flex: 1;
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: var(--on-navy);
  padding: 30px 24px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  overflow-y: auto;
}
.hero .brand { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: .04em; color: var(--gold); }
.hero .tagline { font-size: 13px; font-weight: 500; letter-spacing: .04em; color: var(--on-navy); }
.hero .featured { font-size: 12.5px; margin: 6px 0 14px; padding: 8px 10px; border: 1px solid rgba(201,162,74,.4); border-radius: 9px; }
.hero .featured b { color: var(--gold); }
.hero h2 { font-family: var(--serif); font-size: 34px; line-height: 1.08; margin: 0 0 8px; }
.capp.is-hero .bottomnav { background: var(--navy-2); border-top-color: rgba(255,255,255,.08); }
.capp.is-hero .bottomnav .item { color: rgba(243,234,209,.6); }
.capp.is-hero .bottomnav .item.on { color: var(--gold); }

.btn, .cta {
  background: var(--gold); color: var(--gold-ink); border: none;
  text-align: center; padding: 13px; border-radius: 10px;
  font-size: 14px; font-weight: 700; width: 100%; max-width: 100%;
}
.btn { margin-top: 12px; }
.btn2 {
  background: transparent; border: 1px solid var(--on-navy); color: var(--on-navy);
  text-align: center; padding: 12px; border-radius: 10px; font-size: 14px; margin-top: 9px; width: 100%; max-width: 100%;
}
.cta { margin-top: auto; }
.cta:disabled { opacity: .45; }
.btn-outline {
  background: transparent; border: 1px solid var(--navy); color: var(--navy);
  padding: 12px; border-radius: 10px; font-size: 14px; width: 100%;
}
.linkish { background: none; border: none; color: var(--muted); text-decoration: underline; font-size: 12.5px; padding: 2px; align-self: center; }

/* Order steps bar */
.flowbar {
  list-style: none; margin: 0 0 2px; padding: 0;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
  font-size: 9.5px; color: var(--muted); text-align: center;
}
.flowbar span { display: block; height: 4px; border-radius: 2px; background: var(--line); margin-bottom: 4px; }
.flowbar li.done span { background: var(--gold); }
.flowbar li.now span { background: var(--navy); }
.flowbar li.now { color: var(--navy); font-weight: 700; }

/* Outfit chips */
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.chip-grid .chip {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 6px;
  font-size: 13.5px; font-weight: 600; text-align: center; background: var(--soft); width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.chip-grid .chip.sel { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.chip-sub { font-size: 11px; font-weight: 500; color: var(--muted); }
.chip.sel .chip-sub { color: var(--gold); }
.chip-sub.gold { color: var(--gold); font-weight: 700; font-size: 13px; }
.chip.rtw { padding: 10px; gap: 5px; }
.rtw-swatch { width: 100%; height: 54px; border-radius: 8px; margin-bottom: 4px; }

/* Design options */
.swatches { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); padding: 0; }
.sw.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--navy); }
.selopt {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-size: 13px; background: #fff; width: 100%; text-align: left;
}
button.selopt { cursor: pointer; }
.optbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.optbtns.two > * { flex: 1; }
.optbtns.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.optbtn {
  border: 1px solid var(--line); border-radius: 20px; padding: 7px 13px;
  font-size: 12.5px; background: #fff; white-space: nowrap; text-decoration: none; color: var(--ink);
  display: inline-block; text-align: center;
}
.optbtn.sel { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 600; }

/* Concept */
.concept { text-align: center; }
.concept-art { position: relative; }
.concept-art svg { width: 100%; max-height: 300px; border-radius: 10px; display: block; margin-bottom: 10px; transition: filter .2s, opacity .2s; }
.concept-art.generating svg { filter: blur(3px); opacity: .55; }
.gen-overlay {
  position: absolute; inset: 0 0 10px; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; font-size: 13.5px; font-weight: 600; color: var(--navy);
}
.gen-spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(201,162,74,.3); border-top-color: var(--gold);
  animation: gen-spin .8s linear infinite;
}
@keyframes gen-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gen-spin { animation-duration: 2.4s; } }
.optbtn:disabled { opacity: .5; cursor: default; }
.thumb svg { width: 64px; height: 96px; border-radius: 8px; display: block; }
.thumb.big svg { width: 120px; height: 180px; }
.order-head { display: flex; gap: 12px; align-items: center; }

/* Measurements & forms */
.stack { display: flex; flex-direction: column; gap: 11px; }
.mrow {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.mrow input {
  width: 72px; text-align: right; border: none; border-bottom: 1px solid var(--line);
  font-size: 13.5px; padding: 3px; background: transparent;
}
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px; font-size: 14px; color: var(--ink); background: #fff;
}

/* Fabric cards */
.fab-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: var(--soft); width: 100%; text-align: left; display: block;
}
.fab-card.sel { outline: 2px solid var(--gold); background: #fff; }
.fab-card .swatch { height: 40px; border-radius: 8px; margin-bottom: 8px; }
.fab-card .name { font-size: 13.5px; font-weight: 600; }
.fab-card .price, .price { font-size: 12.5px; color: var(--gold); font-weight: 700; }
.meta { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.meta.stock { color: var(--gold); font-weight: 600; }
.meta.stock.low, .meta.low { color: var(--owed); }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.qty { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 16px; }

/* Quote */
.qline { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.qline span:last-child, .qline b:last-child { white-space: nowrap; }
.qtotal {
  display: flex; justify-content: space-between;
  font-family: var(--serif); font-weight: 700; font-size: 22px;
  padding-top: 9px; border-top: 1px solid var(--ink);
}

/* Tracking */
.track { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.track li { display: flex; gap: 10px; padding: 6px 0; align-items: center; }
.tdot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--gold); flex: 0 0 10px; }
.tdot.done { background: var(--gold); }
.tdot.now { background: var(--navy); border-color: var(--navy); box-shadow: 0 0 0 3px rgba(12,18,32,.15); }
.done-t { opacity: .45; text-decoration: line-through; }
.now-t { font-weight: 700; color: var(--navy); }

/* Stats */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.capp .statgrid { grid-template-columns: 1fr 1fr; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--soft); }
.stat.centre { padding: 20px 10px; }
.stat .n { font-family: var(--serif); font-size: 25px; font-weight: 700; line-height: 1.15; }
.stat .l { font-size: 11.5px; color: var(--muted); }

.notice { background: #f1ead6; border: 1px solid var(--gold); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.empty { color: var(--muted); font-style: italic; text-align: center; padding: 18px 6px; font-size: 13px; }
.review { font-size: 13px; border-left: 3px solid var(--gold); padding: 4px 0 4px 10px; }
.stars { font-size: 30px; letter-spacing: 4px; margin: 10px 0; }
.stars button { background: none; border: none; color: var(--line); font-size: inherit; padding: 0 2px; }
.stars button.on { color: var(--gold); }
.invoice { display: flex; flex-direction: column; gap: 4px; }
.invoice .serif { font-size: 20px; }

/* ============================================================
   Business dashboard
   ============================================================ */

.biz-tabs {
  display: flex; gap: 2px; overflow-x: auto;
  background: var(--navy-2); padding: 0 16px;
  scrollbar-width: thin;
}
.biz-tabs .tab {
  color: var(--on-navy); text-decoration: none; padding: 11px 13px; font-size: 13px;
  white-space: nowrap; opacity: .72; border-bottom: 3px solid transparent;
}
.biz-tabs .tab:hover { opacity: 1; }
.biz-tabs .tab.active { opacity: 1; border-bottom-color: var(--gold); color: var(--gold); font-weight: 600; }

.biz { max-width: 1180px; margin: 0 auto; padding: 22px 16px; }
.biz-head { margin-bottom: 16px; }
.biz-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.biz-head p { margin: 0; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin-bottom: 16px; min-width: 0;
}
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two-col > * { min-width: 0; }
.two-col > .card, .two-col > .stack > .card { margin-bottom: 0; }
.two-col { margin-bottom: 16px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.team-grid .card { margin-bottom: 0; }
.team-grid { margin-bottom: 16px; }
.person { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.person:last-child { border-bottom: none; }
.jobs { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.jobs li { margin: 4px 0; }

.hint { color: var(--muted); font-size: 13px; margin-top: -4px; }
.total { float: right; font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--muted); }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.form-grid label, .card label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; }
.biz input, .biz select, .biz textarea {
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
.biz input[type=color] { padding: 2px; height: 38px; }
.biz button, .button {
  background: var(--navy); color: var(--on-navy); border: none; border-radius: 8px;
  padding: 9px 16px; font-weight: 600; text-decoration: none; display: inline-block; font-size: 13.5px;
}
.biz button[type=submit], .biz .form-actions button { background: var(--gold); color: var(--gold-ink); }
.biz button.linkish.strong { background: none; color: var(--navy); border: none; padding: 0 2px; border-radius: 0; font-weight: 700; text-decoration: underline; }
.biz button.small, .button.small { padding: 5px 10px; font-size: 12px; }
.biz button.danger { background: transparent; color: var(--owed); border: 1px solid #e6c7c0; }
.biz select.small { width: auto; padding: 3px 6px; font-size: 12px; margin-left: 6px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 140px; }
.inline-form .narrow { flex: 0 1 100px; }
.biz .optbtn { background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 500; border-radius: 20px; }
.optbtns.quick { margin-bottom: 16px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
td:first-child { white-space: nowrap; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--soft); }
td select { width: auto !important; }
.price-table input { width: 110px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }

/* Badges for steps */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  background: #efe8d8; color: var(--ink);
}
.stage-tailor_assigned { background: #ebe7f5; color: #463a78; }
.stage-cutting, .stage-sewing, .stage-embroidery, .stage-fitting { background: #f6ecd2; color: #6b5114; }
.stage-quality_control { background: #fbe3cf; color: #8a4a12; }
.stage-balance_paid { background: #dfe8f4; color: #1f3c66; }
.stage-delivered { background: #e2efe4; color: var(--paid); }
.stage-complete { background: #d8ebdc; color: var(--paid); }
.stage-late { background: #f7dcd6; color: var(--owed); }

.alerts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.alert { background: #f7dcd6; color: var(--owed); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.alert.soft { background: #efe8d8; color: var(--ink); font-weight: 500; }

/* Production board */
.board { display: grid; grid-template-columns: repeat(8, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.stage-column { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.stage-column h2 { font-size: 15px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.stage-column > p { margin: 0 0 8px; }
.job-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.job-card.late { border-left: 3px solid var(--owed); }
.job-card small { color: var(--muted); }
.job-buttons { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* Fabrics */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.biz .chip {
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; font-weight: 500;
}
.biz .chip.active { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 700; }
.fabric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 16px; }
.fabric-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fabric-card .swatch { height: 64px; border-bottom: 1px solid var(--line); }
.fabric-info { padding: 12px 14px; }
.fabric-info p { margin: 3px 0; font-size: 13px; }

/* Measurements */
.measure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.measure-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.measure-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.measure-head small { color: var(--muted); }
.measure-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 13px; }
.measure-list div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.notes { font-size: 12.5px; color: var(--muted); font-style: italic; margin: 8px 0 0; }

/* Order detail */
.design-row { display: flex; gap: 14px; align-items: flex-start; }
.design-row > div:last-child { flex: 1; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.kv span { color: var(--muted); }

/* Ask AI */
.ai-card { background: var(--navy); color: var(--on-navy); border-color: var(--navy); display: flex; flex-direction: column; gap: 10px; }
.ai-card h2 { color: var(--gold); margin: 0; }
.ai-card .hint { color: rgba(243,234,209,.6); margin: 0; font-size: 12px; }
.aiask { display: flex; gap: 6px; }
.biz .aiask input { border-radius: 20px; border: 1px solid #3a4463; background: #141b2e; color: var(--on-navy); }
.biz .aiask button { border-radius: 20px; background: var(--gold); color: var(--gold-ink); }
.bubble-u { align-self: flex-end; background: var(--gold); color: var(--gold-ink); font-size: 13px; padding: 9px 12px; border-radius: 12px 12px 2px 12px; max-width: 85%; }
.bubble-a { background: var(--navy-2); font-size: 13px; padding: 10px 12px; border-radius: 12px 12px 12px 2px; max-width: 95%; line-height: 1.5; }

.invoice-card { max-width: 560px; }

/* ============================================================
   Fabric Marketplace (customer app)
   ============================================================ */

.linkish.on-navy { color: rgba(243,234,209,.75); margin-top: 10px; }
.market-search { display: flex; gap: 6px; }
.market-search input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 8px 13px; background: #fff; font-size: 14px;
}
.market-filters {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--soft);
}
.market-filters .field select { padding: 8px; font-size: 13px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }

.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mtile {
  display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 0 0 9px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; min-width: 0;
}
.mtile.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
.mtile > span:not(.mphoto) { padding: 0 9px; }
.mphoto { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--soft); margin-bottom: 5px; }
.mphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mtile.is-out .mphoto img { filter: grayscale(.7) opacity(.65); }
.mname { font-size: 13px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mprice { font-size: 13px; font-weight: 700; color: var(--gold); }
.mprice small { font-weight: 500; color: var(--muted); }
.mseller { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mstock { font-size: 11px; color: var(--paid); font-weight: 600; }
.mstock.low, .mtile.is-out .mstock { color: var(--owed); }
.ribbon, .pcount, .picked {
  position: absolute; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 3px 8px; line-height: 1.2;
}
.ribbon { top: 8px; left: 8px; background: var(--owed); color: #fff; }
.pcount { bottom: 7px; right: 7px; background: rgba(12,18,32,.72); color: #fff; }
.picked { top: 8px; right: 8px; background: var(--gold); color: var(--gold-ink); }

.gallery-wrap { position: relative; }
.gallery {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px;
  aspect-ratio: 1 / 1; background: var(--soft); scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.gallery-thumbs { display: flex; gap: 6px; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; width: 52px; height: 52px; background: none; }
.gallery-thumbs button.on { border-color: var(--gold); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.name.big { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.1; }
.price.big { font-size: 15px; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 5px; }
.tag .dot { margin: 0; width: 10px; height: 10px; }
.tag.low { color: var(--owed); border-color: #e6c7c0; }
.desc { margin: 0; font-size: 13.5px; line-height: 1.55; }
.seller-card { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--soft); }
.logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #fff; border: 1px solid var(--line); }
.logo.big { width: 84px; height: 84px; }
.logo.tiny { width: 24px; height: 24px; vertical-align: middle; margin-right: 6px; }

/* Chosen fabric + Buy, stuck to the bottom of the fabric step */
.pick-bar {
  position: sticky; bottom: -16px; margin: 0 -18px -16px; padding: 10px 18px 14px;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 20px -14px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 8px;
}
.pick-bar .cta { margin-top: 0; }
.pick-head { display: flex; gap: 10px; align-items: center; }
.pick-head img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.pick-head .name { font-size: 13.5px; font-weight: 600; }

/* ============================================================
   Fabric seller area (and the approvals tab)
   ============================================================ */

.biz button.gold, .button.gold { background: var(--gold); color: var(--gold-ink); }
.biz button.ghost, .button.ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.row-between.wrap { flex-wrap: wrap; align-items: center; }
.biz-head.row-between h1 { margin-bottom: 2px; }

.how-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.how-steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 14px 54px; position: relative; display: flex; flex-direction: column; gap: 3px; }
.how-steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--gold-ink); font-weight: 700; display: grid; place-items: center;
}
.how-steps span { color: var(--muted); font-size: 13px; }

.benefit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.benefit-list li { position: relative; padding-left: 26px; }
.benefit-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }

.shop-list { display: grid; gap: 8px; }
.biz .shop-pick {
  display: flex; gap: 10px; align-items: center; text-align: left; width: 100%;
  background: var(--soft); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-weight: 400;
}
.biz .shop-pick:hover { border-color: var(--gold); }
.shop-pick span { display: flex; flex-direction: column; min-width: 0; }
.shop-pick small { color: var(--muted); }

.shop-strip {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 14px; margin-bottom: 18px;
}
.shop-strip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shop-strip-text b { font-family: var(--serif); font-size: 19px; }
.shop-strip-text small { color: var(--muted); }

.stall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stall-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.stall-photo { position: relative; aspect-ratio: 4 / 3; background: var(--soft); }
.stall-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stall-photo .badge { position: absolute; top: 8px; left: 8px; }
.stall-info { padding: 12px 14px; }
.stall-info p { margin: 3px 0; font-size: 13px; }
.review-note { background: #f7dcd6; color: var(--owed); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; }
.empty-card { text-align: center; }

.status-approved { background: #e2efe4; color: var(--paid); }
.status-pending { background: #fbe3cf; color: #8a4a12; }
.status-hidden { background: #f7dcd6; color: var(--owed); }
.status-soldout { background: #e4e1da; color: #4d4638; }
.sstatus-new { background: #fbe3cf; color: #8a4a12; }
.sstatus-sent { background: #e2efe4; color: var(--paid); }
.sstatus-cancelled { background: #e4e1da; color: #4d4638; }
.sstatus-confirmed { background: #e3ebf6; color: #1e3a5f; }
.status-declined { background: #f7dcd6; color: var(--owed); }

/* NebedaHub Sellers: the application's progress, and dispatching an order */
.seller-status h2 { margin-bottom: 6px; }
.seller-status p { margin: 6px 0; }
.status-steps { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; font-size: 13px; }
.status-steps li { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.status-steps li span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; flex: 0 0 auto; }
.status-steps li.done { color: var(--paid); }
.status-steps li.done span { background: var(--paid); border-color: var(--paid); }
.status-steps li.now { color: var(--ink); }
.status-steps li.now span { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.25); }
.dispatch-form { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.dispatch-form .ship-to { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.dispatch-form .ship-to legend { font-weight: 600; margin-bottom: 4px; padding: 0; }
.dispatch-form .ship-to input { width: auto; }
.dispatch-photo { width: 120px; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-top: 4px; }
.seller-profile h2 { margin: 14px 0 8px; font-size: 19px; }
.seller-profile h2:first-child { margin-top: 0; }
.application-photos { display: flex; flex-wrap: wrap; gap: 6px; }
.application-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.fabric-form fieldset { border: none; padding: 0; margin: 0 0 14px; }
.fabric-form legend { font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.photo-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.photo-slot { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
.photo-field .hint { margin: 8px 0 0; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-slot.add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
  border: 2px dashed var(--gold); color: var(--navy); text-align: center; background: #fffaf0;
}
.photo-slot.add span { font-size: 26px; line-height: 1; color: var(--gold); }
.photo-slot.add small { font-size: 11.5px; color: var(--muted); }
.photo-slot.add input, .file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-slot.add:focus-within, .file-button:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.cover-tag { position: absolute; left: 6px; bottom: 6px; background: var(--gold); color: var(--gold-ink); font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.biz .slot-btn, .capp .slot-btn {
  position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; padding: 0; border-radius: 50%;
  background: rgba(12,18,32,.75); color: #fff; font-size: 16px; line-height: 1; display: grid; place-items: center;
}
.biz .slot-btn.left, .capp .slot-btn.left { left: 5px; right: auto; font-size: 13px; }
.form-error { color: var(--owed); font-weight: 600; font-size: 13px; min-height: 1em; margin: 10px 0 4px; }
.file-button { position: relative; cursor: pointer; align-self: flex-start; }
.logo-row { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.logo-row .stack { gap: 6px; align-items: flex-start; }

.sorders { display: grid; gap: 10px; margin-bottom: 16px; }
.sorder { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.sorder.cancelled { opacity: .6; }
.sorder > img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.sorder-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.sorder-main .job-buttons { margin-top: 4px; }

.review-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.review-card { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.review-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; }
.review-photos img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; display: block; }
.review-photos img:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.review-body p { margin: 4px 0; font-size: 13px; }
.review-body h3 { margin: 0; }

.fabric-card img.swatch.photo { display: block; width: 100%; height: 120px; object-fit: cover; }

/* ---------- Upload a style (customer's inspiration photos) ---------- */

.style-cta, .insp-strip {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 1.5px dashed var(--gold); border-radius: 12px; padding: 12px; background: #fffaf0; color: var(--ink);
}
.style-cta > span:nth-child(2), .insp-strip > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.style-cta small, .insp-strip small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.style-cta > span:last-child, .insp-strip > span:last-child { color: var(--gold); font-size: 20px; }
.style-cta-icon { font-size: 24px; width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.insp-strip { border-style: solid; padding: 8px 10px; }
.insp-strip-photos { display: flex; flex: 0 0 auto; }
.insp-strip-photos img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 2px solid #fff; margin-left: -10px; }
.insp-strip-photos img:first-child { margin-left: 0; }

.capp .photo-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-slot.busy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.photo-slot.busy small { font-size: 11px; color: var(--muted); }
.field small { font-size: 11px; }
.field > span { color: var(--muted); }
.field textarea { resize: vertical; font-family: inherit; }

.insp { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--soft); display: flex; flex-direction: column; gap: 8px; }
.insp-title { font-size: 13.5px; }
.insp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.insp-note, .style-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.insp-note { margin: 0; font-size: 13px; font-style: italic; }

.style-thumb, .biz button.style-thumb {
  padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff;
  aspect-ratio: 3 / 4; display: block; width: 100%; cursor: zoom-in;
}
.style-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.style-missing { display: grid; place-items: center; height: 100%; font-size: 10.5px; color: var(--muted); padding: 4px; text-align: center; }

.style-link { display: flex; flex-direction: column; gap: 1px; font-size: 13px; font-weight: 600; text-decoration: none; min-width: 0; }
.style-link small { color: var(--muted); font-weight: 400; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card.style-brief { border: 2px solid var(--gold); background: #fffaf0; }
.style-brief h2 small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 400; margin-top: 4px; }
.style-brief-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.style-brief-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.style-label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.style-brief-text .style-label:not(:first-child) { margin-top: 16px; }
.style-note { margin: 0; padding: 12px 14px; background: #fff; border-left: 4px solid var(--gold); border-radius: 6px; font-size: 17px; line-height: 1.45; color: var(--ink); }
.style-brief .hint { margin-top: 16px; }

.style-strip { display: flex; flex-direction: column; gap: 5px; margin: 4px 0 2px; padding: 7px; border-radius: 8px; background: #fffaf0; border: 1px dashed var(--gold); }
.style-tag { font-size: 11.5px; font-weight: 700; color: var(--navy); }
.style-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.style-more, .biz button.style-more { aspect-ratio: 3 / 4; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-weight: 700; padding: 0; }
.job-card small.style-mini-note { color: var(--ink); font-style: italic; overflow-wrap: anywhere; }

.viewer {
  position: fixed; inset: 0; z-index: 100; background: rgba(8,11,20,.94); color: #fff;
  display: flex; flex-direction: column;
}
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); font-size: 14px; }
.viewer-close { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; line-height: 1; padding: 0; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 12px 16px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.55); color: #fff; font-size: 28px; line-height: 1; padding: 0 0 3px; z-index: 1;
}
.viewer-nav.prev { left: 12px; }
.viewer-nav.next { right: 12px; }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .style-brief-body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .appbar { padding: 8px 16px; gap: 8px; }
  .wordmark { font-size: 22px; }
  .customer-view { padding: 0; }
  .capp { max-width: none; border-radius: 0; border: none; box-shadow: none; height: calc(100vh - var(--appbar-h, 96px)); height: calc(100dvh - var(--appbar-h, 96px)); min-height: 480px; }
  .footer { padding-bottom: 20px; }
  .toast { bottom: 84px; }
  .biz { padding: 16px; }
  h1 { font-size: 25px; }
  .design-row { flex-direction: column; }
  .total { float: none; display: block; margin-top: 4px; }
  .wide-only { display: none; }
  .review-card { grid-template-columns: minmax(0, 1fr); }
  .photo-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .style-brief-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stall-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .stall-info { padding: 10px; }
  .stall-info h3 { font-size: 16px; }
  .shop-strip { padding: 8px 10px; margin-bottom: 14px; }
  .shop-strip-text small { font-size: 11.5px; }
  .hero { padding: 24px 18px; }
  .hero .btn, .hero .btn2 { overflow-wrap: anywhere; }
  .bottomnav { padding-left: 2px; padding-right: 2px; }
  .bottomnav .item { font-size: 10px; }
  .bottomnav .item span { font-size: 16px; }
  .bottomnav .plus { width: 38px; height: 38px; font-size: 21px; }
  .account .who { min-width: 0; flex: 1 1 auto; }
}

/* ============================================================
   Sign in, account and demo mode
   ============================================================ */

.account { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-left: auto; }
.account .who { opacity: .85; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account .who b { color: var(--gold); }
.chip-button {
  background: transparent; color: var(--on-navy); border: 1px solid rgba(243,234,209,.4);
  border-radius: 999px; padding: 5px 12px; font-size: 12px;
}
.chip-button:hover { border-color: var(--gold); color: var(--gold); }
.demo-pill { background: var(--gold); color: var(--gold-ink); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 11.5px; }

.auth-view { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 32px 16px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 22px; box-shadow: 0 18px 40px -26px rgba(12,18,32,.45); display: flex; flex-direction: column; gap: 12px;
}
.auth-card h1 { font-size: 26px; margin: 4px 0 2px; }
.auth-brand { font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: .04em; color: var(--gold); text-align: center; }
.auth-tag { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: -8px; }
.auth-card .cta { margin-top: 4px; }
.auth-card .meta { font-size: 12.5px; color: var(--muted); margin: 0; }
.auth-switch { text-align: center; font-size: 13px; margin: 4px 0 0; }
.linkish.strong { color: var(--navy); font-weight: 700; font-size: 13px; }
.auth-staff { border-top: 1px dashed var(--line); padding-top: 10px; }
.other-apps { text-align: center; }
.other-apps a { color: var(--navy); font-weight: 600; }

/* "NebedaHub Business": the app's own word next to the name */
.app-word {
  font-family: var(--sans); font-size: .42em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-ink); background: var(--gold); border-radius: 6px; padding: 3px 7px; vertical-align: .45em; margin-left: 2px;
}

/* An account that can't use this app: where to go instead */
.no-access { max-width: 560px; margin: 24px auto; }
.no-access h1 { font-size: 26px; }
.no-access-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.notice.no-shop { margin-bottom: 16px; font-size: 13.5px; }
.not-customer { display: flex; flex-direction: column; gap: 12px; text-align: center; padding-top: 40px; }
.not-customer .auth-brand { font-size: 34px; }
.not-customer .cta { margin-top: 12px; text-decoration: none; display: flex; align-items: center; justify-content: center; }

/* NebedaHub Admin */
a.stat-link { color: inherit; text-decoration: none; display: block; }
a.stat-link:hover { border-color: var(--gold); }
.hidden-contact-row { border-bottom: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 3px; }
.hidden-contact-row:last-child { border-bottom: none; }
.auth-demo { width: 100%; max-width: 420px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-demo p { margin: 0 0 8px; }
.auth-loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); margin: 10px 0; }
.auth-loading .gen-spin { border-color: rgba(201,162,74,.3); border-top-color: var(--gold); }

.awaiting { color: #8a4a12; font-weight: 600; }
.card.attention { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,162,74,.18); }

@media (max-width: 520px) {
  .account { width: 100%; justify-content: space-between; }
  .auth-view { padding: 16px 12px; }
  .auth-card { padding: 20px 16px; }
}

/* ============================================================
   Quotes and the order chat
   ============================================================ */

.stage-quote { background: #fff1cf; color: #6b5114; }

/* Unread badges */
.chat-badge, .tab-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #c0392b; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; font-family: var(--sans); vertical-align: middle;
}
.tab-badge { margin-left: 6px; }
.bottomnav .item { position: relative; }
.bottomnav .item .chat-badge { position: absolute; top: 0; right: 8px; font-size: 10px; min-width: 16px; height: 16px; }
.chat-open .chat-badge { margin-left: 6px; }
.selopt .chat-badge { margin-right: 4px; }

/* Customer: quote and "send to tailor" */
.quote-card { border: 1.5px solid var(--gold); border-radius: 14px; padding: 14px; background: #fffaf0; display: flex; flex-direction: column; gap: 8px; }
.quote-card > b { font-family: var(--serif); font-size: 19px; }
.quote-card.waiting { border-style: dashed; }
.quote-card .qtotal { margin-top: 2px; }
.notice.warn { background: #f7dcd6; color: var(--owed); border-color: #efc2b8; }
.send-next { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.send-next ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.pick-head .linkish { margin-left: auto; }

/* The chat, shared */
.chat-log { display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 85%; padding: 8px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; display: flex; flex-direction: column; gap: 4px; }
.chat-msg.theirs { align-self: flex-start; background: #f1ece0; border-bottom-left-radius: 4px; }
.chat-msg.mine { align-self: flex-end; background: var(--navy); color: var(--on-navy); border-bottom-right-radius: 4px; }
.chat-msg.system { align-self: center; max-width: 94%; background: #fffaf0; border: 1px dashed var(--gold); font-size: 12.5px; }
.chat-who { font-size: 11px; font-weight: 700; color: var(--muted); }
.chat-msg.system .chat-who { color: #8a6d1f; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-when { font-size: 10.5px; opacity: .6; align-self: flex-end; }
.chat-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 110px)); gap: 5px; }
.chat-photo, .biz button.chat-photo { padding: 0; border: none; border-radius: 9px; overflow: hidden; background: #fff; aspect-ratio: 1 / 1; cursor: zoom-in; display: block; width: 100%; }
.chat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px 8px; }
.chat-earlier { align-self: center; font-size: 12.5px; }

.chat-composer { display: flex; flex-direction: column; gap: 6px; }
.chat-compose-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-compose-row textarea {
  flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); border-radius: 18px; padding: 9px 13px;
  font-family: inherit; font-size: 14px; line-height: 1.35; max-height: 140px; background: #fff;
}
.chat-attach {
  position: relative; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 17px; cursor: pointer; background: #fff;
}
.chat-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chat-attach.is-full { opacity: .4; cursor: not-allowed; }
.chat-attach:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.chat-send, .biz button.chat-send {
  flex: 0 0 auto; height: 38px; border-radius: 19px; border: none; padding: 0 16px;
  background: var(--gold); color: var(--gold-ink); font-weight: 700;
}
.chat-pending-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-pending-row:empty { display: none; }
.chat-pending { position: relative; width: 56px; height: 56px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: var(--soft); }
.chat-pending img { width: 100%; height: 100%; object-fit: cover; }
.chat-pending button, .biz .chat-pending button {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: none;
  background: rgba(12,18,32,.75); color: #fff; font-size: 13px; line-height: 1;
}

/* Customer chat screen: messages scroll, the box to type in stays at the bottom */
.capp.is-chat .content { gap: 8px; background: #fcfaf5; }
.capp > .chat-composer { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--card); }
.chat-brief { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 12px; font-size: 13px; }
.chat-brief summary { cursor: pointer; font-weight: 600; }
.chat-brief[open] summary { margin-bottom: 8px; }
.chat-brief .insp { margin-bottom: 8px; }
.chat-measure { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.chat-measure b { color: var(--ink); }
.chat-quote-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fffaf0; border: 1px solid var(--gold); border-radius: 12px; padding: 8px 10px; font-size: 13px; }

/* Business: chat box and the quote page */
.chat-card h2 small { font-family: var(--sans); font-size: 12px; font-weight: 400; }
.chat-panel { display: flex; flex-direction: column; gap: 10px; }
.chat-log.chat-scroll { height: 440px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fcfaf5; }
.biz .chat-compose-row textarea { border-radius: 18px; }
.quote-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.quote-layout > .card, .quote-layout > .stack > .card { margin-bottom: 0; }
.quote-layout .chat-log.chat-scroll { height: 560px; }
.quote-form-card label { display: flex; flex-direction: column; gap: 4px; }
.quote-preview { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.quote-preview p { margin: 0; }
.quote-form-card .form-actions { margin-bottom: 10px; }
.quote-alert { display: inline-block; margin-bottom: 14px; background: #fff1cf; color: #6b5114; }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.style-note.small { font-size: 14px; padding: 8px 10px; margin: 10px 0; }
.style-brief .style-mini { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }

@media (max-width: 820px) {
  .quote-layout { grid-template-columns: minmax(0, 1fr); }
  .chat-log.chat-scroll, .quote-layout .chat-log.chat-scroll { height: 60vh; min-height: 320px; }
}
@media (max-width: 520px) {
  .chat-msg { max-width: 92%; }
  .biz-tabs .tab { padding: 11px 10px; }
}

/* ---------- Printing an invoice ---------- */

@media print {
  .appbar, .biz-tabs, .footer, .auth-view, .pick-bar, .bottomnav, .chat-composer, .c-topbar .back, .no-print, .toast { display: none !important; }
  body, .capp.is-hero { background: #fff; }
  .customer-view { padding: 0; }
  .capp { height: auto; box-shadow: none; border: none; max-width: 100%; }
  .content { overflow: visible; }
  .card { border: none; }
}

/* ============================================================
   Tailors near me, tailor pages, My profile, Tailors (admin)
   ============================================================ */

/* The tailor search and pages use the whole width on tablets and laptops */
.capp.is-wide { max-width: 980px; }
.capp.is-wide .content { padding-left: 24px; padding-right: 24px; }
@media (min-width: 900px) {
  .tailor-search { display: grid; grid-template-columns: 340px minmax(0, 1fr); align-items: start; column-gap: 24px; }
  .tailor-search > * { grid-column: 1; }
  .tailor-search > #tailor-results { grid-column: 2; grid-row: 1 / span 6; }
  .tailor-page { max-width: 760px; margin: 0 auto; width: 100%; }
}

.near-btn { font-size: 16px; padding: 15px; box-shadow: 0 8px 20px -10px rgba(201,162,74,.8); }
.locate-btn { margin-top: 0; min-height: 48px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.locate-btn .gen-spin { border-color: rgba(26,22,8,.25); border-top-color: var(--gold-ink); }
.card-lite { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--soft); display: flex; flex-direction: column; gap: 10px; }
details.card-lite { display: block; padding: 4px 12px; }
details.card-lite[open] { padding-bottom: 12px; }
details.card-lite > summary { list-style-position: inside; }
.search-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.card-lite > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.filters[open] > summary { margin-bottom: 4px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.filter-row .fl { font-size: 12px; }
.results-head { font-size: 19px; margin: 6px 0 8px; }
.osm-credit { font-size: 11px; color: var(--muted); margin: 8px 0 0; }
.osm-credit a { color: var(--muted); }
.no-results p { margin: 0 0 10px; }
.no-results .optbtns { justify-content: center; }

/* Large tap targets in the customer app */
.capp .optbtn, .capp .btn-outline, .capp .cta, .capp .btn, .capp .btn2 { min-height: 44px; }
.capp .field input, .capp .field select, .capp .field textarea { min-height: 44px; font-size: 16px; } /* 16px stops iPhones zooming in */
.bottomnav .item { min-height: 44px; justify-content: center; }

.tailor-list { display: flex; flex-direction: column; gap: 10px; }
.tailor-card {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; color: inherit; text-decoration: none; min-height: 72px;
}
.tailor-card:hover, .tailor-card:focus-visible { border-color: var(--gold); box-shadow: 0 6px 18px -12px rgba(12,18,32,.5); }
.tailor-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tailor-card-text b { font-size: 15px; }
.tailor-card .meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tailor-card-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.tailor-card .chev { font-size: 24px; color: var(--muted); }
.tailor-logo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.tailor-logo.big { width: 96px; height: 96px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #f1ead6; color: #5a4712; }
.muted-pill { background: #eee9dd; color: var(--muted); font-weight: 500; }

.tailor-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.tailor-name { font-size: 26px; line-height: 1.1; margin: 0 0 4px; }
.tailor-hero .meta { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tailor-about { margin: 0; line-height: 1.5; font-size: 14px; white-space: pre-line; }
.badges, .spec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.portfolio-item { position: relative; border: none; padding: 0; background: #f4efe2; border-radius: 10px; overflow: hidden; display: block; aspect-ratio: 1 / 1; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portfolio-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); text-align: left; }
.portfolio-item.busy { display: grid; place-items: center; }
.portfolio-grid.edit .portfolio-item button { position: absolute; top: 6px; right: 6px; }
.share-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; word-break: break-all; }
.join-steps { margin: 0; padding-left: 20px; line-height: 1.6; }

/* Account type choice (three) */
.optbtns.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.optbtns.three .optbtn { font-size: 12.5px; padding: 8px 6px; min-height: 48px; }
.find-tailors-link { max-width: 420px; background: #fff; }

/* Business: which tailor, profile form, admin list */
.biz-switch { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.biz-switch label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.biz-switch select { min-height: 40px; }
.profile-form fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.profile-form h2 { margin-top: 18px; }
.spec-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 4px 8px; }
.spec-picker .check, .profile-form .check { flex-direction: row; align-items: center; color: var(--ink); min-height: 40px; }
.seller-profile .check, .dispatch-form .check { flex-direction: row; align-items: flex-start; color: var(--ink); }
.seller-profile .check input, .dispatch-form .check input { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.location-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tailor-admin-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tailor-admin-row .grow { flex: 1 1 260px; min-width: 0; }

@media (max-width: 520px) {
  .form-pair { grid-template-columns: minmax(0, 1fr); }
  .tailor-hero { grid-template-columns: 72px minmax(0, 1fr); }
  .tailor-logo.big { width: 72px; height: 72px; }
  .tailor-name { font-size: 22px; }
  .capp.is-wide .content { padding-left: 16px; padding-right: 16px; }
  .biz-tabs { -webkit-overflow-scrolling: touch; }
  .biz-tabs .tab { padding-top: 12px; padding-bottom: 12px; }
  .optbtns.three { grid-template-columns: minmax(0, 1fr); }
}
.form-pair > * { min-width: 0; }
.form-pair input, .search-form select { width: 100%; }
.biz-switch label { white-space: nowrap; }
.biz-switch select { max-width: 100%; white-space: normal; }
.portfolio-grid.edit .portfolio-item button { background: #fff; color: var(--owed); border: 1px solid #efc2b8; }
.profile-form .form-grid .check { align-self: end; }

/* ---- Keeping orders on NebedaHub (no-leakage.js) ---- */
.chat-hidden-note { font-size: 11.5px; line-height: 1.35; padding: 5px 7px; border-radius: 8px; background: rgba(201, 162, 74, 0.18); }
.chat-msg.mine .chat-hidden-note { background: rgba(243, 234, 209, 0.14); }
.chat-original { font-size: 11.5px; opacity: 0.85; }
.chat-original summary { cursor: pointer; }
.chat-leak-hint { margin: 6px 0 0; font-size: 12px; color: #8a6d1f; }
.protect-line { margin: 10px 0; padding: 8px 11px; border-radius: 10px; background: #eef5ef; border: 1px solid #cfe3d3; color: var(--paid); font-size: 13px; line-height: 1.4; }
.handover { margin: 12px 0; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--gold); display: flex; flex-direction: column; gap: 8px; }
.handover.locked { background: var(--soft); border: 1px dashed var(--line); }
.handover .mrow { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.handover .mrow span:last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.handover .inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.handover .inline-form input { flex: 1 1 180px; min-width: 0; }
.handover .meta, .handover p { margin: 0; }
.card > .handover { margin: 0; border: 0; padding: 0; }
.terms-box { font-size: 12.5px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.terms-box summary { cursor: pointer; font-weight: 600; }
.terms-box ol { margin: 8px 0 2px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.terms-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.35; }
.terms-check input { margin-top: 2px; flex: none; }
.handover .inline-form input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }

/* ---- Worldwide: currencies, approximate prices, phone numbers ---- */
/* "≈ £125" after a price in another currency: clearly an estimate */
.approx { display: inline-block; margin-left: 4px; font-size: 0.85em; font-weight: 500; color: var(--muted); font-style: italic; white-space: nowrap; }
.approx-note { font-size: 11px; color: var(--muted); font-style: italic; margin: 6px 0; line-height: 1.4; }
.chip-sub .approx { display: block; margin: 0; }
.mprice .approx { display: block; margin: 1px 0 0; font-size: 11px; }
/* Totals in more than one currency sit side by side, never added up */
.multi-currency { display: inline-flex; flex-wrap: wrap; gap: 2px 10px; }
.stat .multi-currency { font-size: 0.8em; }
.fx-line { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin: 6px 0; }
/* A price with its currency symbol in front of the box */
.price-in { display: inline-flex; align-items: center; gap: 4px; }
.price-in .cur { color: var(--muted); font-weight: 600; min-width: 1.2em; text-align: right; }
/* Phone: country code picker + number, on one line even on a phone */
.phone-field { display: flex; gap: 6px; width: 100%; min-width: 0; }
.phone-field select { flex: 0 0 auto; width: 9em; max-width: 46%; text-overflow: ellipsis; }
.phone-field input { flex: 1 1 auto; min-width: 0; width: 100%; }
.unit-toggle .optbtns { flex-wrap: nowrap; }
.settings-form { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }

/* "Try the demo" on the Sellers welcome page: big and near the top, easy to tap on a phone */
.demo-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-color: var(--gold); background: #fffaf0; }
.demo-card > div { flex: 1 1 260px; min-width: 0; }
.demo-card h2 { margin-bottom: 4px; }
.demo-card p { margin: 0; }
.biz button.demo-button { font-size: 16px; padding: 13px 26px; border-radius: 10px; min-height: 48px; }
@media (max-width: 520px) { .biz button.demo-button { width: 100%; } }
