/* ============================================================
   COLLECTORS CERTIFIED GRADING — collection.css
   "My Collection" customer page. Builds on style.css tokens and
   reuses pf-* (shell/panels) and cd-* (card info / subgrades)
   classes from pages.css. New selectors are col- prefixed.
   ============================================================ */

/* ---------------- greeting header ---------------- */
.col-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.col-greeting { color: var(--muted); font-size: 15.5px; margin-top: 6px; min-height: 22px; }
.col-greeting b { color: var(--text); }
.col-signout {
  font-size: 12.5px; color: var(--dim); font-weight: 600;
  border: 1px solid rgba(166,196,224,.2); background: rgba(166,196,224,.05);
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.col-signout:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---------------- subtab bar ---------------- */
.col-tabs {
  display: inline-flex; gap: 4px; padding: 5px; margin: 30px auto 26px;
  background: rgba(6,16,25,.55); border: 1px solid rgba(166,196,224,.15);
  border-radius: 999px; max-width: 100%; overflow-x: auto;
}
.col-tabs-wrap { display: flex; justify-content: center; }
.col-tab {
  font-family: var(--font-display); font-size: 14.5px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
  padding: 10px 24px; border-radius: 999px; border: none; cursor: pointer;
  background: transparent; color: var(--muted);
  transition: background .25s, color .25s, box-shadow .25s;
}
.col-tab:hover { color: var(--text); }
.col-tab[aria-selected="true"] {
  background: var(--grad); color: #04121f; box-shadow: 0 4px 18px rgba(20,146,253,.4);
}
.col-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.col-tab .col-tab-lock { margin-left: 7px; opacity: .8; }

.col-panel[hidden] { display: none; }
/* D156: the tab bubbles are flex children, and a display rule beats the hidden
   attribute (the trap D112 cost this site a whole round). Doubling the attribute
   lifts specificity so a hidden tab really is gone, whatever the cascade says. */
.col-tabs [hidden][hidden] { display: none !important; }

/* ---------------- catalog header (count line) ---------------- */
.col-cat-head { margin-bottom: 20px; }
.col-cat-count {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim);
}

/* ---------------- graded-card grid catalog ---------------- */
.col-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px; margin-bottom: 10px;
}
.col-tile {
  background: linear-gradient(180deg, rgba(166,196,224,.06), rgba(166,196,224,.015));
  border: 1px solid rgba(166,196,224,.14); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.col-tile:hover {
  border-color: rgba(54,212,249,.4); transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(4,12,20,.5);
}

/* portrait card image (or themed placeholder) with the grade badge overlaid */
.col-tile-media { position: relative; container-type: inline-size; }
.col-tile-img {
  width: 100%; aspect-ratio: 720 / 1190; object-fit: cover; display: block;
  border-radius: 10px; border: 1px solid rgba(200,230,255,.18); background: rgba(6,16,25,.6);
}
.col-tile-media .col-ph {
  aspect-ratio: 720 / 1190; border-radius: 10px;
  background: linear-gradient(170deg, rgba(6,16,25,.9), rgba(22,39,53,.6));
  border: 1px dashed rgba(166,196,224,.25);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--dim); font-size: 10.5px; text-align: center; padding: 14px;
}
.col-tile-media .col-ph img { width: 60px; opacity: .5; border: none; }

/* small grade badge, top-right corner of the image */
.col-tile-grade {
  position: absolute; top: 8px; right: 8px;
  min-width: 30px; padding: 4px 9px; border-radius: 9px;
  font-family: var(--font-mark); font-size: 15px; font-weight: 700; line-height: 1;
  text-align: center; color: #04121f; background: var(--grad);
  box-shadow: 0 3px 12px rgba(4,12,20,.55);
}

.col-tile-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.col-tile-title {
  font-family: var(--font-display); font-size: 15.5px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.col-tile-cert {
  font-size: 12px; color: var(--dim); font-family: var(--font-mark);
  display: flex; align-items: center; gap: 5px; min-width: 0;
}
.col-tile-cert span { color: var(--muted); letter-spacing: .5px; }
/* D66: card-details link for CCG-graded certs. It is a LINK wearing the button
   styling of .col-tile-act (real href, so it opens in a new tab / can be copied)
   — everything but the anchor-only bits comes from that shared class, so it can
   never drift from the Remove button sitting beside it in the footer row. */
.col-tile-details {
  display: inline-flex; align-items: center; flex: none;
  color: var(--muted); text-decoration: none;
}
.col-tile-details[hidden] { display: none; }
/* D87: a card that entered the collection by QR scan says so, quietly */
.col-tile-sub { font-size: 11.5px; color: var(--dim); letter-spacing: .02em; }

/* ---------------- empty state ---------------- */
.col-empty {
  text-align: center; max-width: 560px; margin: 20px auto; padding: 48px 30px;
}
.col-empty img { width: 96px; opacity: .45; margin: 0 auto 20px; }
.col-empty h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 10px;
}
.col-empty p { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }

/* ---------------- locked placeholder panels (Portfolio / Watch List) ---------------- */
.col-locked {
  text-align: center; max-width: 560px; margin: 10px auto; padding: 52px 34px;
}
.col-locked-icon {
  width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 18px;
  background: var(--grad-soft); border: 1px solid rgba(54,212,249,.3);
  display: flex; align-items: center; justify-content: center; color: var(--cyan);
}
.col-locked h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 12px;
}
.col-locked p { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.col-locked .col-locked-tag {
  display: inline-block; font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--cyan);
  background: rgba(54,212,249,.08); border: 1px solid rgba(54,212,249,.3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}

.col-loading, .col-error { text-align: center; color: var(--dim); padding: 46px 20px; font-size: 14px; }
.col-error { color: #F76F72; }

/* ---------------- in-progress draft (resume) card ---------------- */
.col-draft {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; padding: 16px 20px; margin-bottom: 18px;
  border: 1px solid rgba(54,212,249,.32);
  background: linear-gradient(180deg, rgba(54,212,249,.08), rgba(54,212,249,.02));
}
.col-draft-info { display: flex; align-items: center; gap: 14px; min-width: 0; }
.col-draft-info > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.col-draft-info b { font-size: 15px; }
.col-draft-badge {
  flex: none; font: 700 11px/1 'Space Grotesk', system-ui, sans-serif; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bg, #0a0e13);
  background: var(--grad, linear-gradient(90deg, #1492FD, #57DAF9));
  padding: 6px 10px; border-radius: 999px;
}
.col-draft-sub { color: var(--muted); font-size: 13px; }
@media (max-width: 480px) { .col-draft .btn { width: 100%; } }

/* ---------------- draft banner action buttons ---------------- */
.col-draft-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   CLOUD CARD BUBBLE — left rail + panels (Rev 7.22.2)
   ============================================================ */
.col-tab-cc { margin-right: 7px; vertical-align: -2px; opacity: .9; }

.cc-shell { display: grid; grid-template-columns: 208px 1fr; gap: 22px; align-items: start; }
.cc-rail {
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 88px;
  background: rgba(6,16,25,.5); border: 1px solid rgba(166,196,224,.14);
  border-radius: 16px; padding: 8px;
}
.cc-rail-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
  border: none; background: transparent; border-radius: 11px; padding: 12px 14px; cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.cc-rail-item svg { flex: none; opacity: .85; }
.cc-rail-item:hover { color: var(--text); background: rgba(166,196,224,.05); }
.cc-rail-item[aria-selected="true"] { background: var(--grad); color: #04121f; box-shadow: 0 4px 16px rgba(20,146,253,.32); }
.cc-rail-item[aria-selected="true"] svg { opacity: 1; }
.cc-rail-item:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cc-rail-panels { min-width: 0; }
.col-rail-panel[hidden] { display: none; }

@media (max-width: 720px) {
  .cc-shell { grid-template-columns: 1fr; gap: 16px; }
  .cc-rail { flex-direction: row; position: static; overflow-x: auto; }
  .cc-rail-item { justify-content: center; flex: 1 0 auto; padding: 10px 14px; }
}

/* ============================================================
   COLLECTION TOOLBAR (search / Category-Year-Grade filters / type pills)
   ============================================================ */
.col-toolbar { margin-bottom: 22px; display: flex; flex-direction: column; gap: 14px; }
.col-toolbar-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.col-add-btn { flex: none; white-space: nowrap; }
.col-search { position: relative; flex: 1 1 240px; min-width: 180px; display: flex; align-items: center; }
.col-search svg { position: absolute; left: 14px; color: var(--dim); pointer-events: none; }
.col-search input {
  width: 100%; background: rgba(6,16,25,.5); border: 1px solid rgba(166,196,224,.18);
  border-radius: 12px; padding: 11px 14px 11px 40px; color: var(--text);
  font-family: var(--font-body); font-size: 14px;
}
.col-search input::placeholder { color: rgba(166,196,224,.55); }
.col-search input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(54,212,249,.15); }
.col-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.col-pill {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); cursor: pointer;
  background: rgba(6,16,25,.45); border: 1px solid rgba(166,196,224,.18);
  border-radius: 999px; padding: 8px 16px; transition: color .2s, border-color .2s, background .2s;
}
.col-pill:hover { color: var(--text); border-color: rgba(54,212,249,.4); }
.col-pill.is-active { color: #04121f; background: var(--grad); border-color: transparent; }

/* ---------------- D87 structured filters (Category / Year / Grade) ----------------
   A labelled row of dropdowns between the search box and the type pills. Their
   options come from the loaded cards, so the row shrinks to whatever the
   collection actually holds; each one composes with the search and the pills. */
.col-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.col-filter { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.col-filter > span {
  font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
}
.col-filter select {
  background: rgba(6,16,25,.5); border: 1px solid rgba(166,196,224,.18);
  border-radius: 10px; padding: 9px 12px; color: var(--text);
  font-family: var(--font-body); font-size: 13.5px; color-scheme: dark; cursor: pointer;
  min-width: 150px; max-width: 100%;
}
.col-filter select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(54,212,249,.15); }
@media (max-width: 560px) { .col-filter, .col-filter select { flex: 1 1 140px; min-width: 0; } }

/* ---------------- inventory tile extras ---------------- */
.col-tile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.col-type-chip {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; border-radius: 6px; padding: 3px 8px; border: 1px solid;
}
.col-type-chip.is-graded { color: var(--green); background: rgba(61,214,140,.1); border-color: rgba(61,214,140,.4); }
.col-type-chip.is-raw { color: var(--cyan); background: rgba(54,212,249,.1); border-color: rgba(54,212,249,.35); }
.col-type-chip.is-vaulted { color: #FFD166; background: rgba(255,209,102,.1); border-color: rgba(255,209,102,.4); }
/* D82: pregraded — its own colour so it never reads as a graded cert */
.col-type-chip.is-pregrade { color: var(--orange); background: rgba(255,122,26,.1); border-color: rgba(255,122,26,.4); }
.col-inv-chip {
  font-family: var(--font-mark); font-size: 11px; color: var(--dim);
  background: rgba(166,196,224,.06); border: 1px solid rgba(166,196,224,.16);
  border-radius: 6px; padding: 3px 8px;
}
.col-ph-inv span { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
/* The tile footer: a LEFT slot — Details on a graded cert, the pregrade value on
   a pregrade, nothing on a card with neither — and Remove on the right. Remove is
   pushed over by its own auto margin rather than by space-between, so it stays
   right even when the left slot renders empty. */
.col-tile-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.col-tile-actions[hidden] { display: none; }
.col-tile-actions .col-tile-del { margin-left: auto; }
/* Worn by both footer controls. line-height is PINNED because one of them is a
   <button> and the other an <a>: left on `normal` the two box out to different
   heights and sit visibly uneven beside each other. */
.col-tile-act {
  font-family: var(--font-body); font-size: 12px; font-weight: 600; line-height: 1.25;
  color: var(--muted);
  background: rgba(166,196,224,.06); border: 1px solid rgba(166,196,224,.16);
  border-radius: 8px; padding: 5px 12px; cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.col-tile-act:hover { color: var(--cyan); border-color: rgba(54,212,249,.4); }
.col-tile-del:hover { color: #F76F72; border-color: rgba(247,111,114,.5); background: rgba(247,111,114,.08); }

.col-empty-sm { padding: 34px 26px; }
.col-empty-sm p { color: var(--muted); font-size: 14px; margin: 0; }

/* ============================================================
   ORDERS BUBBLE — replica of the account Orders tab. account.css is
   NOT loaded here, so the acct-* Orders styles are mirrored below.
   ============================================================ */
#colOrders, .acct-ord-controls { max-width: 900px; margin: 0 auto; }
.acct-loading { color: var(--muted); font-size: 14.5px; padding: 8px 2px; }
.acct-error { color: #F76F72; font-size: 14px; line-height: 1.6; }
.acct-empty-note { color: var(--muted); font-size: 14px; line-height: 1.6; padding: 4px 2px; }
.acct-empty { text-align: center; padding: 46px 26px; }
.acct-empty img { width: 84px; opacity: .45; margin: 0 auto 18px; display: block; }
.acct-empty h2 {
  font-family: var(--font-display); font-size: 26px; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 10px;
}
.acct-empty p { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; line-height: 1.6; }

.acct-order { padding: 22px 24px; }
.acct-order-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 4px;
}
.acct-order-id { font-family: var(--font-mark); font-size: 16px; font-weight: 700; letter-spacing: .3px; }
.acct-order-meta { color: var(--dim); font-size: 13px; margin-top: 3px; }
/* D143: on a DEALER's order the meta line names the customer it was placed
   for. That name is the only customer-entered value on this page that was
   still drawn in true case — everything else here is already uppercased, in
   CSS on .col-tile-title or in js/collection.js. Its own span, because the
   "Placed …", "3 items" and "For:" text around it is prose and stays as it
   is. Display only; nothing stored changes. */
.acct-for-name { text-transform: uppercase; }

.acct-stepper { display: flex; list-style: none; margin: 24px 0 6px; padding: 0; }
.acct-step {
  flex: 1 1 0; min-width: 0; position: relative; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.acct-step::before {
  content: ""; position: absolute; top: 14px; left: -50%;
  width: 100%; height: 2px; background: rgba(166, 196, 224, .18); z-index: 0;
}
.acct-step:first-child::before { display: none; }
.acct-step.is-done::before, .acct-step.is-active::before { background: var(--cyan); }
.acct-step-dot {
  position: relative; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mark); font-size: 13px; font-weight: 700;
  background: var(--panel); border: 2px solid rgba(166, 196, 224, .25); color: var(--dim);
}
.acct-step.is-done .acct-step-dot { background: var(--cyan); border-color: var(--cyan); color: #04121f; }
.acct-step.is-active .acct-step-dot {
  background: var(--panel); border-color: var(--cyan); color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(54, 212, 249, .15);
}
.acct-step-label {
  font-size: 11px; letter-spacing: .4px; text-transform: uppercase; font-weight: 600;
  color: var(--dim); line-height: 1.25; max-width: 92px;
}
.acct-step.is-done .acct-step-label, .acct-step.is-active .acct-step-label { color: var(--text); }
.acct-track { color: var(--muted); font-size: 13px; margin-top: 12px; font-family: var(--font-mark); }
.acct-track b { color: var(--cyan); }

.acct-order-cards {
  list-style: none; margin: 16px 0 0; padding: 14px 0 0;
  border-top: 1px dashed rgba(166, 196, 224, .12);
  display: flex; flex-direction: column; gap: 10px;
}
.acct-order-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acct-card-title {
  font-family: var(--font-mark); font-size: 13.5px; font-weight: 600; color: var(--text);
  flex: 1 1 auto; min-width: 0; letter-spacing: .2px;
}
.acct-card-grade {
  font-family: var(--font-mark); font-weight: 700; font-size: 16px; color: var(--green);
  min-width: 34px; text-align: center;
}
.acct-card-cert { font-family: var(--font-mark); font-size: 12.5px; color: var(--cyan); }

.acct-chip {
  display: inline-flex; align-items: center; font-family: var(--font-display);
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.acct-chip--active { color: var(--cyan); background: rgba(54, 212, 249, .1); border-color: rgba(54, 212, 249, .4); }
.acct-chip--done { color: var(--green); background: rgba(61, 214, 140, .12); border-color: rgba(61, 214, 140, .5); }
/* D81 — Bulk order type chip (amber, matching the staff portal's bulk chip) */
.acct-chip--bulk { color: #FFD166; background: rgba(255, 209, 102, .1); border-color: rgba(255, 209, 102, .45); }
.acct-order-chips { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* D81 — bulk category lines replace the card list on a bulk order */
.acct-bulk-line { align-items: baseline; }
.acct-bulk-facts {
  flex: 0 1 auto; font-family: var(--font-body); font-size: 12.5px;
  color: var(--dim); text-align: right; line-height: 1.5;
}
.acct-bulk-note { margin-top: 12px; }

.acct-order-items { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(166, 196, 224, .12); }
.acct-items-label {
  font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--dim); margin-bottom: 10px;
}
.acct-order-items .acct-order-cards { margin: 0; padding: 0; border-top: none; }
.acct-order-foot { margin-top: 16px; display: flex; justify-content: flex-end; }

.acct-vo-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
  color: var(--muted); font-size: 13px;
}
.acct-vo-cards { max-height: 46vh; overflow-y: auto; }
.acct-vo-total {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(166, 196, 224, .18);
  font-family: var(--font-display); font-size: 15px; letter-spacing: .5px; text-transform: uppercase;
}
.acct-vo-total b { font-family: var(--font-mark); font-size: 20px; color: var(--cyan); letter-spacing: 0; }

/* orders controls (search + date filters) */
.acct-ord-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.acct-ord-controls[hidden] { display: none; }
.acct-ord-search {
  flex: 1 1 220px; min-width: 160px;
  background: rgba(6, 16, 25, .5); border: 1px solid rgba(166, 196, 224, .18);
  border-radius: 12px; padding: 10px 14px; color: var(--text);
  font-family: var(--font-body); font-size: 14px;
}
.acct-ord-search:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(54, 212, 249, .15); }
.acct-ord-dates { display: flex; gap: 10px; flex-wrap: wrap; }
.acct-rc-date { display: flex; flex-direction: column; gap: 4px; }
.acct-rc-date > span {
  font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--dim); font-weight: 600;
}
.acct-rc-date input, .acct-rc-date select {
  background: rgba(6, 16, 25, .5); border: 1px solid rgba(166, 196, 224, .18);
  border-radius: 10px; padding: 8px 10px; color: var(--text);
  font-family: var(--font-body); font-size: 13.5px; color-scheme: dark; cursor: pointer;
}
.acct-rc-date input:focus, .acct-rc-date select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(54, 212, 249, .15); }

/* view-order dialog (own overlay) */
.acct-dialog-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4, 10, 16, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.acct-dialog-overlay.open { opacity: 1; visibility: visible; }
.acct-dialog {
  position: relative; width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(170deg, #14283c, #0a1826);
  border: 1px solid rgba(166, 196, 224, .2); border-radius: 20px; padding: 30px 28px;
  transform: translateY(16px) scale(.98); transition: transform .2s;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
}
.acct-dialog-overlay.open .acct-dialog { transform: translateY(0) scale(1); }
.acct-dialog-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(166, 196, 224, .08); border: none; color: var(--muted); cursor: pointer;
  font-size: 13px; transition: background .2s;
}
.acct-dialog-close:hover { background: rgba(166, 196, 224, .2); }
.acct-dialog-title {
  font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 18px; padding-right: 30px;
}

/* ---------------- responsive ---------------- */
@media (max-width: 640px) {
  .acct-ord-controls { flex-direction: column; align-items: stretch; }
  .acct-ord-dates { justify-content: space-between; }
  .acct-order { padding: 18px 15px; }
  .acct-step-label { font-size: 10px; }
  .acct-dialog { padding: 24px 18px; }
}
@media (max-width: 480px) { .col-draft .btn { width: 100%; } .col-draft-actions { width: 100%; } .col-draft-actions .btn { flex: 1 1 auto; } }
@media (max-width: 560px) {
  .col-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .col-tile { padding: 10px; gap: 10px; }
  .col-tile-title { font-size: 14px; }
  .col-tile-grade { font-size: 13px; padding: 3px 7px; }
  /* two controls on a ~135px tile: trimmed just enough to keep Details and
     Remove on ONE line here — the row still wraps rather than overflow if a
     narrower tile ever appears */
  .col-tile-act { font-size: 11.5px; padding: 5px 9px; }
  .col-tile-actions { gap: 6px; }
  .col-pre-val { font-size: 13px; }
}

/* ---------------- digital slab frame (graded certs) ----------------
   Recreates the physical encapsulation label frame (Resources/frame
   front.jpg): black slab, white-bordered label band — brand + set +
   player lines on the left, grade box (tier under the number) pinned to
   the TOP-right like the printed label, AUTO box beneath it only for
   autograph cards, and the cert number centred under that grade cluster
   (D110) — with the card's front photo in the window below and retention
   tabs over the corners. The QR is the one mark that stays on the BACK
   label here: the printed front sets it beneath the cert, but the flip's
   back face already carries it with SCAN TO VERIFY beside it.
   Sized in container-query units so the frame scales like a printed
   label at any tile width; a px fallback precedes every cqw rule. */
/* Flip mechanics (D66): the wrapper holds the slab's aspect ratio and 3D
   perspective; the two faces stack absolutely and rotate together. Clicking
   anywhere in the frame (or Enter/Space when focused) toggles .is-flipped. */
.col-slab-flip {
  display: block; perspective: 1400px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.col-slab-flip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 12px; }
.col-slab-3d {
  position: relative; aspect-ratio: 1808 / 3152;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.35, .1, .2, 1);
}
.col-slab-flip.is-flipped .col-slab-3d { transform: rotateY(180deg); }
.col-slab-face-front, .col-slab-face-back {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.col-slab-face-back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .col-slab-3d { transition: none; } }

.col-slab {
  display: flex; flex-direction: column;
  background: #0a0b0d;
  border-radius: 12px; border-radius: 5cqw;
  padding: 9px; padding: 4.5cqw;
  gap: 8px; gap: 4cqw;
  border: 1px solid rgba(200,230,255,.18);
  box-shadow: 0 10px 26px rgba(2,8,14,.5);
}
.col-slab-label {
  flex: 0 0 auto; min-height: 23%;
  border: 2px solid #f4f6f8; border-width: 1.2cqw;
  border-radius: 8px; border-radius: 3.5cqw;
  padding: 5px 6px; padding: 2.6cqw 3cqw;
  display: flex; align-items: stretch; gap: 5px; gap: 2.6cqw;
}
.col-slab-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; gap: .8cqw; }
.col-slab-brand, .col-slab-line, .col-slab-num, .col-slab-boxlbl, .col-slab-cert {
  font-family: var(--font-display); color: #fff;
}
.col-slab-brand {
  font-size: 6px; font-size: 3.4cqw; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.col-slab-line {
  font-size: 8px; font-size: 4.6cqw; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; line-height: 1.25;
  /* three structured lines that WRAP when long — never an "…" truncation */
  overflow-wrap: break-word; min-width: 0;
}
.col-slab-grades {
  flex: 0 0 auto; display: flex; flex-direction: column;
  justify-content: flex-start; gap: 4px; gap: 2cqw;
}
.col-slab-box {
  width: 34px; width: 16.5cqw; min-height: 34px; min-height: 16.5cqw;
  border: 2px solid #f4f6f8; border-width: 1.1cqw;
  border-radius: 7px; border-radius: 3cqw;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2px 1px; padding: 1cqw .5cqw;
}
.col-slab-num { font-size: 15px; font-size: 8cqw; font-weight: 800; line-height: 1; }
/* D110 — the cert line, closing the grade cluster. Scaled off the printed
   label's own proportion (CERT_SIZE 4.554pt against a 28.5pt box ≈ 16% of the
   box width, so 3cqw under a 16.5cqw box) and centred on the cluster like
   _draw_slot() centres it on the grade box. Deliberately NO ellipsis and no
   max-width: a cert wider than nine digits runs to its own width here exactly
   as it does on the press — this number ties a slab to its record and is never
   truncated. If a longer one ever appears, shrink this size; don't cut it. */
.col-slab-cert {
  font-size: 5.5px; font-size: 3cqw; font-weight: 800; letter-spacing: .04em;
  line-height: 1; text-align: center; white-space: nowrap;
}
.col-slab-boxlbl {
  font-size: 4.5px; font-size: 2.6cqw; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #e6ebef; margin-top: 1px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.col-slab-window {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  border-radius: 4px; border-radius: 2cqw; background: #05090d;
}
.col-slab-card {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
}
.col-slab-window .col-ph {
  position: absolute; inset: 0; aspect-ratio: auto; height: auto;
  border: none; border-radius: 0;
}
/* ---- back face (frame back.jpg): text block TOP-LEFT exactly like the
   reference (same brand treatment as the front — not enlarged, not centered),
   QR in a white rounded-corner border top-right, and a row of FOUR subgrade
   boxes (front-style boxes: Corners / Centering / Edges / Surface) ---- */
.col-slab-backlabel {
  flex-direction: column; align-items: stretch;
  gap: 4px; gap: 2cqw; min-height: 23%;
}
.col-slab-backtop { display: flex; align-items: flex-start; gap: 5px; gap: 2.6cqw; min-width: 0; }
.col-slab-backtop .col-slab-info { gap: 1px; gap: .6cqw; }
.col-slab-authline {
  font-family: var(--font-display); color: #e6ebef;
  font-size: 5.5px; font-size: 3cqw; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; line-height: 1.25; overflow-wrap: break-word;
}
.col-slab-verify {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  gap: 2px; gap: 1cqw; min-width: 0;
}
/* QR treatment per the reference: white rounded border, a black gap (the band
   shows through the transparent padding), then the code itself */
.col-slab-qr {
  width: 26px; width: 12.5cqw; aspect-ratio: 1; display: block;
  background: transparent;
  border: 2px solid #f4f6f8; border-width: 1cqw;
  border-radius: 5px; border-radius: 2.2cqw;
  padding: 2px; padding: 1cqw;
}
.col-slab-scan {
  font-family: var(--font-display); color: #e6ebef;
  font-size: 4.5px; font-size: 2.4cqw; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap;
}
/* four front-style boxes sharing the band width */
.col-slab-subrow { display: flex; gap: 3px; gap: 1.5cqw; margin-top: auto; }
.col-slab-subrow .col-slab-box {
  flex: 1 1 0; width: auto; min-width: 0;
  min-height: 26px; min-height: 13cqw;
}
.col-slab-subrow .col-slab-num { font-size: 11px; font-size: 5.6cqw; }
.col-slab-subrow .col-slab-boxlbl { font-size: 4px; font-size: 2.1cqw; letter-spacing: .04em; }

/* the four black retention tabs that overlap the card's corners */
.col-slab-tab { position: absolute; width: 17%; height: 5px; height: 2.6cqw; background: #0a0b0d; z-index: 2; }
.col-slab-tab.is-tl { top: 0; left: 6%; border-radius: 0 0 3px 3px; }
.col-slab-tab.is-tr { top: 0; right: 6%; border-radius: 0 0 3px 3px; }
.col-slab-tab.is-bl { bottom: 0; left: 6%; border-radius: 3px 3px 0 0; }
.col-slab-tab.is-br { bottom: 0; right: 6%; border-radius: 3px 3px 0 0; }

/* ---------------- pregraded cards (D82) ----------------
   A Pregrade card was never graded or encapsulated, so it renders WITHOUT the
   digital slab frame above: just its photos, the range and the condition
   report. Flip mechanics mirror the graded tile (same [data-flip] handler),
   minus every piece of slab chrome — nothing is drawn over the photo. */
.col-pre-flip {
  display: block; perspective: 1400px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.col-pre-flip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 12px; }
.col-pre-3d {
  position: relative; aspect-ratio: 720 / 1190;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.35, .1, .2, 1);
}
.col-pre-flip.is-flipped .col-pre-3d { transform: rotateY(180deg); }
.col-pre-face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.col-pre-face-back { transform: rotateY(180deg); }
/* inside a face the photo fills it — the wrapper already holds the card ratio */
.col-pre-face .col-tile-img,
.col-pre-face .col-ph { width: 100%; height: 100%; aspect-ratio: auto; }
@media (prefers-reduced-motion: reduce) { .col-pre-3d { transition: none; } }

/* D84 — a pregrade that was never photographed keeps this as its permanent art:
   solid-edged and tinted orange like the rest of the pregrade language, so it
   reads as the card's state instead of a picture that failed to load */
.col-tile-media .col-ph-pre {
  border-style: solid; border-color: rgba(255, 122, 26, .3);
  background: linear-gradient(170deg, rgba(6, 16, 25, .92), rgba(46, 25, 10, .5));
}
.col-tile-media .col-ph-pre span { color: var(--orange); opacity: .9; }

/* The range, in the footer slot a graded tile gives to Details — a pregrade has
   no card-details page, and the value is the one number the customer came for,
   so it takes that slot rather than a line of its own. Orange, like every other
   pregrade mark on the page; sized to sit level with the Remove button. */
.col-pre-val {
  display: inline-flex; align-items: center; min-width: 0;
  font-family: var(--font-mark); font-size: 13.5px; font-weight: 700;
  letter-spacing: .3px; color: var(--orange);
}
.col-pre-val[hidden] { display: none; }
/* the grader's condition report, under the title */
.col-pre-notes {
  font-size: 12.5px; line-height: 1.5; color: var(--muted);
  overflow-wrap: anywhere; margin: 0;
}
