/* Components for v2 pages (market pages load movement.css instead) */
.page { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 24px; max-width: 1600px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .sub { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); margin-top: 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumbs { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--border-lt); background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); color: var(--on-primary); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.danger { color: var(--red); }
.btn svg { stroke: currentColor; }
.inline { display: inline; margin: 0; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.card.pad { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.accent { border-color: var(--primary); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; }
.card-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--border); color: var(--text); }
a.card-row:hover { background: var(--panel2); color: var(--text); }
.card-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-row .title { font-size: 14px; font-weight: 500; }
.card-row .meta { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 20px; color: var(--muted); border-top: 1px solid var(--border); }
.count { font-family: 'DM Mono', monospace; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--primary-dim); color: var(--accent-text); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.metric .value { font-family: 'DM Mono', monospace; font-size: 30px; font-weight: 500; line-height: 1.1; }
.inv-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.inv-summary .metric { padding: 16px; gap: 6px; }
.inv-summary .metric .value { font-size: 22px; }
@media (max-width: 1000px) { .inv-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.metric .foot { font-size: 13px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: 440px minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; background: var(--muted); }
.dot.out { background: var(--red); } .dot.in { background: var(--blue); } .dot.money { background: var(--primary-lt); }
.dot.warn { background: var(--red); } .dot.crm { background: var(--green); }


/* tables */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.list td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--panel2); }
td.num, th.num { text-align: right; font-family: 'DM Mono', monospace; white-space: nowrap; }
.thumb { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--panel2); border: 1px solid var(--border); display: block; }

/* forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 0 12px; background: var(--bg); border: 1px solid var(--border-lt); border-radius: 6px; color: var(--text); font: inherit; font-size: 14px;
}
textarea { padding: 10px 12px; min-height: 88px; resize: vertical; }
input.mono, input.money { font-family: 'DM Mono', monospace; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-lt); outline-offset: 1px; border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 14px; border-radius: 6px; cursor: pointer; color: var(--soft); font-size: 14px; }
.seg input:checked + label { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--primary-lt); }
details.more > summary { cursor: pointer; color: var(--primary-lt); font-size: 13px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }

dl.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin: 0; }
dl.facts dt { font-size: 12px; color: var(--muted); }
dl.facts dd { margin: 4px 0 0; font-size: 14px; }
dl.facts dd.mono { font-size: 13px; }

/* photos */
.hero { aspect-ratio: 1 / 1; width: 100%; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ph { position: relative; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); background: var(--panel2); aspect-ratio: 1 / 1; cursor: grab; }
.ph.is-hero { border: 2px solid var(--primary); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .badge { position: absolute; left: 4px; top: 4px; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.08em; padding: 2px 5px; border-radius: 4px; background: rgba(10,8,18,0.8); color: #f0ecff; }
.ph .badge.internal { background: rgba(224,85,85,0.9); left: auto; right: 4px; }
.ph.dragging { opacity: 0.4; }
.ph { cursor: pointer; }
.ph.is-current { outline: 2px solid var(--text); outline-offset: 1px; }
.ph-more { position: absolute; z-index: 2; right: 4px; bottom: 4px; width: 28px; height: 22px; border-radius: 4px; border: 0; background: rgba(10,8,18,0.8); color: #f0ecff; font-size: 14px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ph:hover .ph-more, .ph-more:focus-visible, .ph.menu-open .ph-more { opacity: 1; }
@media (hover: none) { .ph-more { opacity: 1; } }
.ph-menu { position: absolute; inset: 0; display: none; flex-direction: column; align-items: stretch; gap: 3px; padding: 30px 5px 5px; background: rgba(10,8,18,0.92); overflow-y: auto; }
.ph.menu-open .ph-more { top: 4px; bottom: auto; }
.ph.menu-open .ph-menu { display: flex; }
.viewer { position: relative; user-select: none; outline: none; }
.viewer:focus-visible { box-shadow: 0 0 0 2px var(--primary-lt); }
.viewer img { touch-action: pan-y; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(10,8,18,0.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: .75; }
.viewer-nav:hover { opacity: 1; background: rgba(10,8,18,0.8); }
.viewer-nav.prev { left: 10px; } .viewer-nav.next { right: 10px; }
.viewer-count, .viewer-full { position: absolute; bottom: 10px; font-family: 'DM Mono', monospace; font-size: 11px; padding: 4px 8px; border-radius: 4px; background: rgba(10,8,18,0.65); color: #f0ecff; }
.viewer-count { left: 10px; } .viewer-full { right: 10px; }
.viewer-full:hover { color: #fff; }
.ph-menu button, .ph-menu select { font-size: 10px; min-height: 24px; padding: 0 5px; border-radius: 4px; border: 0; background: #2a2040; color: #f0ecff; cursor: pointer; font-family: 'DM Mono', monospace; width: auto; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 16px; border: 1px dashed var(--border-lt); border-radius: 8px; text-align: center; cursor: pointer; }
.dropzone.over { border-color: var(--primary-lt); background: var(--primary-dim); }
.dropzone strong { font-size: 14px; }
.dropzone span { font-size: 12px; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--panel2); border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.stat .v { font-family: 'DM Mono', monospace; font-size: 18px; }
.line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.line .v { font-family: 'DM Mono', monospace; }
.total-line { display: flex; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border-lt); font-weight: 600; }


.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }

.activity-row { display: flex; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--border); font-size: 13px; }
.activity-row .when { font-family: 'DM Mono', monospace; color: var(--muted); width: 130px; flex-shrink: 0; }

@media (max-width: 1280px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; padding: 12px 16px; } .search { order: 3; flex-basis: 100%; }
  .mainnav, .page { padding-left: 16px; padding-right: 16px; }
  .tagline { display: none; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
}


select.inline-select { min-height: 32px; width: auto; min-width: 110px; padding: 0 8px; font-size: 13px; background: var(--panel); }
select.inline-select.saved { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
select.inline-select.failed { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.logo-preview { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 18px; display: flex; justify-content: center; }
.logo-preview img { max-width: 100%; max-height: 120px; }
.email-preview { background: #fff; color: #1d2430; border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; white-space: pre-line; font-size: 14px; }
.sent-list { font-size: 13px; }
.field.grow { flex: 1; min-width: 220px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; background: var(--c); border: 2px solid var(--border); cursor: pointer; padding: 0; }
.swatch.on { outline: 2px solid var(--text); outline-offset: 2px; }
.swatch-custom { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.swatch-custom input[type=color] { width: 40px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; }
.doc-preview { background: #fff; color: #1d2430; border-radius: 8px; padding: 18px 20px; border: 1px solid var(--border); }
.doc-preview .dp-name { font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 26px; color: var(--d); }
.doc-preview .dp-rule { height: 2px; background: var(--d); margin: 10px 0 12px; }
.doc-preview .dp-head { display: flex; justify-content: space-between; background: var(--d); color: #fff; font-size: 10.5px; letter-spacing: .12em; font-weight: 600; padding: 7px 10px; }
.doc-preview .dp-btn { display: inline-block; background: var(--d); color: #fff; font-weight: 600; font-size: 13px; padding: 8px 18px; border-radius: 6px; }
.kit-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.kit-inputs { position: sticky; top: 140px; }
.kit-asset textarea { width: 100%; resize: vertical; line-height: 1.5; }
.kit-asset textarea.mono { font-size: 12px; white-space: pre; overflow-x: auto; }
.ebay-preview { width: 100%; min-height: 400px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.kit-running { display: flex; align-items: center; gap: 18px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border-lt); border-top-color: var(--primary); animation: spin 0.9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.pill.red { background: var(--red-dim); color: var(--red); }
@media (max-width: 900px) { .kit-grid { grid-template-columns: 1fr; } .kit-inputs { position: static; } }
.wm-preview { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: var(--panel2); }
.viewer img { object-fit: contain; }
.pub-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pub-side { position: sticky; top: 140px; }
.pub-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pub-ph { position: relative; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); cursor: grab; }
.pub-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pub-ph input { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; accent-color: var(--primary); }
.pub-ph:has(input:not(:checked)) img { opacity: .3; }
.pub-ph.dragging { opacity: .4; }
@media (max-width: 1000px) { .pub-grid { grid-template-columns: 1fr; } .pub-side { position: static; } }
.share-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.share-ph { position: relative; flex: 0 0 84px; height: 84px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; }
.share-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-ph input { position: absolute; top: 5px; right: 5px; width: 18px; height: 18px; accent-color: var(--primary); }
.share-ph:has(input:not(:checked)) img { opacity: .3; }
.share-dialog { width: min(560px, calc(100vw - 32px)); border: 1px solid var(--border-lt); border-radius: 10px; background: var(--panel); color: var(--text); padding: 20px; }
.share-dialog[open] { display: flex; flex-direction: column; gap: 14px; }
.share-dialog::backdrop { background: rgba(0,0,0,.55); }
.wm-state { font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 6px; }
.wm-state.on { background: var(--green-dim); color: var(--green-text); }
.wm-state.off { background: var(--red-dim); color: var(--red); }
.cons-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.cons-side { position: sticky; top: 140px; }
.calc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calc-box { position: relative; }
.calc-box .lock { display: none; position: absolute; right: 8px; top: 0; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.calc-box.anchored .lock { display: inline; }
.calc-box.anchored input { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.calc-table td, .calc-table th { padding: 8px 10px; }
@media (max-width: 1000px) { .cons-grid { grid-template-columns: 1fr; } .cons-side { position: static; } .calc-row { grid-template-columns: 1fr; } }
.offer-form textarea { width: 100%; font-size: 15px; line-height: 1.5; }
.offer-card { gap: 14px; }
.offer-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.offer-title { font-size: 18px; font-weight: 600; }
.offer-price { text-align: right; }
.offer-price .big { font-family: 'DM Mono', monospace; font-size: 24px; font-weight: 500; }
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.verdict { padding: 10px 14px; border-radius: 6px; font-size: 14px; }
.verdict.good { background: var(--green-dim); color: var(--green-text); }
.verdict.ok { background: var(--panel2); }
.verdict.bad { background: var(--red-dim); color: var(--red); }
@media (max-width: 800px) { .offer-grid { grid-template-columns: 1fr; } .offer-head { flex-direction: column; } .offer-price { text-align: left; } }

/* inventory: where each watch is listed (hover or tap) */
.chans { position: relative; display: inline-block; }
.chan-btn { display: inline-flex; gap: 4px; flex-wrap: wrap; padding: 4px; margin: -4px; background: none; border: 0; cursor: default; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; font-family: 'DM Mono', monospace; font-size: 11px; background: var(--panel2); color: var(--soft); border: 1px solid var(--border-lt); white-space: nowrap; }
.chip.c-ebay { background: var(--blue-dim); color: var(--blue); border-color: transparent; }
.chip.c-chrono24 { background: var(--green-dim); color: var(--green-text); border-color: transparent; }
.chip.c-grailzee { background: var(--primary-dim); color: var(--accent-text); border-color: transparent; }
.chip.c-share { background: transparent; color: var(--muted); border-style: dashed; }
.chan-pop { display: none; position: fixed; z-index: 30; min-width: 280px; max-width: 360px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--border-lt); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,0.35); cursor: default; }
.chans:hover .chan-pop, .chans:focus-within .chan-pop { display: block; }
.chan-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.chan-row .grow { flex: 1; min-width: 0; }
.chan-row a { font-size: 15px; padding: 0 4px; }
.chan-pop::before, .chan-pop::after { content: ''; position: absolute; left: 0; right: 0; height: 10px; }
.chan-pop::before { top: -10px; } .chan-pop::after { bottom: -10px; }

/* ---- Analytics ---- */
.m-dark { --c1: #9b59ff; --c2: #1ea8a0; --ch-grid: #221a35; --ch-base: #3a3055; }
.m-light { --c1: #6a2c91; --c2: #0b8f86; --ch-grid: #ece8f3; --ch-base: #c8bfe0; }
.an-filter { gap: 10px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--panel); }
.seg a { padding: 0 12px; min-height: 36px; display: inline-flex; align-items: center; color: var(--muted); font-size: 13px; border-right: 1px solid var(--border); white-space: nowrap; }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--primary-dim); color: var(--text); font-weight: 600; }
.an-filter input[type=date] { min-height: 36px; width: 150px; font-size: 13px; }
.an-sec { scroll-margin-top: 140px; }
.an-h { font-size: 20px; margin-top: 12px; }
.an-grid { grid-template-columns: 1fr 1fr; }
.ch-title { margin: 0; font-size: 15px; font-weight: 600; }
.ch-sub { font-size: 12px; margin-top: 2px; }
.delta { font-family: 'DM Mono', monospace; font-size: 12px; margin-right: 4px; }
.delta.good { color: var(--green-text); } .delta.bad { color: var(--red); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend span, .ch-tip { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .ch-tip i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--c1); }
.legend i.k2, .ch-tip i.k2 { border-top: 2px dashed var(--c2); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.ch-grid { stroke: var(--ch-grid); stroke-width: 1; }
.ch-base { stroke: var(--ch-base); stroke-width: 1; }
.ch-axis { fill: var(--muted); font: 11px 'DM Mono', monospace; font-variant-numeric: tabular-nums; }
.ch-val { fill: var(--text); font: 500 12px 'DM Sans', sans-serif; }
.ch-bar { fill: var(--c1); }
.ch-hit { fill: transparent; cursor: crosshair; }
.ch-hit.on { fill: var(--text); fill-opacity: 0.04; }
.ch-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-line.c1 { stroke: var(--c1); } .ch-line.c2 { stroke: var(--c2); }
.ch-line.dashed { stroke-dasharray: 5 4; }
.ch-area.c1 { fill: var(--c1); fill-opacity: 0.1; } .ch-area.c2 { fill: var(--c2); fill-opacity: 0.1; }
.ch-dot { stroke: var(--panel); stroke-width: 2; pointer-events: none; }
.ch-dot.c1 { fill: var(--c1); } .ch-dot.c2 { fill: var(--c2); }
.ch-cross { stroke: var(--border-lt); stroke-width: 1; display: none; pointer-events: none; }
.ch-tip { position: absolute; display: none; flex-direction: column; align-items: flex-start; gap: 2px; pointer-events: none; z-index: 5; background: var(--bg); border: 1px solid var(--border-lt); border-radius: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.5; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.ch-tip i { margin-right: 6px; vertical-align: middle; }
.barcell { position: relative; display: flex; align-items: center; min-height: 24px; }
.barcell .inbar { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 18px; border-radius: 0 4px 4px 0; background: var(--c1); opacity: 0.22; }
.barcell span.mono { position: relative; padding-left: 8px; }
.more-table summary { padding: 14px 20px; cursor: pointer; color: var(--muted); font-size: 13px; }
.more-table[open] summary { border-bottom: 1px solid var(--border); }
@media (max-width: 1000px) {
  .an-grid { grid-template-columns: 1fr; }
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-filter { width: 100%; }
  .seg { overflow-x: auto; max-width: 100%; }
}

.pay-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.pay-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.trade { border-top: 1px solid var(--border); padding-top: 14px; }
.trade summary { cursor: pointer; color: var(--accent-text); font-weight: 500; }
.cost-edit { padding: 12px 20px 16px; background: var(--panel2); border-top: 1px solid var(--border); }
table.list.fixed-cols { table-layout: fixed; }
table.list th.num { text-align: right; }
.topbar .search input[type=search] { border: 0; background: transparent; min-height: 0; padding: 0; box-shadow: none; }
.sub-toggle { margin-left: 8px; background: var(--panel2); border: 1px solid var(--border-lt); border-radius: 10px; color: var(--accent-text); font: 11px 'DM Mono', monospace; padding: 2px 8px; cursor: pointer; }
tr.sub-row td { background: var(--panel2); font-size: 13px; }
.danger-zone { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }

/* inventory list: fits a laptop screen */
table.t-inv th, table.t-inv td { padding-left: 10px; padding-right: 10px; }
table.t-inv td.num, table.t-inv td.mono, table.t-inv .pill { white-space: nowrap; }
table.t-inv td.w-cell { min-width: 200px; }
table.t-inv select.inline-select { min-width: 0; max-width: 120px; }
table.t-inv .icon-btn { padding: 0 10px; min-width: 0; }
@media (min-width: 761px) { table.t-inv.t-one th:nth-child(5), table.t-inv.t-one td:nth-child(5) { display: none; } }
/* sortable headers */
table.sortable th[data-sort] { cursor: pointer; user-select: none; }
table.sortable th[data-sort]:hover { color: var(--text); }
table.sortable th[aria-sort]::after { content: " ↑"; color: var(--primary); }
table.sortable th[aria-sort="descending"]::after { content: " ↓"; }
table.t-inv .ref-under { display: none; font-size: 11px; max-width: 130px; white-space: normal; word-break: break-all; line-height: 1.3; margin-top: 2px; }
@media (min-width: 761px) and (max-width: 1360px) {
  table.t-inv th:nth-child(4), table.t-inv td:nth-child(4) { display: none; }
  table.t-inv .ref-under { display: block; }
  table.t-inv th, table.t-inv td { padding-left: 7px; padding-right: 7px; }
  table.t-inv td.w-cell { min-width: 140px; }
  table.t-inv td:first-child { width: 48px; }
  table.t-inv .thumb { width: 40px; height: 40px; }
  table.t-inv td.mono { white-space: normal; }
  table.t-inv .pill { font-size: 10px; padding: 3px 7px; letter-spacing: 0.04em; }
  table.t-inv select.inline-select { max-width: 100px; padding: 0 4px; }
  table.t-inv th { letter-spacing: 0.04em; }
}

/* full size photo over the page */
.fullview { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.94); display: flex; flex-direction: column; }
.fullview .fv-bar { display: flex; justify-content: flex-end; gap: 8px; padding: max(12px, env(safe-area-inset-top)) 12px 12px; }
.fullview .fv-img { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; display: flex; align-items: center; justify-content: center; touch-action: pinch-zoom pan-x pan-y; }
.fullview .fv-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* snooze menu on follow-ups */
details.snooze { position: relative; }
details.snooze > summary { list-style: none; }
details.snooze > summary::-webkit-details-marker { display: none; }
.snooze-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 4px; display: grid; min-width: 120px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.snooze-menu button { background: none; border: 0; color: var(--text); text-align: left; padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; }
.snooze-menu button:hover, .snooze-menu button:focus-visible { background: var(--panel2); }

.an-step { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.an-step .btn { min-width: 34px; justify-content: center; font-size: 18px; line-height: 1; }

/* screenshot paste box */
.shot-drop { border: 1.5px dashed var(--border); border-radius: 10px; padding: 14px; text-align: center; }
.shot-drop.over, .shot-drop:focus { border-color: var(--accent, #1b4965); outline: none; }
.shot-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shot-thumbs:empty { display: none; }
.shot-thumbs .th { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.shot-thumbs .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-thumbs .th button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 22px; padding: 0; cursor: pointer; }
