/* ══════════════════════════════════════════════
   CSS VARIABLES & THEME SYSTEM
   ══════════════════════════════════════════════ */
:root {
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #161e2e;
  --bg-card-hover: #1c2640;
  --bg-input: #0d1321;
  --bg-input-focus: #111a2e;
  --border-color: #1e293b;
  --border-focus: #22d3ee;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #22d3ee;
  --accent-hover: #06b6d4;
  --accent-glow: rgba(34, 211, 238, 0.15);
  --accent-glow-strong: rgba(34, 211, 238, 0.25);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.1);
  --warning: #fbbf24;
  --chart-line: #22d3ee;
  --chart-fill-start: rgba(34, 211, 238, 0.3);
  --chart-fill-end: rgba(34, 211, 238, 0.01);
  --chart-grid: rgba(148, 163, 184, 0.08);
  --glass-bg: rgba(22, 30, 46, 0.85);
  --glass-border: rgba(255,255,255,0.06);
  --swap-bg: #1a2744;
  --pill-bg: rgba(34, 211, 238, 0.1);
  --pill-active-bg: rgba(34, 211, 238, 0.2);
  --scrollbar-track: #111827;
  --scrollbar-thumb: #334155;
  --tag-bg: rgba(34, 211, 238, 0.08);
  --tag-text: #22d3ee;
  --shimmer: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --bg-input-focus: #e8edf5;
  --border-color: #e2e8f0;
  --border-focus: #0891b2;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #0891b2;
  --accent-hover: #0e7490;
  --accent-glow: rgba(8, 145, 178, 0.1);
  --accent-glow-strong: rgba(8, 145, 178, 0.18);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.08);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.06);
  --warning: #d97706;
  --chart-line: #0891b2;
  --chart-fill-start: rgba(8, 145, 178, 0.2);
  --chart-fill-end: rgba(8, 145, 178, 0.01);
  --chart-grid: rgba(15, 23, 42, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(0,0,0,0.06);
  --swap-bg: #e0f7fa;
  --pill-bg: rgba(8, 145, 178, 0.08);
  --pill-active-bg: rgba(8, 145, 178, 0.15);
  --scrollbar-track: #f1f5f9;
  --scrollbar-thumb: #cbd5e1;
  --tag-bg: rgba(8, 145, 178, 0.06);
  --tag-text: #0891b2;
  --shimmer: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.02) 50%, transparent 100%);
}

/* ══════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-display);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* ══════════════════════════════════════════════
   BACKGROUND DECORATION
   ══════════════════════════════════════════════ */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 20%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, var(--accent-glow) 0%, transparent 50%);
  opacity: 0.5;
}

/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ══════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════ */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #0a0e17;
  font-weight: 800;
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.privacy-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.privacy-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse-privacy 2s ease infinite;
}

@keyframes pulse-privacy {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ══════════════════════════════════════════════
   STATUS BAR
   ══════════════════════════════════════════════ */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: pulse-dot 2s ease infinite;
}

.status-dot.error { background: var(--danger); animation: none; }
.status-dot.loading { background: var(--warning); }

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

.status-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-bar .last-update {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  border-radius: calc(var(--radius-lg) - 4px);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tab-btn:hover { color: var(--text-secondary); background: var(--bg-card-hover); }

.tab-btn.active {
  background: var(--accent);
  color: #0a0e17;
  box-shadow: 0 2px 12px var(--accent-glow-strong);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ══════════════════════════════════════════════
   CONVERTER SECTION
   ══════════════════════════════════════════════ */
.converter-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: end;
  margin-bottom: 24px;
}

.currency-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.currency-panel:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.panel-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.currency-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.flag-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.currency-select-wrap {
  flex: 1;
  position: relative;
}

.currency-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition);
}

.currency-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
}

.currency-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
}

.amount-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  transition: all var(--transition);
}

.amount-input:focus {
  outline: none;
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
}

.amount-input::placeholder { color: var(--text-muted); }

.amount-input.result-display {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  cursor: default;
}

.rate-info {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Swap Button */
.swap-column {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  align-self: center;
}

.swap-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--swap-bg);
  border: 2px solid var(--border-color);
  color: var(--accent);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.swap-btn:hover {
  background: var(--accent);
  color: #0a0e17;
  border-color: var(--accent);
  transform: rotate(180deg);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

/* Convert Button */
.convert-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.btn-convert {
  flex: 1;
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: var(--radius-md);
  color: #0a0e17;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-convert:hover {
  box-shadow: 0 6px 28px var(--accent-glow-strong);
  transform: translateY(-1px);
}

.btn-convert:active { transform: translateY(0); }

.btn-convert:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ══════════════════════════════════════════════
   QUICK PAIRS
   ══════════════════════════════════════════════ */
.quick-pairs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.quick-pair {
  padding: 8px 16px;
  background: var(--pill-bg);
  border: 1px solid transparent;
  border-radius: 100px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.quick-pair:hover {
  background: var(--pill-active-bg);
  border-color: var(--accent);
}

/* ══════════════════════════════════════════════
   MULTI-CURRENCY TABLE
   ══════════════════════════════════════════════ */
.multi-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.multi-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.multi-table thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
}

.multi-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  transition: background var(--transition);
}

.multi-table tbody tr:last-child td { border-bottom: none; }
.multi-table tbody tr:hover td { background: var(--bg-card-hover); }

.multi-table .currency-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.multi-table .flag-sm {
  font-size: 20px;
}

.multi-table .rate-val {
  font-family: var(--font-mono);
  font-weight: 500;
}

.multi-table .converted-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
}

/* ══════════════════════════════════════════════
   CHART SECTION (Tracker Tab)
   ══════════════════════════════════════════════ */
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.chart-pair-display {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chart-pair-display .pair-label {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.chart-pair-display .pair-rate {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

.chart-pair-display .pair-change {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}

.pair-change.positive { background: var(--success-bg); color: var(--success); }
.pair-change.negative { background: var(--danger-bg); color: var(--danger); }

.period-pills {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.period-pill {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
}

.period-pill:hover { color: var(--text-secondary); }

.period-pill.active {
  background: var(--accent);
  color: #0a0e17;
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  position: relative;
  height: 380px;
}

.chart-container canvas { width: 100% !important; }

.chart-loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.chart-loading-overlay.visible { opacity: 1; pointer-events: auto; }

.chart-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Tracker pair selectors */
.tracker-selectors {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tracker-selectors select {
  padding: 10px 36px 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
  transition: all var(--transition);
}

.tracker-selectors select:focus { outline: none; border-color: var(--border-focus); }

.tracker-select-wrap {
  position: relative;
}

.tracker-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
}

.tracker-swap-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Rate Stats Cards */
.rate-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════
   HISTORY TAB
   ══════════════════════════════════════════════ */
.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.history-count {
  font-size: 14px;
  color: var(--text-muted);
}

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

.btn-icon {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.history-item:hover { border-color: var(--glass-border); background: var(--bg-card-hover); }

.history-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--pill-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.history-detail .history-pair {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.history-detail .history-amounts {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.history-meta {
  text-align: right;
}

.history-meta .history-date {
  font-size: 12px;
  color: var(--text-muted);
}

.history-meta .history-rate {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state .empty-text { font-size: 16px; font-weight: 500; }
.empty-state .empty-sub { font-size: 13px; margin-top: 6px; }

/* ══════════════════════════════════════════════
   CSV IMPORT / DRAG-DROP
   ══════════════════════════════════════════════ */
.import-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 24px;
  position: relative;
}

.import-zone:hover, .import-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.import-zone .drop-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.6; }
.import-zone .drop-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.import-zone .drop-sub { font-size: 13px; color: var(--text-muted); }

.import-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.import-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: none;
}

.import-preview.visible { display: block; animation: fadeIn 0.3s ease; }

.import-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.import-preview-header .file-name {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.import-preview-content {
  max-height: 200px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: pre;
  background: var(--bg-input);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.btn-import-process {
  padding: 12px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #0a0e17;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-import-process:hover { box-shadow: 0 4px 16px var(--accent-glow-strong); }

/* ══════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.app-footer {
  text-align: center;
  padding-top: 40px;
  font-size: 12px;
  color: var(--text-muted);
}

.app-footer a { color: var(--accent); text-decoration: none; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .converter-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .swap-column {
    padding: 12px 0;
  }

  .swap-btn { transform: rotate(90deg); }
  .swap-btn:hover { transform: rotate(270deg); }

  .chart-container { height: 280px; }

  .tabs { overflow-x: auto; }

  .tab-btn { white-space: nowrap; font-size: 13px; padding: 10px 16px; }

  .rate-stats { grid-template-columns: 1fr 1fr; }

  .history-item { grid-template-columns: auto 1fr; }
  .history-meta { grid-column: 2; }

  .chart-header { flex-direction: column; align-items: flex-start; }

  .multi-table { font-size: 13px; }
  .multi-table thead th, .multi-table tbody td { padding: 10px 12px; }

  .header-inner { height: 56px; }
  .logo-text { font-size: 17px; }

  .quick-pairs { gap: 6px; }
  .quick-pair { font-size: 11px; padding: 6px 12px; }
}

@media (max-width: 480px) {
  .amount-input { font-size: 22px; }
  .currency-panel { padding: 18px; }
  .chart-pair-display .pair-label { font-size: 18px; }
  .chart-pair-display .pair-rate { font-size: 18px; }
}

/* ===== SITE FOOTER ===== */
.site-footer{
  margin-top:60px;padding:48px 28px 36px;
  border-top:1px solid var(--border-color);
  background:var(--bg-primary);color:var(--text-secondary);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:14px;line-height:1.6;
}
.site-footer .footer-inner{max-width:1100px;margin:0 auto}
.site-footer .footer-grid{
  display:grid;grid-template-columns:2fr 1fr 1fr 1fr;
  gap:40px;margin-bottom:40px;
}
.site-footer .footer-brand{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.site-footer .footer-brand svg{width:32px;height:32px;color:#a855f7;flex-shrink:0}
.site-footer .footer-brand-name{
  font-size:20px;font-weight:700;
  background:linear-gradient(90deg,#8B5CF6,#EC4899,#3B82F6);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}
.site-footer .footer-desc{color:var(--text-muted);margin-bottom:16px;max-width:360px}
.site-footer .footer-copy{font-size:12px;color:var(--text-muted);opacity:.7}
.site-footer h4{font-weight:700;margin-bottom:16px;color:var(--text-primary);font-size:15px}
.site-footer ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.site-footer a{color:var(--text-secondary);text-decoration:none;transition:color .2s}
.site-footer a:hover{color:#a855f7}
.site-footer .footer-bottom{
  border-top:1px solid var(--border-color);
  padding-top:20px;text-align:center;
}
.site-footer .footer-bottom p{color:var(--text-muted);font-size:13px;opacity:.7}
.site-footer .footer-bottom span{color:#a855f7}

@media(max-width:768px){
  .site-footer .footer-grid{grid-template-columns:1fr;gap:32px}
  .site-footer{padding:36px 16px 28px}
}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
