:root {
  --bg: #05080d;
  --panel: #0e1621;
  --panel-2: #111c28;
  --line: #29415c;
  --text: #e9f2ff;
  --muted: #8da2bd;
  --blue: #4a91ff;
  --green: #10c98a;
  --red: #ef4056;
  --amber: #f6b941;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
a { color: #75aaff; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 18px 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(210, 151, 31, 0.16), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(120, 77, 12, 0.18), transparent 48%),
    #030303;
}
.auth-shell {
  width: min(100%, 520px);
  display: grid;
  gap: 16px;
}
.auth-logo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 8px;
}
.auth-page .auth-panel {
  background: linear-gradient(180deg, rgba(13, 13, 12, 0.96), rgba(5, 5, 5, 0.98));
  border-color: rgba(227, 173, 62, 0.52);
  box-shadow: 0 0 0 1px rgba(255, 229, 139, 0.08), 0 24px 70px rgba(0, 0, 0, 0.62);
}
.auth-page .auth-panel h2 {
  color: #f6d36f;
  text-align: center;
  text-shadow: 0 0 18px rgba(246, 179, 57, 0.28);
}
.auth-page label {
  color: #e2b84c;
}
.auth-page input,
.auth-page select,
.auth-page textarea {
  border-color: rgba(218, 162, 44, 0.58);
  background: #030303;
  color: #fff5d6;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 157, 0.05);
}
.auth-page input:focus,
.auth-page select:focus,
.auth-page textarea:focus {
  border-color: #f3c75c;
  outline: 2px solid rgba(243, 199, 92, 0.2);
}
.auth-page .primary-btn {
  background: linear-gradient(180deg, #f6d46c, #b87513 58%, #704305);
  color: #070707;
  border: 1px solid #ffe58f;
  box-shadow: 0 0 22px rgba(225, 160, 36, 0.24);
}
.auth-page .primary-btn:hover {
  filter: brightness(1.08);
}
.auth-page a {
  color: #f3c75c;
}
.auth-page .flash {
  background: #090806;
  border-color: rgba(227, 173, 62, 0.52);
  color: #fff0bf;
}
.auth-page .flash.error {
  border-color: #9d2b22;
  color: #ffd8d3;
}
.auth-page .flash.info {
  border-color: #b88321;
}
.password-rules {
  color: #cda956;
  font-size: 12px;
  line-height: 1.35;
  margin: -4px 0 0;
}
.onboarding-note {
  border: 1px solid rgba(227, 173, 62, 0.42);
  border-radius: 8px;
  background: rgba(227, 173, 62, 0.08);
  color: #f2d27b;
  font-size: 12px;
  line-height: 1.45;
  margin: -4px 0 16px;
  padding: 10px 12px;
}
.field-error {
  color: #ffd8d3;
  font-size: 12px;
  margin-top: -8px;
}
.shell-badge, .feature-row span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #09111c;
  color: #c9dcf6;
  font-size: 12px;
  font-weight: 800;
}
.feature-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.auth-panel, .content-panel, .trade-card, .saved-alerts, .auto-panel, .admin-inline {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.auth-panel { padding: 26px; }
.auth-panel h2, .content-panel h2 { margin: 0 0 18px; }
.section-title { margin-top: 24px !important; }
.stack { display: grid; gap: 14px; }
label { color: #b8c9df; font-size: 12px; font-weight: 800; text-transform: uppercase; }
input, select, textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #314b67;
  border-radius: 6px;
  background: #080f18;
  color: var(--text);
  padding: 11px 12px;
}
.check-row { display: flex; align-items: center; gap: 8px; text-transform: none; }
.check-row input { width: auto; margin: 0; }
.primary-btn, .green-btn, .gray-btn, .confirm-btn, .reject-btn, .exit-btn {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.primary-btn, .green-btn, .confirm-btn { background: #0d7144; color: #d9ffe9; }
.gray-btn { background: #263142; color: #d7e4f5; }
.button-link { display: inline-block; }
.compact-btn { padding: 7px 10px; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.reject-btn { background: #7d1d25; color: #ffd7dc; }
.exit-btn { background: #87610d; color: #070707; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; }
.flash-stack { display: grid; gap: 8px; margin-bottom: 14px; }
.flash { border: 1px solid var(--line); border-radius: 6px; padding: 10px; color: #dbeafe; background: #0a1220; }
.flash.error { border-color: #7d2633; color: #ffd7dc; }
.flash.info { border-color: #2c5d8f; }
.muted { color: var(--muted); }

.gmp-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 22px 18px 48px;
}
.gmp-page.narrow { max-width: 720px; }
.admin-page { max-width: 1120px; }
.gmp-header { text-align: center; position: relative; }
.gmp-header h1 { margin: 0; font-size: 24px; line-height: 1; }
.gmp-header p { margin: 3px 0 10px; color: #9ab8f7; font-size: 10px; font-weight: 900; }
.tab-strip { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 780px; margin: 0 auto 14px; }
.tab-strip a {
  border: 1px solid #203a59;
  background: #101b29;
  color: #e9f2ff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 900;
}
.tab-strip a.active { background: #1263d8; }
.user-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px auto 16px;
  max-width: 820px;
}
.user-nav form { margin: 0; }
.user-nav a,
.user-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d7dde8;
  text-decoration: none;
  background: #111821;
  border: 1px solid #27313d;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  min-height: 37px;
  white-space: nowrap;
  cursor: pointer;
}
.user-nav a.active {
  background: #2563eb;
  color: white;
  border-color: #3b82f6;
}
.status-pill {
  max-width: 650px;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  background: #101923;
  border-radius: 999px;
  padding: 10px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}
.danger-pill {
  display: block;
  margin: 0 auto 8px;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 900;
}
.micro-center, .small-line, .next-chain {
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  color: #dbe8ff;
}
.auto-panel {
  max-width: 650px;
  margin: 8px auto 12px;
  padding: 12px;
  text-align: center;
}
.mode-bar {
  border: 1px solid #537093;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 900;
}
.max-profit {
  display: inline-grid;
  gap: 4px;
  color: var(--amber);
  font-size: 10px;
}
.max-profit select { min-width: 160px; }
.button-row, .decision-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}
.button-row form, .decision-row form { margin: 0; }
.button-row button, .decision-row button { width: 100%; }
.next-chain { color: #4f91ff; margin-top: 10px; }
.balance-line {
  text-align: center;
  color: #ffd15b;
  font-size: 28px;
  font-weight: 900;
  margin: 8px 0 14px;
}
.trade-card {
  padding: 16px;
}
.trade-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 43px;
  border-bottom: 1px solid #213348;
}
.trade-row span, .meter-title span {
  color: #b9d7ff;
  font-size: 11px;
  font-weight: 900;
}
.trade-row strong {
  color: #6aa3ff;
  font-size: 15px;
  text-align: right;
}
.trade-row .wait { color: var(--amber); font-size: 26px; }
.positive { color: #6bffb1 !important; }
.negative { color: #ff5970 !important; }
.warn { color: #ffd15b !important; }
.meter-block {
  padding: 12px 0;
  border-bottom: 1px solid #213348;
}
.meter-title, .meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 900;
}
.meter {
  height: 20px;
  border-radius: 999px;
  margin: 8px 0;
  background: linear-gradient(90deg, #57dc8f, #dfe56f, #ff9b23, #ff3c4f);
}
.meter-labels { color: #bfe0ff; }
.meter-value { color: #dbe8ff; font-weight: 900; margin-top: 6px; }
.protection strong { color: #4f91ff; font-size: 24px; max-width: 310px; }
.saved-alerts {
  margin-top: 18px;
  padding: 16px;
}
.saved-alerts h2 {
  font-size: 12px;
  color: #b9d7ff;
  margin: 0 0 8px;
}
.admin-inline, .content-panel { margin-top: 18px; padding: 18px; }
.admin-inline div, .kv, .status-list div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #213348;
  padding: 10px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.stats-grid div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.stats-grid span { display: block; color: var(--muted); font-size: 12px; }
.stats-grid strong { font-size: 28px; color: #ffd15b; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid #213348; padding: 10px; text-align: left; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-actions button {
  background: #15263a;
  color: #dbe8ff;
  border: 1px solid #2f4c68;
  border-radius: 6px;
  padding: 7px 9px;
}
.table-actions .danger-table-btn, .danger-btn {
  background: #7d1d25;
  color: #ffd7dc;
  border: 1px solid #b42334;
}
.table-note {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.danger-zone {
  border-color: #7d2633;
}
.danger-zone h2 {
  color: #ffd7dc;
}
.danger-btn {
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 11px 16px;
}
.top-space { margin-top: 16px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 760px) {
  .auth-page { padding: 10px 14px 22px; }
  .auth-shell { gap: 12px; }
  .auth-logo { width: 100%; }
  .button-row, .decision-row, .stats-grid { grid-template-columns: 1fr; }
  .balance-line { font-size: 22px; }
  .trade-row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .trade-row strong { text-align: left; }
  .protection strong { font-size: 18px; }
}
