:root {
  --bg-page: #070b14;
  --bg-panel: #0f172a;
  --bg-card: #111c33;
  --bg-hover: #172542;
  --border: #1e293b;
  --border-bright: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.14);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.15);
  --rose: #fb7185;
  --rose-bg: rgba(251, 113, 133, 0.14);
  --mono: "Consolas", "Cascadia Mono", "Courier New", monospace;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(circle at top right, #0c1936 0%, var(--bg-page) 45%);
  color: var(--text-primary);
  min-height: 100vh;
}

.app-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 18px 22px 48px;
}

/* Header */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 14px 18px;
  backdrop-filter: blur(8px);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #10b981);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  letter-spacing: 0.5px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.topbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

select,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="color"] {
  background: #090f1e;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 7px 11px;
  font-family: var(--sans);
  font-size: 13px;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--cyan);
}

.btn {
  border: 1px solid var(--border-bright);
  background: #16223b;
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: #1e2f52;
  border-color: var(--cyan);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #34d399;
}

.btn-emerald:hover {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #fbbf24;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.btn-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--cyan);
  color: #bae6fd;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
}

/* Status Banner */
.account-banner {
  margin-top: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.mode-real {
  background: var(--emerald-bg);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.mode-demo {
  background: var(--amber-bg);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.mode-contest {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.acct-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.meta-val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}

/* Section Headers */
.section-head {
  margin: 20px 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.muted-note {
  font-size: 12px;
  color: var(--text-secondary);
}

/* EA Cards Grid */
.ea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 12px;
}

.ea-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
  overflow: hidden;
}

.ea-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-bright);
  transform: translateY(-1px);
}

.ea-card.selected {
  border-color: var(--cyan);
  background: #132544;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.ea-accent {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.ea-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-left: 6px;
}

.ea-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.ea-open-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  white-space: nowrap;
}

.ea-pnl {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 6px;
  padding-left: 6px;
}

.ea-subrow {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
  padding-left: 6px;
}

/* Filter & Exporter Toolbar */
.toolbar-panel {
  margin-top: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pill {
  border: 1px solid var(--border-bright);
  background: #0b1326;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pill:hover {
  color: var(--text-primary);
  border-color: var(--cyan);
}

.pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--cyan);
  color: #e0f2fe;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* KPI Row */
.kpi-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 12px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
}

.kpi-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.kpi-val {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
}

.kpi-sub {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Chart + Breakdown Layout */
.analytics-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
}

@media (max-width: 1100px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.panel-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 310px;
  background: #080d1a;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-primary);
  display: none;
  z-index: 5;
  white-space: nowrap;
}

.side-tabs {
  display: flex;
  gap: 6px;
}

/* Tables */
.table-scroll {
  overflow-x: auto;
  max-height: 460px;
  overflow-y: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

thead th {
  position: sticky;
  top: 0;
  background: #131f3a;
  color: var(--text-secondary);
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border-bright);
  white-space: nowrap;
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.7);
  font-family: var(--mono);
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(30, 41, 59, 0.45);
}

.num {
  text-align: right !important;
}

.pos {
  color: #34d399;
}

.neg {
  color: #fb7185;
}

.buy-tag {
  color: #38bdf8;
  font-weight: 700;
}

.sell-tag {
  color: #fbbf24;
  font-weight: 700;
}

.ea-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}

.ea-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Empty State */
.empty-state {
  margin-top: 24px;
  background: var(--bg-panel);
  border: 1px dashed var(--border-bright);
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 8px;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 18px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.84);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #0f172a;
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  max-width: 1120px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}

.preview-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  display: block;
}

.code-block {
  background: #070b14;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #bae6fd;
  word-break: break-all;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0f172a;
  border: 1px solid var(--cyan);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 80;
  display: none;
}

.toast.show {
  display: block;
}

input[type="password"] {
  background: #090f1e;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 8px 11px;
  font-family: var(--sans);
  font-size: 13px;
  width: 100%;
}

.btn-danger {
  background: rgba(225, 29, 72, 0.22);
  border-color: #fb7185;
  color: #fecdd3;
}

.btn-danger:hover {
  background: rgba(225, 29, 72, 0.36);
}

.error-banner {
  background: var(--rose-bg);
  border: 1px solid rgba(251, 113, 133, 0.5);
  color: #fecdd3;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  margin-top: 10px;
  display: none;
}

.error-banner.show {
  display: block;
}

/* Live FX Currency Switcher Bar */
.currency-bar {
  margin-top: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.currency-bar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.currency-bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.currency-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.pill.cur-pill.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #ecfdf5;
}

.fx-rate-badge {
  font-family: Consolas, monospace;
  font-size: 11.5px;
  color: #93c5fd;
  background: rgba(30, 58, 138, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  padding: 4px 10px;
}

/* Language Switcher Bar */
.lang-bar {
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lang-bar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.lang-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.pill.lang-pill.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #e0f2fe;
}

/* =====================================================================
   Landing Portal & SaaS Showcase Extensions
   ===================================================================== */

/* Top Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-view-btn {
  cursor: pointer;
  border: 1px solid var(--border-bright);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.nav-view-btn:hover {
  color: #fff;
  border-color: #38bdf8;
}

.nav-view-btn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Hero Section */
.hero-section {
  margin: 22px 0 32px;
  padding: 38px 32px;
  background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.15) 0%, rgba(15, 23, 42, 0.95) 70%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 20px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.hero-pill-cyan {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.hero-title {
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
  background: linear-gradient(135deg, #ffffff 40%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 15.5px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 860px;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Solutions Grid (3 Opsi Tujuan) */
.solutions-section {
  margin: 32px 0 40px;
}

.portal-section-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 6px;
}

.portal-section-desc {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 20px;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.solution-card {
  background: rgba(17, 28, 51, 0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.solution-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
}

.solution-card.featured {
  border-color: rgba(245, 158, 11, 0.5);
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.12) 0%, rgba(17, 28, 51, 0.95) 75%);
}

.solution-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.solution-icon {
  font-size: 28px;
}

.solution-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.solution-badge-emerald {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.solution-name {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f8fafc;
}

.solution-desc {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 16px;
}

.solution-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 13px;
  color: #cbd5e1;
}

.solution-features li {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.solution-features li::before {
  content: "✔";
  color: #10b981;
  font-weight: 700;
}

/* 4 EA Catalog Showcase */
.ea-showcase-section {
  margin: 36px 0 44px;
}

.ea-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.catalog-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.catalog-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5);
}

.catalog-top {
  margin-bottom: 14px;
}

.catalog-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  margin-bottom: 8px;
}

.catalog-title {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 6px;
}

.catalog-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 14px;
}

.catalog-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(7, 11, 20, 0.6);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  margin-bottom: 16px;
}

.catalog-spec-item {
  display: flex;
  flex-direction: column;
}

.catalog-spec-lbl {
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.catalog-spec-val {
  color: #e2e8f0;
  font-weight: 700;
}

.catalog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tab Bar inside Modals */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab-btn {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* User Menu Pill */
.user-menu-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 26px;
  }
  .hero-section {
    padding: 24px 18px;
  }
}

/* ========================================================================== */
/* Portfolio Privacy Gates (Guest Gate & Member Empty Gate)                  */
/* ========================================================================== */
.portfolio-gate {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.gate-card {
  width: 100%;
  max-width: 820px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.1);
  border-radius: 18px;
  padding: 36px 32px;
  text-align: center;
}

.gate-icon-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.gate-title {
  font-size: 26px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.gate-sub {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 28px;
}

.gate-roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
  text-align: left;
}

.gate-role-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.gate-role-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.gate-role-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 8px;
}

.gate-role-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.gate-role-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.gate-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  text-align: left;
}

.gate-step-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.gate-step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #34d399;
  color: #34d399;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.gate-step-row strong {
  display: block;
  font-size: 14px;
  color: #f8fafc;
  margin-bottom: 2px;
}

.gate-step-row p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.gate-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ========================================================================= */
/* THEME: BRIGHT / LIGHT MODE                                                */
/* ========================================================================= */
[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-table-stripe: #f8fafc;
  --border: #e2e8f0;
  --border-bright: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --cyan: #0284c7;
  --emerald: #059669;
  --emerald-bg: rgba(5, 150, 105, 0.1);
  --amber: #d97706;
  --amber-bg: rgba(217, 119, 6, 0.1);
  --rose: #e11d48;
  --rose-bg: rgba(225, 29, 72, 0.1);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] body {
  background: radial-gradient(circle at top right, #e0f2fe 0%, #f8fafc 40%) !important;
  color: #0f172a !important;
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: var(--border-bright) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .brand-title {
  color: #0f172a !important;
}

[data-theme="light"] .brand-sub {
  color: #475569 !important;
}

[data-theme="light"] .lang-bar {
  background: #ffffff !important;
  border-color: var(--border) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .hero-section {
  background: radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.12) 0%, rgba(255, 255, 255, 0.98) 70%) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #0f172a 40%, #0284c7 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] .hero-sub {
  color: #475569 !important;
}

[data-theme="light"] .portal-section-title,
[data-theme="light"] .section-title,
[data-theme="light"] .catalog-title,
[data-theme="light"] .solution-name,
[data-theme="light"] .gate-title,
[data-theme="light"] .modal-title,
[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3, [data-theme="light"] h4 {
  color: #0f172a !important;
}

[data-theme="light"] .portal-section-desc,
[data-theme="light"] .catalog-desc,
[data-theme="light"] .solution-desc,
[data-theme="light"] .modal-sub,
[data-theme="light"] .muted-note {
  color: #475569 !important;
}

[data-theme="light"] .solution-card,
[data-theme="light"] .catalog-card,
[data-theme="light"] .gate-card,
[data-theme="light"] .gate-role-card,
[data-theme="light"] .panel-card,
[data-theme="light"] .panel,
[data-theme="light"] .kpi-card,
[data-theme="light"] .chart-card,
[data-theme="light"] .modal-card,
[data-theme="light"] .portfolio-gate-card {
  background: #ffffff !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .solution-card:hover,
[data-theme="light"] .catalog-card:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 12px 24px -4px rgba(2, 132, 199, 0.12);
}

[data-theme="light"] .solution-features li {
  color: #334155 !important;
}

[data-theme="light"] .btn-view-ea-porto {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  border-color: var(--border) !important;
}

[data-theme="light"] .btn-view-ea-porto:hover {
  background: #e2e8f0 !important;
}

[data-theme="light"] .pill {
  background: #f1f5f9 !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}

[data-theme="light"] .pill:hover {
  background: #e2e8f0 !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .pill.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

[data-theme="light"] .deals-table th {
  background: #f8fafc !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
}

[data-theme="light"] .deals-table td {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .deals-table tr:hover td {
  background: #f1f5f9 !important;
}

[data-theme="light"] .deals-table tr:nth-child(even) td {
  background: #fafbfc;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff !important;
  color: var(--text-primary) !important;
  border-color: var(--border-bright) !important;
}

[data-theme="light"] .chart-title {
  color: #0f172a !important;
}

[data-theme="light"] .chart-span {
  color: #64748b !important;
}

[data-theme="light"] .chart-tooltip {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0f172a !important;
  border-color: var(--border-bright) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .chart-tooltip strong {
  color: #0284c7 !important;
}

[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.5) !important;
  backdrop-filter: blur(4px);
}

[data-theme="light"] .gate-step-row strong {
  color: #0f172a !important;
}

[data-theme="light"] .gate-step-row p {
  color: #64748b !important;
}

[data-theme="light"] .theme-toggle-btn {
  background: #f1f5f9 !important;
  border-color: var(--border-bright) !important;
  color: var(--text-primary) !important;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #e2e8f0 !important;
}

/* ========================================================================= */
/* SETRA-STYLE LEFT STICKY SIDEBAR & PORTFOLIO HUB LAYOUT (v2.0.0)           */
/* ========================================================================= */
html {
  scroll-behavior: smooth;
}

.setra-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.setra-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  background: #0b1120;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 14px;
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-group-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-item,
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  width: 100%;
}

.sidebar-item:hover,
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-item.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.sidebar-link {
  justify-content: flex-start !important;
  gap: 12px !important;
}

.sb-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sb-text {
  flex: 1;
}

.sb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sb-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-pnl {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.sb-tag {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

.sb-tag-gold {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 6px;
}

/* Admin Sidebar Box */
.admin-sidebar-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-sb-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.admin-sb-select {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
}

.admin-sb-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Sidebar Footer Promo & Discrete Admin */
.sidebar-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-promo-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(2, 132, 199, 0.16));
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.sidebar-promo-card:hover {
  transform: translateY(-2px);
  border-color: #34d399;
}

.sp-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  margin-bottom: 5px;
}

.sp-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.sp-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.sidebar-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.sb-copyright {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-discrete-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-discrete-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.05);
}

/* Main Content Area */
.setra-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.setra-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.page-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--cyan);
  text-transform: uppercase;
}

.page-heading {
  font-size: 22px;
  font-weight: 800;
  margin: 2px 0 0;
  color: var(--text-primary);
}

.topbar-utilities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.setra-content {
  padding: 18px 28px 54px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 310px;
  background: #080d1a;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.trades-grid {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Official MQL5 Market Showcase Panel */
.mql5-store-panel {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(17, 28, 51, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.45);
}

.mql5-store-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.mql5-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fbbf24;
  text-transform: uppercase;
}

.mql5-store-title {
  font-size: 20px;
  font-weight: 800;
  margin: 4px 0 6px;
  color: var(--text-primary);
}

.mql5-store-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 820px;
  line-height: 1.5;
}

.mql5-seller-btn {
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
  white-space: nowrap;
}

.mql5-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 14px;
}

.mql5-prod-card {
  background: rgba(11, 18, 34, 0.88);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.mql5-prod-card:hover,
.mql5-prod-card.highlighted {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 8px 24px -6px rgba(56, 189, 248, 0.25);
}

.mql5-prod-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  margin-bottom: 10px;
}

.mql5-prod-name {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.mql5-prod-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 12px;
  flex: 1;
}

.mql5-prod-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 12px;
}

.mql5-prod-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mql5-buy-btn {
  flex: 1;
  justify-content: center;
  text-decoration: none;
  font-size: 12.5px;
  padding: 7px 10px;
}

@media (max-width: 960px) {
  .setra-layout {
    flex-direction: column;
  }
  .setra-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
}

/* ========================================================================= */
/* LIGHT / BRIGHT MODE CONTRAST FIXES (DARK PANELS = WHITE TEXT, LIGHT = DARK)*/
/* ========================================================================= */
[data-theme="light"] .setra-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 4px 0 16px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .setra-topbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .sidebar-item,
[data-theme="light"] .sidebar-link {
  color: #334155 !important;
}

[data-theme="light"] .sidebar-item:hover,
[data-theme="light"] .sidebar-link:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

/* Selected Sidebar Item & Selected EA Card keep dark slate/navy background -> FORCE CRISP WHITE TEXT */
[data-theme="light"] .sidebar-item.active {
  background: #0f172a !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
}

[data-theme="light"] .sidebar-item.active .sb-name {
  color: #ffffff !important;
}

[data-theme="light"] .ea-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .ea-card .ea-name {
  color: #0f172a !important;
}

[data-theme="light"] .ea-card .ea-subrow {
  color: #475569 !important;
}

[data-theme="light"] .ea-card .ea-open-pill {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  font-weight: 700;
}

[data-theme="light"] .ea-card.selected {
  background: #0f172a !important;
  border-color: #0284c7 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18) !important;
}

[data-theme="light"] .ea-card.selected .ea-name,
[data-theme="light"] .ea-card.selected .ea-subrow,
[data-theme="light"] .ea-card.selected .ea-subrow span {
  color: #ffffff !important;
}

[data-theme="light"] .ea-card.selected .ea-open-pill {
  background: rgba(56, 189, 248, 0.25) !important;
  color: #ffffff !important;
}

[data-theme="light"] .ea-card.selected .ea-pnl.pos {
  color: #34d399 !important;
}

[data-theme="light"] .ea-card.selected .ea-pnl.neg {
  color: #fb7185 !important;
}

[data-theme="light"] .account-banner,
[data-theme="light"] .toolbar-panel {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

[data-theme="light"] .chart-container {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] thead th {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

[data-theme="light"] tbody td {
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] tbody tr:hover {
  background: #f8fafc !important;
}

/* Any dark button in light mode MUST have crisp white text, never gray */
[data-theme="light"] .btn {
  background: #1e293b;
  color: #ffffff !important;
  border-color: #334155;
}

[data-theme="light"] .btn:hover {
  background: #0f172a;
  color: #ffffff !important;
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
}

[data-theme="light"] .btn-emerald {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #ffffff !important;
}

[data-theme="light"] .btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  color: #ffffff !important;
}

[data-theme="light"] .fx-rate-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
  font-weight: 700;
}

[data-theme="light"] .mql5-store-panel {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .mql5-prod-card {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .mql5-prod-name {
  color: #0f172a !important;
}

[data-theme="light"] .mql5-prod-text,
[data-theme="light"] .mql5-prod-meta {
  color: #334155 !important;
  background: #ffffff;
}

[data-theme="light"] .admin-sidebar-box {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .sidebar-promo-card {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
}

/* ============================================================================
   ADMIN PORTFOLIO ROUTING & PUBLIC PRIVACY SETTINGS MODAL (v2.1.0)
   + HIGH-CONTRAST MODAL FIX (DARK & BRIGHT MODE)
   ============================================================================ */
.modal-box {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
}

.modal-head {
  color: #ffffff !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
}

.modal-head strong {
  color: #ffffff !important;
  font-size: 15px;
}

.modal-body .section-title,
.ps-section-title {
  color: #f8fafc !important;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 6px;
}

.modal-body .muted-note,
.ps-section-desc {
  color: #cbd5e1 !important;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.ps-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.ps-toggle-row:hover {
  border-color: #38bdf8;
}

.ps-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #10b981;
  cursor: pointer;
  flex-shrink: 0;
}

.ps-toggle-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
}

.ps-toggle-hint {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.ps-routing-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ps-route-row {
  display: grid;
  grid-template-columns: 230px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.ps-route-row label {
  font-size: 13px;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: #0b1220;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 12.5px;
}

@media (max-width: 640px) {
  .ps-route-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Light mode contrast inside Modals (keep crisp dark text on white modal) */
[data-theme="light"] .modal-box {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .modal-head {
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .modal-head strong,
[data-theme="light"] .modal-body .section-title,
[data-theme="light"] .ps-section-title,
[data-theme="light"] .ps-toggle-name,
[data-theme="light"] .ps-route-row label {
  color: #0f172a !important;
}

[data-theme="light"] .modal-body .muted-note,
[data-theme="light"] .ps-section-desc,
[data-theme="light"] .ps-toggle-hint {
  color: #475569 !important;
}

[data-theme="light"] .ps-toggle-row,
[data-theme="light"] .ps-route-row {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .ps-select {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .modal-box .code-block {
  background: #0f172a !important;
  color: #f8fafc !important;
}

/* Toast Notification High-Contrast Fix (Dark & Light Mode) */
.toast,
[data-theme="light"] .toast {
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35) !important;
}



