/* FlipFinder — app shell + auth screens. No framework, no build step. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: #7dd8ff; text-decoration: none; }
a:hover { color: #a9e6ff; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.small { font-size: 11.5px; }
.accent { color: var(--violet); letter-spacing: 0.12em; }
.h1 { font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.08; margin: 0 0 10px; }
.h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; margin: 0 0 8px; }

/* selection + focus */
::selection { background: rgba(124, 92, 255, 0.4); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.brand-mark {
  width: 22px; height: 22px; flex: none;
  background: var(--grad-violet);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}

/* ─────────────── App shell ─────────────── */
body.app { display: grid; grid-template-columns: 212px 1fr; min-height: 100vh; }

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--panel-2);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px; border-bottom: 1px solid var(--line);
  font-weight: 800; letter-spacing: -0.2px;
}
.sidebar__nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.sidebar__foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }

.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; font-size: 13px; color: var(--text-muted);
  border-left: 2px solid transparent;
}
.navlink:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.navlink--active {
  color: var(--text); font-weight: 600;
  background: rgba(124, 92, 255, 0.12);
  border-left-color: var(--violet);
}
.navlink__k { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); width: 14px; }

.livedot { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 0.08em; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.livedot__pip { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); animation: ffpulse 2s infinite; }
@keyframes ffpulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.userchip { display: flex; align-items: center; gap: 9px; }
.userchip__meta { min-width: 0; }
.userchip__name { font-size: 12px; font-weight: 600; }
.avatar {
  width: 26px; height: 26px; flex: none;
  background: var(--grad-violet); color: #07080b;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.wsswitch select, .signout { width: 100%; }
.wsswitch select {
  width: 100%; background: var(--field); color: var(--text);
  border: 1px solid var(--line-strong); padding: 7px 9px; font: inherit; font-size: 12px;
}
.linkbtn { all: unset; cursor: pointer; font-size: 12px; color: var(--text-muted); }
.linkbtn:hover { color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 8, 11, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 0 var(--s6); height: 56px;
  display: flex; align-items: center; gap: 18px;
}
.topbar__title { font-size: 14px; font-weight: 700; }
.topbar__crumb { font-size: 10.5px; color: var(--text-dim); letter-spacing: 0.06em; }

.content { padding: var(--s6); }
.stack { display: flex; flex-direction: column; gap: var(--s5); }

/* ─────────────── Panels / cards ─────────────── */
.panel { border: 1px solid var(--line); background: var(--panel); padding: 20px; }
.panel--tight { padding: 12px; background: var(--field); }
.panel--center { text-align: center; padding: 48px 20px; }

.kpigrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { border: 1px solid var(--line); background: var(--panel); padding: 16px 17px; }
.kpi__label { font-size: 10.5px; letter-spacing: 0.08em; color: var(--text-muted); }
.kpi__value { font-size: 26px; font-weight: 600; margin-top: 9px; letter-spacing: -1px; }
.kpi--empty { opacity: 0.55; }

/* ─────────────── Flash messages ─────────────── */
.flashes { display: flex; flex-direction: column; gap: 8px; padding: var(--s4) var(--s6) 0; }
.auth__card .flashes, .content .flashes { padding: 0 0 var(--s3); }
.flash { font-size: 12.5px; padding: 10px 13px; border: 1px solid var(--line-strong); background: var(--field); }
.flash--success { border-color: rgba(46, 230, 168, 0.35); color: #a8f0d5; }
.flash--error, .flash--danger { border-color: rgba(255, 92, 43, 0.35); color: #ffb9a5; }

/* ─────────────── Auth screens ─────────────── */
body.auth { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 100vh; }
.auth__panel {
  padding: 56px 64px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 32px;
  border-right: 1px solid var(--line);
}
.auth__brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.auth__card { max-width: 400px; width: 100%; }
.auth__aside { position: relative; overflow: hidden; background: var(--panel-2); display: flex; align-items: center; padding: 0 56px; }
.auth__grid {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(600px 400px at 78% 22%, rgba(124, 92, 255, 0.28), transparent 70%),
    radial-gradient(500px 380px at 30% 85%, rgba(34, 211, 238, 0.16), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
}
.auth__pitch { position: relative; max-width: 420px; }

/* allauth default-theme form markup */
.auth__card form { display: flex; flex-direction: column; gap: 13px; }
.auth__card label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-muted); display: block; margin-bottom: 6px; }
.auth__card input[type="email"],
.auth__card input[type="password"],
.auth__card input[type="text"] {
  width: 100%; background: var(--field); border: 1px solid var(--line-strong);
  color: var(--text); padding: 11px 13px; font: inherit; font-size: 13.5px;
}
.auth__card input::placeholder { color: var(--text-dim); }
.auth__card button[type="submit"],
.auth__card .button {
  margin-top: 6px; background: var(--grad-violet); border: none; color: #07080b;
  font-size: 13.5px; font-weight: 700; padding: 13px 16px; cursor: pointer;
  font-family: inherit; text-align: left;
}
.auth__card button[type="submit"]:hover { filter: brightness(1.12); }
.auth__card .helptext, .auth__card ul.errorlist { font-size: 11px; color: var(--text-dim); margin: 4px 0 0; padding-left: 16px; }
.auth__card ul.errorlist { color: #ffb9a5; }
.auth__card a { font-size: 12px; }

@media (max-width: 860px) {
  body.auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .auth__panel { padding: 40px 24px; }
  body.app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}

/* ─────────────── Buttons (shared) ─────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: #07080b;
  background: var(--grad-violet); border: 1px solid transparent; padding: 9px 14px;
}
.btn:hover { filter: brightness(1.12); }
.btn--sm { font-size: 11.5px; padding: 7px 11px; }
.btn--ghost { background: none; color: var(--text-muted); border-color: var(--line-strong); font-weight: 600; }
.btn--ghost:hover { filter: none; border-color: var(--violet); color: var(--text); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }

.pos { color: var(--mint); }
.neg { color: #ff6b4a; }
.r { text-align: right; }
.panel--flush { padding: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.panel__title { font-size: 13.5px; font-weight: 700; }

/* ─────────────── Listings feed ─────────────── */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.chips input, .chips select {
  background: var(--field); border: 1px solid var(--line-strong); color: var(--text);
  font: inherit; font-size: 12px; padding: 7px 10px;
}
.chips__q { min-width: 200px; }
.chips__num { font-size: 12px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.chips__num input { width: 68px; }
.filters__meta { display: flex; justify-content: space-between; align-items: center; }
.scoreview a { color: var(--text-dim); padding: 0 5px; text-transform: uppercase; letter-spacing: 0.08em; }
.scoreview a.scoreview--on { color: var(--violet); }

.ltable { display: flex; flex-direction: column; }
.ltable__cols, .ltable__head, .ltable__row {
  display: grid;
  grid-template-columns: 2.6fr 0.8fr 0.8fr 0.9fr 0.95fr 0.7fr 0.85fr 0.5fr;
  gap: 14px; align-items: center;
}
.ltable__head { padding: 11px 17px; border-bottom: 2px solid var(--line-strong); font-size: 9.5px; letter-spacing: 0.1em; color: var(--text-dim); }
.ltable__row { padding: 11px 17px; border-bottom: 1px solid var(--line); color: inherit; }
.ltable__row:hover { background: rgba(124, 92, 255, 0.06); }
.ltable__empty { padding: 28px 17px; text-align: center; }
.lcell-item { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lcell-item__text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lcell-item__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcell-item__text .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb {
  width: 30px; height: 30px; flex: none; background: #161923; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--text-dim);
}
.pager { display: flex; justify-content: space-between; align-items: center; padding: 13px 17px; }
.pager__btns { display: flex; gap: 7px; }

/* ─────────────── Score cell variants ─────────────── */
.tier--hot { background: var(--grad-mint); }
.tier--fair { background: var(--grad-violet); }
.tier--pass { background: var(--grad-hot); }
.tier-stroke--hot { stroke: var(--mint); }
.tier-stroke--fair { stroke: var(--violet); }
.tier-stroke--pass { stroke: var(--hot); }

.ring { position: relative; width: 34px; height: 34px; }
.ring svg { width: 34px; height: 34px; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 2.5; }
.ring__val { fill: none; stroke-width: 2.5; }
.ring__num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.ring--lg { width: 84px; height: 84px; }
.ring--lg svg { width: 84px; height: 84px; }
.ring--lg .ring__track, .ring--lg .ring__val { stroke-width: 3.5; }
.ring--lg .ring__num { font-size: 22px; }

.tierpill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; }
.tierpill__dot { width: 7px; height: 7px; }
.tierpill.tier--hot { background: none; color: #a8f0d5; } .tierpill.tier--hot .tierpill__dot { background: var(--grad-mint); }
.tierpill.tier--fair { background: none; color: #c3b4ff; } .tierpill.tier--fair .tierpill__dot { background: var(--grad-violet); }
.tierpill.tier--pass { background: none; color: #ffb9a5; } .tierpill.tier--pass .tierpill__dot { background: var(--grad-hot); }

.scorebar { width: 92px; }
.scorebar__head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; }
.scorebar__track { height: 5px; background: rgba(255, 255, 255, 0.08); }
.scorebar__fill { height: 5px; }

/* ─────────────── Item detail ─────────────── */
.backlink { display: inline-block; margin-bottom: 14px; color: var(--text-muted); }
.backlink:hover { color: #7dd8ff; }
.detail-head { margin-bottom: 20px; }
.detail-head__grad { height: 2px; }
.detail-head__body { display: grid; grid-template-columns: 200px 1fr auto; gap: 24px; padding: 22px; align-items: start; }
.detail-photo { aspect-ratio: 4 / 3; background: #161923; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.detail-head__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 10px; }
.badge { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; padding: 3px 8px; border: 1px solid var(--line-strong); color: var(--text-muted); }
.badge--src { border-color: rgba(124, 92, 255, 0.4); background: rgba(124, 92, 255, 0.12); color: #b9a8ff; }
.statrow { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 18px; }
.statrow__k { font-size: 9.5px; letter-spacing: 0.1em; color: var(--text-dim); }
.statrow__v { font-size: 18px; font-weight: 600; margin-top: 5px; }
.actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; width: 190px; }
.actions .btn { justify-content: flex-start; }

.detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.histchart { width: 100%; height: 180px; padding: 17px; }
.comprow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.comprow:last-child { border-bottom: none; }

@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-head__body { grid-template-columns: 1fr; }
  .detail-head__aside { align-items: flex-start; }
}
@media (max-width: 900px) {
  .ltable__head { display: none; }
  .ltable__row { grid-template-columns: 1fr auto; grid-auto-rows: min-content; row-gap: 6px; }
}

/* ─────────────── Score breakdown (item detail) ─────────────── */
.breakdown { display: flex; flex-direction: column; }
.breakdown__row { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 12px; align-items: center; padding: 10px 17px; border-bottom: 1px solid var(--line); }
.breakdown__row:last-child { border-bottom: none; }
.breakdown__track { height: 5px; background: rgba(255, 255, 255, 0.08); }
.breakdown__fill { height: 5px; }

/* ─────────────── Topbar actions + alerts drawer (Step 3) ─────────────── */
.min-w-0 { min-width: 0; }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar__search { display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--line-strong); padding: 7px 11px; width: 240px; }
.topbar__search span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.topbar__search input { all: unset; flex: 1; font-size: 12.5px; color: var(--text); min-width: 0; }
.topbar__btn { all: unset; cursor: pointer; position: relative; border: 1px solid var(--line-strong); background: var(--field); padding: 7px 10px; font-size: 12px; color: #c2c8d6; }
.topbar__btn:hover { border-color: rgba(124, 92, 255, 0.5); }
.topbar__badge { position: absolute; top: -6px; right: -6px; background: var(--grad-hot); color: #07080b; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; padding: 1px 4px; }

.drawer { position: fixed; top: 56px; right: 0; bottom: 0; width: 352px; z-index: 40; background: var(--panel-2); border-left: 1px solid var(--line-strong); box-shadow: -24px 0 60px rgba(0,0,0,.6); display: none; flex-direction: column; }
.drawer.is-open { display: flex; }
.drawer__head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer__head-actions { display: flex; align-items: center; gap: 12px; }
.drawer__list { overflow: auto; }
.drawer__empty { padding: 24px 18px; }

.notif { display: flex; gap: 11px; padding: 13px 18px; border-bottom: 1px solid var(--line); color: inherit; }
.notif:hover { background: rgba(255, 255, 255, 0.03); }
.notif--read { opacity: 0.5; }
.notif__edge { width: 3px; flex: none; background: var(--grad-violet); }
.notif--success .notif__edge { background: var(--grad-mint); }
.notif--warning .notif__edge { background: var(--grad-hot); }
.notif__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.notif__kind { font-size: 9.5px; letter-spacing: 0.1em; color: var(--text-muted); }
.notif__title { font-size: 12.5px; line-height: 1.4; }
.notif__time { font-size: 10px; }

/* ─────────────── Dashboard (Step 3 slice) ─────────────── */
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; }
.dealboard { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.dealcard { background: var(--panel); }
.dealcard__grad { height: 2px; }
.dealcard__body { padding: 15px 16px; }
.dealcard__top { display: flex; justify-content: space-between; gap: 12px; }
.dealcard__title { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.3; margin-top: 6px; color: inherit; }
.dealcard__title:hover { color: #7dd8ff; }
.dealcard__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

.watchrow { display: grid; grid-template-columns: 1fr 74px 52px; gap: 10px; align-items: center; padding: 12px 17px; border-bottom: 1px solid var(--line); color: inherit; }
.watchrow:last-child { border-bottom: none; }
.watchrow:hover { background: rgba(124, 92, 255, 0.06); }
.watchrow__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark { width: 74px; height: 24px; }

@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dealboard { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar__search { display: none; }
  .drawer { width: 100%; }
}

/* ─────────────── Inventory (Step 4) ─────────────── */
.pill { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; padding: 3px 8px; border: 1px solid var(--line-strong); color: var(--text-muted); }
.pill--ready { border-color: rgba(255,255,255,.14); }
.pill--listed { border-color: rgba(124,92,255,.35); background: rgba(124,92,255,.12); color: #c3b4ff; }
.pill--repair { border-color: rgba(255,179,122,.35); color: #ffd9b8; }
.pill--sold { border-color: rgba(46,230,168,.3); background: rgba(46,230,168,.1); color: #a8f0d5; }
.pill--aging { border-color: rgba(255,92,43,.35); background: rgba(255,92,43,.09); color: #ffb9a5; }

.invtabs { display: flex; align-items: center; gap: 6px; padding: 12px 17px; border-bottom: 2px solid var(--line-strong); }
.invtab { font-size: 12px; font-weight: 600; padding: 6px 11px; color: var(--text-muted); }
.invtab:hover { color: var(--text); }
.invtab--on { color: var(--text); background: rgba(124,92,255,.14); }

.itable { display: flex; flex-direction: column; }
.itable__head, .itable__row { display: grid; grid-template-columns: 2.4fr .9fr .8fr .8fr .8fr .7fr .6fr; gap: 14px; align-items: center; }
.itable__head { padding: 11px 17px; border-bottom: 1px solid var(--line); font-size: 9.5px; letter-spacing: .1em; color: var(--text-dim); }
.itable__row { padding: 12px 17px; border-bottom: 1px solid var(--line); color: inherit; }
.itable__row:hover { background: rgba(124,92,255,.06); }
.itable__row:last-child { border-bottom: none; }
.itable__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itable__empty { padding: 28px 17px; text-align: center; }

.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.fieldlbl { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--text-muted); }
.fieldlbl.span2 { grid-column: 1 / -1; }
.fieldlbl input, .fieldlbl select, .fieldlbl textarea, .miniform input, .miniform select {
  background: var(--field); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 12.5px; padding: 9px 11px;
}
.fieldlbl .errorlist { color: #ffb9a5; font-size: 10.5px; padding-left: 14px; margin: 2px 0 0; }
.checklbl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }

.miniform { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.miniform-title { color: var(--text-dim); letter-spacing: .1em; width: 100%; margin-top: 4px; }
.statusbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.salegroup { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.salegroup .fieldlbl { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.salegroup .fieldlbl input { flex: 1; max-width: 160px; }

.calcrows { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.calcrows > div { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.calcrows > div:last-child { border-bottom: none; }
.calcrows span:first-child { color: var(--text-muted); }

.importhit { display: flex; gap: 11px; align-items: flex-start; margin-top: 14px; padding: 13px; border: 1px solid rgba(46,230,168,.25); background: rgba(46,230,168,.06); }
.importhit__dot { width: 7px; height: 7px; flex: none; margin-top: 5px; background: var(--mint); }
.importmiss { margin-top: 14px; padding: 12px; border: 1px solid var(--line-strong); }

/* ─────────────── Dashboard (Step 5) ─────────────── */
.layouttoggle { display: inline-flex; border: 1px solid var(--line-strong); align-self: flex-start; }
.layouttoggle__btn { all: unset; cursor: pointer; font-size: 11.5px; padding: 6px 12px; color: var(--text-muted); }
.layouttoggle__btn + .layouttoggle__btn { border-left: 1px solid var(--line-strong); }
.layouttoggle__btn.is-on { background: rgba(124,92,255,.14); color: var(--text); }

.kpi--ruled { padding: 0; overflow: hidden; }
.kpi__rule { height: 2px; }
.kpi__pad { padding: 15px 16px; }
.kpi__foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 9px; }

.dealrow { display: grid; grid-template-columns: 1fr auto 34px; gap: 14px; align-items: center; padding: 12px 17px; border-bottom: 1px solid var(--line); color: inherit; }
.dealrow:last-child { border-bottom: none; }
.dealrow:hover { background: rgba(124,92,255,.06); }

.cashbar { display: flex; height: 10px; overflow: hidden; background: rgba(255,255,255,.06); }
.cashbar__seg { height: 10px; }
.cashbar__seg--dim { background: rgba(255,255,255,.14); }
.cashlegend { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; }
.cashlegend__row { display: flex; align-items: center; gap: 9px; }
.cashlegend__row .mono { margin-left: auto; }
.cashlegend__dot { width: 8px; height: 8px; flex: none; }

.deals-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.kpi-rail { position: sticky; top: 82px; }
@media (max-width: 1100px) { .deals-grid { grid-template-columns: 1fr; } .kpi-rail { position: static; } }

/* ─────────────── Workspace admin (Step 6) ─────────────── */
.srcgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.srcstate { display: flex; align-items: center; gap: 7px; }

.inviterow { display: flex; gap: 8px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.inviterow input { flex: 1; }
.inviterow input, .inviterow select { background: var(--field); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 12.5px; padding: 8px 10px; }

.mtable__head, .mtable__row { display: grid; grid-template-columns: 1.7fr .9fr 2.2fr .9fr; gap: 14px; align-items: center; padding: 11px 17px; }
.mtable__head { border-bottom: 2px solid var(--line-strong); font-size: 9.5px; letter-spacing: .1em; color: var(--text-dim); }
.mtable__row { border-bottom: 1px solid var(--line); }
.mtable__row--pending { opacity: .7; }
.mcell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar--ghost { background: rgba(255,255,255,.1); color: var(--text-muted); }
.rolepick { background: var(--field); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 11.5px; padding: 5px 8px; }
.permchips { display: flex; flex-wrap: wrap; gap: 5px; }
.permchip { font-size: 10px; padding: 2px 6px; border: 1px solid var(--line); color: var(--text-muted); }

/* ─────────────── Source admin actions (Step 7) ─────────────── */
.panel--paused { opacity: .6; }
.srcactions { display: flex; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.srcactions form { display: inline; }

/* ─────────────── Identification review (Step 8) ─────────────── */
.reviewbanner { display: flex; align-items: center; gap: 12px; padding: 13px 17px; }
.reviewbanner:hover { border-color: var(--violet); }
.reviewrow { display: grid; grid-template-columns: 1fr 220px auto; gap: 12px; align-items: center; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.reviewrow:last-child { border-bottom: none; }

/* ─────────────── Auth SSO + block button (Step 10) ─────────────── */
.btn--block { width: 100%; justify-content: center; }
.auth__sso { margin-top: 16px; }
.auth__sso-rule { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; color: var(--text-dim); font-size: 11px; }
.auth__sso-rule::before, .auth__sso-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ─────────────── Item photos (Step 11) ─────────────── */
.itable__item { display: flex; align-items: center; gap: 11px; }
.itable__thumb { width: 34px; height: 34px; flex: none; object-fit: cover; border: 1px solid var(--line); background: var(--field); }
.itable__thumb--none { background: repeating-linear-gradient(-45deg, var(--field), var(--field) 4px, var(--panel) 4px, var(--panel) 8px); }

.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; padding: 15px 17px; }
.photo { margin: 0; border: 1px solid var(--line); background: var(--panel); }
.photo--cover { border-color: var(--violet); }
.photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--line); }
.photo__bar form { display: inline; }
.linkbtn--danger { color: var(--hot); }
.tag--cover { color: var(--violet); letter-spacing: .1em; font-size: 10px; }

.photoupload { padding: 0 17px 15px; }
.photoupload input[type="file"] { font-size: 11px; color: var(--text-muted); max-width: 100%; }
