@keyframes pnlPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px transparent); }
  50% { transform: scale(1.02); filter: drop-shadow(0 0 8px currentColor); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px transparent); }
}

@keyframes valuationPulseUp {
  0% { transform: scale(1); text-shadow: 0 0 0px transparent; }
  50% { transform: scale(1.05); text-shadow: 0 0 15px var(--success); }
  100% { transform: scale(1); text-shadow: 0 0 0px transparent; }
}

@keyframes valuationPulseDown {
  0% { transform: scale(1); text-shadow: 0 0 0px transparent; }
  50% { transform: scale(1.05); text-shadow: 0 0 15px var(--danger); }
  100% { transform: scale(1); text-shadow: 0 0 0px transparent; }
}

.valuation-pulse-up {
  animation: valuationPulseUp 2s infinite ease-in-out;
  color: var(--success) !important;
}

.valuation-pulse-down {
  animation: valuationPulseDown 2s infinite ease-in-out;
  color: var(--danger) !important;
}

.daily-risk-card {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.risk-stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}

.brand-pulse {
  animation: brandPulse 3s infinite ease-in-out;
}

.hidden {
  display: none !important;
}

.valuation-pulse-up {
  animation: pnlPulse 2s infinite ease-in-out;
  color: var(--success) !important;
}

.valuation-pulse-down {
  animation: pnlPulse 2s infinite ease-in-out;
  color: var(--danger) !important;
}

:root {
  --primary-bg: #0b0f1a;
  --sidebar-bg: #121826;
  --accent-blue: #0ea5e9;
  --accent-purple: #6366f1;
  --accent-teal: #14b8a6;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --glass-bg: rgba(17, 24, 39, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.w-full { width: 100% !important; }
.text-center { text-align: center !important; }
.mr-3 { margin-right: 0.75rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.gap-2 { gap: 0.5rem !important; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--primary-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.12) 0, transparent 40%),
    radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.12) 0, transparent 40%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, .logo-text, .stat-value {
  font-family: "Outfit", sans-serif;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 270px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.5rem;
  border-right: 1px solid var(--glass-border);
  position: fixed;
  height: 100vh;
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
  padding-left: 0.5rem;
}

.logo-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 10px rgba(14, 165, 233, 0.5));
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text span {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--accent-blue);
  opacity: 0.8;
}

.nav-menu {
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateX(5px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.05) 100%);
  color: var(--accent-blue);
  border-color: rgba(14, 165, 233, 0.2);
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.btn {
  width: auto;
  min-width: 120px;
  padding: 0.85rem 1.5rem;
  border-radius: 0.85rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  font-size: 0.95rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-dim);
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.bot-controls {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.safety-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.safety-divider span {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.safety-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--glass-border), transparent);
}

.btn-risk {
  background: rgba(239, 68, 68, 0.05);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.btn-risk:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: white;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.sidebar-footer {
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid var(--glass-border);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dim);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  transition: all 0.5s ease;
}

.dot.online {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.uptime-text {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  display: flex;
  justify-content: space-between;
  border: 1px solid var(--glass-border);
}

.uptime-text span:first-child {
  font-weight: 600;
  opacity: 0.6;
}

.logout-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 1rem;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  width: 100%;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  text-align: left;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logout-link .nav-icon {
  font-size: 1.25rem;
  opacity: 0.8;
}

.top-bar-spacer {
  flex: 1;
}

.mobile-logo {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Main Content */
.main-content {
  margin-left: 270px;
  flex: 1;
  padding: 2.5rem 3rem;
  max-width: 1600px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  width: 100%;
  position: sticky;
  top: 0;
  background: rgba(11, 15, 26, 0.8);
  backdrop-filter: blur(20px);
  padding: 1.25rem 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
}

.search-container input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 0.75rem 1.5rem;
  border-radius: 1.25rem;
  color: white;
  width: 350px;
  transition: all 0.3s ease;
}

.search-container input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(255, 255, 255, 0.06);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pair-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  padding: 0.5rem 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.pair-info:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.pair-label {
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.pair-value {
  font-weight: 700;
  color: var(--text-main);
}

/* Grid Layouts */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: var(--card-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
}

.stat-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-change {
  font-size: 0.875rem;
  font-weight: 500;
}

.positive {
  color: var(--success);
}
.negative {
  color: var(--danger);
}

.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-card {
  display: flex;
  flex-direction: column;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.header-actions-flex {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.chart-wrapper {
  height: 520px;
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.center-column {
    display: flex;
    flex-direction: column;
}

.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }

.header-actions-flex-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Position Info / Badges */
.badge {
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Alpha-themed Tactical Badges */
.badge-active {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-buy {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-sell {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-waiting {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-mini {
  padding: 0.15rem 0.4rem;
  font-size: 0.6rem;
}

@keyframes pulseSmall {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.pulse-small {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  animation: pulseSmall 1.5s infinite ease-in-out;
}

.neg-pulse {
  background: var(--danger);
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.pulse-glow {
  animation: pulseGlow 1.5s infinite;
}

.text-accent { color: var(--accent-blue); }

/* Technical Details Row */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row label {
  color: var(--text-dim);
  font-weight: 500;
}

.info-row value {
  font-weight: 700;
  color: var(--text-main);
  font-family: "JetBrains Mono", monospace;
}

/* Risk Levels */
.risk-levels {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.risk-item {
  background: rgba(15, 23, 42, 0.4);
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.risk-item label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.risk-item span {
  font-size: 1rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

.tp span { color: var(--success); }
.sl span { color: var(--danger); }

/* Indicators Grid */
.indicators-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Manual Trading Refinements */
.side-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: 0.85rem;
  border: 1px solid var(--glass-border);
}

.side-btn {
  padding: 0.4rem 1.25rem;
  border-radius: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
  color: var(--text-dim);
}

.side-btn.active#side-long {
  background: var(--success);
  color: white;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.side-btn.active#side-short {
  background: var(--danger);
  color: white;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.small-select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 0.4rem 0.75rem;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.tabs-minimal {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem;
  border-radius: 0.75rem;
}

.tab-mini {
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s ease;
}

.tab-mini.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.amount-input-wrapper input {
  width: 100%;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--glass-border);
  padding: 0.85rem 1rem;
  padding-right: 3.5rem;
  border-radius: 1rem;
  color: white;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.1rem;
}

.currency-tag {
  position: absolute;
  right: 1.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-blue);
  opacity: 0.8;
}

.percent-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pct-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  padding: 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pct-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.info-row-mini {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.info-row-mini span:first-child { color: var(--text-dim); font-weight: 500; }
.info-row-mini span:last-child { color: white; font-weight: 700; }

/* Technical Indicators Enhancement */
.indicator-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.indicator-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  padding: 0.85rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.indicator-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.indicator-item label {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.indicator-item span {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.indicator-item span.signal {
  font-family: "Outfit", sans-serif;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.indicator-item span.pos { color: var(--success); }
.indicator-item span.neg { color: var(--danger); }
.indicator-item span.warn { color: var(--warning); }

/* Developer Logs */
.log-card {
  border-radius: 1.5rem;
  background: #080a0f !important;
}

.log-content {
  height: 300px;
  overflow-y: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  padding: 1rem;
  scroll-behavior: smooth;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
}

.log-entry {
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  display: flex;
  gap: 0.75rem;
  transition: background 0.2s ease;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.03);
}

.log-time {
  color: #475569;
  font-size: 0.75rem;
  white-space: nowrap;
}

.log-source {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  min-width: 60px;
}

/* AI Chat - High Tech Style */
.ai-chat-section {
  max-width: 1000px;
  margin: 0 auto;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.ai-chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-radius: 2rem;
  border: 1px solid var(--glass-border);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 40%);
}

.ai-message, .user-message {
  display: flex;
  gap: 1rem;
  max-width: 85%;
  animation: slideInUp 0.3s ease-out backwards;
}

.ai-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-message .message-avatar {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
}

.user-message .message-avatar {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
}

.bubble {
  padding: 1rem 1.5rem;
  border-radius: 1.25rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
}

.ai-message .bubble {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--glass-border);
  border-top-left-radius: 0.25rem;
  color: var(--text-main);
}

.user-message .bubble {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  border-top-right-radius: 0.25rem;
  color: white;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.2);
}

.chat-input-container {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.file-upload-area {
  display: flex;
  align-items: center;
}

#chat-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  resize: none;
  min-height: 48px;
  max-height: 150px;
  transition: all 0.3s ease;
}

#chat-input:focus {
  border-color: var(--accent-blue);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

#send-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: 1.25rem;
}

.typing-indicator {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typing 1.4s infinite;
}

.file-preview {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  padding: 0.4rem 0.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent-blue);
  margin-bottom: 0.5rem;
}

/* Settings View */
.settings-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.form-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.form-header h4 {
  font-size: 1.1rem;
  color: var(--accent-blue);
  font-weight: 600;
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--glass-border);
  padding: 0.85rem 1.25rem;
  border-radius: 1rem;
  color: white;
  font-family: inherit;
  transition: all 0.3s ease;
}

.premium-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(15, 23, 42, 0.6);
}

.save-btn {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  padding: 1rem 2rem;
  border-radius: 1rem;
  border: none;
  font-weight: 700;
  cursor: pointer;
  width: auto;
  min-width: 180px;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

/* Animations */
@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }

#chat-input {
  flex: 1;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.75rem;
  border-radius: 0.75rem;
  resize: none;
  font-family: inherit;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.4;
}

#chat-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.message-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
}

.typing-indicator {
  display: flex;
  gap: 0.25rem;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Settings Layout */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Confidence Radar & Gauge */
.confidence-radar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.radar-box {
  position: relative;
  width: 90px;
  height: 90px;
}

.confidence-gauge svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.confidence-gauge .bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 8;
}

.confidence-gauge .meter {
  fill: none;
  stroke: var(--accent-blue);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.conf-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#conf-pct-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.conf-text small { font-size: 0.7rem; color: var(--text-dim); }
.conf-label { font-size: 0.5rem; color: var(--accent-blue); letter-spacing: 0.1em; margin-top: 2px; font-weight: 700; }

.radar-info { flex: 1; }
.radar-title { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.sentiment-text { font-size: 0.85rem; font-weight: 500; color: white; line-height: 1.4; }

.form-divider {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.form-group-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group-inline label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.form-group-inline input {
  width: 90px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  color: white;
  text-align: right;
  font-family: inherit;
  font-weight: 600;
}

.form-group-inline input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: rgba(15, 23, 42, 0.6);
}

.ml-2 {
  margin-left: 0.5rem;
}
.font-bold {
  font-weight: 700;
}

.market-select-mini {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.settings-form input[type="text"] {
  width: 150px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  color: white;
  font-family: inherit;
}

/* Risk & Safety Styles */
.safety-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 1px;
}
.safety-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.border-risk {
    border-left: 3px solid var(--warning) !important;
}

.btn-risk {
    border-color: var(--warning);
    color: var(--warning);
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-risk:hover {
    background: rgba(245, 158, 11, 0.1);
}

.btn-risk.active {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: white !important;
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- MOBILE RESPONSIVENESS UPDATES --- */

.mobile-menu-toggle {
  display: none;
  align-items: center;
  gap: 1rem;
}

.mobile-logo {
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .main-grid {
    grid-template-columns: 1fr;
  }
  
  .wide-card {
    grid-column: span 1;
  }
  
  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    left: -260px;
    z-index: 999;
    transition: left 0.3s ease;
  }
  
  .sidebar.active {
    left: 0;
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .search-container {
    display: none; /* Hide broad search on mobile top bar */
  }
  
  .top-bar {
    padding: 0.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .user-profile {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    white-space: nowrap;
    display: flex;
    gap: 0.5rem;
  }
  
  .pair-info {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 1.2rem;
  }

  .section-header h3 {
    font-size: 1rem;
  }
  
  .chart-wrapper {
    height: 300px;
  }
  
  .modal-content {
    padding: 1rem;
    width: 95%;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .form-group-inline input {
    width: 100%;
    text-align: left;
  }
  
  .tabs-broad {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.5rem;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .risk-levels {
    grid-template-columns: 1fr;
  }
  
  .v-amount-container {
    font-size: 1.2rem;
  }
  
  .v-value {
    font-size: 1.5rem;
  }
}

/* --- DATA TABLES --- */
.data-table-container {
  overflow-x: auto;
  border-radius: 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.data-table th {
  padding: 1.25rem 1.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
}

.data-table td {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* --- BADGES --- */
.badge-buy {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-sell {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.font-mono {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.02em;
}

/* --- PERFORMANCE DEEP DIVE --- */
.deep-dive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.deep-dive-grid .stat-card {
  border-top: 3px solid transparent;
}

.deep-dive-grid .stat-card:hover {
  border-top-color: var(--accent-blue);
}

/* --- SCANNER COMPONENTS --- */
.confidence-meter-mini {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.meter-bar {
  height: 100%;
  transition: width 0.5s ease;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.hoverable-row:hover {
  background: rgba(14, 165, 233, 0.03) !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.tabs-broad {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.4) !important;
  padding: 0.4rem;
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
  overflow-x: auto;
  white-space: nowrap;
  width: auto;
  max-width: 80%;
  scrollbar-width: thin;
}

.tabs-broad::-webkit-scrollbar {
  height: 4px;
}
.tabs-broad::-webkit-scrollbar-track {
  background: transparent;
}
.tabs-broad::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

.tab-broad-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.6rem 1.2rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.tab-broad-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-broad-btn.active {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Strategy Checklist Card */
.strategy-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checklist-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.checklist-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(4px);
}

.check-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.check-dot.active {
  background: var(--success);
  box-shadow: 0 0 10px var(--success), 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.check-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Wallet & Funding Refinement */
.total-valuation {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(99, 102, 241, 0.1));
  border-radius: 1rem;
  border: 1px solid rgba(14, 165, 233, 0.15);
}

.v-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.v-amount-container {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.v-symbol { font-size: 1.2rem; font-weight: 700; color: var(--accent-blue); }
.v-value { font-size: 2rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.v-currency { font-size: 0.85rem; font-weight: 600; color: var(--text-dim); }

.wallet-balances-modern {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
}

.w-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.w-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.1);
}

.w-icon.spot { background: rgba(14, 165, 233, 0.15); color: var(--accent-blue); border: 1px solid rgba(14, 165, 233, 0.3); }
.w-icon.futures { background: rgba(99, 102, 241, 0.15); color: var(--accent-purple); border: 1px solid rgba(99, 102, 241, 0.3); }

.w-name { font-size: 0.95rem; font-weight: 600; color: var(--text-main); }
.w-amount { font-family: 'JetBrains Mono', monospace; font-size: 1rem; font-weight: 700; color: var(--text-main); text-align: right; }

/* Status Row Widgets */
.status-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.status-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 0.85rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 12px;
}

.dot.online { background: var(--success); box-shadow: 0 0 10px var(--success); }
.dot.offline { background: var(--danger); box-shadow: 0 0 10px var(--danger); }

/* Buttons & Icons */
.btn-glass-blue {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: var(--text-main);
  padding: 0.85rem;
  border-radius: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-glass-blue:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(99, 102, 241, 0.3));
  border-color: rgba(14, 165, 233, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.2);
}

.btn-mini-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-mini-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
}

/* --- TELEMETRY BADGES --- */
.badge-mini {
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
}

.badge-mini.pos { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-mini.neg { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-mini.warn { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-mini.accent { background: rgba(14, 165, 233, 0.1); color: var(--accent-blue); border: 1px solid rgba(14, 165, 233, 0.2); }

.chart-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 1rem;
}
.chart-wrapper {
  height: 400px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  margin-top: 1rem;
}

#tv-chart-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
}
/* Toggle Switch */
.toggle-container {
  position: relative;
  width: 48px;
  height: 24px;
}
.toggle-container input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-label {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: .4s;
  border-radius: 24px;
}
.toggle-label:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
input:checked + .toggle-label {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}
input:focus + .toggle-label {
  box-shadow: 0 0 1px var(--accent-blue);
}
input:checked + .toggle-label:before {
  transform: translateX(24px);
}
input:checked + .toggle-label {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); /* Red for danger/live */
  border-color: #ef4444;
}
input:not(:checked) + .toggle-label {
  background: rgba(16, 185, 129, 0.2); /* Green for safe/sim */
  border-color: var(--success);
}
input:not(:checked) + .toggle-label:before {
  background: var(--success);
}
