/* ═══════════════════════════════════════════════════════════
   QRForge — Professional QR Code Generator
   Style Sheet
   Fonts: Syne (display) + DM Sans (body)
   Aesthetic: Dark-futuristic glassmorphism with neon accents
═══════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  /* --- DARK THEME (default) --- */
  --bg-base: #06091a;
  --bg-surface: #0d1229;
  --bg-glass: rgba(13, 18, 41, 0.55);
  --bg-glass-hover: rgba(13, 18, 41, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 229, 255, 0.35);

  --text-primary: #e8eaf6;
  --text-secondary: #8892b0;
  --text-muted: #4a5568;

  --accent-cyan: #00e5ff;
  --accent-violet: #7c3aed;
  --accent-glow: rgba(0, 229, 255, 0.2);

  --gradient-main: linear-gradient(135deg, #00e5ff 0%, #7c3aed 100%);
  --gradient-btn: linear-gradient(135deg, #00b4cc 0%, #6d28d9 100%);
  --gradient-hero: linear-gradient(135deg, #00e5ff, #7c3aed, #f43f5e);

  --shadow-card:
    0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-btn: 0 8px 32px rgba(0, 229, 255, 0.25);
  --shadow-glow: 0 0 40px rgba(0, 229, 255, 0.15);

  --radius-card: 24px;
  --radius-input: 12px;
  --radius-btn: 14px;
  --radius-pill: 999px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

/* ── LIGHT THEME overrides ── */
[data-theme='light'] {
  --bg-base: #f0f4ff;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-hover: rgba(255, 255, 255, 0.9);
  --border-glass: rgba(0, 0, 0, 0.08);
  --border-active: rgba(0, 100, 200, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-cyan: #0284c7;
  --accent-violet: #7c3aed;
  --accent-glow: rgba(2, 132, 199, 0.15);

  --gradient-main: linear-gradient(135deg, #0284c7 0%, #7c3aed 100%);
  --gradient-btn: linear-gradient(135deg, #0369a1 0%, #6d28d9 100%);

  --shadow-card: 0 24px 64px rgba(0, 0, 50, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --shadow-btn: 0 8px 32px rgba(2, 132, 199, 0.22);
  --shadow-glow: 0 0 40px rgba(2, 132, 199, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

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

/* ══════════════════════════════════════════════
   BACKGROUND DECORATIVE ORBS
══════════════════════════════════════════════ */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: orbDrift 18s ease-in-out infinite alternate;
}
.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #00e5ff, transparent 70%);
  top: -200px;
  left: -200px;
  animation-duration: 20s;
}
.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation-duration: 25s;
  animation-delay: -8s;
}
.orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #f43f5e, transparent 70%);
  top: 40%;
  left: 60%;
  animation-duration: 30s;
  animation-delay: -15s;
}
[data-theme='light'] .bg-orb {
  opacity: 0.09;
}

@keyframes orbDrift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(40px, 30px) scale(1.08);
  }
}

/* ══════════════════════════════════════════════
   GLASS UTILITY
══════════════════════════════════════════════ */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
}

/* ══════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(6, 9, 26, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: background var(--transition-slow);
}
[data-theme='light'] .site-header {
  background: rgba(240, 244, 255, 0.75);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-icon {
  font-size: 1.5rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-text strong {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header badge */
.badge-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-glow);
  border: 1px solid var(--border-active);
  color: var(--accent-cyan);
}

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

/* ── Theme Toggle ── */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  transition:
    background var(--transition),
    border-color var(--transition);
}
.theme-toggle:hover {
  border-color: var(--border-active);
}
.toggle-icon {
  font-size: 13px;
  z-index: 1;
  line-height: 1;
}
.toggle-thumb {
  position: absolute;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gradient-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
}
[data-theme='light'] .toggle-thumb {
  transform: translateX(30px);
}

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.hero {
  text-align: center;
  padding: 72px 24px 40px;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.gradient-text {
  background: var(--gradient-hero);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.7;
}

/* ══════════════════════════════════════════════
   APP WRAPPER & CARD
══════════════════════════════════════════════ */
.app-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
}

.app-card {
  border-radius: var(--radius-card);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.app-card:hover {
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* ── Panels ── */
.panel {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.panel-controls {
  border-right: 1px solid var(--border-glass);
}
.panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════
   FORM FIELDS
══════════════════════════════════════════════ */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}
.optional-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* ── Text input ── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  pointer-events: none;
}
.text-input {
  width: 100%;
  padding: 13px 44px 13px 42px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-input);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}
.text-input::placeholder {
  color: var(--text-muted);
}
.text-input:focus {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
[data-theme='light'] .text-input {
  background: rgba(0, 0, 0, 0.03);
}
[data-theme='light'] .text-input:focus {
  background: rgba(0, 0, 0, 0.05);
}

.clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition:
    color var(--transition),
    background var(--transition);
}
.clear-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ── Color Swatch & Presets ── */
.color-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-swatch {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid var(--border-glass);
  cursor: pointer;
  padding: 0;
  background: none;
  transition:
    border-color var(--transition),
    transform var(--transition);
}
.color-swatch:hover {
  border-color: var(--border-active);
  transform: scale(1.05);
}

.color-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.preset-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.preset-dot:hover {
  transform: scale(1.2);
  border-color: var(--text-primary);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}
.transparent-dot {
  background: conic-gradient(#ccc 25%, white 25%) !important;
  font-size: 13px;
  color: #666;
}

/* ── Slider ── */
.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: var(--border-glass);
  outline: none;
  cursor: pointer;
  transition: background var(--transition);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-main);
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--accent-glow);
  transition:
    box-shadow var(--transition),
    transform var(--transition);
}
.slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 7px var(--accent-glow);
  transform: scale(1.1);
}
.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-main);
  cursor: pointer;
  border: none;
}
.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.slider-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  font-variant-numeric: tabular-nums;
}

/* ── Pill Group (EC Level) ── */
.pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.pill:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: var(--accent-glow);
}
.pill.active {
  background: var(--gradient-main);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.25);
}

/* ── Upload Zone ── */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--border-active);
  background: var(--accent-glow);
}
.upload-icon {
  font-size: 24px;
}
.upload-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.remove-logo-btn {
  background: none;
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  align-self: flex-start;
}
.remove-logo-btn:hover {
  background: rgba(244, 63, 94, 0.12);
}

/* ── Generate Button ── */
.btn-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 28px;
  background: var(--gradient-btn);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    filter var(--transition);
  margin-top: auto;
  position: relative;
  overflow: hidden;
}
.btn-generate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-generate:hover::before {
  opacity: 1;
}
.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 229, 255, 0.35);
}
.btn-generate:active {
  transform: translateY(0);
}
.btn-label {
  font-size: 1rem;
}
.btn-arrow {
  font-size: 1.2rem;
  transition: transform var(--transition);
}
.btn-generate:hover .btn-arrow {
  transform: translateX(4px);
}

/* ══════════════════════════════════════════════
   PREVIEW PANEL
══════════════════════════════════════════════ */
.panel-preview {
  align-items: center;
}

.qr-stage {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.15);
  min-height: 280px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}
[data-theme='light'] .qr-stage {
  background: rgba(0, 0, 0, 0.03);
}

/* Empty state */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.empty-icon {
  font-size: 3rem;
  opacity: 0.2;
  animation: emptyPulse 3s ease-in-out infinite;
}
@keyframes emptyPulse {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.05);
  }
}

/* QR Output */
.qr-output {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: qrReveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes qrReveal {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* QRCode.js injects a canvas or img — style it */
.qr-output canvas,
.qr-output img {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Spinner */
.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
}
.spinner-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent-cyan);
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Action row buttons */
.action-row {
  display: flex;
  gap: 10px;
  width: 100%;
  animation: fadeUp 0.35s ease;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-action {
  flex: 1;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-glass);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all var(--transition);
}
.btn-download {
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-btn);
}
.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.3);
  filter: brightness(1.1);
}
.btn-copy {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.btn-copy:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-active);
  transform: translateY(-2px);
}

/* QR meta info */
.qr-meta {
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  animation: fadeUp 0.4s ease 0.1s both;
  word-break: break-all;
}

/* ══════════════════════════════════════════════
   HISTORY SECTION
══════════════════════════════════════════════ */
.history-section {
  margin-top: 48px;
  animation: fadeUp 0.5s ease;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.history-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.clear-history-btn {
  background: none;
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #f43f5e;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
}
.clear-history-btn:hover {
  background: rgba(244, 63, 94, 0.1);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.history-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  animation: fadeUp 0.4s ease;
}
.history-item:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.history-item canvas,
.history-item img {
  width: 100% !important;
  height: auto !important;
  border-radius: 8px;
}
.history-label {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  word-break: break-all;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  max-height: 2.8em;
}
.history-time {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ══════════════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 35, 60, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
[data-theme='light'] .toast {
  background: rgba(255, 255, 255, 0.95);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════
   RESPONSIVE — TABLET & MOBILE
══════════════════════════════════════════════ */
@media (max-width: 820px) {
  /* Stack panels vertically */
  .app-card {
    grid-template-columns: 1fr;
  }
  .panel-controls {
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
  }
  .panel {
    padding: 28px;
  }

  .hero {
    padding: 48px 20px 28px;
  }
  .hero-sub {
    font-size: 0.95rem;
  }
  .hero-sub br {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 0 16px;
  }
  .badge-pill {
    display: none;
  }
  .hero-title {
    font-size: 2rem;
  }
  .panel {
    padding: 20px;
    gap: 18px;
  }
  .action-row {
    flex-direction: column;
  }
  .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}
