/* ==========================================================
 * UPI QR Decoder — Stylesheet
 * ========================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-accent: rgba(99, 102, 241, 0.3);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-indigo: #818cf8;
  --accent-emerald: #34d399;
  --accent-rose: #fb7185;
  --accent-amber: #fbbf24;
  --accent-sky: #38bdf8;

  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-success: linear-gradient(135deg, #059669 0%, #34d399 100%);
  --gradient-danger: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
  --gradient-warning: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- App Container ---------- */
.app {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* ---------- Header ---------- */
.header {
  text-align: center;
  padding: 20px 0 24px;
}

.header__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-hero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.header__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ---------- Scanner Section ---------- */
.scanner-section {
  position: relative;
  margin-bottom: 20px;
}

.scanner-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--border-accent);
  box-shadow: var(--shadow-glow);
  background: #000;
}

.scanner-wrapper #reader {
  width: 100% !important;
  border: none !important;
}

/* iOS requires playsinline for inline video; also prevent object-fit issues */
.scanner-wrapper #reader video {
  border-radius: var(--radius-lg);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.scanner-wrapper #reader__scan_region {
  min-height: 240px;
}

.scanner-wrapper #reader__dashboard {
  background: var(--bg-secondary) !important;
  border-top: 1px solid var(--border-subtle) !important;
  padding: 10px !important;
}

.scanner-wrapper #reader__dashboard button,
.scanner-wrapper #reader__dashboard select {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 14px !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  cursor: pointer;
}

.scanner-wrapper #reader__dashboard span,
.scanner-wrapper #reader__dashboard a {
  color: var(--text-secondary) !important;
  font-family: var(--font-sans) !important;
  font-size: 12px !important;
}

.scanner-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.scanner-label__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- Results Container ---------- */
.results {
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.results.visible {
  display: block;
}

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

/* ---------- Divider ---------- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: 20px 0;
}

/* ---------- Section Title ---------- */
.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ---------- UPI Type Badge ---------- */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  width: 100%;
}

.type-badge--merchant {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--accent-emerald);
}

.type-badge--personal {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.25);
  color: var(--accent-rose);
}

.type-badge__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.type-badge--merchant .type-badge__icon {
  background: rgba(52, 211, 153, 0.15);
}

.type-badge--personal .type-badge__icon {
  background: rgba(251, 113, 133, 0.15);
}

.type-badge__text {
  display: flex;
  flex-direction: column;
}

.type-badge__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

/* ---------- Info Card ---------- */
.info-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: background 0.2s ease;
}

.info-card:last-child {
  margin-bottom: 0;
}

.info-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.info-card__value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-word;
  line-height: 1.5;
}

.info-card__value--mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--accent-sky);
}

.info-card__value--large {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-indigo);
}

.info-card__value--muted {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Info Grid (two columns) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.info-grid .info-card {
  margin-bottom: 0;
}

/* ---------- Kiwi Rewards Section ---------- */
.kiwi-section {
  margin-top: 8px;
}

.kiwi-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.kiwi-card--eligible {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15) 0%, rgba(52, 211, 153, 0.08) 100%);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.kiwi-card--excluded {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.12) 0%, rgba(251, 113, 133, 0.06) 100%);
  border: 1px solid rgba(251, 113, 133, 0.2);
}

.kiwi-card--na {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.12) 0%, rgba(148, 163, 184, 0.06) 100%);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.kiwi-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.kiwi-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.kiwi-card--eligible .kiwi-card__icon { background: rgba(52, 211, 153, 0.15); }
.kiwi-card--excluded .kiwi-card__icon { background: rgba(251, 113, 133, 0.15); }
.kiwi-card--na .kiwi-card__icon       { background: rgba(148, 163, 184, 0.15); }

.kiwi-card__title {
  font-size: 16px;
  font-weight: 700;
}

.kiwi-card--eligible .kiwi-card__title { color: var(--accent-emerald); }
.kiwi-card--excluded .kiwi-card__title { color: var(--accent-rose); }
.kiwi-card--na .kiwi-card__title       { color: var(--text-secondary); }

.kiwi-card__subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
}

.kiwi-card--eligible .kiwi-card__subtitle { color: var(--accent-emerald); }
.kiwi-card--excluded .kiwi-card__subtitle { color: var(--accent-rose); }
.kiwi-card--na .kiwi-card__subtitle       { color: var(--text-muted); }

.kiwi-card__body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.kiwi-card__body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.kiwi-excluded-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.15);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-rose);
  margin-top: 8px;
}

/* ---------- UPI URL Expandable ---------- */
.url-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 10px;
}

.url-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.url-card__header:active {
  background: var(--bg-card-hover);
}

.url-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.url-card__toggle {
  font-size: 12px;
  color: var(--accent-indigo);
  font-weight: 600;
  transition: transform 0.2s;
}

.url-card__body {
  padding: 0 16px 14px;
  display: none;
}

.url-card__body.expanded {
  display: block;
  animation: slideUp 0.3s ease;
}

.url-card__url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-sky);
  word-break: break-all;
  line-height: 1.7;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: var(--radius-sm);
}

/* ---------- All Params Table ---------- */
.params-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.params-table th,
.params-table td {
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.params-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.params-table td:first-child {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-indigo);
  white-space: nowrap;
}

.params-table td:last-child {
  color: var(--text-primary);
  word-break: break-all;
}

/* ---------- Scan Again Button ---------- */
.scan-again-btn {
  display: none;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--gradient-hero);
  color: white;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s, transform 0.1s;
}

.scan-again-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.scan-again-btn.visible {
  display: block;
}

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state__text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

/* ---------- Landing Actions ---------- */
.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s, transform 0.1s;
}

.action-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.action-btn--primary {
  background: var(--gradient-hero);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.action-btn--secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

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

.landing-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

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

.landing-divider span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Gallery Error Toast ---------- */
.gallery-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent-rose);
  font-size: 13px;
  font-weight: 500;
  animation: slideUp 0.3s ease;
}

/* ---------- Cashback Calculator ---------- */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 8px;
}

.calc-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 4px 14px;
  transition: border-color 0.2s;
}

.calc-input-row:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.calc-currency {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.calc-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  padding: 10px 0;
  width: 100%;
  -moz-appearance: textfield;
}

.calc-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 16px;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-results {
  margin-top: 14px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-result-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.calc-result-card--primary {
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.2);
}

.calc-result-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.calc-result-kiwis {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.calc-result-card--primary .calc-result-kiwis {
  color: var(--accent-emerald);
}

.calc-result-card:not(.calc-result-card--primary) .calc-result-kiwis {
  color: var(--accent-indigo);
}

.calc-result-cashback {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.calc-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
}

.calc-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 10px;
  font-style: italic;
}

/* ---------- Quick Pay Actions ---------- */
.pay-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: transform 0.1s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 8px;
}

.pay-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.pay-btn--kiwi {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(52, 211, 153, 0.1) 100%);
  border: 1.5px solid rgba(52, 211, 153, 0.3);
}

.pay-btn--generic {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
}

.pay-btn__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pay-btn__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pay-btn__icon--kiwi {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
}

.pay-btn__icon--upi {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
}

.pay-btn__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.pay-btn__subtitle {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}

.pay-btn__arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

.pay-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pay-hint strong {
  color: var(--accent-emerald);
}

.pay-section-intro {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 8px;
  margin-bottom: 4px;
}

.pay-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.pay-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.pay-app-btn:active {
  transform: scale(0.95);
  background: color-mix(in srgb, var(--app-color) 10%, var(--bg-card));
  border-color: color-mix(in srgb, var(--app-color) 35%, transparent);
}

.pay-app-btn__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pay-app-btn__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Results Actions (bottom) ---------- */
.results-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.results-actions .scan-again-btn {
  margin-top: 0;
}

.gallery-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.gallery-link:active {
  background: var(--bg-card);
}

/* ---------- Scan History ---------- */
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.history-header .section-title {
  flex: 1;
}

.history-clear-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
  margin-left: 12px;
}

.history-clear-btn:active {
  color: var(--accent-rose);
  border-color: var(--accent-rose);
}

.history-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.history-item__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.history-item__kiwi {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.history-item__kiwi--yes {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent-emerald);
}

.history-item__kiwi--no {
  background: rgba(251, 113, 133, 0.12);
  color: var(--accent-rose);
}

.history-item__kiwi--na {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.history-item__info {
  min-width: 0;
}

.history-item__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item__type {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.history-item__amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.history-item__amount--empty {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.history-item__time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Copy VPA Button ---------- */
.copy-vpa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1.5px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.copy-vpa-btn:active {
  background: var(--bg-card);
  border-color: var(--accent-emerald);
}

.copy-vpa-btn__vpa {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Copy Toast ---------- */
.copy-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent-emerald);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  pointer-events: none;
}

.copy-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- App Footer ---------- */
.app-footer {
  text-align: center;
  padding: 20px 0 24px;
  margin-top: 8px;
}

.app-footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.app-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.app-footer__link:active {
  background: var(--bg-card);
  color: var(--text-secondary);
}

.app-footer__link--coffee:active {
  color: #fbbf24;
}

.app-footer__dot {
  color: var(--text-muted);
  opacity: 0.3;
  font-size: 10px;
}

.app-version {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  opacity: 0.4;
  letter-spacing: 0.02em;
}

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}
