/* ═══════════════════════════════════════════
   金庫 Gold Vault — Design System v3.0
   Premium Gold Fintech · Private Banking Style
   ═══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --ivory: #faf6f0;
  --ivory-dark: #f5efe5;
  --white: #ffffff;
  --charcoal: #2c2c2e;
  --charcoal-soft: #3a3a3c;
  --secondary: #8e8e98;
  --secondary-light: #aeaeb8;
  --border: #e8e0d4;
  --border-light: #f0eae0;
  --gold: #c9a84c;
  --gold-light: #dfc06a;
  --gold-soft: rgba(201,168,76,0.08);
  --gold-glow: rgba(201,168,76,0.25);
  --green: #2d7d5e;
  --green-bg: #e8f4ee;
  --red: #c03a2e;
  --red-bg: #faecea;
  --shadow-sm: 0 1px 3px rgba(44,44,46,0.04);
  --shadow-md: 0 4px 12px rgba(44,44,46,0.06);
  --shadow-lg: 0 8px 28px rgba(44,44,46,0.08);
  --shadow-xl: 0 16px 48px rgba(44,44,46,0.10);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Global ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 88px;
  line-height: 1.5;
}

/* ── Background Pattern ── */
.bg-pattern {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(201,168,76,0.06), transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(201,168,76,0.04), transparent 50%);
  pointer-events: none; z-index: 0;
}

/* ── Top Bar ── */
.top-bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,246,240,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.top-bar-left { display: flex; align-items: center; gap: 12px; }
.top-bar-center { display: flex; align-items: center; gap: 12px; flex:1; }
.top-bar-right { display: flex; align-items: center; gap: 10px; }

.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  box-shadow: 0 4px 12px var(--gold-glow);
  flex-shrink: 0;
}
.top-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; color: var(--charcoal);
}

.badge {
  font-size: 11px; padding: 5px 12px;
  border-radius: 20px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,0.15);
  font-weight: 600; letter-spacing: 0.3px;
  white-space: nowrap;
}

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--white);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 2px 8px var(--gold-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.avatar:hover { transform: scale(1.05); box-shadow: 0 4px 16px var(--gold-glow); }

.back-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--charcoal);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.back-btn:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }

/* ── Container ── */
.container {
  padding: 16px 20px;
  max-width: 520px;
  margin: 0 auto;
  position: relative; z-index: 1;
}

.container-wide {
  padding: 16px 20px;
  max-width: 640px;
  margin: 0 auto;
  position: relative; z-index: 1;
}

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: #ddd6c8; }

.card-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Gold Price Hero ── */
.price-hero {
  background: linear-gradient(145deg, var(--white), #fdfbf8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.price-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.price-hero-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.price-hero-title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700; color: var(--charcoal);
  display: flex; align-items: center; gap: 8px;
}
.price-hero-update { font-size: 11px; color: var(--secondary); }

/* ── Jeweler Grid ── */
.jewel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.jewel-card {
  background: var(--ivory-dark);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.jewel-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.jewel-card::after {
  content: '';
  position: absolute; bottom: 0; left: 20%; right: 20%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 1px;
  opacity: 0;
  transition: opacity 0.2s;
}
.jewel-card:hover::after { opacity: 1; }

.jewel-name {
  font-size: 12px; font-weight: 600; color: var(--secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.jewel-sell {
  font-family: var(--font-body);
  font-size: 20px; font-weight: 800; color: var(--charcoal);
  letter-spacing: -0.3px;
}
.jewel-label {
  font-size: 9px; color: var(--secondary-light);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-top: 2px;
}
.jewel-buy {
  font-size: 13px; font-weight: 600; color: var(--green);
  margin-top: 4px;
}
.jewel-bullion-sell {
  font-size: 15px; font-weight: 700; color: var(--charcoal);
  margin-top: 6px;
}

.price-hero-footer {
  display: flex; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--secondary);
}
.price-hero-footer span span {
  font-weight: 600; color: var(--charcoal);
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #ddd6c8;
}

.stat-label {
  font-size: 10px; color: var(--secondary);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.5px; color: var(--charcoal);
  line-height: 1.1;
}
.stat-value.gold { color: var(--gold); }
.stat-value.green { color: var(--green); }
.stat-value.red { color: var(--red); }
.stat-value.charcoal { color: var(--charcoal-soft); }
.stat-sub {
  font-size: 11px; color: var(--secondary);
  margin-top: 3px;
}

/* ── Section ── */
.section { margin-bottom: 18px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700; color: var(--charcoal);
}
.section-link {
  font-size: 13px; color: var(--gold); text-decoration: none;
  font-weight: 600; transition: opacity 0.2s;
}
.section-link:hover { opacity: 0.8; text-decoration: underline; }

/* ── Brand Strip ── */
.brand-strip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex; justify-content: space-around;
  box-shadow: var(--shadow-sm);
}
.brand-item { text-align: center; }
.brand-item-name { font-size: 12px; color: var(--secondary); font-weight: 600; }
.brand-item-weight { font-size: 17px; font-weight: 700; color: var(--charcoal); margin-top: 4px; }
.brand-item-count { font-size: 11px; color: var(--secondary); margin-top: 2px; }

/* ── Record List ── */
.record-list { display: flex; flex-direction: column; gap: 8px; }
.record-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.record-item:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }

.record-left { display: flex; align-items: center; gap: 12px; }
.record-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}

.record-brand { font-size: 14px; font-weight: 600; color: var(--charcoal); }
.record-meta { font-size: 12px; color: var(--secondary); margin-top: 2px; }

.record-right { text-align: right; }
.record-amount { font-size: 15px; font-weight: 700; color: var(--charcoal); }
.record-pnl { font-size: 12px; font-weight: 600; }
.record-pnl.positive { color: var(--green); }
.record-pnl.negative { color: var(--red); }
.record-date { font-size: 11px; color: var(--secondary); margin-top: 1px; }

/* ── Empty State ── */
.empty-state {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
}
.empty-state .icon {
  width: 72px; height: 72px;
  background: var(--gold-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; color: var(--charcoal);
  margin-bottom: 6px;
}
.empty-state p {
  font-size: 14px; color: var(--secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ── Buttons ── */
.btn-gold {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 28px;
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  color: var(--white);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600; font-size: 14px;
  font-family: var(--font-body);
  transition: all 0.25s;
  border: none; cursor: pointer;
  box-shadow: 0 4px 14px var(--gold-glow);
}
.btn-gold:hover {
  box-shadow: 0 6px 24px rgba(201,168,76,0.35);
  transform: translateY(-1px);
}
.btn-gold:active { transform: scale(0.97); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px;
  background: var(--white);
  color: var(--charcoal-soft);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-weight: 600; font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer; text-decoration: none;
  transition: all 0.2s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--charcoal); box-shadow: var(--shadow-sm); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px;
  background: var(--red-bg);
  color: var(--red);
  border: 1.5px solid #f0c8c4;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: #f0c8c4; }

/* ── Form ── */
.form-group { margin-bottom: 16px; }
.form-label {
  font-size: 11px; font-weight: 600; color: var(--secondary);
  display: block; margin-bottom: 5px;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.form-input {
  background: var(--ivory-dark);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  width: 100%;
  color: var(--charcoal);
  font-size: 13px;
  font-family: var(--font-body);
  transition: all 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}
.form-input::placeholder { color: #c8c4bc; }
.form-input:disabled { opacity: 0.5; }
/* Fix date input overflow on mobile */
input[type="date"].form-input {
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input[type="date"].form-input::-webkit-calendar-picker-indicator {
  margin-left: 0;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%238e8e98'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-hint { font-size: 11px; color: var(--secondary); margin-top: 4px; }

/* ── Messages ── */
.msg-success {
  background: var(--green-bg);
  border: 1px solid #b8dccb;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px; color: var(--green);
  margin-bottom: 16px;
}
.msg-error {
  background: var(--red-bg);
  border: 1px solid #f0c8c4;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px; color: var(--red);
  margin-bottom: 16px;
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex; gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--secondary);
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-weight: 500;
}
.filter-btn.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}
.filter-btn:hover { border-color: #c8c4bc; }

/* ── Stats Strip ── */
.stats-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-chip-val {
  font-size: 18px; font-weight: 700; color: var(--charcoal);
}
.stat-chip-label {
  font-size: 10px; color: var(--secondary);
  margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.3px;
}

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 6px 8px calc(env(safe-area-inset-bottom, 8px) + 4px) 8px;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 14px;
  text-decoration: none;
  color: var(--secondary);
  font-size: 10px; font-weight: 500;
  transition: all 0.2s;
  border-radius: 12px;
  position: relative;
}
.nav-item.active { color: var(--gold); }
.nav-item:hover { color: var(--charcoal); }
.nav-icon { font-size: 22px; line-height: 1; }

/* Premium Scan Button */
.scan-btn-wrapper {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin-top: -20px;
}
.scan-btn-ring {
  position: absolute;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(201,168,76,0.12);
  animation: scan-pulse 2s ease-in-out infinite;
}
@keyframes scan-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0.3; }
}
.scan-btn {
  width: 52px; height: 52px;
  background: linear-gradient(145deg, var(--gold), #b8942e);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
  transition: all 0.25s;
  position: relative;
  z-index: 1;
}
.scan-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(201,168,76,0.45);
}
.scan-btn:active { transform: scale(0.95); }
.scan-btn .nav-icon { font-size: 24px; color: var(--white); }
.scan-label {
  font-size: 9px; color: var(--secondary); font-weight: 500;
  position: absolute; bottom: -16px;
  white-space: nowrap;
}

/* ── International Price Hero (compare page) ── */
.intl-hero {
  background: linear-gradient(145deg, var(--white), #fdfbf8);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.intl-hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.intl-label {
  font-size: 11px; color: var(--secondary);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 8px;
}
.intl-price {
  font-size: 48px; font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -1.5px;
  line-height: 1;
}
.intl-price span {
  font-size: 16px; font-weight: 400; color: var(--secondary);
}
.intl-convert {
  display: flex; justify-content: center; gap: 28px;
  margin-top: 16px; flex-wrap: wrap;
}
.intl-convert-item { text-align: center; }
.intl-convert-val { font-size: 15px; font-weight: 600; color: var(--charcoal-soft); }
.intl-convert-label { font-size: 10px; color: var(--secondary); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.3px; }
.intl-update { font-size: 12px; color: var(--secondary-light); margin-top: 14px; }

/* ── Price Compare Table ── */
.table-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 14px 18px;
  font-size: 11px; color: var(--secondary);
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 16px 18px;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.table-row:last-child { border-bottom: none; }
.table-row:hover { background: #fdfbf8; }
.table-name { font-size: 14px; font-weight: 600; color: var(--charcoal); }
.table-sell { font-size: 17px; font-weight: 700; color: var(--charcoal); }
.table-buy { font-size: 15px; font-weight: 600; color: var(--green); }
.table-diff { text-align: right; font-size: 12px; color: var(--secondary); }

/* ── Tabs ── */
.type-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.type-tab {
  padding: 10px 22px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--secondary);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.type-tab.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
}
.type-tab:hover { border-color: #c8c4bc; }

.info-box {
  background: var(--gold-soft);
  border: 1px solid rgba(201,168,76,0.1);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ── Subscription ── */
.current-plan-card {
  background: linear-gradient(145deg, var(--white), #fdfbf8);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.current-plan-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}
.plan-icon-big { font-size: 48px; margin-bottom: 12px; }
.plan-name-big {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800; color: var(--charcoal);
  margin-bottom: 4px;
}
.plan-price-text { font-size: 14px; color: var(--secondary); margin-bottom: 14px; }

.plan-badge {
  display: inline-block;
  padding: 5px 18px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.plan-badge.free { background: var(--ivory-dark); color: var(--secondary); border: 1px solid var(--border); }
.plan-badge.premium { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(201,168,76,0.15); }
.plan-badge.pro { background: rgba(201,168,76,0.12); color: var(--gold); border: 1px solid rgba(201,168,76,0.2); }

.usage-bar {
  background: var(--ivory-dark);
  height: 6px; border-radius: 3px;
  margin: 16px 0 8px; overflow: hidden;
}
.usage-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.5s ease;
}
.usage-text { font-size: 12px; color: var(--secondary); }

.plan-grid { display: grid; gap: 10px; margin-bottom: 16px; }
.plan-card-row {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; justify-content: space-between; align-items: center;
  transition: all 0.2s;
}
.plan-card-row:hover { border-color: var(--gold); }
.plan-card-row.current { border-color: var(--gold); background: rgba(201,168,76,0.02); }
.plan-card-name { font-size: 16px; font-weight: 700; color: var(--charcoal); }
.plan-card-price { font-size: 26px; font-weight: 800; color: var(--gold); }
.plan-card-price span { font-size: 13px; font-weight: 400; color: var(--secondary); }
.plan-card-desc { font-size: 12px; color: var(--secondary); margin-top: 4px; }

.plan-cta {
  background: var(--ivory-dark);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 22px;
  color: var(--charcoal-soft);
  text-decoration: none;
  font-size: 13px; font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.plan-cta:hover { background: var(--border); }
.plan-cta.active {
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  color: var(--white);
  border: none;
  box-shadow: 0 4px 14px var(--gold-glow);
}
.plan-cta.active:hover { box-shadow: 0 6px 24px rgba(201,168,76,0.35); }

.feature-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}
.feature-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.feature-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}
.feature-item:last-child { border-bottom: none; }
.feature-label { font-size: 13px; color: var(--secondary); }
.feature-check { font-size: 14px; color: var(--secondary-light); }
.feature-check.yes { color: var(--green); }

/* ── Camera / Scan ── */
.camera-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.camera-preview {
  width: 100%; min-height: 300px;
  background: var(--ivory-dark);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.camera-preview img { width: 100%; display: block; }
.camera-placeholder {
  text-align: center; padding: 56px 20px;
}
.camera-placeholder .camera-icon {
  width: 80px; height: 80px;
  background: var(--gold-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.camera-placeholder .camera-icon svg { width: 36px; height: 36px; stroke: var(--gold); fill: none; stroke-width: 1.5; }
.camera-placeholder h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.camera-placeholder p { font-size: 14px; color: var(--secondary); }
.camera-placeholder .hint { font-size: 12px; color: #c8c4bc; margin-top: 2px; }

.camera-actions {
  display: flex; gap: 10px; padding: 16px;
}
.camera-actions .btn-gold, .camera-actions .btn-outline {
  flex: 1; text-align: center; padding: 13px;
}

input[type="file"] { display: none; }

/* ── OCR Result ── */
.ocr-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.ocr-field {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.ocr-field:last-child { border-bottom: none; }
.ocr-label { color: var(--secondary); }
.ocr-value { font-weight: 600; color: var(--charcoal); }
.ocr-loading {
  text-align: center; padding: 32px;
  color: var(--secondary);
  font-size: 14px;
}
.ocr-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Unit Radio ── */
.unit-radio { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.unit-option {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--white);
}
.unit-option:hover { border-color: var(--gold); }
.unit-option.selected { border-color: var(--gold); background: var(--gold-soft); }
.unit-option input { display: none; }
.unit-symbol { font-size: 22px; font-weight: 800; color: var(--gold); }
.unit-label { font-size: 11px; color: var(--secondary); margin-top: 4px; }

/* ── Info Row ── */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: var(--secondary); }
.info-value { font-size: 13px; color: var(--charcoal); font-weight: 600; }

/* ── Logout Link ── */
.logout-link {
  display: block; text-align: center;
  padding: 16px;
  color: var(--secondary);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.2s;
}
.logout-link:hover { color: var(--red); }

/* ── Landing / Home ── */
.landing-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,246,240,0.90);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-l { display: flex; align-items: center; gap: 10px; }
.nav-brand {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--charcoal);
}
.nav-r { display: flex; gap: 10px; }

.hero-section {
  max-width: 900px; margin: 0 auto;
  padding: 80px 24px 60px;
  position: relative; z-index: 1; text-align: center;
}
.hero-badge-landing {
  display: inline-block;
  padding: 7px 20px;
  border-radius: 20px;
  font-size: 13px;
  background: var(--gold-soft);
  border: 1px solid rgba(201,168,76,0.15);
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title-landing {
  font-family: var(--font-display);
  font-size: 60px; font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 18px;
}
.hero-title-landing span { color: var(--gold); }
.hero-desc {
  font-size: 18px; color: var(--secondary);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features-section {
  max-width: 1000px; margin: 0 auto;
  padding: 40px 24px 60px;
  position: relative; z-index: 1;
}
.sec-title-landing {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 700;
  text-align: center; margin-bottom: 40px;
}
.feat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.feat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}
.feat-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feat-icon-box {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  background: var(--gold-soft);
}
.feat-name-landing { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feat-desc { font-size: 14px; color: var(--secondary); line-height: 1.6; }

.plans-section {
  max-width: 800px; margin: 0 auto;
  padding: 20px 24px 60px;
  position: relative; z-index: 1;
}
.plan-grid-landing {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.plan-card-landing {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.3s;
}
.plan-card-landing.featured {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(201,168,76,0.06);
}
.plan-card-landing:hover { border-color: var(--gold); }
.plan-name-landing { font-size: 16px; font-weight: 600; color: var(--secondary); margin-bottom: 8px; }
.plan-price-landing { font-size: 36px; font-weight: 800; color: var(--charcoal); }
.plan-price-landing span { font-size: 14px; font-weight: 400; color: var(--secondary); }
.plan-desc-landing { font-size: 13px; color: var(--secondary); margin: 12px 0 18px; line-height: 1.5; }

footer {
  text-align: center; padding: 30px 24px;
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--secondary-light);
}

/* ── Error Pages ── */
.error-page {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 24px;
}
.error-code {
  font-family: var(--font-display);
  font-size: 100px; font-weight: 800;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.error-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.error-desc { font-size: 14px; color: var(--secondary); margin-bottom: 24px; }

/* ── Auth Pages ── */
.auth-page {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  width: 48px; height: 48px;
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px var(--gold-glow);
}
.auth-title {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  text-align: center; margin-bottom: 4px;
}
.auth-subtitle {
  text-align: center; font-size: 14px; color: var(--secondary);
  margin-bottom: 28px;
}
.auth-link {
  text-align: center; font-size: 14px; color: var(--secondary);
  margin-top: 20px;
}
.auth-link a { color: var(--gold); text-decoration: none; font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (min-width: 640px) {
  body { padding-bottom: 0; }
}
@media (max-width: 480px) {
  .container, .container-wide { padding: 12px 16px; }
  .price-hero { padding: 18px; }
  .jewel-grid { gap: 6px; }
  .jewel-card { padding: 12px 8px; }
  .jewel-sell { font-size: 17px; }
  .stats-grid { gap: 8px; }
  .stat-value { font-size: 20px; }
  .intl-price { font-size: 34px; }
  .form-row { grid-template-columns: 1fr; }
  .hero-title-landing { font-size: 34px; }
  .feat-grid, .plan-grid-landing { grid-template-columns: 1fr; }
  .plan-card-row { flex-direction: column; text-align: center; gap: 12px; }
}
