:root {
  --blue-950: #071d3a;
  --blue-900: #0a2d59;
  --blue-800: #0e477f;
  --blue-700: #1262a4;
  --blue-100: #e7f2fb;
  --sky: #3aa7df;
  --ink: #172033;
  --muted: #687386;
  --line: #dce3ec;
  --surface: #ffffff;
  --bg: #f3f6fa;
  --success: #137a52;
  --warning: #a65d00;
  --danger: #b42318;
  --shadow: 0 18px 55px rgba(10, 45, 89, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 64px);
  color: white;
  background: linear-gradient(120deg, var(--blue-950), var(--blue-800));
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 900; letter-spacing: -.04em;
  color: var(--blue-950); background: white;
}
.brand strong { display: block; font-size: 1rem; letter-spacing: .02em; }
.brand span { display: block; color: rgba(255,255,255,.72); font-size: .8rem; margin-top: 2px; }
.top-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { color: white; background: linear-gradient(135deg, var(--blue-700), var(--sky)); box-shadow: 0 10px 25px rgba(18,98,164,.24); }
.btn-secondary { color: var(--blue-900); background: var(--blue-100); }
.btn-light { color: var(--blue-950); background: white; }
.btn-danger { color: white; background: var(--danger); }
.btn-ghost { color: inherit; background: transparent; border: 1px solid currentColor; }
.btn-sm { padding: 8px 11px; border-radius: 9px; font-size: .86rem; }

.hero {
  padding: clamp(54px, 8vw, 110px) clamp(18px, 5vw, 84px);
  color: white;
  background:
    radial-gradient(circle at 78% 18%, rgba(58,167,223,.36), transparent 34%),
    linear-gradient(135deg, var(--blue-950), var(--blue-700));
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "U13";
  position: absolute;
  right: 4vw; bottom: -7vw;
  font-size: min(32vw, 360px);
  font-weight: 950;
  line-height: .8;
  color: rgba(255,255,255,.045);
  letter-spacing: -.08em;
}
.hero-content { max-width: 850px; position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 850; font-size: .76rem; color: #8bd1f5; }
h1 { font-size: clamp(2.35rem, 5vw, 5.2rem); line-height: .98; letter-spacing: -.055em; margin: 14px 0 20px; }
.hero p { max-width: 700px; font-size: clamp(1rem, 2vw, 1.22rem); color: rgba(255,255,255,.76); line-height: 1.65; }

.page-shell { width: min(1460px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 70px; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 76px); }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 22px 15px;
  position: sticky; top: 76px; height: calc(100vh - 76px);
}
.nav-button {
  width: 100%; border: 0; background: transparent; color: var(--muted);
  padding: 12px 13px; border-radius: 11px; text-align: left; font-weight: 720;
  margin-bottom: 5px;
}
.nav-button:hover, .nav-button.active { color: var(--blue-900); background: var(--blue-100); }
.admin-main { padding: 28px clamp(18px, 3vw, 46px) 70px; min-width: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.035em; }
.section-head p { margin: 7px 0 0; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 5px 20px rgba(10,45,89,.035);
}
.card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.card p { color: var(--muted); line-height: 1.55; }
.metric { padding: 20px; position: relative; overflow: hidden; }
.metric::after { content: ""; position: absolute; width: 85px; height: 85px; border-radius: 50%; right: -35px; top: -35px; background: var(--blue-100); }
.metric-label { color: var(--muted); font-size: .83rem; font-weight: 700; }
.metric-value { font-size: 2.1rem; line-height: 1; font-weight: 900; letter-spacing: -.04em; margin-top: 11px; color: var(--blue-900); }

.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.field { grid-column: span 4; }
.field.span-6 { grid-column: span 6; }
.field.span-8 { grid-column: span 8; }
.field.span-12 { grid-column: span 12; }
label { display: block; font-size: .78rem; font-weight: 800; color: #4c596d; margin-bottom: 7px; }
input, select, textarea {
  width: 100%; border: 1px solid #cfd8e5; border-radius: 11px; background: white; color: var(--ink);
  padding: 11px 12px; outline: none; transition: box-shadow .16s ease, border-color .16s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(18,98,164,.11); }
textarea { min-height: 90px; resize: vertical; }
.help { color: var(--muted); font-size: .77rem; margin-top: 6px; line-height: 1.45; }
.inline-check { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.inline-check input { width: auto; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th, td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: .86rem; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: #f7f9fc; color: #526077; font-size: .72rem; text-transform: uppercase; letter-spacing: .055em; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fbfdff; }
.position { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-100); color: var(--blue-900); font-weight: 900; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: #edf1f6; color: #4e5b6d; }
.badge-success { background: #e6f6ef; color: var(--success); }
.badge-warning { background: #fff3df; color: var(--warning); }
.badge-danger { background: #feeceb; color: var(--danger); }
.score { font-size: 1.08rem; font-weight: 900; color: var(--blue-900); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.toolbar .field { min-width: 150px; flex: 1; max-width: 260px; }
.hidden { display: none !important; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.notice { border-radius: 12px; padding: 12px 14px; background: var(--blue-100); color: var(--blue-900); font-weight: 650; line-height: 1.5; }
.notice-danger { background: #feeceb; color: var(--danger); }
.notice-success { background: #e6f6ef; color: var(--success); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,16,34,.66); z-index: 80;
  display: grid; place-items: center; padding: 18px;
}
.modal {
  width: min(1120px, 100%); max-height: calc(100vh - 36px); overflow: auto;
  background: white; border-radius: 22px; box-shadow: var(--shadow);
}
.modal-head { position: sticky; top: 0; z-index: 3; padding: 20px 24px; display: flex; justify-content: space-between; gap: 15px; align-items: center; background: white; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 1.25rem; }
.modal-body { padding: 24px; }
.modal-footer { position: sticky; bottom: 0; padding: 16px 24px; display: flex; justify-content: flex-end; gap: 10px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); }
.segment-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; align-items: center; }
.segment-grid > div { padding: 10px; background: #f8fafc; border-radius: 10px; }
.subsection { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.subsection h4 { margin: 0 0 14px; color: var(--blue-900); }
.team-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.team-panel { border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.team-panel h5 { margin: 0 0 14px; font-size: 1rem; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, #1d74b8, transparent 35%), var(--blue-950); }
.login-card { width: min(440px, 100%); background: white; padding: 30px; border-radius: 24px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 2rem; color: var(--blue-950); margin: 18px 0 8px; }
.login-card p { color: var(--muted); line-height: 1.55; }

.public-filter { margin-top: -35px; position: relative; z-index: 3; }
.public-table td:first-child { font-weight: 900; }
.footer { padding: 30px; color: rgba(255,255,255,.68); background: var(--blue-950); text-align: center; font-size: .82rem; }

.toast-container { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 10px; }
.toast { min-width: 260px; max-width: 420px; padding: 13px 15px; border-radius: 12px; color: white; background: var(--blue-950); box-shadow: var(--shadow); animation: toastIn .2s ease; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

@media (max-width: 1050px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: flex; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .nav-button { white-space: nowrap; width: auto; margin: 0 5px 0 0; }
}
@media (max-width: 760px) {
  .topbar { min-height: 68px; }
  .brand span { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .grid-2, .grid-4, .team-columns { grid-template-columns: 1fr; }
  .field, .field.span-6, .field.span-8 { grid-column: span 12; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .admin-main { padding: 22px 14px 60px; }
  .page-shell { width: min(100% - 20px, 1460px); }
  .modal-body { padding: 16px; }
  .modal-head, .modal-footer { padding: 14px 16px; }
}

/* U13 RISULTATO GARA V2 */

.modal.modal-wide {
  width: min(1240px, 100%);
}

.compact-score-grid > div {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.grouped-section:first-of-type {
  margin-top: 18px;
}

.stacked-team-columns {
  align-items: start;
}

.prominent-team-panel {
  background: linear-gradient(180deg, #fbfdff, #ffffff);
  box-shadow: 0 6px 18px rgba(10, 45, 89, .04);
}

.home-panel {
  border-color: #cfe2f8;
}

.away-panel {
  border-color: #d8dde8;
}

.panel-eyebrow {
  margin-bottom: 10px;
  color: var(--blue-700);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.game-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin: 18px 0 8px;
}

.game-summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff, #ffffff);
}

.game-summary-card.home {
  border-color: #cfe2f8;
}

.game-summary-card.away {
  border-color: #d8dde8;
}

.game-summary-label {
  color: var(--blue-700);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.game-summary-name {
  margin-top: 10px;
  color: var(--blue-950);
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.2;
}

.game-summary-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: .82rem;
}

.game-summary-vs {
  display: grid;
  place-items: center;
  padding: 0 8px;
  color: var(--blue-700);
  font-size: 1.2rem;
  font-weight: 900;
}

.section-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.section-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.section-card-title {
  margin-bottom: 10px;
  color: var(--blue-900);
  font-size: 1rem;
  font-weight: 900;
}

.result-section-card {
  min-height: 100%;
}

@media (max-width: 1050px) {
  .section-card-grid {
    grid-template-columns: 1fr;
  }

  .game-summary {
    grid-template-columns: 1fr;
  }

  .game-summary-vs {
    padding: 6px 0;
  }
}

/* U13 PUBLIC GAME DETAIL V2 */
.public-game-row { cursor: pointer; }
.public-game-row td { transition: background .16s ease; }
.public-game-row:hover td,
.public-game-row:focus td { background: #f1f7fd; }
.public-game-row:focus { outline: none; }

.public-detail-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}
.public-detail-scoreboard > div:not(.public-detail-final) {
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff, #fff);
}
.public-detail-scoreboard span,
.public-detail-scoreboard small {
  display: block;
  color: var(--muted);
  font-size: .78rem;
}
.public-detail-scoreboard strong {
  display: block;
  margin: 9px 0 7px;
  color: var(--blue-950);
  font-size: 1.18rem;
}
.public-detail-final {
  min-width: 155px;
  padding: 18px;
  border-radius: 18px;
  color: white;
  text-align: center;
  background: linear-gradient(135deg, var(--blue-900), var(--sky));
}
.public-detail-final span { color: rgba(255,255,255,.76); }
.public-detail-final strong { margin: 7px 0 0; color: white; font-size: 2rem; }
.public-detail-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.public-detail-section h4 { margin: 0 0 14px; color: var(--blue-900); }
.public-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.public-detail-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.public-stat-list { display: grid; gap: 9px; }
.public-stat-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.public-stat-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.public-stat-list span { color: var(--muted); }
.public-stat-list strong { color: var(--blue-950); }
.public-detail-summary {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--blue-100);
  color: var(--blue-900);
}
.public-detail-big-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  text-align: center;
}
.public-detail-big-score strong { font-size: 1.65rem; color: var(--blue-900); }
.public-detail-big-score span { color: var(--muted); font-weight: 750; }

@media (max-width: 800px) {
  .public-detail-scoreboard,
  .public-detail-grid { grid-template-columns: 1fr; }
  .public-detail-final { order: 3; }
}


/* SGS PROFESSIONAL COMPACT V1 */

.topbar {
  min-height: 66px;
  padding: 8px clamp(14px, 3vw, 30px);
}

.brand {
  gap: 10px;
}

.brand > .brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  font-size: .92rem;
}

.sgs-logo {
  width: 52px;
  height: 52px;
  padding: 4px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 11px;
  background: white;
  box-shadow: 0 4px 14px rgba(0, 20, 55, .18);
}

.login-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sgs-logo-login {
  width: 70px;
  height: 70px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.hero {
  padding:
    clamp(38px, 5vw, 68px)
    clamp(18px, 5vw, 74px)
    clamp(48px, 6vw, 78px);
}

.hero h1 {
  margin: 9px 0 13px;
  font-size: clamp(2.25rem, 4.6vw, 4.45rem);
}

.hero p {
  max-width: 760px;
  font-size: clamp(.94rem, 1.6vw, 1.08rem);
  line-height: 1.55;
}

.official-cu-link {
  display: inline-flex;
  align-items: center;
  margin-top: 19px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 11px;
  color: white;
  background: rgba(255, 255, 255, .11);
  font-size: .86rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.official-cu-link:hover {
  background: white;
  color: var(--blue-950);
  transform: translateY(-1px);
}

.page-shell {
  padding-top: 22px;
  padding-bottom: 48px;
}

.public-filter {
  margin-top: -28px;
}

.card {
  padding: 18px;
  border-radius: 15px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.toolbar {
  margin-bottom: 13px;
}

th,
td {
  padding: 10px 11px;
}

.admin-main {
  padding-top: 22px;
}

.sidebar {
  padding-top: 16px;
}

.login-card {
  padding: 26px;
}

@media (max-width: 760px) {
  .sgs-logo {
    width: 42px;
    height: 42px;
  }

  .brand > .brand-mark {
    display: none;
  }

  .hero {
    padding-top: 34px;
  }

  .official-cu-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}



/* SGS COMPACT PROFESSIONAL V2 START */

:root {
  --public-max-width: 1240px;
}

/* =========================
   HEADER / BRAND
========================= */

.topbar {
  min-height: 64px !important;
  padding: 8px 22px !important;
}

.brand {
  gap: 12px !important;
  align-items: center !important;
}

.sgs-logo {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.brand .brand-mark,
.login-brand-lockup .brand-mark {
  display: none !important;
}

.brand-copy,
.brand-copy * {
  line-height: 1.15 !important;
}

.brand-copy strong,
.brand-copy .brand-title,
.brand-copy h1,
.brand-copy h2 {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
}

.brand-copy small,
.brand-copy .brand-subtitle,
.brand-copy p {
  font-size: .90rem !important;
  opacity: .88 !important;
}

.topbar .btn,
.topbar a.btn {
  padding: 9px 14px !important;
  border-radius: 12px !important;
  font-size: .92rem !important;
  font-weight: 700 !important;
}

/* =========================
   HERO / INTRO
========================= */

.hero {
  min-height: auto !important;
  padding: 34px 56px 34px !important;
}

.hero h1 {
  margin: 6px 0 12px !important;
  font-size: clamp(2.6rem, 5vw, 4.2rem) !important;
  line-height: .95 !important;
  letter-spacing: -0.03em !important;
}

.hero p {
  max-width: 760px !important;
  margin-bottom: 14px !important;
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
}

.official-cu-link {
  margin-top: 8px !important;
  padding: 10px 15px !important;
  border-radius: 12px !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
}

.hero::after {
  opacity: .12 !important;
}

/* =========================
   PAGE LAYOUT
========================= */

.page-shell {
  max-width: var(--public-max-width) !important;
  margin: -8px auto 0 !important;
  padding: 0 14px 34px !important;
}

.public-filter {
  margin-top: 0 !important;
}

.card {
  padding: 18px 18px !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(9, 30, 66, .06) !important;
}

.section-head {
  margin-bottom: 12px !important;
}

.section-head h2 {
  margin-bottom: 4px !important;
  font-size: 1.18rem !important;
  line-height: 1.2 !important;
}

.section-head p {
  font-size: .95rem !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

/* =========================
   TOOLBAR / FILTRI
========================= */

.toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: end !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.toolbar .field,
.toolbar .form-group {
  min-width: 180px !important;
  margin-bottom: 0 !important;
}

.toolbar label {
  margin-bottom: 6px !important;
  font-size: .85rem !important;
  font-weight: 700 !important;
}

.toolbar select,
.toolbar input,
.toolbar button {
  min-height: 42px !important;
}

.toolbar .btn,
.toolbar button {
  padding: 10px 16px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

/* =========================
   TABELLE
========================= */

table {
  font-size: .95rem !important;
}

th {
  padding: 11px 10px !important;
  font-size: .79rem !important;
  letter-spacing: .03em !important;
}

td {
  padding: 11px 10px !important;
  vertical-align: middle !important;
}

.position {
  min-width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  font-size: .92rem !important;
}

.score {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
}

/* righe cliccabili più professionali */
tbody tr {
  transition: background .15s ease, transform .15s ease !important;
}

tbody tr:hover {
  background: rgba(10, 81, 160, .035) !important;
}

/* =========================
   ULTIMI RISULTATI
========================= */

#public-results tr,
.public-results tr {
  cursor: pointer !important;
}

/* =========================
   LOGIN / ADMIN
========================= */

.login-card {
  padding: 24px !important;
  border-radius: 18px !important;
}

.admin-main {
  padding-top: 18px !important;
}

.sidebar {
  padding-top: 12px !important;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {
  .hero {
    padding: 26px 22px 26px !important;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem) !important;
  }

  .page-shell {
    padding: 0 10px 24px !important;
  }

  .card {
    padding: 14px !important;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 8px 12px !important;
  }

  .sgs-logo {
    width: 36px !important;
    height: 36px !important;
  }

  .brand-copy strong,
  .brand-copy .brand-title,
  .brand-copy h1,
  .brand-copy h2 {
    font-size: 1rem !important;
  }

  .brand-copy small,
  .brand-copy .brand-subtitle,
  .brand-copy p {
    font-size: .8rem !important;
  }

  .official-cu-link {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .toolbar .field,
  .toolbar .form-group {
    min-width: 100% !important;
  }
}

/* SGS COMPACT PROFESSIONAL V2 END */




/* SGS NEW LOGO REFINEMENT START */

.sgs-logo {
  width: 86px !important;
  height: 86px !important;
  object-fit: contain !important;
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.topbar {
  min-height: 96px !important;
  padding: 10px 22px !important;
}

.topbar .brand {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.brand > .brand-mark,
.login-brand-lockup .brand-mark {
  display: none !important;
}

.brand-copy strong,
.brand-copy .brand-title,
.brand-copy h1,
.brand-copy h2 {
  font-size: 1.22rem !important;
}

.brand-copy small,
.brand-copy .brand-subtitle,
.brand-copy p {
  font-size: .92rem !important;
}

.login-brand-lockup {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

.sgs-logo-login {
  width: 120px !important;
  height: 120px !important;
  object-fit: contain !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.hero {
  padding-top: 28px !important;
  padding-bottom: 30px !important;
}

.hero h1 {
  margin-bottom: 10px !important;
}

.hero p {
  max-width: 760px !important;
  margin-bottom: 12px !important;
}

.page-shell {
  margin-top: -4px !important;
}

.card {
  border-radius: 16px !important;
}

@media (max-width: 900px) {
  .sgs-logo {
    width: 68px !important;
    height: 68px !important;
  }

  .topbar {
    min-height: 82px !important;
  }
}

@media (max-width: 640px) {
  .sgs-logo {
    width: 54px !important;
    height: 54px !important;
  }

  .sgs-logo-login {
    width: 86px !important;
    height: 86px !important;
  }

  .topbar {
    min-height: 72px !important;
    padding: 8px 12px !important;
  }
}

/* SGS NEW LOGO REFINEMENT END */



/* SGS HEADER LOGO MATCH START */

.topbar {
  min-height: 108px !important;
  padding: 8px 26px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;

  /*
   * Colori campionati direttamente dallo sfondo
   * del nuovo logo SGS.
   */
  background: linear-gradient(
    180deg,
    #033773 0%,
    #002046 100%
  ) !important;

  border-bottom: 0 !important;
  box-shadow: 0 6px 20px rgba(0, 20, 48, .22) !important;
}

.topbar .brand {
  min-height: 92px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.topbar .sgs-logo {
  width: 112px !important;
  height: 82px !important;
  max-width: 112px !important;
  max-height: 82px !important;

  display: block !important;
  flex: 0 0 112px !important;

  object-fit: contain !important;
  object-position: center !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.topbar .brand-mark {
  display: none !important;
}

.topbar .brand strong {
  color: #ffffff !important;
  font-size: 1.08rem !important;
  font-weight: 850 !important;
}

.topbar .brand span {
  color: rgba(255, 255, 255, .78) !important;
}

.topbar .top-actions {
  align-self: center !important;
}

.topbar .btn-light {
  color: #002046 !important;
  background: #ffffff !important;
}

@media (max-width: 760px) {
  .topbar {
    min-height: 82px !important;
    padding: 7px 12px !important;
  }

  .topbar .brand {
    min-height: 68px !important;
    gap: 10px !important;
  }

  .topbar .sgs-logo {
    width: 82px !important;
    height: 60px !important;
    max-width: 82px !important;
    max-height: 60px !important;
    flex-basis: 82px !important;
  }
}

/* SGS HEADER LOGO MATCH END */
/* Area società e segnalazioni (v1.3.0) */
.public-row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.public-report-button { border: 1px solid var(--line); }
.society-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.society-tab { border: 0; background: transparent; padding: 10px 14px; font-weight: 800; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.society-tab.active { color: var(--blue-900); border-bottom-color: var(--blue-700); }
.report-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-description { white-space: pre-wrap; background: #f6f8fb; border-radius: 12px; padding: 14px; line-height: 1.55; }
@media (max-width: 760px) { .report-detail-grid { grid-template-columns: 1fr; } }

/* Ricerca società nella registrazione (v1.3.1) */
.society-search-results { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: white; max-height: 260px; overflow: auto; box-shadow: 0 10px 30px rgba(15, 40, 80, .12); }
.society-search-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 14px; cursor: pointer; }
.society-search-item:last-child { border-bottom: 0; }
.society-search-item:hover, .society-search-item:focus { background: var(--blue-100); }
.society-search-item span { color: var(--muted); font-size: .8rem; }
.society-search-empty { padding: 12px 14px; color: var(--muted); font-size: .85rem; }
.society-selected { margin-top: 6px; padding: 10px 14px; border-radius: 12px; background: var(--blue-100); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Classifiche esterne (v1.4.0) */
.public-external-note { padding: 12px 14px; color: var(--muted); font-size: .85rem; border-bottom: 1px solid var(--line); }
.public-out-of-standings td { color: var(--muted); font-style: italic; }
.grid-3-import { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-3-import { grid-template-columns: 1fr; } }

/* Risultati inseriti dalle società (v1.5.0) */
.society-entry-panel { background: #f4f8fd; border: 1px solid #d7e3f2; }
.society-entry-panel .public-stat-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.society-entry-panel .public-stat-list div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; background: white; border-radius: 10px; }
#society-entry-form input[type=number] { max-width: 110px; }

/* Riquadro società in home page (v1.5.1) */
.society-home { border: 1px solid #cfe0f3; background: linear-gradient(135deg, #f4f8fd 0%, #ffffff 60%); }
.society-home .section-head { align-items: flex-start; }
.society-home .eyebrow-dark { color: var(--blue-700); letter-spacing: .12em; font-size: .72rem; font-weight: 800; text-transform: uppercase; margin-bottom: 6px; }
.society-home p { max-width: 760px; }
.society-home-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.society-steps { list-style: none; counter-reset: step; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.society-steps li { counter-increment: step; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 16px 54px; position: relative; display: flex; flex-direction: column; gap: 6px; }
.society-steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-700); color: white; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.society-steps li strong { color: var(--blue-900); }
.society-steps li span { color: var(--muted); font-size: .88rem; line-height: 1.5; }
@media (max-width: 1100px) { .society-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .society-steps { grid-template-columns: 1fr; } .society-home .section-head { flex-direction: column; } }
