:root {
  --bg-0: #0b1020;
  --bg-1: #111a2b;
  --bg-2: #17233a;
  --surface: #1b2942;
  --surface-2: #1f2f4b;
  --border: rgba(120, 154, 208, 0.18);
  --accent: #27c5b8;
  --accent-strong: #1aa99e;
  --accent-2: #f6b24a;
  --success: #24d08f;
  --danger: #f35f5c;
  --warning: #f6b24a;
  --info: #52a5ff;
  --text-1: #f8fafc;
  --text-2: #c8d2e6;
  --text-3: #8ea0c2;
  --shadow-sm: 0 6px 18px rgba(7, 12, 24, 0.25);
  --shadow-md: 0 15px 35px rgba(6, 12, 22, 0.35);
  --shadow-lg: 0 25px 60px rgba(5, 10, 20, 0.45);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: 200ms ease;
  --font-body: "Manrope", sans-serif;
  --font-display: "Space Grotesk", "Manrope", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(39, 197, 184, 0.14), transparent 45%),
    radial-gradient(circle at 10% 20%, rgba(82, 165, 255, 0.12), transparent 40%),
    linear-gradient(135deg, #0b1020 0%, #0f1829 45%, #0b1b2f 100%);
  color: var(--text-1);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='120' height='120' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 120 0 L 0 0 0 120' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='120' height='120' fill='url(%23grid)'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
}

#root {
  position: relative;
  z-index: 1;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px clamp(16px, 2vw, 32px) 48px;
  animation: riseIn 0.6s ease;
  width: 100%;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(17, 26, 43, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 16px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(39, 197, 184, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #0cb2a8 100%);
  color: #06121a;
  box-shadow: 0 10px 20px rgba(39, 197, 184, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(39, 197, 184, 0.35);
}

.btn-secondary {
  background: rgba(31, 47, 75, 0.9);
  color: var(--text-1);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  border-color: var(--border);
  color: var(--text-1);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.success {
  background: rgba(36, 208, 143, 0.15);
  color: var(--success);
  border: 1px solid rgba(36, 208, 143, 0.3);
}

.badge.danger {
  background: rgba(243, 95, 92, 0.18);
  color: var(--danger);
  border: 1px solid rgba(243, 95, 92, 0.3);
}

.badge.warning {
  background: rgba(246, 178, 74, 0.15);
  color: var(--warning);
  border: 1px solid rgba(246, 178, 74, 0.3);
}

.surface {
  background: rgba(23, 35, 58, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.price-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 24px;
  align-items: center;
}

.price-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-title h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.price-value {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price-change {
  font-size: 1.1rem;
  font-weight: 600;
}

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

.stat-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(31, 47, 75, 0.6);
  border: 1px solid rgba(120, 154, 208, 0.15);
}

.stat-label {
  color: var(--text-3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.stat-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.main-grid > * {
  min-width: 0;
}

.panel {
  padding: 20px;
}

.panel-disabled {
  opacity: 0.55;
  filter: grayscale(0.1);
}

.panel-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(246, 178, 74, 0.12);
  border: 1px solid rgba(246, 178, 74, 0.35);
  color: var(--warning);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.panel h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.signal-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(120, 154, 208, 0.18);
  background: rgba(20, 29, 47, 0.75);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.signal-card.buy {
  border-left: 3px solid var(--success);
}

.signal-card.sell {
  border-left: 3px solid var(--danger);
}

.signal-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(120, 154, 208, 0.15);
  background: rgba(25, 36, 56, 0.9);
  overflow: hidden;
}

.accordion-item.disabled {
  opacity: 0.55;
}

.accordion-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-2);
}

.accordion-item.disabled .accordion-header {
  cursor: not-allowed;
}

.accordion-content {
  padding: 12px 14px;
  border-top: 1px solid rgba(120, 154, 208, 0.12);
  max-height: 320px;
  overflow-y: auto;
}

.indicator-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(120, 154, 208, 0.08);
  font-size: 0.85rem;
}

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

.indicator-signal {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.indicator-signal.buy {
  background: rgba(36, 208, 143, 0.15);
  color: var(--success);
}

.indicator-signal.sell {
  background: rgba(243, 95, 92, 0.15);
  color: var(--danger);
}

.indicator-signal.neutral {
  background: rgba(246, 178, 74, 0.18);
  color: var(--warning);
}

.chart-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.chart-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dropdown {
  position: relative;
}

.dropdown-button {
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(31, 47, 75, 0.8);
  color: var(--text-1);
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #111a2b;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px;
  min-width: 220px;
  z-index: 30;
  box-shadow: var(--shadow-md);
}

.dropdown-section {
  padding: 6px 0;
}

.dropdown-section + .dropdown-section {
  border-top: 1px solid rgba(120, 154, 208, 0.12);
}

.dropdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.dropdown-item {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-2);
}

.dropdown-item.active,
.dropdown-item:hover {
  background: rgba(39, 197, 184, 0.15);
  color: var(--text-1);
}

.chart-canvas {
  position: relative;
  height: 520px;
  border-radius: var(--radius-sm);
  background: #0f182b;
  overflow: hidden;
}

.chart-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 15, 25, 0.72);
  color: var(--text-2);
  font-weight: 600;
  text-align: center;
}

.market-banner {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(246, 178, 74, 0.12);
  border: 1px solid rgba(246, 178, 74, 0.35);
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer {
  margin-top: 32px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(16, 24, 40, 0.7);
  border: 1px solid var(--border);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-2);
}

.news-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 154, 208, 0.18);
  background: rgba(17, 26, 43, 0.85);
  text-align: left;
  cursor: pointer;
  width: 100%;
  color: inherit;
  font: inherit;
  outline: none;
  transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.news-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.news-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.85rem;
}

.news-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(39, 197, 184, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
}

.news-chip-up {
  color: var(--success);
}

.news-chip-down {
  color: var(--danger);
}

.news-thumb {
    width: 120px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(10, 18, 32, 0.8);
    border: 1px solid rgba(120, 154, 208, 0.2);
  }

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

.news-thumb--missing {
    display: none;
  }

.news-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.9rem;
}

.news-hero {
  margin-top: 24px;
  padding: 28px;
  display: grid;
  gap: 12px;
  background: radial-gradient(circle at top right, rgba(39, 197, 184, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(22, 33, 54, 0.95), rgba(18, 27, 44, 0.95));
}

.news-detail {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.news-detail-image {
  width: 100%;
  max-height: 360px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 154, 208, 0.2);
}

.news-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-detail-body h1 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  margin: 10px 0;
}

.news-detail-meta {
  display: flex;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.85rem;
}

.news-detail-source {
  color: var(--accent);
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(246, 178, 74, 0.15);
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(36, 208, 143, 0.2);
}

.form-card {
  background: rgba(19, 30, 50, 0.9);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(120, 154, 208, 0.2);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-label {
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
}

.input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(120, 154, 208, 0.25);
  background: rgba(15, 24, 42, 0.8);
  color: var(--text-1);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(39, 197, 184, 0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(243, 95, 92, 0.15);
  border: 1px solid rgba(243, 95, 92, 0.35);
  color: #ffcbc9;
  margin-bottom: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.7);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: #111a2b;
  border-radius: 20px;
  border: 1px solid rgba(120, 154, 208, 0.25);
  max-width: 720px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(120, 154, 208, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid rgba(120, 154, 208, 0.12);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(17, 26, 43, 0.95);
  border: 1px solid rgba(120, 154, 208, 0.2);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 120;
}

.guide-shell {
  padding-bottom: 64px;
}

.guide-hero {
  margin-top: 24px;
  padding: 32px;
  display: grid;
  gap: 16px;
  background: radial-gradient(circle at top right, rgba(39, 197, 184, 0.18), transparent 55%),
    linear-gradient(135deg, rgba(22, 33, 54, 0.95), rgba(18, 27, 44, 0.95));
}

.guide-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
}

.guide-hero p {
  color: var(--text-2);
  max-width: 720px;
}

.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(82, 165, 255, 0.15);
  color: var(--info);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.guide-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.guide-sidebar {
  position: sticky;
  top: 110px;
  height: fit-content;
}

.guide-sidebar-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.guide-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 6px;
}

.guide-sidebar-link {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-2);
  background: rgba(31, 47, 75, 0.55);
  border: 1px solid rgba(120, 154, 208, 0.18);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.guide-sidebar-link:hover {
  background: rgba(39, 197, 184, 0.16);
  color: var(--text-1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.guide-body {
  min-width: 0;
}

.guide-body .indicator-section {
  background: rgba(17, 26, 43, 0.85);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(120, 154, 208, 0.18);
  box-shadow: var(--shadow-sm);
}

.guide-body .indicator-title {
  color: var(--info);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.guide-body .indicator-subtitle {
  color: var(--text-3);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.guide-body .indicator-description {
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.guide-body .signal-box,
.guide-body .source-box {
  background: rgba(31, 47, 75, 0.75);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.guide-body .source-box {
  border-left: 3px solid var(--info);
}

.guide-body .signal-title {
  color: var(--warning);
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-body .formula {
  background: rgba(10, 18, 32, 0.9);
  border-left: 3px solid var(--info);
  padding: 12px;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  color: var(--text-3);
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  margin: 12px 0;
}

.guide-body .category-header {
  color: var(--accent);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(120, 154, 208, 0.2);
}

.guide-body ul.signal-list {
  color: var(--text-2);
  line-height: 1.8;
  padding-inline-start: 20px;
  padding-left: 0;
  padding-right: 0;
}

.guide-body .alert {
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(82, 165, 255, 0.25);
  background: rgba(82, 165, 255, 0.12);
  color: var(--text-2);
}

.guide-body .alert-info,
.guide-body .alert-primary {
  border-color: rgba(82, 165, 255, 0.35);
  background: rgba(82, 165, 255, 0.12);
}

.guide-body .indicator-section.bg-warning {
  color: #1a1204;
  border: none;
}

.guide-body .indicator-section.bg-warning h3,
.guide-body .indicator-section.bg-warning p,
.guide-body .indicator-section.bg-warning ul {
  color: #1a1204;
}

.guide-body .back-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #11a8a0 100%);
  color: #06121a;
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.guide-body .back-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.guide-body .text-dark {
  color: #1a1204 !important;
}

.guide-body .text-light {
  color: var(--text-1) !important;
}

.guide-body .text-white {
  color: #ffffff !important;
}

.guide-body .text-muted {
  color: var(--text-3) !important;
}

.guide-body .text-success {
  color: var(--success) !important;
}

.guide-body .text-danger {
  color: var(--danger) !important;
}

.guide-body .text-warning {
  color: var(--warning) !important;
}

.guide-body .text-primary {
  color: var(--info) !important;
}

.guide-body .text-info {
  color: var(--info) !important;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.col-12 {
  flex: 0 0 100%;
  padding: 0 12px;
}

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.px-5 {
  padding-inline: 3rem !important;
}

.py-3 {
  padding-block: 1rem !important;
}

.btn-lg {
  font-size: 1.1rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.me-1 {
  margin-inline-end: 0.25rem !important;
}

.me-2 {
  margin-inline-end: 0.5rem !important;
}

.ms-1 {
  margin-inline-start: 0.25rem !important;
}

.ms-2 {
  margin-inline-start: 0.5rem !important;
}


.toast.success {
  border-color: rgba(36, 208, 143, 0.4);
}

.toast.error {
  border-color: rgba(243, 95, 92, 0.4);
}

.admin-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
}

.sidebar {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(17, 26, 43, 0.9);
  border: 1px solid var(--border);
  height: fit-content;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.sidebar-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-link.active,
.sidebar-link:hover {
  background: rgba(39, 197, 184, 0.15);
  color: var(--text-1);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid rgba(120, 154, 208, 0.1);
}

.table th {
  color: var(--text-3);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.table tbody tr:hover {
  background: rgba(31, 47, 75, 0.4);
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tag.admin {
  background: rgba(246, 178, 74, 0.2);
  color: var(--warning);
}

.tag.user {
  background: rgba(82, 165, 255, 0.15);
  color: var(--info);
}

.tag.active {
  background: rgba(36, 208, 143, 0.15);
  color: var(--success);
}

.tag.inactive {
  background: rgba(243, 95, 92, 0.2);
  color: var(--danger);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(39, 197, 184, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .main-grid {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
  }

  .guide-sidebar-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
  }

  .guide-sidebar-link {
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    position: static;
  }

  .brand {
    width: 100%;
    justify-content: space-between;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions .btn,
  .nav-actions select {
    flex: 1 1 auto;
    width: 100%;
    justify-content: center;
  }

  .chart-canvas {
    height: 380px;
  }

  .dropdown-menu {
    left: 0;
    right: 0;
  }

  .guide-hero {
    padding: 24px;
    text-align: center;
  }

  .guide-body .category-header {
    font-size: 1.5rem;
  }

  .news-card {
    flex-direction: column;
    align-items: stretch;
  }

  .news-thumb {
    width: 100%;
    height: 160px;
  }
}

@media (max-width: 600px) {
  .app-shell {
    padding: 16px 12px 32px;
  }

  .price-hero {
    padding: 18px;
  }

  .chart-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .dropdown-button {
    width: 100%;
    justify-content: space-between;
  }

  .btn {
    padding: 10px 12px;
  }

  .form-card {
    padding: 24px;
  }

  .auth-shell {
    padding: 20px;
  }

  .table {
    min-width: 720px;
  }
}

@media (max-width: 900px) {
  .guide-layout {
    display: flex;
    flex-direction: column;
  }

  .guide-sidebar {
    position: static;
    margin-bottom: 12px;
  }

  .guide-sidebar-list {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    overflow: visible;
    padding-bottom: 0;
  }

  .guide-sidebar-link {
    white-space: normal;
    text-align: center;
    flex: 1 1 140px;
  }

  .guide-body .indicator-section {
    padding: 16px;
  }
}

body.rtl {
  direction: rtl;
  text-align: right;
}

@media (min-width: 769px) {
  body.rtl .chart-header,
  body.rtl .signal-card,
  body.rtl .connection-status {
    flex-direction: row;
  }

  body.rtl .dropdown-menu {
    right: 0;
    left: auto;
  }
}

@media (max-width: 768px) {
  body.rtl .dropdown-menu {
    left: 0;
    right: 0;
  }
}

body.rtl .signal-card.buy {
  border-left: none;
  border-right: 3px solid var(--success);
}

body.rtl .signal-card.sell {
  border-left: none;
  border-right: 3px solid var(--danger);
}

@media (min-width: 1101px) {
  body.rtl .guide-layout {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  }

  body.rtl .guide-sidebar {
    order: 2;
  }
}

body.rtl .guide-sidebar-list {
  padding-right: 0;
  padding-left: 6px;
}

body.rtl .guide-body .source-box,
body.rtl .guide-body .formula {
  border-left: none;
  border-right: 3px solid var(--info);
}

body.rtl .guide-body ul.signal-list {
  padding-inline-start: 0;
  padding-inline-end: 20px;
}

body.rtl .news-card {
  text-align: right;
}

body.rtl .news-meta {
  flex-direction: row-reverse;
}
/* ===== Beautiful Custom Scrollbar ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.5) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(135deg, rgb(102, 126, 234), rgb(118, 75, 162));
  background-clip: padding-box;
}

/* ===== Unified Analysis Styles ===== */
.unified-analysis {
  max-width: 100%;
}

.agreement-header {
  animation: fadeInUp 0.4s ease;
}

.comparison-panel {
  animation: fadeInUp 0.5s ease;
}

.analysis-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analysis-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.advisor-panel {
  animation: fadeInUp 0.6s ease;
}

.advisor-panel button {
  transition: all 0.2s ease;
}

.advisor-panel button:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments for unified analysis */
@media (max-width: 768px) {
  .comparison-panel {
    grid-template-columns: 1fr !important;
  }
  
  .agreement-header {
    flex-direction: column !important;
    text-align: center;
  }
  
  .agreement-header > div:last-child {
    text-align: center !important;
    margin-top: 12px;
  }
}

/* Color variations for warnings and notes */
:root {
  --danger-bg: rgba(243, 95, 92, 0.15);
  --warning-bg: rgba(246, 178, 74, 0.15);
  --success-bg: rgba(36, 208, 143, 0.15);
  --info-bg: rgba(82, 165, 255, 0.15);
}

/* Profile selector animations */
.advisor-panel button:active {
  transform: scale(0.98);
}

/* Stat card improvements for advisor */
.unified-analysis .stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.unified-analysis .stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}