/* ============================================================
   AlphaTrade - dark only. Pure black ground, one accent.
   ============================================================ */

:root {
  --bg:          #000000;
  --surface:     #0b0b0c;
  --surface-2:   #111113;
  --surface-3:   #17171a;
  --line:        #1e1e22;
  --line-soft:   #161619;

  --text:        #ededf0;
  --text-dim:    #9a9aa4;
  --text-faint:  #5e5e68;

  --accent:      #3ddc84;
  --accent-dim:  #1d7a4a;
  --up:          #3ddc84;
  --down:        #ff5a68;
  --warn:        #ffb636;
  --info:        #6ea8ff;

  --radius:      14px;
  --radius-sm:   9px;
  --gap:         16px;

  --shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 8px 32px rgba(0,0,0,.5);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Author `display` rules (.btn, .field, …) outrank the UA's [hidden] rule, so
   elements toggled with element.hidden would otherwise stay on screen. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232328; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #33333a; }

/* ------------------------------------------------------------ shell */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 22px;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: -0.02em; font-size: 15px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #1a2f24, #0d130f);
  border: 1px solid #23392c; color: var(--accent); font-size: 13px; font-weight: 700;
}

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 7px 13px; border-radius: 9px; color: var(--text-dim);
  font-size: 13.5px; font-weight: 500; transition: background .14s, color .14s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-3); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-dim);
}
.pill strong { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }

.page { max-width: 1440px; margin: 0 auto; padding: 22px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 22px; }
.page-head .sub { color: var(--text-faint); font-size: 13px; margin-top: 3px; }
.page-head .spacer { flex: 1; }

/* ------------------------------------------------------------ cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 13.5px; font-weight: 600; letter-spacing: .01em; }
.card-head .spacer { flex: 1; }
.card-note { color: var(--text-faint); font-size: 12px; }

.grid { display: grid; gap: var(--gap); }
.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }

.kpi .label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 600;
}
.kpi .value {
  font-size: 26px; font-weight: 640; letter-spacing: -0.02em;
  margin-top: 8px; font-variant-numeric: tabular-nums;
}
.kpi .value.sm { font-size: 21px; }
.kpi .meta { margin-top: 6px; font-size: 12px; color: var(--text-faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text-dim); }
.muted { color: var(--text-faint); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }

/* ------------------------------------------------------------ controls */

.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.seg button {
  border: 0; background: transparent; color: var(--text-faint);
  padding: 5px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 550;
  cursor: pointer; font-family: inherit; transition: background .13s, color .13s;
}
.seg button:hover { color: var(--text-dim); }
.seg button.active { background: var(--surface-3); color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: 13.5px; font-weight: 550;
  transition: background .14s, border-color .14s, opacity .14s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: #2a2a30; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #04140b; border-color: var(--accent); font-weight: 640; }
.btn.primary:hover:not(:disabled) { background: #4ae691; border-color: #4ae691; }
.btn.danger { color: var(--down); border-color: #35191d; background: #150c0e; }
.btn.danger:hover:not(:disabled) { background: #1e1013; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-faint); font-weight: 600;
}
.field .hint { font-size: 11.5px; color: var(--text-faint); }

input[type=text], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=email], select, textarea {
  width: 100%; padding: 10px 12px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; outline: none;
  transition: border-color .14s, background .14s;
}
input:focus, select:focus, textarea:focus { border-color: #33333c; background: var(--surface-3); }
input::placeholder, textarea::placeholder { color: #4a4a53; }
input[type=number] { font-family: var(--mono); }
textarea { resize: vertical; min-height: 76px; line-height: 1.55; }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239a9aa4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
}
input[type=date], input[type=time] { color-scheme: dark; }

.check { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin: 0; flex: none; }

.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-full { grid-column: 1 / -1; }

fieldset { border: 0; padding: 0; margin: 0; }
.section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 650; margin: 4px 0 12px;
  display: flex; align-items: center; gap: 9px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

/* ------------------------------------------------------------ table */

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2); color: var(--text-faint);
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650;
  text-align: left; padding: 11px 12px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--text-dim); }
tbody td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; opacity: 0; transition: opacity .13s; }
tr:hover .row-actions { opacity: 1; }

.tag {
  display: inline-flex; align-items: center; padding: 2.5px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-3); color: var(--text-dim); border: 1px solid var(--line);
}
.tag.long { color: var(--up); background: rgba(61,220,132,.09); border-color: rgba(61,220,132,.22); }
.tag.short { color: var(--down); background: rgba(255,90,104,.09); border-color: rgba(255,90,104,.22); }

.empty { padding: 46px 20px; text-align: center; color: var(--text-faint); font-size: 13.5px; }
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: .5; }

/* ------------------------------------------------------------ heatmap */

.heatmap-scroll { overflow-x: auto; padding-bottom: 4px; }
.heatmap { display: inline-block; min-width: 100%; }
.heat-cell { rx: 2.2; transition: none; }
.heat-cell:hover { stroke: #4b4b55; stroke-width: 1; }
.heat-legend { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); }
.heat-legend .swatch { width: 11px; height: 11px; border-radius: 2.5px; }

/* ------------------------------------------------------------ tooltip */

#tooltip {
  position: fixed; z-index: 200; pointer-events: none;
  background: #17171b; border: 1px solid #2a2a31; border-radius: 8px;
  padding: 8px 11px; font-size: 12px; line-height: 1.45;
  box-shadow: 0 10px 28px rgba(0,0,0,.65); max-width: 260px;
  opacity: 0; transition: opacity .1s;
}
#tooltip.show { opacity: 1; }
#tooltip .t-title { font-weight: 650; margin-bottom: 2px; }
#tooltip .t-row { color: var(--text-dim); }

/* ------------------------------------------------------------ paste zone */

.paste-zone {
  border: 1.5px dashed #2a2a32; border-radius: var(--radius);
  background: var(--surface-2); padding: 26px 20px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.paste-zone:hover, .paste-zone.hot { border-color: var(--accent-dim); background: #0d1310; }
.paste-zone .icon { font-size: 26px; opacity: .55; margin-bottom: 8px; }
.paste-zone .title { font-weight: 600; margin-bottom: 4px; }
.paste-zone .sub { color: var(--text-faint); font-size: 12.5px; }
.paste-zone kbd {
  font-family: var(--mono); font-size: 11px; padding: 1.5px 5px; border-radius: 5px;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text-dim);
}
.paste-preview { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.paste-preview img { display: block; width: 100%; max-height: 330px; object-fit: contain; background: #050505; }
.paste-preview .remove { position: absolute; top: 8px; right: 8px; }

.ai-tip {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(61,220,132,.07), rgba(61,220,132,.02));
  border: 1px solid rgba(61,220,132,.2);
}
.ai-tip .bulb { font-size: 15px; line-height: 1.4; }
.ai-tip .body { font-size: 13px; line-height: 1.6; }
.ai-tip .body strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 3px; }

.filled-flash { animation: flash .9s ease-out; }
@keyframes flash {
  0% { border-color: var(--accent); background: rgba(61,220,132,.09); }
  100% { border-color: var(--line); background: var(--surface-2); }
}

/* ------------------------------------------------------------ auth */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 396px; }
.auth-card .card { padding: 28px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 24px; }
.auth-logo .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.auth-logo .name { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.auth-title { font-size: 17px; margin-bottom: 5px; }
.auth-sub { color: var(--text-faint); font-size: 13px; margin-bottom: 22px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--text-faint); }
.auth-foot a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }

.code-input {
  font-family: var(--mono) !important; font-size: 22px !important;
  letter-spacing: .5em; text-align: center; padding: 13px 12px !important;
}

.alert {
  padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5;
  border: 1px solid transparent;
}
.alert.error { background: rgba(255,90,104,.08); border-color: rgba(255,90,104,.26); color: #ff8d96; }
.alert.ok { background: rgba(61,220,132,.08); border-color: rgba(61,220,132,.26); color: var(--accent); }
.alert.info { background: rgba(110,168,255,.07); border-color: rgba(110,168,255,.22); color: #9dc0ff; }
.alert.warn { background: rgba(255,182,54,.07); border-color: rgba(255,182,54,.24); color: #ffcb70; }

/* ------------------------------------------------------------ modal */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.72); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 22px;
}
.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 24px 70px rgba(0,0,0,.7);
}
.modal-head { display: flex; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.modal-foot { display: flex; gap: 9px; justify-content: flex-end; padding: 15px 20px; border-top: 1px solid var(--line-soft); }
.x-btn {
  margin-left: auto; background: transparent; border: 0; color: var(--text-faint);
  cursor: pointer; font-size: 19px; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.x-btn:hover { color: var(--text); background: var(--surface-2); }

/* ------------------------------------------------------------ misc */

.toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 9px; }
.toast {
  padding: 11px 15px; border-radius: var(--radius-sm); font-size: 13px;
  background: #17171b; border: 1px solid #2a2a31; box-shadow: 0 10px 30px rgba(0,0,0,.6);
  animation: slideIn .2s ease-out; max-width: 340px;
}
.toast.error { border-color: rgba(255,90,104,.4); color: #ff8d96; }
.toast.ok { border-color: rgba(61,220,132,.38); color: var(--accent); }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255,255,255,.18); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.bar-row { display: grid; grid-template-columns: 88px 1fr 74px; align-items: center; gap: 11px; padding: 5px 0; font-size: 12.5px; }
.bar-row .name { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-row .val { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.recovery-codes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  font-family: var(--mono); font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px;
}
.qr-box { display: grid; place-items: center; padding: 15px; background: #0e0e10; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qr-box img { width: 200px; height: 200px; image-rendering: pixelated; }
.secret-line {
  font-family: var(--mono); font-size: 12.5px; word-break: break-all; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; color: var(--text-dim);
}

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-faint); }
.kv .v { font-family: var(--mono); font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .topbar { padding: 0 14px; gap: 12px; height: auto; min-height: 58px; flex-wrap: wrap; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin-left: 0; padding-bottom: 2px; }
  .page { padding: 15px; }
  .form-grid .span-2 { grid-column: 1 / -1; }
  .topbar-right .pill.hide-sm { display: none; }
}

/* ------------------------------------------------------------ screenshot gallery */

.paste-zone.target { border-color: var(--accent-dim); background: #0c1210; }
.paste-zone .target-flag {
  display: inline-block; margin-top: 9px; font-size: 10.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .07em; color: var(--accent);
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
.gallery-item {
  position: relative; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: #050505; aspect-ratio: 16 / 10; cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item .kill {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  border-radius: 6px; border: 0; cursor: pointer; line-height: 1; font-size: 12px;
  background: rgba(0,0,0,.72); color: #ff8d96; opacity: 0; transition: opacity .13s;
}
.gallery-item:hover .kill { opacity: 1; }
.gallery-item .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,.86));
  font-size: 10.5px; color: #cfcfd6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-item.uploading { opacity: .45; }
.gallery-add {
  display: grid; place-items: center; aspect-ratio: 16 / 10;
  border: 1.5px dashed #2a2a32; border-radius: 9px; cursor: pointer;
  color: var(--text-faint); font-size: 20px; transition: border-color .14s, color .14s;
}
.gallery-add:hover { border-color: var(--accent-dim); color: var(--accent); }

.lightbox { display: flex; flex-direction: column; gap: 12px; }
.lightbox img { width: 100%; max-height: 62vh; object-fit: contain; background: #050505; border-radius: 9px; border: 1px solid var(--line); }
.lightbox-nav { display: flex; align-items: center; gap: 9px; }
.lightbox-nav .count { flex: 1; text-align: center; font-size: 12.5px; color: var(--text-faint); }

/* Two-column layouts collapse before they get cramped. */
@media (max-width: 1080px) {
  #dash-mid, #new-grid { grid-template-columns: 1fr !important; }
}

/* ------------------------------------------------------------ stored API key */

.stored-key {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid rgba(61, 220, 132, .28);
}
.stored-key code {
  flex: 1; min-width: 0;
  font-family: var(--mono); font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stored-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(61, 220, 132, .15);
}
#apikey-editor { display: flex; flex-direction: column; }
#btn-cancel-replace { align-self: flex-start; }

/* ------------------------------------------------------------ market ticker */

.ticker-card { padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.ticker {
  display: flex; gap: 20px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
.ticker::-webkit-scrollbar { display: none; }
.tick { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.tick .t-label {
  font-size: 11px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-faint);
}
.tick .t-price { font-family: var(--mono); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tick .t-chg { font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.ticker-meta { font-size: 11px; color: var(--text-faint); white-space: nowrap; flex: none; }
.ticker-sep { width: 1px; align-self: stretch; background: var(--line); flex: none; }

/* ------------------------------------------------------------ member count preview */

.member-preview {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.mp-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); font-weight: 650; align-self: center;
}
.mp-big { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.mp-small { font-size: 13px; color: var(--text-faint); font-family: var(--mono); }

/* ------------------------------------------------------------ outcome picker */

.outcome-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.outcome-picker button {
  flex: 1 1 120px; padding: 13px 16px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
  font-family: inherit; font-size: 14px; font-weight: 600;
  transition: background .15s, border-color .15s, color .15s;
}
.outcome-picker button:hover { color: var(--text); border-color: #2a2a30; }
.outcome-picker button[aria-pressed="true"] { color: var(--text); }
.outcome-picker button[data-outcome="win"][aria-pressed="true"] {
  background: rgba(61,220,132,.13); border-color: rgba(61,220,132,.5); color: var(--up);
}
.outcome-picker button[data-outcome="loss"][aria-pressed="true"] {
  background: rgba(255,90,104,.12); border-color: rgba(255,90,104,.5); color: var(--down);
}
.outcome-picker button[data-outcome="breakeven"][aria-pressed="true"] {
  background: var(--surface-3); border-color: #3a3a44; color: var(--text);
}

.outcome-summary {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.6;
}
.outcome-summary .os-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.outcome-summary .os-main { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.outcome-summary .os-detail { color: var(--text-faint); font-family: var(--mono); font-size: 12.5px; }

.simple-toggle { font-size: 13px; color: var(--text-dim); white-space: nowrap; }

/* Simple form: hide everything optional. Needs !important to beat .field's
   own display rule, the same reason the global [hidden] rule needs it. */
#view-new.simple .advanced { display: none !important; }

/* ------------------------------------------------------------ open trades */

.tag.open {
  color: var(--warn); background: rgba(255,182,54,.1); border-color: rgba(255,182,54,.3);
}
.tag.muted-tag { color: var(--text-faint); }
tbody tr.row-open td { background: rgba(255,182,54,.035); }
tbody tr.row-open:hover td { background: rgba(255,182,54,.06); }
.kpi .value.warn-value { color: var(--warn); }
