/* ==========================================================
   Nick's Side Quest — accounts, admin & maintenance pages
   (builds on styles.css tokens)
   ========================================================== */

[hidden] { display: none !important; }

/* ---------- Shared form bits ---------- */
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  color: var(--text);
  font: inherit; font-size: 15px; font-weight: 400;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255,203,61,.15); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--danger { background: rgba(255,77,94,.14); color: #ff8592; border: 1px solid rgba(255,77,94,.35); }
.btn--danger:hover { background: rgba(255,77,94,.25); }
.btn--soft { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.btn--soft:hover { background: #262d58; }
.link { color: var(--yellow); font-weight: 600; }
.link:hover { text-decoration: underline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--yellow); font-weight: 600; }
.linkbtn:hover { text-decoration: underline; }

.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; margin-bottom: 16px; border: 1px solid; }
.alert--ok    { background: rgba(53,212,154,.1);  border-color: rgba(53,212,154,.35); color: #7ff0c3; }
.alert--error { background: rgba(255,77,94,.1);   border-color: rgba(255,77,94,.35);  color: #ff9aa5; }
.alert--info  { background: rgba(76,141,255,.1);  border-color: rgba(76,141,255,.35); color: #a6c6ff; }
.alert--warn  { background: rgba(255,203,61,.1);  border-color: rgba(255,203,61,.35); color: var(--yellow); }

/* ---------- Auth pages ---------- */
.auth-page { min-height: 100vh; }
.auth-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.auth { position: relative; z-index: 1; max-width: 460px; margin: 0 auto; padding: 48px 16px 64px; }
.auth__brand { display: flex; justify-content: center; margin-bottom: 28px; }
.auth__card {
  padding: 36px 32px;
  background: rgba(22,27,56,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.auth__card h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.auth__sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.auth__card form { display: grid; gap: 14px; }
.auth__foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }
.auth__divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin: 8px 0; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-input { text-align: center; font-family: "Courier New", monospace !important; font-size: 30px !important; letter-spacing: .45em; font-weight: 700 !important; padding-left: .45em !important; }
@media (max-width: 480px) {
  .auth__card { padding: 28px 20px; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Maintenance ("coming soon") ---------- */
.soon { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.soon::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  pointer-events: none;
}
.soon__top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; }
.soon__main { position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; padding: 24px 0 64px; }
.soon h1 { font-size: clamp(38px, 5.6vw, 68px); font-weight: 800; margin-bottom: 20px; }
.soon .lead { margin-bottom: 30px; }
.soon__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.quest-log {
  display: grid; gap: 10px; max-width: 440px;
  padding: 18px 20px;
  background: rgba(22,27,56,.7);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.quest-log h2 { font-family: var(--font-body); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; }
.quest { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.quest__box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid rgba(255,255,255,.25); display: grid; place-items: center; font-size: 12px; }
.quest--done .quest__box { background: var(--green); border-color: var(--green); color: #062b1c; }
.quest--done span:last-child { color: var(--muted); text-decoration: line-through; }
.quest--active .quest__box { border-color: var(--yellow); }
.quest--active .quest__box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); animation: pulse 2s infinite; }
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 4px; }
.progress span { display: block; height: 100%; width: 68%; border-radius: inherit; background: linear-gradient(90deg, var(--yellow), #ff8a3d, var(--red)); animation: grow 1.6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { width: 0; } }
.soon__foot { position: relative; z-index: 2; padding: 22px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .soon__main { grid-template-columns: 1fr; padding-top: 8px; }
  .soon .hero__art { height: 340px; order: -1; }
}
@media (max-width: 600px) {
  .soon .hero__art { height: 290px; }
  .soon .tcg { width: 160px; }
  .soon .tcg--3 { transform: translateX(-66px) translateY(16px) rotate(-14deg); }
  .soon .tcg--2 { transform: translateX(66px) translateY(16px) rotate(12deg); }
}

/* ---------- Admin preview bar (on the shop) ---------- */
.admin-bar {
  position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px;
  background: #1a0f2e;
  border-bottom: 1px solid rgba(166,107,255,.35);
  font-size: 13px; color: #d9c6ff;
}
.admin-bar strong { color: #fff; }
.admin-bar a { color: var(--yellow); font-weight: 600; }
.admin-bar a:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pill--maint { background: rgba(255,203,61,.15); color: var(--yellow); }
.pill--live  { background: rgba(53,212,154,.15); color: var(--green); }

/* ---------- Admin dashboard ---------- */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin__side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px;
  background: #080b1a;
  border-right: 1px solid var(--line);
}
.admin__side .logo { padding: 0 8px 22px; font-size: 18px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 14px; transition: background .2s, color .2s; }
.side-link:hover { background: var(--surface); color: var(--text); }
.side-link.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--yellow); }
.side-link .soon-tag { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--purple); }
.side-sep { margin: 16px 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #5d648a; font-weight: 700; }
.admin__side-foot { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.admin__side-foot strong { display: block; color: var(--text); }

.admin__main { padding: 32px 40px 64px; min-width: 0; }
.admin__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.admin__head h1 { font-size: 32px; font-weight: 800; }
.admin__head p { color: var(--muted); margin-top: 4px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.stat__label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.stat__value { font-family: var(--font-display); font-size: 34px; font-weight: 800; margin-top: 6px; line-height: 1; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 20px; }
.panel h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.panel > p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.panel form.stack { display: grid; gap: 14px; max-width: 460px; }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.mode-switch { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 18px; border-radius: 14px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.mode-switch strong { display: block; font-size: 16px; }
.mode-switch span { color: var(--muted); font-size: 14px; }

.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.roadmap__item { padding: 20px; border-radius: 16px; border: 1px dashed rgba(166,107,255,.4); background: rgba(166,107,255,.06); }
.roadmap__item h3 { font-size: 17px; margin: 10px 0 4px; }
.roadmap__item p { color: var(--muted); font-size: 14px; }
.roadmap__icon { font-size: 24px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; padding: 12px 14px; background: rgba(0,0,0,.2); white-space: nowrap; }
table.data td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: rgba(255,255,255,.02); }
.user-cell strong { display: block; }
.user-cell span { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.actions form { display: inline; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tag--admin    { background: rgba(166,107,255,.18); color: #cfb1ff; }
.tag--customer { background: rgba(76,141,255,.15);  color: #a6c6ff; }
.tag--active   { background: rgba(53,212,154,.15);  color: #7ff0c3; }
.tag--pending  { background: rgba(255,203,61,.15);  color: var(--yellow); }
.tag--disabled { background: rgba(255,77,94,.15);   color: #ff9aa5; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input { flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 14px; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

.admin__mobile-top { display: none; }
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .roadmap, .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .admin { grid-template-columns: 1fr; }
  .admin__side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 4px; }
  .admin__side .logo { width: 100%; padding: 4px 8px 10px; }
  .side-sep, .admin__side-foot { display: none; }
  .side-link { padding: 8px 10px; font-size: 13px; }
  .side-link .soon-tag { display: none; }
  .admin__main { padding: 22px 16px 48px; }
}

/* ---------- Account page ---------- */
.account { max-width: 760px; margin: 0 auto; padding: 0 16px 64px; }
.account__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0 36px; }

/* ---------- Inventory tools ---------- */
.actions--start { justify-content: flex-start; }
.select-sm { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 14px; }
.tag--new { background: rgba(255,203,61,.18); color: var(--yellow); vertical-align: middle; }
.roadmap__item--live { border-style: solid; border-color: rgba(53,212,154,.4); background: rgba(53,212,154,.06); transition: transform .2s; }
.roadmap__item--live:hover { transform: translateY(-2px); }

.inv-table td { vertical-align: middle; }
.inv-thumb { width: 56px; }
.inv-thumb img { width: 44px; border-radius: 4px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.6); }
.qty-input { width: 72px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 14px; transition: border-color .3s; }
.qty-input.is-saved { border-color: var(--green); }

.progress-line { position: relative; height: 30px; margin-bottom: 14px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid var(--line); overflow: hidden; }
.progress-line span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(255,203,61,.35), rgba(255,138,61,.35)); transition: width .3s; }
.progress-line em { position: relative; display: block; padding: 5px 12px; font-style: normal; font-size: 13px; font-weight: 600; }

.rules { display: grid; grid-template-columns: repeat(6, 1fr) auto; gap: 12px; align-items: end; }
.rules .field > span:first-child { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix input { padding-right: 30px !important; }
.input-suffix em { position: absolute; right: 12px; font-style: normal; color: var(--muted); font-size: 14px; pointer-events: none; }
.input-suffix--pre input { padding-left: 26px !important; padding-right: 13px !important; }
.input-suffix--pre em { left: 12px; right: auto; }
@media (max-width: 1100px) { .rules { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .rules { grid-template-columns: 1fr 1fr; } }

.addcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.addcard__form { position: sticky; top: 20px; display: grid; gap: 14px; }
.addcard__form h2 { margin-bottom: 0; }
@media (max-width: 1100px) { .addcard { grid-template-columns: 1fr; } .addcard__form { position: static; } }

.dropzone {
  display: grid; place-items: center; gap: 4px; text-align: center;
  padding: 34px 20px;
  border: 2px dashed rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  color: var(--muted); font-size: 14px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone strong { color: var(--text); font-size: 16px; }
.dropzone__icon { font-size: 30px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--yellow); background: rgba(255,203,61,.06); }
.dropzone--slim { padding: 24px 20px; }
.dropzone--inline { padding: 10px 18px; border-width: 1.5px; border-radius: 999px; font-weight: 600; color: var(--text); white-space: nowrap; }

.scan-status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.2); }
.scan-status--busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 10px; border-radius: 50%; border: 2px solid var(--yellow); border-right-color: transparent; vertical-align: -1px; animation: spin .8s linear infinite; }
.scan-status--ok    { border-color: rgba(53,212,154,.4); color: #7ff0c3; }
.scan-status--warn  { border-color: rgba(255,203,61,.4); color: var(--yellow); }
.scan-status--error { border-color: rgba(255,77,94,.4); color: #ff9aa5; }
@keyframes spin { to { transform: rotate(360deg); } }

.searchbar { display: flex; gap: 8px; flex-wrap: wrap; }
.searchbar input { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 14px; }
.searchbar input:focus { outline: none; border-color: var(--yellow); }
.searchbar .searchbar__num { flex: 0 0 110px; min-width: 0; }

.cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin-top: 16px; }
.cand {
  position: relative; display: grid; gap: 3px; padding: 8px; text-align: left;
  background: rgba(0,0,0,.2); border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .2s, transform .2s;
}
.cand:hover { border-color: rgba(255,255,255,.3); transform: translateY(-2px); }
.cand.is-picked { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,203,61,.2); }
.cand img { width: 100%; aspect-ratio: 245 / 342; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.cand__name { font-size: 13px; font-weight: 700; line-height: 1.25; margin-top: 4px; }
.cand__meta { font-size: 11px; color: var(--muted); line-height: 1.3; }
.cand__score { justify-self: start; margin-top: 2px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; background: rgba(255,255,255,.08); color: var(--muted); }
.cand__score.is-high { color: #062b1c; background: var(--green); }
.cand.is-best::after { content: "Best match"; position: absolute; top: 12px; left: 12px; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; background: var(--yellow); color: #1a1400; }

.picked { display: flex; gap: 16px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(0,0,0,.2); border: 1px solid var(--line); min-height: 120px; }
.picked__imgs { display: flex; gap: 8px; flex: none; }
.picked__imgs img { width: 110px; aspect-ratio: 245 / 342; object-fit: cover; border-radius: 6px; box-shadow: 0 8px 18px -8px rgba(0,0,0,.7); }
.picked__empty { align-self: center; color: var(--muted); font-size: 14px; }
.picked__meta { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.picked__meta strong { color: var(--text); font-size: 18px; font-family: var(--font-display); }
@media (max-width: 520px) { .picked { flex-direction: column; } .picked__imgs img { width: 96px; } }

.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 520px) { .field-row--3 { grid-template-columns: 1fr; } }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg__opt { cursor: pointer; }
.seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg__opt span { display: inline-grid; place-items: center; min-width: 56px; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: rgba(0,0,0,.2); font-weight: 800; font-size: 13px; color: var(--muted); transition: all .15s; }
.seg__opt input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.seg__opt--nm  input:checked + span { background: #12392c; color: #5ef0b4; border-color: rgba(94,240,180,.6); }
.seg__opt--lp  input:checked + span { background: #10284a; color: #8fc0ff; border-color: rgba(143,192,255,.6); }
.seg__opt--mp  input:checked + span { background: #3a3110; color: #ffd75e; border-color: rgba(255,215,94,.6); }
.seg__opt--hp  input:checked + span { background: #3d2310; color: #ffa45e; border-color: rgba(255,164,94,.6); }
.seg__opt--dmg input:checked + span { background: #3d1218; color: #ff7d8a; border-color: rgba(255,125,138,.6); }

.field input[type=radio], .field input[type=checkbox] { width: auto; padding: 0; border: 0; background: none; box-shadow: none; flex: none; }
.price-mode { display: grid; gap: 8px; }
.price-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(0,0,0,.2); cursor: pointer; }
.price-opt:has(input:checked) { border-color: var(--yellow); background: rgba(255,203,61,.05); }
.price-opt > input { margin-top: 4px; accent-color: var(--yellow); }
.price-opt > span { display: grid; gap: 6px; flex: 1; color: var(--text); font-weight: 400; }
.price-opt em { font-style: normal; color: var(--muted); font-size: 13px; }
.price-opt b { color: var(--text); }
.price-opt .price-now { color: var(--yellow); }
.price-opt .input-suffix { max-width: 160px; }

.checks { display: grid; gap: 8px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--yellow); }
.form-msg-line { min-height: 1.2em; font-size: 14px; font-weight: 600; color: var(--yellow); }

.map-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 1000px) { .map-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .map-grid { grid-template-columns: 1fr; } }

.lookup-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lookup-top .searchbar { flex: 1; }
.lookup-results { display: grid; gap: 16px; }
.lk { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; scroll-margin-top: 20px; }
.lk__img { width: 100%; aspect-ratio: 245 / 342; border-radius: 10px; background: var(--surface-2); box-shadow: 0 14px 28px -14px rgba(0,0,0,.8); object-fit: cover; }
.lk__body { min-width: 0; display: grid; gap: 14px; align-content: start; }
.lk__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.lk__head h3 { font-size: 24px; margin: 6px 0 2px; }
.lk__head p { color: var(--muted); font-size: 14px; }
.lk h4 { font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.lk h4 .hint { text-transform: none; letter-spacing: 0; margin-left: 6px; }
.lk__cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.lk--loading .lk__img { animation: shimmer 1.2s ease-in-out infinite alternate; }
@keyframes shimmer { to { opacity: .4; } }
table.mini td, table.mini th { padding: 8px 10px; font-size: 13px; }
.cond-prices { display: flex; gap: 8px; flex-wrap: wrap; }
.cp { display: grid; justify-items: center; gap: 4px; padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,.2); border: 1px solid var(--line); min-width: 84px; }
.cp b { font-family: var(--font-display); font-size: 18px; }
.cp em { font-style: normal; font-size: 11px; color: var(--muted); }
@media (max-width: 900px) { .lk { grid-template-columns: 1fr; } .lk__img { max-width: 200px; } .lk__cols { grid-template-columns: 1fr; } }

/* ==========================================================
   Card Scanner (mobile-first)
   ========================================================== */
.scn-gate { text-align: center; }
.scn-gate .auth__sub { margin-bottom: 22px; }
.scn-gate__icon { width: 76px; height: 76px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 22px; color: var(--yellow); background: rgba(255,203,61,.1); border: 1px solid rgba(255,203,61,.3); }
.scn-gate__actions { display: grid; gap: 10px; }

.scanner-page { min-height: 100vh; padding-bottom: 96px; }
.scn { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.scn__top { display: flex; align-items: center; gap: 12px; padding: 14px 0 12px; }
.scn__logo img { display: block; }
.scn__title { flex: 1; display: grid; line-height: 1.2; }
.scn__title strong { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.scn__credits { font-size: 12px; font-weight: 600; color: var(--green); }
.scn__credits.is-low { color: var(--yellow); }
.scn__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 16px; }
.scn__icon:active { transform: scale(.95); }

.scn__mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.scn__mode button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 8px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-weight: 700; font-size: 15px; transition: background .2s, color .2s; }
.scn__mode button em { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.08); }
.scn__mode button.is-on[data-mode=sell] { background: linear-gradient(135deg, #1d5c45, #12392c); color: #fff; }
.scn__mode button.is-on[data-mode=buy]  { background: linear-gradient(135deg, #2a4a8a, #10284a); color: #fff; }
.scn__mode button.is-on em { background: rgba(255,255,255,.18); }

.scn__cam { position: relative; aspect-ratio: 3 / 4; max-height: 62vh; width: 100%; margin: 0 auto; border-radius: 22px; overflow: hidden; background: #05060f; border: 1px solid var(--line); }
.scn__cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scn__cam.is-frozen video { filter: brightness(.5) blur(1px); }
.scn__cam.is-flash::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: .7; animation: flash .18s ease-out forwards; }
@keyframes flash { to { opacity: 0; } }
.scn__guide { position: absolute; left: 50%; top: 47%; height: 78%; aspect-ratio: 63 / 88; transform: translate(-50%, -50%); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(5,6,15,.45); pointer-events: none; }
.scn__guide i { position: absolute; width: 28px; height: 28px; border: 4px solid var(--yellow); }
.scn__guide i:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.scn__guide i:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.scn__guide i:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.scn__guide i:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.scn__cam:not(.is-live) .scn__guide { box-shadow: none; opacity: .35; }
.scn__hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 13px; font-weight: 600; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.8); pointer-events: none; }
.scn__camoff { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; background: rgba(11,14,32,.92); }
.scn__camoff-icon { font-size: 40px; }
.scn__camoff strong { font-size: 18px; }
.scn__camoff p { color: var(--muted); font-size: 14px; max-width: 300px; }
.scn__busy { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; }
.scn__busy p { font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.9); max-width: 280px; }
.scn__spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid rgba(255,203,61,.25); border-top-color: var(--yellow); animation: spin .8s linear infinite; }

.scn__controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 16px 0 6px; }
.scn__side { justify-self: center; display: grid; justify-items: center; gap: 2px; min-width: 76px; padding: 8px 10px; border: 0; border-radius: 14px; background: none; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.scn__side:active { background: var(--surface); }
.scn__side-icon { font-size: 24px; }
.scn__shutter { width: 82px; height: 82px; padding: 6px; border-radius: 50%; border: 4px solid #fff; background: none; transition: transform .15s; }
.scn__shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, var(--yellow), var(--yellow-2)); box-shadow: 0 8px 26px -6px rgba(255,190,40,.7); transition: transform .15s; }
.scn__shutter:active span { transform: scale(.88); }
.scn__shutter.is-busy span { animation: pulse-shutter 1s ease-in-out infinite; }
.scn__shutter:disabled { opacity: .35; }
@keyframes pulse-shutter { 50% { transform: scale(.82); opacity: .7; } }

.scn__search { display: flex; gap: 8px; margin: 8px 0; }
.scn__search input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.scn__search input:focus { outline: none; border-color: var(--yellow); }
.scn__search #searchNum { flex: 0 0 76px; }

.scn__result { margin-top: 14px; scroll-margin-top: 12px; }
.res { display: grid; grid-template-columns: 104px 1fr; gap: 14px 16px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); animation: fadeUp .35s both; }
.res--empty { grid-template-columns: 1fr; }
.res__img { width: 100%; aspect-ratio: 245 / 342; object-fit: cover; border-radius: 8px; box-shadow: 0 14px 26px -12px rgba(0,0,0,.85); background: var(--surface-2); }
.res__img--none { display: grid; place-items: center; font-size: 32px; color: var(--muted); }
.res__body { min-width: 0; display: grid; gap: 10px; align-content: start; }
.res__full { grid-column: 1 / -1; display: grid; gap: 10px; }
.scn__next { justify-self: center; padding: 8px 14px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.scn__next:active { background: var(--surface-2); }
.res__body h2 { font-size: 22px; font-weight: 800; }
.res__sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.res__variants { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--muted); font-size: 12px; font-weight: 600; }
.vchip.is-on { border-color: var(--yellow); color: var(--text); background: rgba(255,203,61,.1); }
.res__variant-one { font-size: 12px; color: var(--muted); }
.res__prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.res__price { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.res__price span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.res__price b { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
[data-mode=sell] .res__price--yours { background: rgba(53,212,154,.1); border-color: rgba(53,212,154,.4); }
[data-mode=sell] .res__price--yours b { color: #7ff0c3; }
[data-mode=buy]  .res__price--yours { background: rgba(76,141,255,.12); border-color: rgba(76,141,255,.45); }
[data-mode=buy]  .res__price--yours b { color: #a6c6ff; }
.res__meta { font-size: 11px; color: var(--muted); margin-top: -4px; }
.res__nodata { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.2); }
.res__nodata strong { font-size: 17px; }
.res__nodata span { font-size: 13px; color: var(--muted); }
.res__nodata--big { text-align: center; padding: 22px 16px; }
.res__custom { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.res__custom input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 16px; }
.res__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.res--empty .res__actions { justify-content: center; }
.res__actions .btn { flex: 1; padding: 13px 18px; }
.qty { display: inline-flex; align-items: center; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.qty button { width: 38px; height: 44px; border: 0; background: none; color: var(--text); font-size: 20px; font-weight: 700; }
.qty input { width: 42px; text-align: center; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--sm button { width: 32px; height: 34px; font-size: 17px; }
.qty--sm span { min-width: 22px; text-align: center; font-weight: 700; }
@media (max-width: 380px) { .res { grid-template-columns: 92px 1fr; gap: 12px; } .res__price b { font-size: 21px; } }

.scn__alts { margin-top: 18px; }
.scn__alts h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font-body); }
.scn__alts .cand-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.scn__alts.is-prominent h3 { color: var(--yellow); font-size: 15px; letter-spacing: .04em; }

.scn__totalbar {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40;
  transform: translateX(-50%);
  width: min(528px, calc(100% - 32px));
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-radius: 18px; border: 1px solid rgba(255,203,61,.35);
  background: rgba(22,27,56,.95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.8);
  color: var(--text); text-align: left;
}
.scn__totalbar.is-empty { opacity: .75; }
.scn__totalbar.is-bump { animation: tb-bump .4s ease; }
@keyframes tb-bump { 50% { transform: translateX(-50%) scale(1.04); } }
.scn__tb-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.scn__tb-count b { font-family: var(--font-display); font-size: 20px; color: var(--text); }
.scn__tb-col { display: grid; line-height: 1.15; margin-left: auto; }
.scn__tb-col em { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.scn__tb-col b { font-family: var(--font-display); font-size: 17px; }
.scn__tb-col--yours { margin-left: 0; }
[data-mode=sell] .scn__tb-col--yours b { color: #7ff0c3; }
[data-mode=buy]  .scn__tb-col--yours b { color: #a6c6ff; }
.scn__tb-chev { color: var(--muted); font-size: 12px; }

.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .2s; }
.sheet__panel {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
  display: grid; gap: 16px; align-content: start;
  padding: 10px 20px max(20px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0; background: var(--bg-2); border: 1px solid var(--line); border-bottom: 0;
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: translate(-50%, 0); }
.sheet__grab { width: 44px; height: 5px; margin: 0 auto; border-radius: 99px; background: rgba(255,255,255,.2); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet__head h2 { font-size: 22px; font-weight: 800; }
.sheet__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 4px; }

.tot-summary { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; }
.tot-summary > div { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.tot-summary em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.tot-summary b { font-family: var(--font-display); font-size: 22px; }
[data-mode=sell] .tot-summary .is-yours b { color: #7ff0c3; }
[data-mode=buy]  .tot-summary .is-yours b { color: #a6c6ff; }
.tot-summary .hint { grid-column: 1 / -1; }
.tot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tot-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tot-item img, .tot-item__noimg { width: 44px; flex: none; aspect-ratio: 245 / 342; border-radius: 4px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.tot-item__info { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 12px; color: var(--muted); }
.tot-item__info strong { color: var(--text); font-size: 14px; }
.tot-item__info b { color: var(--text); }
.tot-item__info b.no { color: var(--muted); font-weight: 600; }
.tot-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }

.set-block { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.set-block--col { display: grid; justify-content: stretch; gap: 10px; }
.set-block label { display: grid; gap: 2px; }
.set-block label span { font-size: 12px; color: var(--muted); }
.pct-input { display: flex; align-items: center; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.pct-input button { width: 40px; height: 44px; border: 0; background: none; color: var(--text); font-size: 20px; font-weight: 700; }
.pct-input input { width: 56px; text-align: right; border: 0; background: none; color: var(--text); font: inherit; font-size: 18px; font-weight: 800; -moz-appearance: textfield; }
.pct-input input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pct-input em { font-style: normal; color: var(--muted); font-weight: 700; padding-right: 4px; }
.pill-group { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pill-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pill-opt span { display: grid; place-items: center; padding: 11px 4px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(0,0,0,.25); font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.pill-opt input:checked + span { border-color: var(--yellow); color: #1a1400; background: var(--yellow); }
.pill-opt input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }
.scanner-page .toast { top: max(14px, env(safe-area-inset-top)); bottom: auto; transform: translate(-50%, -180%); pointer-events: none; z-index: 90; }
.scanner-page .toast.is-visible { transform: translate(-50%, 0); }

/* Admin: scanner column */
.scan-cell { display: grid; gap: 6px; min-width: 170px; }
.scan-cell form { display: flex; gap: 6px; align-items: center; }
.scan-cell input[type=number] { width: 64px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 13px; }
.tag--scanner { background: rgba(255,203,61,.15); color: var(--yellow); }

/* ---------- Admin: manage account ---------- */
.field__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.field__top .link { font-size: 12px; font-weight: 600; }
.perm-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 150px; }
.user-facts { display: grid; grid-template-columns: repeat(4, auto); gap: 8px; }
.user-facts > div { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.user-facts em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.user-facts b { font-size: 15px; }
@media (max-width: 700px) { .user-facts { grid-template-columns: 1fr 1fr; } }
.alert form { display: inline; }
.perm-list { display: grid; gap: 2px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.perm { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: rgba(0,0,0,.18); cursor: pointer; }
.perm > span:first-child { display: grid; gap: 2px; }
.perm strong { font-size: 15px; }
.perm em { font-style: normal; font-size: 12px; color: var(--muted); }
.perm select, .perm__num { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--text); font: inherit; font-size: 14px; }
.perm__num { width: 90px; }
.switch { position: relative; flex: none; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.14); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--yellow); outline-offset: 2px; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.sec-row:first-of-type { border-top: 0; padding-top: 4px; }
.sec-row > div, .sec-row summary > div { display: grid; gap: 2px; }
.sec-row strong { font-size: 15px; }
.sec-row span:not(.btn) { font-size: 13px; color: var(--muted); }
.sec-row--details { display: block; }
.sec-row--details summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.sec-row--details summary::-webkit-details-marker { display: none; }
.sec-row--danger strong { color: #ff9aa5; }
.sec-row .btn { white-space: nowrap; flex: none; }

/* ---------- Scanner: auto scan + inventory mode ---------- */
.scn__mode--3 { grid-template-columns: repeat(3, 1fr); }
.scn__mode--3 button { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 14px; }
.scn__mode button.is-on[data-mode=inv] { background: linear-gradient(135deg, #5a3a9a, #2a1a4a); color: #fff; }
.scn__guide { --p: 0; }
.scn__guide i { transition: border-color .2s; }
.scn__guide.is-holding i { border-color: var(--green); }
.scn__hold { position: absolute; left: 10%; right: 10%; bottom: -16px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.18); overflow: hidden; opacity: 0; transition: opacity .2s; }
.scn__hold::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p)); background: var(--green); }
.scn__guide.is-holding .scn__hold { opacity: 1; }
.scn__autotag { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 3px 9px; border-radius: 999px; background: var(--green); color: #062b1c; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.scn__autotag::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #062b1c; vertical-align: 1px; animation: pulse-dot 1.2s ease-in-out infinite; }
@keyframes pulse-dot { 50% { opacity: .2; } }
.scn__flashmsg { position: absolute; left: 12px; right: 12px; top: 44px; z-index: 4; display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(6,43,28,.92); border: 1px solid rgba(53,212,154,.5); box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); animation: fadeUp .25s both; text-align: center; }
.scn__flashmsg b { font-size: 17px; }
.scn__flashmsg span { font-size: 13px; color: #b9f5dc; }
.scn__flashmsg strong { color: #fff; }
.scn__flashmsg--warn { background: rgba(58,49,16,.94); border-color: rgba(255,203,61,.5); }
.scn__flashmsg--warn span { color: #ffe9a8; }

.set-block__text { display: grid; gap: 2px; }
.set-block__text span { font-size: 12px; color: var(--muted); }
label.set-block { cursor: pointer; }
.set-group-title { margin-top: 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: #cfb1ff; }
.pill-group--2 { grid-template-columns: 1fr 1fr; }
.pill-opt--nm  input:checked + span { background: #12392c; color: #5ef0b4; border-color: rgba(94,240,180,.7); }
.pill-opt--lp  input:checked + span { background: #10284a; color: #8fc0ff; border-color: rgba(143,192,255,.7); }
.pill-opt--mp  input:checked + span { background: #3a3110; color: #ffd75e; border-color: rgba(255,215,94,.7); }
.pill-opt--hp  input:checked + span { background: #3d2310; color: #ffa45e; border-color: rgba(255,164,94,.7); }
.pill-opt--dmg input:checked + span { background: #3d1218; color: #ff7d8a; border-color: rgba(255,125,138,.7); }
.pill-btn { padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(0,0,0,.25); color: var(--muted); font-weight: 700; font-size: 13px; }
.pill-btn.is-on { border-color: var(--yellow); color: var(--text); background: rgba(255,203,61,.1); }
.pill-btn:disabled { opacity: .4; }
.res__field { display: grid; gap: 6px; }
.res__field > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.seg--sm { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.seg__btn { padding: 10px 0; border-radius: 10px; border: 1.5px solid var(--line); background: rgba(0,0,0,.2); color: var(--muted); font-weight: 800; font-size: 13px; }
.seg__btn.is-on.seg__opt--nm  { background: #12392c; color: #5ef0b4; border-color: rgba(94,240,180,.6); }
.seg__btn.is-on.seg__opt--lp  { background: #10284a; color: #8fc0ff; border-color: rgba(143,192,255,.6); }
.seg__btn.is-on.seg__opt--mp  { background: #3a3110; color: #ffd75e; border-color: rgba(255,215,94,.6); }
.seg__btn.is-on.seg__opt--hp  { background: #3d2310; color: #ffa45e; border-color: rgba(255,164,94,.6); }
.seg__btn.is-on.seg__opt--dmg { background: #3d1218; color: #ff7d8a; border-color: rgba(255,125,138,.6); }
.res__priceinput input { width: 100%; padding: 12px 13px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 18px; font-weight: 700; }
.res__priceinput input:focus { outline: none; border-color: var(--yellow); }
.res__price.is-muted { opacity: .45; }
[data-mode=inv] .res__price--yours { background: rgba(166,107,255,.12); border-color: rgba(166,107,255,.45); }
[data-mode=inv] .res__price--yours b { color: #d9c6ff; }
[data-mode=inv] .scn__tb-col--yours b { color: #d9c6ff; }
[data-mode=inv] .scn__totalbar { border-color: rgba(166,107,255,.45); }
.res__added { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-radius: 14px; background: rgba(53,212,154,.12); border: 1px solid rgba(53,212,154,.45); color: #7ff0c3; font-weight: 700; font-size: 14px; }
.tot-summary--2 { grid-template-columns: 1fr 1fr; }

/* ---------- Scanner: identifier mode (set code + number) ---------- */
.scn__cam.is-id .scn__guide { height: auto; width: 88%; aspect-ratio: 3.4 / 1; top: 50%; border-radius: 12px; }
.scn__cam.is-id .scn__guide i { width: 22px; height: 22px; border-color: #8fc0ff; }
.scn__cam.is-id .scn__hint { padding: 0 16px; }
.scn__idcancel { position: absolute; top: 10px; right: 10px; z-index: 3; padding: 7px 12px; border: 0; border-radius: 999px; background: rgba(11,14,32,.85); color: var(--text); font-size: 13px; font-weight: 700; }
.scn__idlink { display: block; margin: 4px auto 0; padding: 8px 12px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.scn__idlink u { color: #8fc0ff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.scn__alts .scn__idlink { margin-top: 12px; }
.cand__noimg { display: grid; place-items: center; width: 100%; aspect-ratio: 245 / 342; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 24px; }
.dropzone--link { display: block; margin-top: 10px; padding: 0; border: 0; background: none; text-align: left; font-size: 13px; color: var(--muted); }
.dropzone--link u { color: #8fc0ff; }
.lk__src { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; background: rgba(76,141,255,.18); color: #a6c6ff; text-transform: none; }

/* ---------- Inventory: price changes + bulk updates ---------- */
.mv { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.mv em { font-style: normal; opacity: .8; font-weight: 600; }
.mv--up { color: var(--green); }
.mv--down { color: #ff7d8a; }
a.mv:hover { text-decoration: underline; }
.stat--moves .stat__value { display: flex; gap: 16px; font-size: 26px; }
.stat--moves .mv { font-size: 26px; font-family: var(--font-display); }
.inv-notice { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inv-count { margin: -4px 0 10px; }
.inv-check { width: 34px; }
.inv-check input { width: 17px; height: 17px; accent-color: var(--yellow); cursor: pointer; }
.inv-table tbody tr { cursor: pointer; }
.inv-table tbody tr.is-selected td { background: rgba(255,203,61,.07); }
.mv-cell .mv { margin-left: 4px; }

.bulkbar {
  position: fixed; left: 50%; bottom: 18px; z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: min(880px, calc(100% - 32px)); padding: 12px 16px;
  border-radius: 16px; border: 1px solid rgba(255,203,61,.4);
  background: rgba(22,27,56,.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.8);
}
.bulkbar__spacer { flex: 1; }
.bulkbar b { font-family: var(--font-display); font-size: 18px; }
.admin-page:has(.bulkbar:not([hidden])) .admin__main { padding-bottom: 110px; }

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal__panel { position: relative; width: min(820px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: grid; gap: 16px; padding: 24px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal__head h2 { font-size: 24px; font-weight: 800; }
.modal__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 14px 24px; background: var(--bg-2); border-top: 1px solid var(--line); }
.pe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; align-items: end; }
.pe-grid .pe-cond, .pe-grid .field:has(.pill-group--5) { grid-column: 1 / -1; }
.pill-group--3 { grid-template-columns: repeat(3, 1fr); }
.pill-group--5 { grid-template-columns: repeat(5, 1fr); }
.check.is-off { opacity: .45; }
.pe-summary { padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); font-size: 14px; line-height: 1.7; }
.pe-summary .mv { font-size: 14px; margin-right: 6px; }
.pe-table { max-height: 300px; overflow-y: auto; }
@media (max-width: 640px) { .pe-grid { grid-template-columns: 1fr; } .pill-group--5 { grid-template-columns: repeat(3, 1fr); } }

/* Scanner: "Which version is yours?" (normal / holo / reverse holo) */
.res__vask { display: grid; gap: 6px; }
.res__vask > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.res__vask.is-asking { padding: 10px; border-radius: 12px; border: 1.5px dashed rgba(255,203,61,.55); background: rgba(255,203,61,.06); }
.res__vask.is-asking > span { color: var(--yellow); }
.res__vask .vchip { font-size: 13px; padding: 8px 12px; }
