:root {
  color-scheme: light;
  font-family: "Segoe UI Variable", "Segoe UI", Inter, Arial, sans-serif;
  --bg: #f4f8fb;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --text: #101a28;
  --muted: #637184;
  --line: rgba(15, 34, 52, 0.10);
  --line-strong: rgba(8, 129, 164, 0.28);
  --cyan: #0a88ad;
  --green: #12845f;
  --gold: #a86c05;
  --red: #c52f45;
  --violet: #4d63d8;
  --ink: #111d2c;
  --black: #05080d;
  --black-soft: rgba(8, 16, 27, 0.92);
  --black-line: rgba(5, 8, 13, 0.18);
  --shadow: 0 18px 42px rgba(16, 31, 49, 0.10);
  --shadow-strong: 0 28px 70px rgba(9, 20, 34, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(10, 136, 173, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(10, 136, 173, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #f7fbfd 0%, #eef5f8 48%, #f6fafc 100%),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto;
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 16%, rgba(8, 129, 164, 0.05) 16% 16.25%, transparent 16.25% 52%, rgba(18, 132, 95, 0.045) 52% 52.25%, transparent 52.25%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), transparent 38%, rgba(228, 239, 244, 0.44));
  mix-blend-mode: normal;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, transparent 0 49.8%, rgba(10, 136, 173, 0.05) 49.8% 50%, transparent 50%),
    linear-gradient(0deg, transparent 0 49.8%, rgba(18, 132, 95, 0.035) 49.8% 50%, transparent 50%);
  background-size: 260px 260px, 260px 260px;
  opacity: 0.52;
}

h1, h2, h3, p {
  margin: 0;
}

.topbar {
  min-height: 86px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(53, 231, 255, 0.14);
  background: #07111d;
  backdrop-filter: none;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(53, 231, 255, 0.34);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #eaffff;
  font-weight: 800;
  letter-spacing: 0;
  background: #0d2234;
  box-shadow: 0 0 0 1px rgba(53, 231, 255, 0.10) inset, 0 12px 26px rgba(0, 0, 0, 0.24);
}

.topbar h1 {
  font-size: 27px;
  line-height: 1.1;
  font-weight: 850;
  color: #f8fdff;
  letter-spacing: 0;
}

.topbar p {
  color: rgba(226, 245, 255, 0.74);
  margin-top: 5px;
}

.system-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.system-strip span {
  border: 1px solid rgba(53, 231, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #effcff;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.page-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-nav a {
  text-decoration: none;
  border: 1px solid rgba(53, 231, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #effcff;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 850;
}

.page-nav a.active {
  background: #effcff;
  color: #07111d;
  border-color: rgba(124, 236, 255, 0.55);
}

.live-clock {
  border: 1px solid rgba(53, 231, 255, 0.18);
  background: #0d2234;
  border-radius: 8px;
  padding: 8px 11px;
  min-width: 126px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(31, 81, 107, 0.10);
}

.live-clock span {
  display: block;
  color: rgba(226, 245, 255, 0.62);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.live-clock strong {
  display: block;
  color: #7cecff;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.mode {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  justify-content: end;
}

.mode span {
  color: rgba(238, 250, 255, 0.78);
}

.mode label {
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.07);
  color: #f4fbff;
  padding: 8px 10px;
  border-radius: 7px;
}

main {
  width: min(1320px, calc(100% - 32px));
  margin: 20px auto 34px;
}

.side-dock {
  position: fixed;
  left: 10px;
  top: 112px;
  z-index: 30;
}

.side-dock-shell {
  width: 46px;
  transition: width 160ms ease;
}

.side-dock-shell[open] {
  width: min(380px, calc(100vw - 32px));
}

.side-dock-shell > summary {
  list-style: none;
  width: 46px;
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(53, 231, 255, 0.20);
  border-radius: 0 12px 12px 0;
  background: rgba(7, 17, 29, 0.86);
  color: #effcff;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(5, 8, 13, 0.18);
  backdrop-filter: blur(10px);
}

.side-dock-shell > summary::-webkit-details-marker {
  display: none;
}

.dock-icon {
  font-size: 21px;
  line-height: 1;
}

.dock-label {
  display: none;
}

.side-dock-panel {
  display: none;
  margin-top: 10px;
  max-height: calc(100vh - 184px);
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(5, 8, 13, 0.14);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 250, 255, 0.92)),
    var(--panel-strong);
  box-shadow: 0 24px 70px rgba(5, 8, 13, 0.22);
  backdrop-filter: blur(18px);
}

.side-dock-shell[open] .side-dock-panel {
  display: grid;
  gap: 10px;
}

.side-dock-head {
  padding: 2px 2px 6px;
}

.side-dock-head h2 {
  font-size: 20px;
  font-weight: 900;
}

.side-dock-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

.auth-panel {
  width: min(500px, calc(100% - 32px));
  margin: 42px auto;
}

.auth-card,
.account-panel,
.connect-panel,
.command-deck,
.controls,
.pnl-panel,
.log-panel,
.bot {
  background: var(--panel);
  border: 1px solid rgba(5, 8, 13, 0.10);
  box-shadow: 0 20px 50px rgba(5, 8, 13, 0.10), 0 0 0 1px rgba(53, 231, 255, 0.06) inset;
  backdrop-filter: blur(16px);
}

.auth-card,
.account-panel,
.connect-panel {
  border-radius: 10px;
  padding: 17px;
}

.auth-card h2,
.account-panel h2,
.connect-panel h2,
.pnl-panel h2,
.log-head h2 {
  font-size: 19px;
  font-weight: 800;
}

.auth-card p,
.account-panel p,
.connect-panel p,
.pnl-panel p,
.log-head p {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.eyebrow {
  display: inline-block;
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 7px;
}

.auth-card label {
  display: block;
  margin-top: 13px;
}

label {
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px;
  border: 1px solid rgba(51, 91, 120, 0.18);
  border-radius: 7px;
  background: rgba(248, 253, 255, 0.86);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 231, 255, 0.12);
}

input:disabled {
  color: #6d7f90;
  border-color: rgba(15, 163, 111, 0.22);
}

button {
  border: 1px solid rgba(5, 8, 13, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  background: #0f9fbd;
  color: #ffffff;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(8, 152, 200, 0.16);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

button:hover {
  filter: none;
  background: #087fa0;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(8, 152, 200, 0.18);
}

button.secondary {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(5, 8, 13, 0.16);
  box-shadow: 0 8px 18px rgba(5, 8, 13, 0.06);
}

button.secondary:hover {
  background: #f3f8fb;
}

button.deriv-button {
  background: #ff444f;
  border-color: rgba(255, 68, 79, 0.32);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(255, 68, 79, 0.18);
}

button.deriv-button:hover {
  background: #e9323d;
  box-shadow: 0 18px 34px rgba(255, 68, 79, 0.22);
}

button.danger {
  background: #bd2440;
  color: #ffffff;
  border-color: rgba(157, 24, 48, 0.28);
  box-shadow: 0 10px 22px rgba(223, 49, 80, 0.16);
}

button.danger:hover {
  background: #9d1830;
}

button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  filter: none;
}

.auth-actions,
.account-actions,
.bot-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-actions {
  margin-top: 14px;
}

.manual-login,
.manual-token {
  margin-top: 14px;
  border: 1px solid rgba(51, 91, 120, 0.14);
  border-radius: 9px;
  padding: 10px;
  background: rgba(248, 253, 255, 0.56);
}

.manual-login summary,
.manual-token summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.manual-token {
  grid-column: 1 / -1;
}

.oauth-connect {
  margin: 12px 0;
}

.oauth-connect .deriv-button,
.auth-actions .deriv-button {
  width: 100%;
}

.form-message {
  min-height: 18px;
  font-size: 13px;
  color: var(--gold);
}

.top-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}

.notice {
  background: rgba(255, 238, 186, 0.72);
  border: 1px solid rgba(201, 129, 0, 0.28);
  color: #6d4700;
  border-radius: 10px;
  padding: 13px 14px;
  line-height: 1.4;
  font-size: 14px;
}

.verse-card {
  position: relative;
  width: 100%;
  border: 1px solid rgba(5, 8, 13, 0.12);
  border-radius: 10px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(5, 8, 13, 0.10);
  backdrop-filter: blur(14px);
}

.verse-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 10px 0 0 10px;
  background: #0f9fbd;
}

.verse-label {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.verse-card blockquote {
  margin: 0;
  color: #172536;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
}

.verse-card cite {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.ai-panel {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(8, 152, 200, 0.12), rgba(15, 163, 111, 0.08)),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(5, 8, 13, 0.12);
  box-shadow: 0 20px 50px rgba(5, 8, 13, 0.12);
  overflow: hidden;
  position: relative;
}

.ai-panel::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -34px;
  width: 180px;
  height: 90px;
  border: 1px solid rgba(5, 8, 13, 0.10);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.ai-panel h2 {
  font-size: 20px;
  font-weight: 800;
}

.ai-panel p {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.ai-orbit {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(8, 152, 200, 0.32);
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle, rgba(8, 152, 200, 0.18), transparent 58%);
  box-shadow: 0 12px 34px rgba(8, 152, 200, 0.14);
}

.ai-orbit span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(15, 163, 111, 0.46);
}

.ai-orbit span:nth-child(1) {
  top: 8px;
  left: 31px;
}

.ai-orbit span:nth-child(2) {
  right: 10px;
  bottom: 18px;
  background: var(--cyan);
}

.ai-orbit span:nth-child(3) {
  left: 12px;
  bottom: 18px;
  background: var(--gold);
}

.ai-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
  z-index: 1;
}

.ai-stats div {
  border: 1px solid rgba(51, 91, 120, 0.15);
  background: rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  padding: 9px;
  text-align: center;
}

.ai-stats strong {
  display: block;
  color: var(--cyan);
  font-size: 18px;
}

.ai-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

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

.command-deck {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(238, 250, 255, 0.72)),
    var(--panel);
}

.account-summary h2 {
  font-size: 19px;
  font-weight: 800;
}

.account-summary p,
.menu-content p {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.summary-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.summary-pills .balance-live,
.summary-pills .plan-status {
  margin-top: 0;
}

.quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-actions button {
  min-width: 92px;
}

button.emergency {
  min-width: auto;
  padding: 10px 13px;
  background: #bd2440;
}

.menu-card {
  position: relative;
  border: 1px solid rgba(5, 8, 13, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.64);
}

.menu-card[open] {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px rgba(5, 8, 13, 0.10);
}

.menu-card summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 13px;
  font-weight: 900;
  color: #102033;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.menu-card summary::-webkit-details-marker {
  display: none;
}

.menu-card summary::after {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #f8fdff;
  background: var(--black-soft);
  font-size: 14px;
  line-height: 1;
}

.menu-card[open] summary::after {
  content: "-";
}

.menu-content {
  padding: 0 13px 13px;
  border-top: 1px solid rgba(5, 8, 13, 0.08);
}

.balance-live {
  width: fit-content;
  margin-top: 10px;
  border: 1px solid rgba(15, 163, 111, 0.28);
  background: rgba(15, 163, 111, 0.08);
  color: var(--green);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 900;
}

.pause-note {
  margin-top: 10px;
  border: 1px solid rgba(223, 49, 80, 0.22);
  background: rgba(223, 49, 80, 0.08);
  color: #9d1830;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 850;
}

.plan-status {
  width: fit-content;
  margin-top: 8px;
  border: 1px solid rgba(8, 152, 200, 0.26);
  background: rgba(8, 152, 200, 0.08);
  color: #095d7b;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 900;
}

.connect-panel {
  margin-bottom: 14px;
}

.connect-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 13px;
  align-items: end;
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.controls,
.settings-panel {
  border-top: 3px solid rgba(5, 8, 13, 0.82);
}

.settings-panel,
.history-panel,
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(31, 81, 107, 0.13);
  backdrop-filter: blur(16px);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.settings-panel h2,
.history-panel h2,
.admin-panel h2 {
  font-size: 18px;
}

.settings-panel p,
.history-panel p,
.admin-panel p {
  color: var(--muted);
  margin-top: 5px;
}

.plan-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.plan-edit select {
  min-width: 96px;
  padding: 8px 10px;
}

.plan-edit button {
  padding: 8px 10px;
}

.admin-payment {
  min-width: 220px;
}

.admin-payment strong,
.admin-payment span,
.admin-payment small {
  display: block;
}

.admin-payment strong {
  color: var(--ink);
  font-size: 13px;
}

.admin-payment span {
  font-size: 12px;
  font-weight: 900;
  margin-top: 3px;
  text-transform: uppercase;
}

.admin-payment span.ok {
  color: var(--green);
}

.admin-payment span.pending {
  color: var(--gold);
}

.admin-payment span.bad {
  color: var(--red);
}

.admin-payment small {
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.payment-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.payment-actions button {
  padding: 7px 9px;
}

.payment-empty {
  color: var(--muted);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
  margin-top: 13px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.check-row input {
  width: auto;
  margin: 0;
}

.controls label {
  min-width: 160px;
}

.section-start {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(5, 8, 13, 0.14);
  background:
    linear-gradient(135deg, rgba(5, 8, 13, 0.88), rgba(12, 26, 39, 0.78) 42%, rgba(8, 152, 200, 0.10)),
    rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 46px rgba(5, 8, 13, 0.13);
}

.section-start h2 {
  font-size: 18px;
  color: #f8fdff;
}

.section-start .eyebrow {
  color: #9cf4ff;
}

.section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.readiness-panel,
.billing-panel,
.review-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 255, 0.86));
  box-shadow: var(--shadow);
}

.readiness-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.6fr);
  gap: 14px;
  align-items: start;
}

.billing-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.8fr);
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 253, 0.90));
}

.billing-copy p {
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
}

.payment-destination {
  grid-column: 1 / -1;
  border: 1px solid rgba(10, 136, 173, 0.18);
  border-radius: 10px;
  padding: 10px;
  background: rgba(10, 136, 173, 0.07);
}

.payment-destination strong,
.payment-destination span,
.payment-destination small {
  display: block;
}

.payment-destination strong {
  color: var(--ink);
  font-size: 14px;
}

.payment-destination span {
  color: var(--cyan);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.payment-destination small {
  color: var(--muted);
  margin-top: 5px;
}

.payment-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.payment-copy-row span {
  flex: 1 1 auto;
  min-width: 0;
}

.copy-payment {
  flex: 0 0 auto;
  padding: 7px 10px;
}

.readiness-panel h2,
.billing-panel h2,
.review-panel h2 {
  font-size: 19px;
  font-weight: 900;
}

.readiness-panel p,
.review-panel p {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

.readiness-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.readiness-item,
.review-card {
  border: 1px solid rgba(15, 34, 52, 0.09);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.readiness-item {
  border-left: 4px solid var(--red);
}

.readiness-item.ok {
  border-left-color: var(--green);
}

.readiness-item span,
.review-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.readiness-item strong,
.review-card strong {
  display: block;
  color: var(--text);
  font-size: 17px;
}

.readiness-item.ok strong {
  color: var(--green);
}

.readiness-item.blocked strong {
  color: var(--red);
}

.review-card.strong {
  background:
    linear-gradient(135deg, rgba(16, 26, 40, 0.96), rgba(21, 44, 61, 0.92));
}

.review-card.strong span,
.review-card.strong p {
  color: rgba(239, 252, 255, 0.68);
}

.review-card.strong strong {
  color: #effcff;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab {
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  border-color: rgba(143, 165, 184, 0.25);
}

.tab.active {
  background: var(--black-soft);
  color: #f4fbff;
  border-color: rgba(53, 231, 255, 0.34);
  box-shadow: 0 12px 26px rgba(5, 8, 13, 0.16);
}

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

.bot {
  border-radius: 10px;
  padding: 15px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.bot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--violet), var(--gold));
  opacity: 0.9;
}

.bot::after {
  content: "";
  position: absolute;
  inset: 3px 0 auto;
  height: 34px;
  background: linear-gradient(180deg, rgba(5, 8, 13, 0.05), transparent);
  pointer-events: none;
}

.bot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.bot h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bot-glyph {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(8, 152, 200, 0.28);
  color: #f8fdff;
  background: var(--black-soft);
  font-size: 10px;
  font-weight: 900;
}

.bot p {
  color: var(--muted);
  line-height: 1.35;
  font-size: 14px;
}

.badge {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(5, 8, 13, 0.06);
  border: 1px solid rgba(5, 8, 13, 0.16);
  color: #172536;
  white-space: nowrap;
}

.badge.running {
  background: rgba(15, 163, 111, 0.12);
  border-color: rgba(15, 163, 111, 0.32);
  color: var(--green);
}

.bot-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.plan-pill,
.health,
.locked-pill {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(143, 165, 184, 0.24);
  color: #43566a;
  background: rgba(255, 255, 255, 0.62);
}

.plan-pill {
  color: var(--gold);
  border-color: rgba(255, 209, 102, 0.32);
  background: rgba(255, 209, 102, 0.08);
}

.health.running,
.health.waiting,
.health.signal,
.health.in_trade {
  color: var(--green);
  border-color: rgba(15, 163, 111, 0.32);
  background: rgba(15, 163, 111, 0.09);
}

.health.error,
.locked-pill {
  color: #9d1830;
  border-color: rgba(223, 49, 80, 0.32);
  background: rgba(223, 49, 80, 0.09);
}

.bot.locked {
  opacity: 0.74;
}

.risk {
  font-size: 13px;
  color: #27394b;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(5, 8, 13, 0.10);
  border-radius: 7px;
  padding: 9px;
}

.market-pill {
  width: fit-content;
  color: var(--cyan);
  background: rgba(8, 152, 200, 0.08);
  border: 1px solid rgba(8, 152, 200, 0.22);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.market-pill span {
  color: var(--muted);
  font-weight: 800;
  margin-left: 6px;
}

.signal-alert {
  border: 1px solid rgba(18, 132, 95, 0.34);
  border-left: 4px solid var(--green);
  border-radius: 9px;
  padding: 10px 11px;
  background:
    linear-gradient(135deg, rgba(18, 132, 95, 0.14), rgba(10, 136, 173, 0.08)),
    rgba(255, 255, 255, 0.78);
  color: #0b513d;
  font-weight: 950;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.signals-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(7, 17, 29, 0.96), rgba(18, 38, 57, 0.90) 44%, rgba(10, 136, 173, 0.16)),
    #07111d;
  box-shadow: var(--shadow-strong);
}

.signals-panel h2 {
  color: #f8fdff;
  font-size: 22px;
}

.signals-panel p {
  color: rgba(226, 245, 255, 0.70);
  margin-top: 5px;
}

.signals-panel .eyebrow {
  color: #9cf4ff;
}

.signal-windows {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.signal-window {
  border: 1px solid rgba(124, 236, 255, 0.16);
  border-radius: 14px;
  padding: 16px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 251, 0.90));
  box-shadow: 0 22px 48px rgba(5, 8, 13, 0.22);
}

.signal-window.active-signal {
  border-color: rgba(18, 132, 95, 0.42);
  box-shadow: 0 22px 54px rgba(18, 132, 95, 0.18);
}

.signal-window-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.signal-window h3 {
  font-size: 24px;
  color: var(--ink);
  margin: 0;
}

.signal-window p {
  color: var(--muted);
  margin-top: 5px;
}

.signal-action {
  border: 1px solid rgba(18, 132, 95, 0.30);
  border-radius: 12px;
  padding: 14px;
  background: rgba(18, 132, 95, 0.10);
}

.signal-action.wait {
  border-color: rgba(10, 136, 173, 0.22);
  background: rgba(10, 136, 173, 0.08);
}

.signal-action span,
.signal-dashboard span,
.signal-latest span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.signal-action strong {
  display: block;
  color: var(--green);
  font-size: 32px;
  line-height: 1;
}

.signal-action.wait strong {
  color: var(--cyan);
}

.signal-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.signal-dashboard div,
.signal-latest {
  border: 1px solid rgba(15, 34, 52, 0.09);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.signal-dashboard strong,
.signal-latest strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.signal-pnl {
  border: 1px solid rgba(5, 8, 13, 0.10);
  border-radius: 12px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(16, 26, 40, 0.96), rgba(13, 34, 50, 0.92)),
    #101a28;
  box-shadow: 0 16px 34px rgba(5, 8, 13, 0.16);
}

.signal-pnl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.signal-pnl-head span {
  color: rgba(235, 249, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-pnl-head strong {
  font-size: 20px;
  font-weight: 950;
}

.signal-pnl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.signal-pnl-grid div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.signal-pnl-grid span {
  display: block;
  color: rgba(235, 249, 255, 0.58);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.signal-pnl-grid strong {
  display: block;
  color: #f3fdff;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.signal-chart {
  border: 1px solid rgba(117, 255, 179, 0.18);
  border-radius: 14px;
  padding: 11px;
  background:
    linear-gradient(180deg, rgba(1, 8, 13, 0.98), rgba(2, 15, 20, 0.96)),
    #01080d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 16px 34px rgba(0, 0, 0, 0.24);
}

.signal-chart svg {
  display: block;
  width: 100%;
  min-height: 210px;
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(54, 255, 139, 0.12), transparent 38%),
    #02070c;
  background-size: 100% 42px, 64px 100%, auto, auto;
}

.chart-head,
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chart-head {
  margin-bottom: 9px;
  color: rgba(235, 255, 246, 0.76);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.chart-head strong {
  color: #36ff8b;
  letter-spacing: 0;
}

.chart-legend {
  margin-top: 9px;
  color: rgba(235, 255, 246, 0.74);
  font-size: 12px;
  font-weight: 850;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.entry-dot {
  background: #36ff8b;
  box-shadow: 0 0 10px rgba(54, 255, 139, 0.72);
}

.sl-dot {
  background: #ff3b5f;
  box-shadow: 0 0 10px rgba(255, 59, 95, 0.72);
}

.tp-dot {
  background: #ffd166;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.70);
}

.range-dot {
  background: #79d8ff;
  box-shadow: 0 0 10px rgba(121, 216, 255, 0.62);
}

.empty-chart {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: rgba(235, 255, 246, 0.68);
  font-weight: 900;
}

.pnl-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(5, 8, 13, 0.10);
  border-radius: 7px;
  padding: 8px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.metric strong {
  font-size: 14px;
}

.signal-status {
  display: grid;
  grid-template-columns: 0.75fr 1.6fr 0.75fr;
  gap: 8px;
}

.signal-status div {
  border: 1px solid rgba(10, 136, 173, 0.14);
  border-radius: 8px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.signal-status span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.signal-status strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profit {
  color: var(--green);
}

.loss {
  color: var(--red);
}

.bot-actions {
  margin-top: auto;
}

.mini-log {
  display: none;
  background: rgba(5, 8, 13, 0.88);
  border: 1px solid rgba(53, 231, 255, 0.18);
  border-radius: 7px;
  padding: 9px;
  color: #d7fbff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  max-height: 112px;
  overflow: hidden;
  white-space: pre-wrap;
}

.mini-log.visible {
  display: block;
}

.pnl-panel {
  border-radius: 10px;
  margin-top: 14px;
  padding: 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pnl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pnl-card {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid rgba(5, 8, 13, 0.10);
  border-radius: 8px;
  padding: 10px;
}

.pnl-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.pnl-card div {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.log-panel {
  border-radius: 10px;
  margin-top: 14px;
  overflow: hidden;
}

.history-panel,
.admin-panel {
  margin-top: 14px;
}

.table-wrap {
  overflow: auto;
  margin-top: 12px;
  border: 1px solid rgba(51, 91, 120, 0.14);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  background: rgba(255, 255, 255, 0.68);
}

th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid rgba(143, 165, 184, 0.12);
  font-size: 13px;
}

th {
  color: #0f1e2e;
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: #26384b;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 8, 13, 0.38);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(620px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(5, 8, 13, 0.18);
  background:
    linear-gradient(135deg, rgba(8, 152, 200, 0.12), rgba(15, 163, 111, 0.07)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(5, 8, 13, 0.28);
  padding: 18px;
}

.modal-card h2 {
  font-size: 24px;
}

.modal-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-close {
  float: right;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.modal-meta div {
  border: 1px solid rgba(51, 91, 120, 0.14);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  padding: 10px;
}

.modal-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.modal-meta strong {
  color: var(--text);
  font-size: 14px;
}

.modal-settings {
  margin-top: 16px;
  border-top: 1px solid rgba(5, 8, 13, 0.10);
  padding-top: 14px;
}

.modal-settings h3 {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 4px;
}

.modal-settings .settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.log-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

pre {
  margin: 0;
  min-height: 280px;
  max-height: 460px;
  overflow: auto;
  padding: 14px;
  background: rgba(5, 8, 13, 0.88);
  color: #d7fbff;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.compact-help {
  min-height: auto;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

/* Professional trader-console polish */
.topbar {
  min-height: 78px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, #08111d 0%, #0e1d2b 52%, #102634 100%);
  box-shadow: 0 18px 44px rgba(6, 16, 28, 0.22);
}

.brand-mark {
  border-radius: 10px;
  background:
    linear-gradient(145deg, #122b3c, #07111d);
  box-shadow: 0 0 0 1px rgba(124, 236, 255, 0.10) inset, 0 14px 30px rgba(0, 0, 0, 0.26);
}

.system-strip span,
.mode label,
.live-clock {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
}

.side-dock-shell > summary {
  width: 42px;
  min-height: 42px;
  border-radius: 0 10px 10px 0;
  background: rgba(8, 17, 29, 0.92);
}

.dock-icon {
  font-size: 0;
  letter-spacing: 0;
}

.dock-icon::before {
  content: "|||";
  display: block;
  transform: rotate(90deg);
  color: #dffaff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
}

.side-dock-panel,
.auth-card,
.command-deck,
.pnl-panel,
.log-panel,
.history-panel,
.admin-panel,
.bot,
.verse-card,
.notice {
  border-radius: 12px;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.auth-card,
.command-deck,
.pnl-panel,
.log-panel,
.history-panel,
.admin-panel,
.bot,
.verse-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 255, 0.86));
}

.notice {
  background: #fff8e7;
  color: #644209;
}

.ai-panel {
  padding: 18px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(8, 17, 29, 0.94), rgba(14, 36, 52, 0.90) 55%, rgba(10, 136, 173, 0.24)),
    #0d1b29;
  border-color: rgba(124, 236, 255, 0.16);
  box-shadow: var(--shadow-strong);
}

.ai-panel h2 {
  color: #f6fdff;
  font-size: 22px;
  letter-spacing: 0;
}

.ai-panel p {
  color: rgba(228, 247, 255, 0.74);
}

.ai-panel .eyebrow {
  color: #8df0ff;
}

.ai-panel::after {
  opacity: 0.34;
  border-color: rgba(124, 236, 255, 0.16);
}

.ai-orbit {
  border-radius: 14px;
  border-color: rgba(124, 236, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(124, 236, 255, 0.10), rgba(18, 132, 95, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.ai-stats div {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.ai-stats strong {
  color: #8df0ff;
}

.ai-stats span {
  color: rgba(235, 249, 255, 0.68);
}

button {
  border-radius: 9px;
  background: #0b86a9;
  box-shadow: 0 10px 22px rgba(10, 136, 173, 0.15);
}

button:hover {
  background: #076f8e;
}

button.secondary {
  background: #f8fbfd;
}

.tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  width: fit-content;
}

.tab {
  box-shadow: none;
}

.tab.active {
  background: #101a28;
  box-shadow: 0 10px 22px rgba(16, 26, 40, 0.16);
}

.section-start {
  border-radius: 14px;
  background:
    linear-gradient(135deg, #101a28, #152c3d 66%, rgba(10, 136, 173, 0.34));
}

.bot {
  border-radius: 14px;
  min-height: 260px;
}

.bot::before {
  height: 2px;
  background: linear-gradient(90deg, #0a88ad, #12845f);
}

.bot h2 {
  font-size: 18px;
  color: #111d2c;
}

.bot-glyph {
  border-radius: 8px;
  background: #101a28;
}

.risk,
.metric,
.pnl-card,
.modal-meta div {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 34, 52, 0.09);
}

.metric span,
.pnl-card div,
.modal-meta span {
  color: #6a7788;
}

.mini-log {
  background: #0c1522;
  border-color: rgba(124, 236, 255, 0.12);
}

.table-wrap {
  border-color: var(--line);
  box-shadow: 0 10px 26px rgba(16, 31, 49, 0.06);
}

table {
  background: rgba(255, 255, 255, 0.82);
}

th {
  color: #344254;
  background: rgba(245, 249, 252, 0.88);
}

.modal-card {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
}

@media (max-width: 940px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .system-strip,
  .live-clock,
  .mode {
    justify-content: start;
  }

  .live-clock {
    width: fit-content;
  }

  .signal-windows {
    grid-template-columns: 1fr;
  }

  .signal-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-pnl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-panel {
    grid-template-columns: 1fr;
  }

  .billing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 16px;
  }

  main {
    width: min(100% - 20px, 1320px);
    margin-top: 12px;
  }

  .side-dock {
    left: 10px;
    top: auto;
    bottom: 12px;
  }

  .side-dock-shell[open] {
    width: calc(100vw - 20px);
  }

  .side-dock-panel {
    max-height: min(74vh, 620px);
  }

  .dock-label {
    display: none;
  }

  .account-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-deck {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    justify-content: stretch;
  }

  .quick-actions button {
    flex: 1 1 120px;
  }

  .ai-panel {
    grid-template-columns: 1fr;
  }

  .ai-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-nav {
    justify-content: start;
  }

  .signal-window {
    min-height: 0;
  }

  .signal-dashboard {
    grid-template-columns: 1fr;
  }

  .signal-pnl-grid {
    grid-template-columns: 1fr;
  }

  .section-start {
    align-items: stretch;
    flex-direction: column;
  }

  .section-actions {
    justify-content: stretch;
  }

  .section-actions button {
    flex: 1 1 180px;
  }

  .panel-head {
    flex-direction: column;
  }

  .pnl-mini {
    grid-template-columns: 1fr;
  }

  .top-notes {
    grid-template-columns: 1fr;
  }

  .billing-grid {
    grid-template-columns: 1fr;
  }
}

/* Final tidy pass */
body::before,
body::after {
  display: none;
}

body {
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(10, 136, 173, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(10, 136, 173, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbfd 0%, #eef5f8 56%, #f8fbfd 100%);
  background-size: 54px 54px, 54px 54px, auto;
}

.topbar {
  grid-template-columns: minmax(280px, 1.4fr) minmax(190px, auto) auto auto auto;
  gap: 14px;
}

.brand-block {
  min-width: 0;
}

.topbar h1,
.topbar p {
  overflow-wrap: anywhere;
}

.system-strip span {
  padding: 6px 9px;
  white-space: nowrap;
}

.page-nav a,
.mode label,
button,
select,
input {
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

button:active {
  transform: translateY(1px);
}

.side-dock {
  left: 0;
  top: 104px;
}

.side-dock-shell > summary {
  width: 40px;
  min-height: 40px;
  border-left: 0;
  border-radius: 0 9px 9px 0;
}

.side-dock-shell[open] > summary {
  box-shadow: 0 12px 26px rgba(5, 8, 13, 0.20);
}

.side-dock-panel {
  margin-left: 10px;
  max-width: min(374px, calc(100vw - 22px));
}

.dock-icon {
  font-size: 0;
}

.dock-icon::before {
  content: "|||";
  display: block;
  transform: rotate(90deg);
  color: #dffaff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
}

.top-notes,
.ai-panel,
.command-deck,
.readiness-panel,
.billing-panel,
.section-start,
.review-panel,
.pnl-panel,
.history-panel,
.admin-panel,
.signals-panel {
  margin-bottom: 16px;
}

.quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-actions button {
  min-width: 96px;
}

.quick-actions .emergency {
  background: #141a24;
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff5f7;
}

.quick-actions .emergency:hover {
  background: #24131a;
}

.signals-panel {
  padding: 18px;
  border-radius: 18px;
  background: #f8fbfd;
  border-color: rgba(15, 34, 52, 0.10);
  box-shadow: 0 18px 46px rgba(16, 31, 49, 0.10);
}

.signals-panel h2 {
  color: var(--ink);
}

.signals-panel p {
  color: var(--muted);
}

.signals-panel .eyebrow {
  color: var(--cyan);
}

.signals-panel .panel-head {
  align-items: center;
}

.signal-windows {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 16px;
}

.signal-window {
  min-height: 0;
  padding: 15px;
  border-radius: 16px;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 253, 0.94));
}

.signal-window-head {
  align-items: flex-start;
}

.signal-window h3 {
  font-size: 22px;
  line-height: 1.12;
}

.signal-window p {
  font-size: 13px;
  line-height: 1.42;
}

.signal-action {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: end;
  gap: 10px;
  padding: 12px;
}

.signal-action span {
  margin-bottom: 0;
}

.signal-action strong {
  text-align: right;
  font-size: clamp(24px, 3vw, 34px);
}

.signal-action.wait {
  border-color: rgba(99, 113, 132, 0.22);
  background: rgba(99, 113, 132, 0.08);
}

.signal-action.wait strong {
  color: #607184;
}

.signal-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(106px, 1fr));
}

.signal-dashboard.waiting-dashboard {
  grid-template-columns: minmax(170px, 1.2fr) minmax(80px, 0.5fr) minmax(110px, 0.7fr);
}

.signal-dashboard div,
.signal-latest {
  padding: 9px;
}

.signal-dashboard strong,
.signal-latest strong {
  font-size: 14px;
}

.signal-pnl {
  padding: 10px;
  border-radius: 11px;
}

.signal-pnl-head {
  margin-bottom: 8px;
}

.signal-pnl-head strong {
  font-size: 18px;
}

.signal-pnl-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.signal-pnl-grid div {
  padding: 7px;
}

.signal-chart {
  padding: 10px;
  border-radius: 13px;
}

.signal-chart svg {
  min-height: 188px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    #02070c;
  background-size: 100% 42px, 64px 100%, auto;
}

.chart-head,
.chart-legend {
  font-size: 11px;
}

.signal-latest {
  background: #f8fbfd;
}

.mini-log-drawer {
  border: 1px solid rgba(15, 34, 52, 0.09);
  border-radius: 10px;
  background: rgba(248, 251, 253, 0.82);
  overflow: hidden;
}

.mini-log-drawer summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 10px;
  color: #314256;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-log-drawer summary::-webkit-details-marker {
  display: none;
}

.mini-log-drawer summary::after {
  content: "Open";
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
}

.mini-log-drawer[open] summary::after {
  content: "Close";
}

.mini-log-drawer .mini-log.visible {
  display: none;
  min-height: 0;
  max-height: 150px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-top: 1px solid rgba(124, 236, 255, 0.12);
  border-radius: 0;
  font-size: 11.5px;
}

.mini-log-drawer[open] .mini-log.visible {
  display: block;
}

.bot .mini-log-drawer[open] .mini-log.visible {
  max-height: 132px;
}

.bot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bot-actions button {
  flex: 1 1 82px;
  min-width: 82px;
  padding: 9px 10px;
  font-size: 13px;
}

.payment-copy-row {
  align-items: stretch;
}

.payment-copy-row .copy-payment {
  min-width: 68px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
  }

  .system-strip {
    display: none;
  }
}

@media (max-width: 940px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .mode,
  .page-nav,
  .quick-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .side-dock {
    left: 0;
    bottom: 10px;
  }

  .signal-action {
    grid-template-columns: 1fr;
  }

  .signal-action strong {
    text-align: left;
  }

  .signal-dashboard,
  .signal-dashboard.waiting-dashboard {
    grid-template-columns: 1fr;
  }

  .quick-actions button,
  .bot-actions button {
    min-width: 0;
  }
}

/* Aesthetic contrast pass */
:root {
  --bg: #e7eef2;
  --panel: rgba(237, 246, 249, 0.92);
  --panel-strong: rgba(231, 241, 245, 0.96);
  --soft-panel: #edf5f8;
  --soft-panel-2: #e4eef3;
  --surface-line: rgba(15, 34, 52, 0.14);
  --surface-line-strong: rgba(10, 136, 173, 0.26);
}

body {
  background:
    linear-gradient(90deg, rgba(7, 17, 29, 0.032) 1px, transparent 1px),
    linear-gradient(0deg, rgba(7, 17, 29, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, #e8f0f4 0%, #dde9ee 48%, #edf4f7 100%);
  background-size: 56px 56px, 56px 56px, auto;
}

main {
  color: #111d2c;
}

.auth-card,
.side-dock-panel,
.command-deck,
.readiness-panel,
.billing-panel,
.review-panel,
.pnl-panel,
.history-panel,
.admin-panel,
.bot,
.verse-card {
  background:
    linear-gradient(180deg, rgba(242, 248, 250, 0.96), rgba(225, 238, 244, 0.91));
  border-color: var(--surface-line);
  box-shadow:
    0 16px 38px rgba(16, 31, 49, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.notice {
  background: #f3ead4;
  border-color: rgba(168, 108, 5, 0.22);
  color: #533803;
}

.auth-card label,
.connect-grid label,
.settings-grid label,
.billing-grid label,
.modal-settings label {
  color: #25384b;
}

input,
select {
  background: #f3f8fa;
  border-color: rgba(15, 34, 52, 0.18);
  color: #111d2c;
}

input:focus,
select:focus {
  border-color: rgba(10, 136, 173, 0.58);
  box-shadow: 0 0 0 3px rgba(10, 136, 173, 0.12);
}

.ai-panel,
.section-start {
  background:
    linear-gradient(135deg, #0b1420 0%, #10293a 62%, #123f4d 100%);
  border-color: rgba(124, 236, 255, 0.18);
  box-shadow: 0 22px 54px rgba(7, 17, 29, 0.22);
}

.account-summary,
.billing-copy,
.readiness-panel > div:first-child,
.review-panel .panel-head,
.pnl-panel .panel-head,
.history-panel > div:first-child {
  color: #101a28;
}

.summary-pills > div,
.readiness-item,
.review-card,
.pnl-card,
.metric,
.modal-meta div,
.payment-destination,
.table-wrap {
  background: rgba(229, 240, 245, 0.82);
  border-color: rgba(15, 34, 52, 0.12);
}

.readiness-item.ok {
  background: rgba(220, 242, 235, 0.86);
  border-color: rgba(18, 132, 95, 0.24);
}

.readiness-item.blocked {
  background: rgba(247, 226, 230, 0.86);
  border-color: rgba(197, 47, 69, 0.24);
}

.tabs {
  background: rgba(226, 238, 244, 0.88);
  border-color: rgba(15, 34, 52, 0.14);
}

.tab:not(.active) {
  color: #22364b;
  background: transparent;
}

.tab.active {
  background: #101a28;
  color: #f4fbff;
}

.bot {
  background:
    linear-gradient(180deg, rgba(239, 247, 250, 0.98), rgba(222, 236, 243, 0.92));
}

.bot::before {
  background: linear-gradient(90deg, #0a88ad, #12845f, #a86c05);
}

.bot-glyph {
  background: #111d2c;
  color: #dffaff;
}

.risk,
.market-pill,
.signal-alert {
  background: rgba(226, 238, 244, 0.82);
  border-color: rgba(15, 34, 52, 0.12);
}

.signals-panel {
  background:
    linear-gradient(180deg, #e6eff3 0%, #dce8ee 100%);
  border-color: rgba(15, 34, 52, 0.16);
  box-shadow:
    0 18px 44px rgba(16, 31, 49, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.signals-panel .panel-head {
  padding: 10px 12px 12px;
  border: 1px solid rgba(15, 34, 52, 0.10);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(16, 26, 40, 0.96), rgba(17, 55, 69, 0.92));
}

.signals-panel h2 {
  color: #f4fbff;
}

.signals-panel p {
  color: rgba(229, 244, 249, 0.76);
}

.signals-panel .eyebrow {
  color: #8df0ff;
}

.signal-window {
  background:
    linear-gradient(180deg, rgba(236, 246, 249, 0.98), rgba(218, 234, 242, 0.94));
  border-color: rgba(15, 34, 52, 0.14);
  box-shadow: 0 18px 42px rgba(10, 25, 40, 0.15);
}

.signal-window.active-signal {
  border-color: rgba(18, 132, 95, 0.42);
  box-shadow: 0 18px 48px rgba(18, 132, 95, 0.15);
}

.paid-signal-lock {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 209, 102, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 28, 42, 0.96), rgba(22, 55, 64, 0.88)),
    #0f1c2a;
  color: #f4fbff;
}

.paid-signal-lock h3 {
  margin: 3px 0 0;
  color: #f4fbff;
}

.paid-signal-lock p {
  max-width: 760px;
  color: rgba(229, 244, 249, 0.74);
}

.locked-signal {
  border-style: dashed;
  border-color: rgba(15, 34, 52, 0.20);
  background:
    linear-gradient(180deg, rgba(226, 238, 244, 0.92), rgba(212, 229, 237, 0.88));
}

.locked-signal .signal-action strong {
  color: #607184;
}

.locked-badge {
  background: #111d2c;
  color: #f4fbff;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(15, 34, 52, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #0f566f;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.secondary-link:hover {
  border-color: rgba(10, 136, 173, 0.38);
  color: #08394d;
}

.signal-action {
  background: rgba(214, 238, 232, 0.90);
  border-color: rgba(18, 132, 95, 0.28);
}

.signal-action.wait {
  background: rgba(221, 232, 238, 0.92);
  border-color: rgba(15, 34, 52, 0.14);
}

.signal-dashboard div,
.signal-latest,
.mini-log-drawer {
  background: rgba(230, 241, 246, 0.88);
  border-color: rgba(15, 34, 52, 0.12);
}

.signal-latest {
  background: rgba(223, 236, 242, 0.88);
}

.signal-pnl {
  background:
    linear-gradient(135deg, rgba(15, 28, 42, 0.98), rgba(13, 49, 57, 0.94));
}

.signal-chart {
  border-color: rgba(117, 255, 179, 0.22);
  box-shadow: 0 16px 36px rgba(7, 17, 29, 0.24);
}

table {
  background: rgba(231, 241, 245, 0.92);
}

th {
  background: rgba(213, 226, 234, 0.96);
  color: #26384b;
}

td {
  background: rgba(235, 244, 247, 0.54);
}

.modal-card {
  background:
    linear-gradient(180deg, #eef6f9, #e1edf3);
  border-color: rgba(15, 34, 52, 0.16);
}

.site-footer {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #526579;
  font-size: 13px;
  font-weight: 750;
}

.site-footer nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.site-footer a,
.legal-back {
  color: #0a6f91;
  text-decoration: none;
  font-weight: 850;
}

.site-footer a:hover,
.legal-back:hover {
  color: #12845f;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 34px auto;
}

.legal-card {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid rgba(15, 34, 52, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(242, 248, 250, 0.98), rgba(225, 238, 244, 0.94));
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin-top: 8px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: 0;
  color: #101a28;
}

.legal-card h2 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 18px;
  color: #101a28;
}

.legal-card p {
  color: #526579;
  line-height: 1.7;
}

.signal-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.signal-dashboard.waiting-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.signals-panel .panel-head h2 {
  color: #f8ffff;
}

.signals-panel .panel-head p {
  color: rgba(236, 247, 249, 0.76);
}

.mode input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: #0c8fa4;
}

.readiness-panel {
  overflow: hidden;
}

.readiness-grid {
  min-width: 0;
}

.readiness-item {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.table-wrap table {
  width: 100%;
}

@media (max-width: 760px) {
  .readiness-panel {
    grid-template-columns: 1fr;
  }

  .readiness-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .readiness-item,
  .review-card {
    width: 100%;
  }

  .table-wrap table {
    min-width: 560px;
  }
}

/* Premium refresh */
:root {
  --bg: #eef4f3;
  --paper: #fbfcfb;
  --paper-soft: #f3f7f6;
  --panel: rgba(251, 252, 251, 0.94);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --text: #09111a;
  --muted: #657181;
  --ink: #09111a;
  --black: #070b10;
  --black-soft: #101720;
  --cyan: #0c8fa4;
  --green: #158463;
  --gold: #bd8d3b;
  --red: #c93a4d;
  --line: rgba(9, 17, 26, 0.10);
  --line-strong: rgba(12, 143, 164, 0.22);
  --shadow: 0 18px 46px rgba(9, 17, 26, 0.10);
  --shadow-strong: 0 28px 80px rgba(9, 17, 26, 0.16);
}

body {
  background:
    linear-gradient(90deg, rgba(9, 17, 26, 0.022) 1px, transparent 1px),
    linear-gradient(0deg, rgba(9, 17, 26, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, #f7faf9 0%, #e9f1f0 42%, #f4f8f7 100%);
  background-size: 72px 72px, 72px 72px, auto;
  color: var(--text);
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", Inter, Arial, sans-serif;
}

main {
  width: min(1400px, calc(100% - 44px));
  margin: 24px auto 42px;
}

.topbar {
  min-height: 82px;
  padding: 15px 30px;
  grid-template-columns: minmax(280px, 1.35fr) minmax(220px, auto) auto auto auto;
  gap: 16px;
  background: #090f17;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 46px rgba(3, 8, 13, 0.26);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border-color: rgba(151, 232, 242, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 34%),
    #0f202a;
  color: #f8ffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 32px rgba(0, 0, 0, 0.26);
}

.topbar h1 {
  font-size: 29px;
  font-weight: 900;
  letter-spacing: 0;
}

.topbar p {
  color: rgba(236, 247, 249, 0.68);
  font-weight: 650;
}

.system-strip span,
.page-nav a,
.mode label,
.live-clock {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.system-strip span {
  color: rgba(244, 251, 252, 0.88);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.page-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  color: rgba(246, 252, 253, 0.88);
}

.page-nav a.active {
  background: #f7fbfb;
  color: #09111a;
  border-color: rgba(247, 251, 251, 0.75);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.live-clock {
  background: #101923;
}

.live-clock strong {
  color: #8eeeff;
  letter-spacing: 0;
}

.mode label {
  border-radius: 10px;
}

.auth-card,
.side-dock-panel,
.notice,
.verse-card,
.command-deck,
.readiness-panel,
.billing-panel,
.review-panel,
.pnl-panel,
.history-panel,
.admin-panel,
.signals-panel,
.bot,
.section-start {
  border: 1px solid rgba(9, 17, 26, 0.095);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 248, 0.93));
  box-shadow:
    0 18px 48px rgba(9, 17, 26, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-card,
.command-deck,
.readiness-panel,
.billing-panel,
.review-panel,
.pnl-panel,
.history-panel,
.admin-panel,
.signals-panel {
  border-radius: 18px;
}

.ai-panel {
  min-height: 164px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, #090f17 0%, #0d1d24 56%, #14392f 100%);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    0 28px 72px rgba(9, 17, 26, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-panel h2 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

.ai-panel p {
  max-width: 760px;
  color: rgba(237, 248, 248, 0.72);
  font-size: 15px;
}

.ai-stats div {
  min-width: 112px;
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.12);
}

.notice {
  background: #fbf5e8;
  border-color: rgba(189, 141, 59, 0.28);
  color: #51380f;
}

.verse-card {
  background:
    linear-gradient(180deg, #101720, #0d141d);
  color: #f8fbfb;
  border-color: rgba(255, 255, 255, 0.11);
}

.verse-card blockquote {
  color: rgba(246, 252, 253, 0.88);
}

.verse-card cite,
.verse-label {
  color: #d9b56e;
}

.account-summary h2,
.billing-copy h2,
.readiness-panel h2,
.panel-head h2,
.section-start h2 {
  color: #09111a;
  letter-spacing: 0;
}

.eyebrow {
  color: var(--cyan);
  letter-spacing: 0.08em;
}

.summary-pills > div,
.readiness-item,
.review-card,
.pnl-card,
.metric,
.modal-meta div,
.payment-destination,
.table-wrap,
.risk,
.market-pill,
.signal-dashboard div,
.signal-latest,
.mini-log-drawer {
  background: rgba(244, 248, 247, 0.92);
  border-color: rgba(9, 17, 26, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.summary-pills > div,
.readiness-item,
.review-card,
.pnl-card,
.metric {
  border-radius: 12px;
}

button,
.secondary-link {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(9, 17, 26, 0.12);
  background:
    linear-gradient(180deg, #101720, #070b10);
  color: #fbffff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(9, 17, 26, 0.14);
}

button:hover,
.secondary-link:hover {
  border-color: rgba(12, 143, 164, 0.36);
  box-shadow: 0 16px 32px rgba(9, 17, 26, 0.18);
  transform: translateY(-1px);
}

button.secondary,
.secondary,
.secondary-link {
  background: #ffffff;
  color: #122131;
}

button.danger,
.danger {
  background:
    linear-gradient(180deg, #d04659, #a82337);
  border-color: rgba(201, 58, 77, 0.36);
  color: #fff;
}

.quick-actions {
  gap: 10px;
}

.quick-actions button {
  min-width: 116px;
}

.quick-actions .emergency {
  background:
    linear-gradient(180deg, #111820, #080c11);
  border-color: rgba(255, 255, 255, 0.14);
}

input,
select {
  min-height: 42px;
  border-radius: 10px;
  background: #fbfdfc;
  border-color: rgba(9, 17, 26, 0.13);
}

.side-dock {
  top: 106px;
}

.side-dock-shell > summary {
  background: #090f17;
  border-color: rgba(255, 255, 255, 0.12);
}

.side-dock-panel {
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 246, 0.96));
}

.menu-card {
  border-radius: 14px;
  background: rgba(246, 250, 249, 0.88);
  border-color: rgba(9, 17, 26, 0.08);
}

.tabs {
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid rgba(9, 17, 26, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 30px rgba(9, 17, 26, 0.08);
}

.tab {
  min-height: 38px;
  border-radius: 10px;
  border: 0;
  box-shadow: none;
}

.tab.active {
  background: #09111a;
  color: #f8ffff;
  box-shadow: 0 10px 22px rgba(9, 17, 26, 0.16);
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}

.bot {
  padding: 18px;
  border-radius: 16px;
  min-height: 260px;
}

.bot::before {
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--gold));
}

.bot::after {
  display: none;
}

.bot h2 {
  font-size: 20px;
  letter-spacing: 0;
}

.bot-glyph {
  width: 32px;
  height: 28px;
  border-radius: 9px;
  background: #09111a;
}

.badge,
.plan-pill,
.health,
.locked-pill {
  border-radius: 999px;
}

.pnl-mini {
  gap: 8px;
}

.metric {
  padding: 10px;
}

.metric strong {
  letter-spacing: 0;
}

.bot-actions {
  gap: 8px;
}

.bot-actions button {
  min-height: 38px;
}

.signals-panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 246, 0.92));
}

.signals-panel .panel-head {
  padding: 18px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, #09111a 0%, #10212b 64%, #12382f 100%);
  border-color: rgba(255, 255, 255, 0.10);
}

.signals-panel h2 {
  font-size: clamp(25px, 3vw, 38px);
}

.signal-windows {
  gap: 18px;
}

.signal-window {
  padding: 18px;
  border-radius: 17px;
  background:
    linear-gradient(180deg, #ffffff, #f1f6f5);
  border-color: rgba(9, 17, 26, 0.10);
  box-shadow: 0 22px 58px rgba(9, 17, 26, 0.13);
}

.signal-window h3 {
  font-size: 24px;
}

.signal-action {
  border-radius: 14px;
  background: #ecf7f2;
}

.signal-action strong {
  letter-spacing: 0;
}

.signal-pnl {
  border-radius: 14px;
  background:
    linear-gradient(135deg, #09111a, #10252b);
}

.signal-chart {
  border-radius: 15px;
  background: #070b10;
}

.signal-chart svg {
  border-radius: 12px;
}

.chart-head,
.chart-legend {
  color: rgba(246, 252, 253, 0.82);
}

.paid-signal-lock {
  border-radius: 16px;
  background:
    linear-gradient(135deg, #09111a, #10252b);
}

.review-card.strong {
  background:
    linear-gradient(135deg, #09111a, #10252b);
}

.site-footer {
  padding-top: 8px;
  color: #667485;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
  }

  .system-strip {
    display: none;
  }

  .page-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 24px, 1400px);
    margin-top: 16px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .live-clock,
  .mode,
  .page-nav {
    justify-content: flex-start;
  }

  .page-nav a,
  .mode label,
  .quick-actions button,
  .bot-actions button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .ai-panel,
  .command-deck,
  .section-start,
  .panel-head,
  .paid-signal-lock {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1 1 100%;
  }
}

/* Device polish: laptop, tablet, phone */
.signals-panel .panel-head h2 {
  color: #f8ffff;
}

.signals-panel .panel-head p {
  color: rgba(236, 247, 249, 0.78);
}

.mode input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: 0 0 auto;
  accent-color: #0c8fa4;
}

.readiness-panel,
.billing-panel,
.review-panel,
.pnl-panel,
.history-panel,
.admin-panel {
  overflow: hidden;
}

.readiness-grid,
.review-grid,
.pnl-grid,
.billing-grid {
  min-width: 0;
}

.readiness-item,
.review-card,
.pnl-card,
.metric,
.bot,
.signal-window {
  min-width: 0;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.table-wrap table {
  width: 100%;
}

@media (min-width: 1181px) and (max-width: 1480px) {
  main {
    width: min(100% - 36px, 1360px);
  }

  .topbar {
    grid-template-columns: minmax(260px, 1.15fr) minmax(190px, auto) auto auto;
  }

  .system-strip {
    max-width: 440px;
  }

  .system-strip span {
    font-size: 10.5px;
  }

  .live-clock {
    min-width: 116px;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(292px, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  main {
    width: min(100% - 32px, 1040px);
  }

  .topbar {
    grid-template-columns: minmax(280px, 1fr) auto auto;
    align-items: start;
  }

  .page-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .mode {
    justify-content: flex-start;
  }

  .top-notes,
  .command-deck,
  .readiness-panel,
  .billing-panel {
    grid-template-columns: 1fr;
  }

  .ai-panel {
    grid-template-columns: 1fr;
  }

  .ai-stats {
    justify-content: flex-start;
  }

  .signal-windows {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background-size: 48px 48px, 48px 48px, auto;
  }

  .topbar {
    gap: 14px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .page-nav {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .page-nav a {
    width: 100%;
    justify-content: center;
  }

  .live-clock {
    width: 100%;
  }

  .mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .mode span {
    grid-column: 1 / -1;
  }

  .mode label {
    justify-content: center;
    min-height: 44px;
  }

  .side-dock {
    top: 122px;
  }

  .top-notes,
  .command-deck,
  .readiness-panel,
  .billing-panel,
  .section-start,
  .panel-head,
  .paid-signal-lock {
    grid-template-columns: 1fr;
  }

  .command-deck,
  .section-start,
  .panel-head,
  .paid-signal-lock {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-actions,
  .section-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .quick-actions button,
  .section-actions button,
  .bot-actions button {
    width: 100%;
  }

  .ai-panel {
    padding: 18px;
  }

  .ai-panel h2 {
    font-size: 34px;
  }

  .ai-stats {
    grid-template-columns: 1fr;
  }

  .readiness-grid,
  .review-grid,
  .pnl-grid,
  .signal-windows,
  .signal-dashboard,
  .signal-dashboard.waiting-dashboard,
  .signal-pnl-grid,
  .billing-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .bot,
  .signal-window,
  .signals-panel,
  .auth-card,
  .command-deck,
  .readiness-panel,
  .billing-panel,
  .review-panel,
  .pnl-panel,
  .history-panel,
  .admin-panel {
    border-radius: 15px;
  }

  .signal-action {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .signal-action strong {
    text-align: left;
    font-size: 30px;
  }

  .signal-chart svg {
    min-height: 170px;
  }

  .table-wrap table {
    min-width: 560px;
  }
}

@media (max-width: 430px) {
  main {
    width: calc(100% - 20px);
  }

  .topbar {
    padding: 14px 12px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .topbar p {
    font-size: 13px;
  }

  .ai-panel h2 {
    font-size: 30px;
  }

  .signals-panel,
  .signal-window,
  .bot {
    padding: 14px;
  }

  .signal-window h3 {
    font-size: 22px;
  }
}

/* Final responsive polish */
@media (min-width: 1181px) and (max-width: 1480px) {
  .topbar {
    grid-template-columns: minmax(300px, 1fr) auto auto auto;
    min-height: 92px;
    padding-block: 14px;
  }

  .system-strip {
    display: none;
  }

  .page-nav {
    grid-column: auto;
  }

  .mode {
    justify-content: end;
    flex-wrap: nowrap;
  }

  .side-dock {
    top: auto;
    bottom: 18px;
    left: 16px;
    z-index: 45;
  }

  .side-dock-shell,
  .side-dock-shell[open] {
    width: 46px;
  }

  .side-dock-shell > summary {
    border-radius: 14px;
  }

  .side-dock-panel {
    position: absolute;
    left: 0;
    bottom: 58px;
    width: min(380px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 110px));
    margin-top: 0;
  }
}

.signal-window > p,
.signal-window-head p,
.signal-window .signal-meta,
.signal-window .signal-subtitle {
  color: #657587;
}

@media (max-width: 1180px) {
  .side-dock {
    top: auto;
    bottom: 16px;
    left: 12px;
    z-index: 45;
  }

  .side-dock-shell,
  .side-dock-shell[open] {
    width: 46px;
  }

  .side-dock-shell > summary {
    border-radius: 14px;
  }

  .side-dock-panel {
    position: absolute;
    left: 0;
    bottom: 58px;
    width: min(380px, calc(100vw - 24px));
    max-height: min(680px, calc(100vh - 96px));
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding-bottom: 14px;
  }

  .page-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-nav a {
    min-height: 42px;
    padding-inline: 6px;
  }

  .mode {
    grid-template-columns: auto 1fr 1fr;
    align-items: center;
  }

  .mode span {
    grid-column: auto;
  }

  .mode label {
    align-items: center;
  }

  .site-footer {
    padding-bottom: 72px;
  }
}

/* Market-grade color pass */
:root {
  --bg: #eef5f1;
  --paper: #fffdf7;
  --paper-soft: #f4f8f3;
  --panel: rgba(255, 253, 247, 0.96);
  --panel-strong: rgba(255, 255, 252, 0.99);
  --text: #08111b;
  --muted: #566575;
  --ink: #08111b;
  --black: #03070d;
  --black-soft: #08111b;
  --cyan: #008da3;
  --green: #0b8a62;
  --gold: #c08a21;
  --red: #d33c56;
  --violet: #5b5ee8;
  --line: rgba(8, 17, 27, 0.13);
  --line-strong: rgba(0, 141, 163, 0.35);
  --shadow: 0 20px 54px rgba(8, 17, 27, 0.13);
  --shadow-strong: 0 34px 90px rgba(8, 17, 27, 0.24);
}

body {
  background:
    linear-gradient(90deg, rgba(8, 17, 27, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(8, 17, 27, 0.026) 1px, transparent 1px),
    linear-gradient(135deg, rgba(0, 141, 163, 0.10) 0%, transparent 28%, rgba(192, 138, 33, 0.09) 62%, transparent 82%),
    linear-gradient(180deg, #f7fbf6 0%, #e7f0ec 46%, #f6f7ef 100%);
  background-size: 64px 64px, 64px 64px, auto, auto;
}

body::before {
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(0, 141, 163, 0.075) 18% 18.18%, transparent 18.18% 58%, rgba(192, 138, 33, 0.07) 58% 58.18%, transparent 58.18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.60), transparent 45%, rgba(214, 230, 224, 0.28));
}

body::after {
  opacity: 0.30;
  background-image:
    linear-gradient(90deg, transparent 0 49.75%, rgba(0, 141, 163, 0.09) 49.75% 50%, transparent 50%),
    linear-gradient(0deg, transparent 0 49.75%, rgba(8, 17, 27, 0.05) 49.75% 50%, transparent 50%);
}

.topbar {
  background:
    linear-gradient(90deg, #03070d 0%, #071320 50%, #0b2b31 100%);
  border-bottom-color: rgba(76, 238, 255, 0.20);
  box-shadow: 0 18px 52px rgba(3, 7, 13, 0.34);
}

.brand-mark {
  border-color: rgba(255, 207, 102, 0.38);
  background:
    linear-gradient(145deg, rgba(76, 238, 255, 0.18), transparent 36%),
    linear-gradient(180deg, #102733, #07111c);
  color: #fff7dc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(76, 238, 255, 0.08),
    0 16px 34px rgba(0, 0, 0, 0.32);
}

.system-strip span,
.page-nav a,
.mode label,
.live-clock {
  border-color: rgba(127, 233, 244, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.page-nav a.active {
  background: #eaffff;
  color: #06101a;
  border-color: rgba(127, 233, 244, 0.72);
}

.live-clock {
  background: #0a1925;
}

.live-clock strong,
.signals-panel .panel-head .eyebrow {
  color: #7ff2ff;
}

.auth-card,
.side-dock-panel,
.notice,
.verse-card,
.command-deck,
.readiness-panel,
.billing-panel,
.review-panel,
.pnl-panel,
.history-panel,
.admin-panel,
.signals-panel,
.bot,
.section-start {
  border-color: rgba(8, 17, 27, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.98), rgba(247, 250, 243, 0.95));
  box-shadow:
    0 22px 58px rgba(8, 17, 27, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.ai-panel,
.signals-panel .panel-head,
.paid-signal-lock,
.review-card.strong {
  background:
    linear-gradient(135deg, #03070d 0%, #0a1826 48%, #0b3234 100%);
  border-color: rgba(127, 233, 244, 0.18);
  box-shadow:
    0 30px 82px rgba(8, 17, 27, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.ai-panel h2,
.signals-panel .panel-head h2 {
  color: #fffdf2;
}

.ai-panel p,
.signals-panel .panel-head p {
  color: rgba(235, 250, 250, 0.77);
}

.notice {
  background: #fff3cc;
  border-color: rgba(192, 138, 33, 0.36);
  color: #604112;
}

.verse-card {
  background:
    linear-gradient(180deg, #0d151f, #070b12);
  border-color: rgba(255, 207, 102, 0.20);
}

.verse-card::before,
.bot::before {
  background: linear-gradient(180deg, #7ff2ff, #0b8a62 48%, #ffcf66);
}

.eyebrow,
.account-summary h2 + p strong,
.balance-live,
.plan-status {
  color: var(--cyan);
}

button,
.secondary-link {
  background:
    linear-gradient(180deg, #0b2532, #050a11);
  border-color: rgba(8, 17, 27, 0.20);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(8, 17, 27, 0.20);
}

button:hover,
.secondary-link:hover {
  border-color: rgba(0, 141, 163, 0.52);
  box-shadow: 0 18px 36px rgba(8, 17, 27, 0.24);
}

button.secondary,
.secondary,
.secondary-link {
  background: #fffefa;
  color: #101720;
  border-color: rgba(8, 17, 27, 0.16);
}

button.deriv-button,
button.danger,
.danger {
  background: linear-gradient(180deg, #e04a63, #ab203a);
  border-color: rgba(211, 60, 86, 0.40);
}

input,
select,
.summary-pills > div,
.readiness-item,
.review-card,
.pnl-card,
.metric,
.modal-meta div,
.payment-destination,
.table-wrap,
.risk,
.market-pill,
.signal-dashboard div,
.signal-latest,
.mini-log-drawer {
  background: rgba(255, 253, 247, 0.88);
  border-color: rgba(8, 17, 27, 0.12);
}

.tabs {
  background: rgba(255, 253, 247, 0.90);
  border-color: rgba(8, 17, 27, 0.14);
}

.tab.active {
  background:
    linear-gradient(180deg, #0b2532, #050a11);
  color: #fffdf2;
}

.bot {
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.99), rgba(243, 249, 244, 0.96));
}

.bot-glyph {
  background: linear-gradient(180deg, #0b2532, #050a11);
}

.signal-window {
  background:
    linear-gradient(180deg, #fffefa, #eef7f0);
  border-color: rgba(8, 17, 27, 0.15);
}

.signal-window.active-signal {
  border-color: rgba(11, 138, 98, 0.52);
  box-shadow:
    0 24px 64px rgba(8, 17, 27, 0.18),
    0 0 0 1px rgba(11, 138, 98, 0.20) inset;
}

.signal-action {
  background:
    linear-gradient(180deg, #dff8ec, #c8f0df);
  border: 1px solid rgba(11, 138, 98, 0.20);
}

.signal-action.wait {
  background:
    linear-gradient(180deg, #eef3f0, #e1e9e6);
  border-color: rgba(8, 17, 27, 0.11);
}

.signal-pnl,
.signal-chart {
  background:
    linear-gradient(180deg, #050a11, #010408);
  border-color: rgba(127, 233, 244, 0.16);
}

.chart-head,
.chart-legend {
  color: rgba(239, 255, 252, 0.82);
}

.site-footer {
  color: #4d5d6d;
}
