/* Enquiry Tracker — Bank Recompiler-style chrome (day/night) */
:root,
[data-theme="dark"] {
  --et-bg: #0f172a;
  --et-surface: rgba(11, 31, 51, 0.94);
  --et-card: rgba(15, 36, 58, 0.92);
  --et-text: #f1f5f9;
  --et-muted: #94a3b8;
  --et-accent: #c9a227;
  --et-accent-2: #1e4d7b;
  --et-border: rgba(201, 162, 39, 0.28);
  --et-success: #34d399;
  --et-danger: #f87171;
  --et-warn: #fbbf24;
  --et-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --et-radius: 16px;
}

[data-theme="light"] {
  --et-bg: #fafaf8;
  --et-surface: rgba(255, 255, 255, 0.96);
  --et-card: rgba(255, 255, 255, 0.98);
  --et-text: #0f172a;
  --et-muted: #64748b;
  --et-accent: #0f3d68;
  --et-accent-2: #1e4d7b;
  --et-border: rgba(15, 61, 104, 0.16);
  --et-success: #047857;
  --et-danger: #dc2626;
  --et-warn: #b45309;
  --et-shadow: 0 14px 40px rgba(15, 61, 104, 0.1);
}

html, body.et-app {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--et-bg);
  color: var(--et-text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  transition: background 0.45s ease, color 0.45s ease;
}

body.et-app {
  position: relative;
  overflow-x: hidden;
}

/* Cosmic / aurora background (same spirit as bank-recompiler) */
.cosmic-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.et-aurora, .et-crayon {
  position: absolute;
  inset: 0;
  transition: opacity 0.45s ease;
}
.et-aurora { opacity: 1; }
[data-theme="light"] .et-aurora { opacity: 0; }
.et-crayon { opacity: 0; }
[data-theme="light"] .et-crayon { opacity: 1; }

.et-aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: etFloat 22s infinite ease-in-out;
}
.et-aurora-1 {
  width: 520px; height: 520px;
  background: linear-gradient(135deg, #ff6b9d, #8b5cf6);
  top: -18%; left: -12%;
}
.et-aurora-2 {
  width: 480px; height: 480px;
  background: linear-gradient(135deg, #4ecdc4, #1e4d7b);
  bottom: -10%; right: -8%;
  animation-duration: 28s;
}
.et-aurora-3 {
  width: 360px; height: 360px;
  background: linear-gradient(135deg, #c9a227, #ff6b9d);
  top: 40%; left: 35%;
  animation-duration: 32s;
}

.et-crayon-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  animation: etFloat 26s infinite ease-in-out;
}
.et-crayon-1 {
  width: 420px; height: 420px;
  background: #ffcba4;
  top: -12%; right: -8%;
}
.et-crayon-2 {
  width: 380px; height: 380px;
  background: #95e1d3;
  bottom: -8%; left: -6%;
  animation-duration: 30s;
}
.et-crayon-3 {
  width: 300px; height: 300px;
  background: #dda0dd;
  top: 45%; left: 40%;
  animation-duration: 24s;
}

@keyframes etFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -24px) scale(1.05); }
  66% { transform: translate(-20px, 18px) scale(0.96); }
}

[data-boost="1"] .et-aurora-blob,
[data-boost="1"] .et-crayon-blob {
  animation: none !important;
}

.et-shell {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* Topbar */
.et-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: var(--et-surface);
  border: 1px solid var(--et-border);
  border-radius: var(--et-radius);
  box-shadow: var(--et-shadow);
  backdrop-filter: blur(12px);
}
.et-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.et-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #0f172a;
  background: linear-gradient(145deg, #c9a227, #f0d78c);
  flex-shrink: 0;
}
[data-theme="light"] .et-logo-mark {
  color: #fff;
  background: linear-gradient(145deg, #0f3d68, #1e4d7b);
}
.et-brand-text strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.et-brand-text small {
  display: block;
  color: var(--et-muted);
  font-size: 12px;
  margin-top: 2px;
}
.et-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* —— Mobile top bar rearrange —— */
@media (max-width: 640px) {
  .et-topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
  }
  .et-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
  }
  .et-logo-mark {
    width: 34px;
    height: 34px;
    font-size: 15px;
    border-radius: 10px;
  }
  .et-brand-text {
    min-width: 0;
  }
  .et-brand-text strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(58vw, 220px);
  }
  .et-brand-text small {
    display: none;
  }
  /* Full-width tools row under brand */
  .et-topbar-right {
    flex: 1 1 100%;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
    border-top: 1px solid var(--et-border);
    margin: 0;
    padding-top: 10px;
  }
  .et-topbar-right .et-live-indicator {
    order: 0;
  }
  .et-topbar-right .ainna-nav-controls {
    order: 1;
    margin-left: auto;
  }
  .et-topbar-right .ainna-boost-toggle {
    order: 2;
    width: 34px;
    height: 34px;
    margin-left: 0 !important;
    flex-shrink: 0;
  }
  /* Compact day/night switch on narrow screens */
  .et-topbar-right .ainna-theme-switch {
    transform: scale(0.92);
    transform-origin: right center;
  }
  .et-topbar-right .ainna-wc-link {
    display: none !important; /* hide worldcup chip on mobile topbar */
  }
}

/* Live indicator in top bar (same idea as bank-recompiler) */
.et-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 5px 10px 5px 8px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(16, 185, 129, 0.06));
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.12);
  font-size: 0.78rem;
  line-height: 1.2;
  flex-shrink: 0;
  color: var(--et-text);
}
.et-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: etLivePulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
@keyframes etLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.et-live-label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}
.et-live-count {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: #16a34a;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.et-live-text {
  color: var(--et-muted);
  font-weight: 500;
  font-size: 0.72rem;
}
[data-theme="dark"] .et-live-indicator {
  border-color: rgba(74, 222, 128, 0.4);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(15, 23, 42, 0.45));
}
[data-theme="dark"] .et-live-count {
  color: #86efac;
}
[data-theme="dark"] .et-live-dot {
  background: #4ade80;
}
[data-boost="1"] .et-live-dot {
  animation: none !important;
}
@media (max-width: 520px) {
  .et-live-indicator .et-live-text { display: none; }
  .et-live-indicator { padding: 5px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .et-live-dot { animation: none; }
}

.et-topbar-right .ainna-boost-toggle {
  background: none;
  border: 1px solid var(--et-border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: inherit;
}

/* Hero / description */
.et-hero {
  background: var(--et-card);
  border: 1px solid var(--et-border);
  border-radius: var(--et-radius);
  padding: 22px 20px 20px;
  margin-bottom: 18px;
  box-shadow: var(--et-shadow);
}
.et-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 28px;
  align-items: start;
}
.et-hero-main {
  min-width: 0;
}
.et-hero-qr {
  flex-shrink: 0;
}
.et-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--et-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: 230px;
}
[data-theme="dark"] .et-qr-card {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(201, 162, 39, 0.35);
}
.et-qr-card img {
  display: block;
  width: 180px;
  height: 180px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.et-qr-caption {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #0f172a;
}
.et-qr-caption strong {
  color: #0f3d68;
  font-size: 14px;
}
.et-qr-url {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  word-break: break-all;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
@media (max-width: 720px) {
  .et-hero-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .et-hero-qr {
    justify-self: center;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .et-qr-card {
    max-width: 240px;
  }
}
.et-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--et-accent);
  margin-bottom: 10px;
}
.et-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--et-success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: etPulse 2s infinite;
}
[data-boost="1"] .et-pulse { animation: none; }
@keyframes etPulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.et-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.2;
  color: var(--et-text);
}
.et-hero h1 .et-accent {
  color: var(--et-accent);
}
.et-hero .lead {
  margin: 0 0 14px;
  color: var(--et-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 58ch;
}
.et-trust {
  font-size: 13px;
  color: var(--et-muted);
  margin: 0 0 16px;
}
.et-trust strong { color: var(--et-text); }

.et-explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 640px) {
  .et-explain-grid { grid-template-columns: 1fr; }
}
.et-explain-card {
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--et-border);
  border-radius: 12px;
  padding: 12px 14px;
}
[data-theme="light"] .et-explain-card {
  background: rgba(15, 61, 104, 0.04);
}
.et-explain-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--et-accent);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.et-explain-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.et-explain-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--et-muted);
}

/* Map app cards onto theme */
.et-shell .container {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}
.et-shell .form-section,
.et-shell .leads-section,
.et-shell .mode-section,
.et-shell .disclaimer {
  background: var(--et-card);
  border: 1px solid var(--et-border);
  box-shadow: var(--et-shadow);
  color: var(--et-text);
}
.et-shell header h1 { color: var(--et-accent); }
.et-shell header p,
.et-shell .hint-top,
.et-shell .hint,
.et-shell label,
.et-shell .empty {
  color: var(--et-muted);
}
.et-shell h2 { color: var(--et-text); }
.et-shell input[type="text"],
.et-shell input[type="email"],
.et-shell input[type="date"],
.et-shell input[type="datetime-local"],
.et-shell input[type="file"],
.et-shell textarea {
  background: rgba(0, 0, 0, 0.18);
  border-color: var(--et-border);
  color: var(--et-text);
}
[data-theme="light"] .et-shell input[type="text"],
[data-theme="light"] .et-shell input[type="email"],
[data-theme="light"] .et-shell input[type="date"],
[data-theme="light"] .et-shell input[type="datetime-local"],
[data-theme="light"] .et-shell input[type="file"],
[data-theme="light"] .et-shell textarea {
  background: #fff;
  color: #0f172a;
}
.et-shell .camera-area {
  background: rgba(0, 0, 0, 0.15);
  border-color: var(--et-border);
}
.et-shell .btn-submit,
.et-shell .btn-primary,
.et-shell .btn-camera {
  background: linear-gradient(135deg, var(--et-accent-2), #0f3d68);
}
.et-shell .btn-wipe {
  background: linear-gradient(135deg, #e65100, #bf360c);
}
.et-shell .badge {
  background: var(--et-accent-2);
}
.et-shell .lead-card {
  border-color: var(--et-border);
  background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .et-shell .lead-card {
  background: #fff;
}
.et-shell .lead-info strong { color: var(--et-accent); }
.et-shell .disclaimer {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.12), rgba(201, 162, 39, 0.05));
  border-color: var(--et-accent);
}
.et-shell .disclaimer-lead { color: var(--et-accent); }
.et-shell .disclaimer-list { color: var(--et-muted); }
.et-shell .mode-keep {
  background: rgba(30, 77, 123, 0.2);
  border-color: var(--et-border);
}
.et-shell .mode-wipe {
  background: rgba(230, 81, 0, 0.12);
  border-color: rgba(230, 81, 0, 0.35);
}
.et-shell .net-status.online {
  background: rgba(52, 211, 153, 0.12);
  color: var(--et-success);
}
.et-shell .net-status.offline {
  background: rgba(251, 191, 36, 0.12);
  color: var(--et-warn);
}
.et-shell .has-photo { color: var(--et-success); }
.et-shell .no-photo { color: var(--et-muted); }
.et-shell .photo-status.attached { color: var(--et-success); }

/* Hide old mini page title — hero replaces it */
.et-shell > .container > header { display: none; }
