:root {
  color-scheme: light;
  --ink: #1B2B4A;
  --muted: #616163;
  --line: rgba(255, 246, 220, .16);
  --soft: #FFF6DC;
  --paper: #fffaf0;
  --green: #F36C36;
  --green-2: #1B2B4A;
  --gold: #FDC32E;
  --red: #b53535;
  --blue: #1B2B4A;
  --sea: #F89734;
  --lemon: #CBDD11;
  --ivory: #FFF6DC;
  --storm: #616163;
  --shadow: 0 18px 48px rgba(27, 43, 74, .24);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ivory);
  background: #101a2d;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, #F36C36, #F89734);
  color: #fff;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
}

button.secondary { background: #e8f0eb; color: var(--ink); }
button.danger { background: var(--red); }
button.ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
button:disabled { opacity: .45; cursor: not-allowed; }

.utilitybar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 42px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: #0d1728;
  color: rgba(255,246,220,.78);
  border-bottom: 1px solid rgba(255,246,220,.14);
  font-size: 14px;
}

.utilitybar span {
  margin-left: auto;
  font-weight: 800;
  color: #FFF6DC;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(27, 43, 74, .96);
  border-bottom: 1px solid rgba(255,246,220,.18);
  backdrop-filter: blur(16px);
}

.topbar h1 { margin: 0; font-size: 24px; }
.eyebrow { margin: 0 0 4px; color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

.brand-lockup {
  display: grid;
  grid-template-columns: 58px auto;
  column-gap: 12px;
  align-items: center;
  min-width: 190px;
}

.brand-lockup img {
  grid-row: span 2;
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: #FFF6DC;
}

nav {
  margin-left: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

nav button {
  background: transparent;
  color: rgba(255,246,220,.74);
  min-height: 42px;
  padding: 0 12px;
  font-size: 16px;
}

nav button.active {
  background: rgba(255,246,220,.11);
  color: #fff;
  box-shadow: inset 0 -3px 0 #FDC32E;
}

.mode-switch {
  margin-left: auto;
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,246,220,.08);
}

.mode-switch button {
  min-height: 34px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}

.mode-switch button.active {
  background: var(--ink);
  color: #fff;
}

.settings-toggle {
  width: 42px;
  padding: 0;
  background: rgba(255,246,220,.12);
  color: var(--ivory);
  margin-left: 4px;
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px;
  padding: 0;
  background: rgba(255,246,220,.1);
}

.ticker {
  display: flex;
  gap: 12px;
  overflow: hidden;
  padding: 12px clamp(16px, 4vw, 48px);
  background: #162641;
  border-bottom: 1px solid rgba(255,246,220,.12);
}

.ticker span {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 16px;
  background: rgba(243,108,54,.2);
  color: #FFF6DC;
  font-weight: 800;
  white-space: nowrap;
}

.settings-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: min(390px, 92vw);
  padding: 18px;
  border-left: 1px solid var(--line);
  background: #fffaf0;
  color: var(--ink);
  box-shadow: -20px 0 60px rgba(19, 42, 30, .18);
  transform: translateX(105%);
  transition: transform .22s ease;
}

.settings-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 { margin: 0; }

.drawer-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-section h3 { margin: 0 0 8px; }
.drawer-section p { margin: 0 0 12px; color: var(--muted); line-height: 1.5; }

.mini-form {
  display: grid;
  gap: 10px;
}

.mini-form textarea {
  min-height: 90px;
}

main { padding-bottom: 48px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
  align-items: end;
  gap: 24px;
  min-height: 360px;
  padding: clamp(36px, 7vw, 76px) clamp(16px, 4vw, 48px);
  color: var(--ivory);
  background:
    linear-gradient(115deg, rgba(27,43,74,.96), rgba(27,43,74,.74) 42%, rgba(243,108,54,.68)),
    url("./assets/jersey.jpeg") center/cover;
}

.hero h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: .95;
}

.hero p:not(.eyebrow) {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255,255,255,.88);
}

.hero .eyebrow { color: #ffe09b; }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.news-strip {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(220px, .7fr));
  gap: 14px;
  margin-bottom: 18px;
}

.news-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 8px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(18, 32, 25, .18), rgba(18, 32, 25, .92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='380' viewBox='0 0 700 380'%3E%3Crect width='700' height='380' fill='%23116740'/%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.26' stroke-width='6'%3E%3Cpath d='M0 190h700M350 0v380'/%3E%3Ccircle cx='350' cy='190' r='72'/%3E%3C/g%3E%3C/svg%3E") center/cover;
  overflow: hidden;
}

.news-card.featured {
  min-height: 240px;
}

.news-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.news-card p { margin: 0; color: rgba(255,255,255,.82); }

.player-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #dfe9e2;
  border: 1px solid var(--line);
}

.player-photo.small {
  width: 64px;
  height: 64px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.photo-fallback {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #0c7a43, #17211d);
  color: #fff;
  font-size: 42px;
  font-weight: 900;
}

.public-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #eaf5ee;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 850;
}

.metric {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
}

.metric strong { display: block; font-size: 28px; }
.metric span { color: rgba(255,255,255,.82); font-size: 13px; }

#page {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h2 { margin: 0; font-size: 32px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card h3 { margin: 0 0 12px; font-size: 18px; }
.stat-number { display: block; font-size: 34px; font-weight: 850; }
.muted { color: var(--muted); }

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

th, td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label { display: grid; gap: 6px; font-weight: 750; color: #25342d; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--ink);
}

textarea { min-height: 110px; resize: vertical; }
.full { grid-column: 1 / -1; }

.split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfdfb;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  font-weight: 650;
}

.check-list input { width: auto; min-height: auto; }

.profile-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.notice {
  padding: 12px 14px;
  border: 1px solid #f0d392;
  border-radius: 8px;
  background: #fff8e5;
  color: #5d4311;
}

.error-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.error-item {
  padding: 10px;
  border-radius: 6px;
  background: #fff1f1;
  border: 1px solid #ffd1d1;
  color: #7a1d1d;
}

.success {
  padding: 10px;
  border-radius: 6px;
  background: #ecfff3;
  border: 1px solid #b8ecc9;
  color: #145f31;
}

.rules-panel {
  background: #fff;
  border-left: 5px solid var(--green);
  padding: 16px 18px;
  border-radius: 8px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rules-panel li { margin: 8px 0; line-height: 1.45; }

dialog {
  width: min(760px, calc(100% - 26px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
}

dialog::backdrop { background: rgba(15, 28, 22, .54); }
dialog form { padding: 0; }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}
.modal-head h3 { margin: 0; }
#modalBody { padding: 18px; }

.report-canvas {
  background: #fff;
  color: #17211d;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

@media (max-width: 900px) {
  .mode-switch { order: 4; width: 100%; }
  .mode-switch button { flex: 1; }
  .settings-toggle { margin-left: auto; }
  .menu-toggle { display: inline-grid; place-items: center; width: 44px; padding: 0; margin-left: 0; }
  nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }
  nav.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav button { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; min-height: 520px; }
  .news-strip { grid-template-columns: 1fr; }
  .grid.two, .grid.three, .grid.four, .form-grid, .split-list { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  table { font-size: 14px; }
  th, td { padding: 9px 7px; }
}

@media print {
  .topbar, .hero, .actions, button, input, select, textarea { display: none !important; }
  #page { width: 100%; margin: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Paga FC live product skin */
.news-card {
  background:
    linear-gradient(180deg, rgba(27,43,74,.10), rgba(27,43,74,.94)),
    url("./assets/paga-fc-logo.jpeg") center/cover;
}

.news-card.featured {
  background:
    linear-gradient(180deg, rgba(27,43,74,.08), rgba(27,43,74,.94)),
    url("./assets/jersey.jpeg") center/cover;
}

.metric {
  background: rgba(255,246,220,.13);
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255,246,220,.08);
  border: 1px solid rgba(255,246,220,.15);
}

.brand-strip div {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 128px;
  border-radius: 8px;
  background: #fffaf0;
  color: #1B2B4A;
  text-align: center;
  font-weight: 850;
}

.brand-strip img {
  max-width: 150px;
  max-height: 78px;
  object-fit: contain;
  border-radius: 6px;
}

.page-head h2,
.page-head p {
  color: var(--ivory);
}

.card,
.rules-panel,
.report-canvas {
  background: #fffaf0;
  color: #1B2B4A;
  border-color: rgba(27,43,74,.12);
}

.pill {
  background: #1B2B4A;
  color: #FFF6DC;
}

.photo-fallback {
  background: linear-gradient(135deg, #F36C36, #1B2B4A);
}

.public-badge {
  background: #FDC32E;
  color: #1B2B4A;
}

.player-table {
  padding: 0;
  overflow: hidden;
}

.player-row {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(160px, 1fr) 110px 90px 150px;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 12px 18px;
  border-radius: 0;
  border-bottom: 1px solid rgba(27,43,74,.12);
  background: transparent;
  color: #1B2B4A;
  text-align: left;
}

.player-row:hover {
  background: rgba(248,151,52,.14);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 18px;
  align-items: center;
}

.sets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.set-card {
  min-height: 140px;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(243,108,54,.16), rgba(253,195,46,.13));
  border: 1px solid rgba(27,43,74,.1);
}

.set-card h4,
.set-list h4 {
  margin: 0 0 8px;
}

.set-card ul,
.set-list ul {
  margin: 0;
  padding-left: 18px;
}

.form-dot {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-right: 4px;
  border-radius: 50%;
  background: #616163;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.form-dot.win { background: #CBDD11; color: #1B2B4A; }
.form-dot.draw { background: #FDC32E; color: #1B2B4A; }
.form-dot.loss { background: #F36C36; color: #fff; }
.form-dot.neutral { background: rgba(27,43,74,.18); color: #1B2B4A; }

@media (max-width: 900px) {
  .brand-strip { grid-template-columns: 1fr 1fr; }
  .player-row { grid-template-columns: 58px 1fr; }
  .player-row span:nth-of-type(n+2) { display: none; }
  .profile-hero { grid-template-columns: 1fr; }
}

/* Premier-style information layout, Paga colors */
.hero {
  min-height: 360px;
}

.hero h2 {
  font-size: clamp(48px, 7vw, 82px);
}

.news-strip {
  grid-template-columns: minmax(340px, 1.35fr) minmax(240px, .8fr) minmax(240px, .8fr);
  padding: 16px;
  border-radius: 8px;
  background: rgba(243,108,54,.14);
}

.news-card.featured {
  min-height: 300px;
}

.stat-card {
  min-height: 120px;
  border-top: 5px solid #F36C36;
}

.site-footer {
  width: min(1440px, calc(100% - 32px));
  margin: 36px auto 0;
  padding: 24px 0 40px;
  color: #FFF6DC;
}

.footer-partners {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255,246,220,.08);
}

.footer-partners div {
  min-height: 126px;
  display: grid;
  place-items: center;
  gap: 8px;
  border-radius: 8px;
  background: #FFF6DC;
  color: #1B2B4A;
  font-weight: 900;
}

.footer-partners img {
  max-width: 150px;
  max-height: 78px;
  object-fit: contain;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255,246,220,.16);
  margin-top: 20px;
}

@media (max-width: 900px) {
  .utilitybar { display: none; }
  .brand-lockup { min-width: 0; }
  nav { background: #1B2B4A; }
  .ticker { overflow-x: auto; }
  .news-strip { grid-template-columns: 1fr; }
  .footer-partners { grid-template-columns: 1fr 1fr; }
}
