:root {
  --bg: #0f1117;
  --bg-secondary: #151923;
  --panel: #171c27;
  --panel-soft: #1c2230;
  --border: #283042;
  --text: #edf2ff;
  --muted: #95a1b7;
  --blue: #355c9a;
  --blue-soft: #22314f;
  --green: #44b8a6;
  --green-soft: #183a39;
  --amber: #e2b36a;
  --amber-soft: #3f3320;
  --yellow: #d8c16f;
  --yellow-soft: #3c3822;
  --danger: #d97b6d;
  --danger-soft: #442a28;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}


section,
article {
  scroll-margin-top: 24px;
}



html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #0b0e14 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 20px;
  background: rgba(14, 17, 25, 0.96);
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 800;
  background: linear-gradient(180deg, #4a6fb4 0%, #27406b 100%);
  box-shadow: var(--shadow);
}

.nav-item {
  text-decoration: none;
}
 

.nav-item:hover {
  background: rgba(70, 120, 255, 0.15);
  transform: translateX(4px);
  transition: 0.2s ease;
}

.brand-logo {
  width: 126px;
  height: 126px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: var(--amber)0;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-nav,
.sidebar-footer {
  display: grid;
  gap: 10px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  color: var(--text);
  background: transparent;
  transition: 0.2s ease;
}

.nav-item:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.nav-item--active {
  background: linear-gradient(180deg, #355c9a 0%, #294a7f 100%);
  border-color: rgba(133, 168, 232, 0.25);
  box-shadow: var(--shadow);
}

.nav-item--ghost {
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.main-content {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.topbar h2 {
  margin: 0;
  font-size: 28px;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.topbar-left {
  min-width: 0;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.topbar-left h2 {
  margin: 0;
  font-size: 28px;
}

.topbar-left p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}



.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6b7280;
}

.market-status.status-open .status-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}

.market-status.status-closed .status-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.35);
}

.market-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  color: var(--muted);
}


.profile-area {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #1b2130 0%, #111724 100%);
}

.hero-summary {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 28px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(32, 39, 57, 0.96) 0%, rgba(21, 25, 35, 0.96) 100%);
  box-shadow: var(--shadow);
}

.hero-label {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--muted);
}

.hero-metric h3 {
  margin: 0 0 6px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-subtext {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-action {
  text-align: center;
}

.hero-action span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 14px;
  transition: 0.2s ease;
}

.primary-button {
  padding: 18px 34px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #3d67aa 0%, #2a4c81 100%);
  box-shadow: var(--shadow);
}

.primary-button:hover {
  transform: translateY(-1px);
}

.secondary-button {
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi-card {
  padding: 20px;
}

.kpi-card p,
.kpi-card span {
  margin: 0;
}

.kpi-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.kpi-card h3 {
  margin: 0 0 10px;
  font-size: 38px;
  line-height: 1;
}

.kpi-card span {
  color: var(--muted);
  font-size: 14px;
}

.kpi-card--ready {
  background: linear-gradient(180deg, rgba(68, 184, 166, 0.22), rgba(23, 28, 39, 1));
  border-color: rgba(68, 184, 166, 0.38);
}

.kpi-card--not-available {
  background: linear-gradient(180deg, rgba(226, 179, 106, 0.18), rgba(23, 28, 39, 1));
  border-color: rgba(226, 179, 106, 0.34);
}

.kpi-card--evaluation {
  background: linear-gradient(180deg, rgba(216, 193, 111, 0.16), rgba(23, 28, 39, 1));
  border-color: rgba(216, 193, 111, 0.34);
}

.kpi-card--pending {
  background: linear-gradient(180deg, rgba(53, 92, 154, 0.24), rgba(23, 28, 39, 1));
  border-color: rgba(53, 92, 154, 0.34);
}

.section-header {
  margin-bottom: 14px;
}

.section-header h3,
.panel-header h4 {
  margin: 0;
}

.section-header p,
.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-header--stacked {
  justify-content: flex-start;
}

.status-item,
.attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.status-item + .status-item,
.attention-item + .attention-item {
  margin-top: 12px;
}

.status-item strong,
.attention-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.status-item p,
.attention-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.badge--green {
  background: var(--green-soft);
  color: #90ebdc;
}

.badge--amber {
  background: var(--amber-soft);
  color: #f1cb90;
}

.badge--yellow {
  background: var(--yellow-soft);
  color: #efe18d;
}

.badge--blue {
  background: var(--blue-soft);
  color: #a7c6ff;
}

.badge--red {
  background: var(--danger-soft);
  color: #f3aa9e;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
}

.dot--green { background: var(--green); }
.dot--amber { background: var(--amber); }
.dot--yellow { background: var(--yellow); }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 16px;
  margin-bottom: 22px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  font-size: 15px;
}

.accounts-overview {
  margin-top: 4px;
}

@media (max-width: 1200px) {
  .hero-summary,
  .kpi-grid,
  .status-columns,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-action {
    text-align: left;
  }
}

@media (max-width: 860px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-metric h3 {
    font-size: 34px;
  }

  .primary-button {
    width: 100%;
  }
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.settings-form input,
.settings-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
}

.settings-form input:focus,
.settings-form select:focus {
  border-color: var(--blue);
}

.settings-toggles {
  display: grid;
  gap: 14px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.toggle-row:last-child {
  border-bottom: none;
}

.small-button {
  width: fit-content;
  padding: 12px 20px;
  font-size: 15px;
}

@media (max-width: 980px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card--green {
  background: linear-gradient(180deg, rgba(68, 184, 166, 0.16), rgba(23, 28, 39, 1));
  border-color: rgba(68, 184, 166, 0.24);
}

.payout-ready-grid {
  display: grid;
  gap: 14px;
}

.payout-action-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.insight-box {
  display: grid;
  gap: 14px;
}

.insight-box h5 {
  margin: 0;
  font-size: 24px;
}

.insight-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.insight-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 8px;
}

.analytics-stack {
  display: grid;
  gap: 12px;
}

.analytics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.analytics-row span {
  color: var(--muted);
}

.analytics-row strong {
  font-size: 16px;
  color: var(--text);
}
.profile-panel {
  max-width: 600px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.profile-avatar-wrapper {
  position: relative;
}

.profile-avatar-wrapper img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-wrapper input {
  position: absolute;
  bottom: 0;
  left: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.profile-form {
  display: grid;
  gap: 16px;
}

.profile-form input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
}

.connections-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.connections-hero-copy h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.connections-hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.7;
}

.connections-hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.connections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.connection-card {
  display: grid;
  gap: 18px;
}

.connection-card-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.connection-card-top h4 {
  margin: 0 0 8px;
  font-size: 22px;
}

.connection-card-top p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.connection-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.tradovate-logo {
  background: linear-gradient(135deg, rgba(75, 124, 255, 0.2), rgba(47, 212, 255, 0.18));
  color: #9db5ff;
}

.rithmic-logo {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(47, 212, 255, 0.12));
  color: #87efac;
}

.connection-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.connection-status--disconnected {
  background: rgba(239, 68, 68, 0.12);
  color: #f7a3a3;
}

.connection-status--connected {
  background: rgba(34, 197, 94, 0.14);
  color: #8ff0b2;
}

.connection-meta {
  color: var(--muted);
  font-size: 13px;
}

.connection-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.connections-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.info-item {
  padding: 18px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.info-item strong {
  display: block;
  margin-bottom: 8px;
}

.info-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: min(100%, 520px);
  background: linear-gradient(180deg, rgba(20, 27, 40, 0.96), rgba(13, 18, 28, 0.98));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-text {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 18px;
}

.modal-note {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rithmic-steps {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.rithmic-step {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

@media (max-width: 980px) {
  .connections-grid,
  .connections-info-grid {
    grid-template-columns: 1fr;
  }

  .connections-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

.connection-details {
  font-size: 13px;
  color: var(--muted);
}

.hidden {
  display: none;
}

.synced-accounts {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.synced-account {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.synced-account strong {
  display: block;
  margin-bottom: 4px;
}

.synced-account p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.performance-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.performance-hero-copy h3 {
  margin: 0 0 10px;
  font-size: 28px;
}

.performance-hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.7;
}

.performance-hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.performance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.performance-list,
.health-list,
.summary-stats {
  display: grid;
  gap: 12px;
}

.performance-item,
.health-item,
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.performance-item strong,
.health-item strong {
  display: block;
  margin-bottom: 4px;
}

.performance-item p,
.health-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.health-score {
  min-width: 62px;
  text-align: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.health-score--good {
  background: rgba(34, 197, 94, 0.14);
  color: #8ff0b2;
}

.health-score--warn {
  background: rgba(226, 179, 106, 0.16);
  color: #f1cb90;
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  color: var(--text);
}

@media (max-width: 980px) {
  .performance-grid {
    grid-template-columns: 1fr;
  }

  .performance-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}