/* Mesterlövész dashboard — mobil-első, dísztelen. */
:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e2e5ea;
  --fg: #16181d;
  --muted: #6b7280;
  --pos: #127a45;
  --neg: #b3261e;
  --green: #22a45d;
  --yellow: #d99b1a;
  --red: #d13b30;
  --grey: #9aa1ab;
  --accent: #2c5fb5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --card: #1d2026;
    --line: #2c3038;
    --fg: #e8eaee;
    --muted: #9aa1ab;
    --pos: #4ec97e;
    --neg: #ef6a60;
    --accent: #7aa3e8;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }

.wrap { max-width: 720px; margin: 0 auto; padding: 12px 14px 40px; }
body { overflow-x: hidden; }

header.top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; padding: 6px 2px 14px;
}
header.top h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: .2px; }
header.top .ts { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

/* flotta összesítő */
.fleet { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fleet .cell { text-align: center; }
.fleet .label { color: var(--muted); font-size: 12px; text-transform: none; }
.fleet .value { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .fleet { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .fleet .value { font-size: 19px; }
}
.fleet-note { color: var(--muted); font-size: 12px; margin-top: 10px; }

.pos { color: var(--pos); }
.neg { color: var(--neg); }
.num { font-variant-numeric: tabular-nums; }

/* bot kártyák */
.bot {
  display: block; margin-bottom: 10px;
}
.bot .row1 { display: flex; align-items: center; gap: 8px; }
.bot .name { font-weight: 600; flex: 1; }
.bot .last { color: var(--muted); font-size: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.green { background: var(--green); }
.dot.yellow { background: var(--yellow); }
.dot.red { background: var(--red); }
.dot.grey { background: var(--grey); }

.bot .row2 { display: flex; gap: 16px; margin-top: 10px; }
.bot .row2 .item { font-size: 13px; color: var(--muted); }
.bot .row2 .item b { display: block; font-size: 16px; font-weight: 600; color: var(--fg); }
.bot.nodata { opacity: .65; }
.bot .nodata-text { color: var(--muted); font-size: 13px; margin-top: 8px; }

/* riasztások */
h2.sec { font-size: 14px; color: var(--muted); font-weight: 600; margin: 18px 2px 8px; }
.alert { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.alert:last-child { border-bottom: 0; }
.alert .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.alert .lvl { font-weight: 600; }
.alert .lvl.warn { color: var(--yellow); }
.alert .lvl.error, .alert .lvl.crit { color: var(--red); }
.quiet { color: var(--muted); font-size: 14px; }

/* bot oldal */
.back { color: var(--accent); font-size: 14px; display: inline-block; margin-bottom: 10px; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stats .cell { text-align: center; }
.stats .label { color: var(--muted); font-size: 12px; }
.stats .value { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; } }

.chart { width: 100%; height: 200px; }
.trades { width: 100%; border-collapse: collapse; font-size: 14px; }
.trades td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.trades tr:last-child td { border-bottom: 0; }
.trades .t-time { color: var(--muted); white-space: nowrap; }
.trades .t-dir { width: 52px; color: var(--muted); }
.trades .t-profit { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* belépés + beállítás */
.login { max-width: 360px; margin: 14vh auto; padding: 0 16px; }
.login h1 { font-size: 20px; margin: 0 0 16px; }
input[type=password] {
  width: 100%; padding: 12px; font-size: 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg);
}
button {
  width: 100%; margin-top: 10px; padding: 12px; font-size: 16px; font-weight: 600;
  border: 0; border-radius: 10px; background: var(--accent); color: #fff;
}
button[disabled] { opacity: .5; }
.err { color: var(--neg); font-size: 14px; margin-top: 10px; min-height: 20px; }
.footlink { display: block; text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
