/* ============================================================
   ESSY — Shared Stylesheet
   Aesthetic: Dark luxury / refined authentication
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg: #29292b;
  --surface: #141417;
  --surface-2: #1c1c21;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --gold: #c9a96e;
  --gold-light: #e8ccaa;
  --gold-dim: rgba(201, 169, 110, 0.15);
  --text: #f0ece4;
  --text-muted: #7a7872;
  --text-dim: #4a4845;
  --accent: #c9a96e;
  --danger: #e05252;
  --success: #52b788;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

/* ── Noise texture overlay ──────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* ── Typography defaults ────────────────────────────────────── */
select,
input,
button {
  font-family: var(--font-body);
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-light);
}

/* ── Form Elements ──────────────────────────────────────────── */
label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

input::placeholder {
  color: var(--text-dim);
}

input:focus,
.input:focus,
select:focus {
  border-color: var(--gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}

.field {
  margin-bottom: 1.25rem;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  top: 2px;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

input[type="checkbox"]:hover {
  border-color: var(--gold);
}

input[type="checkbox"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}

input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #0d0d0f;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
}

.btn-primary {
  background: var(--gold);
  color: #0d0d0f;
  font-weight: 600;
  padding: 0.875rem 1.5rem;
}

.btn-primary:hover {
  background: var(--gold-light);
  color: #0d0d0f;
  box-shadow: 0 8px 24px rgba(201, 169, 110, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  color: #0d0d0f;
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.btn-ghost {
  padding: 0.625rem 1rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
  border: 0px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-link {
  padding: 0.4rem 0;
  color: var(--gold);
  border: none;
  background: transparent;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.btn-link:hover {
  color: var(--gold-light);
}

.btn-compact {
  width: auto;
  padding-left: 0.6rem !important;
  padding-right: 0.6rem !important;
  min-width: 0;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(224, 82, 82, 0.3);
}

.btn-danger:hover {
  background: rgba(224, 82, 82, 0.1);
  border-color: var(--danger);
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  animation: alertIn 0.25s ease both;
}

@keyframes alertIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert.success {
  background: rgba(82, 183, 136, 0.12);
  border: 1px solid rgba(82, 183, 136, 0.3);
  color: #7ed4aa;
}

.alert.error {
  background: rgba(224, 82, 82, 0.1);
  border: 1px solid rgba(224, 82, 82, 0.25);
  color: #f08080;
}

/* ── Pills & Tags ───────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pill-muted {
  border-color: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
}

.pill.role-user {
  color: var(--text);
  border-color: var(--border);
}

.pill.role-manager {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.pill.role-admin {
  color: var(--success);
  border-color: rgba(82, 183, 136, 0.35);
}

/* ── Status Pills ───────────────────────────────────────────── */
.status-pill {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-active {
  color: var(--success);
  border-color: rgba(82, 183, 136, 0.3);
  background: rgba(82, 183, 136, 0.08);
}

.status-pending {
  color: var(--gold);
  border-color: rgba(201, 169, 110, 0.3);
  background: var(--gold-dim);
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Table ──────────────────────────────────────────────────── */
.table,
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td,
.dashboard-table th,
.dashboard-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.table th,
.dashboard-table th {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* ── Stack helper ───────────────────────────────────────────── */
.stack {
  display: grid;
  gap: 0.75rem;
}

/* ── Utility helpers ────────────────────────────────────────── */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none !important;
}

/* Text utilities */
.text-muted {
  color: var(--text-muted);
}

.text-gold {
  color: var(--gold);
}

.text-center {
  text-align: center;
}

.text-bold {
  font-weight: bold;
}

.text-underline {
  text-decoration: underline;
}

/* Font utilities */
.font-display {
  font-family: var(--font-display);
}

/* Spacing utilities */
.mt-xs  { margin-top: 0.35rem; }
.mt-sm  { margin-top: 0.5rem; }
.mt-md  { margin-top: 1rem; }
.mt-lg  { margin-top: 1.5rem; }
.mt-xl  { margin-top: 2rem; }

.mb-xs  { margin-bottom: 0.35rem; }
.mb-sm  { margin-bottom: 0.5rem; }
.mb-md  { margin-bottom: 1rem; }
.mb-lg  { margin-bottom: 1.5rem; }
.mb-xl  { margin-bottom: 2rem; }

/* Layout utilities */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-end     { display: flex; justify-content: flex-end; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.items-center { align-items: center; }
.gap-xs  { gap: 0.4rem; }
.gap-sm  { gap: 0.75rem; }
.gap-md  { gap: 1rem; }
.gap-lg  { gap: 1.25rem; }

/* Width utilities */
.w-full   { width: 100%; }
.w-auto   { width: auto; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.anim-fade-up  { animation: fadeUp 0.3s both; }
.anim-card-in  { animation: cardIn 0.4s both; }

/* ── Nav bar ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 64px;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav .btn-outline,
.nav .btn-ghost,
.nav .btn-primary {
  padding: 0.5rem 1.125rem;
  font-size: 0.82rem;
  border-radius: var(--radius);
  width: auto;
}

/* ── Auth Layout ────────────────────────────────────────────── */
.auth-layout {
  display: flex;
  min-height: calc(100vh - 64px);
  align-items: flex-start;
  justify-content: center;
  padding: calc(64px + 2rem) 0.5rem 2rem;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(201, 169, 110, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 80%, rgba(201, 169, 110, 0.04) 0%, transparent 70%),
    var(--bg);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem;
  margin-top: 1rem;
  width: min(440px, 100%);
  box-shadow: var(--shadow);
  animation: cardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.auth-card label,
.modal-card label {
  padding: 0.6rem 0 !important;
}

.auth-logo {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--gold);
  font-weight: 500;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 15, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none !important;
}

body.modal-scroll-locked {
  overflow: hidden;
  position: relative;
  height: 100vh;
}

/* Legacy modal container (admin panel) */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-panel {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: min(600px, 90vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-head,
.modal-body,
.modal-foot {
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.modal-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  margin-top: 4px;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.modal-body {
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.modal-actions {
  display: flex;
  gap: 8px;
}

/* Modal card (smaller dialogs) */
.modal-card {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  animation: cardIn 0.35s ease both;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.modal-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text);
}

.modal-card p {
  color: var(--text-muted);
}

.modal-card header,
.modal-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.modal-card header {
  margin-bottom: 1rem;
}

.modal-card footer {
  margin-top: 1.25rem;
  justify-content: flex-end;
}

.modal-card .stack {
  gap: 0.6rem;
}

.modal-card .input,
.modal-card select {
  background: var(--surface-2);
}

.modal-card .btn-ghost {
  border-color: var(--border);
  color: var(--text-muted);
}

/* Modal image viewer */
.modal-image-card {
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.modal-image-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.modal-image-full {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.popup-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

.popup-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.image-preview-row {
  align-items: flex-start;
}

.image-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.image-preview-grid figure {
  margin: 0;
  flex: 1 1 140px;
}

.image-preview-grid figcaption {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.35rem;
}

.image-preview-frame {
  position: relative;
  min-height: 180px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.image-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

/* Detail grid (inside modals) */
.detail-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.detail-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.95rem;
  word-break: break-word;
}

/* ── Landing Page ───────────────────────────────────────────── */
.landing {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 169, 110, 0.1) 0%, transparent 60%),
    var(--bg);
}

.landing-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s 0.1s both;
}

.landing-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s 0.2s both;
}

.landing-title em {
  font-style: italic;
  color: var(--gold);
}

.landing-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 3rem;
  animation: fadeUp 0.6s 0.3s both;
}

.landing-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s 0.4s both;
}

.landing-actions .btn {
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
}

.landing-actions .btn-primary {
  color: #0d0d0f;
}

.landing-stats {
  display: flex;
  gap: 3rem;
  margin-top: 5rem;
  animation: fadeUp 0.6s 0.55s both;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* ── Verify Page ────────────────────────────────────────────── */
.verify-layout {
  min-height: 85vh;
  padding: 5rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(201, 169, 110, 0.07) 0%, transparent 60%),
    var(--bg);
}

.verify-header {
  text-align: center;
  max-width: 520px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.5s both;
}

.verify-header h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.verify-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Verify page eyebrow label */
.verify-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

/* Search bar (verify page) */
.search-bar {
  display: flex;
  width: min(600px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  transition: border-color var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.5s 0.1s both;
  margin-bottom: 3rem;
}

.search-bar:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12), 0 4px 24px rgba(0, 0, 0, 0.4);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
}

.search-bar input:focus {
  box-shadow: none;
}

.search-bar .btn-primary {
  width: auto;
  border-radius: 0;
  padding: 0.875rem 1.75rem;
  font-size: 0.875rem;
}

/* Search row (admin/table filtering) */
.search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.search-input {
  min-width: 300px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 0.83rem;
  color: var(--text);
}

.search-select {
  min-width: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 0.83rem;
  color: var(--text);
}

.search-select {
  flex: 0 0 160px;
}

.search-btn {
  background: var(--gold);
  color: #0d0d0f;
  border: none;
  border-radius: var(--radius);
  padding: 9px 18px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}

.search-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-top: 100px;
}

.search-section.hidden {
  display: none;
}

#result.hidden {
  display: none;
}

/* ── Result Card ────────────────────────────────────────────── */
.result-card {
  width: min(720px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardIn 0.4s both;
}

/* Result card used as a message/state container */
.result-card--centered {
  text-align: center;
  padding: 3rem;
}

.result-card--centered .muted {
  margin-bottom: 1rem;
}

.result-card-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 320px;
}

.result-image-col {
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-right: 1px solid var(--border);
}

.card-slab {
  width: 130px;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #2a2a2e, #1a1a1e);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
}

.card-slab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.card-slab-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.result-info-col {
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.result-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.result-field {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.result-field:last-child {
  border-bottom: none;
}

.result-field-label {
  width: 115px;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.result-field-value {
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.result-field-value.grade {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Serial number field variant */
.result-field--serial {
  font-size: 1.5rem;
  gap: 1rem;
}

.result-field--serial .result-field-value {
  font-weight: bold;
}

.verified-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: var(--gold-light);
}

.verified-badge svg {
  flex-shrink: 0;
}

.view-record-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.625rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.view-record-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin: 1.75rem 2.25rem 1.5rem;
  align-self: flex-start;
}

.back-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Card Images Panel ──────────────────────────────────────── */
.card-images-panel {
  display: flex;
  gap: 1.25rem;
  padding: 0 2.25rem 2rem;
  border-bottom: 1px solid var(--border);
}

.owner-images {
  width: min(720px, 100%);
  padding: 1.5rem 2.25rem 2rem;
  border-top: 1px solid var(--border);
}

.owner-images-title {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.owner-images-grid {
  display: flex;
  gap: 1rem;
}

.owner-image-thumb {
  flex: 1;
  max-width: 160px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}

/* Half-width variant for two-up card image layout */
.owner-image-thumb--half {
  max-width: 50%;
}

.owner-image-thumb:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.owner-image-thumb img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.owner-image-thumb span {
  display: block;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.owner-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ── Verify Result: Info column extras ──────────────────────── */
.result-trade-actions {
  margin-top: 2rem;
  text-align: center;
}

.result-trade-history {
  margin-top: 1rem;
}

/* Trade history entries */
.trade-entry {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trade-entry-date {
  color: var(--text-muted);
}

.trade-owner-banner {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  text-align: left;
}

/* ── Activation Prompt ──────────────────────────────────────── */
.activation-body {
  padding: 1rem;
  text-align: center;
}

.activation-body .muted {
  margin-bottom: 0.5rem;
}

.activation-preview {
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin: 1rem auto;
}

.activation-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ── Loader / Error states ──────────────────────────────────── */
.verify-loader {
  text-align: center;
  padding: 3.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  animation: fadeUp 0.3s both;
}

.verify-loader svg {
  display: block;
  margin: 0 auto 0.75rem;
}

/* ── Admin Dashboard ─────────────────────────────────────────── */
.dashboard-page {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.top-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 1rem;
  background: #0f0f11;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}

.top-nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
}

.top-nav-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.top-nav-username {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid rgba(201, 169, 110, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
}

.top-nav-signout {
  font-size: 0.78rem;
  padding: 6px 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  font-family: var(--font-body);
}

.top-nav-signout:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.dashboard-body {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 60px);
  overflow: hidden;
}

/* ── Admin Sidebar ──────────────────────────────────────────── */
.dashboard-sidebar {
  width: 180px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  transition: width var(--transition);
}

.dashboard-sidebar.collapsed {
  width: 60px;
}

.sidebar-fab {
  display: none;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px 12px;
}

.sidebar-toggle button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-role {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.user-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--text);
}

.nav-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 236, 228, 0.75);
  padding: 10px 20px 4px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 0.84rem;
  color: var(--text);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  border-left-color: var(--gold);
}

.nav-item-icon {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  color: #fff;
  fill: #fff;
}

.nav-item-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  color: #fff;
  fill: #fff;
}

.nav-item-label {
  white-space: nowrap;
}

.nav-item.active .nav-item-icon {
  opacity: 1;
}

.nav-item:hover .nav-item-icon {
  opacity: 0.9;
}

.sidebar-footer {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--border);
}

.footer-link {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.perm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.perm-tag {
  font-size: 0.65rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* Collapsed sidebar overrides */
.dashboard-sidebar.collapsed .sidebar-user,
.dashboard-sidebar.collapsed .sidebar-footer,
.dashboard-sidebar.collapsed .nav-section-label,
.dashboard-sidebar.collapsed .nav-item-label,
.dashboard-sidebar.collapsed .perm-list {
  display: none;
}

.dashboard-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  border-left: none;
}

/* ── Admin Main Content ──────────────────────────────────────── */
.dashboard-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.page-head {
  margin-bottom: 20px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1.1;
}

.page-sub {
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* Content tabs */
.content-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  flex-wrap: wrap;
  width: 100%;
}

.ctab {
  font-size: 0.82rem;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.ctab:hover {
  color: var(--text);
}

.ctab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.ctab-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  fill: #fff;
}

.ctab-icon svg {
  width: 14px;
  height: 14px;
  color: #fff;
  fill: #fff;
}

.ctab-label {
  white-space: nowrap;
}

/* Bulk action */
.bulk-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* other action */
.other-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* Admin card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.admin-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.15s;
}

.admin-card:hover {
  border-color: var(--border-hover);
}

.admin-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.admin-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Pagination */
.dashboard-pagination {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.dashboard-pagination button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}

.dashboard-pagination button.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0d0d0f;
}

.dashboard-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Card Panel (content cards) ─────────────────────────────── */
.card-panel {
  background: rgba(2, 3, 10, 0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.card-panel.published {
  border-color: rgba(82, 183, 136, 0.5);
}

.card-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.card-media figure {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.card-media img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.card-media figcaption {
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted);
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.card-meta-row span {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.card-actions {
  grid-column: span 2;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ── Settings ───────────────────────────────────────────────── */
.setting-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.setting-card {
  flex-wrap: wrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(4, 9, 20, 0.65);
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  max-width: 450px;
}

.setting-card-col {
  flex-wrap: wrap;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(4, 9, 20, 0.65);
  padding: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  max-width: 450px;
}

.setting-label {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.setting-description {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.setting-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.setting-controls .pill,
.setting-controls .btn {
  width: auto;
}

@media (min-width: 640px) {
  .setting-controls {
    flex-direction: row;
    align-items: center;
  }
}

.setting-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.registration-indicator {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.5rem;
  border: none;
}

.registration-indicator--enabled {
  background: var(--gold);
  color: #0d0d0f;
}

.registration-indicator--disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.registration-toggle {
  min-width: 120px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.65rem 1.5rem;
}

/* ── Add cards ───────────────────────────────────────────────── */
.capture-grid {
  display: grid;
  gap: 1.25rem;
}

.capture-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: min(360px, 100%);
  margin-inline: auto;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.9));
  overflow: hidden;
}

.capture-frame video,
.capture-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: #000;
}

.capture-frame video.hidden {
  opacity: 0;
  pointer-events: none;
}

.capture-frame img {
  display: none;
}

.capture-frame img.visible {
  display: block;
}

.capture-actions,
.step-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.step-actions .btn {
  flex: 1;
}

.thumb-strip {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.thumb-strip img {
  width: auto;
  height: 180px;
  aspect-ratio: 9 / 16;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  object-fit: cover;
}

.processing-note {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-top: 0.65rem;
}

.submission-status {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--gold);
}

.review-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.35);
  margin-bottom: 1rem;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.toggle-switch .slider::before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text);
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.toggle-switch input:checked+.slider {
  background-color: var(--success);
}

.toggle-switch input:checked+.slider::before {
  transform: translateX(24px);
}

/* ── Sessions ───────────────────────────────────────────────── */
.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.session-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 50rem;
}

.session-info {
  flex: 1;
}

.session-info strong {
  color: var(--text);
}

/* ── Page Footer ────────────────────────────────────────────── */
.page-footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--gold);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.page-footer a {
  color: var(--gold);
}

.page-footer a:hover {
  color: var(--text-muted);
}

.legal-page {
  min-height: 100vh;
  padding: 6rem 1.5rem 3rem;
  max-width: 960px;
  margin: 0 auto;
}

.legal-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin-bottom: 0.5rem;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.legal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.legal-toolbar select {
  max-width: 280px;
}

.legal-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal-content {
  line-height: 1.7;
  color: var(--text);
  font-size: 0.97rem;
}

.legal-content h2,
.legal-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.legal-loader,
.legal-alert {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .legal-card {
    padding: 1.5rem;
  }

  .legal-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .legal-toolbar select {
    width: 100%;
  }
}

/* ── User Dashboard ─────────────────────────────────────────── */
body[data-user-dashboard] .tabs {
  display: inline-flex;
  gap: 0.4rem;
}

body[data-user-dashboard] .tabs .tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

body[data-user-dashboard] .tabs .tab.active {
  background: var(--text);
  color: var(--bg);
}

body[data-user-dashboard] .card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body[data-user-dashboard] .status-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

body[data-user-dashboard] .table-responsive {
  overflow-x: auto;
}

.empty-state-card {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--surface);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.empty-state-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.empty-state-card p {
  margin: 0;
  color: var(--text-muted);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .dashboard-table-wrap {
    overflow: scroll;
  }
}

@media (max-width: 640px) {
  .result-card-inner {
    grid-template-columns: 1fr;
  }

  .result-image-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
  }

  .landing-stats {
    gap: 2rem;
  }

  .nav {
    padding: 0 0.5rem;
  }

  .landing-actions .btn {
    padding: 0.75rem 1.5rem;
  }

  .dashboard-sidebar {
    display: none;
  }

  .sidebar-fab {
    display: flex;
    position: fixed;
    top: 70px;
    right: 10px;
    z-index: 1000;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
  }

  .sidebar-fab:hover {
    border-color: var(--border-hover);
    color: var(--text);
  }

  .dashboard-sidebar.sidebar-open {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1001;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .sidebar-backdrop.open {
    display: block;
  }

  .dashboard-body {
    max-height: calc(100vh - 60px);
  }

  .dashboard-main {
    max-height: calc(100vh - 60px);
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  .activation-preview {
    width: min(100%, 320px);
  }

  .result-field--serial {
    font-size: 1rem;
    flex-direction: column;
    gap: 0.4rem;
  }

  .card-images-panel {
    padding: 0 1rem 1.5rem;
  }
}

/* ── Single Capture Page (mobile card submission) ───────────── */
.single-capture-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}

.capture-section {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.capture-section h2 {
  margin-bottom: 0.75rem;
}

.capture-box {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
}

.capture-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.capture-box img.visible {
  display: block;
}

.capture-placeholder {
  opacity: 0.7;
  text-align: center;
  padding: 1rem;
}

.capture-actions,
.submit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.camera-hint {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-top: 0.5rem;
}

.file-input-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.capture-status {
  margin-top: 0.75rem;
}
