* { box-sizing: border-box; }

:root {
  --bg: #050805;
  --card: rgba(255, 255, 255, 0.06);
  --card-2: rgba(0, 0, 0, 0.24);
  --border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: #b8c7b8;
  --green: #39d515;
  --green-soft: rgba(57, 213, 21, 0.16);
  --danger: #ff5b5b;
  --radius: 18px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 15%, rgba(57, 213, 21, 0.18), transparent 30%),
    radial-gradient(circle at 10% 85%, rgba(57, 213, 21, 0.08), transparent 30%),
    var(--bg);
}

a { color: inherit; }
button, .button-link {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--green);
  color: #071007;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
button:hover, .button-link:hover { filter: brightness(1.06); }
button.secondary, .button-muted { background: #2a2f2a; color: #fff; }
button.danger, .button-danger { background: rgba(255, 91, 91, .14); color: #ffb4b4; border: 1px solid rgba(255, 91, 91, .32); }
button.full, .button-link.full { width: 100%; }

input, textarea, select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.35);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(57,213,21,.75); box-shadow: 0 0 0 3px rgba(57,213,21,.12); }
label { font-size: 13px; font-weight: 800; color: #e8ffe8; }

.home-shell, .page-shell { width: min(1100px, 100%); margin: 0 auto; padding: 24px; }
.home-shell { min-height: 100vh; display: grid; align-content: center; gap: 18px; }
.home-hero { text-align: center; padding: 8px 0; }
.home-badge-logo { width: min(360px, 100%); height: auto; }
.home-card, .panel, .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.home-header h1, .panel-header h1 { margin: 0 0 8px; font-size: 28px; }
.home-header p, .panel-header p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.home-footer { text-align: center; padding: 8px; color: var(--muted); font-size: 13px; }
.home-footer a { color: var(--muted); text-decoration: none; }

.grid { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.section-title { margin: 0 0 12px; font-size: 18px; }
.back-link { color: var(--green); text-decoration: none; font-weight: 900; display: inline-block; margin-bottom: 14px; }

.create-box, .form-block, details {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card-2);
  border: 1px solid var(--border);
}
.create-box h2, .form-block h2 { margin: 0 0 12px; font-size: 18px; }
.nav-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(0,0,0,.26);
  border: 1px solid var(--border);
  text-decoration: none;
}
.nav-card strong { color: var(--green); }
.nav-card span { color: var(--muted); font-size: 13px; line-height: 1.4; }

summary { cursor: pointer; font-weight: 900; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '+'; color: var(--green); font-size: 20px; margin-right: 8px; }
details[open] summary::before { content: '−'; }
.details-content { margin-top: 16px; display: grid; gap: 12px; }
.search-input { margin-bottom: 12px; }

.player-block, .staff-row, .sheet-row, .list-item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.1);
}
.list-item { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.list-item h3 { margin: 0 0 4px; font-size: 16px; }
.list-item p { margin: 2px 0; color: var(--muted); font-size: 13px; }
.small { font-size: 12px; color: var(--muted); }
.hidden { display: none !important; }

.output-box {
  white-space: pre;
  overflow: auto;
  max-height: 360px;
  background: #030503;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  font-family: Consolas, monospace;
  font-size: 13px;
}

@media (max-width: 760px) {
  .home-shell, .page-shell { padding: 16px; }
  .home-card, .panel, .card { padding: 18px; border-radius: 18px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .list-item { display: grid; }
  .home-badge-logo { width: 260px; }
}

.create-box + .create-box,
.create-box + .form-block,
.form-block + details,
details + details,
.panel > .create-box,
.panel > .form-block,
.panel > details {
  margin-top: 14px;
}

.small-btn {
  width: auto;
  max-width: max-content;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
}

.sheet-row > .small-btn,
.staff-row > .small-btn,
.player-block > .small-btn {
  justify-self: end;
}

.list-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.output-box {
  min-height: 180px;
}

.auth-loading > *:not(.auth-error-box) {
  visibility: hidden;
}

.auth-error-box {
  max-width: 760px;
  margin: 24px auto;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 80, 80, .12);
  border: 1px solid rgba(255, 80, 80, .35);
  color: #ffd2d2;
  font-weight: 700;
}

.auth-card {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.logout-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  width: auto;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--text);
}

.logout-btn:hover {
  background: rgba(255,255,255,.14);
}

.status-card {
  text-align: center;
  display: grid;
  gap: 12px;
}

.status-card h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
}

.status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.status-kicker {
  color: var(--green) !important;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.status-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  background: rgba(255, 91, 91, .16);
  color: #ffb4b4;
  border: 1px solid rgba(255, 91, 91, .35);
}

.danger-card {
  border-color: rgba(255, 91, 91, .35);
  box-shadow: 0 24px 80px rgba(255, 91, 91, .08), 0 24px 80px rgba(0,0,0,.28);
}

.center-actions {
  justify-content: center;
}

.log-line {
  opacity: .85;
}

.section-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.section-headline h2,
.section-headline p {
  margin: 0;
}

.section-headline.compact {
  align-items: center;
}

.section-headline.compact strong {
  color: var(--green);
}
