:root {
  --bg: #070a12;
  --panel: #111827;
  --panel-soft: #162033;
  --line: #263247;
  --text: #eef4ff;
  --muted: #94a3b8;
  --green: #22c55e;
  --blue: #38bdf8;
  --red: #ef4444;
  --yellow: #facc15;
  --shadow: 0 22px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, .12), transparent 28rem),
    linear-gradient(145deg, #070a12 0%, #0b1220 48%, #0a0f19 100%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.login-screen { display: grid; place-items: center; padding: 28px; }
.login-shell {
  width: min(1020px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: stretch;
}
.login-brand, .login-card, .panel, .stat-card {
  background: rgba(17, 24, 39, .82);
  border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: var(--shadow);
}
.login-brand {
  min-height: 540px;
  padding: 52px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(rgba(7, 10, 18, .18), rgba(7, 10, 18, .92)),
    url("https://images.unsplash.com/photo-1579952363873-27f3bade9f55?auto=format&fit=crop&w=1300&q=80") center/cover;
}
.league-mark, .brand span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #061014;
  background: var(--green);
  font-weight: 900;
}
.login-brand h1 { margin: 24px 0 12px; font-size: clamp(38px, 6vw, 72px); line-height: .95; letter-spacing: 0; }
.login-brand p { max-width: 560px; color: #d9e7ff; font-size: 18px; }
.club-strip { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.club-strip span, .club, .badge {
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.login-card { padding: 34px; border-radius: 8px; align-self: center; }
.login-card h2 { margin: 0 0 24px; font-size: 30px; }

.app { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: rgba(5, 8, 15, .9);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand strong { font-size: 20px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar a {
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--muted);
  transition: .18s ease;
}
.sidebar a:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.content { padding: 28px; max-width: 1500px; width: 100%; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 22px; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: 0; }
.eyebrow { margin: 0; color: var(--green); text-transform: uppercase; font-size: 12px; font-weight: 900; letter-spacing: 0; }
.profile-mini { display: flex; align-items: center; gap: 12px; }
.profile-mini img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--green); }
.profile-mini span { font-size: 22px; font-weight: 900; }
.crest {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .24);
  background: #0b1220;
  font-weight: 950;
  font-size: 13px;
}
.crest.santos { color: #f8fafc; }
.crest.sao-paulo { color: #fecaca; border-color: #ef4444; }
.crest.corinthians { color: #e5e7eb; border-color: #9ca3af; }
.crest.palmeiras { color: #bbf7d0; border-color: #22c55e; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 18px; border-radius: 8px; }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; margin-top: 8px; font-size: 30px; }
.panel { border-radius: 8px; padding: 20px; margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; font-size: 22px; }
.two-col, .admin-grid, .profile-forms { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; align-items: start; }
.admin-grid, .profile-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }

label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 13px; }
input, select, textarea {
  width: 100%;
  color: var(--text);
  background: #0b1220;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(56, 189, 248, .12); }
textarea { resize: vertical; min-height: 120px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172033;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}
.btn.primary { background: var(--green); color: #061014; border-color: transparent; }
.btn.danger, .danger { border-color: rgba(239, 68, 68, .55); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.btn:disabled { opacity: .55; cursor: wait; }

.notice, .alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: #0b1220;
}
.success { border-color: rgba(34, 197, 94, .45); color: #bbf7d0; }
.warning { border-color: rgba(250, 204, 21, .45); color: #fef08a; }
.danger, .alert { color: #fecaca; background: rgba(127, 29, 29, .22); }

.match-list { display: grid; gap: 10px; margin-bottom: 14px; }
.match-row {
  display: grid;
  grid-template-columns: 1fr 70px 24px 70px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 18, 32, .88);
}
.match-row input { text-align: center; padding: 10px 8px; }
.team { font-weight: 900; }
.team.right { text-align: right; }
.badge.open { color: #bbf7d0; border-color: rgba(34, 197, 94, .45); }
.badge.closed { color: #bae6fd; border-color: rgba(56, 189, 248, .45); }
.badge.classic { color: #fef08a; border-color: rgba(250, 204, 21, .45); }
.guess-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px 10px; }
.guess-cloud span {
  color: #cbd5e1;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}
.result-line {
  color: #bae6fd;
  padding: 0 8px 10px;
  font-size: 13px;
  font-weight: 800;
}

table { width: 100%; border-collapse: collapse; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
tr:hover td { background: rgba(255, 255, 255, .03); }
.team-rank { display: grid; gap: 10px; }
.team-rank div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 18, 32, .75);
}
.round-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.round-tabs a { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.round-tabs a.active { color: var(--text); background: var(--panel-soft); border-color: rgba(56, 189, 248, .45); }
.round-tabs span { color: var(--green); margin-left: 6px; }
.row-form { display: contents; }
.inline-form { display: inline-flex; margin-left: 8px; }
.inline-actions { margin-top: 12px; }
.empty { color: var(--muted); margin: 0; }

.santos { border-color: rgba(255,255,255,.35); }
.sao-paulo { border-color: rgba(239,68,68,.45); }
.corinthians { border-color: rgba(148,163,184,.45); }
.palmeiras { border-color: rgba(34,197,94,.55); }

@media (max-width: 980px) {
  .login-shell, .app, .two-col, .admin-grid, .profile-forms { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-brand { min-height: 360px; padding: 30px; }
}

@media (max-width: 640px) {
  .content, .sidebar, .login-screen { padding: 14px; }
  .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: 1fr; }
  .match-row { grid-template-columns: 1fr 52px 18px 52px 1fr; }
  .match-row .badge { grid-column: 1 / -1; justify-self: start; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
