:root {
  --bg: #0d1a14;
  --panel: #13241c;
  --panel-2: #1a3026;
  --line: #2a4436;
  --chalk: #eef3ee;
  --muted: #9db3a6;
  --accent: #f2c94c;
  --accent-ink: #1b1600;
  --win: #6fdc8c;
  --bad: #ff8a7a;
  --P: #f2994a;
  --D: #56ccf2;
  --C: #6fdc8c;
  --A: #eb5757;
  --radius: 10px;
  font-family: "Barlow", system-ui, -apple-system, Segoe UI, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--chalk); font-size: 15px; line-height: 1.4; }
a { color: var(--accent); }
h1, h2, h3, .display { font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif; letter-spacing: 0.01em; margin: 0; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 16px; }
header.top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #102219, var(--bg)); }
header.top h1 { font-size: 28px; font-weight: 700; }
.sub { color: var(--muted); font-size: 13px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pill.live { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.pill.done { color: #062b12; background: var(--win); border-color: var(--win); font-weight: 700; }
.pill.warn { color: #2b0905; background: var(--bad); border-color: var(--bad); font-weight: 700; }
.progress { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; min-width: 160px; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .6s ease; }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .grid-main { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.panel h2 { font-size: 15px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 10px; letter-spacing: 0.08em; }

.lot-head { display: flex; gap: 14px; align-items: center; }
.role { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-weight: 800; color: #0b0b0b; flex: none; font-family: "Barlow Condensed", sans-serif; font-size: 20px; }
.role.sm { width: 22px; height: 22px; font-size: 13px; border-radius: 5px; }
.role.P { background: var(--P); } .role.D { background: var(--D); } .role.C { background: var(--C); } .role.A { background: var(--A); }
.lot-name { font-size: 34px; font-weight: 700; line-height: 1.05; }
.lot-meta { color: var(--muted); font-size: 14px; }
.statline { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.stat { background: var(--panel-2); border-radius: 6px; padding: 4px 8px; font-size: 13px; }
.stat b { color: var(--chalk); }
.called { margin-top: 6px; color: var(--muted); font-size: 14px; }
.ladder { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; min-height: 40px; }
.step { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 10px; border-radius: 6px; background: var(--panel-2); animation: pop .25s ease; }
.step .amt { font-family: "Barlow Condensed", sans-serif; font-size: 22px; font-weight: 700; }
.step.win { background: var(--accent); color: var(--accent-ink); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.verdict { margin-top: 12px; font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 700; color: var(--accent); min-height: 32px; }
.comments { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.comment { font-size: 14px; color: var(--muted); }
.comment b { color: var(--chalk); font-weight: 600; }
.comment .src { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }

.feed { display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow: auto; }
.sale { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sale .who { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale .price { font-family: "Barlow Condensed", sans-serif; font-size: 20px; font-weight: 700; text-align: right; }
.sale .delta { font-size: 11px; color: var(--muted); display: block; }

.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.team { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-width: 0; }
.team.flash { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.team-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.team-head h3 { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credits { font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 700; color: var(--accent); }
.slots { display: flex; gap: 6px; margin: 6px 0 8px; flex-wrap: wrap; }
.slot { font-size: 12px; padding: 2px 6px; border-radius: 5px; background: var(--panel-2); }
.roster { font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.roster .r { display: flex; justify-content: space-between; gap: 8px; }
.roster .r span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster .r .p { color: var(--muted); }
.reveal { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.reveal b { color: var(--chalk); }

.banner { margin-top: 16px; padding: 16px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--accent); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.btn { display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 8px 14px; border-radius: 8px; text-decoration: none; cursor: pointer; font-size: 14px; font-family: inherit; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.empty { color: var(--muted); font-style: italic; }
footer { color: var(--muted); font-size: 12px; padding: 24px 16px; text-align: center; }

/* forms (guida / admin) */
.narrow { max-width: 720px; margin: 0 auto; padding: 24px 16px; }
textarea, input[type=text], input[type=password] { width: 100%; background: var(--panel-2); color: var(--chalk); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: inherit; font-size: 16px; }
textarea { min-height: 140px; resize: vertical; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
.count.over { color: var(--bad); font-weight: 700; }
.examples { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.example { text-align: left; background: var(--panel-2); border: 1px solid var(--line); color: var(--chalk); border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; font-size: 14px; }
.msg { margin-top: 10px; min-height: 22px; }
.msg.ok { color: var(--win); } .msg.err { color: var(--bad); }
table.links { width: 100%; border-collapse: collapse; font-size: 14px; }
table.links td, table.links th { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
table.links code { word-break: break-all; font-size: 12px; }
