/* ====== Brand ====== */
:root{
  --brand-primary:#2973B0;  /* RGB dal brandbook */
  --brand-accent:#E8B361;
  --brand-pink:#C83787;

  --bg-body:#F4F6FA;
  --bg-elev:#ffffff;

  --sidebar-bg: #1b2a3a;      /* tono coeso col topbar */
  --sidebar-bg-2:#182534;     /* gradiente */
  --sidebar-txt:#cbd5e1;
  --sidebar-txt-active:#ffffff;

  --radius:14px;
  --shadow: 0 10px 30px rgba(0,0,0,.06);
}

/* Tipografia (Brandbook) */
body {
  background: var(--bg-body);
  font-family: 'Aller', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}
.syn-title, .syn-title-sm {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ====== Topbar ====== */
.syn-topbar{
  background: linear-gradient(90deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color:#fff;
  padding:.6rem .75rem;
}
.syn-topbar .syn-brand { color:#fff; text-decoration:none; }
.syn-topbar .syn-title { font-size:1.6rem; line-height:1; }

/* Logout */
.syn-btn-logout{
  border-color:#fff !important;
  color:#1b2a3a !important;
  background:#fff !important;
}

/* ====== Sidebar ====== */
.syn-sidebar{
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: var(--sidebar-txt);
  min-height: calc(100dvh - 54px); /* agganciata alla topbar */
}
.syn-sidebar-inner{
  position: sticky; top: 0;
  padding: 1rem .75rem 1rem;
}
.syn-section-title{
  color:#9fb3c8;
  text-transform: uppercase;
  font-size:.72rem;
  letter-spacing:.08em;
  padding: .25rem .5rem;
}
.syn-sidebar-foot{ padding:.75rem .5rem; border-top:1px solid rgba(255,255,255,.06); }

/* Menu item */
.syn-nav{
  position: relative;
  color: var(--sidebar-txt);
  padding: .55rem .75rem .55rem .75rem;
  border-radius: .6rem;
  display: inline-flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  transition: .15s ease;
}
.syn-nav .syn-nav-bar{
  content:"";
  width: 4px; height: 22px;
  background: transparent;
  border-radius: 4px;
  margin-right:.6rem;
}
.syn-nav:hover{ color: var(--sidebar-txt-active); background: rgba(255,255,255,.06); }
.syn-nav.active{
  color: var(--sidebar-txt-active);
  background: rgba(255,255,255,.10);
  font-weight: 600;
}
.syn-nav.active .syn-nav-bar{ background: var(--brand-accent); }

/* Sub voci */
.syn-subnav{ margin-left:.25rem; }
.syn-nav.syn-sub{
  padding-left: .75rem;
}
.syn-nav.syn-sub .syn-nav-dot{
  width:6px;height:6px;border-radius:50%;background:transparent;margin-right:.5rem;display:inline-block;
}
.syn-nav.syn-sub.active .syn-nav-dot{ background: var(--brand-accent); }

/* ====== Offcanvas (mobile) ====== */
.syn-offcanvas{
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color:#fff;
}
.syn-offcanvas .offcanvas-header{
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.syn-offcanvas .syn-title-sm{ font-size:1.3rem; }

/* ====== Content ====== */
.syn-content{ padding: 1rem 1rem 2rem 1rem; }
@media (min-width: 992px){
  .syn-content{ padding: 1.25rem 1.5rem 2rem 1.5rem; }
}
.syn-pagehead{
  background: var(--bg-elev);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .9rem 1rem;
  margin: 1rem 0;
  display:flex; align-items:center; justify-content:space-between;
}
.syn-pagehead h1{ margin:0; }

/* Card/Tabelle */
.card{ border:0; border-radius: var(--radius); box-shadow: var(--shadow); }
.table thead th{ position:sticky; top:0; background:#f8fafc; z-index:1; }
.badge-scope{ font-size:.75rem; }

/* Pulsanti brand */
.btn-primary{ background: var(--brand-primary); border-color: var(--brand-primary); }
.btn-warning{ background: var(--brand-accent); border-color: var(--brand-accent); }
.btn-outline-primary{ border-width:2px; }

/* Utility */
.filters-stack > *{ margin-bottom:.5rem; }
@media (min-width:576px){ .filters-stack > *{ margin-bottom:0; } }

/* ====== Fullscreen Mode for Squadre ====== */
body.fullscreen-mode .syn-topbar,
body.fullscreen-mode .syn-sidebar,
body.fullscreen-mode #squadre-filters,
body.fullscreen-mode .squadre-header-title {
    display: none !important;
}
body.fullscreen-mode #squadre-header {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1050;
    margin-bottom: 0 !important;
    width: auto;
}
body.fullscreen-mode .syn-content {
    padding: 0 !important;
    width: 100vw;
    max-width: 100vw;
    flex: 0 0 100%;
    margin: 0;
}
body.fullscreen-mode #squadre-main-container {
    height: 100vh;
    padding: 1rem;
}
body.fullscreen-mode #unassigned-container,
body.fullscreen-mode .team-box {
    height: calc(100vh - 2rem);
}