/* Athlete Review UI (Light) - v1
   Design goals: clean, analytical, JudoTV-adjacent.
*/

/* Optional: Inter font (falls back to system fonts if blocked) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --text: #0f172a;          /* slate-900 */
  --text-muted: #475569;    /* slate-600 */
  --text-faint: #64748b;    /* slate-500 */
  --border: #e5e7eb;        /* gray-200 */
  --border-2: #d1d5db;      /* gray-300 */
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.05);
  --radius: 14px;
  --radius-sm: 10px;
  --pad: 16px;

  --accent: #111827;        /* near-black */
  --accent-2: #334155;      /* slate-700 */
  --danger: #b42318;

  --whiteSide: #ffffff;
  --blueSide: #2563eb;      /* blue-600 */
  --blueSide-2: #1d4ed8;    /* blue-700 */

  --focus: rgba(37, 99, 235, 0.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  line-height: 1.45;
}

a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 28px auto 64px;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
}

h1 {
  font-size: 22px;
  margin: 0 0 10px;
  font-weight: 700;
}

h2 {
  font-size: 14px;
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p { margin: 10px 0; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 6px;
}

/* Panels / cards */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow-sm);
  margin: 14px 0;
}

.card + .card { margin-top: 16px; }

.row {
  display: grid;
  gap: 14px;
}

@media (min-width: 780px) {
  .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.row > div > div {
  font-size: 14px;
  color: var(--text);
}

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

/* Inputs */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  outline: none;
  transition: box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

textarea { min-height: 110px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px var(--focus);
  background: #fff;
}

::placeholder { color: #94a3b8; }

/* Buttons */
button, .btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}

button:active, .btn:active { transform: translateY(1px); }

button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.15);
}
button:hover { background: #0b1220; }

button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
button.secondary:hover { background: #f8fafc; border-color: var(--border-2); }

button.danger {
  background: var(--danger);
  color: #fff;
}
button.danger:hover { filter: brightness(0.95); }

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

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.actions h2 { margin: 0; }

/* Badges / pills */
.badge, .pill, .sidepill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  color: var(--text);
}

.badge { background: #f1f5f9; border-color: #e2e8f0; }

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 12px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  font-size: 14px;
}

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover td { background: #fbfdff; }

/* Dialogs */
dialog {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.28);
}

/* Video */
video {
  border-radius: 16px;
  background: #000;
}

/* Timeline (keeps your existing class names) */
.timeline { margin-top: 14px; }
.trow {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 10px 0;
  border-top: 1px solid #eef2f7;
}
.tcell { min-height: 44px; display:flex; align-items:center; }
.tstamp {
  justify-content: center;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 650;
  text-decoration: none;
}
.tstamp:hover { text-decoration: underline; }

.cardbox {
  width: 100%;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.cardbox.white {
  background: #fff;
}

.cardbox.blue {
  background: linear-gradient(0deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.08)), #fff;
  border-color: rgba(37, 99, 235, 0.25);
}

.cardbox .big {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 4px;
}

.cardbox .sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* Fight header white/blue name bars (works with your existing .fighterbar/.fighter classes) */
.fighterbar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.fighter {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.fighter strong { font-size: 16px; }
.fighter .tag {
  font-size: 12px;
  font-weight: 750;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f8fafc;
  color: var(--text);
}
.fighter.blue {
  border-color: rgba(37, 99, 235, 0.25);
  background: linear-gradient(0deg, rgba(37, 99, 235, 0.10), rgba(37, 99, 235, 0.10)), #fff;
}

/* Utility */
hr {
  border: 0;
  height: 1px;
  background: #eef2f7;
  margin: 16px 0;
}

small { color: var(--text-faint); }

