/* === TradeExecutor Theme ===
   Extracted from clerk_callback.html / clerk_logout.html.
   Single source of truth for colors, typography, cards, buttons, and the
   spinning-glow loader used across every page.
   ================================================================== */

/* ── Design tokens ── */
:root {
  --te-bg-base:       #020617;
  --te-bg-surface:    #0b0f16;
  --te-gradient:      radial-gradient(1200px 600px at 50% 0%, rgba(0,136,255,.22), transparent 60%),
                      radial-gradient(900px 500px at 0% 100%, rgba(255,255,255,.06), transparent 55%),
                      #0b0f16;

  --te-primary:       rgba(0,136,255,1);
  --te-primary-22:    rgba(0,136,255,.22);
  --te-primary-28:    rgba(0,136,255,.28);
  --te-primary-35:    rgba(0,136,255,.35);
  --te-primary-55:    rgba(0,136,255,.55);

  --te-text:          #e8eef9;
  --te-text-dim:      rgba(232,238,249,.86);

  --te-card-bg:       rgba(18,24,38,.78);
  --te-card-border:   rgba(255,255,255,.10);
  --te-card-radius:   16px;
  --te-card-shadow:   0 12px 40px rgba(0,0,0,.55);

  --te-btn-bg:        rgba(255,255,255,.08);
  --te-btn-bg-hover:  rgba(255,255,255,.12);
  --te-btn-border:    rgba(255,255,255,.14);
  --te-btn-radius:    12px;

  --te-font:          ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
                      Helvetica, Arial;

  /* Status colours (shared with dashboard) */
  --te-good:  #00c57f;
  --te-bad:   #ff4d4d;
  --te-warn:  #f0c000;
}

/* ── Base reset ── */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--te-bg-base);
  color: var(--te-text);
  font-family: var(--te-font);
}

/* ── Full-page wrapper with gradient (centered single-card pages) ── */
.te-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: var(--te-gradient);
  overflow: hidden;
}

/* ── Glassmorphic card ── */
.te-card {
  width: min(560px, 94vw);
  background: var(--te-card-bg);
  border: 1px solid var(--te-card-border);
  border-radius: var(--te-card-radius);
  padding: 28px 26px;
  box-shadow: var(--te-card-shadow);
  backdrop-filter: blur(10px);
  text-align: center;
}

/* ── Brand heading ── */
.te-brand {
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 26px;
  margin-bottom: 10px;
}

/* ── Inline row (spinner + status text) ── */
.te-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 6px;
}

/* ── Spinner with glow ── */
.te-spinner-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.te-spinner-glow {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--te-primary-55);
  filter: blur(12px);
  opacity: .65;
  animation: te-pulse 1.6s ease-in-out infinite;
}

.te-spinner {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--te-primary);
  animation: te-spin .8s linear infinite;
  z-index: 1;
}

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

@keyframes te-pulse {
  0%   { transform: scale(.85); opacity: .35; }
  50%  { transform: scale(1.15); opacity: .75; }
  100% { transform: scale(.85); opacity: .35; }
}

/* ── Typography helpers ── */
.te-status {
  font-size: 18px;
  font-weight: 600;
  margin: 2px 0;
}

.te-subtitle {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}

.te-detail,
.te-sub {
  margin-top: 6px;
  font-size: 13px;
  opacity: .86;
  line-height: 1.45;
}

/* ── Action row ── */
.te-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.te-btn {
  appearance: none;
  border: 1px solid var(--te-btn-border);
  background: var(--te-btn-bg);
  color: var(--te-text);
  border-radius: var(--te-btn-radius);
  padding: 10px 14px;
  font-weight: 650;
  cursor: pointer;
  transition: .15s ease;
}

.te-btn:hover {
  background: var(--te-btn-bg-hover);
}

.te-btn-primary {
  background: var(--te-primary-22);
  border-color: var(--te-primary-35);
}

.te-btn-primary:hover {
  background: var(--te-primary-28);
}

/* ── Links ── */
.te-link {
  color: rgba(232,238,249,.9);
  text-decoration: none;
  opacity: .85;
}

.te-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ── Mobile logo swap ── */
.logo-mobile { display: none; }
@media (max-width: 768px) {
  .logo-desktop { display: none !important; }
  .logo-mobile  { display: block !important; }
}
