@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;500&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --bg: #14171c;
  --panel: #1b1f26;
  --panel-alt: #20242c;
  --text: #edeef0;
  --muted: #8b92a0;
  --accent: #ffb020;
  --up: #4caf6d;
  --down: #e15c5c;
  --rule: #2a2f38;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

header.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 14px;
  margin-bottom: 6px;
}

h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0;
}

.week-label {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--muted);
  font-size: 14px;
}

nav.tabs {
  display: flex;
  gap: 16px;
  margin: 14px 0 28px;
}
nav.tabs a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-family: 'IBM Plex Mono', monospace;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}
nav.tabs a.active, nav.tabs a:hover { color: var(--accent); border-color: var(--accent); }

.poll-row {
  display: grid;
  grid-template-columns: 56px 40px 1fr 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f1efe8;
  border-radius: 10px;
  margin-bottom: 8px;
}
.poll-row:hover { background: #e8e4d8; }

.rank {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: #8a5a10;
  text-align: center;
}

.movement { font-family: 'IBM Plex Mono', monospace; font-size: 12px; text-align: center; }
.movement.up { color: #1f7a4c; }
.movement.down { color: #b33232; }
.movement.same { color: #8b8880; }
.movement.new { color: #8a5a10; }

.team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-cell img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.team-name { font-weight: 500; font-size: 15px; color: #232323; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.record { font-family: 'IBM Plex Mono', monospace; color: #6b6a63; font-size: 14px; text-align: center; }

.last-result { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: #6b6a63; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last-result.w { color: #1f7a4c; }
.last-result.l { color: #b33232; }

select, input, button, textarea {
  font-family: 'Inter', sans-serif;
  background: var(--panel);
  border: 1px solid var(--rule);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}
button {
  background: var(--accent);
  color: #14171c;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
button:hover { opacity: 0.9; }
button.secondary { background: var(--panel-alt); color: var(--text); border: 1px solid var(--rule); }

.empty { color: var(--muted); padding: 40px 0; text-align: center; font-family: 'IBM Plex Mono', monospace; }

.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }

.section { background: var(--panel); border-radius: 10px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--rule); }
.section h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; text-transform: uppercase; margin: 0 0 14px; letter-spacing: 0.5px; }

#order-list { list-style: none; margin: 0; padding: 0; }
#order-list li {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-alt); border: 1px solid var(--rule); border-radius: 6px;
  padding: 8px 10px; margin-bottom: 6px; cursor: grab;
}
#order-list li .n { font-family: 'IBM Plex Mono', monospace; color: var(--accent); width: 24px; }
#order-list li img { width: 22px; height: 22px; object-fit: contain; }
#order-list li button { padding: 2px 8px; margin-left: auto; }

.msg { font-family: 'IBM Plex Mono', monospace; font-size: 13px; margin-top: 10px; }
.msg.ok { color: var(--up); }
.msg.err { color: var(--down); }
