﻿:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #d7deea;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0d9488;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #e6fbf8, var(--bg) 60%);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.login-view {
  min-height: 80vh;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.login-card h1 {
  margin: 0;
  font-size: 1.4rem;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1.6rem;
}

.view-switch {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.view-switch .secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--border);
}

.hidden {
  display: none;
}

.controls {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.scan-history {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
  align-items: end;
}

.control {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

.control span {
  color: var(--muted);
}

select,
input,
button {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.95rem;
}

button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  margin-top: 12px;
  color: var(--muted);
}

.meta {
  margin-top: 6px;
  font-size: 0.92rem;
}

.events {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.injury-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.injury-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.injury-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.injury-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}

.injury-table {
  width: 100%;
  border-collapse: collapse;
}

.injury-table th,
.injury-table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.injury-table th {
  background: #eef5ff;
  color: #0c4a6e;
}

.injury-source {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: #0c4a6e;
}

.guide-panel {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.guide-panel h2,
.guide-panel h3 {
  margin: 0;
}

.guide-panel p,
.guide-panel li {
  font-size: 0.95rem;
  line-height: 1.45;
}

.guide-panel ol,
.guide-panel ul {
  margin: 0;
  padding-left: 18px;
}

.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.event-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  cursor: pointer;
  padding: 14px;
}

.event-summary::-webkit-details-marker {
  display: none;
}

.event-summary::after {
  content: "▸";
  margin-left: auto;
  color: #0c4a6e;
}

.event-dropdown[open] .event-summary::after {
  content: "▾";
}

.event-body {
  padding: 0 14px 14px;
}

.event-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.commence {
  color: var(--muted);
  font-size: 0.92rem;
}

.market {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: #f8fbff;
}

.market-title {
  margin: 0 0 8px;
  font-size: 0.98rem;
  color: #0c4a6e;
}

.aggregate-meta {
  margin: 0 0 10px;
  color: #334155;
  font-size: 0.92rem;
}

.outcomes-list {
  display: grid;
  gap: 6px;
}

.outcome-row {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid #b7c7dd;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.outcome-name {
  font-size: 0.96rem;
  font-weight: 600;
}

.outcome-price {
  text-align: right;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 700;
}

.empty {
  color: var(--muted);
}

@media (max-width: 900px) {
  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .scan-history {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .outcome-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .outcome-price {
    text-align: left;
  }
}
