/* ==========================================================================
   TREASURES - COLLECTIBLES SCANNER & VALUATION
   Design System & Styling
   ========================================================================== */

:root {
  /* Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #121827;
  --bg-surface: #1a2235;
  --bg-surface-hover: #232d45;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);

  --emerald-val: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --amber-val: #f59e0b;
  --rose-val: #f43f5e;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Layout Constants */
  --header-height: 64px;
  --nav-height: 64px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Mobile Frame Centering on Desktop */
body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top center, #1e1b4b 0%, #0b0f19 70%);
}

/* Auth View Screen */
.auth-viewport {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo-icon-lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  margin-bottom: 12px;
}

.auth-brand h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 280px;
}

.auth-error-banner {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--rose-val);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
}

.auth-form input:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.auth-toggle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

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

.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 130px;
}

.user-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* App Shell container */
.app-shell {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0 auto;
}

/* App Header */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(18, 24, 39, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.badge-tag {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 95px;
}

.user-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
}

.portfolio-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.pill-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
}

.pill-val {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--emerald-val);
  line-height: 1.1;
}

.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.icon-btn:active {
  transform: scale(0.92);
  background: var(--bg-surface-hover);
}

.status-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444; /* Default red until key configured */
}

.status-dot.active {
  background: var(--emerald-val);
  box-shadow: 0 0 6px var(--emerald-val);
}

/* App Viewport & Navigation Layout */
.app-viewport {
  height: 100vh;
  padding-top: var(--header-height);
  padding-bottom: var(--nav-height);
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-primary);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.tab-view {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px;

  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--bg-surface) transparent;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SCANNER SECTION */
.scanner-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 16px;
}

.viewfinder-box {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 340px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#cameraVideo, #photoCanvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Upload Fallback Screen */
.upload-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  cursor: pointer;
}

.upload-icon {
  font-size: 3rem;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.upload-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

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

/* Overlay Laser Reticle */
.scanner-overlay {
  position: absolute;
  inset: 24px;
  border-radius: var(--radius-md);
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid var(--accent-primary);
}

.top-left { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.top-right { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.bottom-left { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.bottom-right { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }

.scan-laser {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  box-shadow: 0 0 12px 2px var(--accent-primary);
  top: 10%;
  animation: scanMove 2.5s ease-in-out infinite alternate;
  display: none;
}

.scanning .scan-laser {
  display: block;
}

@keyframes scanMove {
  0% { top: 10%; opacity: 0.3; }
  50% { opacity: 1; }
  100% { top: 90%; opacity: 0.3; }
}

.reticle-hint {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.camera-controls-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cam-tool-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

/* Action Controls Bar */
.scan-controls-bar {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:active {
  background: var(--bg-surface-hover);
}

.btn-ebay-comps {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-ebay-comps:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
  border-color: var(--accent-primary);
}

.btn-scan-action {
  flex: 1;
  font-size: 1.05rem;
  padding: 16px;
}

/* COLLECTION INVENTORY SECTION */
.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--emerald-val);
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

.inventory-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-sub);
}

.search-box input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent-primary);
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.pill-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* Inventory Cards Grid */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.item-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.item-thumb-box {
  width: 100%;
  height: 140px;
  background: #0d121f;
  position: relative;
  overflow: hidden;
}

.item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-live {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-estimated {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-smart-filtered {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald-val);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.sifting-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--emerald-val);
  margin-top: 4px;
}

.item-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.15);
}

.card-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ebay-link-icon {
  font-size: 0.7rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ebay-link-icon:hover {
  text-decoration: underline;
}

.item-date {
  font-size: 0.65rem;
  color: var(--text-sub);
}

.delete-item-btn {
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  padding: 4px;
  font-size: 0.8rem;
}

.delete-item-btn:hover {
  color: var(--rose-val);
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(18, 24, 39, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-sizing: border-box;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  font-family: var(--font-family);
}

.nav-tab i {
  font-size: 1.2rem;
}

.nav-tab span {
  font-size: 0.75rem;
  font-weight: 600;
}

.nav-tab.active {
  color: var(--accent-primary);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 32px;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 0 0 4px 4px;
}

.nav-badge {
  position: absolute;
  top: 8px;
  right: 28%;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Modals & Bottom Sheets */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.modal-sheet {
  align-self: flex-end;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 10px auto 0 auto;
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

.text-accent { color: var(--accent-primary); }
.hidden { display: none !important; }

/* Form Components */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-action {
  position: relative;
  display: flex;
}

.input-with-action input {
  width: 100%;
  padding: 12px 44px 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.btn-input-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-hint a {
  color: var(--accent-primary);
  text-decoration: none;
}

/* Radio Group */
.radio-option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.radio-card input {
  margin-top: 3px;
  accent-color: var(--accent-primary);
}

.radio-title {
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
}

.radio-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.storage-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.btn-outline-danger {
  background: rgba(244, 63, 94, 0.1);
  color: var(--rose-val);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

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

.btn-full { width: 100%; }

/* Scan Result Details UI */
.result-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-hero {
  display: flex;
  gap: 14px;
  background: var(--bg-surface);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.result-thumb {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.result-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.3;
}

.result-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.valuation-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.val-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.val-amount {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--emerald-val);
  margin: 4px 0;
}

.val-range {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

.comp-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.comp-title {
  color: var(--text-muted);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comp-price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 90%;
  pointer-events: none;
}

.toast {
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.success i { color: var(--emerald-val); }
.toast.error i { color: var(--rose-val); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
