/* ============================================================
   Duqit product suite — styles for the new self-serve tools.
   Phase 3: QR Menu (builder /menu + dashboard, public /m/{token}).
   Uses the site's tokens where the page has them; the PUBLIC menu
   pages are standalone documents, so their themes are self-contained.
   ============================================================ */

/* ---------------- Menu builder (reuses .invite-form visual language) ------- */
.menu-editor-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; max-width: var(--maxw, 1180px); margin: 0 auto; padding: 0 24px; }
@media (max-width: 980px) { .menu-editor-wrap { grid-template-columns: 1fr; } }

.mtheme-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.mtheme-choice {
  padding: 9px 14px; border-radius: var(--radius-sm, 8px); border: 2px solid var(--border-color, #ccc);
  cursor: pointer; font-size: .85rem; font-weight: 600; background: var(--surface-color, #fff); color: var(--text-primary, #222);
}
.mtheme-choice, .ctheme-choice { min-height: 40px; }
.mtheme-choice.selected { border-color: var(--accent-primary, #b08d1f); }
.mtheme-swatch-classic { background: linear-gradient(135deg, #fffdf7 60%, #f3e7c6); color: #4a3f28; }
.mtheme-swatch-bistro  { background: linear-gradient(135deg, #23201c 60%, #3a332a); color: #e8ddc8; }
.mtheme-swatch-fresh   { background: linear-gradient(135deg, #f6faf4 60%, #dcebdd); color: #33463a; }
/* theme swatches: even thirds instead of ragged wrapping on a phone */
@media (max-width: 560px) {
  .mtheme-picker, .ctheme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .mtheme-choice, .ctheme-choice { padding: 10px 6px; font-size: .8rem; text-align: center; min-height: 44px; }
}

.mi-row {
  display: grid; grid-template-columns: minmax(0, 2fr) 90px minmax(0, 1.4fr) minmax(0, 2fr) auto;
  gap: 8px; margin-bottom: 10px; align-items: center;
}
/* Narrow screens: name+price+actions on the first line, category and
   description each on their own. Every child is placed explicitly — auto
   placement left the actions column 0px wide and pushed the remove button
   into an implicit row. */
@media (max-width: 720px) {
  .mi-row {
    grid-template-columns: 96px minmax(0, 1fr) auto;
    /* dish name gets the whole first line — it's the longest value typed */
    grid-template-areas: "name name actions" "price cat cat" "desc desc desc";
    row-gap: 6px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px dashed var(--border-color, #ddd);
  }
  .mi-row .mi-name    { grid-area: name; }
  .mi-row .mi-price   { grid-area: price; }
  .mi-row .mi-cat     { grid-area: cat; }
  .mi-row .mi-desc    { grid-area: desc; }
  .mi-row .mi-actions { grid-area: actions; justify-content: flex-end; }
  /* comfortable tap target on touch screens */
  .mi-row .mi-remove { font-size: 1.5rem; padding: 8px 10px; min-width: 40px; min-height: 40px; }
}
/* Container queries do the real work: the editor column is only ~430-710px wide
   even on a big screen, so these reflow when the FORM gets narrow regardless of
   viewport. The viewport media queries below stay as a fallback. */
@container (max-width: 700px) {
  /* The checkbox+label+× cluster gets its own full-width row. Sharing a sized
     track with the name field kept under-measuring it by ~8px, which clipped the
     cluster and slid "Available" on top of the remove button. */
  .mi-row {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: "name name" "price cat" "desc desc" "actions actions";
    row-gap: 6px; padding-bottom: 12px; margin-bottom: 14px;
    border-bottom: 1px dashed var(--border-color, #ddd);
  }
  .mi-row .mi-name { grid-area: name; }
  .mi-row .mi-price { grid-area: price; }
  .mi-row .mi-cat { grid-area: cat; }
  .mi-row .mi-desc { grid-area: desc; }
  .mi-row .mi-actions { grid-area: actions; justify-content: space-between; flex-wrap: wrap; width: 100%; }
  .mi-row .mi-remove { font-size: 1.5rem; padding: 8px 10px; min-width: 40px; min-height: 40px; }
}
@container (max-width: 430px) {
  .mi-row {
    display: block; grid-template-areas: none;
    padding: 14px; margin-bottom: 12px;
    border: 1px solid var(--border-color, #ddd); border-radius: var(--radius-sm, 8px);
    background: var(--bg-elevated, #fff);
  }
  .invite-form .mi-row input:not([type="checkbox"]):not([type="radio"]),
  .invite-form .mi-row select { width: 100%; margin-bottom: 8px; min-height: 44px; }
  .mi-row .mi-actions {
    justify-content: space-between; width: 100%; margin-top: 4px; padding-top: 10px;
    border-top: 1px dashed var(--border-color, #ddd);
  }
  .mi-avail { white-space: normal; font-size: .85rem; }
  .mi-row .mi-remove { min-width: 44px; min-height: 44px; }
}
/* Phones: the "actions" track is content-sized, and the nowrap "Available"
   label made it 148px wide — which squeezed the flexible track down to 13px
   and clipped the dish/price/category inputs. Stack every field instead. */
@media (max-width: 560px) {
  .mi-row {
    display: block;
    grid-template-areas: none;
    padding: 14px; margin-bottom: 12px;
    border: 1px solid var(--border-color, #ddd); border-bottom: 1px solid var(--border-color, #ddd);
    border-radius: var(--radius-sm, 8px);
    background: var(--bg-elevated, #fff);
  }
  .invite-form .mi-row input:not([type="checkbox"]):not([type="radio"]),
  .invite-form .mi-row select { width: 100%; margin-bottom: 8px; min-height: 44px; }
  .mi-row .mi-actions {
    justify-content: space-between; width: 100%; margin-top: 4px; padding-top: 10px;
    border-top: 1px dashed var(--border-color, #ddd);
  }
  .mi-avail { white-space: normal; font-size: .85rem; }
  .mi-row .mi-remove { min-width: 44px; min-height: 44px; }
}
/* invites.css gives .invite-form inputs a 14px bottom margin (good for stacked
   fields, wrong inside a grid row) — win regardless of stylesheet order. */
.invite-form .mi-row input { width: 100%; margin-bottom: 0; }
.mi-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
/* `.invite-form label` (uppercase, 1px letter-spacing, block, margin-bottom) outranks
   a single class, so this inline control label rendered as a 93px "AVAILABLE" that
   clipped its own box and squeezed the row's inputs down to ~46px. Opt out of all of it. */
.invite-form .mi-avail, .mi-avail {
  display: flex; align-items: center; gap: 5px; flex: 0 0 auto; min-width: max-content;
  font-size: .78rem; font-weight: 500; color: var(--text-secondary, #666);
  text-transform: none; letter-spacing: 0; margin-bottom: 0; white-space: nowrap;
}
.mi-avail input[type="checkbox"] { flex: 0 0 auto; }
.mi-remove {
  border: 0; background: none; color: var(--text-muted, #999); font-size: 1.25rem;
  line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.mi-remove:hover { color: var(--danger, #c0392b); background: var(--danger-soft, #fbeaea); }

/* Phone-frame live preview */
.menu-phone-shell {
  border: 10px solid #1d1d22; border-radius: 34px; overflow: hidden;
  box-shadow: var(--shadow-lg, 0 18px 40px rgba(0,0,0,.25));
  max-width: 340px; margin: 0 auto;
}
.menu-phone { height: 560px; overflow-y: auto; padding: 26px 20px 20px; }
/* 340px + 2×10px border = 360px, wider than the ~347px content box on a 375px
   phone. Thin the frame and let the preview shrink with the screen. */
@media (max-width: 480px) {
  .menu-phone-shell, .card-phone-shell { max-width: 100%; border-width: 6px; border-radius: 26px; }
  .menu-phone, .card-phone { height: 460px; padding: 20px 14px 14px; }
}

/* ---------------- Public menu page + preview themes ---------------- */
.mv-body { margin: 0; font-family: Georgia, 'Times New Roman', serif; min-height: 100vh; }
.mv-page { max-width: 560px; margin: 0 auto; padding: 34px 22px 26px; min-height: 100vh; display: flex; flex-direction: column; }
.mv-logo { width: 76px; height: 76px; object-fit: cover; border-radius: 16px; display: block; margin: 0 auto 12px; }
.menu-phone .mv-logo { width: 56px; height: 56px; }
.mv-name { text-align: center; font-size: 1.7rem; font-weight: 700; letter-spacing: .5px; }
.menu-phone .mv-name { font-size: 1.25rem; }
.mv-tagline { text-align: center; font-style: italic; opacity: .75; margin-top: 4px; font-size: .95rem; }
.mv-rule { width: 90px; height: 2px; margin: 16px auto 6px; opacity: .6; }
.mv-cat { margin: 22px 0 8px; font-size: .82rem; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 700; opacity: .85; }
.mv-item { margin-bottom: 12px; }
.mv-item-line { display: flex; align-items: baseline; gap: 8px; }
.mv-item-name { font-size: 1.02rem; }
.menu-phone .mv-item-name { font-size: .92rem; }
.mv-dots { flex: 1; border-bottom: 2px dotted currentColor; opacity: .3; transform: translateY(-4px); }
.mv-price { white-space: nowrap; font-weight: 700; font-size: .98rem; }
.menu-phone .mv-price { font-size: .88rem; }
.mv-item-desc { font-size: .85rem; opacity: .7; margin-top: 2px; max-width: 46ch; }
.mv-off { opacity: .38; }
.mv-empty { text-align: center; opacity: .7; margin: 40px 0; }
.mv-foot { margin-top: auto; padding-top: 34px; text-align: center; font-size: .8rem; opacity: .75; }
.mv-foot a { color: inherit; }
.mv-notfound { max-width: 480px; margin: 18vh auto 0; text-align: center; padding: 0 22px; }
.mv-notfound a { color: inherit; font-weight: 700; }

/* Themes — background + ink + accent per theme (page and phone preview) */
.mtheme-classic { background: linear-gradient(180deg, #fffdf7, #f6eed7); color: #4a3f28; }
.mtheme-classic .mv-rule { background: #b08d1f; }
.mtheme-classic .mv-cat, .mtheme-classic .mv-price { color: #8f6f14; }

.mtheme-bistro { background: linear-gradient(180deg, #221f1a, #2e2922); color: #ece2cd; }
.mtheme-bistro .mv-rule { background: #c9a55a; }
.mtheme-bistro .mv-cat, .mtheme-bistro .mv-price { color: #d9b76d; }

.mtheme-fresh { background: linear-gradient(180deg, #f7fbf5, #e2efe2); color: #2f4236; }
.mtheme-fresh .mv-rule { background: #5e8767; }
.mtheme-fresh .mv-cat, .mtheme-fresh .mv-price { color: #477052; }

/* ============================================================
   Digital business card — builder (/card, dashboard) + public /c/{token}
   ============================================================ */
.card-editor-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; max-width: var(--maxw, 1180px); margin: 0 auto; padding: 0 24px; }
@media (max-width: 980px) { .card-editor-wrap { grid-template-columns: 1fr; } }

.ctheme-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.ctheme-choice {
  padding: 9px 14px; border-radius: var(--radius-sm, 8px); border: 2px solid var(--border-color, #ccc);
  cursor: pointer; font-size: .85rem; font-weight: 600;
}
.ctheme-choice.selected { border-color: var(--accent-primary, #b08d1f); }
.ctheme-swatch-midnight { background: linear-gradient(135deg, #141a2b 60%, #1e2740); color: #e7e9f2; }
.ctheme-swatch-ivory    { background: linear-gradient(135deg, #fffdf9 60%, #f2ebdd); color: #3b3428; }
.ctheme-swatch-teal     { background: linear-gradient(135deg, #0f2f2f 60%, #154442); color: #dff6ef; }

.card-phone-shell {
  border: 10px solid #1d1d22; border-radius: 34px; overflow: hidden;
  box-shadow: var(--shadow-lg, 0 18px 40px rgba(0,0,0,.25));
  max-width: 340px; margin: 0 auto;
}
.card-phone { height: 560px; overflow-y: auto; }

/* ---- public card page (shared markup with the preview) ---- */
.cv-body { margin: 0; font-family: var(--font-main, system-ui, -apple-system, 'Segoe UI', sans-serif); min-height: 100vh; }
.cv-page, .card-phone { padding: 34px 24px 26px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cv-page { max-width: 460px; margin: 0 auto; min-height: 100vh; }
.cv-top { display: flex; flex-direction: column; align-items: center; }
.cv-photo {
  width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
  border: 3px solid currentColor; margin-bottom: 16px;
}
.card-phone .cv-photo { width: 84px; height: 84px; margin-bottom: 12px; }
.cv-initials {
  display: flex; align-items: center; justify-content: center;
  font-size: 2.1rem; font-weight: 700; letter-spacing: 1px; opacity: .9;
}
.card-phone .cv-initials { font-size: 1.6rem; }
.cv-name { font-size: 1.65rem; font-weight: 700; line-height: 1.2; }
.card-phone .cv-name { font-size: 1.25rem; }
.cv-role { font-size: 1rem; opacity: .85; margin-top: 6px; }
.card-phone .cv-role { font-size: .88rem; }
.cv-tagline { font-size: .92rem; opacity: .7; margin-top: 10px; max-width: 30ch; font-style: italic; }
.card-phone .cv-tagline { font-size: .82rem; }

.cv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin: 26px 0 0; }
.card-phone .cv-actions { margin-top: 18px; gap: 8px; }
.cv-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 10px; border-radius: 12px; text-decoration: none;
  font-size: .92rem; font-weight: 600; color: inherit;
  border: 1px solid currentColor; background: rgba(255,255,255,.06);
}
.card-phone .cv-btn { padding: 10px 8px; font-size: .82rem; }
.cv-btn:hover { background: rgba(255,255,255,.14); }
.cv-btn span { font-size: 1.05rem; }
.cv-btn-wa { border-color: #25D366; color: #25D366; }
.cv-address { margin-top: 18px; font-size: .88rem; opacity: .72; max-width: 32ch; }
.cv-save { margin-top: 22px; font-size: .9rem; font-weight: 700; letter-spacing: .5px; opacity: .85; }
.cv-save-link { text-decoration: none; color: inherit; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.cv-qr { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cv-qr img { border-radius: 10px; background: #fff; padding: 8px; width: 150px; height: 150px; }
.cv-qr span { font-size: .78rem; opacity: .65; }
.cv-foot { margin-top: auto; padding-top: 32px; font-size: .8rem; opacity: .7; }
.cv-foot a { color: inherit; }
.cv-notfound { max-width: 460px; margin: 18vh auto 0; text-align: center; padding: 0 22px; }
.cv-notfound a { color: inherit; font-weight: 700; }

/* card themes (page + phone preview) */
.ctheme-midnight { background: linear-gradient(180deg, #141a2b, #1e2740); color: #eef1f8; }
.ctheme-midnight .cv-name { color: #fff; }
.ctheme-midnight .cv-photo, .ctheme-midnight .cv-btn { border-color: rgba(217,183,109,.65); }
.ctheme-midnight .cv-initials { background: rgba(217,183,109,.14); color: #d9b76d; }
.ctheme-midnight .cv-btn-wa { border-color: #25D366; color: #4ce286; }

.ctheme-ivory { background: linear-gradient(180deg, #fffdf9, #f2ebdd); color: #3b3428; }
.ctheme-ivory .cv-photo, .ctheme-ivory .cv-btn { border-color: rgba(176,141,31,.55); }
.ctheme-ivory .cv-btn { background: rgba(176,141,31,.07); }
.ctheme-ivory .cv-btn:hover { background: rgba(176,141,31,.16); }
.ctheme-ivory .cv-initials { background: rgba(176,141,31,.12); color: #8f6f14; }
.ctheme-ivory .cv-btn-wa { border-color: #1da851; color: #167a3c; }

.ctheme-teal { background: linear-gradient(180deg, #0f2f2f, #154442); color: #e6f7f2; }
.ctheme-teal .cv-photo, .ctheme-teal .cv-btn { border-color: rgba(87,201,173,.6); }
.ctheme-teal .cv-initials { background: rgba(87,201,173,.16); color: #57c9ad; }
.ctheme-teal .cv-btn-wa { border-color: #25D366; color: #4ce286; }

@media (max-width: 420px) { .cv-actions { grid-template-columns: 1fr; } }

/* ============================================================
   Apps & Billing (/dashboard/apps) — per-product subscription tiles
   ============================================================ */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
@media (max-width: 560px) {
  .apps-grid { grid-template-columns: 1fr; gap: 12px; }
  .app-tile { padding: 16px; }
  .app-state .btn { flex: 1 1 100%; justify-content: center; }
}
.app-tile {
  background: var(--surface-color); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.app-need { border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-soft); }
.app-tile-head { display: flex; gap: 12px; align-items: center; }
.app-tile-head h3 { margin: 0; font-size: 1.05rem; }
.app-price { font-size: .82rem; color: var(--text-secondary); margin-top: 2px; }
.app-tag { margin: 0; font-size: .88rem; color: var(--text-secondary); flex: 1; }
.app-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
}
.app-badge-on { background: var(--success-soft, #e5f7ec); color: var(--success, #1e8e4e); }
.app-badge-off { background: var(--danger-soft, #fbeaea); color: var(--danger, #c0392b); }

/* price line on suite-grid tiles */
.product-price-line { font-size: .78rem; color: var(--accent-primary); font-weight: 600; margin: -2px 0 8px; }
.price-trial { font-size: .85rem; color: var(--success, #1e8e4e); font-weight: 600; margin: 6px 0 16px; }

/* ============================================================
   Event photo album — public /a/{token} + dashboard moderation
   ============================================================ */
.av-body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; background: #16141a; color: #f0edf3; min-height: 100vh; }
.av-page { max-width: 1080px; margin: 0 auto; padding: 34px 18px 26px; min-height: 100vh; display: flex; flex-direction: column; }
.av-head { text-align: center; margin-bottom: 24px; }
.av-emoji { font-size: 2rem; }
.av-title { font-size: 1.7rem; margin: 8px 0 4px; font-family: Georgia, serif; }
.av-date { opacity: .65; font-size: .95rem; }

.av-upload { background: rgba(255,255,255,.06); border: 1px dashed rgba(255,255,255,.25); border-radius: 16px; padding: 20px; text-align: center; margin-bottom: 26px; }
.av-upload-lead { margin: 0 0 14px; font-size: 1rem; }
.av-upload-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.av-upload-row input[type=text] {
  padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25); color: #fff; min-width: 220px; font-size: .95rem;
}
.av-pick-btn { cursor: pointer; }
.av-progress { margin-top: 12px; font-size: .9rem; color: #ffd166; }
.av-privacy { margin: 12px 0 0; font-size: .78rem; opacity: .55; }
.av-closed { text-align: center; opacity: .7; margin-bottom: 24px; }

.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.av-cell { margin: 0; position: relative; border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: rgba(255,255,255,.05); }
.av-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-cell figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px;
  font-size: .72rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.av-empty { text-align: center; opacity: .6; margin: 40px 0; }
.av-foot { margin-top: auto; padding-top: 34px; text-align: center; font-size: .8rem; opacity: .7; }
.av-foot a { color: inherit; }

.av-lightbox {
  position: fixed; inset: 0; z-index: 1300; background: rgba(10,8,12,.94);
  display: flex; align-items: center; justify-content: center;
}
.av-lightbox[hidden] { display: none; }
.av-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; }
.av-lb-close { position: absolute; top: 14px; right: 18px; font-size: 2rem; background: none; border: 0; color: #fff; cursor: pointer; }
.av-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2.6rem; background: rgba(255,255,255,.1); border: 0; color: #fff;
  cursor: pointer; width: 52px; height: 52px; border-radius: 50%; line-height: 1;
}
.av-lb-prev { left: 14px; } .av-lb-next { right: 14px; }
.av-lb-caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #ddd; font-size: .85rem; }

/* dashboard moderation grid: light theme + delete buttons */
.av-grid-admin { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.av-grid-admin .av-cell { cursor: default; background: var(--surface-color); border: 1px solid var(--border-color); }
.av-grid-admin figcaption { font-size: .7rem; }
.av-del {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.av-del:hover { background: var(--danger, #c0392b); }
@media (max-width: 560px) {
  .av-grid-admin { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
  .av-del { width: 40px; height: 40px; font-size: 1.25rem; }  /* thumb-sized */
}

/* ============================================================
   Appointment booking — public /b/{token} + owner editor bits
   ============================================================ */
.bv-body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; background: linear-gradient(180deg, #f8f7fb, #ece9f2); color: #2c2837; min-height: 100vh; }
.bv-page { max-width: 640px; margin: 0 auto; padding: 34px 20px 26px; min-height: 100vh; display: flex; flex-direction: column; }
.bv-head { text-align: center; margin-bottom: 26px; }
.bv-emoji { font-size: 2rem; }
.bv-title { font-size: 1.7rem; margin: 8px 0 4px; font-family: Georgia, serif; }
.bv-blurb { opacity: .7; margin: 0; }
.bv-step { margin-bottom: 26px; }
.bv-step h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.bv-services { display: grid; gap: 10px; }
.bv-service {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 12px; border: 2px solid #d9d4e3;
  background: #fff; cursor: pointer; font-size: .95rem; text-align: left;
}
.bv-service.selected { border-color: #6a4fb3; box-shadow: 0 0 0 3px rgba(106,79,179,.15); }
.bv-svc-name { font-weight: 600; }
.bv-svc-meta { color: #7a7389; font-size: .85rem; white-space: nowrap; }
.bv-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.bv-day {
  padding: 9px 14px; border-radius: 999px; border: 2px solid #d9d4e3;
  background: #fff; cursor: pointer; font-size: .85rem; white-space: nowrap; font-weight: 600;
}
.bv-day.selected { border-color: #6a4fb3; background: #6a4fb3; color: #fff; }
.bv-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 10px; }
.bv-slot {
  padding: 10px 6px; border-radius: 10px; border: 2px solid #d9d4e3;
  background: #fff; cursor: pointer; font-size: .88rem; font-weight: 600;
}
.bv-slot[disabled] { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.bv-slot.selected { border-color: #6a4fb3; background: #6a4fb3; color: #fff; }
.bv-summary { background: #fff; border: 1px dashed #b8aed1; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; font-weight: 600; }
.bv-form { display: flex; flex-direction: column; gap: 10px; }
.bv-form input {
  padding: 13px 14px; border-radius: 10px; border: 1px solid #cfc9dd;
  font-size: .95rem; background: #fff;
}
.bv-error { color: #c0392b; background: #fbeaea; border: 1px solid #c0392b; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: .9rem; }
.bv-done { text-align: center; padding: 30px 0; }
.bv-done-emoji { font-size: 2.6rem; }
.bv-note { text-align: center; opacity: .65; font-size: .88rem; }
.bv-foot { margin-top: auto; padding-top: 34px; text-align: center; font-size: .8rem; opacity: .7; }
.bv-foot a { color: inherit; }

/* owner editor: services + hours rows */
.bk-svc-row { grid-template-columns: minmax(0, 2fr) 110px 110px auto; }
.bk-hours-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.bk-day-toggle { display: flex; align-items: center; gap: 6px; min-width: 130px; font-size: .9rem; }
.bk-hours-row input[type=time] { padding: 8px 10px; border: 1px solid var(--border-color, #ccc); border-radius: 6px; background: var(--bg-color, #fff); color: var(--text-primary, #222); margin-bottom: 0; }
/* .bk-svc-row also carries .mi-row, so it inherits that row's grid-template-areas
   at ≤720px — its children have none of those area names, so placement went
   auto and unpredictable. Reset the areas whenever we retemplate the columns. */
@media (max-width: 720px) {
  .bk-svc-row { grid-template-columns: 1fr 90px auto; grid-template-areas: none; }
  .bk-svc-row .sv-dur { grid-column: 1 / 2; }
}
/* Phones: one day row was 224px tall (a 130px toggle plus two full-width time
   inputs wrapping) × 7 days. Give the day its own line, then the two times
   side by side at a real tap height. */
@media (max-width: 560px) {
  .bk-svc-row { display: block; }
  .bk-svc-row .sv-dur { grid-column: auto; }
  .bk-hours-row {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
    padding: 12px; margin-bottom: 10px;
    border: 1px solid var(--border-color, #ddd); border-radius: var(--radius-sm, 8px);
    background: var(--bg-elevated, #fff);
  }
  .bk-day-toggle { grid-column: 1 / -1; min-width: 0; width: 100%; font-size: .95rem; font-weight: 600; }
  .bk-hours-row input[type=time] { width: 100%; min-height: 44px; font-size: 16px; }
}
/* Very narrow phones: a native time control won't shrink past ~110px, so two of
   them side by side overflow. Stack them; the dash separator stops earning its space. */
@media (max-width: 380px) {
  .bk-hours-row { grid-template-columns: 1fr; }
  .bk-hours-row > span { display: none; }
}


/* ============================================================
   Mini-Store — public shop /s/{token} + owner editor extras
   ============================================================ */
.sv-body { margin: 0; background: var(--sv-bg, #f7f5f1); color: var(--sv-ink, #23201c); font-family: var(--font-main); }
.sv-body.sv-locked { overflow: hidden; }
.sv-page { max-width: 900px; margin: 0 auto; padding: 26px 16px 120px; }

.sv-head { text-align: center; margin-bottom: 22px; }
.sv-logo { border-radius: 16px; object-fit: cover; margin-bottom: 10px; }
.sv-head h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0 0 6px; }
.sv-tag { margin: 0; opacity: .82; font-size: .95rem; }

.sv-cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; -webkit-overflow-scrolling: touch; }
.sv-cat {
  flex: 0 0 auto; border: 1px solid var(--sv-line, rgba(0,0,0,.12)); background: transparent;
  color: inherit; border-radius: 999px; padding: 8px 16px; font-size: .86rem; cursor: pointer; min-height: 38px;
}
.sv-cat.is-on { background: var(--sv-accent, #8f6708); border-color: transparent; color: var(--sv-on-accent, #fff); font-weight: 600; }

.sv-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px;
           grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sv-item { background: var(--sv-card, #fff); border: 1px solid var(--sv-line, rgba(0,0,0,.10));
           border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.sv-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.sv-item-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sv-item-body h3 { margin: 0; font-size: 1rem; }
.sv-desc { margin: 0; font-size: .84rem; opacity: .8; line-height: 1.45; }
.sv-item-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sv-price { font-weight: 700; color: var(--sv-accent, #8f6708); }
.sv-add { border: 0; background: var(--sv-accent, #8f6708); color: var(--sv-on-accent, #fff); font-weight: 600;
          border-radius: 999px; padding: 10px 18px; cursor: pointer; min-height: 40px; font-size: .86rem; }
/* Don't wash out the whole tile: dimming text is what made the price
   unreadable (1.8:1). The photo carries the visual cue, the badge the meaning. */
.sv-out .sv-photo { opacity: .45; filter: grayscale(1); }
.sv-out .sv-item-body { opacity: 1; }   /* text stays full-contrast; the badge says sold out */
.sv-badge { font-size: .76rem; border: 1px solid var(--sv-line, rgba(0,0,0,.15)); border-radius: 999px; padding: 5px 10px; }
.sv-foot { margin-top: 34px; text-align: center; font-size: .84rem; opacity: .82; }
.sv-foot a { color: inherit; }

/* floating cart button + sheet */
.sv-cart-btn {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 40;
  border: 0; background: var(--sv-accent, #8f6708); color: var(--sv-on-accent, #fff); font-weight: 700;
  border-radius: 999px; padding: 15px 26px; font-size: .95rem; cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.28); display: inline-flex; align-items: center; gap: 10px;
}
.sv-count { background: rgba(255,255,255,.25); border-radius: 999px; padding: 2px 10px; }
.sv-sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5);
            display: flex; align-items: flex-end; justify-content: center; }
.sv-sheet-inner {
  background: var(--sv-card, #fff); color: inherit; width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
}
.sv-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sv-sheet-head h2 { margin: 0; font-size: 1.1rem; }
.sv-close { border: 0; background: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: inherit;
            min-width: 44px; min-height: 44px; }
.sv-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
           padding: 10px 0; border-bottom: 1px solid var(--sv-line, rgba(0,0,0,.08)); }
.sv-line-name { font-size: .92rem; }
.sv-line-amt { font-weight: 600; min-width: 74px; text-align: right; }
.sv-qty { display: inline-flex; align-items: center; gap: 8px; }
.sv-qty-btn { border: 1px solid var(--sv-line, rgba(0,0,0,.15)); background: transparent; color: inherit;
              width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.sv-empty { opacity: .78; font-size: .9rem; padding: 12px 0; }
.sv-total-row { display: flex; justify-content: space-between; align-items: center;
                padding: 12px 0; font-size: 1.05rem; }
.sv-note { font-size: .84rem; opacity: .82; background: var(--sv-bg, #f7f5f1); padding: 10px 12px; border-radius: 10px; }
.sv-fields { display: grid; gap: 10px; margin: 12px 0; }
.sv-fields input, .sv-fields textarea {
  width: 100%; box-sizing: border-box;           /* padding+border must sit INSIDE the 100% */
  padding: 13px; font-size: 16px;                /* 16px stops iOS zoom-on-focus */
  border: 1px solid var(--sv-line, rgba(0,0,0,.16)); border-radius: 10px;
  background: var(--sv-bg, #fff); color: inherit; font-family: inherit; min-height: 46px;
}
.sv-err { color: #c0392b; font-size: .88rem; margin: 4px 0; }
.sv-send { width: 100%; border: 0; background: #25D366; color: #062e14; font-weight: 700;
           border-radius: 12px; padding: 16px; font-size: 1rem; cursor: pointer; min-height: 52px; }
.sv-done { text-align: center; padding: 22px 0; }
.sv-done-emoji { font-size: 2.4rem; }
.sv-done h3 { margin: 8px 0 6px; }
.sv-done p { margin: 0; opacity: .75; font-size: .92rem; }

/* shop themes */
/* Accents darkened so they clear 4.5:1 BOTH as text on the card and as a button
   background under --sv-on-accent. #b8860b / #2e9e5b only managed ~3.3:1, which
   left prices and the Add button hard to read. */
.stheme-classic { --sv-bg: #f7f5f1; --sv-card: #ffffff; --sv-ink: #23201c; --sv-accent: #8f6708; --sv-on-accent: #ffffff; --sv-line: rgba(0,0,0,.10); }
.stheme-bold    { --sv-bg: #14151a; --sv-card: #1e2028; --sv-ink: #f2f2f4; --sv-accent: #ff6b3d; --sv-on-accent: #2a1206; --sv-line: rgba(255,255,255,.14); }
.stheme-fresh   { --sv-bg: #f2f8f3; --sv-card: #ffffff; --sv-ink: #1f3326; --sv-accent: #227544; --sv-on-accent: #ffffff; --sv-line: rgba(0,0,0,.10); }

/* owner editor: the photo row under each product */
/* .mi-row is a grid; without an explicit span this row was auto-placed into the
   90px price column and the file input clipped inside it. */
.sp-photo-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.sp-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); }
.sp-file { flex: 0 1 auto; max-width: 100%; font-size: .84rem; }   /* never squeeze a native
            file input below its own label — it clips instead of wrapping */
.sp-status { font-size: .8rem; }

@media (max-width: 560px) {
  .sv-page { padding: 18px 12px 110px; }
  .sv-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sv-item-body { padding: 10px; }
  .sv-item-body h3 { font-size: .92rem; }
  .sv-desc { display: none; }              /* the tap-through shows it; keep tiles short */
  .sv-item-foot { flex-direction: column; align-items: stretch; gap: 6px; }
  .sv-add { width: 100%; }
  .sv-sheet-inner { max-height: 92vh; }
}
@media (max-width: 380px) {
  .sv-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Feedback & Reviews — public rating page /f/{token} + owner summary
   ============================================================ */
.fv-body { margin: 0; background: var(--fv-bg, #f7f5f1); color: var(--fv-ink, #23201c);
           font-family: var(--font-main); min-height: 100vh; }
.fv-page { max-width: 520px; margin: 0 auto; padding: 30px 16px 40px; }
.fv-card { background: var(--fv-card, #fff); border: 1px solid var(--fv-line, rgba(0,0,0,.10));
           border-radius: 18px; padding: 28px 22px; text-align: center; }
.fv-logo { border-radius: 14px; object-fit: cover; margin-bottom: 12px; }
.fv-card h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 5vw, 2rem); margin: 0 0 6px; }
.fv-tag { margin: 0 0 6px; opacity: .82; font-size: .92rem; }
.fv-prompt { margin: 22px 0 10px; font-size: 1.02rem; font-weight: 600; }

.fv-stars { display: flex; justify-content: center; gap: 4px; }
.fv-star { background: none; border: 0; cursor: pointer; padding: 6px; line-height: 1;
           font-size: 2.4rem; color: var(--fv-star-off, #948d82); transition: transform .15s ease, color .15s ease;
           min-width: 48px; min-height: 48px; }
.fv-star.is-on { color: var(--fv-star, #f5b301); }
.fv-star:hover { transform: scale(1.12); }
.fv-hint { min-height: 22px; margin: 6px 0 0; font-size: .9rem; opacity: .82; }

.fv-done-emoji { font-size: 2.6rem; }
#fvStep2 h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; margin: 8px 0 14px; }

.fv-google { background: var(--fv-bg, #f7f5f1); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.fv-google p { margin: 0 0 12px; font-size: .92rem; opacity: .88; }
.fv-google-btn { display: inline-flex; align-items: center; justify-content: center;
                 background: #1765cc; color: #fff;   /* #4285F4 gave white text only 3.56:1 */ font-weight: 600; text-decoration: none;
                 border-radius: 10px; padding: 14px 20px; min-height: 48px; width: 100%; box-sizing: border-box; }

.fv-private { text-align: left; }
.fv-private h3 { font-size: 1rem; margin: 0 0 4px; }
.fv-private textarea, .fv-contact input {
  width: 100%; box-sizing: border-box; padding: 13px; font-size: 16px;   /* 16px stops iOS zoom */
  border: 1px solid var(--fv-line, rgba(0,0,0,.16)); border-radius: 10px;
  background: var(--fv-bg, #fff); color: inherit; font-family: inherit; margin-top: 8px; min-height: 46px;
}
.fv-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fv-send { width: 100%; margin-top: 12px; border: 0; background: var(--fv-accent, #8f6708); color: var(--fv-on-accent, #fff);
           font-weight: 700; border-radius: 12px; padding: 15px; font-size: .98rem; cursor: pointer; min-height: 50px; }
.fv-sent { text-align: center; font-size: .92rem; margin: 10px 0 0; color: var(--success, #2e9e5b); font-weight: 600; }
.fv-foot { margin-top: 26px; text-align: center; font-size: .84rem; opacity: .82; }
.fv-foot a { color: inherit; }

/* --fv-star-off is its own token now: the empty stars borrowed --fv-line (a BORDER
   colour at 10% alpha), so the rating widget rendered almost blank at 1.25:1.
   Interactive controls need 3:1. */
.ftheme-classic { --fv-bg: #f7f5f1; --fv-card: #fff;    --fv-ink: #23201c; --fv-accent: #8f6708; --fv-on-accent: #fff;    --fv-line: rgba(0,0,0,.10); --fv-star: #f5b301; --fv-star-off: #948d82; }
.ftheme-bold    { --fv-bg: #14151a; --fv-card: #1e2028; --fv-ink: #f2f2f4; --fv-accent: #ff6b3d; --fv-on-accent: #2a1206; --fv-line: rgba(255,255,255,.14); --fv-star: #ffc53d; --fv-star-off: #8a857d; }
.ftheme-fresh   { --fv-bg: #f2f8f3; --fv-card: #fff;    --fv-ink: #1f3326; --fv-accent: #227544; --fv-on-accent: #fff;    --fv-line: rgba(0,0,0,.10); --fv-star: #f5b301; --fv-star-off: #948d82; }

/* owner-side rating summary */
.fb-summary { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.fb-avg { display: flex; align-items: baseline; gap: 6px; }
.fb-avg strong { font-size: 2.2rem; font-family: var(--font-alt); color: var(--accent-primary); }
.fb-avg span { font-size: 1.2rem; color: #f5b301; }
.fb-avg small { display: block; color: var(--text-secondary); font-size: .82rem; margin-left: 8px; }
.fb-bars { flex: 1 1 240px; min-width: 0; display: grid; gap: 4px; }
.fb-bar-row { display: grid; grid-template-columns: 34px 1fr 28px; gap: 8px; align-items: center; font-size: .8rem; }
.fb-bar { background: var(--surface-hover); border-radius: 999px; height: 8px; overflow: hidden; }
.fb-bar > span { display: block; height: 100%; background: #f5b301; }
.fb-bar-n { text-align: right; color: var(--text-secondary); }
.fb-stars-1, .fb-stars-2 { color: var(--danger); }
.fb-stars-3 { color: var(--warning, #d98e04); }
.fb-stars-4, .fb-stars-5 { color: #f5b301; }

@media (max-width: 420px) {
  .fv-card { padding: 22px 16px; }
  .fv-star { font-size: 2rem; padding: 4px; min-width: 44px; }
  .fv-contact { grid-template-columns: 1fr; }
}

/* ============================================================
   Loyalty Stamp Card — public /l/{token} (join page + customer card)
   ============================================================ */
.lv-body { margin: 0; background: var(--lv-bg, #f7f5f1); color: var(--lv-ink, #23201c);
           font-family: var(--font-main); min-height: 100vh; }
.lv-page { max-width: 480px; margin: 0 auto; padding: 30px 16px 40px; }
.lv-card { background: var(--lv-card, #fff); border: 1px solid var(--lv-line, rgba(0,0,0,.10));
           border-radius: 18px; padding: 26px 20px; text-align: center; }
.lv-logo { border-radius: 14px; object-fit: cover; margin-bottom: 10px; }
.lv-card h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.35rem, 5vw, 1.9rem); margin: 0 0 4px; }
.lv-tag { margin: 0 0 8px; opacity: .82; font-size: .9rem; }
.lv-h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.lv-hint { font-size: .88rem; opacity: .82; margin: 0 0 14px; }
.lv-muted { font-size: .82rem; opacity: .8; margin: 6px 0 0; }

.lv-fields { display: grid; gap: 10px; }
.lv-fields input {
  width: 100%; box-sizing: border-box; padding: 13px; font-size: 16px;   /* 16px stops iOS zoom */
  border: 1px solid var(--lv-line, rgba(0,0,0,.16)); border-radius: 10px;
  background: var(--lv-bg, #fff); color: inherit; font-family: inherit; min-height: 48px; text-align: center;
}
.lv-btn { width: 100%; margin-top: 12px; border: 0; background: var(--lv-accent, #8f6708); color: var(--lv-on-accent, #fff);
          font-weight: 700; border-radius: 12px; padding: 15px; font-size: 1rem; cursor: pointer; min-height: 52px; }
.lv-err { color: #c0392b; font-size: .88rem; margin: 8px 0 0; }
.lv-reward-line { font-size: .92rem; margin: 16px 0 0; }

/* the stamp grid */
.lv-stamps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 10px; }
/* an unfilled stamp used to draw a fully TRANSPARENT star inside a 10%-alpha
   dashed ring, so the card read as blank; show a faint visible star instead */
.lv-stamp {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 2px dashed var(--lv-stamp-off, #948d82); color: var(--lv-stamp-off, #948d82);
  font-size: 1.3rem; line-height: 1;
}
.lv-stamp.is-on { border-style: solid; border-color: transparent; background: var(--lv-accent, #8f6708);
                  color: var(--lv-on-accent, #fff); }
.lv-progress { font-size: 1rem; margin: 4px 0 12px; }
.lv-progress strong { font-size: 1.5rem; color: var(--lv-accent, #8f6708); font-family: var(--font-alt); }
.lv-ready { background: var(--lv-ready, #eaf7ee); border-radius: 14px; padding: 16px; margin: 14px 0; }
.lv-ready-emoji { font-size: 2rem; }
.lv-ready strong { display: block; margin: 4px 0; }
.lv-ready p { margin: 0; font-size: .88rem; opacity: .88; }
.lv-qr { margin-top: 14px; border-radius: 10px; background: #fff; padding: 6px; }
.lv-terms { font-size: .78rem; opacity: .8; margin-top: 14px; line-height: 1.5; }
.lv-foot { margin-top: 24px; text-align: center; font-size: .84rem; opacity: .82; }
.lv-foot a { color: inherit; }

.ltheme-classic { --lv-bg: #f7f5f1; --lv-card: #fff;    --lv-ink: #23201c; --lv-accent: #8f6708; --lv-on-accent: #fff;    --lv-line: rgba(0,0,0,.10); --lv-ready: #f6efd8; --lv-stamp-off: #948d82; }
.ltheme-bold    { --lv-bg: #14151a; --lv-card: #1e2028; --lv-ink: #f2f2f4; --lv-accent: #ff6b3d; --lv-on-accent: #2a1206; --lv-line: rgba(255,255,255,.14); --lv-ready: #2a2130; --lv-stamp-off: #8a857d; }
.ltheme-fresh   { --lv-bg: #f2f8f3; --lv-card: #fff;    --lv-ink: #1f3326; --lv-accent: #227544; --lv-on-accent: #fff;    --lv-line: rgba(0,0,0,.10); --lv-ready: #e6f5ea; --lv-stamp-off: #948d82; }

/* owner side: stamp box + per-customer dots */
.loy-stamp-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; margin-top: 10px; }
.loy-stamp-box input { flex: 1 1 170px; min-width: 0; padding: 12px; font-size: 16px;
  border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-color); color: var(--text-primary);
  box-sizing: border-box; min-height: 46px; }
.loy-stamp-box .btn { flex: 0 0 auto; }
.loy-dots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.loy-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px dashed var(--border-color); }
.loy-dot.is-on { background: var(--accent-primary); border-color: transparent; }

@media (max-width: 420px) {
  .lv-card { padding: 20px 14px; }
  .lv-stamp { width: 40px; height: 40px; }
  .loy-stamp-box .btn { flex: 1 1 100%; }
}

/* ============================================================
   Tailor & Clothing Shop — public order page /t/{token}
   Branded to the SHOP: logo/monogram hero, animated pipeline,
   paid-progress money card, collapsible measurements, sticky WhatsApp.
   ============================================================ */
.tv-body { margin: 0; background: #f3efe7; color: #221e19; font-family: var(--font-main); min-height: 100vh;
           background-image: radial-gradient(1100px 500px at 50% -120px, #fff8e6 0%, rgba(255,248,230,0) 70%); }
.tv-page { max-width: 560px; margin: 0 auto; padding: 26px 16px 110px; }
.tv-in { animation: tvIn .5s cubic-bezier(.2,.7,.2,1) both; }
.tv-in:nth-child(2) { animation-delay: .06s; } .tv-in:nth-child(3) { animation-delay: .12s; }
.tv-in:nth-child(4) { animation-delay: .18s; } .tv-in:nth-child(5) { animation-delay: .24s; }
@keyframes tvIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tv-in, .tv-steps::after, .tv-paybar span { animation: none !important; transition: none !important; } }

.tv-hero { text-align: center; padding: 8px 0 22px; }
.tv-logo { width: 84px; height: 84px; border-radius: 22px; object-fit: cover; display: block; margin: 0 auto 12px;
           box-shadow: 0 10px 30px rgba(60,40,0,.16), 0 0 0 4px #fff; background: #fff; }
.tv-monogram { display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
               font-size: 2.4rem; color: #fff; background: linear-gradient(135deg, #8a6d14, #c9a227); }
.tv-shopname { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.55rem, 5.5vw, 2.2rem); margin: 0; letter-spacing: -.01em; }
.tv-tag { margin: 4px 0 0; color: #6b645a; font-size: .95rem; }
.tv-orderline { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; background: #fff;
                border: 1px solid rgba(0,0,0,.08); border-radius: 999px; padding: 6px 14px 6px 8px; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.tv-num { font-family: var(--font-alt); font-weight: 700; font-size: .78rem; letter-spacing: .6px; color: #fff;
          background: #8a6d14; border-radius: 999px; padding: 4px 10px; }
.tv-for { font-size: .92rem; font-weight: 600; }

.tv-card { background: #fff; border: 1px solid rgba(0,0,0,.07); border-radius: 20px; padding: 20px; margin-bottom: 14px;
           box-shadow: 0 8px 28px rgba(60,40,0,.07); }
.tv-label { margin: 0 0 4px; font-size: .74rem; text-transform: uppercase; letter-spacing: 1.2px; color: #8a8377; font-weight: 700; }
.tv-cancelled { text-align: center; color: #c0392b; padding: 28px; }
.tv-cancel-ico { width: 52px; height: 52px; border-radius: 50%; background: #fdecea; color: #c0392b; font-size: 1.6rem;
                 display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }

.tv-status-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.tv-status-now { margin: 0; font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tv-status-ico { font-size: 1.4rem; }
.tv-due-pill { flex: 0 0 auto; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 7px 12px;
               background: #f1ede3; color: #5d5244; white-space: nowrap; }
.tv-due-pill.is-soon { background: #fff3cd; color: #7a5a00; }
.tv-due-pill.is-late { background: #fdecea; color: #b3261e; }
.tv-due-pill.is-done { background: #e6f5ec; color: #1d7a3c; }

.tv-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; position: relative; }
.tv-steps::before, .tv-steps::after { content: ''; position: absolute; top: 17px; left: calc(100% / 12); right: calc(100% / 12); height: 4px; border-radius: 4px; }
.tv-steps::before { background: #ebe6db; }
.tv-steps::after { right: auto; width: calc((100% - 100% / 6) * var(--tv-fill, 0) / 100); background: linear-gradient(90deg, #8a6d14, #c9a227);
                   animation: tvFill .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes tvFill { from { width: 0; } }
.tv-steps li { text-align: center; position: relative; z-index: 1; }
.tv-dot { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; margin: 0 auto 6px;
          background: #f1ede3; color: #a79f90; font-size: 1rem; border: 3px solid #fff; box-shadow: 0 0 0 1px #e6e0d4; filter: grayscale(1); opacity: .75;
          transition: transform .2s ease; }
.tv-step-name { display: block; font-size: .66rem; color: #9a9285; line-height: 1.2; }
.tv-steps li.is-done .tv-dot { background: #8a6d14; color: #fff; filter: none; opacity: 1; font-weight: 700; box-shadow: 0 0 0 1px #8a6d14; }
.tv-steps li.is-done .tv-step-name { color: #5d5244; }
.tv-steps li.is-now .tv-dot { background: #fff; filter: none; opacity: 1; transform: scale(1.12); box-shadow: 0 0 0 3px #c9a227, 0 6px 16px rgba(138,109,20,.35); }
.tv-steps li.is-now .tv-step-name { color: #221e19; font-weight: 700; }
.tv-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.tv-date { display: flex; align-items: center; gap: 10px; background: #faf8f3; border-radius: 14px; padding: 12px; }
.tv-date-ico { font-size: 1.3rem; }
.tv-date small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; color: #8a8377; font-weight: 700; }
.tv-date strong { font-size: .92rem; }

.tv-money-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; }
.tv-stat { background: #faf8f3; border-radius: 14px; padding: 12px 12px 10px; min-width: 0; }
.tv-stat small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; color: #8a8377; font-weight: 700; margin-bottom: 4px; }
.tv-stat strong { font-size: .98rem; display: block; overflow-wrap: anywhere; }
.tv-stat-balance.is-due { background: #fdecea; } .tv-stat-balance.is-due strong { color: #b3261e; font-size: 1.08rem; }
.tv-stat-balance.is-settled { background: #e6f5ec; } .tv-stat-balance.is-settled strong { color: #1d7a3c; }
.tv-paybar { height: 10px; border-radius: 10px; background: #ebe6db; margin-top: 14px; overflow: hidden; }
.tv-paybar span { display: block; height: 100%; width: var(--tv-paid, 0%); border-radius: 10px;
                  background: linear-gradient(90deg, #1d7a3c, #3cb36a); animation: tvPaid 1s cubic-bezier(.2,.7,.2,1) both .2s; }
@keyframes tvPaid { from { width: 0; } }
.tv-paybar-note { margin: 8px 0 0; font-size: .82rem; color: #6b645a; }
.tv-details { margin-top: 10px; }
.tv-details summary { cursor: pointer; font-size: .84rem; font-weight: 600; color: #8a6d14; padding: 8px 0; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; }
.tv-details summary::-webkit-details-marker { display: none; }
.tv-details summary::before { content: '▸'; transition: transform .2s ease; display: inline-block; }
.tv-details[open] summary::before { transform: rotate(90deg); }
.tv-paylist { list-style: none; margin: 4px 0 0; padding: 0; font-size: .86rem; }
.tv-paylist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed rgba(0,0,0,.1); }

.tv-item { padding: 14px 0; border-top: 1px solid rgba(0,0,0,.07); }
.tv-item:first-of-type { border-top: 0; padding-top: 6px; }
.tv-item-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tv-item-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.tv-item-kind { width: 40px; height: 40px; border-radius: 12px; background: #faf8f3; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex: 0 0 auto; }
.tv-item-name { display: block; font-weight: 700; }
.tv-item-sub { display: block; font-size: .8rem; color: #6b645a; margin-top: 2px; }
.tv-item-amt { white-space: nowrap; font-weight: 700; }
.tv-meas-details { margin-left: 52px; }
.tv-chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tv-chips li { display: inline-flex; align-items: baseline; gap: 5px; background: #faf8f3; border: 1px solid rgba(0,0,0,.06); border-radius: 999px; padding: 6px 11px; font-size: .8rem; }
.tv-chips li span { color: #6b645a; } .tv-chips li strong { color: #221e19; }
.tv-notes { margin: 6px 0 0 52px; font-size: .84rem; color: #5d5750; font-style: italic; }
.tv-note { margin: 14px 0 0; font-size: .88rem; background: #fff8e6; border: 1px solid #f3e3b3; padding: 12px 14px; border-radius: 14px; }
.tv-addr { text-align: center; font-size: .84rem; color: #6b645a; margin: 6px 0 0; }
.tv-foot { margin-top: 26px; text-align: center; font-size: .82rem; color: #8a8377; display: flex; flex-direction: column; gap: 4px; }
.tv-foot a { color: #8a6d14; font-weight: 600; text-decoration: none; }
.tv-credit { font-size: .72rem; letter-spacing: .6px; text-transform: uppercase; }

.tv-sticky { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
             background: linear-gradient(to top, rgba(243,239,231,1) 60%, rgba(243,239,231,0)); z-index: 20; pointer-events: none; }
.tv-wa { pointer-events: auto; max-width: 528px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px;
         background: #25D366; color: #062e14; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 15px 20px; min-height: 52px;
         box-shadow: 0 12px 30px rgba(37,211,102,.35); transition: transform .15s ease, box-shadow .15s ease; }
.tv-wa:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(37,211,102,.42); }
@media (max-width: 420px) {
  .tv-page { padding: 18px 12px 104px; }
  .tv-card { padding: 16px; border-radius: 18px; }
  .tv-steps { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .tv-steps::before, .tv-steps::after { display: none; }
  .tv-money-grid { grid-template-columns: 1fr 1fr; }
  .tv-stat-balance { grid-column: 1 / -1; }
  .tv-dates { grid-template-columns: 1fr; }
  .tv-meas-details, .tv-notes { margin-left: 0; }
}

/* ============================================================
   Tailor — owner dashboard (uses the dashboard tokens: both themes)
   ============================================================ */
/* stat tiles double as the list filters */
.tl-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.tl-stat { position: relative; text-align: left; border: 1px solid var(--border-color); background: var(--surface-color); color: var(--text-secondary);
           border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
           column-gap: 10px; align-items: center; min-height: 64px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.tl-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent-primary); }
.tl-stat.is-on { border-color: var(--accent-primary); box-shadow: inset 0 0 0 1px var(--accent-primary), var(--shadow-md); color: var(--text-primary); }
.tl-stat-ico { grid-row: 1 / 3; font-size: 1.35rem; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-color); display: flex; align-items: center; justify-content: center; }
.tl-stat-n { font-family: var(--font-alt); font-weight: 800; font-size: 1.25rem; line-height: 1.1; color: var(--text-primary); }
.tl-stat-l { font-size: .74rem; text-transform: uppercase; letter-spacing: .6px; }
.tl-stat-overdue.is-hot .tl-stat-n { color: var(--danger-text); }
.tl-stat-overdue.is-hot .tl-stat-ico { background: var(--danger-soft); }
.tl-stat-balance .tl-stat-n { font-size: 1.05rem; }
@media (max-width: 900px) { .tl-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tl-stats { grid-template-columns: 1fr 1fr; gap: 8px; } .tl-stat { padding: 10px 12px; } }

.tl-due-late { color: var(--danger-text); font-weight: 700; }
.tl-due-today { color: var(--accent-text); font-weight: 700; }
.inv-pill.tl-st-received, .inv-pill.tl-st-cutting, .inv-pill.tl-st-stitching, .inv-pill.tl-st-fitting { background: rgba(184,134,11,.15); color: var(--accent-text); }
.inv-pill.tl-st-ready { background: rgba(29,122,60,.15); color: var(--success); }
.inv-pill.tl-st-delivered { background: var(--bg-color); color: var(--text-secondary); }
.inv-pill.tl-st-cancelled { background: var(--danger-soft); color: var(--danger-text); }
/* colour stripe per status on cards + rows */
.tl-card { border-left: 4px solid var(--accent-primary); transition: transform .15s ease, box-shadow .15s ease; }
.tl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tl-card-ready { border-left-color: var(--success); }
.tl-card-delivered { border-left-color: var(--border-color); opacity: .8; }
.tl-card-cancelled { border-left-color: var(--danger); opacity: .7; }
.tl-card-num { font-family: var(--font-alt); font-size: .72rem; font-weight: 700; letter-spacing: .5px; background: var(--bg-color); border-radius: 6px; padding: 2px 7px; margin-right: 6px; color: var(--accent-text); }
.tl-row td:first-child { border-left: 3px solid var(--accent-primary); }
.tl-row.tl-card-ready td:first-child { border-left-color: var(--success); }
.tl-row.tl-card-delivered td:first-child { border-left-color: var(--border-color); }
.tl-row.tl-card-cancelled td:first-child { border-left-color: var(--danger); }

/* shop logo */
.tl-logo-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.tl-logo-box { width: 84px; height: 84px; flex: 0 0 auto; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, #8a6d14, #c9a227);
               display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-size: 2.2rem; box-shadow: var(--shadow-md); }
.tl-logo-box img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.tl-logo-ctl { flex: 1; min-width: 0; }
.tl-logo-ctl label { margin-top: 0; }
@media (max-width: 480px) { .tl-logo-row { flex-direction: column; } }

/* editor */
.tl-hint { font-size: .82rem; margin: -6px 0 10px; color: var(--accent-text); }
.tl-totals { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin: 4px 0 12px;
             background: var(--bg-color); border-radius: var(--radius-sm); font-size: 1.05rem; border: 1px dashed var(--border-color); }
.tl-totals strong { font-family: var(--font-alt); font-size: 1.3rem; color: var(--accent-text); }
.tl-job { border: 1px solid var(--border-color); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; container-type: inline-size;
          background: var(--surface-color); transition: border-color .15s ease, box-shadow .15s ease; }
.tl-job:focus-within { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(184,134,11,.15); }
.tl-job-head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tl-job-head .tl-jobname { grid-column: 1 / -1; }
.tl-job-head .tl-price { grid-column: 1 / 2; }
.tl-job-head .tl-qty { grid-column: 2 / 3; }
.tl-job-head .mi-remove { grid-column: 1 / -1; justify-self: end; }
.tl-job-head .mi-remove, .tl-item .mi-remove { min-width: 44px; min-height: 44px; font-size: 1.5rem; }
.invite-form .tl-job-head input, .invite-form .tl-job-head select { margin-bottom: 0; min-height: 44px; }
@container (min-width: 640px) {
  .tl-job-head { grid-template-columns: 150px 1fr 1fr 100px 64px 48px; align-items: center; }
  .tl-job-head .tl-jobname, .tl-job-head .tl-price, .tl-job-head .tl-qty, .tl-job-head .mi-remove { grid-column: auto; }
}
.tl-meas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 12px; }
.tl-field { display: grid; grid-template-columns: minmax(70px, 1fr) 60px 40px; gap: 4px; align-items: center; }
.invite-form .tl-field input { margin-bottom: 0; min-height: 42px; padding: 8px; font-size: .88rem; }
.invite-form .tl-field .tl-mv { text-align: center; font-weight: 600; }
.tl-field-x { border: 0; background: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; min-height: 42px; }
.tl-addfield { margin-top: 8px; border: 1px dashed var(--border-color); background: none; color: var(--accent-text);
               border-radius: var(--radius-sm); padding: 8px 12px; font-size: .82rem; cursor: pointer; min-height: 38px; }
.tl-addfield:hover { border-color: var(--accent-primary); }
.invite-form .tl-jobnotes { margin: 10px 0 0; }
.tl-item { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; align-items: center; }
.tl-item .tl-isel, .tl-item .tl-iname { grid-column: 1 / -1; }
.tl-item .mi-remove { justify-self: end; }
.invite-form .tl-item input, .invite-form .tl-item select { margin-bottom: 0; min-height: 44px; }
@media (min-width: 760px) {
  .tl-item { grid-template-columns: 1fr 1fr 100px 64px 48px; }
  .tl-item .tl-isel, .tl-item .tl-iname { grid-column: auto; }
}

/* status stepper — every step is a button */
.tl-stepper { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; position: relative; }
.tl-stepper::before, .tl-stepper::after { content: ''; position: absolute; top: 19px; left: calc(100% / 12); right: calc(100% / 12); height: 4px; border-radius: 4px; }
.tl-stepper::before { background: var(--border-color); }
.tl-stepper::after { right: auto; width: calc((100% - 100% / 6) * var(--tl-fill, 0) / 100); background: var(--accent-primary); transition: width .4s ease; }
.tl-stepper li { position: relative; z-index: 1; }
.tl-stepper button { width: 100%; background: none; border: 0; cursor: pointer; padding: 0; color: var(--text-muted); font: inherit; min-height: 64px; }
.tl-stepper-dot { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 5px;
                  background: var(--bg-color); border: 3px solid var(--surface-color); box-shadow: 0 0 0 1px var(--border-color); filter: grayscale(1); opacity: .7; transition: transform .15s ease; }
.tl-stepper button:hover .tl-stepper-dot { transform: scale(1.08); filter: none; opacity: 1; }
.tl-stepper-name { display: block; font-size: .68rem; line-height: 1.2; }
.tl-stepper li.is-done .tl-stepper-dot { background: var(--accent-primary); color: #1a1400; font-weight: 800; filter: none; opacity: 1; box-shadow: 0 0 0 1px var(--accent-primary); }
.tl-stepper li.is-done button { color: var(--text-secondary); }
.tl-stepper li.is-now .tl-stepper-dot { background: var(--surface-color); filter: none; opacity: 1; transform: scale(1.12); box-shadow: 0 0 0 3px var(--accent-primary), 0 6px 16px rgba(184,134,11,.3); }
.tl-stepper li.is-now button { color: var(--text-primary); font-weight: 700; }
.tl-status-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 480px) { .tl-stepper { grid-template-columns: repeat(3, 1fr); row-gap: 10px; } .tl-stepper::before, .tl-stepper::after { display: none; } }

/* payments */
.tl-payhead { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; margin-bottom: 12px; }
.tl-paysum { font-family: var(--font-alt); font-weight: 800; font-size: 1.2rem; color: var(--text-primary); }
.tl-paysum small { font-weight: 500; font-size: .82rem; color: var(--text-secondary); }
.tl-paybal { font-weight: 700; font-size: .9rem; border-radius: 999px; padding: 5px 12px; }
.tl-paybal.is-due { background: var(--danger-soft); color: var(--danger-text); }
.tl-paybal.is-ok { background: rgba(29,122,60,.15); color: var(--success); }
.tl-paybar { grid-column: 1 / -1; display: block; height: 8px; border-radius: 8px; background: var(--bg-color); overflow: hidden; }
.tl-paybar span { display: block; height: 100%; background: linear-gradient(90deg, #1d7a3c, #3cb36a); border-radius: 8px; transition: width .5s ease; }
.tl-pay { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border-color); font-size: .9rem; }
.tl-pay-box { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tl-pay-box button { grid-column: 1 / -1; }
.invite-form .tl-pay-box input, .invite-form .tl-pay-box select, .tl-pay-box input, .tl-pay-box select { margin: 0; min-height: 44px; }
@media (min-width: 640px) { .tl-pay-box { grid-template-columns: 120px 150px 1fr auto; } .tl-pay-box button { grid-column: auto; } }
.tl-events { list-style: none; margin: 0; padding: 0 0 0 18px; font-size: .88rem; border-left: 2px solid var(--border-color); }
.tl-events li { padding: 6px 0 6px 8px; position: relative; }
.tl-events li::before { content: ''; position: absolute; left: -24px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-primary); box-shadow: 0 0 0 3px var(--surface-color); }
.tl-events li .muted { margin-right: 8px; font-size: .78rem; }
.tl-meas-wrap { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-meas-block { font-size: .78rem; color: var(--text-secondary); background: var(--bg-color); border-radius: 999px; padding: 5px 10px; }
.tl-meas-block strong { color: var(--text-primary); margin-right: 6px; }

/* sidebar: shop logo in place of the app icon */
.sidebar-app-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.sidebar-app.has-logo .sidebar-app-name small { display: block; font-size: .62rem; letter-spacing: .4px; color: var(--text-muted); text-transform: uppercase; margin-top: 2px; }
