/* =========================================================
   BASE / RESET
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --container-max: 980px;
  --green: #014421;
  --white: #fff;
  --black: #000;
  --card-radius: 12px;

  /* Logo sizing hierarchy */
  --logo-nrl-desktop: 120px;
  --logo-nrl-mobile: 80px;
  --logo-team: 48px;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--green);
  color: var(--white);
  font: 16px/1.4 Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* =========================================================
   SHARED LAYOUT (ADMIN / TRACKER)
   ========================================================= */
.page-wrap {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2.8vw, 18px);
  margin: 8px 0 6px;
  padding: 6px 0;
  line-height: 1.05;
  font-weight: 800;
  font-size: clamp(18px, 6vw, 40px);
  white-space: nowrap;
  text-align: center;
}

h1 img {
  width: var(--logo-team);
  height: auto;
  flex: 0 0 auto;
}

/* =========================================================
   ADMIN PAGE — HEADER + TOOL SPACING (AUTHORITATIVE)
   ========================================================= */
.admin-page h1 {
  margin-bottom: 6px;
}

.admin-page .header-actions {
  margin-bottom: 6px;
}

.admin-page #admin-panel-container {
  margin-top: 10px;
}

/* =========================================================
   RULES PAGE
   ========================================================= */
.rules-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.rules-grid {
  display: grid;
  gap: 28px;
  margin-top: 24px;
}

.rules-section h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

.rules-section ul {
  margin: 0;
  padding-left: 18px;
}

.rules-section li {
  margin-bottom: 6px;
  line-height: 1.4;
}

/* =========================================================
   HEADER BUTTON GROUPS
   ========================================================= */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* =========================================================
   ROUND LOCK INDICATOR
   ========================================================= */
#fixture-container .round-box {
  position: relative;
}

.locked-note {
  position: absolute;
  top: 38px;
  left: 10px;
  font-size: 34px;
  font-weight: 900;
  color: #b00000;
  background: rgb(253, 252, 252);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  display: none;
  z-index: 5;
}

@media (max-width: 600px) {
  .locked-note {
    font-size: 18px;
    padding: 6px 12px;
  }
}

/* =========================================================
   BUTTONS (GLOBAL)
   ========================================================= */
button {
  background: var(--black);
  color: var(--white);
  padding: 12px 18px;
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,.2);
  transition: background-color .2s ease;
}

/* =========================================================
   ADMIN – PULL USER SELECT UP
   ========================================================= */

.admin-page #admin-card {
  margin-top: 8px;      /* was effectively much larger */
}

/* =========================================================
   LOGO SCATTER (GLOBAL BACKGROUND)
   ========================================================= */
#logo-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

#logo-container .scattered-logo {
  width: clamp(46px, 5.5vw, 72px);
  height: auto;
  transform: translate(-50%, -50%);
  transform-origin: center;
  opacity: 0.75;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
  will-change: transform, left, top;
}

/* =========================================================
   LOGIN / REGISTER
   ========================================================= */
body.login-page {
  min-height: 100vh;
  background: var(--green);
  overflow: hidden;
  position: relative;
}

body.login-page #status-message,
body.login-page #login-stack {
  position: relative;
  z-index: 2;
}

body.login-page #status-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #28a745;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 800;
  opacity: 0;
  transition: opacity .4s ease;
  z-index: 9999;
  pointer-events: none;
}

body.login-page #login-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(480px, 92vw);
  margin: 10px auto 0;
  text-align: center;
}

body.login-page #center-logo {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

body.login-page #center-logo img {
  width: var(--logo-nrl-desktop);
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

body.login-page #nrl-heading {
  margin-top: 8px;
  font-weight: 900;
  font-size: 3rem;
  letter-spacing: 1px;
  white-space: nowrap;
  text-shadow: 2px 2px 5px rgba(0,0,0,.5);
}

body.login-page .card {
  margin: 0 auto;
  width: 100%;
  max-width: 450px;
  padding: 2.4rem;
  border-radius: var(--card-radius);
  background-color: rgba(6, 243, 25, 0.7);
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  text-align: center;
}

body.login-page input {
  width: 100%;
  padding: 1rem;
  margin: 0.6rem 0;
  border-radius: 8px;
  border: none;
  font-size: 1.1rem;
}

body.login-page form button {
  width: 100%;
  padding: 1rem;
  background-color: #1b8d59;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
}

body.login-page form button:hover {
  background-color: #13894d;
}

body.login-page a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

body.login-page a:hover {
  text-decoration: underline;
}

body.login-page .success { color: #28a745; }
body.login-page .error { color: #dc3545; }

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 768px) {
  body.login-page #center-logo img {
    width: var(--logo-nrl-mobile);
  }

  body.login-page #nrl-heading {
    font-size: 2rem;
    white-space: normal;
  }
}

/* =========================================================
   ROUND TITLE
   ========================================================= */
.round-title {
  text-align: center;
  font-size: clamp(60px, 11vw, 88px);
  font-weight: 900;
  margin: 12px 0 18px;
  padding: 8px 0;
  color: #000;
}
/* =========================================================
   ADMIN – FORCE NORMAL FLOW (FIX BUTTON DROPPING)
   ========================================================= */

.admin-page #admin-panel-container {
  display: block !important;
  margin-top: 12px;
}

.admin-page #admin-button-column {
  position: static !important;
  margin-top: 0 !important;
  align-items: flex-start;
}

/* =========================================================
   ADMIN – UNIFORM BUTTONS
   ========================================================= */

.admin-page #admin-button-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Force all admin buttons to match */
.admin-page #admin-button-column button {
  width: 260px;              /* adjust if you want wider */
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

/* Header actions layout */
#admin-header-actions{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}

#admin-header-actions .header-left{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

#admin-header-actions .header-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;   /* key: right aligned */
  gap:8px;
}

#admin-header-actions .button-row{
  display:flex;
  gap:10px;
  justify-content:flex-end;
}

#season-switcher{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
/* =========================================================
   40/20 CHECKBOX – FORCE CONSISTENT LOCKED VISUAL
   (Do NOT rely on native checkbox styling)
   ========================================================= */

input.forty-twenty{
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #555;
  border-radius: 4px;
  background: #fff;
  position: relative;
  cursor: pointer;
}

/* Checked state */
input.forty-twenty:checked::after{
  content: "✓";
  position: absolute;
  top: -3px;
  left: 4px;
  font-size: 20px;
  font-weight: 900;
  color: #014421; /* NRL green */
}

/* Disabled (lockout ON) */
input.forty-twenty:disabled{
  background: #e5e5e5;
  border-color: #999;
  opacity: 0.55;
  cursor: not-allowed;
}

/* Disabled + checked */
input.forty-twenty:disabled:checked::after{
  color: #888;
}

/* =========================================
   ADMIN PRE-PAINT GUARD (NO FLASH)
========================================= */
body.admin-shell {
  display: none;
}

