/* --- Variables --- */
:root {
  --bg: #090d16;
  --bg-2: #0d1322;
  --surface: #161d2b;
  --surface-2: #1b2436;
  --surface-glass: rgba(22, 29, 43, 0.72);
  --border: #2a3446;
  --border-soft: rgba(148, 163, 184, 0.14);
  --text: #e9eef7;
  --text-muted: #93a1b8;
  --text-faint: #6b7a90;
  --buy: #3fb950;
  --buy-hover: #56d364;
  --sell: #f85149;
  --sell-hover: #ff7b72;
  --prop-accent: #58a6ff;
  --real-accent: #a371f7;

  --grad-buy: linear-gradient(135deg, #3fb950, #2ea043);
  --grad-sell: linear-gradient(135deg, #f85149, #da3633);
  --grad-prop: linear-gradient(135deg, #58a6ff, #4184e4);
  --grad-real: linear-gradient(135deg, #a371f7, #8957e5);
  --grad-brand: linear-gradient(120deg, #58a6ff 10%, #a371f7 90%);

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(2, 6, 16, 0.45);
  --shadow-soft: 0 4px 16px rgba(2, 6, 16, 0.35);
  --glow-prop: 0 6px 22px rgba(88, 166, 255, 0.28);
  --glow-buy: 0 6px 22px rgba(63, 185, 80, 0.26);
  --glow-sell: 0 6px 22px rgba(248, 81, 73, 0.26);

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
}

* {
  box-sizing: border-box;
}

::selection {
  background: rgba(88, 166, 255, 0.32);
  color: #fff;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Trading-themed backdrop: ambient glows + chart grid + candlestick/line chart band */
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 55% at 12% -10%, rgba(88, 166, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 75% 50% at 95% 0%, rgba(163, 113, 247, 0.12), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='340' viewBox='0 0 1440 340'%3E%3Cg stroke='%238b949e' stroke-width='2.4' stroke-opacity='0.12'%3E%3Cline x1='120' y1='150' x2='120' y2='250'/%3E%3Cline x1='250' y1='120' x2='250' y2='232'/%3E%3Cline x1='380' y1='158' x2='380' y2='262'/%3E%3Cline x1='560' y1='96' x2='560' y2='210'/%3E%3Cline x1='690' y1='128' x2='690' y2='236'/%3E%3Cline x1='880' y1='80' x2='880' y2='196'/%3E%3Cline x1='1030' y1='120' x2='1030' y2='226'/%3E%3Cline x1='1210' y1='70' x2='1210' y2='188'/%3E%3C/g%3E%3Cg stroke-width='0'%3E%3Crect x='108' y='170' width='24' height='58' rx='3' fill='%233fb950' fill-opacity='0.13'/%3E%3Crect x='238' y='150' width='24' height='48' rx='3' fill='%23f85149' fill-opacity='0.13'/%3E%3Crect x='368' y='182' width='24' height='52' rx='3' fill='%233fb950' fill-opacity='0.13'/%3E%3Crect x='548' y='120' width='24' height='60' rx='3' fill='%233fb950' fill-opacity='0.13'/%3E%3Crect x='678' y='150' width='24' height='50' rx='3' fill='%23f85149' fill-opacity='0.13'/%3E%3Crect x='868' y='104' width='24' height='62' rx='3' fill='%233fb950' fill-opacity='0.13'/%3E%3Crect x='1018' y='150' width='24' height='46' rx='3' fill='%23f85149' fill-opacity='0.13'/%3E%3Crect x='1198' y='94' width='24' height='64' rx='3' fill='%233fb950' fill-opacity='0.13'/%3E%3C/g%3E%3Cpath d='M0,238 C150,196 250,250 380,208 S650,150 800,182 S1060,120 1210,150 1350,126 1440,140' fill='none' stroke='%2358a6ff' stroke-width='2.5' stroke-opacity='0.2'/%3E%3C/svg%3E"),
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat;
  background-position: 0 0, 0 0, center bottom, 0 0, 0 0;
  background-size: auto, auto, 100% auto, 48px 48px, 48px 48px;
}

/* Custom scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
  background-clip: content-box;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 1.5rem;
  align-items: start;
}

.main {
  min-width: 0;
}

/* --- Header --- */
.header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 1.5rem 1.5rem 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.header-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  margin: 0 auto 0.5rem;
  text-align: center;
  width: 100%;
}

/* Vector mark: bull + candles (inline SVG, viewBox 56×48). */
.header-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(3.1rem, 9vw, 3.9rem);
  height: auto;
  aspect-ratio: 56 / 48;
  max-width: 100%;
}

.header-mark-svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.header-titles {
  min-width: 0;
  flex: 0 1 auto;
  text-align: center;
}

.header-titles h1,
.header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

@supports (-webkit-background-clip: text) {
  .header-titles h1,
  .header > .header-brand h1 {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.subtitle,
.header-titles .subtitle {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}


.sltp-config-line {
  margin: 0.65rem auto 0;
  max-width: 52rem;
  padding: 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.sltp-config-refresh-wrap {
  margin: 0.35rem 0 0;
  text-align: center;
}

.btn-link-sltp-refresh {
  background: none;
  border: none;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  color: var(--prop-accent);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.btn-link-sltp-refresh:hover {
  color: var(--text);
}

.header-auth {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.header-user {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
}

.header-user:empty {
  display: none;
}

.btn-link-create-user {
  display: inline-block;
  padding: 0.42rem 0.85rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--prop-accent);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn-link-create-user:hover {
  background: rgba(88, 166, 255, 0.2);
  border-color: rgba(88, 166, 255, 0.55);
  transform: translateY(-1px);
}

.btn-logout-header {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.42rem 0.85rem;
  font-size: 0.87rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-logout-header:hover {
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.4);
  color: var(--sell-hover);
}

/* Links under the login card back to the rest of the site */
.auth-links {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-links a {
  color: var(--prop-accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links-sep {
  margin: 0 0.5rem;
}

/* --- Login / Admin auth pages --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)), var(--surface-glass);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-form {
  margin-bottom: 1rem;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-field input {
  width: 100%;
  padding: 0.68rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(9, 13, 22, 0.6);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-field input::placeholder {
  color: var(--text-faint);
}

.auth-field input:focus {
  outline: none;
  border-color: var(--prop-accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.18);
  background: rgba(9, 13, 22, 0.85);
}

.auth-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-error {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--sell);
}

.auth-success {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--buy);
}

.auth-success.auth-warning {
  color: #d4a72c;
}

.auth-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.btn-login {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  background: var(--grad-prop);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--glow-prop);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.btn-login:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* Admin portal — create user card */
.admin-card {
  max-width: 560px;
}

.admin-card .auth-subtitle {
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.admin-users-section {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-soft);
}

.admin-users-title {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-users-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.admin-users-empty {
  list-style: none;
  padding: 0.85rem 1rem;
  color: var(--text-faint);
  font-style: italic;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(9, 13, 22, 0.3);
}

.admin-tier-access {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
  margin: 0;
  background: rgba(9, 13, 22, 0.35);
}

.admin-tier-access-legend {
  padding: 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.admin-tier-access-hint {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.admin-tier-checkboxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

@media (max-width: 400px) {
  .admin-tier-checkboxes {
    grid-template-columns: 1fr;
  }
}

.admin-tier-cb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(9, 13, 22, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.admin-tier-cb:hover {
  border-color: rgba(88, 166, 255, 0.45);
  background: rgba(88, 166, 255, 0.07);
}

.admin-tier-cb:has(input:checked) {
  border-color: var(--prop-accent);
  background: rgba(88, 166, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.3);
}

.admin-tier-cb input {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  accent-color: var(--prop-accent);
  cursor: pointer;
}

.admin-user-row {
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: rgba(9, 13, 22, 0.4);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.admin-user-name-line {
  font-weight: 700;
  color: var(--text);
  margin-right: 0.3rem;
}

.admin-user-email {
  font-size: 0.88rem;
  color: var(--prop-accent);
}

.admin-user-tiers {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-soft);
}

.admin-actions .btn-outline {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--prop-accent);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.admin-actions .btn-outline:hover {
  background: rgba(88, 166, 255, 0.2);
  border-color: rgba(88, 166, 255, 0.55);
  transform: translateY(-1px);
}

.btn-logout {
  padding: 0.5rem 0.95rem;
  font-size: 0.87rem;
  font-weight: 600;
  font-family: inherit;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-logout:hover {
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.4);
  color: var(--sell-hover);
}

/* --- Create user page (full-width dashboard look) --- */
.admin-create-page {
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.25rem 3.5rem;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(88, 166, 255, 0.12), transparent 52%),
    radial-gradient(ellipse 90% 55% at 100% 20%, rgba(163, 113, 247, 0.08), transparent 48%),
    radial-gradient(ellipse 70% 45% at 0% 90%, rgba(63, 185, 80, 0.06), transparent 42%),
    var(--bg);
}

.admin-create-wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}

.admin-create-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.admin-create-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.admin-create-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.22), rgba(163, 113, 247, 0.22));
  border: 1px solid rgba(88, 166, 255, 0.35);
  color: var(--prop-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(88, 166, 255, 0.18);
}

.admin-create-mark svg {
  display: block;
}

.admin-create-brand-text {
  min-width: 0;
}

.admin-create-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

@supports (-webkit-background-clip: text) {
  .admin-create-title {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.admin-create-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-create-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Colour-coded "popping" nav buttons */
.admin-create-nav .btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.05rem;
  font-size: 0.87rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, color 0.15s ease;
}

.admin-create-nav .btn-nav:hover {
  transform: translateY(-1px);
}

.admin-create-nav .btn-nav:active {
  transform: translateY(0);
}

.admin-create-nav .btn-nav--blue {
  color: #bcd8ff;
  background: rgba(88, 166, 255, 0.16);
  border-color: rgba(88, 166, 255, 0.45);
  box-shadow: 0 2px 10px rgba(88, 166, 255, 0.16);
}

.admin-create-nav .btn-nav--blue:hover {
  color: #e6f0ff;
  background: rgba(88, 166, 255, 0.28);
  border-color: rgba(88, 166, 255, 0.7);
  box-shadow: 0 6px 18px rgba(88, 166, 255, 0.32);
}

.admin-create-nav .btn-nav--violet {
  color: #d3c2ff;
  background: rgba(163, 113, 247, 0.16);
  border-color: rgba(163, 113, 247, 0.45);
  box-shadow: 0 2px 10px rgba(163, 113, 247, 0.16);
}

.admin-create-nav .btn-nav--violet:hover {
  color: #efe7ff;
  background: rgba(163, 113, 247, 0.28);
  border-color: rgba(163, 113, 247, 0.7);
  box-shadow: 0 6px 18px rgba(163, 113, 247, 0.32);
}

.admin-create-nav .btn-nav--green {
  color: #86efac;
  background: rgba(63, 185, 80, 0.16);
  border-color: rgba(63, 185, 80, 0.45);
  box-shadow: 0 2px 10px rgba(63, 185, 80, 0.16);
}

.admin-create-nav .btn-nav--green:hover {
  color: #c3f7d5;
  background: rgba(63, 185, 80, 0.28);
  border-color: rgba(63, 185, 80, 0.7);
  box-shadow: 0 6px 18px rgba(63, 185, 80, 0.32);
}

.admin-create-nav .btn-nav--red {
  color: #ffb0ab;
  background: rgba(248, 81, 73, 0.16);
  border-color: rgba(248, 81, 73, 0.45);
  box-shadow: 0 2px 10px rgba(248, 81, 73, 0.16);
}

.admin-create-nav .btn-nav--red:hover {
  color: #ffd6d3;
  background: rgba(248, 81, 73, 0.28);
  border-color: rgba(248, 81, 73, 0.7);
  box-shadow: 0 6px 18px rgba(248, 81, 73, 0.32);
}

.admin-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .admin-create-grid {
    grid-template-columns: 1fr;
  }
}

.admin-create-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

.admin-create-panel-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-create-panel-title::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: 0 0 auto;
  background: var(--grad-prop);
  box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
}

.admin-create-form {
  margin-bottom: 0;
}

.admin-create-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 520px) {
  .admin-create-field-row {
    grid-template-columns: 1fr;
  }
}

.admin-create-users .admin-users-list {
  font-size: 0.92rem;
}

/* Admin portal (users, trading & login history) */
.admin-portal-page {
  align-items: flex-start;
  padding: 2rem 1rem 3.5rem;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(88, 166, 255, 0.14), transparent 52%),
    radial-gradient(ellipse 90% 55% at 100% 30%, rgba(163, 113, 247, 0.08), transparent 48%),
    radial-gradient(ellipse 70% 45% at 0% 85%, rgba(63, 185, 80, 0.07), transparent 42%),
    var(--bg);
}

.admin-portal-wrap {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.admin-portal-shell {
  max-width: min(1200px, 100%);
}

.admin-portal-hero {
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 0 0.25rem;
}

.admin-portal-hero .auth-title {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

@supports (-webkit-background-clip: text) {
  .admin-portal-hero .auth-title {
    background: linear-gradient(135deg, #f0f3f6 12%, #58a6ff 55%, #a371f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.admin-portal-lead {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.admin-portal-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.admin-portal-stat {
  min-width: 7.5rem;
  padding: 0.85rem 1.15rem;
  background: rgba(22, 27, 34, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.admin-portal-stat-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(180deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (-webkit-background-clip: text) {
  .admin-portal-stat-value {
    color: var(--text);
    background: none;
  }
}

.admin-portal-stat-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.admin-portal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.admin-portal-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.admin-portal-toolbar-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.9;
}

.admin-portal-toolbar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-portal-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.admin-portal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.admin-portal-tab:hover {
  color: var(--prop-accent);
  border-color: rgba(88, 166, 255, 0.5);
  background: rgba(88, 166, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-portal-tab:focus-visible {
  outline: 2px solid var(--prop-accent);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .admin-portal-toolbar-actions {
    align-items: flex-end;
  }

  .admin-portal-toolbar-actions .admin-portal-toolbar-label {
    align-self: flex-end;
  }
}

.admin-portal-data-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-portal-data-panel .admin-portal-table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.admin-portal-data-panel .admin-portal-empty {
  margin: 1rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 2px dashed rgba(139, 148, 158, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
}

.admin-portal-wrap > .auth-title {
  margin-bottom: 0.25rem;
}

.admin-portal-wrap > .auth-subtitle {
  margin-bottom: 1rem;
}

.admin-portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.btn-export-excel {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  background: var(--grad-buy);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--glow-buy);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.btn-export-excel:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-import-csv {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: #30363d;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-import-csv:hover {
  background: #3d444d;
  border-color: #58a6ff;
  color: var(--text);
}

.admin-portal-csv-hint {
  margin: 0 0 0.9rem;
  max-width: 64rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(139, 148, 158, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.admin-portal-csv-hint--detail {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-portal-actions .btn-outline {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--prop-accent);
  border: 1px solid var(--prop-accent);
  border-radius: var(--radius);
  text-decoration: none;
}

.admin-portal-actions .btn-outline:hover {
  background: rgba(88, 166, 255, 0.15);
}

/* SL & TP admin — configuration page */
.admin-sl-tp-page {
  align-items: flex-start;
  padding: 2rem 1rem 3.5rem;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(88, 166, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(163, 113, 247, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(63, 185, 80, 0.08), transparent 40%),
    var(--bg);
}

.admin-sl-tp-shell {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.admin-sl-tp-hero {
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 0 0.25rem;
}

.admin-sl-tp-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--prop-accent);
  opacity: 0.95;
}

.admin-sl-tp-hero .auth-title {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

@supports (-webkit-background-clip: text) {
  .admin-sl-tp-hero .auth-title {
    background: linear-gradient(135deg, #f0f3f6 15%, #8b949e 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.admin-sl-tp-lead {
  margin: 0.75rem auto 0;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.admin-sl-tp-wrap {
  max-width: 820px;
}

.admin-sl-tp-shell .admin-portal-actions {
  justify-content: center;
  margin-bottom: 1.5rem;
}

.admin-sl-tp-alerts {
  max-width: 40rem;
  margin: 0 auto 1.25rem;
}

.admin-sl-tp-alerts .auth-error,
.admin-sl-tp-alerts .auth-success {
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  margin: 0;
}

.admin-sl-tp-alerts .auth-success {
  border: 1px solid rgba(63, 185, 80, 0.35);
  background: rgba(63, 185, 80, 0.08);
}

.admin-sl-tp-form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem 1.75rem;
  margin-bottom: 1.25rem;
  max-width: 60rem;
  width: 100%;
}

@media (min-width: 1000px) {
  .admin-sl-tp-form-panel {
    max-width: 72rem;
  }
}

@media (min-width: 640px) {
  .admin-sl-tp-form-panel {
    padding: 1.75rem 1.75rem 2rem;
  }
}

.admin-sl-tp-form {
  margin-top: 0;
}

.admin-sl-tp-section {
  margin-bottom: 1.5rem;
}

.admin-sl-tp-section:last-of-type {
  margin-bottom: 0;
}

.admin-sl-tp-phase {
  border-radius: 10px;
  padding: 1.15rem 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.admin-sl-tp-phase:last-child {
  margin-bottom: 0;
}

.admin-sl-tp-phase::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 10px 0 0 10px;
}

.admin-sl-tp-phase--1::before {
  background: linear-gradient(180deg, var(--buy), rgba(63, 185, 80, 0.45));
}

.admin-sl-tp-phase--2::before {
  background: linear-gradient(180deg, var(--prop-accent), rgba(88, 166, 255, 0.45));
}

.admin-sl-tp-phase--3::before {
  background: linear-gradient(180deg, var(--real-accent), rgba(163, 113, 247, 0.45));
}

.admin-sl-tp-heading {
  margin: 0 0 1rem;
  padding-left: 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-sl-tp-heading-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(88, 166, 255, 0.12);
  color: var(--prop-accent);
}

.admin-sl-tp-phase--1 .admin-sl-tp-heading-num {
  background: rgba(63, 185, 80, 0.15);
  color: var(--buy-hover);
}

.admin-sl-tp-phase--3 .admin-sl-tp-heading-num {
  background: rgba(163, 113, 247, 0.15);
  color: #c4a8ff;
}

.admin-sl-tp-trades {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-sl-tp-trade {
  margin-bottom: 0;
}

.admin-sl-tp-trade-card {
  padding: 1rem 0.9rem;
  border-radius: 8px;
  background: rgba(22, 27, 34, 0.65);
  border: 1px solid rgba(48, 54, 61, 0.85);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-sl-tp-trade-card:hover {
  border-color: rgba(88, 166, 255, 0.25);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.admin-sl-tp-trade-title {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.admin-sl-tp-trade-title strong {
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  font-weight: 600;
}

.admin-sl-tp-note {
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  font-style: italic;
}

.admin-sl-tp-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

@media (max-width: 540px) {
  .admin-sl-tp-fields {
    grid-template-columns: 1fr;
  }
}

.admin-sl-tp-fields-4 {
  grid-template-columns: 1fr 1fr;
}

.admin-sl-tp-field .auth-field label {
  font-size: 0.8rem;
}

.admin-sl-tp-field input {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.admin-sl-tp-field--tp input {
  border-left: 3px solid rgba(63, 185, 80, 0.65);
}

.admin-sl-tp-field--sl input {
  border-left: 3px solid rgba(248, 81, 73, 0.65);
}

.admin-sl-tp-field input:focus {
  outline: none;
  border-color: var(--prop-accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.18);
}

.admin-sl-tp-dollars-section {
  margin-top: 0.25rem;
}

.admin-sl-tp-dollars-trades {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-sl-tp-dollars-trade {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.admin-sl-tp-hero--compact {
  margin-bottom: 0.5rem;
}

.admin-sl-tp-hero--compact .admin-sl-tp-lead {
  max-width: 40rem;
}

/* Tabbed config layout (SL/TP admin) */
.admin-sl-tp-workspace {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-sl-tp-tier-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
  padding: 1rem 1.1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(88, 166, 255, 0.04);
}

.admin-sl-tp-tier-ribbon .admin-sl-tp-tier-hint {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-sl-tp-config-grid {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 800px) {
  .admin-sl-tp-config-grid {
    display: grid;
    grid-template-columns: minmax(9.5rem, 12rem) minmax(0, 1fr);
    align-items: stretch;
  }
}

.admin-sl-tp-tablist {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(139, 148, 158, 0.45) rgba(22, 27, 34, 0.45);
}

@media (min-width: 800px) {
  .admin-sl-tp-tablist {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 0.5rem 0.45rem 0.65rem 0.35rem;
    min-height: 14rem;
  }
}

.admin-sl-tp-tab {
  appearance: none;
  font: inherit;
  text-align: left;
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  margin: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  scroll-snap-align: start;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 799.98px) {
  .admin-sl-tp-tab {
    width: auto;
  }
}

.admin-sl-tp-tab:hover {
  color: var(--text);
  background: rgba(88, 166, 255, 0.08);
}

.admin-sl-tp-tab.is-active {
  color: var(--prop-accent, #58a6ff);
  background: rgba(88, 166, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(88, 166, 255, 0.2);
  font-weight: 600;
}

@media (min-width: 800px) {
  .admin-sl-tp-tab.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 3px;
    border-radius: 2px;
    background: var(--prop-accent, #58a6ff);
  }
}

@media (min-width: 800px) {
  .admin-sl-tp-tab {
    white-space: normal;
  }
}

.admin-sl-tp-config-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--background);
}

.admin-sl-tp-password-strip {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.55) 0%, rgba(13, 17, 23, 0.2) 100%);
  padding: 0.85rem 1rem 0.95rem;
  flex-shrink: 0;
}

.admin-sl-tp-password-strip-inner {
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-sl-tp-password-field {
  width: 100%;
}

.admin-sl-tp-password-field label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-sl-tp-password-input {
  max-width: 20rem;
}

.admin-sl-tp-password-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-sl-tp-panels {
  min-height: 12rem;
  min-width: 0;
  position: relative;
}

.admin-sl-tp-panel[hidden] {
  display: none !important;
}

.admin-sl-tp-panel {
  padding: 1rem 1.15rem 1.35rem;
  animation: adminSltpPanelIn 0.22s ease;
}

@media (min-width: 800px) {
  .admin-sl-tp-panel {
    padding: 1.1rem 1.35rem 1.5rem;
    max-height: min(80vh, 70rem);
    overflow: auto;
  }
}

.admin-sl-tp-panel.is-active {
  outline: none;
}

@keyframes adminSltpPanelIn {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}

.admin-sl-tp-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.02em;
}

.admin-sl-tp-panel-lead {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 1rem;
  max-width: 40rem;
}

.no-wrap {
  white-space: nowrap;
}

.admin-sl-tp-panel-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  clear: both;
}

.admin-sl-tp-panel-footer--row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  border-top: 0;
  padding-top: 0.35rem;
  margin-top: 0.5rem;
}

.admin-sl-tp-panel-save-hint {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0;
  max-width: 36rem;
}

.admin-sl-tp-panel .admin-sl-tp-section {
  margin-top: 0;
}

.admin-sl-tp-panel .admin-sl-tp-phase,
.admin-sl-tp-panel .admin-sl-tp-lots-section,
.admin-sl-tp-panel .admin-sl-tp-dollars-section {
  padding-top: 0.4rem;
}

.admin-sl-tp-panel .admin-sl-tp-phase::before,
.admin-sl-tp-panel .admin-sl-tp-lots-section::before,
.admin-sl-tp-panel .admin-sl-tp-dollars-section::before {
  display: none;
}

.admin-sl-tp-save-block input[type="password"] {
  font-family: inherit;
  letter-spacing: normal;
}

.admin-sl-tp-save-block {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.admin-sl-tp-save-block .auth-field label {
  font-size: 0.9rem;
}

.admin-sl-tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  align-items: center;
}

.admin-sl-tp-actions .btn-login {
  min-width: 11rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(88, 166, 255, 0.2);
}

.admin-sl-tp-actions .btn-outline {
  border-color: rgba(139, 148, 158, 0.45);
  color: var(--text-muted);
}

.admin-sl-tp-actions .btn-outline:hover {
  border-color: var(--prop-accent);
  color: var(--prop-accent);
}

.admin-sl-tp-save-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
  max-width: 42rem;
}

.admin-sl-tp-actions--split {
  margin-top: 0.75rem;
}

.admin-sl-tp-actions--split .btn-login {
  flex: 1 1 220px;
  width: auto;
  max-width: none;
}

.btn-login.btn-login--secondary {
  background: var(--real-accent);
  box-shadow: 0 2px 8px rgba(163, 113, 247, 0.22);
}

.btn-login.btn-login--secondary:hover {
  filter: brightness(1.08);
}

.admin-portal-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scrollbar-color: rgba(139, 148, 158, 0.45) rgba(22, 27, 34, 0.5);
}

.admin-portal-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.admin-portal-table-wrap::-webkit-scrollbar-track {
  background: rgba(22, 27, 34, 0.6);
  border-radius: 6px;
}

.admin-portal-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(88, 166, 255, 0.35);
  border-radius: 6px;
}

.admin-portal-table-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 166, 255, 0.5);
}

.admin-portal-main-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-portal-main-table th,
.admin-portal-main-table td {
  padding: 0.65rem 0.8rem;
  text-align: left;
  border: 1px solid var(--border);
  vertical-align: top;
}

.admin-portal-main-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #1c2128 0%, #161b22 100%);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--border);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-portal-main-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.12);
}

.admin-portal-main-table tbody tr:hover {
  background: rgba(88, 166, 255, 0.07);
}

.admin-portal-main-table tbody td:first-child {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-weight: 600;
  border-left: 3px solid rgba(88, 166, 255, 0.35);
}

.admin-portal-cell-userid {
  font-weight: 500;
  color: var(--prop-accent);
}

.admin-portal-cell-password {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}

.admin-portal-cell-logins {
  max-width: 280px;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: normal;
  word-break: break-word;
}

.admin-portal-cell-trades {
  max-width: 360px;
  font-size: 0.85rem;
}

.admin-portal-cell-trades pre {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-portal-actions-cell {
  white-space: nowrap;
}

.admin-portal-actions-cell--btns .btn {
  display: inline-block;
  margin-bottom: 0.2rem;
}

.btn-edit-user {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  background: #21262d;
  color: #e6edf3;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-right: 0.35rem;
}

.btn-edit-user:hover {
  background: #30363d;
  border-color: #58a6ff;
}

.admin-portal-access-table {
  min-width: 640px;
}

.admin-portal-th-tier {
  text-align: center;
  font-weight: 600;
  color: var(--text);
}

.admin-portal-cell-check {
  text-align: center;
  vertical-align: middle;
  padding: 0.4rem 0.5rem;
}

.admin-portal-tier-cb {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
  accent-color: var(--prop-accent);
}

.btn-save-user-access {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  background: #238636;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin-right: 0.35rem;
}

.btn-save-user-access:hover {
  background: #2ea043;
}

.admin-portal-inline-msg {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-portal-inline-msg--error {
  color: var(--sell, #f85149);
}

.btn-delete-user {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  background: var(--sell);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-delete-user:hover {
  filter: brightness(1.1);
}

/* Edit user dialog (admin portal) */
.admin-portal-edit-dialog {
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
}

.admin-portal-page .admin-portal-edit-dialog .auth-field {
  margin-bottom: 0.9rem;
}

.admin-portal-edit-lead {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.admin-portal-edit-form .auth-field {
  text-align: left;
}

.admin-portal-edit-input-readonly {
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  cursor: not-allowed;
  border: 1px solid var(--border);
}

.admin-portal-edit-tiers {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  margin: 0;
  text-align: left;
}

.admin-portal-edit-tiers legend {
  font-size: 0.9rem;
  color: var(--text);
  padding: 0 0.35rem;
}

.admin-portal-edit-tier-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-top: 0.35rem;
  align-items: center;
}

.admin-portal-page .admin-portal-edit-dialog .modal-actions {
  margin-top: 0.5rem;
}

.admin-portal-users {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-portal-user-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.admin-portal-user-email {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--prop-accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.admin-portal-user-section {
  margin-top: 1rem;
}

.admin-portal-user-section h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-portal-trades-wrap {
  overflow-x: auto;
  margin-bottom: 0.5rem;
}

.admin-portal-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-portal-table th,
.admin-portal-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border: 1px solid var(--border);
}

.admin-portal-table th {
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
}

.admin-portal-table .side-buy { color: var(--buy); }
.admin-portal-table .side-sell { color: var(--sell); }
.admin-portal-table .outcome-real { color: var(--buy); }
.admin-portal-table .outcome-prop { color: var(--prop-accent); }

.admin-portal-logins {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-portal-logins li {
  margin-bottom: 0.25rem;
}

.admin-portal-empty,
.admin-portal-no-data {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.admin-portal-empty a {
  color: var(--prop-accent);
  text-decoration: none;
}

.admin-portal-empty a:hover {
  text-decoration: underline;
}

/* --- Reset phase --- */
.reset-phase-block {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 0.7rem 1rem;
  background: rgba(9, 13, 22, 0.4);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
}

.reset-phase-block label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.reset-phase-block select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.5rem 2.1rem 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2393a1b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.reset-phase-block select:hover {
  border-color: rgba(88, 166, 255, 0.45);
}

.reset-phase-block select:focus {
  outline: none;
  border-color: var(--prop-accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.btn-reset {
  background: var(--grad-prop);
  color: #fff;
  box-shadow: var(--glow-prop);
}

.btn-reset:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-reset-phase-inputs {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-reset-phase-inputs:hover {
  background: rgba(48, 54, 61, 0.5);
  color: var(--text);
}

/* --- Phases --- */
.phase {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  animation: card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.phase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.phase-1::before { background: linear-gradient(90deg, var(--buy), rgba(63, 185, 80, 0.1) 85%); }
.phase-2::before { background: linear-gradient(90deg, var(--prop-accent), rgba(88, 166, 255, 0.1) 85%); }
.phase-3::before { background: linear-gradient(90deg, var(--real-accent), rgba(163, 113, 247, 0.1) 85%); }

.phase-section-hidden {
  display: none !important;
}

/* --- Prop account tiers (trading app) --- */
.prop-tier-nav {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.15rem 1.15rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.prop-tier-nav-label {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.prop-tier-tablist {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.3rem;
  background: rgba(9, 13, 22, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: 99px;
}

.prop-tier-tab {
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: 99px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.prop-tier-tab:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.1);
}

.prop-tier-tab.is-active {
  background: var(--grad-prop);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-prop);
}

.prop-tier-tab:focus-visible {
  outline: 2px solid var(--prop-accent);
  outline-offset: 2px;
}

.prop-tier-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.75rem auto 0;
  max-width: 42rem;
  line-height: 1.45;
}

/* --- Admin SL/TP prop tier selector --- */
.admin-sl-tp-tier-bar {
  margin-top: 1rem;
  text-align: center;
}

.admin-sl-tp-tier-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.admin-sl-tp-tier-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  max-width: 100%;
}

.admin-sl-tp-tier-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.admin-sl-tp-current-lots {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  text-align: left;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(88, 166, 255, 0.06);
}

.admin-sl-tp-current-lots-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.admin-sl-tp-current-lots-tier {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--prop-accent);
}

.admin-sl-tp-current-lots-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-sl-tp-current-lots-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

.admin-sl-tp-current-lots-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.admin-sl-tp-current-lots-row-label {
  color: var(--text-muted);
  flex: 1 1 200px;
}

.admin-sl-tp-current-lots-row-values {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.admin-sl-tp-current-lots-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-sl-tp-p1t2-callout {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(163, 113, 247, 0.45);
  border-radius: var(--radius);
  background: rgba(163, 113, 247, 0.07);
}

.admin-sl-tp-p1t2-values {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

.admin-sl-tp-offset-pair strong {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.35rem;
}

.admin-sl-tp-offset-sep {
  color: var(--text-muted);
  margin: 0 0.25rem;
}

.admin-sl-tp-lots-section {
  margin-top: 1.5rem;
}

.admin-sl-tp-lots-section .admin-sl-tp-heading-num {
  opacity: 0.7;
  font-size: 0.9rem;
}

.admin-sl-tp-lots-lead {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
  max-width: 40rem;
}

.admin-sl-tp-lots-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-sl-tp-lots-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(22, 27, 34, 0.6);
}

.admin-sl-tp-lots-row-title {
  flex: 1 1 200px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.admin-sl-tp-lots-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-sl-tp-lots-pair .admin-sl-tp-field input {
  min-width: 5rem;
}

.phase h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.phase h2::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.phase-1 h2::before { background: var(--buy); box-shadow: 0 0 10px rgba(63, 185, 80, 0.6); }
.phase-2 h2::before { background: var(--prop-accent); box-shadow: 0 0 10px rgba(88, 166, 255, 0.6); }
.phase-3 h2::before { background: var(--real-accent); box-shadow: 0 0 10px rgba(163, 113, 247, 0.6); }

/* --- Dashboard --- */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.dashboard-top {
  align-items: flex-end;
}

.dashboard-actions {
  flex-wrap: wrap;
}

.dashboard-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* --- Point input --- */
.point-input-block {
  flex: 0 0 auto;
}

.point-input-block label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.point-input-block input {
  width: 100%;
  min-width: 140px;
  max-width: 180px;
  padding: 0.65rem 0.85rem;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(9, 13, 22, 0.6);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.point-input-block input:focus {
  outline: none;
  border-color: var(--prop-accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

.hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Action buttons --- */
.dashboard-actions .btn {
  flex: 0 0 auto;
}

.btn {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--prop-accent);
  outline-offset: 2px;
}

.btn-buy {
  background: var(--grad-buy);
  color: #fff;
  box-shadow: var(--glow-buy);
}

.btn-buy:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-buy.selected {
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.55), var(--glow-buy);
  outline: 2px solid var(--buy);
  outline-offset: 2px;
}

.btn-sell {
  background: var(--grad-sell);
  color: #fff;
  box-shadow: var(--glow-sell);
}

.btn-sell:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-sell.selected {
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.55), var(--glow-sell);
  outline: 2px solid var(--sell);
  outline-offset: 2px;
}

/* --- Current trade badge --- */
.current-trade-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.16), rgba(163, 113, 247, 0.16));
  color: #9ec3ff;
  border: 1px solid rgba(88, 166, 255, 0.4);
  border-radius: 99px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.current-trade-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prop-accent);
  box-shadow: 0 0 8px rgba(88, 166, 255, 0.9);
}

.btn-submit {
  background: var(--grad-prop);
  color: #fff;
  box-shadow: var(--glow-prop);
}

.btn-submit:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-reset-phase-inputs:hover {
  transform: translateY(-1px);
}

/* --- Outcome block --- */
.outcome-block {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(163, 113, 247, 0.08);
  border: 1px solid var(--real-accent);
  border-radius: var(--radius);
}

.outcome-label {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.outcome-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-outcome {
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}

.btn-real-win {
  background: var(--grad-real);
  color: #fff;
  box-shadow: 0 6px 20px rgba(163, 113, 247, 0.25);
}

.btn-real-win:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-prop-win {
  background: var(--grad-prop);
  color: #fff;
  box-shadow: var(--glow-prop);
}

.btn-prop-win:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

/* --- Account cards (dashboard + legacy) --- */
.account-card {
  position: relative;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: rgba(9, 13, 22, 0.45);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
}

.account-card:hover {
  box-shadow: 0 2px 14px rgba(2, 6, 16, 0.35);
}

.account-card.prop::before {
  background: linear-gradient(180deg, var(--prop-accent), rgba(88, 166, 255, 0.3));
}

.account-card.prop:hover {
  border-color: rgba(88, 166, 255, 0.35);
}

.account-card.real::before {
  background: linear-gradient(180deg, var(--real-accent), rgba(163, 113, 247, 0.3));
}

.account-card.real:hover {
  border-color: rgba(163, 113, 247, 0.35);
}

.account-card h3 {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-card.prop h3 { color: #9ec3ff; }
.account-card.real h3 { color: #c4a8ff; }

.account-card .field {
  margin-bottom: 0.75rem;
}

.account-card .field:last-child {
  margin-bottom: 0;
}

.account-card .field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.account-card input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  font-size: 0.98rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(22, 29, 43, 0.7);
  color: var(--text);
}

.account-card input[readonly] {
  cursor: default;
  font-weight: 500;
}

.account-card .field-amount {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.account-card.prop .field-amount:empty { display: none; }
.account-card.real .field-amount:empty { display: none; }

.account-card .field .field-amount:not(:empty) {
  color: var(--text);
}

.account-card .field .field-amount:not(:empty):not([data-negative]) {
  color: var(--buy-hover);
}

.account-card .field .field-amount[data-negative]:not(:empty) {
  color: var(--sell-hover);
}

/* --- Logic note --- */
.logic-note {
  margin: 1rem 0 0;
  padding: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(88, 166, 255, 0.08);
  border-radius: var(--radius);
  border-left: 3px solid var(--prop-accent);
}

/* --- Phase status --- */
.phase-status {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.phase-status.reached {
  color: var(--buy);
  font-weight: 500;
}

.phase-status-header {
  margin: 0.5rem 0 0;
  min-height: 1.5em;
}

/* --- Placeholder phases --- */
.phase-2 .placeholder,
.phase-3 .placeholder {
  margin: 0;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Trade history panel --- */
.trade-history-panel {
  position: sticky;
  top: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.trade-history-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 0.7rem;
}

.trade-history-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--grad-prop);
  box-shadow: 0 0 10px rgba(88, 166, 255, 0.5);
  flex: 0 0 auto;
}

.trade-history-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.trade-history-filter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.trade-history-date-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 0.25rem 0.5rem;
  min-height: 2.25rem;
}

.trade-history-date-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  border: none;
  padding: 0;
  margin: 0;
}

.trade-history-date-input.trade-history-date-input-visible {
  position: static;
  width: auto;
  height: auto;
  opacity: 1;
  pointer-events: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  border: none;
  border-radius: 0;
  min-width: 8rem;
}

.btn-calendar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-calendar-icon:hover {
  color: var(--prop-accent);
  background: rgba(88, 166, 255, 0.15);
}

.btn-calendar-icon .calendar-icon {
  display: block;
}

.trade-history-date-display {
  font-size: 0.9rem;
  color: var(--text);
  min-width: 5rem;
}

.trade-history-date-display:empty {
  color: var(--text-muted);
}

.btn-show-all {
  padding: 0.42rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
}

.btn-show-all:hover {
  background: rgba(148, 163, 184, 0.18);
  color: var(--text);
}

.trade-day-summary {
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trade-day-summary-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--prop-accent);
}

.trade-day-summary-stats {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.trade-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 62vh;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(9, 13, 22, 0.35);
}

.trade-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.trade-table th,
.trade-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}

.trade-table th {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: sticky;
  top: 0;
  background: #131a28;
  z-index: 1;
  box-shadow: 0 1px 0 var(--border-soft);
}

.trade-table td {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.trade-table tbody tr {
  transition: background 0.12s ease;
}

.trade-table tbody tr:hover {
  background: rgba(88, 166, 255, 0.07);
}

.outcome-real {
  color: var(--real-accent);
  font-weight: 600;
}

.outcome-prop {
  color: var(--prop-accent);
  font-weight: 600;
}

.side-buy {
  color: var(--buy);
  font-weight: 600;
}

.side-sell {
  color: var(--sell);
  font-weight: 600;
}

.trade-history-empty {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.trade-history-empty.hidden {
  display: none;
}

/* --- Confirmation modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: overlay-in 0.2s ease both;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-overlay[hidden] {
  display: none !important;
  pointer-events: none;
  visibility: hidden;
}

.modal-dialog {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)), var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 440px;
  width: 100%;
  padding: 1.6rem;
  animation: card-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.modal-body {
  margin-bottom: 1.25rem;
}

.modal-body p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.confirm-trade {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.confirm-trade.side-buy {
  color: var(--buy);
}

.confirm-trade.side-sell {
  color: var(--sell);
}

.confirm-phase {
  font-weight: 600;
  color: var(--prop-accent);
}

.confirm-side.side-buy {
  color: var(--buy);
  font-weight: 500;
}

.confirm-side.side-sell {
  color: var(--sell);
  font-weight: 500;
}

.confirm-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  word-break: break-word;
  padding: 0.7rem 0.85rem;
  background: rgba(9, 13, 22, 0.5);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

.confirm-details:empty {
  display: none;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-cancel {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-cancel:hover {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text);
}

.btn-confirm {
  background: var(--grad-buy);
  color: #fff;
  box-shadow: var(--glow-buy);
}

.btn-confirm:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

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

  .trade-history-panel,
  .ai-engine-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .dashboard-points {
    grid-template-columns: 1fr;
  }

  .dashboard-top {
    flex-direction: column;
    align-items: stretch;
  }

  .current-trade-badge {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .trade-table th,
  .trade-table td {
    padding: 0.35rem 0.4rem;
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================================
   AI DECISION ENGINE PANEL (replicates the Dashboard signal)
   ============================================================ */
.ai-engine-panel {
  position: sticky;
  top: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.ai-engine-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 0.7rem;
}

.ai-engine-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--grad-brand);
  box-shadow: 0 0 10px rgba(163, 113, 247, 0.5);
  flex: 0 0 auto;
}

.ai-engine-refresh {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.ai-engine-refresh:hover {
  color: var(--prop-accent);
  border-color: rgba(88, 166, 255, 0.55);
  transform: translateY(-1px);
}

.ai-engine-refresh.is-spinning svg {
  animation: ai-refresh-spin 0.8s linear;
}

@keyframes ai-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ai-engine-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.ai-engine-pair-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.ai-engine-pair-select {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.ai-engine-pair-select:focus-visible {
  outline: 2px solid var(--prop-accent);
  outline-offset: 1px;
}

.ai-engine-tf-badge {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--prop-accent);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: 99px;
  padding: 0.25rem 0.6rem;
}

.ai-signal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.ai-signal-word-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-signal-icon {
  display: inline-flex;
  color: var(--text-faint);
}

.ai-signal-word {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-faint);
}

.ai-gauge-wrap {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 0.9rem;
}

.ai-gauge-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 10;
}

.ai-gauge-bar {
  fill: none;
  stroke: var(--text-faint);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 490.088;
  stroke-dashoffset: 490.088;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.ai-gauge-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-gauge-value {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ai-gauge-caption {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.ai-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--border-soft);
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.07);
}

.ai-chip-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.ai-chip-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.ai-chip-value.is-buy { color: var(--buy); }
.ai-chip-value.is-sell { color: var(--sell); }
.ai-chip-value.is-wait { color: #f0b90b; }
.ai-chip-value.is-flat { color: var(--text-muted); }
.ai-chip-value.is-plain { color: var(--text); }

/* Per-signal skins */
.ai-signal-card[data-signal='BUY'] {
  border-color: rgba(63, 185, 80, 0.45);
  background: linear-gradient(180deg, rgba(63, 185, 80, 0.1), rgba(63, 185, 80, 0.02)), var(--surface-2);
  box-shadow: 0 0 0 1px rgba(63, 185, 80, 0.22), 0 0 44px -12px rgba(63, 185, 80, 0.55);
}
.ai-signal-card[data-signal='BUY'] .ai-signal-word,
.ai-signal-card[data-signal='BUY'] .ai-signal-icon { color: var(--buy); }
.ai-signal-card[data-signal='BUY'] .ai-gauge-bar {
  stroke: var(--buy);
  filter: drop-shadow(0 0 8px rgba(63, 185, 80, 0.8));
}

.ai-signal-card[data-signal='SELL'] {
  border-color: rgba(248, 81, 73, 0.45);
  background: linear-gradient(180deg, rgba(248, 81, 73, 0.1), rgba(248, 81, 73, 0.02)), var(--surface-2);
  box-shadow: 0 0 0 1px rgba(248, 81, 73, 0.22), 0 0 44px -12px rgba(248, 81, 73, 0.55);
}
.ai-signal-card[data-signal='SELL'] .ai-signal-word,
.ai-signal-card[data-signal='SELL'] .ai-signal-icon { color: var(--sell); }
.ai-signal-card[data-signal='SELL'] .ai-gauge-bar {
  stroke: var(--sell);
  filter: drop-shadow(0 0 8px rgba(248, 81, 73, 0.8));
}

.ai-signal-card[data-signal='WAIT'] {
  border-color: rgba(240, 185, 11, 0.45);
  background: linear-gradient(180deg, rgba(240, 185, 11, 0.1), rgba(240, 185, 11, 0.02)), var(--surface-2);
  box-shadow: 0 0 0 1px rgba(240, 185, 11, 0.22), 0 0 44px -12px rgba(240, 185, 11, 0.5);
  animation: ai-pulse 2.2s ease-in-out infinite;
}
.ai-signal-card[data-signal='WAIT'] .ai-signal-word,
.ai-signal-card[data-signal='WAIT'] .ai-signal-icon { color: #f0b90b; }
.ai-signal-card[data-signal='WAIT'] .ai-gauge-bar {
  stroke: #f0b90b;
  filter: drop-shadow(0 0 8px rgba(240, 185, 11, 0.8));
}

.ai-signal-card[data-signal='NO_TRADE'] {
  border-color: rgba(125, 135, 153, 0.4);
}
.ai-signal-card[data-signal='NO_TRADE'] .ai-signal-word,
.ai-signal-card[data-signal='NO_TRADE'] .ai-signal-icon { color: var(--text-muted); }
.ai-signal-card[data-signal='NO_TRADE'] .ai-gauge-bar { stroke: var(--text-muted); }

@keyframes ai-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(1.012); }
}

.ai-engine-status {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 1.1em;
}

.ai-engine-open-dashboard {
  display: block;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--prop-accent);
  text-decoration: none;
}

.ai-engine-open-dashboard:hover {
  text-decoration: underline;
}

/* Trade History header button (button element, matches header link pills) */
.btn-trade-history {
  font-family: inherit;
  cursor: pointer;
}

/* Trade history modal */
.modal-dialog--history {
  max-width: 1080px;
  max-height: 86vh;
  overflow: auto;
}

.trade-history-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.trade-history-modal-head .modal-title {
  margin: 0;
  border-bottom: 0;
  padding-bottom: 0;
}


/* ============================================================
   PAIR FILTER BAR (converts the EURUSD setup to other pairs)
   ============================================================ */
.pair-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)), var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.pair-filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pair-filter-select {
  min-width: 170px;
  padding: 0.45rem 0.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.pair-filter-select:focus-visible {
  outline: 2px solid var(--prop-accent);
  outline-offset: 1px;
}

.pair-filter-price {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--prop-accent);
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: 99px;
  padding: 0.22rem 0.6rem;
}

.pair-filter-price:empty {
  display: none;
}

.pair-filter-hint {
  flex: 1 1 260px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--text-faint);
  text-align: right;
}

@media (max-width: 700px) {
  .pair-filter-hint {
    text-align: left;
  }
}
