:root {
  --bg: #0b0e14;
  --panel: #141923;
  --panel2: #1a202c;
  --line: #293140;
  --text: #eef3f8;
  --muted: #8490a3;
  --green: #20d48a;
  --red: #ff5e6c;
  --yellow: #ffc857;
  --blue: #56a3ff;
  --radius: 10px;
  color-scheme: dark;
}
.dashboard-head{display:flex;justify-content:space-between;align-items:center;padding:4px 2px 14px;border-bottom:1px solid var(--line)}.eyebrow{font-size:10px;letter-spacing:.12em;color:var(--muted);font-weight:800}.dashboard-head h2{margin:2px 0;font-size:20px}.live-dot{font-size:10px;color:var(--green);margin-left:8px}.admin-tools{display:flex;gap:7px;align-items:center}.user-chip{font-size:11px;color:var(--green);font-weight:700}.macro-strip{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:12px 0}.signal-copy{margin-left:auto;padding:9px 13px;border-left:1px solid var(--line);color:var(--muted);font-size:11px}.cta{margin-left:10px;color:#07130d;background:var(--yellow);border-color:var(--yellow);font-weight:800;padding:5px 8px}.legend-row{display:flex;align-items:center;gap:15px;flex-wrap:wrap;padding:11px 2px 4px;color:var(--muted);font-size:11px}.legend-buy{color:var(--green)}.legend-hold{color:var(--yellow)}.legend-sell{color:var(--red)}.legend-mixed{color:#b78cff}.score:nth-child(1){border-color:var(--green)}.score:nth-child(2){border-color:var(--yellow)}.score:nth-child(3){border-color:var(--red)}.score:nth-child(4){border-color:var(--blue)}
body.light {
  --bg: #f1f4f7;
  --panel: #fff;
  --panel2: #f8fafc;
  --line: #dce2e9;
  --text: #17202b;
  --muted: #677386;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    13px Inter,
    system-ui,
    sans-serif;
  line-height: 1.45;
  padding-bottom: 70px;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 11px;
  cursor: pointer;
}
button:hover {
  border-color: var(--green);
}
header {
  min-height: 62px;
  padding: 10px max(16px, calc((100vw - 1440px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
h1 {
  font-size: 17px;
  margin: 0;
}
h1 b,
h1 span,
.green {
  color: var(--green);
}
small,
.muted {
  color: var(--muted);
}
.head-actions {
  display: flex;
  gap: 7px;
}
kbd {
  color: var(--muted);
  font-size: 10px;
}
.ticker {
  height: 35px;
  background: #10151d;
  border-bottom: 1px solid var(--line);
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  align-items: center;
  gap: 30px;
  padding: 0 18px;
}
.ticker span {
  font-weight: 700;
}
.ticker i {
  font-style: normal;
  color: var(--green);
  margin-left: 6px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 16px;
}
.grid {
  display: grid;
  gap: 12px;
}
.macro {
  grid-template-columns: repeat(5, 1fr);
}
.scores {
  grid-template-columns: repeat(4, 1fr);
}
.two {
  grid-template-columns: 1.25fr 0.75fr;
}
.three {
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
}
.card h2,
.card h3 {
  font-size: 13px;
  margin: 0 0 10px;
}
.metric {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.change {
  font-size: 11px;
  font-weight: 700;
}
.red {
  color: var(--red);
}
.yellow {
  color: var(--yellow);
}
.blue {
  color: var(--blue);
}
.signal {
  margin: 12px 0;
  border-color: var(--red);
  display: flex;
  align-items: center;
  gap: 16px;
}
.signal .icon {
  font-size: 36px;
}
.signal strong {
  font-size: 18px;
}
.signal button {
  margin-left: auto;
  background: var(--red);
  border: 0;
  font-weight: 800;
}
.explain {
  margin-bottom: 12px;
  border-left: 3px solid var(--yellow);
}
.score {
  text-align: center;
}
.score .metric {
  font-size: 31px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 9px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
}
.chart {
  height: 240px;
}
.table-wrap {
  overflow: auto;
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.toolbar input,
.toolbar select,
input,
select {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  outline: none;
}
.toolbar input:focus,
input:focus {
  border-color: var(--green);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}
tr[data-t] {
  cursor: pointer;
}
tr[data-t]:hover {
  background: var(--panel2);
}
.pill {
  font-size: 10px;
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 8px;
  background: #20d48a1d;
  color: var(--green);
}
.pill.sell {
  background: #ff5e6c1d;
  color: var(--red);
}
.pill.hold {
  background: #ffc8571d;
  color: var(--yellow);
}
nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 0;
  right: 0;
  height: 61px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}
nav button {
  border: 0;
  border-radius: 0;
  background: transparent;
  min-width: 86px;
  color: var(--muted);
  font-size: 11px;
}
nav button b {
  display: block;
  font-size: 17px;
}
nav button.active {
  color: var(--green);
  border-top: 2px solid var(--green);
}
.ai-fab {
  position: fixed;
  z-index: 21;
  right: 20px;
  bottom: 78px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #05130e;
  font-size: 22px;
  font-weight: bold;
}
dialog {
  width: min(900px, calc(100% - 24px));
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 20px;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(3px);
}
.close {
  float: right;
  font-size: 20px;
  padding: 3px 9px;
}
.detail-top {
  display: flex;
  gap: 20px;
  align-items: center;
}
.detail-top .metric {
  font-size: 35px;
}
.progress {
  height: 8px;
  background: var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--green);
}
#ai {
  width: min(410px, calc(100% - 20px));
  margin: 0 15px 75px auto;
  padding: 0;
}
#ai header {
  position: sticky;
  top: 0;
  padding: 13px;
  min-height: 55px;
}
#ai header small {
  display: block;
}
#chat {
  height: 330px;
  overflow: auto;
  padding: 14px;
}
.bot,
.user {
  padding: 10px;
  border-radius: 9px;
  max-width: 85%;
  background: var(--panel2);
}
.user {
  margin-left: auto;
  background: #176947;
}
.quick {
  padding: 8px;
  display: flex;
  gap: 5px;
  overflow: auto;
}
.quick button {
  font-size: 11px;
  white-space: nowrap;
}
#chatForm {
  padding: 10px;
  display: flex;
  gap: 7px;
  border-top: 1px solid var(--line);
}
#chatForm input {
  flex: 1;
  min-width: 0;
}
.empty {
  text-align: center;
  padding: 50px;
  color: var(--muted);
}
.form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.form-row > * {
  flex: 1;
}
.summary {
  margin-bottom: 12px;
}
.watch-star {
  color: var(--yellow);
}
@media (max-width: 800px) {
  .dashboard-head{align-items:flex-start}.admin-tools .user-chip,.admin-tools button:not(.install-mini){display:none}.macro-strip{grid-template-columns:repeat(2,1fr)}.signal-copy{order:4;margin-left:0;border-left:0;border-top:1px solid var(--line);padding-left:0;width:100%}
  header {
    padding: 9px 12px;
  }
  h1 {
    font-size: 14px;
  }
  .head-actions button:first-child,
  kbd {
    display: none;
  }
  .macro {
    grid-template-columns: repeat(2, 1fr);
  }
  .macro .card:last-child {
    grid-column: span 2;
  }
  .scores {
    grid-template-columns: repeat(2, 1fr);
  }
  .two,
  .three {
    grid-template-columns: 1fr;
  }
  main {
    padding: 10px;
  }
  .signal {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .signal button {
    margin-left: 0;
  }
  nav {
    justify-content: flex-start;
    overflow-x: auto;
  }
  nav button {
    min-width: 72px;
  }
  .chart {
    height: 210px;
  }
}
@media (max-width: 370px) {
  .metric {
    font-size: 20px;
  }
  .card {
    padding: 11px;
  }
  .head-actions #installBtn {
    display: none;
  }
}
.auth-shell {
  width: min(520px, calc(100vw - 32px));
  padding: 28px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.auth-brand b {
  display: block;
  font-size: 16px;
}
.auth-brand small {
  display: block;
  margin-top: 3px;
}
.auth-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #20d48a, #13795a);
  color: #07120e;
  font-size: 24px;
  font-weight: 900;
}
.auth-shell h2 {
  font-size: 22px;
  margin: 0 0 14px;
}
.auth-shell form {
  display: grid;
  gap: 10px;
}
.auth-shell input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  background: #10151d;
  border: 1px solid #334155;
  border-radius: 8px;
  outline: 0;
}
.auth-shell input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #20d48a22;
}
.auth-shell form button {
  height: 44px;
  background: var(--green);
  border-color: var(--green);
  color: #06130d;
  font-weight: 800;
}
.auth-shell > button {
  width: 100%;
  margin-top: 10px;
  height: 42px;
}
.auth-note {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin: 22px 0 0;
  font-size: 11px;
  color: var(--muted);
}
dialog#auth {
  padding: 0;
  border: 1px solid #344054;
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 80px #000b;
}
dialog#auth::backdrop {
  background: #02050acc;
  backdrop-filter: blur(8px);
}
/* Reference-accurate desktop dashboard shell. */
:root{--bg:#0f172a;--panel:#1e293b;--panel2:#172033;--line:#334155;--radius:6px}
body{font-size:12px;line-height:1.35;padding-bottom:52px}
body>header{height:48px;min-height:48px;padding:5px 14px;background:#0f172a;gap:12px}
body>header>div:first-child{display:flex;align-items:center;gap:14px;white-space:nowrap}body>header h1{font-size:16px}body>header #clock{font-size:10px}
.head-actions{align-items:center;gap:5px;overflow:hidden;white-space:nowrap}.head-actions button{padding:5px 8px;font-size:10px}.head-live,.head-chip,.head-admin{font-size:10px;font-weight:800;padding:4px 7px;border-radius:12px;background:#172033}.head-live,.head-admin{color:var(--green)}.orange{color:var(--yellow)}
.ticker{height:27px;padding:0 14px;gap:26px;background:#111827;font-size:10px}
main{max-width:none;padding:8px 12px 80px}.macro-strip{margin:0 0 8px;gap:8px}.card{padding:9px 11px;border-radius:6px}.macro-strip .card{height:67px}.metric{font-size:21px}.signal{height:66px;margin:0 0 8px;padding:8px 12px;gap:10px;background:#24131d;border:2px solid var(--red)}.signal .icon{font-size:25px;white-space:nowrap}.signal strong{display:block;font-size:13px;color:var(--text)}.signal small{display:block;margin-top:5px}.signal-copy{min-width:355px;text-align:right;padding:0 0 0 12px;border-left:1px solid #71313b}.signal-copy b{font-size:20px;color:#fff}
.explain{padding:9px 12px 0;margin:0 0 8px;border-left:1px solid var(--line)}.explain p{margin:3px 0;font-size:11px}.explain footer{margin:7px -12px 0;padding:6px 12px;background:#3a301c;color:var(--yellow);display:flex;align-items:center}.explain .cta{margin-left:auto;padding:4px 8px;font-size:10px}
.scores{gap:8px}.score{height:70px;padding:5px;border-width:1px;border-top-width:3px}.score .metric{font-size:27px;line-height:32px}.score b{font-size:10px;color:var(--muted)}
.legend-row{min-height:28px;padding:6px 2px 3px;gap:14px;font-size:10px}.legend-row small{margin-left:auto}.section-head{margin:18px 0 9px}
nav{height:50px;background:#0f172a}nav button{min-width:100px;font-size:9px;padding:3px 8px}nav button b{font-size:15px}.ai-fab{display:none}
@media (max-width:800px){.head-chip,.head-admin{display:none}.signal{height:auto}.signal-copy{min-width:0;text-align:left}.explain footer{flex-wrap:wrap}.legend-row small{margin-left:0}}
.ticker i.down{color:var(--red)}
.news-list{margin:6px 0 0;padding-left:18px;color:var(--muted);font-size:12px;line-height:1.45}.news-list a{color:var(--blue);text-decoration:none}.news-list a:hover{text-decoration:underline}.news-list small{margin-left:6px;font-weight:700}
