@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:       #0a0a0a;
  --bg2:      #111111;
  --bg3:      #1a1a1a;
  --border:   #2a2a2a;
  --border2:  #333333;
  --text:     #e8e8e8;
  --text-dim: #666666;
  --text-mid: #999999;
  --white:    #ffffff;
  --glass:    rgba(255,255,255,0.03);
  --accent:   #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Subtle grid ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
}

/* ── Noise texture overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.container { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: 3px;
  text-decoration: none;
}
.logo span { color: var(--text-dim); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 2px;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}
.btn-primary {
  background: var(--white);
  color: #000;
}
.btn-primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,255,255,0.08);
}
.btn-outline {
  background: transparent;
  color: var(--text-mid);
  border: 1px solid var(--border2);
}
.btn-outline:hover {
  color: var(--white);
  border-color: var(--text-mid);
  background: rgba(255,255,255,0.04);
}
.btn-block { width: 100%; text-align: center; padding: 14px; }

/* ── Glass card ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.card-glow {
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset,
              0 20px 40px rgba(0,0,0,0.4);
}

/* ── Hero ── */
.hero {
  padding: 130px 0 90px;
  text-align: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  letter-spacing: 3px;
  color: var(--text-dim);
  border: 1px solid var(--border2);
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 40px;
  text-transform: uppercase;
}
.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.6;
}
.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--white);
  margin-bottom: 28px;
}
.hero h1 .dim { color: var(--text-dim); }
.hero p {
  color: var(--text-mid);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 44px;
  line-height: 1.75;
  font-weight: 300;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

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

/* ── Pricing ── */
.section { padding: 90px 0; }
.section-label {
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.9rem;
  font-weight: 900;
  text-align: center;
  color: var(--white);
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 60px;
  font-size: 0.88rem;
  font-weight: 300;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}

.plan-card { position: relative; transition: border-color 0.2s, transform 0.2s; }
.plan-card:hover { transform: translateY(-3px); border-color: var(--border2); }
.plan-card.featured {
  border-color: rgba(255,255,255,0.15);
  background: var(--bg3);
}
.plan-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  color: #000;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}
.plan-name {
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.plan-price {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.plan-price sup { font-size: 1.2rem; vertical-align: super; opacity: 0.6; }
.plan-period {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  font-weight: 300;
}
.plan-features { list-style: none; margin-bottom: 36px; }
.plan-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--text-mid);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-features li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

/* ── Stats bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
}
.stats-bar > div {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stats-bar > div:last-child { border-right: none; }

/* ── Auth ── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  text-align: center;
  color: var(--white);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.auth-subtitle {
  color: var(--text-dim);
  text-align: center;
  font-size: 0.82rem;
  margin-bottom: 36px;
  font-weight: 300;
}
.form-group { margin-bottom: 18px; }
label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
}
input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 13px 16px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
input:focus { border-color: rgba(255,255,255,0.35); }
input::placeholder { color: var(--text-dim); }
.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.form-footer a { color: var(--white); text-decoration: none; }
.error-msg { color: #ff5555; font-size: 0.78rem; margin-top: 12px; text-align: center; display: none; }
.field-hint { display: block; font-size: 0.68rem; color: var(--text-dim); margin-top: 5px; text-align: right; letter-spacing: 1px; }

/* ── Dashboard ── */
.dashboard-page { padding: 44px 0 80px; }
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}
.dash-greeting {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--white);
}
.dash-greeting span { color: var(--text-mid); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* Loader section — matches site card / monochrome theme */
.dash-loader-section { margin-top: 8px; }
.dash-section-label { font-size: 0.68rem; letter-spacing: 2px; color: var(--text-dim); text-transform: uppercase; margin-bottom: 12px; }
.dash-loader-card { padding: 0; overflow: hidden; }

.dash-loader-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.dash-loader-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--white); opacity: .9; flex-shrink: 0; }
.dash-loader-head-label { font-size: 0.66rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); }

.dash-loader-body {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 16px 18px;
}
.dash-loader-prompt { font-family: var(--ai-mono, monospace); color: var(--text-dim); font-size: 0.84rem; line-height: 1.55; user-select: none; flex-shrink: 0; }
.dash-loader-code { font-family: var(--ai-mono, monospace); font-size: 0.84rem; line-height: 1.55; color: var(--text); word-break: break-all; user-select: all; }
.dash-loader-hint { font-size: 0.74rem; color: var(--text-dim); margin-top: 10px; }
.stat-card { padding: 24px 28px; }
.stat-label {
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
}
.stat-value.large { font-size: 2.4rem; }

.sub-badge {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 4px;
  font-size: 0.65rem;
  letter-spacing: 2px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-weekly  { background: rgba(255,255,255,0.06); color: var(--text-mid); border: 1px solid var(--border2); }
.badge-monthly { background: rgba(255,255,255,0.08); color: var(--text);     border: 1px solid rgba(255,255,255,0.15); }
.badge-lifetime{ background: rgba(255,255,255,0.1);  color: var(--white);    border: 1px solid rgba(255,255,255,0.25); }
.badge-none    { background: rgba(255,50,50,0.07);   color: #ff6666;         border: 1px solid rgba(255,50,50,0.2); }

.progress-bar { height: 2px; background: var(--border); border-radius: 1px; margin-top: 20px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 1px; background: var(--white); transition: width 0.8s ease; }

.api-section { margin-top: 16px; }
.api-section h3 {
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.code-block {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 70px 16px 18px;
  font-size: 0.78rem;
  color: var(--text-mid);
  font-family: 'Inter', monospace;
  word-break: break-all;
  position: relative;
  line-height: 1.5;
}
.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text-mid);
  font-size: 0.65rem;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--white); border-color: var(--text-mid); }

/* ── Utility ── */
.loading { text-align: center; padding: 80px; color: var(--text-dim); }
.spinner {
  width: 32px; height: 32px;
  border: 1px solid var(--border2);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero { padding: 90px 0 60px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stats-bar > div { border-right: none; border-bottom: 1px solid var(--border); }
}

/* Logout button rendered inside a POST form, styled to match nav links */
.linklike {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--text-mid, #aaa);
  cursor: pointer;
  transition: color 0.2s;
}
.linklike:hover { color: var(--text, #fff); }

/* ════════════════════ App shell + Sidebar ════════════════════ */
/* Monochrome accent (gray/white/black) — names kept for compatibility */
:root { --accent-blue: #ffffff; --accent-blue-dim: rgba(255,255,255,0.07); }

.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0d0d0f 0%, #0a0a0a 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.18s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

.sidebar-brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 18px 16px; border-bottom: 1px solid var(--border);
}
.sidebar-brand .logo { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 1.5rem; color: var(--white); text-decoration: none; letter-spacing: 1px; }
.sidebar-brand .logo span { color: var(--text-dim); }

.sidebar-toggle {
  display: grid; place-items: center; width: 26px; height: 26px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 7px;
  color: var(--text-mid); cursor: pointer; transition: all 0.15s;
}
.sidebar-toggle:hover { color: var(--white); border-color: var(--border2); }
.sidebar-toggle svg { width: 14px; height: 14px; }

.sidebar-nav { flex: 1; padding: 14px 12px; }
.nav-section { margin-bottom: 18px; }
.nav-section-title {
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--text-dim); font-weight: 600; padding: 0 10px 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; margin: 2px 0; border-radius: 9px;
  color: var(--text-mid); text-decoration: none; font-size: 0.85rem; font-weight: 400;
  position: relative; transition: background 0.14s, color 0.14s;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: var(--glass); color: var(--text); }
.nav-item.active {
  background: var(--accent-blue-dim);
  color: var(--white);
  font-weight: 500;
}
.nav-item.active::before {
  content: ''; position: absolute; left: -2px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--accent-blue);
}
.nav-item.active svg { opacity: 1; color: var(--accent-blue); }

.sidebar-footer { border-top: 1px solid var(--border); padding: 14px 14px 18px; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  padding: 6px; border-radius: 10px; text-decoration: none;
  border: 1px solid transparent; transition: background 0.13s, border-color 0.13s;
}
a.sidebar-user:hover { background: var(--glass); border-color: var(--border); }
a.sidebar-user.active { background: var(--glass); border-color: var(--border2); }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
  background: var(--accent-blue-dim); color: var(--accent-blue);
}
.sidebar-user-name { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.sidebar-user-role { font-size: 0.72rem; color: var(--text-dim); }
.sidebar-logout { font-size: 0.82rem; }

/* Collapsed state — icons only */
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .logo,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-user-meta,
.sidebar.collapsed .sidebar-logout { display: none; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 18px 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar.collapsed .sidebar-user { justify-content: center; }

/* Main content area */
.app-main { flex: 1; min-width: 0; padding: 30px 40px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 26px; }
.page-head .dash-greeting { margin-top: 4px; }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Profile */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 1.7rem;
  background: var(--accent-blue-dim); color: var(--accent-blue);
}
.profile-name { font-size: 1.25rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }

/* Flash messages */
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.flash {
  padding: 12px 16px; border-radius: 10px; font-size: 0.85rem;
  border: 1px solid var(--border2); background: var(--bg2); color: var(--text);
}
.flash-success { border-color: rgba(62,207,142,0.4); background: rgba(62,207,142,0.08); color: #3ecf8e; }
.flash-error   { border-color: rgba(255,107,107,0.4); background: rgba(255,107,107,0.08); color: #ff6b6b; }

/* Redeem key card */
.redeem-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 16px;
}
.redeem-hint { font-size: 0.85rem; color: var(--text-mid); margin: 0; max-width: 420px; }
.redeem-form { display: flex; gap: 10px; flex: 1; min-width: 280px; max-width: 480px; }
.redeem-input {
  flex: 1; min-width: 0; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px; padding: 11px 14px;
  font-family: 'Consolas', monospace; font-size: 0.88rem; letter-spacing: 1px;
  text-transform: uppercase; outline: none; transition: border-color 0.13s;
}
.redeem-input:focus { border-color: var(--accent-blue); }
.redeem-input::placeholder { color: var(--text-dim); letter-spacing: 1px; }
.redeem-btn {
  flex-shrink: 0; border: none; border-radius: 9px; padding: 11px 22px;
  font-family: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  transition: all 0.13s;
}

/* Secure token UI */
.api-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.api-head h3 { margin: 0; }
.token-warn { font-size: 0.72rem; color: #f59e0b; font-weight: 500; white-space: nowrap; }
.token-row { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.token-row .code-block { flex: 1; min-width: 220px; font-family: monospace; letter-spacing: 1px; display: flex; align-items: center; }
.copy-btn.danger { color: #ff6b6b; border-color: rgba(255,107,107,0.3); }
.copy-btn.danger:hover { background: rgba(255,107,107,0.1); }

/* Tools */
.dropzone {
  border: 1.5px dashed var(--border2); border-radius: 12px; padding: 38px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  color: var(--text-mid);
}
.dropzone p { font-size: 0.85rem; }
.dropzone code { color: var(--text); background: var(--bg3); padding: 1px 6px; border-radius: 4px; font-size: 0.8rem; }
.builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.builder-grid select, .builder-grid input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-family: inherit; font-size: 0.85rem;
}
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--text-dim); padding: 40px 20px; }

@media (max-width: 820px) {
  .sidebar { position: fixed; z-index: 200; height: 100vh; }
  .app-main { padding: 24px 18px; }
  .account-grid, .builder-grid { grid-template-columns: 1fr; }
}

/* ════════════════════ Trigger Builder ════════════════════ */
.tb-grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 18px; align-items: start; }
.tb-grid select { width: 100%; background-color: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 11px 36px 11px 12px; border-radius: 9px; font-family: inherit; font-size: 0.88rem; }

.tb-toggle { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; color: var(--text); }
.tb-toggle:first-of-type { border-top: 1px solid var(--border); }

/* iOS-style switch */
.switch { position: relative; display: inline-block; width: 42px; height: 23px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; cursor: pointer; background: var(--bg3); border: 1px solid var(--border2); border-radius: 23px; transition: 0.2s; }
.slider::before { content: ''; position: absolute; height: 17px; width: 17px; left: 2px; top: 2px; background: #888; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--accent-blue); border-color: var(--accent-blue); }
.switch input:checked + .slider::before { transform: translateX(19px); background: #0a0a0a; }

.tb-args-head { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; font-size: 0.88rem; color: var(--text); }
.tb-add { background: none; border: none; color: var(--accent-blue); cursor: pointer; font-size: 0.85rem; font-weight: 500; }
.tb-add:hover { text-decoration: underline; }
.tb-arg-row { display: flex; gap: 8px; margin-top: 8px; }
.tb-arg-row input { flex: 1; background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: 9px 11px; border-radius: 8px; font-family: inherit; font-size: 0.85rem; }
.tb-arg-rm { width: 36px; flex-shrink: 0; background: var(--bg3); border: 1px solid var(--border); color: var(--text-mid); border-radius: 8px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.tb-arg-rm:hover { color: #ff6b6b; border-color: rgba(255,107,107,0.3); }

/* Output */
.tb-output-card { padding: 0; overflow: hidden; }
.tb-output-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.tb-copy { display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--border); color: var(--text-mid); padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 0.8rem; text-transform: none; letter-spacing: 0; }
.tb-copy:hover { color: var(--text); border-color: var(--border2); }
.tb-copy.ok { color: #4ade80; border-color: rgba(74,222,128,0.3); }

.tb-code { margin: 0; padding: 18px 0; font-family: 'Consolas', 'Monaco', monospace; font-size: 0.86rem; line-height: 1.6; background: #0c0c0e; min-height: 220px; overflow-x: auto; counter-reset: none; }
.tb-code .ln { display: block; }
.tb-code .ln-no { display: inline-block; width: 38px; padding-right: 14px; text-align: right; color: #3a3a42; user-select: none; }
.tb-code .ln-body { white-space: pre; }
.tb-code .t-k { color: #c084fc; }   /* keyword/function */
.tb-code .t-fn { color: #60a5fa; }  /* trigger fn */
.tb-code .t-s { color: #fbbf24; }   /* string */
.tb-code .t-n { color: #4ade80; }   /* number/literal */
.tb-code .t-p { color: #9ca3af; }   /* punctuation */

@media (max-width: 900px) { .tb-grid { grid-template-columns: 1fr; } }

/* ════════ Firefox / native form controls: dark theme + custom arrow ════════ */
html { color-scheme: dark; }   /* themes select popups, scrollbars, date pickers in FF/Chrome */

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7a85' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
}
select:focus { outline: none; border-color: var(--accent-blue); }
select:hover { border-color: var(--border2); }

/* ════════════════════ Dump Analyzer v2 ════════════════════ */
.dv2-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: calc(100vh - 120px);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg2);
  position: relative;
}

/* ── LEFT SIDEBAR ── */
.dv2-sidebar {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg2);
  overflow: hidden;
}

.dv2-brand-row {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dv2-brand {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-dim);
}

.dv2-sidebar-section {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
}
.dv2-upload-section { border-bottom: none; }
.dv2-dumps-section  { flex: 1; overflow-y: auto; min-height: 0; }

.dv2-section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.dv2-section-label {
  font-size: 0.67rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim); font-weight: 600;
}
.dv2-dump-count {
  font-size: 0.67rem; color: var(--text-dim);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 7px;
}

/* Dump list items */
.dv2-no-dumps { font-size: 0.75rem; color: var(--text-dim); opacity: .6; padding: 2px 0; }
.dv2-dump-row {
  display: flex; align-items: stretch; gap: 4px;
  margin-bottom: 3px;
}
.dv2-dump-info {
  flex: 1; min-width: 0; padding: 9px 10px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  cursor: pointer; transition: background .13s, border-color .13s;
}
.dv2-dump-info:hover { background: var(--glass); border-color: var(--border); }
.dv2-dump-row.active .dv2-dump-info {
  background: var(--bg3); border-color: var(--border2);
}
.dv2-dump-name {
  display: block; font-size: 0.82rem; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dv2-dump-meta {
  display: block; font-size: 0.69rem; color: var(--text-dim); margin-top: 2px;
}
.dv2-del-btn {
  flex-shrink: 0; width: 28px; align-self: center;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim); border-radius: 6px; cursor: pointer;
  font-size: 1rem; transition: all .13s; line-height: 1;
}
.dv2-del-btn:hover { color: #ff6b6b; border-color: rgba(255,107,107,.3); background: rgba(255,107,107,.06); }

/* Upload area */
.dv2-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 10px; text-align: center;
  border: 1.5px dashed var(--border2); border-radius: 10px;
  color: var(--text-dim); font-size: 0.78rem;
  transition: border-color .15s, background .15s; cursor: default; margin-bottom: 8px;
}
.dv2-dropzone.drag { border-color: var(--text-mid); background: var(--glass); }
.dv2-upload-btns { display: flex; gap: 6px; }
.dv2-upload-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 8px; border-radius: 7px; font-size: 0.74rem; font-family: inherit;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-dim);
  cursor: pointer; transition: all .13s;
}
.dv2-upload-btn:hover { color: var(--text); border-color: var(--border2); }

/* Scan result (shown after indexing, replaces upload area) */
.dv2-scan-result {
  border-top: 1px solid var(--border); padding: 14px 14px 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.dv2-scan-stats {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  font-size: 0.78rem; color: var(--text-mid);
}
.da3-stat strong { color: var(--text); }
.da3-stat-sep { color: var(--border2); }
.dv2-name-inp {
  width: 100%; box-sizing: border-box;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 8px 10px; border-radius: 8px;
  font-family: inherit; font-size: 0.83rem;
}
.dv2-name-inp:focus { outline: none; border-color: var(--border2); }
.dv2-scan-actions { display: flex; gap: 8px; }
.dv2-save-btn { flex: 1; padding: 8px 12px; font-size: 0.8rem; }
.dv2-discard-btn {
  padding: 8px 12px; border-radius: 8px; font-size: 0.76rem; font-family: inherit;
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  cursor: pointer; transition: all .13s;
}
.dv2-discard-btn:hover { color: var(--text); border-color: var(--border2); }

.da3-status { font-size: 0.75rem; color: var(--text-mid); padding: 0 14px 10px; display: none; }
.da3-status.warn { color: #ff8f8f; }

/* ── MAIN AREA ── */
.dv2-main {
  display: flex; flex-direction: column;
  background: var(--bg); position: relative; overflow: hidden;
}

/* Empty state */
.dv2-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 0.86rem; text-align: center; padding: 40px;
}
.dv2-empty p { margin: 0; opacity: .55; }

/* Dump view container */
.dv2-dump-view {
  flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}

/* Dump top bar */
.dv2-dump-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
}
.dv2-dump-title-group { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.dv2-dump-name {
  font-size: 0.9rem; font-weight: 650; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dv2-dump-meta { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; }
.dv2-files-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 8px; font-size: 0.75rem; font-family: inherit;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-dim);
  cursor: pointer; transition: all .13s; flex-shrink: 0;
}
.dv2-files-btn:hover { color: var(--text); border-color: var(--border2); }
.dv2-files-btn.active { color: var(--white); border-color: var(--text-mid); background: var(--glass); }

/* ── FILES PANEL (slides in from right) ── */
.dv2-files-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 360px; display: flex; flex-direction: column;
  background: var(--bg2); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .22s ease;
  z-index: 20;
}
.dv2-files-panel.open { transform: translateX(0); }

.dv2-fp-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.dv2-fp-title { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.dv2-fp-tabs {
  display: flex; gap: 3px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 7px; padding: 2px; margin-left: auto;
}
.dv2-fp-tab {
  padding: 4px 12px; border-radius: 5px; font-size: 0.72rem; font-family: inherit;
  background: transparent; border: none; color: var(--text-dim); cursor: pointer; transition: all .12s;
}
.dv2-fp-tab.active { background: var(--bg); color: var(--text); }
.dv2-fp-close {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  padding: 4px; border-radius: 6px; display: flex; align-items: center; transition: color .12s;
}
.dv2-fp-close:hover { color: var(--text); }

.dv2-fp-search {
  padding: 10px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.dv2-fp-search-inp {
  width: 100%; box-sizing: border-box;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  padding: 7px 11px; border-radius: 8px; font-family: inherit; font-size: 0.82rem;
}
.dv2-fp-search-inp:focus { outline: none; border-color: var(--border2); }
.dv2-kind-btns { display: flex; gap: 4px; }
.da3-kind-btn {
  padding: 5px 11px; border-radius: 7px; font-size: 0.72rem; font-family: inherit;
  background: var(--bg2); border: 1px solid var(--border); color: var(--text-dim);
  cursor: pointer; transition: all .13s;
}
.da3-kind-btn:hover  { border-color: var(--border2); color: var(--text); }
.da3-kind-btn.active { border-color: var(--text-mid); color: var(--text); background: var(--glass); }

.dv2-fp-body { flex: 1; overflow-y: auto; padding: 8px; }

/* ── List view cards (inside files panel) ── */
.da3-list-card { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.da3-list-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.da3-list-script { font-family: 'Consolas', monospace; font-size: 0.8rem; font-weight: 600; color: var(--text); }
.da3-list-count {
  margin-left: auto; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px; font-size: 0.66rem; color: var(--text-dim);
}
.da3-list-body { padding: 4px 6px; }
.da3-list-nomatch { padding: 24px; text-align: center; color: var(--text-dim); font-size: 0.83rem; }

/* ── Tree nodes ── */
.da-node { margin-left: 2px; }
.da-node > summary {
  list-style: none; display: flex; align-items: center; gap: 7px;
  padding: 5px 8px; border-radius: 7px; cursor: pointer;
  font-size: 0.83rem; color: var(--text); user-select: none;
}
.da-node > summary::-webkit-details-marker { display: none; }
.da-node > summary:hover { background: var(--glass); }
.da-ic { display: inline-block; width: 10px; color: var(--text-dim); transition: transform 0.15s; font-size: 0.65rem; flex-shrink: 0; }
.da-node[open] > summary > .da-ic { transform: rotate(90deg); }
.da-folder-name { font-weight: 600; color: var(--text); }
.da-file .da-file-name { color: var(--text-mid); font-family: 'Consolas', monospace; font-size: 0.8rem; flex: 1; }
.da3-file-badges { margin-left: auto; display: flex; gap: 4px; }
.da-children { margin-left: 18px; border-left: 1px solid var(--border); padding-left: 4px; }
.da-events   { margin-left: 18px; border-left: 1px solid var(--border); padding-left: 4px; padding-bottom: 4px; }

/* Event rows */
.da-event { display: flex; align-items: center; gap: 8px; padding: 4px 8px; font-size: 0.79rem; border-radius: 5px; }
.da-event:hover { background: var(--glass); }
.da3-ev-kind {
  font-size: 0.57rem; font-weight: 700; letter-spacing: 0.5px;
  padding: 2px 5px; border-radius: 3px; flex-shrink: 0;
}
.da-event-defined   .da3-ev-kind { background: rgba(255,255,255,0.1); color: var(--text-mid); }
.da-event-triggered .da3-ev-kind { border: 1px solid var(--border2); color: var(--text-dim); }
.da-ev-call {
  font-family: 'Consolas', monospace; font-size: 0.77rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.da-event-triggered .da-ev-call { color: var(--text); }
.da-event-defined   .da-ev-call { color: var(--text-mid); }
.da-badge { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.5px; padding: 1px 5px; border-radius: 3px; flex-shrink: 0; }
.da-badge.defined   { background: rgba(255,255,255,0.1); color: var(--text-mid); }
.da-badge.triggered { border: 1px solid var(--border2); color: var(--text-dim); }

/* ── AI chat fills the dump view ── */
#daAi {
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 28px;
  --ai-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ai-code-bg: #0d0d12;
  flex: 1; display: flex; flex-direction: row; min-height: 0; overflow: hidden;
  position: relative;
}

@media (max-width: 900px) {
  .dv2-shell { grid-template-columns: 1fr; height: auto; }
  .dv2-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
  .dv2-files-panel { width: 100%; }
}

.page-head code { background: var(--bg3); color: var(--text); padding: 1px 6px; border-radius: 4px; font-size: 0.8rem; }

/* ════════════════════ Script Environment — IDE ════════════════════ */
.se2-shell {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 0; height: calc(100vh - 120px);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
@media (max-width: 900px) { .se2-shell { grid-template-columns: 1fr; height: auto; } }

/* Sidebar */
.se2-sidebar {
  border-radius: 0; border: none; border-right: 1px solid var(--border);
  padding: 14px 10px; overflow-y: auto; background: var(--bg2);
}
.se2-sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-dim); margin-bottom: 12px; padding: 0 6px 10px;
  border-bottom: 1px solid var(--border);
}
.se2-script-count {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px; font-size: 0.68rem; color: var(--text-mid);
}
.se2-empty-hint { font-size: 0.78rem; color: var(--text-dim); padding: 8px 6px; }
.se2-script-item {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 8px; border-radius: 7px; cursor: pointer;
  font-size: 0.82rem; color: var(--text-mid); transition: all 0.13s;
  white-space: nowrap; overflow: hidden;
}
.se2-script-item:hover  { background: var(--glass); color: var(--text); }
.se2-script-item.active { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.se2-script-name { overflow: hidden; text-overflow: ellipsis; }

/* Main editor area */
.se2-main { display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }

/* Toolbar */
.se2-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
}
.se2-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 7px; font-size: 0.78rem; font-family: inherit;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-mid);
  cursor: pointer; transition: all 0.13s;
}
.se2-btn:hover { color: var(--text); border-color: var(--border2); }
.se2-btn-del:hover { color: #ff6b6b; border-color: rgba(255,107,107,0.25); }
.se2-title-wrap { flex: 1; padding: 0 6px; display: flex; align-items: center; }
.se2-title-inp {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font-family: 'Consolas', monospace; font-size: 0.86rem;
  padding: 4px 0;
}
.se2-title-ext {
  flex-shrink: 0; font-family: 'Consolas', monospace; font-size: 0.86rem;
  color: var(--text-dim); user-select: none; pointer-events: none;
}
.se2-title-inp::placeholder { color: var(--text-dim); }

/* Editor wrap */
.se2-editor-wrap {
  flex: 1; display: flex; overflow: hidden; position: relative;
  background: var(--bg);
}
.se2-line-nums {
  padding: 14px 10px 14px 14px; background: var(--bg2);
  border-right: 1px solid var(--border);
  font-family: 'Consolas', monospace; font-size: 0.85rem; line-height: 22px;
  color: var(--text-dim); text-align: right; user-select: none;
  overflow: hidden; flex-shrink: 0; min-width: 44px;
  white-space: pre;
}
.se2-textarea {
  flex: 1; resize: none; border: none; outline: none;
  background: var(--bg); color: var(--text);
  font-family: 'Consolas', monospace; font-size: 0.85rem; line-height: 22px;
  padding: 14px 16px; tab-size: 2; white-space: pre;
  overflow: auto;
}
.se2-textarea::placeholder { color: var(--text-dim); opacity: .5; }

/* Autocomplete dropdown */
.se2-ac {
  position: absolute; z-index: 100;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 8px; min-width: 460px; max-width: 600px;
  max-height: 280px; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  padding: 4px;
}
.se2-ac-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px; cursor: pointer; border-radius: 6px;
  transition: background 0.1s;
}
.se2-ac-item:hover, .se2-ac-item.active { background: var(--bg3); }
.se2-ac-icon {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; font-family: 'Consolas', monospace;
  background: rgba(255,255,255,0.08); color: var(--text-mid);
  border: 1px solid var(--border);
}
.se2-ac-main { display: flex; align-items: baseline; gap: 2px; min-width: 0; flex-shrink: 0; max-width: 60%; }
.se2-ac-n { font-family: 'Consolas', monospace; font-size: 0.84rem; color: var(--text); white-space: nowrap; }
.se2-ac-p { font-family: 'Consolas', monospace; font-size: 0.74rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se2-ac-d { font-size: 0.73rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: right; }
.se2-ac-ns {
  flex-shrink: 0; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.5px;
  color: var(--text-dim); background: var(--bg3); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; text-transform: uppercase;
}

/* ── Community Scripts ── */
.cs-search-wrap { flex-shrink: 0; }
.cs-search {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 0.82rem;
  padding: 8px 14px; min-width: 240px; outline: none; transition: border-color 0.13s;
}
.cs-search:focus { border-color: var(--border2); }
.cs-search::placeholder { color: var(--text-dim); }

.cs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}
.cs-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.cs-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cs-card-title {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  color: var(--white); font-weight: 600; font-size: 0.92rem;
}
.cs-card-title svg { color: var(--text-mid); flex-shrink: 0; }
.cs-card-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-lines { flex-shrink: 0; font-size: 0.7rem; color: var(--text-dim); }

.cs-snippet {
  font-family: 'Consolas', monospace; font-size: 0.74rem; line-height: 1.5;
  color: var(--text-mid); background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; padding: 10px 12px; max-height: 60px; overflow: hidden;
  white-space: pre-wrap; word-break: break-word;
}

.cs-meta { display: flex; flex-wrap: wrap; gap: 14px; }
.cs-meta-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--text-dim);
}
.cs-meta-item svg { color: var(--text-mid); }

.cs-actions { display: flex; gap: 8px; margin-top: auto; }
.cs-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 7px; font-size: 0.78rem; font-family: inherit;
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-mid);
  cursor: pointer; transition: all 0.13s;
}
.cs-btn:hover { color: var(--text); border-color: var(--border2); }
.cs-btn-save { color: #3ecf8e; border-color: rgba(62,207,142,0.25); }
.cs-btn-save:hover { color: #3ecf8e; background: rgba(62,207,142,0.08); border-color: rgba(62,207,142,0.4); }

/* Preview modal */
.cs-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.cs-modal[hidden] { display: none; }
.cs-modal-box { width: min(760px, 100%); max-height: 82vh; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.cs-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cs-modal-head span { font-family: 'Consolas', monospace; color: var(--white); font-size: 0.9rem; }
.cs-modal-code {
  flex: 1; overflow: auto; margin: 0;
  font-family: 'Consolas', monospace; font-size: 0.8rem; line-height: 1.55;
  color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px; white-space: pre; word-break: normal;
}

/* ════════════════════ Staff Panel ════════════════════ */
.staff-tag {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 1.5px; color: var(--white);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 5px; padding: 2px 7px; margin-left: auto;
}
.staff-link { color: var(--white) !important; margin-bottom: 10px; }
.staff-link svg { color: var(--white); opacity: 0.9; }

/* Role badge — shown next to a name, outlined in the role's colour. */
.role-badge {
  display: inline-block; vertical-align: middle;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  line-height: 1; padding: 3px 8px; border-radius: 6px; margin-left: 6px;
  border: 1px solid currentColor;
}
.role-badge.role-dev   { color: #c9a3ff; background: rgba(178,124,255,0.12); }  /* Developer */
.role-badge.role-owner { color: #ffd479; background: rgba(255,196,77,0.12); }   /* Owner */
.role-badge.role-mod   { color: #7fd1ff; background: rgba(77,177,255,0.12); }   /* Moderator */
.role-badge.role-staff { color: #8fe3b0; background: rgba(77,224,150,0.10); }   /* Support Staff */

/* Username cell: name with the role as a small coloured line underneath */
.u-name { font-weight: 500; color: var(--text); }
.u-role {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; margin-top: 2px; color: var(--text-dim);
}
.u-role.role-dev   { color: #c9a3ff; }
.u-role.role-owner { color: #ffd479; }
.u-role.role-mod   { color: #7fd1ff; }
.u-role.role-staff { color: #8fe3b0; }

/* Inline role assignment control in the users table */
.role-form { display: inline-flex; align-items: center; gap: 6px; }
.role-select {
  background: var(--bg); color: var(--text); border: 1px solid var(--border2);
  border-radius: 6px; padding: 4px 6px; font-size: 0.78rem;
}
.role-set-btn { padding: 4px 10px; font-size: 0.75rem; }

/* Empty state (e.g. tickets queue with nothing in it) */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.empty-state svg { opacity: 0.5; margin-bottom: 12px; }
.empty-state h3 { color: var(--text); font-weight: 600; margin-bottom: 6px; }

/* ════════════════════════════════════════════════════════════════════
   FGR AI chat — fills the dump view (no tabs, always visible).
   ════════════════════════════════════════════════════════════════════ */
.da3-tab-ai { display: inline-flex; align-items: center; }

/* ── History drawer (flex sibling to ai-chat-main — pushes, never overlays) ── */
.ai-hist-drawer {
  width: 0; flex-shrink: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg2);
  border-right: 0px solid var(--border);
  transition: width .2s ease, border-right-width .01s ease;
}
.ai-hist-drawer.open {
  width: 220px;
  border-right-width: 1px;
}
.ai-hist-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ai-hist-title { font-size: 0.78rem; font-weight: 600; color: var(--text); letter-spacing: .3px; }
.ai-hist-close { background: none; border: none; color: var(--text-dim); cursor: pointer;
  padding: 4px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: color .12s; }
.ai-hist-close:hover { color: var(--text); }
.ai-hist-list { flex: 1; overflow-y: auto; padding: var(--sp-2); display: flex; flex-direction: column; gap: 2px; }
.ai-hist-item {
  width: 100%; background: none; border: none; text-align: left; cursor: pointer;
  padding: var(--sp-2) var(--sp-3); border-radius: 8px; color: var(--text-dim);
  font-size: 0.78rem; line-height: 1.4; font-family: inherit; transition: background .12s, color .12s;
  display: flex; flex-direction: column; gap: 2px;
}
.ai-hist-item:hover { background: var(--glass); color: var(--text); }
.ai-hist-item.active { background: rgba(255,255,255,0.07); color: var(--text); }
.ai-hist-item-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-hist-item-meta { font-size: 0.68rem; color: var(--text-dim); opacity: .7; }
.ai-hist-item-del {
  align-self: flex-end; background: none; border: none; color: var(--text-dim);
  cursor: pointer; font-size: 0.65rem; padding: 2px 6px; border-radius: 5px;
  margin-top: 2px; font-family: inherit; transition: color .12s;
}
.ai-hist-item-del:hover { color: #d88; }
.ai-hist-empty { font-size: 0.75rem; color: var(--text-dim); padding: var(--sp-3); text-align: center; opacity: .6; }

/* ── Main chat column ── */
.ai-chat-main {
  flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0;
}

/* ── Chat head bar ── */
.da3-ai-head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.ai-title { display: flex; align-items: center; gap: var(--sp-2); font-weight: 650; font-size: 0.88rem; color: var(--text); }
.ai-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 6px rgba(255,255,255,0.4); flex-shrink: 0; }
.ai-head-actions { margin-left: auto; display: flex; gap: var(--sp-2); }
.ai-hd-btn {
  display: inline-flex; align-items: center; gap: 5px; background: none;
  border: 1px solid var(--border2); color: var(--text-dim); border-radius: 7px;
  padding: 4px 10px; font-family: inherit; font-size: 0.7rem; cursor: pointer;
  transition: color .12s, border-color .12s;
}
.ai-hd-btn:hover { color: var(--text); border-color: var(--text-mid); }
.ai-hd-btn.active { color: var(--white); border-color: var(--white); background: rgba(255,255,255,0.06); }

/* ── Message list ── */
.ai-messages {
  flex: 1; overflow-y: auto; min-height: 0;
  display: flex; flex-direction: column; gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-4) var(--sp-3);
}
.ai-empty { color: var(--text-dim); font-size: 0.88rem; line-height: 1.7; padding: var(--sp-4) 0; }
.ai-empty strong { color: var(--text-mid); }

.ai-msg { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 100%; animation: aiMsgIn .18s ease; }
@keyframes aiMsgIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.ai-msg-body { font-size: 0.9rem; line-height: 1.7; color: var(--text-mid);
  display: flex; flex-direction: column; gap: var(--sp-3); word-wrap: break-word; min-width: 0; }
.ai-msg-body > p { margin: 0; }
.ai-msg-user { align-items: flex-end; }
.ai-msg-user .ai-msg-body { color: var(--text); background: var(--glass);
  border: 1px solid var(--border2); border-radius: 12px; padding: var(--sp-3) var(--sp-4); max-width: 88%; }
.ai-msg-body code { background: var(--ai-code-bg); padding: 2px 6px; border-radius: 5px;
  font-family: var(--ai-mono); font-size: 0.84em; color: #cdd6e6; }

/* Typing dots */
.ai-typing-dots { display: inline-flex; gap: 5px; padding: var(--sp-1) 0; }
.ai-typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); animation: aiBlink 1.2s infinite; }
.ai-typing-dots span:nth-child(2) { animation-delay: .18s; }
.ai-typing-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes aiBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Stream cursor */
.ai-stream-cursor { display: inline-block; width: 2px; height: 1em; background: var(--text-dim);
  margin-left: 2px; vertical-align: text-bottom; animation: aiCursor .7s step-end infinite; }
@keyframes aiCursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Structured response cards ── */
.ai-card { border: 1px solid var(--border); border-radius: 10px; padding: var(--sp-3) var(--sp-4); background: var(--glass); }
.aic-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.aic-badge { font-size: 0.58rem; font-weight: 600; letter-spacing: .9px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; background: var(--bg3); color: var(--text-mid); border: 1px solid var(--border); }
.aic-title { font-family: var(--ai-mono); font-size: 0.86rem; font-weight: 500; color: var(--text); word-break: break-all; }
.aic-fields { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-2); }
.aic-row { display: flex; gap: var(--sp-3); font-size: 0.8rem; line-height: 1.55; }
.aic-k { color: var(--text-dim); min-width: 76px; flex-shrink: 0; }
.aic-v { color: var(--text-mid); font-family: var(--ai-mono); word-break: break-all; }
.aic-warning { border-color: rgba(220,120,120,0.4); }
.aic-warning .aic-badge { color: #d88; border-color: rgba(220,120,120,0.4); background: rgba(220,120,120,0.08); }

/* Per-type badge accents */
.aic-event   .aic-badge { color: #e8e8e8; border-color: var(--border2); background: var(--bg3); }
.aic-trigger .aic-badge,
.aic-command .aic-badge { color: #cdb; border-color: rgba(150,180,150,0.35); background: rgba(150,180,150,0.07); }
.aic-export  .aic-badge,
.aic-callback .aic-badge { color: #bcd; border-color: rgba(150,170,200,0.35); background: rgba(150,170,200,0.07); }
.ai-card + .ai-card { margin-top: calc(var(--sp-2) * -1 + 2px); }  /* tighten stacked result cards */

/* Inline markdown emphasis + headings inside AI replies */
.ai-msg-body strong { color: var(--text); font-weight: 600; }
.ai-msg-body em { color: var(--text); font-style: italic; }
.ai-msg-body .ai-h { font-size: 0.82rem; font-weight: 600; letter-spacing: .3px; color: var(--text);
  text-transform: none; margin: var(--sp-2) 0 calc(var(--sp-1) * -1); }
.ai-msg-body .ai-h:first-child { margin-top: 0; }

/* ── Code blocks ── */
.ai-codeblock { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--ai-code-bg); }
.ai-cb-head { display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-2) var(--sp-3); background: rgba(255,255,255,0.035); border-bottom: 1px solid var(--border); }
.ai-cb-lang { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-dim); }
.ai-copy { background: none; border: 1px solid var(--border2); color: var(--text-dim);
  font-size: 0.66rem; padding: 3px 10px; border-radius: 6px; cursor: pointer; transition: color .12s, border-color .12s; }
.ai-copy:hover { color: var(--text); border-color: var(--text-mid); }
.ai-cb-body { display: flex; overflow-x: auto; }
.ai-cb-gutter { flex-shrink: 0; text-align: right; padding: var(--sp-3) var(--sp-2); margin: 0; user-select: none;
  color: var(--text-dim); opacity: .65; border-right: 1px solid var(--border);
  font-family: var(--ai-mono); font-size: 0.8rem; line-height: 1.65; }
.ai-cb-code { margin: 0; padding: var(--sp-3) var(--sp-4); overflow-x: auto; white-space: pre;
  font-family: var(--ai-mono); font-size: 0.8rem; line-height: 1.65; color: #cdd6e6; }
.ai-cb-code .tk-kw { color: #e8e8e8; font-weight: 500; }
.ai-cb-code .tk-str { color: #9aa0a6; }
.ai-cb-code .tk-com { color: #5a5a5a; font-style: italic; }
.ai-cb-code .tk-num { color: #bdbdbd; }

/* ── Input ── */
.ai-input-row { display: flex; gap: var(--sp-2); align-items: flex-end;
  padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); flex-shrink: 0; }
.ai-input { flex: 1; resize: none; overflow-y: hidden; background: var(--bg); color: var(--text);
  border: 1px solid var(--border2); border-radius: 12px; padding: var(--sp-3) var(--sp-4);
  font-size: 0.9rem; line-height: 1.5; font-family: inherit; max-height: 140px; transition: border-color .12s; }
.ai-input::placeholder { color: var(--text-dim); }
.ai-input:focus { outline: none; border-color: var(--text-mid); }
.ai-send { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; border: none;
  background: var(--white); color: #0b0b0f; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: opacity .12s, transform .12s; }
.ai-send:hover { opacity: .85; transform: translateY(-1px); }
.ai-send svg { color: #0b0b0f; }
.ai-send:disabled { opacity: .35; cursor: default; transform: none; }
.ai-locked { padding: var(--sp-4); margin-top: var(--sp-4); border: 1px dashed var(--border2);
  border-radius: 12px; color: var(--text-dim); font-size: 0.82rem; text-align: center; }

/* ── Evidence / Analysis / Conclusion card variants ── */
.aic-evidence { border-left: 2px solid #8aa6ff; }
.aic-analysis { border-left: 2px solid #ffd166; }
.aic-conclusion { border-left: 2px solid #3ecf8e; }

@media (max-width: 640px) {
  .ai-hist-drawer.open { width: 180px; }
  .ai-messages { gap: var(--sp-4); padding: var(--sp-3) var(--sp-3) var(--sp-2); }
  .aic-row { flex-direction: column; gap: 0; }
  .aic-k { min-width: 0; }
}

/* Quick action cards on the staff dashboard */
.staff-quick {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.staff-action { text-decoration: none; transition: transform 0.13s, border-color 0.13s; }
.staff-action:hover { transform: translateY(-2px); border-color: var(--border2); }
.staff-action-title { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 8px; }

/* Forms */
.staff-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.staff-field { display: flex; flex-direction: column; gap: 7px; min-width: 150px; }
.staff-field-grow { flex: 1; min-width: 240px; }
.staff-field label {
  font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim);
}
.staff-field input, .staff-field select {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 11px 13px; font-family: inherit; font-size: 0.88rem;
  outline: none; transition: border-color 0.13s;
}
.staff-field input:focus, .staff-field select:focus { border-color: var(--accent-blue); }

/* Generated codes box */
.staff-codes {
  width: 100%; resize: vertical; background: var(--bg); border: 1px solid var(--border);
  border-radius: 9px; padding: 13px; color: var(--white);
  font-family: 'Consolas', monospace; font-size: 0.92rem; letter-spacing: 1px; line-height: 1.7;
}

/* Tables */
.staff-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.staff-table th {
  text-align: left; padding: 9px 12px; color: var(--text-dim);
  font-size: 0.68rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.staff-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text); }
.staff-table tbody tr:last-child td { border-bottom: none; }
.staff-table tbody tr:hover { background: var(--glass); }
.staff-table .mono, td.mono { font-family: 'Consolas', monospace; color: var(--text-mid); }

.staff-del {
  background: none; border: 1px solid rgba(255,107,107,0.3); color: #ff6b6b;
  border-radius: 6px; padding: 5px 11px; font-family: inherit; font-size: 0.76rem; cursor: pointer;
  transition: all 0.13s;
}
.staff-del:hover { background: rgba(255,107,107,0.1); }

/* Plan pills */
.pill {
  display: inline-block; padding: 3px 9px; border-radius: 5px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.pill-weekly   { background: rgba(255,255,255,0.06); color: var(--text-mid); border: 1px solid var(--border2); }
.pill-monthly  { background: rgba(255,255,255,0.08); color: var(--text);  border: 1px solid rgba(255,255,255,0.15); }
.pill-lifetime { background: rgba(255,255,255,0.1);  color: var(--white); border: 1px solid rgba(255,255,255,0.25); }
.pill-none     { background: rgba(255,50,50,0.07);   color: #ff6666;      border: 1px solid rgba(255,50,50,0.2); }
.pill-staff    { background: rgba(62,207,142,0.1);   color: #3ecf8e;      border: 1px solid rgba(62,207,142,0.3); }
.pill-custom   { background: rgba(120,160,255,0.1);  color: #8aa6ff;      border: 1px solid rgba(120,160,255,0.3); }

/* Users table — right-click context menu */
.admin-table-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rc-hint { font-size: 0.72rem; color: var(--text-dim); }
.u-row { cursor: context-menu; }
.u-banned td { opacity: 0.6; }

.rc-menu {
  position: fixed; z-index: 200; min-width: 210px; padding: 6px;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 11px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
}
.rc-head {
  font-size: 0.7rem; letter-spacing: 0.5px; color: var(--text-dim);
  padding: 6px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rc-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text); font-family: inherit; font-size: 0.82rem;
  padding: 8px 10px; border-radius: 7px; cursor: pointer; transition: background 0.1s;
}
.rc-item:hover { background: var(--glass); }
.rc-good:hover   { background: rgba(62,207,142,0.1);  color: #3ecf8e; }
.rc-danger       { color: #ff6b6b; }
.rc-danger:hover { background: rgba(255,107,107,0.1); }
.rc-disabled { color: var(--text-dim); cursor: default; }
.rc-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* Action modal */
.rc-modal-overlay {
  position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(2px); padding: 24px;
}
.rc-modal { width: min(440px, 100%); display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.rc-modal-title { font-size: 1rem; font-weight: 600; color: var(--white); }
.rc-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.rc-row { display: flex; gap: 14px; }
.rc-textarea, .rc-modal input, .rc-modal select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 10px 12px; font-family: inherit; font-size: 0.88rem; outline: none;
  resize: vertical;
}
.rc-modal input:focus, .rc-modal select:focus, .rc-textarea:focus { border-color: var(--accent-blue); }

/* Dashboard charts (server-rendered bars, CSP-safe) */
.dash-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.dash-lists  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .dash-charts, .dash-lists { grid-template-columns: 1fr; } }

.chart-bars {
  display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px;
}
.chart-bars-24 { gap: 3px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; }
.chart-bar {
  width: 100%; min-height: 2px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--white), rgba(255,255,255,0.25));
  transition: height 0.4s ease;
}
.chart-bar-alt { background: linear-gradient(180deg, #8aa6ff, rgba(138,166,255,0.25)); }
.chart-x { font-size: 0.6rem; color: var(--text-dim); }

.log-detail { color: var(--text-mid); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Admin 2FA pages ── */
.tfa-card { max-width: 380px; }
.tfa-steps { margin: 0 0 20px; padding-left: 18px; color: var(--text-mid); font-size: 0.82rem; line-height: 1.7; }
.tfa-steps strong { color: var(--text); }
.tfa-qr {
  background: #fff; border-radius: 12px; padding: 14px; margin: 0 auto 18px;
  width: max-content; display: block;
}
.tfa-qr svg { display: block; width: 188px; height: 188px; }
.tfa-secret-label { font-size: 0.66rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); text-align: center; margin-bottom: 6px; }
.tfa-secret {
  text-align: center; font-family: 'Consolas', monospace; font-size: 0.95rem;
  letter-spacing: 2px; color: var(--white); background: var(--bg3);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 22px;
  word-break: break-all;
}
.tfa-code {
  width: 100%; text-align: center; font-family: 'Consolas', monospace;
  font-size: 1.5rem; letter-spacing: 8px; background: var(--bg3);
  border: 1px solid var(--border2); color: var(--white);
  border-radius: 10px; padding: 12px; outline: none;
}
.tfa-code:focus { border-color: var(--accent-blue); }
.tfa-code::placeholder { color: var(--text-dim); letter-spacing: 8px; }
.tfa-setup-card { max-width: 420px; }
a.redeem-btn { display: inline-block; }
