/* The team's dashboard, and the members' sign-in pages. Same tokens as the members' board (member.css), so the two read
   as one product. A sidebar from 1000px wide; below that the sidebar becomes a top bar with the sections in a row.
   No inline styles anywhere: the app's Content-Security-Policy refuses them. */
:root {
  --bg: #0A111D; --side: #0C1422; --card: #111B2B; --raised: #15243B; --hover: #182842; --border: #1F2B3E; --track: #24324A;
  --text: #EEF2F7; --soft: #C9D3E1; --muted: #8B98AC; --faint: #5D6B80;
  --accent: #3D7FEA; --accent-tint: rgba(61, 127, 234, 0.16); --accent-line: rgba(61, 127, 234, 0.4); --accent-text: #93B8F6;
  --green: #34C77B; --green-tint: rgba(52, 199, 123, 0.14); --green-text: #6FDDA2;
  --amber: #F0B03F; --amber-tint: rgba(240, 176, 63, 0.14); --amber-text: #F5C76E; --amber-line: rgba(240, 176, 63, 0.38);
  --red: #EF5B50; --red-tint: rgba(239, 91, 80, 0.15); --red-text: #F58D84; --red-line: rgba(239, 91, 80, 0.42);
  --grey-tint: rgba(139, 152, 172, 0.16);
  --sans: 'Instrument Sans', 'Helvetica Neue', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--raised); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; color: var(--soft); word-break: break-all; }
h1, h2, h3, p { margin: 0; }
h3 { font-size: 11px; font-family: var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 22px 0 10px; }
svg { display: block; flex: none; }
.muted { color: var(--muted); font-size: 13px; }
.faint { color: var(--faint); font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- the frame ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.side { background: var(--side); border-bottom: 1px solid var(--border); padding: 12px 16px 0; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 15px; }
.logo:hover { text-decoration: none; }
.logo img { border-radius: 6px; }
.logo em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent-text); background: var(--accent-tint); padding: 2px 8px; border-radius: 99px; }
.side .group { display: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; margin: 10px -4px 0; padding-bottom: 8px; }
.nav { scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav.preview { display: none; }
.t code { white-space: nowrap; word-break: normal; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--raised); color: var(--text); font-weight: 600; }
.nav a.on svg { stroke: var(--accent); }
.side .out { display: none; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 16px 4px; }
.top h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.top p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.top .actions { display: flex; gap: 10px; align-items: center; }
.content { padding: 14px 16px 40px; display: flex; flex-direction: column; gap: 16px; }

@media (min-width: 1000px) {
  .shell { flex-direction: row; }
  .side { position: sticky; top: 0; height: 100vh; width: 240px; flex: none; display: flex; flex-direction: column; border-bottom: 0; border-right: 1px solid var(--border); padding: 22px 14px; }
  .logo { padding: 0 10px; }
  .side .group { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--faint); padding: 0 12px; margin: 26px 0 8px; }
  .nav, .nav.preview { display: flex; flex-direction: column; gap: 2px; margin: 0; overflow: visible; padding: 0; }
  .nav a { padding: 9px 12px; }
  .side .out { display: block; margin-top: auto; }
  .side .out button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 10px; background: none; color: var(--muted); font-weight: 500; }
  .side .out button:hover { background: var(--raised); color: var(--text); }
  .top { height: 76px; padding: 0 32px; border-bottom: 1px solid var(--border); }
  .content { padding: 26px 32px 48px; gap: 20px; }
}

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.tile .k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tile .k i { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-tint); }
.tile .k i.amber { background: var(--amber-tint); }
.tile .k i.green { background: var(--green-tint); }
.tile .v { display: block; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 10px; line-height: 1.1; }
.tile .v.amber { color: var(--amber-text); }
.tile .n { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

/* ---------- cards and grids ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .head { padding: 18px 20px 0; }
.card.narrow { max-width: 400px; width: 100%; margin: 12vh auto 0; padding: 26px; }
.card.narrow h1 { font-size: 20px; margin-bottom: 8px; }
.card.narrow p { margin-bottom: 10px; color: var(--soft); }
.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.head h2 { font-size: 15px; font-weight: 600; }
.head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.head .count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--raised); border-radius: 99px; padding: 2px 9px; margin-left: 8px; }
.grid { display: grid; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.two { display: grid; gap: 16px; }
@media (min-width: 1000px) {
  .grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
  .two { grid-template-columns: 1fr 1fr; gap: 20px; }
}
.scroll { overflow-x: auto; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; }
.t th { text-align: left; font-size: 11.5px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 20px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.t td { padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
.t .num { text-align: right; white-space: nowrap; }
.t .r { text-align: right; }
.t .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.t .main-link { color: var(--text); font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-weight: 600; }
.who div span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--accent-tint); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.pos { color: var(--green-text); }
/* The plain tables on an account's page, laid out the way MetaTrader lays its own out. */
.list, .facts { font-size: 13px; }
.list th, .facts th { text-align: left; color: var(--muted); font-weight: 500; padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.list td, .facts td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.list td.num, .list th.num { text-align: right; white-space: nowrap; }
.small-text td { font-family: var(--mono); font-size: 12px; }
table.facts { width: auto; min-width: 60%; }
table.facts td { font-family: var(--mono); }
table.facts td.muted { font-family: var(--sans); }
.cur { color: var(--muted); font-size: 12px; }
.bad-text { color: var(--red-text); }

/* ---------- states ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.green { color: var(--green-text); background: var(--green-tint); }
.pill.amber { color: var(--amber-text); background: var(--amber-tint); }
.pill.red { color: var(--red-text); background: var(--red-tint); }
.pill.grey { color: var(--muted); background: var(--grey-tint); }
.pill.blue { color: var(--accent-text); background: var(--accent-tint); }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--soft); background: var(--raised); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.chip.novex { color: var(--accent-text); background: var(--accent-tint); border-color: var(--accent-line); }
.chip.fleet { color: var(--green-text); background: var(--green-tint); border-color: rgba(52, 199, 123, 0.35); }
/* A state is always said in words beside its dot, so colour is never the only signal. */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--faint); flex: none; }
.dot.good { background: var(--green); }
.dot.warn { background: var(--amber); }
.dot.bad { background: var(--red); }
.dot.busy { background: var(--accent); }
.status { display: flex; flex-direction: column; }
.status > div { display: flex; align-items: flex-start; gap: 4px; padding: 11px 0; border-top: 1px solid var(--border); }
.status > div:first-child { border-top: 0; padding-top: 0; }
.status .dot { margin-top: 6px; }
.status b { display: block; font-weight: 600; font-size: 13.5px; }
.status span { display: block; font-size: 12.5px; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 20px; color: var(--muted); }
.empty i { width: 40px; height: 40px; border-radius: 12px; background: var(--green-tint); display: inline-flex; align-items: center; justify-content: center; }
.empty b { color: var(--text); font-size: 14px; }

.notice { border-radius: 12px; padding: 12px 16px; border: 1px solid var(--border); background: var(--raised); color: var(--soft); }
.notice.good { border-color: rgba(52, 199, 123, 0.4); background: var(--green-tint); }
.notice.warn { border-color: var(--amber-line); background: var(--amber-tint); }
.notice.bad { border-color: var(--red-line); background: var(--red-tint); }
.notice.busy { border-color: var(--accent-line); background: var(--accent-tint); }

/* ---------- forms and buttons ---------- */
form { margin: 0; }
label { display: block; margin: 12px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 500; }
label.tick { display: flex; gap: 8px; align-items: center; color: var(--text); font-size: 13.5px; }
label.tick input { display: inline; width: auto; margin: 0; }
input, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
input::placeholder { color: var(--faint); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
button.ghost, .btn.ghost { background: var(--raised); border-color: var(--border); color: var(--text); }
button.small, .btn.small { margin: 0; padding: 6px 11px; font-size: 12.5px; }
button.link { margin: 0; padding: 0; background: none; border: 0; color: var(--accent-text); font-weight: 500; }
button:disabled, input:disabled, select:disabled { opacity: 0.45; cursor: not-allowed; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
details.more { background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
details.more summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary span { font-weight: 400; color: var(--muted); font-size: 12.5px; }
details.more > div { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 16px; }
details.more > div .card { background: var(--bg); }

/* ---------- the members' sign-in pages ---------- */
.plain .top-plain { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--side); }
.plain main { padding: 0 16px 40px; }
.plain .card.narrow button { width: 100%; }

/* Cards on an account's page, which carry a plain heading and a line under it. */
.card { overflow-x: auto; }
.card.flush { overflow: hidden; }
.card > h2 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card > p.muted { margin-bottom: 14px; }
.card > .notice { margin-top: 14px; }
.card > table + table { margin-top: 12px; }
