/* shell.css — login gate + home hub + per-monitor nav.
 * Built entirely on style.css design tokens so light/dark stays coherent.
 * (style.css already styles body, .hd, .brand, .brand-mark, .btn*, .ver — we reuse those.) */

/* ---------------- Login ---------------- */
.auth-wrap   { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card   { width: 100%; max-width: 384px; background: var(--card); border: 1px solid var(--border);
               border-radius: 16px; box-shadow: var(--shadow-md); padding: 30px 28px; }
.auth-brand  { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 8px; }
.auth-brand .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
.auth-brand .brand-mark svg { width: 22px; height: 22px; }
.auth-title  { font-size: 20px; font-weight: 700; color: var(--ink); text-align: center; }
.auth-sub    { font-size: 13px; color: var(--muted); text-align: center; margin: 4px 0 20px; }
.auth-card label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin: 14px 0 6px; }
.auth-card input { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
               background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14px; box-sizing: border-box; }
.auth-card input:focus { outline: none; border-color: var(--blue); background: var(--card); }
.auth-card .btn  { width: 100%; justify-content: center; margin-top: 22px; padding: 11px; font-size: 14px; }
.auth-err    { color: var(--red-ink); background: var(--red-soft); border: 1px solid var(--red);
               border-radius: 9px; padding: 9px 12px; font-size: 12.5px; margin-top: 14px; display: none; }
.auth-err.show  { display: block; }
.auth-hint   { font-size: 12px; color: var(--amber-ink); background: var(--amber-soft);
               border-radius: 9px; padding: 9px 12px; margin-bottom: 4px; display: none; }
.auth-hint.show { display: block; }

/* ---------------- Home hub ---------------- */
.hub-main    { max-width: 900px; margin: 0 auto; padding: 40px 22px; }
.hub-head    { margin: 4px 0 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.hub-head h2 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.hub-head p  { font-size: 14px; color: var(--muted); margin: 5px 0 0; }
.hub-summary { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ink-soft); }
.hub-summary .hs-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.hub-summary .hs-dot  { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.hub-grid    { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
@media (max-width: 1180px) { .hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .hub-grid { grid-template-columns: 1fr; } }
.hub-card    { position: relative; display: flex; flex-direction: column; text-decoration: none; overflow: hidden;
               background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm);
               padding: 20px 20px 14px; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.hub-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; opacity: .95; }
.hub-card[data-platform="ltg"]::before     { background: linear-gradient(90deg, #2563eb, #1d4ed8); }
.hub-card[data-platform="ftn"]::before     { background: linear-gradient(90deg, #16a34a, #15803d); }
.hub-card[data-platform="stubhub"]::before { background: linear-gradient(90deg, #6f2dbd, #3b0a73); }
.hub-card[data-platform="viagogo"]::before { background: linear-gradient(90deg, #8bc34a, #5a6772); }
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--blue) 55%, var(--border)); }
.hub-card[data-state="disconnected"] { border-color: color-mix(in srgb, var(--red) 32%, var(--border)); }
.hub-card.disabled { cursor: default; }
.hub-card.disabled:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }

.hub-card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.hub-ico     { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center;
               justify-content: center; color: #fff; flex: 0 0 auto; }
.hub-ico svg { width: 24px; height: 24px; }
.hub-ico.lft { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.hub-ico.ftn { background: linear-gradient(135deg, #16a34a, #15803d); }
.hub-ico.stubhub { background: linear-gradient(135deg, #6f2dbd, #3b0a73); }   /* StubHub purple */
.hub-ico.viagogo { background: linear-gradient(135deg, #8bc34a, #5a6772); }   /* viagogo green/grey */
.hub-ico.ftp { background: linear-gradient(135deg, #4f46e5, #1e1b4b); }       /* ticketpad indigo */
.hub-card-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hub-card-id h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.2;
                  max-width: 100%; }
.hub-go      { flex: 0 0 auto; font-size: 19px; color: var(--muted); opacity: 0; transform: translateX(-5px); transition: .14s ease; }
.hub-card:hover .hub-go { opacity: 1; transform: translateX(0); }
.hub-badge   { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }

.hub-alert   { font-size: 12px; font-weight: 600; line-height: 1.4; border-radius: 10px; padding: 7px 11px; margin: 0 0 12px;
               color: var(--amber-ink); background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber-ink) 28%, transparent); }
.hub-card[data-state="disconnected"] .hub-alert { color: var(--red-ink); background: var(--red-soft);
               border-color: color-mix(in srgb, var(--red) 38%, transparent); }
.hub-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
                 padding-top: 11px; border-top: 1px solid var(--border); }
.hub-logbtn  { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--ink-soft); background: var(--surface);
               border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px; cursor: pointer;
               transition: .12s ease; white-space: nowrap; }
.hub-logbtn:hover { color: var(--ink); border-color: color-mix(in srgb, var(--blue) 55%, var(--border)); }

/* Scan-log modal — recent auto-reprice cycles for one platform */
.scanlog-body { max-height: 52vh; overflow-y: auto; margin: 8px 0 4px; }
.sl-row   { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: 13px; }
.sl-row:last-child { border-bottom: none; }
.sl-ico   { flex: 0 0 auto; width: 20px; text-align: center; }
.sl-when  { flex: 1 1 auto; color: var(--ink); font-weight: 600; }
.sl-rel   { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.sl-tag   { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.sl-detail{ flex: 1 1 100%; font-size: 11.5px; color: var(--muted); padding-left: 30px; }
.sl-ok      .sl-tag { background: var(--green-soft); color: var(--green-ink); }
.sl-skipped .sl-tag { background: var(--amber-soft); color: var(--amber-ink); }
.sl-error   .sl-tag { background: var(--red-soft);   color: var(--red-ink); }

/* Findings: what a cycle actually changed, opened per row (Or 2026-07-23). A cycle that only RAN is
   clickable; skipped/errored ones wrote nothing, so they stay flat and unclickable. */
.sl-open  { cursor: pointer; }
.sl-open:hover { background: rgba(127,127,127,.06); }
.sl-chev  { flex: 0 0 auto; color: var(--muted); font-size: 11px; transition: transform .15s; }
.sl-expanded .sl-chev { transform: rotate(180deg); }
.sl-find  { padding: 4px 2px 12px 30px; border-bottom: 1px solid var(--border); }
.sf-head  { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.sf-empty { font-size: 12px; color: var(--muted); padding: 4px 0 8px; }
.sf-tbl   { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.sf-tbl th{ text-align: left; font-weight: 700; color: var(--muted); font-size: 10px;
            text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px 4px 0;
            border-bottom: 1px solid var(--border); white-space: nowrap; }
.sf-tbl td{ padding: 5px 8px 5px 0; border-bottom: 1px solid rgba(127,127,127,.14); vertical-align: top; }
.sf-tbl tr:last-child td { border-bottom: none; }
.sf-t     { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sf-ev    { font-weight: 600; }
.sf-li    { color: var(--muted); }
.sf-id    { margin-left: 6px; opacity: .6; font-size: 10px; }
.sf-ch    { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sf-why   { color: var(--muted); max-width: 260px; }
/* A CUT is the good direction here — the repricer only ever lowers — so green means "went down". */
.sf-down  { color: var(--green-ink); font-weight: 600; }
.sf-up    { color: var(--red-ink);   font-weight: 600; }
.sf-flat, .sf-muted { color: var(--muted); }
.sf-delta { font-weight: 400; opacity: .8; }
@media (max-width: 620px) {
  .sl-find { padding-left: 6px; }
  .sf-why, .sf-tbl th:nth-child(6), .sf-tbl td:nth-child(6) { display: none; }   /* reason needs room */
}

/* ---------------- Platform logos (frontend/assets/*.png; SVG fallback if missing) ----------------
 * The <img> carries data-logo on its parent; on a load error JS removes data-logo, which
 * restores the coloured icon background + reveals the .plogo-fallback SVG. */
.hub-ico .plogo, .brand-mark .plogo { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }
.plogo-fallback { display: none; }
.hub-ico:not([data-logo]) .plogo-fallback   { display: block; width: 25px; height: 25px; }
.brand-mark:not([data-logo]) .plogo-fallback { display: block; width: 18px; height: 18px; }
.hub-ico[data-logo]   { background: none; overflow: hidden; }
.brand-mark[data-logo]{ background: none; overflow: hidden; }

/* ---------------- Per-monitor nav ---------------- */
.nav-back    { display: inline-flex; align-items: center; gap: 6px; color: #cdd6e4;
               text-decoration: none; font-size: 13px; font-weight: 600; margin-right: 4px; }
.nav-back:hover { color: #fff; }
.nav-back svg { width: 16px; height: 16px; }

/* ---------------- Toolbar action buttons (New listing / Bulk listing) — refined pair ---------------- */
.tb-btn      { display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-weight: 600;
               font-size: 13.5px; line-height: 1; letter-spacing: .01em; white-space: nowrap; cursor: pointer;
               padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
               transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease; }
.tb-btn svg  { width: 16px; height: 16px; }
.tb-btn:hover { transform: translateY(-1px); }
.tb-btn:active { transform: translateY(0); }
.tb-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* Primary — New listing: filled green gradient with a soft coloured shadow. */
.tb-primary  { color: #fff; background: linear-gradient(135deg, #1fbe5b, #15803d);
               box-shadow: 0 2px 10px color-mix(in srgb, #16a34a 34%, transparent); }
.tb-primary:hover { box-shadow: 0 5px 16px color-mix(in srgb, #16a34a 44%, transparent); }
/* Secondary — Bulk listing: clean outlined card that lifts to blue on hover. */
.tb-ghost    { color: var(--ink-soft); background: var(--card); border-color: var(--border); box-shadow: var(--shadow-sm); }
.tb-ghost:hover { color: var(--blue-ink); border-color: var(--blue); box-shadow: var(--shadow-md); }
.tb-ghost svg { color: var(--blue); }

/* ---------------- FTN monitor content ---------------- */
.ftn-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
               max-width: 1180px; margin: 18px auto 0; padding: 0 18px; }
.ftn-toolbar input { flex: 1; min-width: 220px; padding: 9px 13px; border: 1px solid var(--border);
               border-radius: 9px; background: var(--card); color: var(--ink); font-family: inherit; font-size: 13.5px; }
/* Full-viewport width on all four dashboards (Or 2026-07-11) — the fixed 1180/1280 column left
   a third of the screen empty while cells wrapped; the data now spreads across the window. */
.ftn-wrap    { max-width: none; margin: 0 auto; padding: 20px 26px 60px; }
/* Each event is a clearly-framed card — a stronger border + shadow + a tinted header band
 * make the boundary between one event and the next obvious at a glance. */
.ftn-event   { background: var(--card); border: 2px solid var(--border); border-radius: 14px;
               box-shadow: var(--shadow-md); margin-bottom: 22px; overflow: hidden;
               transition: border-color .12s ease, box-shadow .12s ease; }
.ftn-event:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--border)); box-shadow: var(--shadow-lg, var(--shadow-md)); }
/* a little more air between events when grouped under a date header (FTN-scoped) */
.ftn-wrap .date-group-body { gap: 18px; padding: 12px 10px; }
.ftn-wrap .date-group-body .ftn-event { margin-bottom: 0; }
.ftn-evhead  { display: flex; align-items: center; gap: 12px; padding: 15px 18px;
               background: var(--surface); border-bottom: 2px solid var(--line); }
.ftn-evhead .ev-title { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.ftn-evhead .ev-meta  { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ftn-evhead .ev-floor { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.ftn-evhead .ev-floor b { color: var(--green-ink); font-size: 15px; }
.ftn-del     { background: none; border: none; color: var(--faint); cursor: pointer; font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.ftn-del:hover { background: var(--red-soft); color: var(--red-ink); }
.ftn-bb-del        { color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.ftn-bb-del:hover  { background: var(--red-soft); color: var(--red-ink); }
.ftn-table   { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
/* Every listing is ONE line (like LFT) — long values (category/block/split) truncate with an
   ellipsis rather than wrapping; the full text is on the cell's title tooltip. */
.ftn-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ftn-tb-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.ftn-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
               color: var(--muted); font-weight: 600; padding: 9px 18px; background: var(--surface); }
.ftn-table th.num, .ftn-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ftn-table td { padding: 9px 18px; border-top: 1px solid var(--line); color: var(--ink); }
/* Status cell holds the LIVE/PAUSED pill + the position chip — give it room (tight padding,
   no clipping) so the rank (#4) is always shown, never cut to an ellipsis. */
.ftn-table td:nth-child(2) { padding-left: 12px; padding-right: 4px; overflow: visible; }
/* The ACTIONS/status cell (last column) holds LIVE + the linkage chip + delete. On LINKED rows the
   rich chip (platform tags) overflowed the fixed column and the one-line ellipsis SWALLOWED the
   delete button — rows looked like they had no actions at all ("LIVE ...", Or 2026-07-10). Let this
   one cell wrap instead of clip: every button stays visible and clickable; the row just grows a
   couple of pixels when linked. */
.ftn-table td.vg-state { white-space: normal; overflow: visible; text-overflow: clip; }
.ftn-table th:last-child { width: 172px; }
.ftn-table td:nth-child(2) .ftn-pos { margin-left: 5px; }
.ftn-table tr:hover td { background: var(--surface); }
.ftn-cheap   { font-weight: 700; color: var(--green-ink); white-space: nowrap; }
.ftn-price-cell { white-space: nowrap; }
.ftn-chip    { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px;
               padding: 1px 8px; background: var(--blue-soft); color: var(--blue-ink); white-space: nowrap; }
.ftn-chip.hosp { background: var(--gold-soft); color: var(--amber-ink); }
/* Rules (⚙️) button — hover-revealed, like LFT's auto-price gear. When a rule is set it shows
   the minimum inline (⚙️€100) and stays visible + green, so the floor reads at a glance. */
.ftn-set-min { background: none; border: none; cursor: pointer; opacity: 0; font-size: 12px;
               margin-left: 4px; padding: 0; transition: opacity .12s; vertical-align: middle; white-space: nowrap; }
.ftn-table tr:hover .ftn-set-min { opacity: .55; }
.ftn-set-min:hover { opacity: 1; }
/* When a rule is set the gear stays visible with a subtle green ring — signals a rule exists
   WITHOUT showing the minimum number (which could be confused with the listed price). */
.ftn-set-min.has-rule { opacity: 1; background: var(--green-soft); border-radius: 5px; padding: 1px 3px; }
.ftn-table tr:hover .ftn-set-min.has-rule { opacity: 1; }
/* The price TEXT is the click-to-edit target now (the old ✏️ pencil is gone). */
.ftn-edit-price { cursor: pointer; border-bottom: 1px dashed transparent; }
.ftn-table tr:hover .ftn-edit-price { border-bottom-color: var(--border); }
.ftn-edit-price:hover { border-bottom-color: var(--green-ink); }
/* Market button stays visible — it's the "see the competitors" data button (always one click away). */
.ftn-market-btn { background: none; border: none; cursor: pointer; opacity: .5; font-size: 13px;
                  margin-left: 4px; padding: 0; transition: opacity .12s; vertical-align: middle; }
.ftn-table tr:hover .ftn-market-btn { opacity: .8; }
.ftn-market-btn:hover { opacity: 1; }
/* Trend (📈) button — same treatment as the market button. */
.ftn-trend-btn { background: none; border: none; cursor: pointer; opacity: .5; font-size: 13px;
                 margin-left: 4px; padding: 0; transition: opacity .12s; vertical-align: middle; }
.ftn-table tr:hover .ftn-trend-btn { opacity: .8; }
.ftn-trend-btn:hover { opacity: 1; }
/* Cheapest crown — a compact inline 👑 right after the price when I'm the category low. */
.ftn-crown   { font-size: 13px; vertical-align: middle; }
/* Price-position chip (mirrors LFT): #N/M rank, 👑 cheapest, 🔒 held-at-floor, 🔻 undercut. */
.ftn-pos     { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; white-space: nowrap;
               border-radius: 999px; padding: 1px 7px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.ftn-pos.lead     { background: var(--green-soft); color: var(--green-ink); }
.ftn-pos.lock     { background: var(--amber-soft); color: var(--amber-ink); }
.ftn-pos.undercut { background: var(--red-soft);   color: var(--red-ink); }
/* Phase-2 enrichment pending — a pulsing skeleton instead of a blank cell while the throttled market loads. */
.ftn-pos.ftn-pos-loading { letter-spacing: 1px; color: var(--muted); opacity: .55; animation: ftnPulse 1.2s ease-in-out infinite; }
@keyframes ftnPulse { 0%,100% { opacity: .30; } 50% { opacity: .70; } }
/* While FTN is in a rate-limit (1015) backoff, dim the position chips so the stale prices read as "paused". */
body.ftn-cooling .ftn-pos { opacity: .45; filter: grayscale(0.4); }
/* AGGREGATE market summary (phase 3b, 2026-07-23) — FTN's new portal publishes category-wide figures
   instead of a competitor list, so the 📊 modal shows this stat grid where the table used to be. */
.mk-agg { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.mk-agg-cell { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.mk-agg-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mk-agg-val { font-size: 18px; font-weight: 700; margin-top: 2px; }
/* Passive FTN rate-limit banner (no poll, client-side countdown only). */
.ftn-cooldown-banner { margin: 10px 16px 0; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600;
               background: var(--amber-soft); color: var(--amber-ink); border: 1px solid var(--amber-ink); }
/* A stale (>10 min) hydrated snapshot is dimmed until the live load replaces it — old prices never look current. */
body.ftn-stale-snap #ftnTab { opacity: .55; transition: opacity .2s ease; }
/* Same cue on EVERY platform (Or 2026-07-02): while a full load / scan is in flight, or the page was
   painted from a stale snapshot, the grid dims — grey = the system is busy; edit once it lifts. */
/* Stale-snapshot entry (Or 2026-07-24: "המסך נראה בהיר מדי... תסיר את המסך הבהיר הזה בכניסה").
   NO full-tab dim any more — the page serves the last inventory snapshot INSTANTLY while a ~55s paced
   background revalidate runs, so the old 55%-opacity wash sat on screen for a minute on nearly every
   entry and read as "not loaded". The stale signal is now a quiet amber "updating…" tag on the topbar
   Last-scan text; the stale re-poll swaps the fresh data in as soon as the revalidate lands. */
body.vg-stale-snap #vgTab { opacity: 1; }
body.vg-stale-snap [data-conn-lastscan]::after {
  content: " · updating…"; color: #fbbf24; font-weight: 700; }
body.page-loading #vgTab, body.page-loading #ftnTab, body.page-loading #otherTab { opacity: .55; transition: opacity .2s ease; }
/* Profit-per-ticket chip (when the rule carries a cost). */
.ftn-profit  { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; white-space: nowrap;
               border-radius: 999px; padding: 1px 7px; vertical-align: middle; }
.ftn-profit.pos { background: var(--green-soft); color: var(--green-ink); }
.ftn-profit.neg { background: var(--red-soft);   color: var(--red-ink); }
/* Event with a live listing being undercut — a red left accent so it stands out (mirrors LFT). */
.ftn-event.not-cheapest { border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.ftn-event.not-cheapest .ftn-evhead { border-left: 3px solid var(--red); }
/* Inline-editable cells (category / block / qty / split) — click to edit in place. */
.ftn-ed      { cursor: pointer; }
.ftn-ed:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); border-radius: 6px; }
.ftn-cell-input { width: 100%; max-width: 100%; box-sizing: border-box; padding: 3px 5px; border: 1px solid var(--blue);
                  border-radius: 6px; background: var(--card); color: var(--ink); font-family: inherit; font-size: 12.5px; }
/* Event cards inside a date-group sit flush — spacing comes from the group body's flex gap. */
.date-group-body .ftn-event { margin-bottom: 0; }
.ftn-min     { font-size: 10.5px; font-weight: 700; color: var(--amber-ink); cursor: pointer;
               margin-top: 3px; white-space: nowrap; }
.ftn-min:hover { text-decoration: underline; }
.ftn-status-toggle { cursor: pointer; }
.ftn-status-toggle:hover .ftn-chip { outline: 1px solid currentColor; outline-offset: 1px; }
.ftn-split-cell  { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.ftn-split-cell > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ftn-del-listing { background: none; border: none; cursor: pointer; opacity: 0; font-size: 12px;
                   padding: 0; transition: opacity .12s; flex-shrink: 0; }
.ftn-table tr:hover .ftn-del-listing { opacity: .5; }
.ftn-del-listing:hover { opacity: 1; }
.ftn-price-edit  { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.ftn-price-input { width: 72px; padding: 3px 6px; border: 1px solid var(--blue); border-radius: 6px;
                   background: var(--card); color: var(--ink); font-family: inherit; font-size: 12.5px; text-align: right; }
.ftn-table .sel-col { width: 36px; text-align: center; padding-left: 14px; padding-right: 6px; }
.ftn-table .sel-col input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--blue); }
.ftn-empty   { text-align: center; color: var(--muted); padding: 60px 20px; }
.ftn-empty h3 { color: var(--ink); font-size: 17px; margin: 0 0 8px; }
.ftn-partial { font-size: 11.5px; color: var(--amber-ink); background: var(--amber-soft);
               border-radius: 7px; padding: 2px 9px; display: inline-block; }
.ftn-err     { color: var(--red-ink); font-size: 12.5px; padding: 12px 18px; }

/* auto-reprice results */
.rp-row      { display: grid; grid-template-columns: 1fr auto auto; gap: 8px 16px; align-items: center;
               padding: 9px 4px; border-top: 1px solid var(--line); }
.rp-row:first-child { border-top: none; }
.rp-evt      { font-size: 13px; font-weight: 600; color: var(--ink); }
.rp-price    { font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-price b  { color: var(--green-ink); }
.rp-meta     { font-size: 11.5px; color: var(--muted); }
.rp-badge    { font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; }
.rp-change   { background: var(--blue-soft);  color: var(--blue-ink); }
.rp-ok       { background: var(--green-soft); color: var(--green-ink); }
.rp-same     { background: var(--surface-2);  color: var(--muted); }
.rp-skip     { background: var(--amber-soft); color: var(--amber-ink); }
.rp-err      { background: var(--red-soft);   color: var(--red-ink); }
.rp-warn     { background: var(--amber-soft); color: var(--amber-ink); }

/* add-listing event search rows */
.es-row      { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; cursor: pointer;
               border-radius: 8px; }
.es-row:hover { background: var(--surface-2); }
.es-name     { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ---------------- Viagogo monitor (step 2: read-only inventory) ---------------- */
.vg-event     { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
                box-shadow: var(--shadow-sm); overflow: hidden; }
.vg-evt-head  { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px 12px;
                padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--border); }
.vg-evt-main  { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
/* keep the countdown + action buttons on ONE line (they used to wrap below on the wider "TOMORROW" chip) */
.vg-evt-head > .btn-tiny, .vg-evt-head > .evt-countdown { flex: 0 0 auto; }
.vg-evt-title { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.25;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg-evt-sub   { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vg-evt-comp  { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600;
                color: var(--ink-soft); background: var(--surface-2); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.vg-evt-meta  { font-size: 12px; color: var(--muted); }
.vg-evt-crests { display: inline-flex; gap: 3px; align-items: center; flex: 0 0 auto; }
.vg-evt-crests:empty { display: none; }
.vg-evt-crests .team-logo { width: 34px; height: 34px; font-size: 11.5px; flex: 0 0 auto; }
/* emphasise + enlarge the per-event "time until kickoff" countdown on viagogo */
.vg-evt-head .evt-countdown { font-size: 14.5px; font-weight: 800; padding: 7px 15px;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--blue-ink) 24%, transparent); }
.vg-evt-head .evt-countdown .cd-val { font-size: 15.5px; font-weight: 800; letter-spacing: .2px; }
.vg-evt-head .evt-countdown.is-today { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 35%, transparent); }
.vg-evt-head .evt-countdown.is-soon  { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--amber-ink) 30%, transparent); }
.vg-evt-count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--ink-soft);
                background: var(--surface-2); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.vg-table     { width: 100%; border-collapse: collapse; }
.vg-table th  { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase;
                letter-spacing: .03em; color: var(--muted); padding: 8px 16px; border-bottom: 1px solid var(--border); }
.vg-table td  { padding: 10px 16px; font-size: 13px; color: var(--ink); border-top: 1px solid var(--border); }
.vg-table tbody tr:first-child td { border-top: none; }
.vg-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vg-row:hover td { background: var(--surface); }

/* ---- inventory listings framed as separated cards (scoped → market modal table unaffected) ---- */
.vg-event .vg-table { border-collapse: separate; border-spacing: 0 7px; margin: 4px 0 8px; }
.vg-event .vg-table th { border-bottom: none; padding: 8px 16px 0; }
.vg-event .vg-table td { background: var(--card); border-top: 1px solid var(--border);
                         border-bottom: 1px solid var(--border); padding: 12px 16px; transition: background .12s ease; }
.vg-event .vg-table td:first-child { border-left: 1px solid var(--border);
                         border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.vg-event .vg-table td:last-child  { border-right: 1px solid var(--border);
                         border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.vg-event .vg-table tbody tr:first-child td { border-top: 1px solid var(--border); }   /* every row fully framed */
.vg-event .vg-row:hover td { background: var(--surface-2); }
.vg-event .vg-row:hover td:first-child { box-shadow: inset 3px 0 0 -1px var(--accent, #4f7cff); }
.vg-sec       { font-weight: 600; color: var(--ink); }
.vg-type      { color: var(--ink-soft); font-size: 12.5px; }
.vg-price     { font-weight: 700; color: var(--ink); }
.vg-muted     { color: var(--muted); }
.vg-pill      { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis;
                white-space: nowrap; vertical-align: bottom; font-size: 11px; font-weight: 600;
                border-radius: 999px; padding: 2px 10px; }

/* --- Viagogo market modal (step 3) --- */
.vg-mkt-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.vg-mkt-stat  { font-size: 12px; color: var(--ink-soft); background: var(--surface);
                border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; }
.vg-mkt-stat b { color: var(--ink); }
.vg-mine-stat { background: var(--amber-soft); border-color: transparent; color: var(--amber-ink); }
.vg-mine-stat b { color: var(--amber-ink); }
.vg-mkt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.vg-mine-only { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.vg-mkt-body  { max-height: 56vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.vg-mkt-table th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.vg-mine-row td { background: var(--amber-soft) !important; }
.vg-mine-tag  { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em;
                background: var(--amber-ink); color: #fff; border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: middle; }
.vg-notes     { display: flex; flex-wrap: wrap; gap: 4px; }
.vg-note      { font-size: 10.5px; color: var(--amber-ink); background: var(--amber-soft);
                border-radius: 5px; padding: 1px 7px; max-width: 230px; overflow: hidden;
                text-overflow: ellipsis; white-space: nowrap; }
.vg-sales-note { font-size: 11.5px; color: var(--muted); padding: 10px 4px 2px; }
.vg-create-evt { background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
                 padding: 9px 13px; margin-bottom: 12px; font-size: 13.5px; color: var(--ink); }

/* --- Viagogo history rows --- */
.hist-row     { display: flex; align-items: flex-start; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--border); }
.hist-row:first-child { border-top: none; }
.hist-act     { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.hist-main    { flex: 1 1 auto; min-width: 0; }
.hist-evt     { font-size: 13px; font-weight: 600; color: var(--ink); }
.hist-det     { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-when    { flex: 0 0 auto; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --- Viagogo compact mode (C) --- */
.vg-compact .vg-table td      { padding: 5px 16px; font-size: 12px; }
.vg-compact .vg-table th      { padding: 5px 16px; }
.vg-compact .vg-evt-head      { padding: 8px 16px; }
.vg-compact .vg-event .vg-table { border-spacing: 0 4px; margin: 2px 0 5px; }
.vg-compact .vg-event .vg-table th { padding: 5px 16px 0; }
.vg-compact .date-group-body  { gap: 10px; padding: 8px 10px; }
.btn-icon.active              { background: var(--surface-2); color: var(--ink); }

/* --- Viagogo freshly-created row highlight --- */
.vg-just-created td             { background: var(--green-soft) !important; }   /* beat the framed-row td bg */
.vg-just-created td:first-child { box-shadow: inset 3px 0 0 var(--green-ink); }
.vg-new-tag { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em;
              background: var(--green-ink); color: #fff; border-radius: 4px; padding: 0 5px;
              margin-right: 3px; vertical-align: middle; }

/* --- Viagogo repricer (step 4): gear, min-floor, profit, inline edit --- */
.vg-price-cell { white-space: nowrap; }
.vg-ed         { cursor: pointer; border-radius: 5px; padding: 1px 4px; }
.vg-ed:hover   { background: var(--surface-2); outline: 1px dashed var(--border); }
.vg-ed-input   { width: 86px; font-size: 12.5px; padding: 2px 5px; border: 1px solid var(--blue);
                 border-radius: 5px; background: var(--card); color: var(--ink);
                 font-variant-numeric: tabular-nums; text-align: right; }
.vg-gear       { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--muted);
                 opacity: .5; padding: 1px 4px; border-radius: 999px; vertical-align: middle; line-height: 1; }
.vg-gear:hover { opacity: 1; background: var(--surface-2); }
.vg-gear.has-rule { opacity: 1; color: var(--green-ink); box-shadow: inset 0 0 0 1.5px var(--green-ink); }
.vg-lmkt       { background: none; border: none; cursor: pointer; font-size: 12.5px; opacity: .55;
                 padding: 1px 3px; border-radius: 6px; vertical-align: middle; line-height: 1; }
.vg-lmkt:hover { opacity: 1; background: var(--surface-2); }
.vg-act        { background: none; border: none; cursor: pointer; font-size: 12px; opacity: .5;
                 padding: 1px 4px; border-radius: 6px; vertical-align: middle; line-height: 1; margin-left: 2px; }
.vg-act:hover  { opacity: 1; background: var(--surface-2); }
.vg-del:hover  { background: var(--red-soft); }
.vg-pause:hover, .vg-publish:hover { background: var(--green-soft); }
.vg-hist-evt   { font-weight: 600; color: var(--ink-soft); background: var(--surface-2);
                 border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.vg-hist-evt button { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 11px; padding: 0 0 0 4px; }
.vg-hist-evt button:hover { color: var(--red-ink); }
.vg-min        { font-size: 10.5px; font-weight: 700; color: var(--amber-ink); background: var(--amber-soft);
                 border-radius: 5px; padding: 0 5px; margin-left: 5px; white-space: nowrap; vertical-align: middle; }
.vg-profit     { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 0 5px; }
.vg-profit.pos { color: var(--green-ink); background: var(--green-soft); }
.vg-profit.neg { color: var(--red-ink);   background: var(--red-soft); }

/* inline market-position chip (lazy) */
.vg-pos        { font-size: 10.5px; font-weight: 800; border-radius: 5px; padding: 0 5px; margin-left: 5px;
                 white-space: nowrap; vertical-align: middle; letter-spacing: .01em; }
.vg-pos-top    { color: var(--green-ink); background: var(--green-soft); }
.vg-pos-mid    { color: var(--red-ink);   background: var(--red-soft); }
.vg-pos-solo   { color: var(--muted);     background: var(--surface-2); font-weight: 700; }
.vg-pos-na     { color: var(--amber-ink);  background: var(--amber-soft); font-weight: 700; opacity: .85; }
.vg-ltrend     { background: none; border: none; cursor: pointer; font-size: 12.5px; opacity: .55;
                 padding: 1px 3px; border-radius: 6px; vertical-align: middle; line-height: 1; }
.vg-ltrend:hover { opacity: 1; background: var(--surface-2); }

/* price-trend chart modal */
.vg-trend-chart { margin: 6px 0 10px; min-height: 188px; display: flex; align-items: center; justify-content: center; }
.vg-trend-svg   { width: 100%; height: 188px; overflow: visible; }
.vg-tg-grid     { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }
.vg-tg-yl, .vg-tg-xl { fill: var(--muted); font-size: 10px; }
.vg-tg-yl       { text-anchor: end; }
.vg-tg-line     { fill: none; stroke: var(--accent, #4f7cff); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vg-tg-area     { fill: var(--accent, #4f7cff); opacity: .10; stroke: none; }
.vg-tg-dot      { fill: var(--accent, #4f7cff); }
.vg-trend-stats { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); }
.vg-trend-stats b { color: var(--ink); }
.vg-trend-delta.pos { color: var(--green-ink); font-weight: 700; }
.vg-trend-delta.neg { color: var(--red-ink);   font-weight: 700; }

/* bulk-select checkboxes + floating action bar */
.vg-sel, .vg-sel-all { vertical-align: middle; cursor: pointer; accent-color: var(--accent, #4f7cff); margin: 0 2px 0 0; }
.vg-row-sel td { background: var(--accent-soft, rgba(79,124,255,.10)) !important; }
.vg-bulkbar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--surface, #fff); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.vg-bulkbar[hidden] { display: none; }   /* author display:flex would otherwise override [hidden] */
.vg-evt-add { color: var(--green-ink); font-weight: 700; }
.vg-evt-add:hover { background: var(--green-soft); border-color: var(--green-ink); }
.vg-bb-count { font-size: 13px; color: var(--ink-soft); }
.vg-bb-count b { color: var(--ink); font-size: 14px; }
.vg-bb-sep   { width: 1px; align-self: stretch; background: var(--border); margin: 0 2px; }
.vg-bb-btn[disabled] { opacity: .4; cursor: not-allowed; }
.vg-bb-del:not([disabled]):hover { background: var(--red-soft); color: var(--red-ink); }
.vg-bb-clear { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 14px; padding: 2px 6px; }
.vg-bb-clear:hover { color: var(--red-ink); }
.vg-edit-note { margin: 10px 0 2px; padding: 7px 10px; background: var(--surface-2); border-radius: 8px; font-size: 11.5px; }
.vg-edit-warn { margin: 6px 0 2px; padding: 6px 10px; background: var(--amber-soft); color: var(--amber-ink); border-radius: 8px; font-size: 11.5px; }
.vg-split-tag { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; color: var(--blue-ink); background: var(--blue-soft); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.vg-sync-tag { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; color: var(--amber-ink); background: var(--amber-soft); border-radius: 5px; padding: 0 5px; margin-left: 4px; }
.vg-split-row td { background: color-mix(in srgb, var(--blue-soft) 55%, transparent) !important; }
.vg-mkt-note { margin: 8px 2px 2px; padding: 7px 10px; background: var(--surface-2); border-radius: 8px; font-size: 11px; color: var(--ink-soft); line-height: 1.5; }
.bl-nosec-tag { font-size: 10px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.bl-chip-nosec { box-shadow: inset 0 0 0 1.5px var(--border); }
.bl-fail-tag { font-size: 10px; font-weight: 800; color: var(--red-ink); background: var(--red-soft); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.bl-chip-fail { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red-ink) 35%, transparent); }

/* ============================================================================
   StubHub Sales Pro monitor (stubhub.html / stubhub.js) — 4th marketplace
   ========================================================================== */
.sh-body { --sh: #6b1d7b; --sh-2: #9b30b8; }
.sh-body .ver { background: color-mix(in srgb, var(--sh) 16%, transparent); color: var(--sh); }
[data-theme="dark"] .sh-body .ver { color: #e6a9f4; }

/* StubHub identity: the green accent backgrounds become purple (scoped to .sh-body only,
   so viagogo / LFT / FTN keep their green). */
.sh-body .status-seg .seg-btn[data-status="live"].active { background: var(--sh); }
.sh-body .tb-primary { background: linear-gradient(135deg, var(--sh-2), var(--sh)); }
.sh-body .tb-primary:hover { box-shadow: 0 5px 16px color-mix(in srgb, var(--sh) 44%, transparent); }
/* keep the New-listing icon/text readable on purple */
.sh-body .tb-primary svg { color: #fff; }

.sh-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  max-width: 1180px; margin: 18px auto 6px; padding: 0 22px; }
.sh-stat { background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-xs); }
.sh-stat-num { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.sh-stat-lbl { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.sh-stat-cur .sh-stat-num { color: var(--sh); }

.sh-tabs { display: flex; gap: 4px; max-width: 1180px; margin: 14px auto 0; padding: 0 22px;
  border-bottom: 1px solid var(--border); }
.sh-tab { appearance: none; background: none; border: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--muted); padding: 10px 16px; border-radius: 10px 10px 0 0;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.sh-tab:hover { color: var(--ink); background: var(--surface-2); }
.sh-tab.active { color: var(--sh); border-bottom-color: var(--sh); }

.sh-main { max-width: 1180px; margin: 0 auto; padding: 18px 22px 60px; }
.sh-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sh-panel-head h2 { font-size: 18px; font-weight: 800; color: var(--ink); margin: 0; }
.sh-muted { color: var(--muted); font-size: 13px; }
.sh-link { color: var(--sh); font-weight: 700; text-decoration: none; }
.sh-link:hover { text-decoration: underline; }
.sh-check { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.sh-empty { background: var(--card); border: 1px dashed var(--border); border-radius: 14px;
  padding: 30px 22px; text-align: center; color: var(--muted); }
.sh-empty-cta p { margin: 4px 0; }
.sh-empty-cta strong { color: var(--ink); font-size: 15px; }
.sh-err { color: var(--red-ink); border-color: color-mix(in srgb, var(--red-ink) 35%, transparent); }

.sh-event { background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-xs); }
.sh-event-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sh-event-name { font-weight: 800; color: var(--ink); font-size: 15px; }

.sh-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sh-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.sh-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink); }
.sh-table tr:last-child td { border-bottom: none; }
.sh-num { text-align: right; font-variant-numeric: tabular-nums; }
.sh-ev { font-weight: 600; }
.sh-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); }
.sh-pill-on { background: var(--green-soft); color: var(--green-ink); }

.sh-search-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.sh-search-bar .other-search { flex: 1 1 280px; min-width: 220px; }
.sh-search-table th, .sh-search-table td { white-space: nowrap; }
.sh-search-table .sh-ev { white-space: normal; }

@media (max-width: 760px) {
  .sh-stats { grid-template-columns: repeat(2, 1fr); }
  .sh-stat-cur { display: none; }
}

/* StubHub create-listing modal */
.shc-results { margin-top: 10px; max-height: 320px; overflow-y: auto; }
.shc-ev-row { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; cursor: pointer; background: var(--card); }
.shc-ev-row:hover { border-color: var(--sh, #6b1d7b); background: var(--surface-2); }
.shc-ev-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.shc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; margin: 14px 0 10px; }
.shc-grid > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.shc-grid input, .shc-grid select { font: inherit; font-weight: 500; color: var(--ink); padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.shc-grid input:focus, .shc-grid select:focus { outline: 2px solid var(--sh, #6b1d7b); outline-offset: -1px; }
.shc-grid input[readonly] { background: var(--surface-2); color: var(--muted); }
.shc-opt { font-weight: 400; color: var(--faint); }
.shc-toggle { flex-direction: row !important; align-items: center; gap: 7px !important; font-size: 13px !important; color: var(--ink) !important; padding-top: 18px; }
.shc-toggle input { width: auto; }
.shc-pub { color: var(--red-ink) !important; font-weight: 700 !important; }
.shc-allin { font-size: 13px; color: var(--sh, #6b1d7b); font-weight: 700; margin: 2px 0 10px; min-height: 18px; }
.shc-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.modal-x { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; }
@media (max-width: 720px) { .shc-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Connection badge: Connected / Rate-limited / Disconnected ---------- */
.conn-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.conn-badge .conn-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.conn-badge[data-state="connected"]    { color: var(--green-ink); border-color: color-mix(in srgb, var(--green) 45%, var(--border)); background: var(--green-soft); }
.conn-badge[data-state="connected"] .conn-dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
/* Connected but the background scan loop has STALLED — session fine, nothing scanning (Or 2026-07-03).
   Amber the whole badge so a green-looking "Connected" can never hide a dead loop. */
.conn-badge[data-state="connected"][data-live="idle"] { color: var(--amber-ink); border-color: color-mix(in srgb, var(--amber) 50%, var(--border)); background: var(--amber-soft); }
.conn-badge[data-state="connected"][data-live="idle"] .conn-dot { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent); animation: conn-pulse 1.4s ease-in-out infinite; }
.conn-badge[data-state="cooldown"]     { color: var(--amber-ink); border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); background: var(--amber-soft); }
.conn-badge[data-state="cooldown"] .conn-dot { background: var(--amber); }
.conn-badge[data-state="disconnected"] { color: var(--red-ink); border-color: color-mix(in srgb, var(--red) 45%, var(--border)); background: var(--red-soft); }
.conn-badge[data-state="disconnected"] .conn-dot { background: var(--red); }
.conn-badge[data-state="connecting"]   { color: var(--muted); }
.conn-badge[data-state="connecting"] .conn-dot { background: var(--muted); animation: conn-pulse 1s ease-in-out infinite; }
@keyframes conn-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.conn-reconnect {
  margin-left: 3px; padding: 1px 8px; font-size: 11px; font-weight: 700; cursor: pointer;
  border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit;
}
.conn-reconnect:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

/* Hub card status: a Live/Offline pill + a "Last scan …" line (replaces the old corner status dot) */
.hub-status { margin-top: 14px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.hub-status .hub-badge { margin-top: 0; display: inline-flex; align-items: center; gap: 6px; }
.hub-badge.online::before, .hub-badge.offline::before, .hub-badge.pending::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none;
}
.hub-badge.online  { background: var(--green-soft); color: var(--green-ink); }
.hub-badge.offline { background: var(--red-soft);   color: var(--red-ink); }
.hub-badge.pending { background: var(--surface);    color: var(--muted); border: 1px solid var(--border); }
.hub-lastscan { font-size: 11px; color: var(--ink-soft); line-height: 1.45; }
.hub-lastscan .ls-rel { font-weight: 600; color: var(--ink); }

/* Shared progress WINDOW — connect/login (shell.js) + scan/reprice (app.js). A thin top bar plus a
   centered card showing the action, %, ETA (m:s) and the update in flight (Or 2026-07-17). */
#gett-progress { position: fixed; inset: 0; z-index: 100001; pointer-events: none;
  opacity: 0; transition: opacity .25s ease; }
#gett-progress.show { opacity: 1; }
#gett-progress .gp-fill { position: fixed; top: 0; left: 0; height: 3px; width: 0; border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, var(--blue), var(--green));
  box-shadow: 0 0 10px color-mix(in srgb, var(--blue) 65%, transparent); transition: width .55s ease; }
#gett-progress .gp-card { position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.96); opacity: 0;
  width: min(440px, calc(100vw - 40px)); background: var(--card); color: var(--ink);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.30);
  padding: 24px 26px 22px; text-align: center; transition: transform .22s ease, opacity .22s ease; }
#gett-progress.show .gp-card { transform: translate(-50%, -50%) scale(1); opacity: 1; }
#gett-progress .gp-head { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 12px; }
#gett-progress .gp-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#gett-progress .gp-spin { width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid color-mix(in srgb, var(--blue) 28%, transparent); border-top-color: var(--blue);
  animation: gp-spin .8s linear infinite; }
@keyframes gp-spin { to { transform: rotate(360deg); } }
#gett-progress .gp-pct { font-size: 42px; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
#gett-progress .gp-track { height: 8px; border-radius: 999px; margin: 16px 0 13px; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 12%, transparent); }
#gett-progress .gp-track-fill { height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green)); transition: width .5s ease; }
#gett-progress .gp-now { font-size: 14px; font-weight: 600; color: var(--ink); min-height: 20px; overflow-wrap: anywhere; }
#gett-progress .gp-eta { font-size: 12.5px; color: var(--muted); margin-top: 7px; font-variant-numeric: tabular-nums; }
#gett-progress.done .gp-spin { animation: none; border-color: var(--green); border-top-color: var(--green); }
#gett-progress.done .gp-pct { color: var(--green); }
#gett-progress.done .gp-track-fill { background: var(--green); }

/* ---------- Elegant centered confirm / alert dialog (replaces native confirm/alert) ---------- */
.ui-dialog-overlay {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(15, 23, 42, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .18s ease;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.ui-dialog-overlay.show { opacity: 1; }
.ui-dialog {
  width: min(420px, 100%); background: var(--card); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(2, 6, 23, .55), 0 8px 24px -12px rgba(2, 6, 23, .35);
  padding: 26px 26px 20px; transform: translateY(10px) scale(.96); opacity: 0;
  transition: transform .22s cubic-bezier(.2, .9, .25, 1), opacity .2s ease;
}
.ui-dialog-overlay.show .ui-dialog { transform: translateY(0) scale(1); opacity: 1; }
.ui-dialog-title { font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; margin: 0 0 9px; }
.ui-dialog.is-danger .ui-dialog-title { color: var(--red-ink); }
.ui-dialog-msg { font-size: 13.5px; line-height: 1.6; color: var(--muted); white-space: pre-line; margin: 0 0 24px; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ui-dlg-btn {
  font-family: inherit; font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; cursor: pointer;
  padding: 9px 18px; border-radius: 11px; border: 1px solid transparent;
  transition: background .14s ease, box-shadow .16s ease, transform .07s ease, border-color .14s ease;
}
.ui-dlg-btn:active { transform: translateY(1px); }
.ui-dlg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
.ui-dlg-cancel { background: var(--surface); color: var(--ink); border-color: var(--border); }
.ui-dlg-cancel:hover { background: var(--surface-2); }
.ui-dlg-primary { background: var(--blue); color: #fff; }
.ui-dlg-primary:hover { background: color-mix(in srgb, var(--blue) 86%, #000); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--blue) 55%, transparent); }
.ui-dlg-danger { background: var(--red); color: #fff; }
.ui-dlg-danger:hover { background: color-mix(in srgb, var(--red) 86%, #000); box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--red) 55%, transparent); }
/* Rich-content confirm: a tidy key/value table + a publish/live warning row. */
.ui-dialog-msg .ui-confirm-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 2px 0 0; }
.ui-confirm-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 16px 7px 0; white-space: nowrap; vertical-align: top; }
.ui-confirm-table td { padding: 7px 0; font-weight: 600; color: var(--ink); text-align: right; }
.ui-confirm-table tr + tr th, .ui-confirm-table tr + tr td { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.ui-confirm-warn { margin-top: 16px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  background: var(--amber-soft); color: var(--amber-ink); display: flex; align-items: center; gap: 7px; }

/* MULTI-ARENA position chips (FTN, 2026-07-02): one mini-chip per block size the listing sells */
.ftn-pos-multi { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ftn-pos-multi .ftn-pos { margin-left: 0; }
/* Market modal: quick-switch buttons between my arenas */
.lm-mysizes { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 11px; color: var(--muted); }
.lm-size-btn { padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--card);
               color: var(--text); font-size: 11px; font-weight: 600; cursor: pointer; }
.lm-size-btn:hover { border-color: var(--accent, #2563eb); }
.lm-size-btn.active { background: var(--accent, #2563eb); border-color: var(--accent, #2563eb); color: #fff; }

/* POSITION column (FTN, 2026-07-02): labeled per-arena chips — "Pair 👑 · 4 tog #3" */
.ftn-pos-cell { white-space: nowrap; }
.ftn-pos-cell .ftn-pos, .ftn-pos-cell .ftn-pos-multi { margin-left: 0; }
.ftn-pos-size { display: inline-block; margin-right: 3px; padding: 0 4px; border-radius: 5px;
                background: rgba(15, 23, 42, .10); font-size: 9px; font-weight: 800;
                text-transform: uppercase; letter-spacing: .3px; opacity: .8; }

/* Emphasis on the key row fields (Or 2026-07-02): category, quantity and price pop at a glance */
.ftn-table td:nth-child(2) { font-weight: 700; }                      /* category name */
.ftn-table td:nth-child(4) { font-weight: 800; font-size: 12.5px; }   /* quantity */
.ftn-cheap { font-weight: 800; font-size: 13px; }                     /* price (keeps its green ink) */

/* Min-price tag under the price (Or 2026-07-02): the rule's floor is visible at a glance */
.ftn-price-stack { display: inline-flex; flex-direction: column; align-items: flex-end; vertical-align: middle; }
.ftn-min-tag { font-size: 9.5px; font-weight: 600; color: var(--muted); line-height: 1.25; white-space: nowrap; }

/* Bigger reading font + bold table headers (Or 2026-07-02) */
.ftn-table { font-size: 14px; }
.ftn-table th { font-weight: 800; }
.ftn-evhead .ev-title { font-size: 16.5px; }
.ftn-evhead .ev-meta { font-size: 13px; }
/* Away-team crest after the away team's name — UNIFORM size, centered to the text line */
.ftn-evhead .ev-title { display: flex; align-items: center; gap: 8px; }
.ftn-evhead .ev-title .team-logo, .ftn-evhead .ev-title .team-logo.has-img {
  width: 20px; height: 20px; min-width: 20px; flex-shrink: 0;
  font-size: 8px; margin-left: 0;
}
/* Colored date-group headers (FTN): today=red, tomorrow=yellow, this week=green, rest=blue family */
.ftn-wrap .date-group-header.is-today     { background: var(--red-soft);   color: var(--red-ink); }
.ftn-wrap .date-group-header.is-soon      { background: var(--amber-soft); color: var(--amber-ink); }
.ftn-wrap .date-group-header.is-week      { background: var(--green-soft); color: var(--green-ink); }
.ftn-wrap .date-group-header.is-month     { background: color-mix(in srgb, #3b82f6 16%, var(--card));
                                            color: color-mix(in srgb, #2563eb 80%, var(--ink)); }
.ftn-wrap .date-group-header.is-nextmonth { background: color-mix(in srgb, #6366f1 16%, var(--card));
                                            color: color-mix(in srgb, #4f46e5 80%, var(--ink)); }
.ftn-wrap .date-group-header.is-later     { background: color-mix(in srgb, #06b6d4 14%, var(--card));
                                            color: color-mix(in srgb, #0e7490 80%, var(--ink)); }
.ftn-wrap .date-group-header.is-other     { background: var(--surface); }
/* Min-price tag — larger, readable (Or 2026-07-02: 9.5px was far too small) */
.ftn-min-tag { font-size: 12px; font-weight: 700; }

/* ==== StubHub/viagogo (vg-clone) design ports (Or 2026-07-03) ==== */
/* Multi-arena position chips */
.vg-pos-multi { display: inline-flex; gap: 3px; vertical-align: middle; }
.vg-pos-multi .vg-pos { margin-left: 0; }
/* Colored date-group headers — GENERIC (all monitor pages): today=red, tomorrow=yellow,
   this week=green, rest=blue family. Matches the FTN/LFT scheme exactly. */
.date-group-header.is-today     { background: var(--red-soft);   color: var(--red-ink); }
.date-group-header.is-soon      { background: var(--amber-soft); color: var(--amber-ink); }
.date-group-header.is-week      { background: var(--green-soft); color: var(--green-ink); }
.date-group-header.is-month     { background: color-mix(in srgb, #3b82f6 16%, var(--card));
                                  color: color-mix(in srgb, #2563eb 80%, var(--ink)); }
.date-group-header.is-nextmonth { background: color-mix(in srgb, #6366f1 16%, var(--card));
                                  color: color-mix(in srgb, #4f46e5 80%, var(--ink)); }
.date-group-header.is-later     { background: color-mix(in srgb, #06b6d4 14%, var(--card));
                                  color: color-mix(in srgb, #0e7490 80%, var(--ink)); }
.date-group-header.is-other     { background: var(--surface); }
/* Bigger reading font + bold headers + field emphasis (vg tables = StubHub + viagogo) */
.vg-table { font-size: 14px; }
.vg-table th { font-weight: 800; }
.vg-sec { font-weight: 700; }
.vg-price { font-weight: 800; font-size: 13.5px; }

/* StubHub table restructure (Or 2026-07-03: FTN-style — Category · Block · Qty · Split) */
.vg-block, .vg-split-cell { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* StubHub table (Or 2026-07-03): centered Price, dedicated Position column, LFT-sized icons */
.vg-table th.ctr, .vg-table td.ctr { text-align: center; }
.vg-price-cell .ftn-price-stack { align-items: center; }
.vg-pos-cell { white-space: nowrap; }
.vg-act, .vg-lmkt, .vg-ltrend, .vg-gear { font-size: 13px; line-height: 1; padding: 2px 5px; border-radius: 6px; }

/* Countdown + date-line refresh (Or 2026-07-03) — FTN + vg pages */
.ftn-evhead .ev-meta { font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }
.vg-evt-sub .vg-evt-meta { font-size: 13px; color: var(--ink-soft); }
.evt-date-str { font-weight: 800; color: var(--ink); font-size: 13.5px; letter-spacing: .1px; white-space: nowrap; }

/* Rank-tone backgrounds for position chips (Or 2026-07-03): #1 green · #2–5 amber · #6+ red.
   Each arena is colored by ITS OWN rank (green in singles + red in pairs on the same listing is normal). */
.pos-t-green { background: var(--green-soft) !important; color: var(--green-ink) !important; }
.pos-t-amber { background: var(--amber-soft) !important; color: var(--amber-ink) !important; }
.pos-t-red   { background: var(--red-soft)   !important; color: var(--red-ink)   !important; }
/* Emphasized minimum-price tag (Or 2026-07-03): gold pill so a set floor is obvious at a glance */
.ftn-min-tag { color: var(--amber-ink); background: var(--amber-soft); border-radius: 5px; padding: 0 5px; }

/* Buyer-facing visibility chip (viagogo, Or 2026-07-03): distinguishes a truly on-sale LIVE listing
   from one that's published while its event is still "On sale soon" (0% visibility). */
.vg-vis { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
          font-size: 10.5px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.vg-vis-green { background: var(--green-soft); color: var(--green-ink); }
.vg-vis-amber { background: var(--amber-soft); color: var(--amber-ink); }
.vg-vis-red   { background: var(--red-soft);   color: var(--red-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 35%, transparent); }

/* Post-create report dialog — clean, table-based summary (Or 2026-07-03) */
.cr-box { max-width: 480px; }
.cr-title { margin: 0 0 3px; }
.cr-sub { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.cr-config { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; align-items: center;
             padding: 11px 14px; margin: 0 0 12px; border-radius: 11px;
             background: var(--surface, rgba(127,127,127,.06)); border: 1px solid var(--border); font-size: 12.5px; }
.cr-cfg-k { color: var(--muted); font-weight: 600; }
.cr-cfg-v { text-align: right; color: var(--ink); font-weight: 700; }
.cr-table-wrap { max-height: 42vh; overflow: auto; border: 1px solid var(--border); border-radius: 11px; margin: 0 0 14px; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cr-table thead th { position: sticky; top: 0; z-index: 1; text-align: left; padding: 9px 13px;
                     font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
                     color: var(--muted); background: var(--surface, var(--card)); border-bottom: 1px solid var(--border); }
.cr-table td { padding: 9px 13px; border-top: 1px solid var(--border); }
.cr-ev { font-weight: 600; color: var(--ink); }
.cr-table th.cr-st, .cr-table td.cr-st { text-align: right; white-space: nowrap; }
.cr-ok { color: var(--green-ink); font-weight: 700; }
.cr-fail { color: var(--red-ink); font-weight: 700; }
.cr-actions { flex-wrap: wrap; gap: 6px; }

/* Pre-create bulk confirm: numbered match table with dates (Or 2026-07-03) */
.bl-confirm-tbl-wrap { max-height: 36vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; margin: 10px 0 4px; }
.bl-confirm-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bl-confirm-tbl thead th { position: sticky; top: 0; z-index: 1; text-align: left; padding: 7px 11px;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); background: var(--surface, var(--card)); border-bottom: 1px solid var(--border); }
.bl-confirm-tbl td { padding: 6px 11px; border-top: 1px solid var(--border); }
.bl-confirm-tbl td.num { color: var(--muted); font-weight: 700; width: 28px; }
.bl-confirm-tbl td:first-child + td { font-weight: 600; }
.bl-confirm-tbl td:last-child { white-space: nowrap; color: var(--muted); }

/* ---- Cross-platform linkage (Or 2026-07-04) ---- */
.lnk-hd-btn { border: 1px solid var(--border); background: transparent; color: inherit; border-radius: 9px;
  padding: 3px 9px; font-size: 14px; cursor: pointer; }
.lnk-hd-btn:hover { background: var(--surface-2, rgba(127,127,127,.12)); }
.lnk-chip { display: inline-block; margin-left: 5px; padding: 0 6px; border-radius: 999px; font-size: 10.5px;
  font-weight: 800; background: color-mix(in srgb, #6366f1 16%, transparent); color: #6366f1;
  border: 1px solid color-mix(in srgb, #6366f1 40%, transparent); cursor: pointer; vertical-align: middle; }
/* .modal-box base is width:440px — max-width alone never widened these. Real widths (2026-07-11):
   the wizard's sibling rows and the manager's group cards need the room. */
.lnk-box { width: 640px; max-width: 94vw; }
.lnk-settings { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; font-size: 13px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface, rgba(127,127,127,.05)); }
.lnk-settings label { display: inline-flex; align-items: center; gap: 5px; }
.lnk-armed { display: inline-flex; gap: 10px; align-items: center; }
.lnk-groups-wrap { max-height: 46vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
/* flex: none — WITHOUT it the group cards are flex children that SHRINK to share the wrap's
   max-height, squashing every card to a sliver that clips its own rows (Or's 2026-07-11
   screenshot: six headers, no content). Cards keep their natural height; the wrap scrolls. */
.lnk-group { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; flex: none; }
/* Event headers stand OUT (Or 2026-07-11): indigo-tinted band + left accent + bigger title, so
   scanning the list reads as clear event sections rather than one continuous stream. */
.lnk-group-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px 9px 10px; font-weight: 700; font-size: 12.5px;
  background: color-mix(in srgb, #6366f1 10%, var(--surface, transparent));
  border-bottom: 1px solid color-mix(in srgb, #6366f1 25%, var(--border));
  border-left: 4px solid #6366f1; }
.lnk-group-title { font-weight: 800; font-size: 13.5px; letter-spacing: -.01em; }
.lnk-group-head .hint { white-space: nowrap; font-weight: 500; }
.lnk-group-plats { display: inline-flex; gap: 2px; }
.lnk-group-plats .lnk-plat { font-size: 8.5px; padding: 1px 5px; margin: 0; }
.lnk-group-count { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--muted);
  background: color-mix(in srgb, var(--muted) 12%, transparent); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.lnk-group-head + .lnk-sib { border-top: none; }
.lnk-sib-missing { opacity: .72; }
/* Guard-paused (Or 2026-07-11): the linkage guard paused this listing after a sale on a linked
   platform — struck through end-to-end so it instantly reads "no longer on sale because the
   linkage fired". Manual pauses do NOT strike (only the guard's own action sets the flag). */
.lnk-sib-gpaused .lnk-sib-main,
.lnk-sib-gpaused .lnk-sib-sub { text-decoration: line-through; text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--red-ink) 75%, transparent); }
.lnk-sib-gpaused .lnk-sib-main { opacity: .75; }
.lnk-sib-gpaused .lnk-sib-status.is-paused { background: color-mix(in srgb, var(--red-ink) 14%, transparent);
  color: var(--red-ink); }
.lnk-mgr .modal-actions { margin-top: 14px; }
.modal-box.lnk-mgr { width: 840px; max-width: 94vw; }
.lnk-mgr-head { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; }
.lnk-mgr-head h4 { margin: 0; white-space: nowrap; }
.lnk-mgr-head input { flex: 1; min-width: 0; padding: 7px 12px; font-size: 13px; border: 1px solid var(--border);
  border-radius: 9px; background: transparent; color: inherit; }
.lnk-mgr-head input:focus { outline: none; border-color: #6366f1; }
.lnk-mgr-pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
/* Live / Completed tabs (Or 2026-07-20): split linked groups so the Live list shows only guards still
   protecting live listings; completed ones (a sale fired → siblings paused) move aside. */
.lnk-mgr-tabs { display: flex; gap: 6px; margin: 0 0 8px; }
.lnk-vtab { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
  color: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lnk-vtab b { font-weight: 800; opacity: .75; margin-left: 3px; }
.lnk-vtab.active { background: #6366f1; border-color: #6366f1; color: #fff; }
.lnk-vtab.active b { opacity: 1; }
.lnk-vtab[data-lnk-view="completed"].active { background: var(--green-ink, #16a34a); border-color: var(--green-ink, #16a34a); }
/* Suggested links (Or 2026-07-11) */
.lnk-sugg-wrap { display: flex; flex-direction: column; gap: 7px; max-height: 26vh; overflow: auto; margin-top: 6px; }
.lnk-sugg { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12.5px;
  border: 1px dashed color-mix(in srgb, #6366f1 40%, var(--border)); border-radius: 11px; flex: none;
  background: color-mix(in srgb, #6366f1 4%, transparent); }
.lnk-sugg-main { flex: 1; min-width: 0; }
.lnk-sugg-pair { display: block; margin-top: 3px; font-size: 12px; }
.lnk-sugg-arrow { color: #6366f1; font-weight: 800; padding: 0 4px; }
.lnk-pill-sm { padding: 3px 11px; font-size: 11.5px; }
/* activity-log kind accents: a colored dot per entry type, scannable at a glance */
.lnk-log-row { padding-left: 12px; position: relative; }
.lnk-log-row::before { content: ''; position: absolute; left: 0; top: 9px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--muted); opacity: .45; }
.lnk-k-sale::before { background: var(--green-ink); opacity: 1; }
.lnk-k-action::before { background: #6366f1; opacity: 1; }
.lnk-k-error::before { background: var(--red-ink); opacity: 1; }
.lnk-k-watch::before, .lnk-k-dry::before { background: var(--amber-ink, #b45309); opacity: .9; }
.lnk-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lnk-tbl th, .lnk-tbl td { padding: 6px 10px; text-align: left; border-top: 1px solid var(--border); }
.lnk-tbl thead th { border-top: none; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.lnk-tbl .r { text-align: right; }
.lnk-manual { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lnk-manual select { max-width: 285px; padding: 5px 8px; font-size: 12px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: inherit; }
.lnk-log { max-height: 20vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; font-size: 12px; }
.lnk-log-row { padding: 3px 0; border-bottom: 1px dashed color-mix(in srgb, var(--border) 60%, transparent); }
.lnk-log-row:last-child { border-bottom: none; }
.lnk-k-action { color: var(--green-ink); } .lnk-k-error { color: var(--red-ink); } .lnk-k-dry { color: var(--amber-ink); }

/* ---- Per-listing linkage wizard (Or 2026-07-04) ---- */
.lnk-chip-ghost { opacity: .38; background: transparent; color: var(--muted); border-color: var(--border); }
.lnk-chip-ghost:hover { opacity: 1; color: #6366f1; border-color: #6366f1; }
.lnk-src-card { padding: 10px 13px; border: 1px solid color-mix(in srgb, #6366f1 45%, var(--border)); border-radius: 11px;
  background: color-mix(in srgb, #6366f1 8%, transparent); font-size: 13.5px; }
.lnk-linked-now { margin-top: 8px; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lnk-linked-item { display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--green-soft); color: var(--green-ink); }
.lnk-unlink-x { border: none; background: transparent; cursor: pointer; font-size: 11px; padding: 0 2px; }
.lnk-pills { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 8px; }
.lnk-pill { padding: 5px 13px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
  color: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lnk-pill.active { background: #6366f1; border-color: #6366f1; color: #fff; }
.lnk-pill.down { opacity: .45; }
.lnk-cands { max-height: 34vh; overflow: auto; border: 1px solid var(--border); border-radius: 11px; display: flex; flex-direction: column; }
.lnk-cand { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); cursor: pointer; font-size: 13px; }
.lnk-cand:last-child { border-bottom: none; }
.lnk-cand:hover { background: color-mix(in srgb, #6366f1 6%, transparent); }
.lnk-cand.is-match { background: color-mix(in srgb, #6366f1 5%, transparent); }
.lnk-cand.is-linked { opacity: .55; }
.lnk-cand-main { flex: 1; min-width: 0; }
.lnk-cand-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.lnk-tag-match { font-size: 10.5px; font-weight: 800; color: #6366f1; white-space: nowrap; }
.lnk-tag-linked { font-size: 10.5px; font-weight: 700; color: var(--green-ink); white-space: nowrap; }

/* Prominent LINKED badge + labeled header button (Or 2026-07-04) */
.lnk-chip-on { background: #6366f1 !important; color: #fff !important; border-color: #6366f1 !important;
  font-size: 11px; padding: 1.5px 8px; box-shadow: 0 1px 5px color-mix(in srgb, #6366f1 45%, transparent); }
.lnk-chip-on:hover { background: #4f52e0 !important; }
.lnk-hd-btn { font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.lnk-hd-count { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: #6366f1; color: #fff; font-size: 10.5px; font-weight: 800; }

/* ---- Linkage visual upgrade (Or 2026-07-05) ---- */
/* Header button: gradient pill, impossible to miss */
.lnk-hd-btn { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff !important; border: none;
  border-radius: 999px; padding: 5px 14px; font-size: 12.5px; font-weight: 800; letter-spacing: .2px;
  box-shadow: 0 2px 10px rgba(99, 102, 241, .35); transition: filter .15s, transform .15s; }
.lnk-hd-btn:hover { background: linear-gradient(135deg, #6366f1, #8b5cf6); filter: brightness(1.1); transform: translateY(-1px); }

/* Activity button — a DISTINCT teal so it reads apart from the purple Linkage chip (Or 2026-07-12) */
.audit-hd-btn { background: linear-gradient(135deg, #0d9488, #14b8a6) !important; }
.audit-hd-btn:hover { background: linear-gradient(135deg, #0d9488, #14b8a6) !important; filter: brightness(1.1); }

/* Top-bar platform switcher — jump between platforms without returning to the hub (Or 2026-07-12) */
.plat-switch { display: inline-flex; gap: 4px; margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--border); }
.plat-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 7px; border-radius: 8px; font-size: 12.5px;
  font-weight: 600; color: #cdd6e4; text-decoration: none; border: 1px solid transparent; white-space: nowrap;
  transition: background .15s, color .15s; }
.plat-link .plat-logo { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; background: #fff;
  padding: 1px; flex: none; }

/* FTN multi-block picker (Or 2026-07-17): tick up to 4 blocks of the same category for one listing. */
.ftn-blk-pick { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start;
  max-height: 116px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface, rgba(127,127,127,.05)); }
.ftn-blk-hint { color: var(--muted); font-size: 12px; padding: 2px; }
.ftn-blk-opt { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px;
  border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer;
  user-select: none; background: var(--card); transition: border-color .12s, background .12s; }
.ftn-blk-opt:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--border)); }
.ftn-blk-opt:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 14%, var(--card)); }
.ftn-blk-opt input { accent-color: var(--blue); margin: 0; }
/* The typed-block box that sits beside the ticks (Or 2026-07-23). The tick list only offers blocks I
   already sell, so any new one has to be typed — it needed a style of its own or it rendered as a bare
   browser input inside the picker. Full-width on its own line so it reads as "or type another". */
.ftn-blk-free { flex: 1 0 100%; min-width: 0; margin-top: 2px; padding: 5px 9px; border-radius: 8px;
  border: 1px dashed var(--border); background: var(--card); color: var(--ink);
  font-size: 12.5px; font-weight: 600; }
.ftn-blk-free:focus { outline: none; border-style: solid; border-color: var(--blue); }
/* In the BULK form it lives beside a <select>, not inside the flex picker — keep it inline-width there. */
#ftnBlBlockText { display: block; width: 100%; margin-top: 6px; }
.plat-link:hover { background: rgba(127,127,127,.16); color: #fff; }
.plat-link.active { background: rgba(255,255,255,.12); color: #fff; border-color: var(--border); }
@media (max-width: 720px) { .plat-switch { display: none; } }   /* keep the mobile top bar uncluttered */
.lnk-hd-count { background: rgba(255, 255, 255, .28); color: #fff; }
/* Linked row: soft indigo wash + accent bar on the first cell — elegant, not shouting */
tr.lnk-row-linked > td { background: linear-gradient(90deg, color-mix(in srgb, #6366f1 8%, transparent), color-mix(in srgb, #6366f1 2%, transparent) 60%, transparent); }
tr.lnk-row-linked > td:first-child { box-shadow: inset 3px 0 0 #6366f1; }
/* Linked chip: gradient, roomier, subtle ring */
.lnk-chip-on { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; border: none !important;
  padding: 2.5px 10px; letter-spacing: .3px; border-radius: 999px;
  box-shadow: 0 1px 6px rgba(99, 102, 241, .4), inset 0 0 0 1px rgba(255, 255, 255, .18); }
.lnk-chip-on:hover { filter: brightness(1.1); }

/* Linkage consistency warnings (Or 2026-07-05) */
.lnk-tag-warn { font-size: 10.5px; font-weight: 800; color: var(--red-ink); background: var(--red-soft);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap; margin-left: 4px; }
.lnk-mismatch { margin-top: 12px; border: 1px solid color-mix(in srgb, var(--red) 45%, var(--border));
  background: var(--red-soft); border-radius: 11px; padding: 11px 13px; font-size: 12.5px; }
.lnk-mismatch-head { font-weight: 800; color: var(--red-ink); margin-bottom: 6px; }
.lnk-mismatch-item { color: var(--red-ink); margin: 4px 0; }
.lnk-mismatch-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 9px; }

/* Platform brand colors in linkage UI (Or 2026-07-05): LFT red · FTN dark green · SH purple · VGG light green */
.lnk-plat { display: inline-block; margin: 0 2px; padding: 1px 7px; border-radius: 6px; color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .35px; vertical-align: middle; line-height: 1.5; }
.lnk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
/* Linked row chip becomes a soft container so the colored platform tags carry the identity */
.lnk-chip-on { background: color-mix(in srgb, #6366f1 10%, transparent) !important;
  color: #6366f1 !important; border: 1px solid color-mix(in srgb, #6366f1 45%, transparent) !important;
  padding: 1.5px 7px 1.5px 6px; box-shadow: none; display: inline-flex; align-items: center; gap: 1px; }
.lnk-chip-on:hover { background: color-mix(in srgb, #6366f1 18%, transparent) !important; filter: none; }

/* Unlinked rows: the Link button must be VISIBLE, not a ghost (Or 2026-07-05) */
.lnk-chip-ghost { opacity: 1 !important; background: transparent !important; color: #6366f1 !important;
  border: 1.5px dashed color-mix(in srgb, #6366f1 55%, transparent) !important;
  padding: 1.5px 9px; font-size: 11px; font-weight: 800; border-radius: 999px; letter-spacing: .2px; }
.lnk-chip-ghost:hover { background: color-mix(in srgb, #6366f1 12%, transparent) !important;
  border-style: solid !important; transform: translateY(-1px); }

/* In-modal wait widget: progress bar + elapsed timer (Or 2026-07-05) */
.lnk-wait { padding: 26px 10px 18px; text-align: center; }
.lnk-wait-label { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.lnk-wait-bar { height: 8px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, #6366f1 12%, transparent); }
.lnk-wait-fill { height: 100%; border-radius: 999px; width: 2%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6); transition: width .25s linear; position: relative; }
.lnk-wait-fill::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: lnkShimmer 1.2s linear infinite; }
@keyframes lnkShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.lnk-wait-meta { display: flex; justify-content: space-between; margin-top: 8px;
  font-size: 11.5px; font-weight: 700; color: var(--muted); }
.lnk-wait-meta [data-w-pct] { color: #6366f1; }

/* Linked-now comparison table in the wizard (Or 2026-07-05) */
.lnk-cmp-wrap { margin-top: 6px; border: 1px solid var(--border); border-radius: 11px; overflow: auto; max-height: 30vh; }
.lnk-cmp { font-size: 12px; }
.lnk-cmp thead th { position: sticky; top: 0; background: var(--surface, var(--card)); z-index: 1; }
.lnk-cmp td, .lnk-cmp th { white-space: nowrap; }
.lnk-cmp td:nth-child(2) { white-space: normal; min-width: 130px; }
.lnk-cmp-src > td { background: color-mix(in srgb, #6366f1 8%, transparent); font-weight: 600; }

/* Linked-group rows (Or 2026-07-11): replaced the 10-column comparison table in the Link wizard —
   it scrolled sideways inside the modal and hid the unlink control past the right edge. One flex
   row per sibling always fits the box, and the Unlink button is always visible (two-click confirm). */
.lnk-sibs { margin-top: 7px; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.lnk-sib { display: flex; gap: 10px; align-items: center; padding: 8px 12px; font-size: 12.5px;
  border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.lnk-sib:first-child { border-top: none; }
.lnk-sib-src { background: color-mix(in srgb, #6366f1 8%, transparent); }
.lnk-sib-main { flex: 1; min-width: 0; }
.lnk-sib-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.lnk-sib-status { font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 2px 8px; border-radius: 999px; flex: none; }
.lnk-sib-status.is-live { background: color-mix(in srgb, var(--green-ink) 14%, transparent); color: var(--green-ink); }
.lnk-sib-status.is-paused { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
.lnk-unlink-btn { border: 1px solid color-mix(in srgb, var(--red-ink) 45%, var(--border)); background: transparent;
  color: var(--red-ink); border-radius: 8px; padding: 3px 10px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex: none; }
.lnk-unlink-btn:hover { background: color-mix(in srgb, var(--red-ink) 10%, transparent); }
.lnk-unlink-btn.armed { background: var(--red-ink); color: #fff; border-color: var(--red-ink); }
.lnk-unlink-btn:disabled { opacity: .6; cursor: default; }

/* Admin-only activity log (Or 2026-07-11) - colour the actor so each person's rows stand out */
.aud-who { font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.aud-admin { color: var(--green-ink); background: color-mix(in srgb, var(--green-ink) 13%, transparent); }
.aud-user  { color: #7c3aed; background: color-mix(in srgb, #7c3aed 13%, transparent); }

/* Single-line rows on the viagogo/StubHub tables (Or 2026-07-11): the STATUS cell grew with a
   3-platform linkage chip and pushed ✏️🗑 onto a second line, squeezing Delivery into a two-line
   wrap on the same row. Every data cell now stays on ONE line. The measured overflow was ~270px
   on a real linked row, reclaimed here: tighter cell padding (16→8), compact pills/chips/buttons,
   the delivery label shortened in JS ("Mobile Transfer"), and ellipsis caps on the free-text
   cells (section / split / delivery — full value stays one click away, these cells are editable).
   Worst case (linked to many platforms on a narrow window) the event card scrolls sideways
   instead of clipping the action buttons out of reach. */
.vg-event .vg-table td { white-space: nowrap; }
.vg-event .vg-table td.vg-sec { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.vg-event .vg-table td.vg-split-cell { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.vg-event .vg-table td.vg-type { max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
.vg-event .vg-table th, .vg-event .vg-table td,
.vg-compact .vg-event .vg-table th, .vg-compact .vg-event .vg-table td { padding-left: 8px; padding-right: 8px; }
.vg-event .vg-table .lst-status .pill { padding: 2px 6px 2px 5px; gap: 3px; }
.vg-event .vg-table .vg-vis { margin-left: 3px; padding: 1px 4px; }
.vg-event .vg-table .vg-pos { margin-left: 2px; padding: 0 3px; }
.vg-event .vg-table .ftn-pos-size { margin-right: 2px; padding: 0 2px; }
.vg-event .vg-table .lnk-chip { margin-left: 3px; padding: 0 3px; }
.vg-event .vg-table .lnk-chip .lnk-plat { margin: 0 1px; padding: 1px 3px; font-size: 9.5px; }
.vg-event .vg-table .vg-act { padding: 1px; }
.vg-event .vg-table .vg-lmkt, .vg-event .vg-table .vg-ltrend, .vg-event .vg-table .vg-gear { font-size: 12px; padding: 1px 2px; }
.vg-event { overflow-x: auto; }

/* ═══ UNIFORM COLUMN GRID + EVENT-HEADER EMPHASIS (Or 2026-07-11, all platforms) ═══
   Auto table layout sized each event card's columns by its own content, so CATEGORY/BLOCK/QTY…
   sat at different x-positions from card to card. Fixed layout + shared widths puts every column
   in ONE straight line down the whole page. STATUS gets a fixed px floor so its buttons never
   squeeze. (FTN already runs a fixed colgroup — aligned by design.) */
.vg-event .vg-table { table-layout: fixed; }
.vg-event .vg-table th:nth-child(1) { width: 21%; }
.vg-event .vg-table th:nth-child(2) { width: 6%; }
.vg-event .vg-table th:nth-child(3) { width: 5%; }
.vg-event .vg-table th:nth-child(4) { width: 9%; }
.vg-event .vg-table th:nth-child(5) { width: 13%; }
.vg-event .vg-table th:nth-child(6) { width: 14%; }
.vg-event .vg-table th:nth-child(7) { width: 11%; }
.vg-event .vg-table th:last-child   { width: 285px; }

/* LFT page — same grid discipline via its own column classes. NOTE the content weight: the PRICE
   cell carries price + the position chips (SINGLE/PAIR/3 TOG) + the ⚙️📊✏️ buttons, so it is the
   WIDE one; STATUS carries LIVE + the linkage chip + delete. Under-sizing PRICE spilled its chips
   over STATUS (Or 2026-07-11). */
.lst-table { table-layout: fixed; }
/* table-layout is FIXED, so these widths must keep summing to 100% — a column left unsized gets
   whatever is left, i.e. nothing. Restrictions (Or 2026-08-03) took its 11% out of the two columns
   with visible slack: price 33→26 and status 20→18. Selectors are `.lst-table`, which only the LFT
   page renders — the other four monitors have their own tables. */
.lst-table th.lst-td-sec      { width: 16%; }
.lst-table th.lst-td-block    { width: 6%; }
.lst-table th.lst-td-avail    { width: 5%; }
.lst-table th.lst-td-sellas   { width: 8%; }
.lst-table th.lst-td-seating  { width: 10%; }
.lst-table th.lst-td-restrict { width: 11%; }  /* LTG restriction chips (read-only) */
.lst-table th.lst-td-price    { width: 26%; }  /* price + position chips + ⚙️📊✏️ */
.lst-table th.lst-td-status   { width: 18%; }  /* LIVE + linkage chip + delete */
.lst-table td.lst-td-sec { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* safety net: if a cell ever runs narrow, its chips/buttons WRAP to a second line instead of
   spilling over the next column — the row just grows a few px, nothing overlaps. */
.lst-price-wrap, .lst-status-wrap { flex-wrap: wrap; row-gap: 4px; }

/* Event headers pop on every platform: indigo band + left accent (the red not-cheapest flag
   keeps winning — its selector is more specific). */
.vg-evt-head { background: color-mix(in srgb, #6366f1 9%, var(--card)); border-left: 4px solid #6366f1; }
.ftn-evhead  { background: color-mix(in srgb, #6366f1 9%, var(--surface)); border-left: 4px solid #6366f1; }
.listing-centric > .other-head { background: color-mix(in srgb, #6366f1 9%, var(--card)); border-left: 4px solid #6366f1; }
.listing-centric > .other-head:hover { background: color-mix(in srgb, #6366f1 14%, var(--card)); }

/* Required-field highlight (Or 2026-07-09) — a soft red ring on a create-form field that was left
   empty on submit; cleared as soon as the user types/picks a value (see flashRequired in each page JS). */
.field-missing,
.field-missing input,
.field-missing select {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE PASS — hub + FTN/StubHub/viagogo monitors (Or 2026-07-16).
   ADDITIVE ONLY: everything below is @media-scoped; desktop (>820px) is
   untouched. style.css carries the shared header/toolbar/modal/table mobile
   rules — this block covers the shell-owned layouts.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 820px) {
  /* --- Hub: one monitor card per row + comfy padding --- */
  .hub-main   { padding: 20px 14px; }
  .hub-grid   { grid-template-columns: 1fr; }
  .hub-logbtn { min-height: 40px; }

  /* --- Platform-switcher pills: scroll sideways rather than blow up the bar
         (the existing ≤720px rule that hides the switcher entirely still wins
          below 720 — display is deliberately NOT overridden here) --- */
  .plat-switch { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 42vw; scrollbar-width: none; }
  .plat-switch::-webkit-scrollbar { display: none; }

  /* --- Monitor content wraps --- */
  .ftn-wrap    { padding: 14px 10px 80px; }
  .ftn-toolbar { padding: 0 12px; }
  .ftn-toolbar input { min-height: 40px; }
  .sh-main  { padding: 14px 12px 60px; }
  .sh-stats { grid-template-columns: repeat(2, 1fr); padding: 0 12px; }

  /* --- Event tables PAN horizontally inside their existing card ancestor --- */
  .ftn-event { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ftn-event .ftn-table { min-width: 760px; }
  .vg-event  { -webkit-overflow-scrolling: touch; }   /* overflow-x:auto is already on .vg-event (2026-07-11) */
  .vg-event .vg-table { min-width: 760px; }
  .sh-event  { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sh-event .sh-table { min-width: 620px; }
  .vg-mkt-body { -webkit-overflow-scrolling: touch; }
  .vg-mkt-body table { min-width: 560px; }
  .lnk-cmp-wrap { -webkit-overflow-scrolling: touch; }

  /* --- Event-card headers wrap instead of clipping --- */
  .vg-evt-head { flex-wrap: wrap; row-gap: 6px; }
  .ftn-evhead  { flex-wrap: wrap; row-gap: 6px; }

  /* --- viagogo/StubHub floating bulk bar fits the phone --- */
  .vg-bulkbar { max-width: calc(100vw - 16px); flex-wrap: wrap; justify-content: center; row-gap: 6px; }

  /* --- Wide linkage modals: cap to the viewport --- */
  .lnk-box, .modal-box.lnk-mgr { max-width: calc(100vw - 20px); }

  /* --- Login/refresh progress label never overflows the phone width --- */
  #gett-progress .gp-label { max-width: calc(100vw - 20px); overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 480px) {
  .hub-main  { padding: 16px 10px; }
  .auth-wrap { padding: 16px; }
  .shc-grid  { grid-template-columns: 1fr; }
  .lnk-box, .modal-box.lnk-mgr { width: calc(100vw - 20px); }
}


/* ── WIDE-SCREEN MODALS (Or 2026-07-24: "הצג חלונות עם תצוגה רחבה יותר כדי שלא אצטרך לגלול לצדדים")
   The base .modal-box was a FIXED 440px and .modal-wide a FIXED 760px, so on a 1900px display the
   scan-log findings grid (6 columns: Time · Event · Listing · What · Change · Why) overflowed and had
   to be scrolled sideways while most of the screen sat empty. Widths now scale with the viewport.

   ADDITIVE + SAFE: shell.css loads AFTER style.css on every page, so these win at equal specificity
   without editing the base rules. Both blocks are min-width queries, so every mobile rule
   (max-width: 820px / 480px, here and in style.css) is untouched — phones keep calc(100vw - 20px).
   min() keeps the vw cap, so a modal can never outgrow the window. */
@media (min-width: 1100px) {
  .modal-box                  { width: min(620px, 92vw); }
  .modal-box.modal-wide       { width: min(1120px, 92vw); }
  #addListingModal .modal-box { width: min(1120px, 92vw); }
  .modal-box.lnk-mgr          { width: min(1120px, 94vw); }
  .lnk-box                    { width: min(880px, 94vw); }
  .sf-why                     { max-width: 420px; }        /* the reason column no longer pinches */
  .scanlog-body               { max-height: 62vh; }        /* more rows per screen, less scrolling */
}
@media (min-width: 1600px) {
  .modal-box                  { width: min(720px, 88vw); }
  .modal-box.modal-wide       { width: min(1360px, 90vw); }
  #addListingModal .modal-box { width: min(1360px, 90vw); }
  .modal-box.lnk-mgr          { width: min(1360px, 90vw); }
  .lnk-box                    { width: min(1000px, 90vw); }
  .sf-why                     { max-width: 560px; }
  .scanlog-body               { max-height: 66vh; }
}


/* ═══════════ TOUCH WORK-TOOL PASS (Or 2026-07-24: iPhone + iPad still overflow — "להפוך גם את
   האייפון והאייפד לכלי עבודה") ═══════════
   Root causes found by the 6-lens audit: (1) the mobile blocks stop at 820px, but iPad Pro 11
   portrait = 834px and ALL iPad landscape = 1024-1194px — that whole band rendered the raw desktop
   layout (fixed-min toolbars ~1150px, nowrap topbar ~1000px+, body zoom:1.08 inflating it all 8%);
   (2) hover-revealed row controls (opacity:0/.5, :hover to show) are invisible on touch;
   (3) every input is 12-14px, so iPhone Safari focus-zooms the page on every edit;
   (4) vh modals under iOS Safari's dynamic toolbar clip their bottom action row.
   ALL rules are gated on (pointer: coarse) — the PRIMARY pointer — so no desktop window of any
   width changes, including narrow ones. Everything is additive; the ≤820 blocks are untouched. */

/* ── A. The iPad band: 821-1199px, touch only ─────────────────────────────────────────────── */
@media (pointer: coarse) and (min-width: 821px) and (max-width: 1199px) {
  body { zoom: 1; }                 /* the desktop 8% reading-zoom shrank an 834px iPad to ~772px */
  /* Topbar: let it wrap to a second line instead of forcing page-level horizontal scroll —
     min-content of brand + injected plat-switch + actions is ~1000-1300px. */
  .hd { flex-wrap: wrap; row-gap: 6px; }
  .hd .actions { flex-wrap: wrap; justify-content: flex-end; min-width: 0; row-gap: 6px; }
  /* Filter toolbar: 3×210px selects + search + buttons ≈ 1150px min — wrap + relax the floors. */
  .other-toolbar { flex-wrap: wrap; row-gap: 8px; }
  .other-toolbar .sort-select { min-width: 150px; }
  .other-toolbar .other-search { flex: 1 1 180px; min-width: 0; }
  /* Event tables pan INSIDE their card (the ≤820 pattern, extended to the band). */
  .ftn-event { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ftn-event .ftn-table { min-width: 860px; }
  .vg-event  { -webkit-overflow-scrolling: touch; }
  .vg-event .vg-table { min-width: 860px; }
  .sh-event  { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sh-event .sh-table { min-width: 720px; }
  .evt-listings { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .evt-listings .lst-table { min-width: 880px; }   /* +120: the Restrictions column (Or 2026-08-03) */
  .vg-evt-head, .ftn-evhead { flex-wrap: wrap; row-gap: 6px; }
  /* Wide linkage/activity modals: the fixed 840px box + zoom overflowed an 834px iPad. */
  .lnk-box, .modal-box.lnk-mgr { width: auto; max-width: calc(100vw - 24px); }
  /* There is room after the wrap — bring the last-scan freshness text back (hidden ≤900). */
  .hd .last-scan { display: inline; }
}

/* ── B. Every touch device: reachable, tappable controls ──────────────────────────────────── */
@media (pointer: coarse) {
  /* Hover-revealed row controls: touch has no hover — keep them visible at rest. */
  .ftn-set-min, .ftn-del-listing { opacity: .55; }
  .lst-rowbtn, .vg-lmkt, .vg-act, .vg-gear, .vg-ltrend,
  .ftn-market-btn, .ftn-trend-btn { opacity: .9; }
  /* Tap-target floor: the working controls, not just the ≤820 pass. */
  .btn, .tb-btn { min-height: 40px; }
  .btn-icon, .hub-logbtn, .lnk-hd-btn, .conn-reconnect { min-height: 40px; min-width: 40px; }
  .nav-back { padding: 10px 8px; }
  .lst-rowbtn, .lst-del-btn, .vg-lmkt, .vg-act, .vg-gear, .vg-ltrend,
  .ftn-set-min, .ftn-del-listing, .ftn-market-btn, .ftn-trend-btn { padding: 8px 9px; }
  .lst-check, .bl-row .bl-check { width: 20px; height: 20px; }
  /* iPhone Safari zooms the page when a focused control is under 16px — every edit flow hit it.
     !important on purpose: 15 different rules set 12-14px at higher specificity than one appended
     override could win; this is the single documented exception. */
  input[type="text"], input[type="number"], input[type="search"], input[type="password"],
  input[type="email"], select, textarea { font-size: 16px !important; }
  /* Chip clusters + modal filter bars flow instead of clipping. */
  .lst-pos-multi { flex-wrap: wrap; }
  .lm-toolbar { flex-wrap: wrap; }
  .lm-toolbar .filter-input { min-width: 140px; }
  /* Fixed bottom bars clear the iPhone home indicator (viewport-fit=cover). */
  .toasts     { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .bulk-bar   { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .vg-bulkbar { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}

/* ── C. iOS Safari dynamic toolbar: size modals against the VISIBLE viewport ──────────────── */
@supports (height: 100dvh) {
  @media (pointer: coarse) {
    .modal-box { max-height: 86dvh; }
    .auth-wrap { min-height: 100dvh; }
    .scanlog-body { max-height: 56dvh; }
  }
}

/* ── D. iPhone: the scan-log findings table pans, and the Why column comes back ───────────── */
@media (max-width: 620px) {
  .sl-find { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sl-find .sf-tbl { min-width: 560px; }
  /* The reprice REASON existed nowhere else once hidden — restore it; the pan-wrap gives it room.
     (Overrides the display:none earlier in this file — same specificity, later wins.) */
  .sf-why, .sf-tbl th:nth-child(6), .sf-tbl td:nth-child(6) { display: table-cell; }
}
@media (max-width: 480px) {
  .shc-actions { flex-wrap: wrap; }
  #vgRepriceBody { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── E. Anchoring bug at every width: #shCreateModal's ✕ positioned against the SCREEN ─────── */
/* .modal-x is absolute; without a positioned ancestor it anchors to the fixed overlay and renders
   at the viewport corner, detached from the box. Scoped to this modal only. */
#shCreateModal .modal-box { position: relative; }

/* A block I ALREADY have a listing in — the venue plan now offers every block in the category, so the
   familiar ones need to stand apart from the 40 I have never sold. (Or 2026-07-25) */
.ftn-blk-opt.is-mine { border-color: color-mix(in srgb, var(--green-ink) 45%, var(--border));
  background: color-mix(in srgb, var(--green-ink) 8%, var(--card)); }
.ftn-blk-opt.is-mine:has(input:checked) { border-color: var(--blue); }


/* ── FTP (Football Ticket Pad) ────────────────────────────────────────────────────────────────
   FTP is the only platform with two price scales on screen at once: the NET price it pays Or and
   the GROSS price a buyer sees. The stack below keeps them visually ranked — net large, gross and
   the floor as quiet tags underneath — so the eye never has to ask which number it is reading. */
.ftn-gross-tag { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.25; }
.ftn-sets-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue);
}
.ftn-rival { font-weight: 600; }
.ftn-rival-n { display: block; font-size: 10.5px; color: var(--muted); }
/* A price under its own floor is the one thing on this grid that must never be missed. */
.ftn-cheap.is-below-min {
  color: var(--red-ink); font-weight: 800;
  text-decoration: underline wavy color-mix(in srgb, var(--red-ink) 55%, transparent);
  text-underline-offset: 3px;
}
.ftn-bulkbar {
  display: flex; align-items: center; gap: 12px;
  margin: 0 auto 10px; padding: 8px 16px; max-width: var(--wrap-max, 1600px);
  border-radius: 10px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--blue) 10%, var(--card)); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--border));
}
.hint-warn { color: var(--amber-ink); font-weight: 600; }
.hub-ico.ftp { background: linear-gradient(135deg, #4f46e5, #1e1b4b); }


/* FTP: keep the row tools visible without hovering (Or 2026-07-25). FTN fades them in on
   tr:hover, which on a two-listing page reads as "the settings button is missing" rather than
   "hover to reveal". */
#ftpTab .ftn-set-min, #ftpTab .ftn-market-btn, #ftpTab .ftn-trend-btn,
#ftpTab .ftn-del-listing, #ftpTab .ftp-edit-listing { opacity: .72; }
#ftpTab .ftn-set-min:hover, #ftpTab .ftn-market-btn:hover, #ftpTab .ftn-trend-btn:hover,
#ftpTab .ftn-del-listing:hover, #ftpTab .ftp-edit-listing:hover { opacity: 1; }
#ftpTab .ftn-set-min.has-rule { opacity: 1; }
#ftpTab .ftn-trend-btn { background: none; border: none; cursor: pointer; font-size: 12px;
  padding: 2px 4px; border-radius: 5px; }
#ftpTab .ftn-trend-btn:hover { background: var(--blue-soft, rgba(59,130,246,.12)); }


/* ============================================================================================
   LAST MINUTE BUTTON - GOLD (Or 2026-08-06)
   Or asked for a gold background. Gold is already this app's "this row is MINE / pay attention"
   colour (.lm-mine, .lst-mkt-table tr.lm-row-mine), so the button reads as part of the system
   rather than a new accent - and it separates the mode from the green tb-primary, which on these
   pages means "a normal action", not "a view is filtered".

   Keyed on [aria-pressed], which the five toggles already maintain, so it does not care whether
   the JS is swapping tb-ghost/tb-primary underneath. The pressed rule is (0,3,0) on purpose: it
   has to beat `.sh-body .tb-primary` (0,2,0) on the StubHub page, which repaints tb-primary in
   StubHub's own brand colour.
   Both --gold-soft and --amber-ink carry dark-theme values in style.css, so no media query. */
.tb-btn.tb-gold {
  color: var(--amber-ink);
  background: var(--gold-soft);
  border-color: color-mix(in srgb, var(--gold) 55%, transparent);
  box-shadow: var(--shadow-sm);
}
.tb-btn.tb-gold:hover {
  border-color: var(--gold);
  box-shadow: 0 5px 16px color-mix(in srgb, var(--gold) 40%, transparent);
}
/* Pressed = the full gold pill, matching .lm-mine's gold-on-dark-brown. */
.tb-btn.tb-gold[aria-pressed="true"] {
  color: #4a3a05;
  background: linear-gradient(135deg, var(--gold), #e0ad00);
  border-color: transparent;
  box-shadow: 0 5px 16px color-mix(in srgb, var(--gold) 48%, transparent);
}
.tb-btn.tb-gold[aria-pressed="true"]:hover {
  box-shadow: 0 6px 20px color-mix(in srgb, var(--gold) 58%, transparent);
}

/* ============ ★ Presale/Inventory stock type (Or 2026-08-09) ============
   presale   = sold freely, tickets bought only AFTER the sale (ghost ☆ — hover reveals it);
   inventory = REAL stock in hand: gold ★ chip + a gold row stripe — "don't touch, must sell".
   ONE block for all four platforms — every page loads shell.css after style.css, and the gold /
   amber tokens (with their dark-theme overrides) come from style.css. */
.stk-chip {
  display: inline-flex; align-items: center; gap: 3px; flex: none; cursor: pointer;
  padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  white-space: nowrap; user-select: none; line-height: 1.4;
}
.stk-chip.inv {
  background: var(--gold-soft); color: var(--amber-ink);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
}
.stk-chip.inv:hover { filter: brightness(.96); }
/* The ghost is deliberately faint — an affordance, not information. It must never read as a state. */
.stk-chip.ghost {
  color: var(--faint); border: 1px dashed color-mix(in srgb, var(--faint) 45%, transparent);
  opacity: .38; padding: 1px 6px; font-weight: 600;
}
.stk-chip.ghost:hover { opacity: .95; color: var(--amber-ink); border-color: var(--gold); }
/* Gold stripe on the row's first cell — visible at a glance without fighting the hover/selected
   background rules (a background here would mask them; a stripe composes with them). */
tr.row-inv > td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* ============ T2G business-owner chip (Or+Yuval, 2026-08-09) ============
   Admin view only: a listing owned by the SHARED Ticket2Go business wears a teal T2G chip + a
   teal row stripe, so Or always knows which market rows are the partnership and not a rival.
   The partner's own view never renders these (his inventory is all-t2g by construction). */
.own-chip {
  display: inline-flex; align-items: center; flex: none; cursor: pointer;
  padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; white-space: nowrap; user-select: none; line-height: 1.4;
  background: color-mix(in srgb, #0d9488 14%, transparent);
  color: #0f766e; border: 1px solid color-mix(in srgb, #0d9488 45%, transparent);
}
html[data-theme="dark"] .own-chip { color: #5eead4; background: color-mix(in srgb, #0d9488 22%, transparent); }
.own-chip:hover { filter: brightness(.94); }
tr.row-t2g > td:first-child { box-shadow: inset 3px 0 0 #0d9488; }
/* a row that is BOTH t2g and inventory: the t2g stripe wins on the first cell (rule order),
   and the ★ chip still says inventory — both facts stay visible. */
