:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --panel-muted: #f8fafc;
  --border: #dbe3ef;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #111827;
  --accent-2: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; color: var(--text); background: #f1f5f9; }
a { color: inherit; text-decoration: none; }
code { background: #eef2ff; padding: 2px 6px; border-radius: 6px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #020617, #0f172a 60%, #1e293b); }
.login-card { width: min(540px, 100%); background: rgba(255,255,255,.98); border-radius: 28px; padding: 32px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.eyebrow { display: inline-block; padding: 8px 12px; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 13px; }
h1 { margin: 12px 0 8px; font-size: 34px; }
h2 { margin: 0 0 12px; font-size: 24px; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 10px; margin-top: 20px; }
input[type=text], input[type=password], input[type=file], select { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
button { border: 0; background: var(--accent); color: #fff; padding: 14px 18px; border-radius: 14px; font-weight: 600; cursor: pointer; }
button.secondary { background: #e2e8f0; color: #0f172a; }
button.danger { background: var(--danger); }
button.small { padding: 8px 12px; border-radius: 10px; }
button.full { width: 100%; }
.help-box, .sidebar-card, .panel, .stat-card, .alert { border: 1px solid var(--border); background: var(--panel); border-radius: 22px; }
.help-box { margin-top: 18px; padding: 14px 16px; color: var(--muted); }
.alert { padding: 14px 16px; margin-bottom: 18px; }
.alert.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert.success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg); color: #fff; padding: 22px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 18px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 46px; height: 46px; border-radius: 16px; background: #fff; color: #111827; display: grid; place-items: center; font-weight: 700; }
.brand-sub { font-size: 13px; color: #cbd5e1; }
.brand-title { font-weight: 700; font-size: 20px; }
.nav { display: grid; gap: 8px; }
.nav-link { padding: 14px 16px; border-radius: 16px; color: #e2e8f0; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-card { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.08); padding: 14px; color: #fff; align-self: start; }
.small-label { font-size: 12px; color: #cbd5e1; margin-bottom: 8px; }
.tiny { font-size: 12px; word-break: break-word; color: #e2e8f0; margin-top: 6px; }
.tiny-title { font-size: 12px; color: #cbd5e1; margin-top: 10px; }
.tiny-value { font-size: 14px; color: #fff; margin-top: 4px; word-break: break-word; }
.recent-title { margin-top: 16px; }
.main { padding: 28px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 22px; }
.compact-head { margin-bottom: 18px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { background: #e2e8f0; border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.stats-grid, .grid-two { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stat-card { padding: 22px; }
.stat-label { color: var(--muted); font-size: 14px; }
.stat-value { margin-top: 10px; font-size: 28px; font-weight: 700; }
.stat-value.smallish { font-size: 20px; }
.small-note { margin-top: 6px; font-size: 13px; }
.panel { padding: 22px; margin-bottom: 18px; }
.panel.compact { padding: 16px 22px; }
.meta-grid { display: grid; gap: 18px; }
.meta-grid.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.upload-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.empty { margin-top: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.log-list { margin: 0; padding-left: 18px; }
.log-list li { margin-bottom: 10px; }
.player-sidebar-card select { background: rgba(255,255,255,.96); color: #0f172a; border: 1px solid rgba(255,255,255,.18); }
.sidebar-player-form { margin-bottom: 10px; }
.player-label-stat { font-size: 22px; line-height: 1.2; }
.sidebar-activity-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.sidebar-activity-list li { border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.activity-time { font-size: 11px; color: #cbd5e1; margin-bottom: 4px; }
.activity-message { font-size: 13px; color: #fff; line-height: 1.35; word-break: break-word; }
.upload-progress { flex: 1 1 320px; min-width: 220px; }
.hidden { display: none; }
.progress-track { width: 100%; height: 12px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress-fill { width: 0; height: 100%; background: linear-gradient(90deg, #2563eb, #0ea5e9); transition: width .15s ease; }
.progress-text { margin-top: 6px; color: var(--muted); font-size: 13px; }
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { grid-template-rows: auto auto auto auto; }
  .meta-grid.two-col { grid-template-columns: 1fr; }
  .page-head, .section-head { flex-direction: column; }
}
