:root {
  --bg-root: #070a12;
  --bg-surface: rgba(14, 18, 29, 0.78);
  --bg-surface-solid: #0e131f;
  --bg-elevated: rgba(22, 28, 43, 0.88);
  --bg-hover: rgba(32, 41, 62, 0.85);
  --bg-glass: rgba(11, 15, 25, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.17);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-cyan: #38bdf8;
  --accent-hover: #2563eb;
  --accent-soft: rgba(56, 189, 248, 0.13);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --purple: #8b5cf6;
  --radius-sm: 9px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

html, body {
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ─── BRAND EMBLEM & FLOATING SVG LANGUAGE SELECTOR (ATLETIQ SPEC) ────────── */
.agx-brand-emblem {
  border-radius: 17px;
  background:
    radial-gradient(circle at 25% 20%, rgba(56, 189, 248, 0.28), transparent 65%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92) 0%, rgba(11, 15, 26, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow:
    0 12px 30px rgba(14, 165, 233, 0.25),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.agx-lang-container {
  position: relative;
  display: inline-block;
}

.agx-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(15, 20, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.agx-lang-md {
  padding: 7px 13px;
  font-size: 12.5px;
  min-height: 38px;
}

.agx-lang-sm {
  padding: 5px 11px;
  font-size: 12px;
  min-height: 32px;
}

.agx-lang-pill:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.05) 100%), rgba(22, 29, 45, 0.92);
  border-color: rgba(255, 255, 255, 0.24);
}

.agx-lang-pill.is-open {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(59, 130, 246, 0.08) 100%), rgba(15, 20, 32, 0.94);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.22);
}

.agx-lang-flag-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 14px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.agx-lang-flag-wrap.lg {
  width: 22px;
  height: 16px;
  border-radius: 3.5px;
}

.agx-lang-flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agx-lang-code {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11.5px;
  font-weight: 700;
}

.agx-lang-chevron {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}
.agx-lang-chevron.is-open {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.agx-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 235px;
  border-radius: 16px;
  background: rgba(13, 17, 27, 0.96);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.78), 0 0 24px rgba(56, 189, 248, 0.14);
  padding: 6px;
  z-index: 9999;
  animation: agxPopIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes agxPopIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.agx-lang-menu-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 4px;
}
.agx-lang-menu-head svg {
  color: var(--accent-cyan);
}

.agx-lang-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agx-lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
}

.agx-lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.agx-lang-option.is-selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
}

.agx-lang-option-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agx-lang-option-names {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.agx-lang-option-primary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.agx-lang-option-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

.agx-lang-check {
  color: var(--accent-cyan);
  display: inline-flex;
}

.agx-lang-short-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ─── LOGIN SCREEN (LIQUID GLASS + AMBIENT ORBS) ──────────────────────────── */
.auth-wrapper {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #060911;
  position: relative;
  overflow: hidden;
}

.auth-orb-1 {
  position: fixed;
  top: -160px;
  left: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, transparent 70%);
  animation: agxOrb1 14s ease-in-out infinite;
  pointer-events: none;
}

.auth-orb-2 {
  position: fixed;
  bottom: -160px;
  right: -110px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
  animation: agxOrb2 17s ease-in-out infinite;
  pointer-events: none;
}

.auth-orb-3 {
  position: fixed;
  top: 38%;
  left: 58%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  animation: agxOrb3 20s ease-in-out infinite;
  pointer-events: none;
}

.auth-grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.85) 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.85) 20%, transparent 80%);
  pointer-events: none;
}

@keyframes agxOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(35px, 30px) scale(1.06); }
}
@keyframes agxOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-35px, -25px) scale(1.07); }
}
@keyframes agxOrb3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-25px, 25px); }
}

.auth-lang-floating {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 80;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 38px 34px 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.012) 50%, rgba(0, 0, 0, 0.42) 100%),
    rgba(12, 16, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.78),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.32),
    0 0 44px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  position: relative;
  z-index: 2;
}

.auth-brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 26px;
}

.auth-brand-pill {
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-brand-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
  margin-top: 6px;
  line-height: 1.15;
}

.auth-brand-accent {
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 55%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.85);
  margin-top: 5px;
  max-width: 310px;
}

.segmented-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: rgba(4, 7, 14, 0.65);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}

.segmented-tab {
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.segmented-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.segmented-tab.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%), rgba(24, 32, 50, 0.9);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.segmented-tab.active.is-wa svg {
  color: #34d399;
}

.segmented-tab.active.is-tg svg {
  color: #38bdf8;
}

.phone-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
  position: relative;
}

.country-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  min-width: 112px;
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.country-trigger:hover,
.country-trigger.is-open {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.06);
}

.country-prefix-code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.country-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.country-chevron.is-open {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.flag-icon {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.country-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background: rgba(13, 17, 27, 0.96);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.78), 0 0 20px rgba(56, 189, 248, 0.12);
  z-index: 90;
  padding: 6px;
  animation: agxPopIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.country-dropdown-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 4px;
}
.country-dropdown-head svg {
  color: var(--accent-cyan);
}

.country-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: all 0.14s ease;
}

.country-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.country-option.is-selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
}

.country-option-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
}

.country-option-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.country-option-prefix {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.country-option-check {
  color: var(--accent-cyan);
  display: inline-flex;
}

/* ─── FORMS, INPUTS & BUTTONS ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(148, 163, 184, 0.78);
  margin-bottom: 7px;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-lead-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  display: inline-flex;
  pointer-events: none;
  transition: color 0.18s ease;
}

.input-icon-wrap:focus-within .input-lead-icon {
  color: var(--accent-cyan);
}

.input, .select, .textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.input.has-lead-icon {
  padding-left: 38px;
}

.input::placeholder, .textarea::placeholder {
  color: rgba(148, 163, 184, 0.36);
}

.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.04);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.select option {
  background: #0e131f;
  color: #f8fafc;
}

.otp-input {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.38em;
  padding: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

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

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #0284c7 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35), inset 0 1.5px 1px rgba(255, 255, 255, 0.32);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.48), inset 0 1.5px 1px rgba(255, 255, 255, 0.42);
}

.auth-submit-btn {
  padding: 13.5px 18px;
  font-size: 14.5px;
  margin-top: 6px;
}

.auth-submit-btn .btn-arrow-icon {
  transition: transform 0.18s ease;
}
.auth-submit-btn:hover:not(:disabled) .btn-arrow-icon {
  transform: translateX(3px);
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: agxSpin 0.75s linear infinite;
}

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

.auth-security-footer {
  margin-top: 20px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: left;
  line-height: 1.4;
}

.auth-shield-icon {
  color: #10b981;
  display: inline-flex;
  flex-shrink: 0;
}

.auth-otp-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.auth-otp-banner-icon {
  color: #38bdf8;
  margin-top: 2px;
}

.auth-dev-code {
  margin-top: 5px;
  color: #34d399;
  font-family: var(--font-mono);
  font-weight: 700;
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(22, 28, 43, 0.85);
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 11px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 9px;
}

/* ─── APP SHELL (DESKTOP GLASS SIDEBAR + MOBILE BOTTOM NAV) ───────────────── */
.app-shell {
  display: flex;
  min-height: 100dvh;
  max-width: 1420px;
  margin: 0 auto;
}

.sidebar {
  width: 256px;
  border-right: 1px solid var(--border-subtle);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100dvh;
  background: linear-gradient(180deg, rgba(12, 16, 26, 0.92) 0%, rgba(7, 10, 18, 0.96) 100%);
  backdrop-filter: blur(24px);
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.sidebar-brand-title {
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.sidebar-brand-sub {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(59, 130, 246, 0.06) 100%);
  border-color: rgba(56, 189, 248, 0.28);
  color: #f8fafc;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item.active svg {
  color: #38bdf8;
}

.nav-item-admin {
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: rgba(139, 92, 246, 0.08);
  color: #c4b5fd;
}

.nav-item-admin.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24) 0%, rgba(59, 130, 246, 0.12) 100%);
  border-color: rgba(139, 92, 246, 0.45);
  color: #ede9fe;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-info {
  overflow: hidden;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.sidebar-user-pack {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
}

.nav-item-logout {
  color: #f87171;
}
.nav-item-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.main-area {
  flex: 1;
  min-width: 0;
  padding-bottom: 84px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-title {
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.01em;
}

.topbar-title-icon {
  color: var(--accent-cyan);
  display: inline-flex;
}

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

.topbar-oracle-btn {
  height: 32px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  background: rgba(56, 189, 248, 0.1) !important;
  border: 1px solid rgba(56, 189, 248, 0.26) !important;
  color: #38bdf8 !important;
  font-weight: 600 !important;
}

.bell-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.bell-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.09);
}

.bell-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* ─── HORIZONTAL PILLS & X-STYLE FEED ─────────────────────────────────────── */
.pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  scrollbar-width: none;
  background: rgba(9, 12, 20, 0.5);
}

.pills-bar::-webkit-scrollbar {
  display: none;
}

.pill {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.pill:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.pill.active {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
}

.feed-container {
  max-width: 740px;
  margin: 0 auto;
}

.feed-search-toolbar {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
}

.feed-empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.feed-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.news-card {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}

.news-card:hover {
  background: rgba(255, 255, 255, 0.018);
}

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.news-source-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.channel-handle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.news-time {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.news-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

.news-media-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.news-media-item img, .news-media-item video {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  display: block;
  background: #000;
}

.news-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-top: 2px;
  margin-left: -4px;
}

.news-micro-btn,
.ask-oracle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all 0.14s ease;
}

.news-micro-btn:hover,
.ask-oracle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.news-micro-btn--oracle:hover,
.ask-oracle-btn:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}

.news-micro-btn--saved {
  color: #fbbf24;
}

/* ─── LANGUAGE CHOICE GRID & SUBSCRIPTION BOXES ──────────────────────────── */
.lang-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}

.lang-choice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
}

.lang-choice-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-strong);
}

.lang-choice-card.active {
  background: rgba(56, 189, 248, 0.11);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.12);
}

.lang-choice-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.lang-choice-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.lang-choice-code {
  font-size: 11px;
  color: var(--text-muted);
}

.lang-choice-check {
  color: var(--accent-cyan);
  display: inline-flex;
}

.sub-category-box {
  padding: 15px;
  background: rgba(7, 10, 18, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 10px;
}

.sub-cat-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

/* ─── CONTEXTUAL CHAT DRAWER & TYPING EFFECT ──────────────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(8px);
  z-index: 80;
  display: flex;
  justify-content: flex-end;
}

.chat-drawer {
  width: 100%;
  max-width: 520px;
  height: 100dvh;
  background: #0c101b;
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.chat-context-banner {
  margin: 12px 16px 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  max-height: 86px;
  overflow: hidden;
}

.chat-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 86%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 13.8px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  align-self: flex-start;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  animation: pulseDot 1.3s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.18s; }
.typing-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes pulseDot {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.quick-prompts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px;
  scrollbar-width: none;
}

.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 10, 18, 0.9);
  display: flex;
  gap: 8px;
}

/* ─── CARDS, GRIDS, TOGGLES & TABLES (ADMIN & USER PORTAL) ────────────────── */
.page-section {
  padding: 20px;
  max-width: 1160px;
  margin: 0 auto;
}

.stats-grid,
.agx-stat-grid,
.agx-bento-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(14, 18, 29, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--glass-highlight);
}

.stat-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 23px;
  font-weight: 800;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.panel-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045) 0%, rgba(14, 18, 29, 0.82) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: var(--glass-highlight);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title svg {
  color: var(--accent-cyan);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 12px;
}

.toggle-row:last-child {
  border-bottom: none;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  background: rgba(4, 7, 14, 0.8);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.18s;
  flex-shrink: 0;
}

.switch.on {
  background: var(--emerald);
  border-color: var(--emerald);
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.switch.on::after {
  transform: translateX(18px);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th, .data-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green { background: var(--emerald-soft); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-amber { background: var(--amber-soft); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
.badge-red   { background: var(--danger-soft); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-blue  { background: var(--accent-soft); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }

/* ─── MOBILE BOTTOM NAV ───────────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 14, 24, 0.88);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid var(--border-subtle);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 50;
  justify-content: space-around;
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s ease;
}

.bottom-nav-btn.active {
  color: #38bdf8;
}

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

.toast {
  background: rgba(16, 22, 35, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .sidebar {
    display: none;
  }
  .bottom-nav {
    display: flex;
  }
  .toast-container {
    bottom: 76px;
    left: 16px;
    right: 16px;
  }
  .auth-card {
    padding: 30px 22px 26px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODULAR UI PRIMITIVES (AgentXUI — n8n Flow, Storage, Toggles & Steroid Chat)
   ═══════════════════════════════════════════════════════════════════════════ */

.agx-svg-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.agx-stat-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(14, 18, 29, 0.85) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px 18px;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--glass-highlight);
}

.agx-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.agx-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.agx-stat-icon {
  color: #38bdf8;
}

.agx-stat-value-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.agx-stat-value {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.agx-stat-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.agx-stat-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ─── REUSABLE SEGMENTED TABS & FILTERBAR (Tier-2 Z-Index = 20) ─────────── */
.agx-segmented-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-root);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.agx-seg-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  min-height: 36px;
}

.agx-seg-tab.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.agx-seg-badge {
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.agx-filterbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 14px;
}

.agx-search-box {
  position: relative;
  flex: 1;
  min-width: 210px;
}

.agx-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.agx-search-input {
  width: 100%;
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  color: var(--text-primary);
  font-size: 13px;
}

.agx-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agx-pill-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-root);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.agx-pill-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #60a5fa;
}

/* ─── REUSABLE CUSTOM TOGGLE SWITCH CARDS ───────────────────────────────── */
.agx-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 10px;
}

.agx-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.18s;
}

.agx-toggle-card.is-on {
  border-color: rgba(59, 130, 246, 0.28);
}

.agx-toggle-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

.agx-toggle-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.agx-toggle-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.agx-switch-btn {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--bg-root);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.18s ease;
}

.agx-switch-btn.is-on {
  background: #10b981;
  border-color: #10b981;
}

.agx-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.agx-switch-btn.is-on .agx-switch-thumb {
  transform: translateX(20px);
}

.agx-badge-mini {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.agx-badge-mini.accent {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
}

/* ─── LIVE n8n-STYLE PIPELINE FLOW VISUALIZER ───────────────────────────── */
.agx-n8n-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
}

.agx-n8n-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(9, 10, 15, 0.6);
}

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

.agx-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.agx-btn-pill.is-online {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.agx-btn-pill.is-offline {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.agx-btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.agx-n8n-canvas-scroll {
  width: 100%;
  overflow-x: auto;
  background-color: #07080c;
  background-image: radial-gradient(rgba(255, 255, 255, 0.11) 1px, transparent 1px);
  background-size: 20px 20px;
}

.agx-n8n-canvas {
  position: relative;
  min-width: 980px;
  height: 360px;
}

.agx-n8n-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.agx-flow-edge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}

.agx-flow-edge-line {
  fill: none;
  stroke: rgba(96, 165, 250, 0.38);
  stroke-width: 2;
  stroke-dasharray: 6 5;
  animation: agxDashFlow 14s linear infinite;
}

.agx-flow-edge-line.active {
  stroke: #38bdf8;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
}

.agx-flow-packet {
  fill: #38bdf8;
  filter: drop-shadow(0 0 8px #38bdf8);
}

@keyframes agxDashFlow {
  to { stroke-dashoffset: -120; }
}

.agx-n8n-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 146px;
  background: #12141d;
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  padding: 9px 10px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  user-select: none;
}

.agx-n8n-node:hover {
  transform: translate(-50%, -53%);
  border-color: rgba(96, 165, 250, 0.55);
}

.agx-n8n-node.selected {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 12px 28px rgba(0, 0, 0, 0.65);
}

.agx-n8n-node.status-running {
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.agx-n8n-node.status-disabled {
  opacity: 0.48;
  border-style: dashed;
}

.agx-n8n-port {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  border: 2px solid #090a0f;
  transform: translateY(-50%);
}
.agx-n8n-port.port-in { left: -5px; }
.agx-n8n-port.port-out { right: -5px; }

.agx-n8n-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.agx-n8n-node-icon { color: #60a5fa; }
.agx-n8n-node.type-ai .agx-n8n-node-icon { color: #a855f7; }
.agx-n8n-node.type-filter .agx-n8n-node-icon { color: #f59e0b; }
.agx-n8n-node.type-sink .agx-n8n-node-icon { color: #10b981; }

.agx-n8n-node-type {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.agx-n8n-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64748b;
}
.status-passed .agx-n8n-status-dot { background: #10b981; box-shadow: 0 0 6px #10b981; }
.status-running .agx-n8n-status-dot { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.status-dropped .agx-n8n-status-dot { background: #f59e0b; }
.status-error .agx-n8n-status-dot { background: #ef4444; }

.agx-n8n-node-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agx-n8n-node-sub {
  font-size: 10.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.agx-n8n-node-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.agx-n8n-inspector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(14, 16, 23, 0.92);
}

.agx-n8n-insp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.agx-n8n-insp-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.agx-n8n-insp-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.agx-mini-metric {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}
.agx-mini-metric span { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.agx-mini-metric strong { font-size: 13.5px; font-family: var(--font-mono); }

/* ─── STORAGE & SQLITE DATABASE BREAKDOWN ───────────────────────────────── */
.agx-storage-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.agx-card-glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
}

.agx-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.agx-section-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin: 0 0 3px 0;
}

.agx-muted-sm {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.agx-storage-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-root);
  margin: 12px 0 16px;
  gap: 2px;
}

.agx-storage-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.agx-storage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
}

.agx-storage-cat-card {
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 11px 12px;
}

.agx-storage-cat-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-bottom: 6px;
}

.agx-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.agx-storage-cat-vals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}

.agx-big-num {
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.agx-ext-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.agx-ext-pill {
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.agx-db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.agx-db-card {
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
}

.agx-db-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12.5px;
}

.agx-db-path {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  word-break: break-all;
}

.agx-db-tables {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agx-db-table-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-variant-numeric: tabular-nums;
}

/* ─── TERMINAL CONTAINER LOG VIEWER & STEROID CHAT ──────────────────────── */
.agx-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 10px;
}

.agx-terminal-box,
.agx-log-terminal {
  background: #05070c;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  max-height: 540px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
}

.agx-term-line,
.agx-log-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.agx-term-line:hover,
.agx-log-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.agx-term-ts,
.agx-log-ts { color: #64748b; flex-shrink: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.agx-term-pipe,
.agx-log-pipe {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  flex-shrink: 0;
}
.agx-log-pipe.pipe-P1_ARGOS { background: rgba(16, 185, 129, 0.14); color: #34d399; }
.agx-log-pipe.pipe-P2_SENTINELA { background: rgba(168, 85, 247, 0.16); color: #c084fc; }
.agx-term-lvl,
.agx-log-lvl {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
  min-width: 42px;
}
.agx-term-lvl.error,
.agx-log-row.level-ERROR .agx-log-lvl { color: #f87171; }
.agx-term-lvl.warn,
.agx-log-row.level-WARN .agx-log-lvl { color: #fbbf24; }
.agx-term-lvl.info,
.agx-log-row.level-INFO .agx-log-lvl { color: #34d399; }
.agx-term-msg,
.agx-log-msg { color: #e2e8f0; word-break: break-word; flex: 1; }

.agx-steroid-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}

.agx-steroid-main {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045) 0%, rgba(12, 16, 27, 0.88) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  height: 640px;
  overflow: hidden;
  box-shadow: var(--glass-highlight);
}

.agx-steroid-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(6, 9, 17, 0.65);
}

.agx-steroid-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agx-steroid-bubble {
  max-width: 88%;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
}

.agx-steroid-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(79, 70, 229, 0.28));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #f8fafc;
}

.agx-steroid-bubble.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.agx-steroid-input-row {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 9, 17, 0.85);
  display: flex;
  gap: 8px;
}

.agx-steroid-input-row input {
  flex: 1;
  background: rgba(4, 7, 14, 0.8);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 13.5px;
}

.agx-steroid-side {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045) 0%, rgba(12, 16, 27, 0.88) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 640px;
  overflow-y: auto;
  box-shadow: var(--glass-highlight);
}

@media (max-width: 980px) {
  .agx-steroid-layout {
    grid-template-columns: 1fr;
  }
}

