    :root {
      color-scheme: light;
      --bg: #f5f6f2;
      --panel: #ffffff;
      --panel-soft: #f8faf7;
      --ink: #202722;
      --muted: #657066;
      --line: #d8ded6;
      --green: #0f6b58;
      --green-dark: #0a4f42;
      --blue: #285f8f;
      --amber: #bd7622;
      --red: #9a332c;
      --soft-green: #e8f2ee;
      --soft-blue: #e8f0f7;
      --soft-amber: #fff3df;
      --shadow: 0 18px 44px rgba(31, 39, 34, 0.09);
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: Arial, Helvetica, sans-serif;
      color: var(--ink);
      background: var(--bg);
    }

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

    button {
      min-height: 38px;
      border: 0;
      border-radius: 6px;
      padding: 8px 13px;
      color: #fff;
      background: var(--green);
      font-weight: 700;
      cursor: pointer;
    }

    button:hover { background: var(--green-dark); }

    button.secondary {
      color: var(--ink);
      background: #eef1ec;
      border: 1px solid var(--line);
    }

    button.secondary:hover { background: #e3e8e0; }

    button.danger {
      background: var(--red);
    }

    button.danger:hover {
      background: #77231e;
    }

    input,
    select,
    textarea {
      width: 100%;
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 8px 10px;
      color: var(--ink);
      background: #fff;
      outline: none;
    }

    textarea {
      min-height: 80px;
      resize: vertical;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--green);
      box-shadow: 0 0 0 3px rgba(15, 107, 88, 0.14);
    }

    label {
      display: block;
      margin: 0 0 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .app {
      width: min(1380px, calc(100% - 28px));
      margin: 0 auto;
      padding: 18px 0 30px;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 14px 16px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .mark {
      display: grid;
      place-items: center;
      flex: 0 0 44px;
      width: 44px;
      height: 44px;
      border-radius: 8px;
      color: #fff;
      background: var(--green);
      font-weight: 900;
    }

    .brand-logo {
      display: block;
      width: 86px;
      height: 58px;
      object-fit: contain;
      border-radius: 6px;
    }

    h1 {
      margin: 0;
      font-size: 22px;
      line-height: 1.1;
      letter-spacing: 0;
    }

    .subtitle {
      margin-top: 3px;
      color: var(--muted);
      font-size: 13px;
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .print-select {
      width: auto;
      min-width: 230px;
    }

    .drive-status {
      width: 100%;
      color: var(--muted);
      font-size: 12px;
      text-align: right;
    }

    .notification-box {
      position: relative;
      display: inline-flex;
      align-items: center;
    }

    .notification-bell {
      position: relative;
      padding-right: 18px;
    }

    .notification-bell::before {
      content: none !important;
    }

    .bell-shape {
      position: relative;
      display: inline-block;
      width: 18px;
      height: 18px;
      color: currentColor;
      flex: 0 0 auto;
    }

    .bell-shape::before {
      content: "";
      position: absolute;
      left: 4px;
      top: 2px;
      width: 10px;
      height: 12px;
      border: 2px solid currentColor;
      border-bottom: 0;
      border-radius: 10px 10px 4px 4px;
    }

    .bell-shape::after {
      content: "";
      position: absolute;
      left: 7px;
      bottom: 1px;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: currentColor;
      box-shadow: -5px -3px 0 -2px currentColor, 5px -3px 0 -2px currentColor;
    }

    .notification-badge {
      position: absolute;
      top: -8px;
      right: -8px;
      display: inline-grid;
      min-width: 22px;
      height: 22px;
      padding: 0 6px;
      place-items: center;
      border-radius: 999px;
      background: var(--red);
      color: #fff;
      border: 2px solid #070707;
      font-size: 12px;
      font-weight: 900;
      line-height: 1;
    }

    .notification-badge.is-empty {
      display: none;
    }

    .notification-panel {
      position: fixed;
      z-index: 9000;
      top: 72px;
      right: 18px;
      width: min(400px, calc(100vw - 28px));
      max-height: calc(100vh - 92px);
      padding: 14px;
      overflow: hidden;
      background: #080909;
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 14px;
      box-shadow: 0 24px 70px rgba(0,0,0,0.45), 0 0 26px rgba(227, 30, 36, 0.16);
    }

    .notification-panel[hidden] {
      display: none;
    }

    .notification-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    .notification-head-actions { display:flex; align-items:center; gap:7px; }
    .notification-read-all { min-height:32px; padding:4px 9px; font-size:11px; }

    .notification-head strong {
      color: #fff;
      font-size: 14px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .notification-close {
      min-height: 32px;
      padding: 4px 10px;
      border-radius: 8px;
    }

    .notification-summary {
      margin: 10px 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .notification-list {
      display: grid;
      gap: 8px;
      max-height: min(430px, calc(100vh - 205px));
      overflow: auto;
    }

    .notification-item {
      display: grid;
      grid-template-columns: 9px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      width: 100%;
      min-height: 74px;
      padding: 10px;
      color: #fff;
      text-align: left;
      background: #101214;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px;
      cursor: pointer;
    }

    .notification-item::before {
      content: "";
      display: block !important;
      width: 9px !important;
      height: 100%;
      min-height: 42px;
      border-radius: 999px;
      background: var(--green);
    }

    .notification-item.red::before {
      background: var(--red);
      box-shadow: 0 0 18px rgba(227, 30, 36, 0.35);
    }

    .notification-item.amber::before {
      background: var(--gold);
      box-shadow: 0 0 18px rgba(255, 179, 0, 0.26);
    }

    .notification-item.green::before {
      background: var(--green);
      box-shadow: 0 0 18px rgba(0, 200, 83, 0.26);
    }

    .notification-item.is-read { border-color: rgba(255,255,255,0.08); }
    .notification-item.is-read .notification-title::after {
      content: "Letto";
      display: inline-block;
      margin-left: 7px;
      color: var(--muted);
      font-size: 9px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .notification-title {
      display: block;
      margin-bottom: 3px;
      font-weight: 900;
      color: #fff;
    }

    .notification-text {
      display: block;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.3;
    }

    .notification-count {
      display: inline-grid;
      min-width: 34px;
      height: 34px;
      padding: 0 8px;
      place-items: center;
      border-radius: 999px;
      color: #fff;
      background: rgba(255,255,255,0.10);
      font-size: 15px;
      font-weight: 900;
    }

    .notification-empty {
      padding: 16px;
      color: var(--muted);
      text-align: center;
      background: #101214;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 10px;
    }

    .sponsor-board {
      display: grid;
      grid-template-columns: minmax(260px, 1.45fr) repeat(2, minmax(160px, 0.8fr));
      gap: 12px;
      margin: 0 0 18px;
      padding: 12px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .sponsor-tile {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 140px;
      padding: 0;
      overflow: hidden;
      background: #050606;
      border: 1px solid var(--line);
      border-radius: 8px;
    }

    .sponsor-tile.main {
      min-height: 170px;
      border-color: var(--red);
    }

    .sponsor-tile span,
    .sidebar-sponsors span {
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .sponsor-tile span {
      position: absolute;
      top: 8px;
      left: 10px;
      z-index: 2;
      padding: 4px 7px;
      color: #fff;
      background: rgba(0, 0, 0, 0.58);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 4px;
    }

    .sponsor-logo {
      position: absolute;
      inset: 0;
      z-index: 0;
      display: block;
      width: 100%;
      height: 100%;
      max-width: none;
      max-height: none;
      object-fit: cover;
      object-position: center;
    }

    .sponsor-tile.main .sponsor-logo {
      max-width: none;
      max-height: none;
    }

    .sponsor-logo.fit {
      inset: 6px;
      width: calc(100% - 12px);
      height: calc(100% - 12px);
      object-fit: contain;
    }

    .sidebar-sponsors,
    .print-sponsors {
      display: none;
    }

    .sponsor-editor-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 14px;
    }

    .sponsor-editor-card {
      min-width: 0;
      overflow: hidden;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 12px;
      box-shadow: var(--shadow);
    }

    .sponsor-editor-card.main {
      grid-column: auto;
    }

    .sponsor-editor-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
    }

    .sponsor-editor-title h3 {
      margin: 0;
      font-size: 15px;
      text-transform: uppercase;
    }

    .sponsor-edit-preview {
      position: relative;
      min-height: 180px;
      overflow: hidden;
      background:
        linear-gradient(135deg, rgba(0, 200, 83, 0.12), transparent 36%),
        linear-gradient(315deg, rgba(227, 30, 36, 0.14), transparent 38%),
        #050606;
      border-bottom: 1px solid var(--line);
    }

    .sponsor-placement-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
      gap: 14px;
      padding: 16px;
    }

    .sponsor-placement-panel {
      min-width: 0;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.10);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.025);
    }

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

    .sponsor-placement-head h4 {
      margin: 0;
      font-size: 13px;
      text-transform: uppercase;
    }

    .sponsor-placement-note {
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .sponsor-edit-preview.dashboard {
      min-height: 210px;
    }

    .sponsor-edit-preview.sidebar {
      width: min(190px, calc(100% - 28px));
      min-height: 210px;
      margin: 14px auto;
      border: 1px solid var(--line);
      border-radius: 10px;
    }

    .sponsor-edit-preview img {
      position: absolute;
      inset: 0;
      display: block;
      width: 100%;
      height: 100%;
      max-width: none;
      max-height: none;
      transform-origin: center;
    }

    .sponsor-logo,
    .sidebar-sponsors img,
    .sponsor-edit-preview img {
      transform-origin: center center;
      will-change: left, top, width, height;
    }

    .sponsor-editor-controls {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      padding: 14px;
    }

    .sponsor-editor-controls .wide {
      grid-column: 1 / -1;
    }

    .sponsor-name-row {
      border-bottom: 1px solid var(--line);
    }

    .sponsor-reset-row {
      padding: 0 16px 16px;
    }

    .sponsor-editor-controls input[type="file"] {
      width: 100%;
      padding: 10px;
      color: var(--muted);
      background: rgba(255, 255, 255, 0.04);
      border: 1px dashed rgba(255, 255, 255, 0.18);
      border-radius: 10px;
    }

    .range-control {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 7px 10px;
      align-items: center;
    }

    .range-control label {
      margin: 0;
    }

    .range-control output {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .range-control input {
      grid-column: 1 / -1;
      width: 100%;
      padding: 0;
    }

    .dashboard-controls {
      display: grid;
      grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
      gap: 14px;
      align-items: end;
      margin-bottom: 14px;
      padding: 14px 16px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .dashboard-controls .hint {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .dashboard-admin-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      margin: 14px 0;
    }

    .dashboard-admin-card {
      display: flex;
      flex-direction: column;
      min-width: 0;
      min-height: 260px;
      padding: 14px;
      background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
        #101214;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      box-shadow: 0 18px 44px rgba(0,0,0,0.28);
      overflow: hidden;
    }

    .dashboard-admin-card.is-red {
      border-color: rgba(227, 30, 36, 0.42);
      box-shadow: 0 18px 44px rgba(0,0,0,0.28), inset 3px 0 0 rgba(227, 30, 36, 0.86);
    }

    .dashboard-admin-card.is-green {
      border-color: rgba(0, 200, 83, 0.34);
      box-shadow: 0 18px 44px rgba(0,0,0,0.28), inset 3px 0 0 rgba(0, 200, 83, 0.86);
    }

    .dashboard-admin-card.is-amber {
      border-color: rgba(255, 179, 0, 0.34);
      box-shadow: 0 18px 44px rgba(0,0,0,0.28), inset 3px 0 0 rgba(255, 179, 0, 0.86);
    }

    .dashboard-admin-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
      margin-bottom: 10px;
    }

    .dashboard-admin-head h2 {
      margin: 0;
      color: #fff;
      font-size: 14px;
      line-height: 1.2;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .dashboard-admin-stat {
      display: flex;
      align-items: baseline;
      gap: 8px;
      min-width: 0;
      margin: 2px 0 6px;
    }

    .dashboard-admin-stat strong {
      min-width: 0;
      color: #fff;
      font-size: clamp(30px, 3vw, 44px);
      line-height: 1;
      font-weight: 900;
      overflow-wrap: anywhere;
    }

    .dashboard-admin-stat span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .dashboard-admin-text {
      min-height: 36px;
      margin: 0 0 10px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.35;
    }

    .dashboard-admin-list {
      display: grid;
      gap: 7px;
      margin: 0 0 12px;
      padding: 0;
      list-style: none;
      min-height: 104px;
    }

    .dashboard-admin-list li {
      display: grid;
      gap: 2px;
      min-width: 0;
      padding: 8px 9px;
      color: #fff;
      background: rgba(0,0,0,0.22);
      border: 1px solid rgba(255,255,255,0.09);
      border-radius: 8px;
    }

    .dashboard-admin-list strong,
    .dashboard-admin-list span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .dashboard-admin-list strong {
      font-size: 12px;
      font-weight: 900;
    }

    .dashboard-admin-list span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }

    .dashboard-admin-list .empty-line {
      display: flex;
      align-items: center;
      min-height: 52px;
      color: var(--muted);
      text-align: center;
      white-space: normal;
    }

    .dashboard-admin-actions {
      margin-top: auto;
    }

    .dashboard-admin-actions button {
      width: 100%;
    }

    .quick-actions-hero {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 18px;
      padding: 24px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      background:
        radial-gradient(circle at 92% 18%, rgba(0, 200, 83, 0.14), transparent 32%),
        linear-gradient(135deg, rgba(32,32,32,0.98), rgba(21,21,21,0.98));
      box-shadow: 0 18px 40px rgba(0,0,0,0.24);
    }

    .quick-actions-hero h1 {
      margin: 5px 0 8px;
      font-size: clamp(26px, 3vw, 38px);
      letter-spacing: -0.04em;
      color: #fff;
    }

    .quick-actions-hero p {
      max-width: 720px;
      margin: 0;
      color: #bdbdbd;
      font-weight: 700;
      line-height: 1.55;
    }

    .quick-actions-hero-badge {
      flex: 0 0 auto;
      padding: 9px 13px;
      border-radius: 999px;
      color: #fff;
      border: 1px solid rgba(0,200,83,0.44);
      background: rgba(0,200,83,0.14);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .quick-actions-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .quick-action-card {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr) auto;
      align-items: center;
      gap: 14px;
      min-height: 112px;
      padding: 18px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      color: #fff;
      background: linear-gradient(145deg, #242424, #1c1c1c);
      text-align: left;
      box-shadow: 0 12px 28px rgba(0,0,0,0.2);
      transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    }

    .quick-action-card:hover,
    .quick-action-card:focus-visible {
      transform: translateY(-2px);
      border-color: rgba(0,200,83,0.58);
      background: linear-gradient(145deg, #292929, #202020);
      box-shadow: 0 16px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,200,83,0.08);
    }

    .quick-action-card.is-primary {
      border-color: rgba(0,200,83,0.26);
      background: linear-gradient(145deg, rgba(0,200,83,0.09), rgba(32,32,32,0.98) 52%);
    }

    .quick-action-card.is-system {
      border-color: rgba(227,30,36,0.28);
      background: linear-gradient(145deg, rgba(227,30,36,0.08), rgba(32,32,32,0.98) 52%);
    }

    .quick-action-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      border-radius: 9px;
      color: #fff;
      background: linear-gradient(145deg, #e31e24, #b91419);
      font-size: 15px;
      font-weight: 950;
      box-shadow: 0 8px 18px rgba(227,30,36,0.2);
    }

    .quick-action-card.is-primary .quick-action-icon {
      background: linear-gradient(145deg, #00c853, #00953e);
      box-shadow: 0 8px 18px rgba(0,200,83,0.18);
    }

    .quick-action-card > span:nth-child(2) {
      display: grid;
      gap: 5px;
      min-width: 0;
    }

    .quick-action-card strong {
      font-size: 15px;
      font-weight: 900;
    }

    .quick-action-card small {
      color: #a9a9a9;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.4;
    }

    .quick-action-card b {
      color: #00c853;
      font-size: 25px;
      line-height: 1;
    }

    .control-hero {
      margin-bottom: 14px;
    }

    .control-summary {
      display: grid;
      gap: 10px;
      color: var(--muted);
      line-height: 1.45;
      font-weight: 750;
    }

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

    .control-grid .panel {
      min-width: 0;
    }

    .control-table td {
      vertical-align: middle;
    }

    .control-detail {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.4;
    }

    .control-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }

    .control-actions button {
      min-height: 38px;
    }

    .file-button {
      position: relative;
      overflow: hidden;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 38px;
      border-radius: 6px;
      padding: 8px 13px;
      color: var(--ink);
      background: #eef1ec;
      border: 1px solid var(--line);
      font-weight: 700;
      cursor: pointer;
    }

    .file-button input {
      position: absolute;
      inset: 0;
      opacity: 0;
      cursor: pointer;
    }

    .manual-bib-check {
      width: 18px;
      min-height: 18px;
      margin: 0 auto;
      accent-color: var(--green);
    }

    .check-option {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 40px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel-soft);
      color: var(--ink);
      font-weight: 800;
    }

    .check-option input {
      width: 18px;
      min-height: 18px;
      padding: 0;
      accent-color: var(--green);
    }

    .result-print-options {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin: 0 0 12px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 10px;
    }

    .result-print-options legend {
      padding: 0 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .result-print-options .check-option {
      min-height: auto;
      padding: 7px 10px;
    }

    .benefit-badges {
      display: flex;
      gap: 5px;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 6px;
    }

    .badge.purple {
      color: #7434ad;
      background: #f1e6fb;
    }

    .badge.green {
      color: var(--green-dark);
      background: var(--soft-green);
    }

    .print-settings-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(190px, 1fr));
      gap: 10px;
    }

    .security-grid {
      display: grid;
      grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.4fr);
      gap: 14px;
      align-items: start;
      margin-top: 14px;
    }

    .security-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .money-positive {
      color: var(--green);
    }

    .money-negative {
      color: var(--red);
    }

    .tabs {
      display: grid;
      grid-template-columns: repeat(8, minmax(0, 1fr));
      gap: 8px;
      margin: 14px 0;
    }

    .tab {
      min-height: 46px;
      color: var(--ink);
      background: var(--panel);
      border: 1px solid var(--line);
      box-shadow: none;
    }

    .tab:hover {
      background: var(--panel-soft);
    }

    .tab.active {
      color: #fff;
      background: var(--green);
      border-color: var(--green);
    }

    .view {
      display: none;
    }

    .view.active {
      display: block;
    }

    .grid {
      display: grid;
      grid-template-columns: 380px minmax(0, 1fr);
      gap: 14px;
      align-items: start;
    }

    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 58px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      background: var(--panel-soft);
    }

    .panel-head h2 {
      margin: 0;
      font-size: 18px;
      letter-spacing: 0;
    }

    .panel-body {
      padding: 16px;
    }

    .section-divider {
      border-top: 1px solid var(--line);
      margin: 18px 0;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .form-grid .wide {
      grid-column: 1 / -1;
    }

    .form-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 14px;
      flex-wrap: wrap;
    }

    .toolbar {
      display: grid;
      grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(120px, 170px));
      gap: 10px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      background: var(--panel);
    }

    .table-wrap {
      overflow: auto;
      max-height: 620px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      min-width: 720px;
      font-size: 14px;
    }

    th,
    td {
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: middle;
      white-space: nowrap;
    }

    th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #f0f3ef;
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    td.num,
    th.num {
      text-align: right;
    }

    .row-actions {
      display: flex;
      justify-content: flex-end;
      gap: 6px;
    }

    .row-actions button {
      min-height: 32px;
      padding: 5px 9px;
      font-size: 12px;
    }

    .dotation-athlete-table td:nth-child(2) {
      white-space: normal;
      overflow-wrap: anywhere;
      line-height: 1.25;
    }

    .dotation-athlete-table td:nth-child(3) {
      overflow: hidden;
    }

    .dotation-athlete-table th:last-child,
    .dotation-athlete-table td:last-child {
      position: sticky;
      right: 0;
      z-index: 2;
      background: var(--panel-soft);
      box-shadow: -10px 0 18px rgba(0, 0, 0, 0.22);
    }

    .dotation-athlete-table th:last-child {
      z-index: 3;
    }

    .dotation-athlete-table td:last-child .row-actions {
      flex-direction: column;
      align-items: stretch;
    }

    .dotation-athlete-table td:last-child .row-actions button {
      width: 100%;
      white-space: normal;
      line-height: 1.15;
    }

    .status {
      min-height: 26px;
      margin-top: 12px;
      color: var(--muted);
      font-size: 13px;
    }

    .status.error { color: var(--red); }
    .status.ok { color: var(--green); }

    .metrics {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 14px;
    }

    .metric {
      min-height: 104px;
      padding: 16px;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }

    .metric:nth-child(2) { background: var(--soft-green); }
    .metric:nth-child(3) { background: var(--soft-blue); }
    .metric:nth-child(4) { background: var(--soft-amber); }
    .metric:nth-child(5) { background: #f5eeee; }

    .metric span {
      display: block;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .metric strong {
      display: block;
      margin-top: 8px;
      font-size: clamp(28px, 4vw, 44px);
      line-height: 1;
      letter-spacing: 0;
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
      gap: 14px;
    }

    .empty {
      padding: 24px 16px;
      color: var(--muted);
      text-align: center;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 26px;
      border-radius: 999px;
      padding: 4px 9px;
      color: var(--green-dark);
      background: var(--soft-green);
      font-size: 12px;
      font-weight: 800;
      white-space: nowrap;
    }

    .badge.blue {
      color: #224f77;
      background: var(--soft-blue);
    }

    .badge.amber {
      color: #6b4211;
      background: var(--soft-amber);
    }

    .preview-score {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin-top: 12px;
    }

    .preview-score div {
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel-soft);
      min-width: 0;
    }

    .preview-score span {
      display: block;
      margin-bottom: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .preview-score strong {
      display: block;
      overflow-wrap: anywhere;
      font-size: 18px;
    }

    .ranking-tools {
      display: grid;
      grid-template-columns: repeat(4, minmax(130px, 1fr));
      gap: 10px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
    }

    .toast {
      position: fixed;
      right: 18px;
      bottom: 18px;
      max-width: min(420px, calc(100% - 36px));
      padding: 12px 14px;
      color: #fff;
      background: var(--green-dark);
      border-radius: 8px;
      box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
      transform: translateY(18px);
      opacity: 0;
      pointer-events: none;
      transition: opacity 160ms ease, transform 160ms ease;
      z-index: 20;
    }

    .toast.show {
      transform: translateY(0);
      opacity: 1;
    }

    .hidden {
      display: none !important;
    }

    .print-report {
      display: none;
    }

    @media print {
      @page {
        size: A4;
        margin: 6mm 7mm 10mm;
      }

      html,
      body {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff;
        color: #000;
        animation: none !important;
        transform: none !important;
      }

      .app,
      .toast {
        display: none !important;
      }

      .print-report {
        display: block;
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9pt;
        color: #000;
        padding: 0 !important;
      }

      .print-report,
      .print-report * {
        color: #000 !important;
      }

      .print-heading {
        display: flex;
        align-items: center;
        gap: 12mm;
        margin-bottom: 8mm;
      }

      .print-heading img {
        width: 38mm;
        height: 24mm;
        object-fit: contain;
      }

      .print-sponsors {
        display: none !important;
      }

      .print-document-header {
        display: grid;
        grid-template-columns: 22mm 1fr 22mm;
        gap: 4mm;
        align-items: center;
        margin: 0 0 2mm;
        padding: 0 0 2mm;
        border-bottom: 1.5px solid #222;
      }

      .print-delma {
        font-size: 20pt;
        font-weight: 900;
        line-height: 1;
      }

      .print-delma span {
        display: block;
        margin-top: 1mm;
        font-size: 8pt;
        font-weight: 700;
        text-transform: uppercase;
      }

      .print-free-run-logo {
        width: 16mm;
        height: 10mm;
        object-fit: contain;
        margin: 0 auto 1mm;
      }

      .print-document-title {
        text-align: center;
      }

      .print-document-title .free-run-text {
        font-size: 13pt;
        font-weight: 900;
      }

      .print-document-title .internal-title {
        font-size: 12pt;
        font-weight: 900;
      }

      .print-document-title .doc-subtitle {
        margin-top: 0.5mm;
        font-size: 8pt;
      }

      .print-qr {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        grid-template-rows: repeat(7, 1fr);
        gap: 0.5mm;
        width: 24mm;
        height: 24mm;
        padding: 2mm;
        border: 1px solid #000;
      }

      .print-qr span {
        border: 0.2mm solid #000;
      }

      .print-qr .on {
        background: #000;
      }

      .print-doc-meta {
        margin: 0 0 2.5mm;
        padding: 1.7mm 2.5mm;
        border-left: 3px solid #111;
        background: #f1f1f1;
        font-size: 8.5pt;
      }

      .print-signature {
        margin-top: 12mm;
        text-align: right;
      }

      .print-signature-line {
        display: inline-block;
        min-width: 55mm;
        padding-top: 8mm;
        border-top: 1px solid #000;
        text-align: center;
      }

      .print-footer {
        position: static;
        display: flex;
        justify-content: space-between;
        gap: 6mm;
        margin-top: 4mm;
        padding-top: 2mm;
        border-top: 1px solid #000;
        font-size: 7pt;
        break-inside: avoid;
        page-break-inside: avoid;
      }

      .print-page-number::after {
        content: counter(page);
      }

      .print-report h1 {
        margin: 0 0 2mm;
        font-size: 20pt;
      }

      .print-report .print-meta {
        margin-bottom: 0;
        font-size: 10pt;
      }

      .print-section {
        break-inside: auto;
        page-break-inside: auto;
        margin: 0 0 4mm;
      }

      .print-section h2 {
        margin: 0 0 1.5mm;
        padding-bottom: 1mm;
        border-bottom: 1px solid #555;
        break-after: avoid;
        page-break-after: avoid;
        font-size: 11pt;
      }

      .print-report table {
        width: 100%;
        min-width: 0;
        table-layout: auto;
        border-collapse: collapse;
        font-size: 8.4pt;
      }

      .print-report thead {
        display: table-header-group;
      }

      .print-report tr {
        break-inside: avoid;
        page-break-inside: avoid;
      }

      .print-report th,
      .print-report td {
        padding: 3px 4px;
        border: 1px solid #b8b8b8;
        text-align: left;
        white-space: normal;
      }

      .print-report th {
        position: static;
        font-size: 7.8pt;
        font-weight: 800;
        text-transform: uppercase;
        color: #111;
        background: #dedede;
      }

      .print-report tbody tr:nth-child(even) td {
        background: #f4f4f4;
      }

      .print-report .num {
        text-align: right;
      }

      .print-race-summary {
        display: flex;
        gap: 3mm;
        align-items: center;
        margin: 0 0 3mm;
        padding: 2mm 3mm;
        border-radius: 2mm;
        background: #ededed;
        font-size: 8.5pt;
      }

      .print-race-summary strong {
        font-size: 10pt;
      }

      .print-race-card {
        margin: 0 0 3mm;
        border: 1px solid #b6b6b6;
        border-radius: 2mm;
        overflow: hidden;
        break-inside: avoid;
        page-break-inside: avoid;
      }

      .print-race-card-head {
        display: grid;
        grid-template-columns: 15mm 1fr;
        gap: 3mm;
        align-items: center;
        padding: 2.5mm 3mm;
        background: #e8e8e8;
      }

      .print-race-date {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 12mm;
        border: 1.5px solid #222;
        border-radius: 2mm;
        line-height: 1;
      }

      .print-race-date strong {
        font-size: 16pt;
      }

      .print-race-date span {
        margin-top: 1mm;
        font-size: 7pt;
        font-weight: 800;
      }

      .print-race-title h2 {
        margin: 0 0 1mm;
        border: 0;
        padding: 0;
        font-size: 12pt;
      }

      .print-race-title div {
        font-size: 8.5pt;
      }

      .print-race-badges {
        display: flex;
        gap: 1.5mm;
        align-items: center;
      }

      .print-fidal-badge {
        padding: 1mm 2mm;
        border: 1px solid #444;
        border-radius: 5mm;
        font-size: 7pt;
        font-weight: 800;
      }

      .print-race-key-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .print-race-key-grid > div {
        min-width: 0;
        padding: 2.2mm 3mm;
        border-right: 1px solid #d2d2d2;
        border-bottom: 1px solid #d2d2d2;
      }

      .print-race-key-grid > div:nth-child(3n) {
        border-right: 0;
      }

      .print-race-key-grid > div:nth-last-child(-n + 3) {
        border-bottom: 0;
      }

      .print-race-key-grid span {
        display: block;
        margin-bottom: 0.7mm;
        color: #555 !important;
        font-size: 6.8pt;
        font-weight: 800;
        text-transform: uppercase;
      }

      .print-race-key-grid strong {
        font-size: 8.7pt;
      }

      .print-race-details {
        display: flex;
        flex-wrap: wrap;
        gap: 1mm 5mm;
        padding: 1.7mm 3mm;
        border-top: 1px solid #ddd;
        font-size: 7.5pt;
      }

      .print-race-notes,
      .print-race-missing {
        padding: 1.5mm 3mm;
        border-top: 1px solid #ddd;
        font-size: 7.4pt;
      }

      .print-race-missing {
        background: #f2f2f2;
        font-style: italic;
      }

      .print-race-list .print-race-card {
        margin-bottom: 1.7mm;
      }

      .print-race-list .print-race-card-head {
        grid-template-columns: 12mm 1fr;
        padding: 1.3mm 2mm;
      }

      .print-race-list .print-race-date {
        min-height: 9mm;
      }

      .print-race-list .print-race-date strong {
        font-size: 13pt;
      }

      .print-race-list .print-race-title h2 {
        font-size: 10pt;
      }

      .print-race-list .print-race-key-grid > div {
        padding: 1.2mm 2mm;
      }

      .print-race-list .print-race-key-grid span {
        margin-bottom: 0.35mm;
        font-size: 6.2pt;
      }

      .print-race-list .print-race-key-grid strong {
        font-size: 7.6pt;
      }

      .print-calendar-document {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
      }

      .print-calendar-hero {
        display: grid;
        grid-template-columns: 18mm 1fr auto;
        gap: 5mm;
        align-items: center;
        margin-bottom: 5mm;
        padding: 0 0 3mm;
        border-bottom: 1.2mm solid #0b5a36;
      }

      .print-calendar-hero img {
        width: 16mm;
        height: 16mm;
        object-fit: contain;
      }

      .print-calendar-hero span {
        display: block;
        margin-bottom: 0.8mm;
        color: #0b5a36 !important;
        font-size: 7pt;
        font-weight: 800;
        letter-spacing: 0.55mm;
      }

      .print-calendar-hero h1 {
        margin: 0;
        font-size: 20pt;
        font-weight: 800;
        line-height: 1;
        text-transform: uppercase;
      }

      .print-calendar-hero strong {
        grid-column: 3;
        grid-row: 1;
        font-size: 12pt;
        font-weight: 700;
        text-transform: capitalize;
      }

      .print-calendar-row {
        display: grid;
        grid-template-columns: 14mm minmax(0, 1.7fr) 24mm minmax(31mm, 1fr) minmax(29mm, 0.9fr);
        gap: 3mm;
        align-items: center;
        margin: 0;
        padding: 3mm 1mm;
        border: 0;
        border-bottom: 1px solid #c9cecb;
        background: #fff;
        break-inside: avoid;
        page-break-inside: avoid;
      }

      .print-calendar-row:first-child {
        border-top: 1px solid #c9cecb;
      }

      .print-calendar-date {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 13mm;
        border: 1px solid #0b5a36;
        line-height: 1;
      }

      .print-calendar-date strong {
        color: #0b5a36 !important;
        font-size: 16pt;
      }

      .print-calendar-date span {
        margin-top: 1mm;
        color: #0b5a36 !important;
        font-size: 6.5pt;
        font-weight: 800;
      }

      .print-calendar-race h2 {
        margin: 0 0 1mm;
        padding: 0;
        border: 0;
        font-size: 10.5pt;
        font-weight: 800;
        line-height: 1.15;
      }

      .print-calendar-race p {
        margin: 0;
        color: #4e5551 !important;
        font-size: 7.2pt;
        line-height: 1.25;
      }

      .print-calendar-type strong {
        display: block;
        margin-bottom: 1mm;
        color: #0b5a36 !important;
        font-size: 7.3pt;
        font-weight: 800;
        text-transform: uppercase;
      }

      .print-calendar-type span {
        display: block;
        color: #4e5551 !important;
        font-size: 6.8pt;
        font-weight: 700;
      }

      .print-calendar-info {
        align-self: stretch;
        padding-left: 3mm;
        border-left: 1px solid #d8dcda;
      }

      .print-calendar-info span {
        display: block;
        margin-bottom: 1mm;
        color: #68716c !important;
        font-size: 6.1pt;
        font-weight: 800;
        text-transform: uppercase;
      }

      .print-calendar-info strong {
        font-size: 7.4pt;
        font-weight: 700;
        line-height: 1.25;
      }

      .print-calendar-empty {
        padding: 12mm;
        border: 1px solid #aaa;
        text-align: center;
      }

      .print-calendar-footer {
        display: flex;
        justify-content: space-between;
        margin-top: 5mm;
        padding-top: 2mm;
        border-top: 1px solid #0b5a36;
        color: #4b554f !important;
        font-size: 6.5pt;
      }
      /* Sistema stampa canonico: intestazione, metadati, sezioni, tabelle e
         pie di pagina sono condivisi da tutti i report attuali e futuri. */
    }

    @media (max-width: 1040px) {
      .grid,
      .dashboard-grid {
        grid-template-columns: 1fr;
      }

      .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .toolbar,
      .ranking-tools {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 720px) {
      .app {
        width: min(100% - 18px, 620px);
        padding-top: 10px;
      }

      .topbar {
        align-items: flex-start;
        flex-direction: column;
      }

      .top-actions {
        justify-content: flex-start;
        width: 100%;
      }

      .print-select {
        width: 100%;
      }

      .drive-status {
        text-align: left;
      }

      .tabs {
        grid-template-columns: 1fr 1fr;
      }

      .metrics,
      .dashboard-controls,
      .form-grid,
      .toolbar,
      .ranking-tools,
      .preview-score {
        grid-template-columns: 1fr;
      }
    }

    /* Tema plancia FREE RUN ASD */
    :root {
      color-scheme: dark;
      --bg: #050607;
      --panel: #0b0f10;
      --panel-soft: #101516;
      --ink: #f7f7f2;
      --muted: #a9b0ad;
      --line: rgba(255, 255, 255, 0.14);
      --green: #00b33c;
      --green-dark: #008f32;
      --blue: #2f80ff;
      --amber: #ffc400;
      --red: #e51f2d;
      --soft-green: rgba(0, 179, 60, 0.14);
      --soft-blue: rgba(47, 128, 255, 0.14);
      --soft-amber: rgba(255, 196, 0, 0.14);
      --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    }

    body {
      color: var(--ink);
      background:
        radial-gradient(circle at 18% 10%, rgba(0, 179, 60, 0.13), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(229, 31, 45, 0.12), transparent 28%),
        linear-gradient(135deg, #030405 0%, #070a0b 46%, #050606 100%);
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(115deg, transparent 0 9%, rgba(0, 179, 60, 0.10) 9% 10%, transparent 10% 100%),
        linear-gradient(118deg, transparent 0 14%, rgba(229, 31, 45, 0.11) 14% 15%, transparent 15% 100%);
      opacity: 0.8;
    }

    .app {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 230px minmax(0, 1fr);
      grid-template-rows: auto minmax(0, 1fr);
      gap: 18px 22px;
      width: 100%;
      max-width: none;
      min-height: 100vh;
      margin: 0;
      padding: 22px 24px 28px;
    }

    .topbar {
      grid-column: 2;
      align-items: flex-start;
      padding: 8px 0 0;
      background: transparent;
      border: 0;
      border-radius: 0;
      box-shadow: none;
    }

    main {
      grid-column: 2;
      min-width: 0;
    }

    .brand {
      align-items: flex-start;
      padding-top: 6px;
    }

    .mark {
      display: none;
    }

    .brand-logo {
      width: 112px;
      height: 74px;
      filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.18));
    }

    h1 {
      max-width: 430px;
      color: #fff;
      font-size: 28px;
      font-style: italic;
      font-weight: 900;
      line-height: 1.05;
      text-transform: uppercase;
      text-shadow: 0 0 22px rgba(255, 255, 255, 0.12);
    }

    .subtitle {
      color: var(--muted);
      font-size: 15px;
    }

    .top-actions {
      gap: 10px;
      max-width: 980px;
    }

    button,
    .file-button {
      min-height: 44px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 6px;
      color: #fff;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    button:hover,
    .file-button:hover {
      border-color: rgba(0, 179, 60, 0.65);
      background: rgba(0, 179, 60, 0.12);
    }

    button.secondary {
      color: #fff;
      background: rgba(255, 255, 255, 0.03);
      border-color: rgba(255, 255, 255, 0.18);
    }

    button.secondary:hover {
      color: #fff;
      background: rgba(0, 179, 60, 0.12);
    }

    button.danger,
    #exportDataBtn {
      color: #fff;
      background: linear-gradient(180deg, #c81723, #8f111b);
      border-color: rgba(229, 31, 45, 0.75);
    }

    button.danger:hover,
    #exportDataBtn:hover {
      background: linear-gradient(180deg, #e51f2d, #a61520);
      border-color: rgba(255, 255, 255, 0.30);
    }

    input,
    select,
    textarea,
    .print-select {
      color: #fff;
      background: #090c0d;
      border-color: rgba(255, 255, 255, 0.18);
      border-radius: 6px;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--green);
      box-shadow: 0 0 0 3px rgba(0, 179, 60, 0.18);
    }

    label {
      color: #bcc4c0;
      font-size: 11px;
    }

    .check-option {
      color: #f3f5f4;
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.14);
    }

    .drive-status {
      color: #c5cbc8;
    }

    .tabs {
      position: sticky;
      top: 22px;
      grid-column: 1;
      grid-row: 1 / span 2;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-height: calc(100vh - 44px);
      margin: 0;
      padding: 24px 16px;
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 35%),
        #050708;
      border-right: 1px solid rgba(255, 255, 255, 0.12);
      box-shadow: 18px 0 55px rgba(0, 0, 0, 0.46);
    }

    .tabs::before {
      content: "";
      display: block;
      width: 170px;
      height: 116px;
      margin: 0 auto 24px;
      background: url("logo-free-run.jpeg") center / contain no-repeat;
      filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.20));
    }

    .tabs::after {
      content: "Corriamo\A insieme.\A Sempre.";
      margin-top: auto;
      padding: 150px 4px 8px;
      color: #fff;
      font-size: 24px;
      font-style: italic;
      font-weight: 800;
      line-height: 1.08;
      white-space: pre;
      background:
        linear-gradient(150deg, transparent 0 38%, rgba(0, 179, 60, 0.92) 38% 46%, transparent 46% 100%),
        linear-gradient(155deg, transparent 0 50%, rgba(255, 255, 255, 0.86) 50% 56%, transparent 56% 100%),
        linear-gradient(160deg, transparent 0 60%, rgba(229, 31, 45, 0.92) 60% 69%, transparent 69% 100%);
      background-repeat: no-repeat;
      background-size: 100% 170px;
      background-position: center top;
    }

    .tab {
      justify-content: flex-start;
      min-height: 48px;
      padding: 10px 16px;
      color: #f3f5f4;
      background: transparent;
      border: 1px solid transparent;
      box-shadow: none;
      text-align: left;
    }

    .tab:hover {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.16);
    }

    .tab.active {
      color: #fff;
      background: rgba(229, 31, 45, 0.14);
      border-color: rgba(229, 31, 45, 0.95);
      box-shadow: inset 3px 0 0 var(--red), 0 0 28px rgba(229, 31, 45, 0.12);
    }

    .dashboard-controls,
    .panel,
    .metric {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
        rgba(9, 13, 14, 0.94);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 8px;
      box-shadow: var(--shadow);
      backdrop-filter: blur(10px);
    }

    .dashboard-controls {
      margin-bottom: 18px;
    }

    .dashboard-controls .hint {
      color: var(--muted);
    }

    .sponsor-board {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
        rgba(9, 13, 14, 0.94);
      border-color: rgba(255, 255, 255, 0.16);
      backdrop-filter: blur(10px);
    }

    .sponsor-tile {
      overflow: hidden;
      background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.06), transparent 34%),
        #020303;
      border-color: rgba(255, 255, 255, 0.13);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .sponsor-tile.main {
      border-color: rgba(229, 31, 45, 0.74);
      box-shadow: 0 0 28px rgba(229, 31, 45, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .sponsor-tile.main::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 3px;
      background: var(--red);
      box-shadow: 0 0 24px var(--red);
    }

    .sponsor-tile span,
    .sidebar-sponsors span {
      color: #d5dad7;
    }

    .sponsor-logo {
      filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.12));
    }

    .sidebar-sponsors {
      display: grid;
      gap: 8px;
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .sidebar-sponsors .sidebar-sponsor {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 86px;
      padding: 0;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid rgba(255, 255, 255, 0.12);
      border-radius: 6px;
    }

    .sidebar-sponsors .sidebar-sponsor.main {
      min-height: 112px;
      border-color: rgba(229, 31, 45, 0.60);
      background: rgba(229, 31, 45, 0.08);
    }

    .sidebar-sponsors img {
      position: absolute;
      inset: 0;
      display: block;
      width: 100%;
      height: 100%;
      max-height: none;
      object-fit: cover;
      object-position: center;
    }

    .sidebar-sponsors .sidebar-sponsor.main img {
      max-height: none;
    }

    .sidebar-sponsors img.fit {
      inset: 6px;
      width: calc(100% - 12px);
      height: calc(100% - 12px);
      object-fit: contain;
    }

    .metrics {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 18px;
    }

    .metric {
      position: relative;
      min-height: 120px;
      padding: 18px 20px;
      overflow: hidden;
    }

    .metric::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 3px;
      background: var(--green);
      box-shadow: 0 0 24px var(--green);
    }

    .metric:nth-child(2),
    .metric:nth-child(3),
    .metric:nth-child(4),
    .metric:nth-child(5) {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
        rgba(9, 13, 14, 0.94);
    }

    .metric:nth-child(3)::before,
    .metric:nth-child(5)::before {
      background: var(--red);
      box-shadow: 0 0 24px var(--red);
    }

    .metric:nth-child(4)::before {
      background: #fff;
      box-shadow: 0 0 24px rgba(255, 255, 255, 0.45);
    }

    .metric span {
      color: #d5dad7;
      font-size: 11px;
    }

    .metric strong {
      color: #fff;
      font-size: clamp(34px, 4vw, 48px);
      font-weight: 900;
    }

    .panel-head {
      background: rgba(255, 255, 255, 0.025);
      border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .panel-head h2 {
      color: #fff;
      font-size: 18px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .panel-body,
    .toolbar,
    .ranking-tools {
      background: transparent;
      border-color: rgba(255, 255, 255, 0.12);
    }

    table {
      color: #f3f5f4;
    }

    th,
    td {
      border-bottom-color: rgba(255, 255, 255, 0.10);
    }

    th {
      color: #aeb6b2;
      background: #101516;
    }

    tbody tr:hover {
      background: rgba(0, 179, 60, 0.06);
    }

    .badge {
      color: #16ff65;
      background: rgba(0, 179, 60, 0.14);
      border: 1px solid rgba(0, 179, 60, 0.26);
    }

    .badge.blue {
      color: #78b7ff;
      background: rgba(47, 128, 255, 0.14);
      border-color: rgba(47, 128, 255, 0.26);
    }

    .badge.amber {
      color: #ffc400;
      background: rgba(255, 196, 0, 0.12);
      border-color: rgba(255, 196, 0, 0.28);
    }

    .badge.purple {
      color: #e1a8ff;
      background: rgba(151, 72, 214, 0.16);
      border-color: rgba(151, 72, 214, 0.34);
    }

    .badge.green {
      color: #16ff65;
      background: rgba(0, 179, 60, 0.14);
      border-color: rgba(0, 179, 60, 0.26);
    }

    .money-positive {
      color: #16ff65;
    }

    .money-negative {
      color: #ff4050;
    }

    .empty,
    .status {
      color: var(--muted);
    }

    .preview-score div {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.14);
    }

    .toast {
      background: #071c10;
      border: 1px solid rgba(0, 179, 60, 0.42);
    }

    /* Restyling mockup FREE RUN ASD */
    :root {
      --bg: #070707;
      --panel: #101214;
      --panel-soft: #171A1D;
      --ink: #FFFFFF;
      --muted: #B5B5B5;
      --line: rgba(255,255,255,0.10);
      --green: #00C853;
      --green-dark: #00a846;
      --blue: #008CFF;
      --amber: #FFB300;
      --red: #E31E24;
      --shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
    }

    body {
      font-family: Inter, Poppins, Arial, Helvetica, sans-serif;
      background:
        linear-gradient(115deg, rgba(0, 200, 83, 0.10) 0 1px, transparent 1px 18%),
        linear-gradient(125deg, transparent 0 54%, rgba(227, 30, 36, 0.08) 54% 55%, transparent 55%),
        #070707;
      animation: appFadeIn 280ms ease both;
    }

    @keyframes appFadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to { opacity: 1; transform: translateY(0); }
    }

    body::before {
      background:
        radial-gradient(circle at 19% 9%, rgba(0, 200, 83, 0.12), transparent 24%),
        radial-gradient(circle at 93% 14%, rgba(227, 30, 36, 0.12), transparent 22%),
        linear-gradient(120deg, transparent 0 10%, rgba(0, 200, 83, 0.16) 10% 10.45%, transparent 10.45% 100%),
        linear-gradient(122deg, transparent 0 15%, rgba(255,255,255,0.13) 15% 15.35%, transparent 15.35% 100%),
        linear-gradient(124deg, transparent 0 20%, rgba(227, 30, 36, 0.16) 20% 20.5%, transparent 20.5% 100%);
      opacity: 1;
    }

    .app {
      grid-template-columns: 250px minmax(0, 1fr);
      gap: 22px 28px;
      padding: 24px 28px 32px;
    }

    .tabs {
      top: 24px;
      min-height: calc(100vh - 48px);
      padding: 24px 18px;
      background:
        linear-gradient(180deg, rgba(255,255,255,0.04), transparent 38%),
        #030303;
      border-right: 1px solid rgba(255,255,255,0.14);
      box-shadow: 20px 0 60px rgba(0,0,0,0.64);
    }

    .tabs::before {
      width: 190px;
      height: 128px;
      margin-bottom: 26px;
    }

    .tabs::after {
      padding-top: 168px;
      font-size: 25px;
      color: #fff;
      text-shadow: 0 0 18px rgba(255,255,255,0.20);
      background:
        linear-gradient(150deg, transparent 0 34%, rgba(0, 200, 83, 0.94) 34% 44%, transparent 44% 100%),
        linear-gradient(156deg, transparent 0 48%, rgba(255,255,255,0.90) 48% 56%, transparent 56% 100%),
        linear-gradient(163deg, transparent 0 61%, rgba(227, 30, 36, 0.94) 61% 72%, transparent 72% 100%);
      background-size: 100% 185px;
    }

    .tab {
      gap: 12px;
      min-height: 48px;
      border-radius: 8px;
      color: #fff;
      transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
    }

    .tab::before {
      content: attr(data-icon);
      display: inline-grid;
      place-items: center;
      width: 24px;
      color: #fff;
      font-weight: 900;
    }

    .tab:hover {
      transform: translateX(3px);
      border-color: rgba(0, 200, 83, 0.72);
      box-shadow: 0 0 24px rgba(0, 200, 83, 0.15);
    }

    .tab.active {
      color: #E31E24;
      background: rgba(227, 30, 36, 0.11);
      border-color: rgba(227, 30, 36, 0.95);
      box-shadow: inset 3px 0 0 #E31E24, 0 0 30px rgba(227, 30, 36, 0.18);
    }

    .tab.active::before {
      color: #E31E24;
    }

    .nav-group {
      display: grid;
      gap: 6px;
      padding: 8px;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      background: rgba(255,255,255,0.018);
      transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
    }

    .nav-group.is-active {
      border-color: rgba(0, 200, 83, 0.38);
      background: linear-gradient(120deg, rgba(0, 200, 83, 0.08), rgba(255,255,255,0.018));
      box-shadow: 0 0 22px rgba(0, 200, 83, 0.08);
    }

    .nav-group-title {
      display: grid;
      grid-template-columns: 26px 1fr;
      align-items: center;
      gap: 8px;
      min-height: 30px;
      padding: 0 6px;
      color: #fff;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .nav-group-icon {
      display: inline-grid;
      place-items: center;
      width: 24px;
      height: 24px;
      border-radius: 8px;
      color: var(--green);
      background: rgba(0, 200, 83, 0.10);
      border: 1px solid rgba(0, 200, 83, 0.20);
    }

    .nav-group.is-active .nav-group-icon {
      color: #fff;
      background: rgba(227, 30, 36, 0.76);
      border-color: rgba(227, 30, 36, 0.86);
    }

    .nav-group .tab {
      min-height: 38px;
      padding: 8px 10px 8px 12px;
      font-size: 13px;
      border-radius: 9px;
      color: #e9eded;
      background: rgba(255,255,255,0.012);
    }

    .nav-group .tab::before {
      width: 20px;
      font-size: 12px;
      opacity: 0.86;
    }

    .nav-group .tab.active {
      color: #fff;
      background: rgba(227, 30, 36, 0.18);
      border-color: rgba(227, 30, 36, 0.95);
      box-shadow: inset 3px 0 0 var(--red);
    }

    .module-guide {
      margin-bottom: 18px;
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 16px;
      overflow: hidden;
      background:
        linear-gradient(120deg, rgba(0,200,83,0.10), rgba(255,255,255,0.03) 45%, rgba(227,30,36,0.08)),
        rgba(12, 15, 16, 0.92);
      box-shadow: 0 22px 70px rgba(0,0,0,0.34);
    }

    .module-guide-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 14px;
      align-items: center;
      padding: 18px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
    }

    .module-guide-kicker {
      display: block;
      margin-bottom: 5px;
      color: var(--green);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .module-guide h2 {
      margin: 0;
      color: #fff;
      font-size: clamp(22px, 2vw, 30px);
      line-height: 1;
      text-transform: uppercase;
      font-style: italic;
    }

    .module-guide p {
      margin: 8px 0 0;
      color: #c7c7c7;
      font-size: 13px;
      font-weight: 700;
      line-height: 1.45;
    }

    .module-guide-badge {
      justify-self: end;
      padding: 9px 12px;
      border-radius: 10px;
      color: #fff;
      background: rgba(227,30,36,0.18);
      border: 1px solid rgba(227,30,36,0.55);
      font-size: 12px;
      text-transform: uppercase;
    }

    .module-guide-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 10px;
      padding: 14px;
    }

    .module-guide-card {
      min-height: 92px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      background: rgba(0,0,0,0.26);
      color: #fff;
      padding: 13px 14px;
      text-align: left;
      cursor: pointer;
      transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    }

    .module-guide-card:hover {
      transform: translateY(-2px);
      border-color: rgba(0,200,83,0.55);
      background: rgba(0,200,83,0.08);
    }

    .module-guide-card strong {
      display: block;
      font-size: 14px;
      text-transform: uppercase;
    }

    .module-guide-card span {
      display: block;
      margin-top: 6px;
      color: #b9b9b9;
      font-size: 12px;
      font-weight: 700;
      line-height: 1.35;
    }

    .module-guide-target {
      outline: 2px solid rgba(0,200,83,0.55);
      box-shadow: 0 0 34px rgba(0,200,83,0.18);
    }

    .topbar {
      align-items: flex-start;
      gap: 20px;
    }

    .brand-logo {
      width: 126px;
      height: 82px;
    }

    h1 {
      max-width: 500px;
      font-size: clamp(25px, 2.1vw, 34px);
      font-style: italic;
      letter-spacing: 0;
    }

    .subtitle {
      color: #B5B5B5;
      font-size: 15px;
    }

    .top-actions {
      gap: 10px;
      max-width: 1060px;
    }

    button,
    .file-button,
    .print-select {
      min-height: 44px;
      border-radius: 10px;
      border: 1px solid rgba(255,255,255,0.18);
      background: #080909;
      color: #fff;
      transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
    }

    .top-actions button,
    .top-actions .file-button {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .top-actions button::before,
    .top-actions .file-button::before {
      display: inline-grid;
      place-items: center;
      width: 18px;
      color: currentColor;
      font-weight: 900;
    }

    #driveOpenBtn::before { content: "□"; }
    #driveSaveAsBtn::before { content: "+"; }
    #driveSaveBtn::before { content: "⇧"; }
    #exportDataBtn::before { content: "⇩"; }
    .top-actions .file-button::before { content: "⇧"; }
    #exportRankingBtn::before { content: "▥"; }
    #printRankingsBtn::before { content: "▤"; }

    button:hover,
    .file-button:hover,
    .print-select:hover {
      transform: translateY(-1px) scale(1.01);
      border-color: rgba(0, 200, 83, 0.72);
      box-shadow: 0 0 24px rgba(0, 200, 83, 0.16);
    }

    #exportDataBtn,
    button.danger {
      background: linear-gradient(180deg, #E31E24, #98131a);
      border-color: rgba(227, 30, 36, 0.86);
      box-shadow: 0 0 24px rgba(227, 30, 36, 0.16);
    }

    input,
    select,
    textarea,
    .print-select {
      border-radius: 10px;
      background: #090a0b;
      border-color: rgba(255,255,255,0.14);
      color: #fff;
    }

    .dashboard-controls,
    .panel,
    .metric,
    .sponsor-board,
    .dashboard-society-card {
      background:
        linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.014)),
        #101214;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 16px;
      box-shadow: 0 18px 52px rgba(0,0,0,0.38);
      transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
    }

    .panel:hover,
    .metric:hover,
    .sponsor-board:hover,
    .dashboard-society-card:hover {
      transform: translateY(-2px);
      background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.020)),
        #171A1D;
      border-color: rgba(0, 200, 83, 0.28);
      box-shadow: 0 26px 70px rgba(0,0,0,0.48), 0 0 28px rgba(0, 200, 83, 0.08);
    }

    .metrics {
      gap: 16px;
      margin-bottom: 22px;
    }

    .metric {
      min-height: 132px;
      padding: 22px 22px 18px 78px;
    }

    .metric::after {
      position: absolute;
      left: 22px;
      top: 42px;
      color: rgba(255,255,255,0.9);
      font-size: 38px;
      font-weight: 900;
      line-height: 1;
    }

    .metric:nth-child(1)::after { content: "●●"; color: #00C853; font-size: 28px; }
    .metric:nth-child(2)::after { content: "⚑"; color: #00C853; }
    .metric:nth-child(3)::after { content: "♕"; color: #E31E24; }
    .metric:nth-child(4)::after { content: "◎"; color: #fff; }
    .metric:nth-child(5)::after { content: "☆"; color: #E31E24; }

    .metric span {
      color: #B5B5B5;
      font-size: 12px;
    }

    .metric strong {
      margin-top: 10px;
      font-size: clamp(36px, 4.2vw, 54px);
      font-weight: 900;
      max-width: 100%;
      overflow-wrap: anywhere;
      white-space: normal;
    }

    #control .metric {
      padding-right: 18px;
    }

    #control .metric strong {
      font-size: clamp(28px, 3.1vw, 44px);
      line-height: 0.98;
    }

    #controlOverallStatus {
      font-size: clamp(26px, 2.8vw, 38px) !important;
    }

    #controlSyncStatus {
      font-size: clamp(26px, 2.9vw, 40px) !important;
    }

    #controlLastSync {
      font-size: clamp(24px, 2.6vw, 36px) !important;
      line-height: 1.04 !important;
    }

    .accounting-metrics {
      grid-template-columns: repeat(4, minmax(220px, 1fr));
      gap: 14px;
      align-items: stretch;
    }

    .accounting-metrics .metric {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
      min-height: 116px;
      padding: 18px 20px;
      border-radius: 14px;
    }

    .accounting-metrics .metric::after {
      content: none;
      display: none;
    }

    .accounting-metrics .metric span {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      min-height: 30px;
      max-width: 100%;
      color: #d8dddb;
      font-size: 11px;
      line-height: 1.18;
      white-space: normal;
    }

    .accounting-metrics .metric span::before {
      content: "";
      flex: 0 0 9px;
      width: 9px;
      height: 9px;
      border-radius: 999px;
      background: #00C853;
      box-shadow: 0 0 16px rgba(0, 200, 83, 0.7);
    }

    .accounting-metrics .metric:nth-child(3)::before,
    .accounting-metrics .metric:nth-child(5)::before,
    .accounting-metrics .metric:nth-child(8)::before {
      background: #E31E24;
      box-shadow: 0 0 24px rgba(227, 30, 36, 0.62);
    }

    .accounting-metrics .metric:nth-child(4)::before {
      background: rgba(255,255,255,0.92);
      box-shadow: 0 0 24px rgba(255,255,255,0.32);
    }

    .accounting-metrics .metric:nth-child(3) span::before,
    .accounting-metrics .metric:nth-child(5) span::before,
    .accounting-metrics .metric:nth-child(8) span::before {
      background: #E31E24;
      box-shadow: 0 0 16px rgba(227, 30, 36, 0.68);
    }

    .accounting-metrics .metric:nth-child(4) span::before {
      background: rgba(255,255,255,0.92);
      box-shadow: 0 0 16px rgba(255,255,255,0.32);
    }

    .accounting-metrics .metric strong {
      display: block;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      margin: 0;
      overflow: hidden;
      color: #fff;
      font-size: clamp(26px, 2.55vw, 40px);
      line-height: 0.98;
      letter-spacing: 0;
      text-overflow: clip;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    .dashboard-main-grid {
      grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(310px, 0.86fr);
      align-items: start;
    }

    .dashboard-side-stack {
      display: grid;
      gap: 14px;
      min-width: 0;
    }

    .dashboard-accounting-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 1px;
      padding: 14px;
    }

    .dashboard-accounting-grid div {
      min-height: 64px;
      padding: 10px;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(0,0,0,0.16);
    }

    .dashboard-accounting-grid span,
    .society-stat span {
      display: block;
      color: #B5B5B5;
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }

    .dashboard-accounting-grid strong,
    .society-stat strong {
      display: block;
      margin-top: 8px;
      color: #fff;
      font-size: 20px;
      font-weight: 900;
    }

    .dashboard-society-card {
      display: grid;
      grid-template-columns: auto minmax(190px, 1.3fr) auto repeat(4, minmax(120px, 0.7fr)) auto;
      gap: 18px;
      align-items: center;
      margin-top: 16px;
      padding: 20px 22px;
    }

    .society-shield {
      display: grid;
      place-items: center;
      width: 72px;
      height: 72px;
      color: #fff;
      background: linear-gradient(180deg, #E31E24, #970f17);
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 18px 18px 26px 26px;
      font-size: 32px;
      font-weight: 900;
      box-shadow: 0 0 32px rgba(227, 30, 36, 0.22);
    }

    .dashboard-society-card h2 {
      margin: 0 0 8px;
      color: #fff;
      font-size: 18px;
      text-transform: uppercase;
    }

    .dashboard-society-card p {
      margin: 0;
      color: #B5B5B5;
    }

    .society-position strong {
      display: block;
      color: #E31E24;
      font-size: 48px;
      line-height: 0.95;
      font-weight: 900;
    }

    .society-position span {
      display: block;
      color: #B5B5B5;
      font-size: 12px;
    }

    .panel-head {
      min-height: 54px;
      padding: 15px 18px;
      border-bottom-color: rgba(255,255,255,0.10);
    }

    .panel-head h2 {
      font-size: 17px;
      letter-spacing: 0;
    }

    table {
      color: #fff;
    }

    th {
      color: #B5B5B5;
      background: #151719;
    }

    td {
      color: #fff;
    }

    tbody tr {
      transition: background 150ms ease;
    }

    tbody tr:hover {
      background: rgba(255,255,255,0.055);
    }

    .badge {
      min-height: 24px;
      border-radius: 7px;
      color: #00C853;
      background: rgba(0, 200, 83, 0.14);
      border-color: rgba(0, 200, 83, 0.28);
    }

    .badge.blue {
      color: #008CFF;
      background: rgba(0, 140, 255, 0.14);
      border-color: rgba(0, 140, 255, 0.28);
    }

    .badge.amber {
      color: #FFB300;
      background: rgba(255, 179, 0, 0.14);
      border-color: rgba(255, 179, 0, 0.30);
    }

    .badge.red {
      color: #E31E24;
      background: rgba(227, 30, 36, 0.13);
      border-color: rgba(227, 30, 36, 0.34);
    }

    .badge.purple {
      color: #e6b1ff;
      background: rgba(151, 72, 214, 0.18);
      border-color: rgba(151, 72, 214, 0.35);
    }

    .badge.gray {
      color: #c7cbd1;
      background: rgba(158, 166, 177, 0.13);
      border-color: rgba(158, 166, 177, 0.32);
    }

    .badge.cyan {
      color: #20d9d2;
      background: rgba(32, 217, 210, 0.13);
      border-color: rgba(32, 217, 210, 0.34);
    }

    .badge.orange {
      color: #ff8f28;
      background: rgba(255, 143, 40, 0.14);
      border-color: rgba(255, 143, 40, 0.35);
    }

    .warehouse-subnav {
      display: grid;
      grid-template-columns: repeat(6, minmax(145px, 1fr));
      gap: 8px;
      margin: 12px 0 16px;
      padding: 8px;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 12px;
      background: rgba(14,17,18,0.88);
      position: sticky;
      top: 8px;
      z-index: 25;
    }

    .warehouse-subnav button {
      min-height: 48px;
      color: #c9cdd1;
      background: #181b1d;
      border: 1px solid rgba(255,255,255,0.12);
    }

    .warehouse-subnav button.active {
      color: #fff;
      border-color: rgba(0,200,83,0.65);
      background: linear-gradient(135deg, rgba(0,200,83,0.27), rgba(0,140,255,0.16));
      box-shadow: inset 3px 0 #00c853;
    }

    #wardrobe [data-warehouse-area] {
      grid-column: 1 / -1;
    }

    #wardrobe [data-warehouse-area].warehouse-area-hidden {
      display: none !important;
    }

    @media (max-width: 1180px) {
      .warehouse-subnav { grid-template-columns: repeat(3, minmax(145px, 1fr)); position: static; }
    }

    @media (max-width: 620px) {
      .warehouse-subnav { grid-template-columns: 1fr 1fr; }
    }

    .money-positive {
      color: #00C853 !important;
    }

    .money-negative {
      color: #E31E24 !important;
    }

    /* Nuova plancia sportiva professionale */
    body {
      background:
        radial-gradient(circle at 74% -8%, rgba(227, 30, 36, 0.18), transparent 28%),
        radial-gradient(circle at 12% 4%, rgba(0, 200, 83, 0.16), transparent 26%),
        linear-gradient(115deg, transparent 0 16%, rgba(0, 200, 83, 0.12) 16% 16.35%, transparent 16.35% 100%),
        linear-gradient(118deg, transparent 0 22%, rgba(255,255,255,0.10) 22% 22.25%, transparent 22.25% 100%),
        linear-gradient(121deg, transparent 0 28%, rgba(227, 30, 36, 0.13) 28% 28.35%, transparent 28.35% 100%),
        #070707;
    }

    body::before {
      background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px),
        radial-gradient(circle at 50% 0, rgba(255,255,255,0.08), transparent 34%);
      background-size: 42px 42px, 42px 42px, 100% 100%;
      opacity: 0.55;
    }

    .topbar {
      padding: 4px 0 2px;
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .brand {
      position: relative;
      min-height: 86px;
      padding: 8px 0 10px;
    }

    .brand::after {
      content: "";
      position: absolute;
      left: 138px;
      bottom: 0;
      width: min(420px, 54vw);
      height: 3px;
      background: linear-gradient(90deg, #00C853 0 32%, #fff 32% 54%, #E31E24 54% 100%);
      box-shadow: 0 0 24px rgba(0, 200, 83, 0.28);
    }

    h1 {
      text-wrap: balance;
    }

    .dashboard-controls {
      display: grid;
      grid-template-columns: minmax(210px, 280px) 1fr;
      align-items: end;
      gap: 18px;
      padding: 14px 18px;
      margin-bottom: 18px;
      border-radius: 14px;
    }

    .sponsor-board {
      grid-template-columns: minmax(340px, 1.25fr) repeat(2, minmax(210px, 0.82fr));
      gap: 14px;
      padding: 14px;
      border-radius: 14px;
      background:
        linear-gradient(120deg, rgba(0, 200, 83, 0.08), transparent 42%),
        linear-gradient(300deg, rgba(227, 30, 36, 0.08), transparent 44%),
        rgba(10, 12, 13, 0.94);
    }

    .sponsor-tile {
      min-height: 122px;
      border-radius: 12px;
    }

    .sponsor-tile.main {
      min-height: 152px;
    }

    .metrics {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 14px;
    }

    .metric {
      isolation: isolate;
      min-height: 126px;
      border-radius: 14px;
      background:
        linear-gradient(140deg, rgba(255,255,255,0.08), rgba(255,255,255,0.015) 48%),
        #101214;
    }

    .metric::before {
      width: 4px;
    }

    .metric::after {
      opacity: 0.9;
      filter: drop-shadow(0 0 18px currentColor);
    }

    .metric span {
      letter-spacing: 0.02em;
    }

    .panel,
    .dashboard-society-card,
    .dashboard-podium-section {
      border-radius: 14px;
      background:
        linear-gradient(145deg, rgba(255,255,255,0.065), rgba(255,255,255,0.018) 54%),
        rgba(12, 15, 16, 0.96);
      box-shadow:
        0 18px 52px rgba(0,0,0,0.42),
        inset 0 1px 0 rgba(255,255,255,0.06);
    }

    .panel-head {
      min-height: 56px;
      background:
        linear-gradient(90deg, rgba(0, 200, 83, 0.09), transparent 34%),
        rgba(255,255,255,0.024);
    }

    .panel-head h2 {
      font-size: 16px;
    }

    .dashboard-ranking-title {
      display: grid;
      gap: 4px;
      min-width: 0;
    }

    .dashboard-rotation-note {
      color: #B5B5B5;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .dashboard-leaderboard tbody {
      animation: rankingFade 260ms ease both;
    }

    .dashboard-leaderboard tbody tr {
      animation: rankingFade 260ms ease both;
    }

    @keyframes rankingFade {
      from { opacity: 0; transform: translateY(5px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .pizzano-society-inputs {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
      margin-top: 16px;
    }

    .pizzano-society-card {
      min-width: 0;
      padding: 14px;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 12px;
      background:
        linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
        #0b0d0e;
    }

    .pizzano-society-card.free-run {
      border-color: rgba(0, 200, 83, 0.38);
      box-shadow: inset 4px 0 0 rgba(0, 200, 83, 0.86);
    }

    .pizzano-society-card h3 {
      margin: 0 0 12px;
      color: #fff;
      font-size: 14px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .pizzano-society-card textarea {
      min-height: 150px;
      font-family: Consolas, "Courier New", monospace;
      font-size: 12px;
    }

    .pizzano-sim-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      padding: 14px;
      border-top: 1px solid rgba(255,255,255,0.10);
    }

    .pizzano-sim-card {
      min-width: 0;
      padding: 14px;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 12px;
      background: rgba(0,0,0,0.18);
    }

    .pizzano-sim-card span {
      display: block;
      color: #B5B5B5;
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .pizzano-sim-card strong {
      display: block;
      margin-top: 8px;
      color: #fff;
      font-size: 26px;
      font-weight: 900;
    }

    .pizzano-sim-analysis {
      display: grid;
      gap: 8px;
      padding: 0 14px 14px;
    }

    .pizzano-analysis-line {
      padding: 10px 12px;
      color: #fff;
      background: rgba(0, 200, 83, 0.09);
      border: 1px solid rgba(0, 200, 83, 0.22);
      border-radius: 10px;
      font-weight: 700;
    }

    .podium-bar {
      position: relative;
      height: 10px;
      margin-top: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(255,255,255,0.10);
    }

    .podium-bar span {
      position: absolute;
      inset: 0 auto 0 0;
      width: var(--podium-progress, 0%);
      background: linear-gradient(90deg, #00C853, #FFB300, #E31E24);
      box-shadow: 0 0 18px rgba(0, 200, 83, 0.28);
    }

    .table-wrap {
      border-radius: 0 0 14px 14px;
    }

    table {
      border-collapse: separate;
      border-spacing: 0;
    }

    th {
      font-size: 11px;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    td strong {
      letter-spacing: 0;
    }

    .dashboard-podium-section {
      position: relative;
      overflow: hidden;
      margin: 0 0 18px;
      padding: 18px;
      border: 1px solid rgba(255,255,255,0.10);
    }

    .dashboard-podium-section::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(118deg, transparent 0 58%, rgba(0, 200, 83, 0.12) 58% 59%, transparent 59%),
        linear-gradient(123deg, transparent 0 66%, rgba(255,255,255,0.10) 66% 66.5%, transparent 66.5%),
        linear-gradient(128deg, transparent 0 74%, rgba(227, 30, 36, 0.13) 74% 75%, transparent 75%);
    }

    .podium-head {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 16px;
    }

    .section-kicker {
      display: block;
      margin-bottom: 4px;
      color: #00C853;
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .podium-head h2 {
      margin: 0;
      color: #fff;
      font-size: clamp(22px, 2.2vw, 32px);
      font-style: italic;
      font-weight: 900;
      line-height: 1;
      text-transform: uppercase;
    }

    .podium-grid {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.14fr) minmax(0, 0.94fr);
      gap: 14px;
      align-items: end;
    }

    .podium-card {
      position: relative;
      min-width: 0;
      overflow: hidden;
      padding: 16px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 14px;
      background:
        radial-gradient(circle at 70% 12%, rgba(255,255,255,0.10), transparent 26%),
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)),
        #090b0c;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    }

    .podium-card::after {
      content: "";
      position: absolute;
      inset: auto 0 0;
      height: 10px;
      background: var(--green);
      opacity: 0.92;
      box-shadow: 0 0 22px currentColor;
    }

    .podium-card.rank-1 {
      min-height: 258px;
      border-color: rgba(255, 179, 0, 0.55);
      transform: translateY(-10px);
    }

    .podium-card.rank-1::after {
      height: 15px;
      background: linear-gradient(90deg, #FFB300, #fff1aa, #FFB300);
    }

    .podium-card.rank-2 {
      min-height: 224px;
      border-color: rgba(255,255,255,0.30);
    }

    .podium-card.rank-2::after {
      background: linear-gradient(90deg, #9aa1a6, #fff, #9aa1a6);
    }

    .podium-card.rank-3 {
      min-height: 208px;
      border-color: rgba(227, 30, 36, 0.48);
    }

    .podium-card.rank-3::after {
      background: #E31E24;
    }

    .podium-rank {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .podium-place {
      color: #fff;
      font-size: 52px;
      font-weight: 900;
      line-height: 0.95;
    }

    .podium-card.rank-1 .podium-place {
      color: #FFB300;
      font-size: 64px;
      text-shadow: 0 0 24px rgba(255, 179, 0, 0.34);
    }

    .podium-score {
      color: #00C853;
      font-size: 26px;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }

    .podium-name {
      display: block;
      margin: 6px 0 8px;
      color: #fff;
      font-size: clamp(17px, 1.5vw, 24px);
      font-weight: 900;
      text-transform: uppercase;
    }

    .podium-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      color: #B5B5B5;
      font-size: 12px;
      font-weight: 800;
    }

    .trophy-figure {
      --trophy-color: #FFB300;
      --trophy-glow: rgba(255, 179, 0, 0.38);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 78px;
      width: 78px;
      height: 92px;
      margin-right: 2px;
      color: var(--trophy-color);
      filter: drop-shadow(0 0 20px var(--trophy-glow));
    }

    .trophy-svg {
      width: 78px;
      height: 92px;
      overflow: visible;
    }

    .trophy-body,
    .trophy-stem,
    .trophy-base,
    .trophy-top {
      fill: currentColor;
    }

    .trophy-handle {
      fill: none;
      stroke: currentColor;
      stroke-width: 8;
      stroke-linecap: round;
      stroke-linejoin: round;
      opacity: 0.9;
    }

    .trophy-shine {
      fill: #fff;
      opacity: 0.26;
    }

    .trophy-shadow {
      fill: #000;
      opacity: 0.18;
    }

    .podium-card.rank-1 .trophy-figure,
    .rank-chip.rank-1 .mini-trophy,
    .top-athlete-cup.rank-1 {
      --trophy-color: #FFB300;
      --trophy-glow: rgba(255, 179, 0, 0.44);
    }

    .podium-card.rank-2 .trophy-figure,
    .rank-chip.rank-2 .mini-trophy,
    .top-athlete-cup.rank-2 {
      --trophy-color: #E6EDF4;
      --trophy-glow: rgba(230, 237, 244, 0.34);
    }

    .podium-card.rank-3 .trophy-figure,
    .rank-chip.rank-3 .mini-trophy,
    .top-athlete-cup.rank-3 {
      --trophy-color: #E31E24;
      --trophy-glow: rgba(227, 30, 36, 0.38);
    }

    .podium-card.rank-1 .trophy-figure {
      transform: scale(1.12);
    }

    .rank-chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-width: 38px;
      height: 30px;
      padding: 0 9px;
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 999px;
      color: #fff;
      background: rgba(255,255,255,0.06);
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }

    .rank-chip.top-rank {
      border-color: rgba(255, 179, 0, 0.36);
      background: rgba(255, 179, 0, 0.12);
    }

    .rank-chip.rank-1 {
      color: #FFB300;
      border-color: rgba(255, 179, 0, 0.62);
      box-shadow: 0 0 18px rgba(255, 179, 0, 0.16);
    }

    .rank-chip.rank-2 {
      color: #fff;
      border-color: rgba(255,255,255,0.42);
    }

    .rank-chip.rank-3 {
      color: #E31E24;
      border-color: rgba(227, 30, 36, 0.54);
    }

    .mini-trophy {
      --trophy-color: currentColor;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      color: var(--trophy-color);
      filter: drop-shadow(0 0 8px var(--trophy-glow, rgba(255,255,255,0.18)));
    }

    .mini-trophy-svg {
      width: 19px;
      height: 19px;
      overflow: visible;
    }

    .athlete-name-cell {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      min-width: 0;
    }

    .top-athlete-cup {
      --trophy-color: #00C853;
      --trophy-glow: rgba(0, 200, 83, 0.8);
      flex: 0 0 18px;
    }

    .grid-wide {
      grid-column: 1 / -1;
    }

    .athlete-editor-panel .panel-body {
      padding: 20px;
    }

    #athleteForm .athlete-primary-grid {
      grid-template-columns: repeat(4, minmax(160px, 1fr));
      gap: 14px;
      align-items: start;
    }

    #athleteForm .athlete-primary-grid > .wide:not(.athlete-form-module) {
      grid-column: span 2;
    }

    #athleteForm .athlete-form-module {
      grid-column: span 2;
      min-width: 0;
      padding: 16px;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 14px;
      background: linear-gradient(145deg, rgba(255,255,255,0.035), rgba(0,0,0,0.16));
      box-shadow: inset 3px 0 0 rgba(0,200,83,0.42);
    }

    #athleteForm .athlete-form-module > label:first-child {
      display: block;
      margin-bottom: 13px;
      color: #fff;
      font-size: 13px;
      font-weight: 900;
      letter-spacing: 0.035em;
    }

    #athleteForm .athlete-form-module-full {
      grid-column: 1 / -1;
    }

    #athleteForm .athlete-form-module-full > .form-grid {
      grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    #athleteForm .athlete-form-module-clothing > .form-grid {
      grid-template-columns: repeat(3, minmax(130px, 1fr));
    }

    #athleteForm .athlete-form-module-medical > .form-grid,
    #athleteForm .athlete-form-module-chip > .form-grid,
    #athleteForm .athlete-form-module-benefits > .form-grid {
      grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .athlete-list-panel .table-wrap {
      max-height: 720px;
    }

    .athlete-economics-panel { margin-top: 14px; }
    .athlete-economics-metrics { padding: 14px 18px 0; }
    .athlete-economics-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      padding: 14px 18px;
    }
    .athlete-economics-panel .athlete-form-module {
      border: 1px solid rgba(0,200,83,.24);
      border-radius: 14px;
      padding: 16px;
      background: linear-gradient(145deg, rgba(0,200,83,.07), rgba(255,255,255,.015));
    }
    .athlete-economics-panel .athlete-form-module > label:first-child {
      display: block;
      color: #fff;
      font-weight: 900;
      text-transform: uppercase;
      margin-bottom: 12px;
    }
    .athlete-economics-toolbar { padding: 14px 18px; }
    .athlete-economics-toolbar > div { min-width: 280px; flex: 1; }

    @media (max-width: 1180px) {
      #athleteForm .athlete-primary-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
      }

      #athleteForm .athlete-form-module,
      #athleteForm .athlete-primary-grid > .wide:not(.athlete-form-module) {
        grid-column: 1 / -1;
      }

      #athleteForm .athlete-form-module-full > .form-grid,
      #athleteForm .athlete-form-module-clothing > .form-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
      }
      .athlete-economics-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 700px) {
      #athleteForm .athlete-primary-grid,
      #athleteForm .athlete-form-module > .form-grid,
      #athleteForm .athlete-form-module-full > .form-grid,
      #athleteForm .athlete-form-module-clothing > .form-grid,
      #athleteForm .athlete-form-module-medical > .form-grid,
      #athleteForm .athlete-form-module-chip > .form-grid,
      #athleteForm .athlete-form-module-benefits > .form-grid {
        grid-template-columns: 1fr;
      }

      #athleteForm .athlete-form-module {
        padding: 13px;
      }
      .athlete-economics-grid { padding: 10px; }
      .athlete-economics-toolbar > div { min-width: 100%; }
    }

    .wardrobe-focus {
      border-color: rgba(0, 200, 83, 0.34);
      box-shadow:
        0 18px 52px rgba(0,0,0,0.44),
        inset 4px 0 0 rgba(0, 200, 83, 0.82);
    }

    .wardrobe-ledger {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 14px;
      margin-top: 14px;
    }

    .stock-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 52px;
      padding: 6px 10px;
      border-radius: 999px;
      color: #fff;
      font-weight: 900;
      background: rgba(0, 200, 83, 0.16);
      border: 1px solid rgba(0, 200, 83, 0.45);
    }

    .stock-pill.low {
      background: rgba(255, 179, 0, 0.16);
      border-color: rgba(255, 179, 0, 0.48);
    }

    .stock-pill.out {
      background: rgba(227, 30, 36, 0.16);
      border-color: rgba(227, 30, 36, 0.52);
    }

    .movement-type {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 9px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .movement-type.load {
      color: #00C853;
      border-color: rgba(0, 200, 83, 0.34);
    }

    .movement-type.delivery {
      color: #E31E24;
      border-color: rgba(227, 30, 36, 0.38);
    }

    .wardrobe-note {
      display: block;
      margin-top: 4px;
      color: #B5B5B5;
      font-size: 12px;
      font-weight: 700;
    }

    @media (max-width: 1180px) {
      .dashboard-podium-section,
      .dashboard-controls {
        grid-column: auto;
      }

      .pizzano-society-inputs,
      .pizzano-sim-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .podium-grid {
        grid-template-columns: 1fr;
      }

      .podium-card.rank-1 {
        transform: none;
      }

      .sponsor-board {
        grid-template-columns: 1fr;
      }

      .wardrobe-ledger {
        grid-template-columns: 1fr;
      }

      .dashboard-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 760px) {
      .brand::after {
        left: 0;
        width: 100%;
      }

      .dashboard-controls {
        grid-template-columns: 1fr;
      }

      .podium-head {
        flex-direction: column;
      }

      .podium-rank {
        align-items: flex-start;
      }
    }

    @media print {
      body::before {
        display: none;
      }

      .brand-logo {
        filter: none;
      }
    }

    @media (max-width: 1180px) {
      .app {
        grid-template-columns: 1fr;
        padding: 14px;
      }

      .topbar,
      main,
      .tabs {
        grid-column: 1;
      }

      .tabs {
        position: static;
        grid-row: auto;
        min-height: 0;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
        border-right: 0;
        border-radius: 8px;
      }

      .tabs::before,
      .tabs::after,
      .sidebar-sponsors {
        display: none;
      }

      .tab {
        flex: 1 1 140px;
        justify-content: center;
        text-align: center;
      }

      .nav-group {
        flex: 1 1 260px;
      }

      .nav-group .tab {
        justify-content: flex-start;
        text-align: left;
      }

      .module-guide-head {
        grid-template-columns: 1fr;
      }

      .module-guide-badge {
        justify-self: start;
      }

      .topbar {
        flex-direction: column;
      }

      .top-actions {
        justify-content: flex-start;
        max-width: none;
      }

      .dashboard-main-grid,
      .dashboard-society-card {
        grid-template-columns: 1fr;
      }

      .sponsor-editor-grid {
        grid-template-columns: 1fr;
      }

      .sponsor-placement-grid {
        grid-template-columns: 1fr;
      }

      .sponsor-editor-card.main {
        grid-column: auto;
      }

      .accounting-metrics {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
      }

      .dashboard-side-stack {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 760px) {
      h1 {
        font-size: 24px;
      }

      .metrics,
      .sponsor-board,
      .dashboard-controls,
      .dashboard-admin-grid,
      .quick-actions-grid,
      .control-grid,
      .form-grid,
      .print-settings-grid,
      .toolbar,
      .ranking-tools,
      .preview-score,
      .dashboard-main-grid,
      .dashboard-accounting-grid,
      .dashboard-society-card,
      .accounting-metrics,
      .security-grid,
      .pizzano-society-inputs,
      .pizzano-sim-summary,
      .sponsor-editor-grid,
      .sponsor-placement-grid,
      .sponsor-editor-controls {
        grid-template-columns: 1fr;
      }

      .top-actions > *,
      .print-select {
        width: 100%;
      }

      .notification-box,
      .notification-bell {
        width: 100%;
      }

      .notification-panel {
        top: 68px;
        right: 10px;
        left: 10px;
        width: auto;
      }

      .quick-actions-hero {
        display: grid;
        padding: 18px;
      }

      .quick-actions-hero-badge {
        justify-self: start;
      }

      .quick-action-card {
        min-height: 96px;
        padding: 15px;
      }
    }

    .access-gate {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 26px;
      background:
        radial-gradient(circle at 18% 22%, rgba(0,200,83,0.22), transparent 28%),
        radial-gradient(circle at 84% 30%, rgba(227,30,36,0.22), transparent 32%),
        linear-gradient(120deg, rgba(0,200,83,0.10), transparent 36%),
        linear-gradient(245deg, rgba(227,30,36,0.12), transparent 36%),
        rgba(3,3,3,0.92);
      backdrop-filter: blur(20px);
      overflow: auto;
    }

    #accessGate {
      display: none;
      visibility: visible !important;
      opacity: 1 !important;
      z-index: 2147483000 !important;
      isolation: isolate;
    }

    body.access-locked #accessGate {
      display: flex !important;
    }

    body.access-locked .access-gate { display: flex; }
    .password-recovery-gate[hidden] { display: none !important; }

    body.access-locked .app {
      filter: blur(2px);
      pointer-events: none;
      user-select: none;
    }

    /* Il body usa una trasformazione grafica che crea un contenitore per gli
       elementi fixed. Durante il login va neutralizzata, altrimenti il gate
       viene centrato sull'intero documento e il riquadro finisce fuori vista. */
    body.access-locked {
      transform: none !important;
    }

    body.access-locked #accessGate {
      width: 100vw !important;
      height: 100vh !important;
      min-height: 100vh !important;
      box-sizing: border-box;
    }

    .access-card {
      width: min(900px, calc(100vw - 52px));
      display: grid;
      grid-template-columns: minmax(280px, 0.85fr) minmax(340px, 1fr);
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 24px;
      background:
        linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
        #101214;
      box-shadow: 0 34px 110px rgba(0,0,0,0.78);
      padding: 0;
      overflow: hidden;
      color: #fff;
    }

    #accessGate .access-card {
      position: relative !important;
      top: auto !important;
      left: auto !important;
      transform: none !important;
      display: grid !important;
      min-height: 560px;
      max-height: calc(100vh - 52px);
      overflow: auto;
      z-index: 2147483001 !important;
      visibility: visible !important;
      opacity: 1 !important;
    }

    body.access-locked::before {
      z-index: 0 !important;
    }

    .access-brand {
      display: grid;
      grid-template-columns: 1fr;
      align-content: end;
      gap: 18px;
      min-height: 560px;
      padding: 34px;
      position: relative;
      grid-row: 1 / span 4;
      overflow: hidden;
      background:
        linear-gradient(145deg, rgba(0,200,83,0.20), rgba(0,0,0,0.08) 48%, rgba(227,30,36,0.16)),
        #070908;
      border-right: 1px solid rgba(255,255,255,0.10);
    }

    .access-brand::before {
      content: '';
      position: absolute;
      inset: -20% -20% auto auto;
      width: 220px;
      height: 520px;
      transform: rotate(28deg);
      background:
        linear-gradient(90deg,
          rgba(0,200,83,0.82) 0 28%,
          rgba(255,255,255,0.75) 28% 42%,
          rgba(227,30,36,0.78) 42% 70%,
          transparent 70%);
      opacity: 0.22;
      filter: blur(0.2px);
    }

    .access-brand::after {
      content: 'Area riservata';
      position: absolute;
      top: 26px;
      left: 34px;
      color: var(--green);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }

    .access-brand img {
      width: 118px;
      height: 118px;
      object-fit: contain;
      border-radius: 18px;
      background: #000;
      border: 1px solid rgba(255,255,255,0.12);
      box-shadow: 0 22px 58px rgba(0,0,0,0.55), 0 0 34px rgba(0,200,83,0.20);
      position: relative;
      z-index: 1;
    }

    .access-brand span,
    .access-brand p {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      position: relative;
      z-index: 1;
    }

    .access-brand h2 {
      margin: 6px 0 8px;
      color: #fff;
      font-size: clamp(30px, 4vw, 46px);
      line-height: 0.95;
      font-weight: 900;
      font-style: italic;
      text-transform: uppercase;
      letter-spacing: 0;
      position: relative;
      z-index: 1;
      text-shadow: 0 18px 54px rgba(0,0,0,0.65);
    }

    .access-brand p {
      width: fit-content;
      margin: 0;
      padding-top: 12px;
      border-top: 3px solid var(--green);
      box-shadow: inset 120px 3px 0 -118px #fff, inset 240px 3px 0 -236px var(--red);
    }

    .access-role-grid,
    .access-form,
    .access-setup,
    .access-card .status {
      grid-column: 2;
    }

    .access-role-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin: 0;
      padding: 34px 34px 0;
    }

    .access-role {
      min-height: 82px;
      border-radius: 16px;
      border: 1px solid rgba(255,255,255,0.16);
      background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(0,0,0,0.28));
      color: #fff;
      display: grid;
      gap: 4px;
      align-content: center;
      text-align: left;
      padding: 12px;
      transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    }

    .access-role strong {
      font-size: 16px;
      text-transform: uppercase;
    }

    .access-role span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.25;
    }

    .access-role.active {
      border-color: var(--green);
      background:
        linear-gradient(145deg, rgba(0,200,83,0.15), rgba(0,0,0,0.34));
      box-shadow: 0 0 0 1px rgba(0,200,83,0.22), inset 0 0 28px rgba(0,200,83,0.13);
    }

    .access-role:not(.disabled):hover {
      transform: translateY(-1px);
      border-color: var(--red);
      box-shadow: 0 0 22px rgba(227,30,36,0.16);
    }

    .access-role.disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }

    .access-form {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      padding: 18px 34px 0;
    }

    .access-form label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .access-form input {
      width: 100%;
      margin-top: 6px;
      min-height: 50px;
      border-radius: 14px;
      border: 1px solid rgba(255,255,255,0.16);
      background: rgba(0,0,0,0.46);
      color: #fff;
      padding: 0 12px;
      font-weight: 800;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.22);
    }

    .access-form input:focus {
      outline: none;
      border-color: rgba(0,200,83,0.72);
      box-shadow: 0 0 0 3px rgba(0,200,83,0.14);
    }

    .access-form button {
      min-height: 52px;
      border-radius: 14px;
    }

    #accessLoginBtn {
      background: linear-gradient(135deg, #e31e24, #9f1217);
      border-color: rgba(255,255,255,0.18);
      grid-column: 1 / -1;
      box-shadow: 0 16px 34px rgba(227,30,36,0.20);
    }

    .access-form .secondary {
      background: rgba(255,255,255,0.06);
      border-color: rgba(255,255,255,0.16);
      grid-column: 1 / -1;
    }

    .access-setup {
      display: none !important;
      margin: 0;
      padding: 16px 34px 0;
    }

    .access-setup .access-form {
      margin-top: 12px;
      padding: 14px;
      border-top: 1px solid rgba(255,255,255,0.12);
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 18px;
      background: rgba(0,0,0,0.22);
    }

    #accessSetupToggleBtn {
      width: 100%;
      min-height: 44px;
      border-radius: 10px;
      border: 1px solid rgba(0,200,83,0.34);
      color: var(--green);
      background: rgba(0,200,83,0.08);
      font-weight: 900;
    }

    #accessSetupSubmitBtn {
      background: linear-gradient(135deg, #00c853, #087f3d);
      border-color: rgba(255,255,255,0.18);
    }

    .access-card .status {
      margin: 16px 34px 30px;
      padding: 12px 14px;
      min-height: 20px;
      color: var(--green);
      font-weight: 800;
      border-radius: 14px;
      background: rgba(0,200,83,0.08);
      border: 1px solid rgba(0,200,83,0.18);
    }

    .access-card .status.error {
      color: var(--red);
      background: rgba(227,30,36,0.10);
      border-color: rgba(227,30,36,0.28);
    }

    @media (max-width: 760px) {
      .access-gate {
        align-items: flex-start;
        padding: 14px;
      }

      .access-card {
        width: min(100%, 460px) !important;
        grid-template-columns: 1fr !important;
        border-radius: 20px;
      }

      #accessGate .access-card {
        top: auto !important;
        left: auto !important;
        transform: none !important;
        min-height: auto;
        max-height: calc(100vh - 28px);
      }

      .access-brand {
        min-height: auto;
        padding: 24px;
        grid-row: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.10);
      }

      .access-brand::after {
        top: 18px;
        left: 24px;
      }

      .access-brand img {
        width: 78px;
        height: 78px;
      }

      .access-brand h2 {
        font-size: 28px;
      }

      .access-role-grid,
      .access-form,
      .access-setup {
        padding-left: 18px;
        padding-right: 18px;
      }

      .access-role-grid,
      .access-form {
        grid-template-columns: 1fr;
      }

      .access-role-grid,
      .access-form,
      .access-setup,
      .access-card .status {
        grid-column: auto;
      }

      .access-card .status {
        margin-left: 18px;
        margin-right: 18px;
      }
    }

    .access-user-pill {
      min-height: 40px;
      display: inline-flex;
      align-items: center;
      padding: 0 12px;
      border: 1px solid rgba(0,200,83,0.42);
      border-radius: 10px;
      color: var(--green);
      background: rgba(0,200,83,0.08);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .install-guide-modal {
      position: fixed;
      inset: 0;
      z-index: 2147482500;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 18px;
      background: rgba(0, 0, 0, 0.72);
      backdrop-filter: blur(10px);
    }

    .install-guide-modal[hidden] {
      display: none;
    }

    .install-guide-card {
      width: min(680px, 100%);
      max-height: calc(100vh - 36px);
      overflow: auto;
      border-radius: 16px;
      background:
        linear-gradient(135deg, rgba(0, 200, 83, 0.12), transparent 36%),
        linear-gradient(315deg, rgba(227, 30, 36, 0.14), transparent 42%),
        #101214;
      border: 1px solid rgba(255, 255, 255, 0.16);
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
      padding: 18px;
    }

    .install-guide-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      padding-bottom: 14px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .install-guide-head h2 {
      margin-top: 8px;
      color: #fff;
      font-size: clamp(24px, 4vw, 34px);
      line-height: 0.98;
      font-style: italic;
      text-transform: uppercase;
    }

    .install-guide-body {
      display: grid;
      gap: 12px;
      padding-top: 14px;
      color: #fff;
    }

    .install-guide-body p {
      margin: 0;
      color: var(--muted);
      font-weight: 700;
      line-height: 1.45;
    }

    .install-guide-body ol {
      margin: 0;
      padding-left: 22px;
      display: grid;
      gap: 10px;
    }

    .install-guide-body li {
      color: #fff;
      font-weight: 850;
      line-height: 1.35;
    }

    .install-guide-tip {
      border-radius: 12px;
      border: 1px solid rgba(0, 200, 83, 0.28);
      background: rgba(0, 200, 83, 0.08);
      color: var(--green);
      padding: 12px;
      font-weight: 900;
    }

    .registration-helper {
      margin: 6px 0 14px;
      color: #B5B5B5;
      font-size: 13px;
      font-weight: 800;
      line-height: 1.45;
    }

    .registration-bulk-card {
      margin-top: 10px;
      padding: 14px;
      border: 1px solid rgba(0, 200, 83, 0.22);
      border-radius: 14px;
      background:
        linear-gradient(120deg, rgba(0, 200, 83, 0.08), transparent 42%),
        rgba(255,255,255,0.026);
    }

    .panel > h3 {
      margin: 16px 14px 6px;
    }

    .panel > .registration-helper,
    .panel > .registration-bulk-card,
    .panel > .registration-manual-details {
      margin-left: 14px;
      margin-right: 14px;
    }

    .panel > .section-divider {
      margin-left: 14px;
      margin-right: 14px;
    }

    .registration-bulk-card .table-wrap {
      border-radius: 12px;
    }

    .registration-bulk-toolbar {
      align-items: end;
      margin-bottom: 12px;
    }

    .registration-bulk-toolbar .row-actions {
      flex-wrap: wrap;
      justify-content: flex-start;
    }

    .registration-bulk-count {
      align-self: center;
      white-space: nowrap;
    }

    .registration-module-nav {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
      margin: 0 0 18px;
    }

    .registration-module-card {
      display: flex;
      align-items: center;
      gap: 12px;
      min-height: 82px;
      padding: 14px 16px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 16px;
      color: #fff;
      text-align: left;
      background: rgba(255,255,255,0.045);
    }

    .registration-module-card:hover,
    .registration-module-card.is-active {
      border-color: rgba(0,200,83,0.72);
      background: linear-gradient(135deg, rgba(0,200,83,0.18), rgba(255,255,255,0.05));
      transform: translateY(-1px);
    }

    .registration-module-card .module-icon {
      display: grid;
      place-items: center;
      flex: 0 0 42px;
      width: 42px;
      height: 42px;
      border-radius: 12px;
      color: #06130b;
      background: #00C853;
      font-size: 17px;
      font-weight: 950;
    }

    .registration-module-card strong,
    .registration-module-card small { display: block; }
    .registration-module-card strong { font-size: 14px; }
    .registration-module-card small { margin-top: 3px; color: #bdbdbd; font-size: 11px; line-height: 1.25; }
    .registration-module-page { display: none; grid-column: 1 / -1; }
    .registration-module-page.is-active { display: block; }
    .registration-athlete-status-cell { min-width: 126px; }
    .registration-athlete-actions { justify-content: flex-end; flex-wrap: wrap; }
    .registration-athlete-actions button { white-space: nowrap; }

    .registration-manual-details {
      margin-top: 14px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      background: rgba(0,0,0,0.16);
      overflow: hidden;
    }

    .registration-manual-details summary {
      cursor: pointer;
      padding: 12px 14px;
      color: #fff;
      font-weight: 900;
      text-transform: uppercase;
    }

    .registration-manual-details form {
      padding: 0 14px 14px;
    }

    tr.registration-row-cancelled {
      opacity: 0.64;
    }

    .registration-situation-card {
      margin: 14px;
      padding: 14px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 14px;
      background:
        linear-gradient(120deg, rgba(0, 140, 255, 0.08), transparent 42%),
        rgba(255,255,255,0.026);
    }

    .registration-situation-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .registration-situation-head h3 {
      margin: 0;
    }

    .registration-situation-head p {
      margin: 4px 0 0;
      color: #B5B5B5;
      font-size: 12px;
      font-weight: 800;
    }

    .registration-situation-metrics {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }

    .registration-situation-metric {
      min-width: 0;
      padding: 10px 12px;
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 10px;
      background: rgba(0,0,0,0.18);
    }

    .registration-situation-metric span {
      display: block;
      color: #B5B5B5;
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .registration-situation-metric strong {
      display: block;
      margin-top: 4px;
      color: #fff;
      font-size: 20px;
      font-weight: 950;
    }

    @media (max-width: 720px) {
      .registration-module-nav { grid-template-columns: 1fr 1fr; }
      .registration-module-card { min-height: 72px; padding: 11px; }
      .registration-module-card .module-icon { width: 36px; height: 36px; flex-basis: 36px; }
      .registration-module-card small { display: none; }
      .access-role-grid,
      .access-form {
        grid-template-columns: 1fr;
      }

      .access-brand {
        grid-template-columns: 68px 1fr;
      }

      .access-brand img {
        width: 68px;
        height: 68px;
      }
    }
    /* Organizzazione stile Golee - layer grafico e navigazione semplificata */
    .app {
      grid-template-columns: 284px minmax(0, 1fr);
      gap: 0;
      padding: 0;
    }

    .topbar {
      grid-column: 2;
      min-height: 92px;
      padding: 18px 34px;
      border-bottom: 1px solid rgba(255,255,255,0.12);
      background: rgba(16,16,16,0.70);
      backdrop-filter: blur(12px);
    }

    main {
      grid-column: 2;
      padding: 24px 34px 42px;
    }

    .tabs {
      grid-column: 1;
      grid-row: 1 / span 2;
      align-self: stretch;
      position: sticky;
      top: 0;
      width: 284px;
      height: 100vh;
      margin: 0;
      padding: 18px 14px;
      display: block;
      overflow-y: auto;
      background: linear-gradient(180deg, #191919, #171717 54%, #101010);
      border-right: 1px solid rgba(255,255,255,0.12);
      box-shadow: 18px 0 50px rgba(0,0,0,0.34);
    }

    .tabs::before,
    .tabs::after {
      display: none;
    }

    .sidebar-club {
      display: grid;
      grid-template-columns: 44px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      padding: 6px 4px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
      margin-bottom: 12px;
    }

    .sidebar-club img {
      width: 44px;
      height: 44px;
      object-fit: contain;
      background: #000;
      border-radius: 8px;
    }

    .sidebar-club strong {
      display: block;
      color: #fff;
      font-size: 14px;
      line-height: 1.05;
      text-transform: uppercase;
    }

    .sidebar-club span {
      display: block;
      margin-top: 3px;
      color: #b6b6b6;
      font-size: 13px;
      font-weight: 700;
    }

    .sidebar-search {
      margin: 10px 0 18px;
      display: grid;
      grid-template-columns: 1fr 36px;
      gap: 8px;
    }

    .sidebar-search input {
      min-height: 38px;
      width: 100%;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 9px;
      background: #101010;
      color: #fff;
      padding: 0 11px;
      outline: 0;
      font-size: 13px;
      font-weight: 800;
    }

    .sidebar-search button {
      min-height: 38px;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 9px;
      background: #242424;
      color: #fff;
      cursor: pointer;
      font-size: 11px;
      font-weight: 900;
    }

    .nav-section-label {
      width: 100%;
      min-height: 34px;
      margin: 20px 0 8px;
      padding: 7px 8px;
      border: 0;
      border-radius: 7px;
      color: #b6b6b6;
      background: transparent;
      text-align: left;
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
    }

    .nav-section-toggle {
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: color 150ms ease, background 150ms ease;
    }

    .nav-section-toggle::after {
      content: '›';
      color: #777;
      font-size: 18px;
      line-height: 1;
      transform: rotate(0deg);
      transition: transform 150ms ease, color 150ms ease;
    }

    .nav-section-toggle:hover,
    .nav-section-toggle[aria-expanded="true"] {
      color: #fff;
      background: rgba(255,255,255,0.055);
    }

    .nav-section-toggle[aria-expanded="true"]::after {
      color: #00c853;
      transform: rotate(90deg);
    }

    .golee-nav-group.is-collapsed {
      display: none;
    }

    .nav-group {
      display: grid;
      gap: 4px;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
    }

    .nav-group + .nav-group {
      margin-top: 4px;
    }

    .nav-group-title {
      display: none;
    }

    .nav-group.is-active {
      border-color: transparent;
      background: transparent;
      box-shadow: none;
    }

    .tabs .tab {
      width: 100%;
      min-height: 40px;
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: #fff;
      padding: 0 10px;
      text-align: left;
      font-size: 14px;
      font-weight: 900;
      transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
    }

    .tabs .tab::before {
      width: 22px;
      height: 22px;
      border-radius: 6px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.06);
      color: #b6b6b6;
      font-size: 10px;
      font-weight: 950;
    }

    .tabs .tab:hover {
      transform: none;
      background: rgba(255,255,255,0.06);
      border-color: rgba(255,255,255,0.12);
      box-shadow: none;
    }

    .tabs .tab.active {
      color: #fff;
      background: rgba(227,30,36,0.16);
      border-color: rgba(227,30,36,0.82);
      box-shadow: inset 3px 0 0 var(--red);
    }

    .tabs .tab.active::before {
      color: #fff;
      background: var(--red);
    }

    .tab.is-filter-hidden,
    .nav-group.is-filter-hidden,
    .nav-section-label.is-filter-hidden {
      display: none !important;
    }

    .tabs > .nav-group:not(.golee-nav-group) {
      display: none !important;
    }

    .module-guide {
      border-radius: 10px;
      background: rgba(32,32,32,0.94);
      border-color: rgba(255,255,255,0.12);
      box-shadow: 0 18px 40px rgba(0,0,0,0.22);
    }

    .module-guide-head {
      min-height: 70px;
      padding: 18px 20px;
      background: linear-gradient(90deg, rgba(0,200,83,0.08), rgba(255,255,255,0.02));
    }

    .module-guide h2 {
      font-size: 22px;
    }

    .module-guide-grid {
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      padding: 14px;
      gap: 10px;
    }

    .module-guide-card {
      min-height: 92px;
      border-radius: 9px;
      background: rgba(255,255,255,0.025);
    }

    @media (max-width: 980px) {
      .app {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        margin: 0;
      }

      .topbar,
      main,
      .tabs {
        grid-column: 1;
        min-width: 0;
        width: 100%;
        max-width: 100%;
      }

      main {
        min-width: 0;
        width: 100%;
        padding: 20px;
        overflow-x: hidden;
      }

      .tabs {
        grid-row: auto;
        position: sticky;
        top: 0;
        z-index: 1200;
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 9px 10px;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 7px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
      }

      .tabs .sidebar-club {
        flex: 0 0 190px;
        padding: 2px 10px 2px 0;
        border: 0;
        border-right: 1px solid rgba(255,255,255,0.12);
      }

      .tabs .sidebar-search,
      .tabs .nav-section-label,
      .tabs .sidebar-sponsors {
        display: none !important;
      }

      .tabs .golee-nav-group {
        display: flex !important;
        flex: 0 0 auto;
        gap: 5px;
      }

      .tabs .tab {
        width: auto;
        min-width: 142px;
        flex: 0 0 auto;
        white-space: nowrap;
      }
    }

    .golee-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
    .golee-toolbar-group { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
    .golee-segment { display:flex; gap:3px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--panel-soft); }
    .golee-segment button { min-height:34px; padding:6px 10px; color:var(--muted); background:transparent; border-radius:7px; }
    .golee-segment button.active { color:#fff; background:var(--green); }
    .race-calendar-shell { overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
    .race-calendar-grid { min-width:760px; display:grid; grid-template-columns:repeat(7,minmax(105px,1fr)); }
    .race-calendar-head { padding:10px; text-align:center; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; border-bottom:1px solid var(--line); border-right:1px solid var(--line); }
    .race-calendar-day { min-height:126px; padding:8px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--panel); }
    .race-calendar-day.outside { background:var(--panel-soft); opacity:.62; }
    .race-calendar-day.today { box-shadow:inset 0 0 0 2px var(--green); }
    .race-calendar-number { display:flex; justify-content:space-between; margin-bottom:7px; color:var(--muted); font-size:12px; font-weight:800; }
    .race-calendar-event { display:block; width:100%; min-height:auto; margin:0 0 5px; padding:7px 8px; text-align:left; border-radius:7px; color:#fff; background:var(--green); font-size:11px; line-height:1.25; }
    .race-calendar-event.race-type-society { background:#e31e24; }
    .race-calendar-event.race-type-recommended { background:#f28c00; }
    .race-calendar-event.race-type-free { background:#00a844; }
    .race-type-badge { display:inline-flex; align-items:center; min-height:24px; padding:3px 9px; border:1px solid transparent; border-radius:999px; font-size:11px; font-weight:900; letter-spacing:.03em; text-transform:uppercase; white-space:nowrap; }
    .race-type-badge.race-type-society { color:#ff5b62; background:rgba(227,30,36,.16); border-color:rgba(227,30,36,.42); }
    .race-type-badge.race-type-recommended { color:#ffad33; background:rgba(242,140,0,.16); border-color:rgba(242,140,0,.42); }
    .race-type-badge.race-type-free { color:#16ff65; background:rgba(0,168,68,.16); border-color:rgba(0,168,68,.42); }
    .race-calendar-list-row.race-type-society { border-left:4px solid #e31e24; }
    .race-calendar-list-row.race-type-recommended { border-left:4px solid #f28c00; }
    .race-calendar-list-row.race-type-free { border-left:4px solid #00a844; }
    .race-calendar-list { display:grid; gap:8px; padding:12px; }
    .race-calendar-list-row { display:grid; grid-template-columns:110px 1fr auto; gap:12px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
    .athlete-wardrobe-shortcut { margin:0 0 14px; padding:16px; display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; border:1px solid rgba(15,107,88,.25); border-radius:12px; background:var(--soft-green); }
    .athlete-wardrobe-shortcut strong { display:block; margin-bottom:4px; }
    .athlete-clothing-stock-actions { margin-top:14px; padding:14px; border:1px solid rgba(0,200,83,.28); border-radius:10px; background:rgba(0,200,83,.06); }
    .athlete-clothing-stock-actions > strong,.athlete-clothing-stock-actions > span { display:block; }
    .athlete-clothing-stock-actions > span { margin:4px 0 10px; color:var(--muted); font-size:12px; }
    .topbar {
      position: relative;
      z-index: 8000;
      isolation: isolate;
      min-height:64px;
      padding:10px 24px;
      align-items:center;
    }
    .topbar > .brand { display:none; }
    .top-actions { width:100%; display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:nowrap; position:relative; }
    .top-actions > button,.top-actions > .access-user-pill,.top-actions > .notification-box { flex:0 0 auto; }
    .top-tools-menu { position:relative; flex:0 0 auto; }
    .top-tools-menu summary { list-style:none; min-height:40px; display:flex; align-items:center; padding:8px 14px; border:1px solid rgba(255,255,255,.16); border-radius:8px; color:#fff; background:#242424; font-weight:900; cursor:pointer; }
    .top-tools-menu summary::-webkit-details-marker { display:none; }
    .top-tools-menu summary::before { content:'+'; margin-right:8px; color:var(--green); font-size:18px; }
    .top-tools-menu[open] summary::before { content:'−'; }
    .top-tools-panel { position:absolute; z-index:4000; top:calc(100% + 8px); right:0; width:min(420px,calc(100vw - 32px)); max-height:calc(100vh - 92px); overflow:auto; display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:14px; border:1px solid rgba(255,255,255,.16); border-radius:12px; color:#fff; background:#171717; box-shadow:0 24px 70px rgba(0,0,0,.58); }
    .top-tools-panel > strong,.top-tools-panel > .drive-status { grid-column:1/-1; }
    .top-tools-panel > strong { margin-top:4px; color:#bdbdbd; font-size:11px; text-transform:uppercase; }
    .top-tools-panel button,.top-tools-panel .file-button,.top-tools-panel select { width:100%; min-height:40px; }
    .top-tools-panel .drive-status { padding:10px; border-radius:8px; background:rgba(255,255,255,.05); }
    @media(max-width:760px){.topbar{padding:8px 10px}.top-actions{overflow:visible}.top-tools-panel{grid-template-columns:1fr}.top-tools-panel>*{grid-column:1!important}}
    @media(max-width:760px){ .race-calendar-list-row{grid-template-columns:1fr}.athlete-wardrobe-shortcut button{width:100%} }
    #desktopAreaChooser[hidden] { display:none !important; }

    .remote-update-banner {
      position: fixed;
      z-index: 5000;
      top: 76px;
      left: 50%;
      width: min(620px, calc(100vw - 32px));
      transform: translateX(-50%);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 12px 14px;
      border: 1px solid rgba(255,179,0,.55);
      border-radius: 12px;
      background: #211a08;
      color: #fff;
      box-shadow: 0 18px 50px rgba(0,0,0,.55);
    }
    .remote-update-banner[hidden] { display: none !important; }
    .remote-update-banner strong { display:block; margin-bottom:3px; color:var(--gold); }
    .remote-update-banner span { color:#ddd; font-size:12px; }
    .remote-update-banner button { flex:0 0 auto; min-height:38px; }
/* Race workspace: one module, full width; preserve the existing form elements. */
#races.race-workspace > .module-guide,
#raceRegistrations > .module-guide { display:none; }
#races.race-workspace [data-race-page][hidden], #races.race-workspace label[hidden] { display:none !important; }
#races.race-workspace > [data-race-page] { width:100%; min-width:0; margin-top:16px; }
#races.race-workspace .race-workspace-header { position:sticky; top:0; z-index:15; background:#171d1a; }
.race-workspace-choice { display:flex; gap:16px; align-items:end; }
.race-workspace-choice label { flex:1; min-width:0; }
.race-workspace-choice select { width:100%; }
.race-workspace-tabs { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; }
.race-workspace-tabs button { min-height:52px; white-space:normal; }
.race-workspace-tabs button.is-active { background:#064f2e; border:2px solid #00db75; color:#fff; }
.race-workspace-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
.race-summary-step { min-height:66px; text-align:left; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; white-space:normal; }
.race-summary-step span { font-size:11px; color:#c8c8c8; font-weight:500; }
.race-summary-step.is-complete { border-color:#168b51; background:rgba(0,120,65,.16); }
.race-summary-step.is-missing { border-color:#8a6821; background:rgba(130,91,0,.12); }
.race-workspace-intro { padding:12px 14px; border-left:4px solid #00b96b; background:rgba(0,120,65,.10); line-height:1.5; }
#raceWorkspaceStatus { font-size:13px; line-height:1.5; }
#races.race-workspace [data-race-page="regulation"] .table-wrap { max-height:none; overflow:visible; }
#races.race-workspace [data-race-page="regulation"] table { table-layout:fixed; width:100%; min-width:0; }
#races.race-workspace [data-race-page="regulation"] th:first-child { width:65px; }
#races.race-workspace [data-race-page="regulation"] td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
#races.race-workspace [data-race-page="regulation"] textarea { width:100%; min-height:100px; box-sizing:border-box; }
#races.race-workspace input[type="checkbox"] { width:20px; height:20px; min-height:0; margin:4px 8px 4px 0; vertical-align:middle; }
.race-workspace-dialog { max-width:520px; width:calc(100% - 40px); background:#19221d; color:#fff; border:1px solid #00a866; border-radius:14px; padding:24px; }
.race-workspace-dialog::backdrop { background:#000b; }
.race-workspace-dialog button { margin:8px 8px 0 0; }
.reg-review-summary { margin:12px 0 16px; padding:14px; border:1px solid #3b4540; border-radius:12px; background:#111714; }
.reg-review-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.reg-review-counts > div { padding:12px; border:1px solid #39423e; border-radius:10px; display:flex; flex-direction:column; }
.reg-review-counts strong { font-size:24px; }
.reg-review-counts span { color:#c8cecb; font-size:12px; font-weight:700; }
.reg-review-counts .is-found { border-left:4px solid #00bd67; }
.reg-review-counts .is-ambiguous { border-left:4px solid #e0a000; }
.reg-review-counts .is-missing { border-left:4px solid #89918d; }
.reg-review-summary details { margin-top:10px; padding:10px 12px; border:1px solid #39423e; border-radius:9px; }
.reg-review-summary summary { cursor:pointer; font-weight:800; }
.reg-review-summary li { margin:6px 0; color:#e4b04d; }
.reg-protected-notice { padding:11px 12px; border-left:4px solid #e0a000; background:rgba(224,160,0,.10); }
.reg-apply-bar { position:sticky; bottom:0; z-index:8; margin-top:14px; padding:14px; border:1px solid rgba(0,200,83,.45); border-radius:10px; background:rgba(12,18,16,.97); box-shadow:0 -8px 22px rgba(0,0,0,.35); }
.reg-apply-bar > label { display:block; margin:10px 0; }
.reg-apply-guide { margin:0 0 10px; font-weight:700; }
.reg-apply-guide.is-warning { color:#ffd166; }
.reg-apply-guide.is-ready { color:#62e99a; }
.reg-apply-bar #regApply { background:#00a94f; }
.reg-apply-bar #regApplyStatus { margin:8px 0 0; }
@media(max-width:800px) {
  .race-workspace-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .race-workspace-summary { grid-template-columns:1fr 1fr; }
  #races.race-workspace .race-workspace-header { position:static; }
  .race-workspace-choice { align-items:stretch; flex-direction:column; gap:8px; }
  .reg-review-counts { grid-template-columns:1fr; }
  #races.race-workspace [data-race-page="regulation"] table,
  #races.race-workspace [data-race-page="regulation"] tbody,
  #races.race-workspace [data-race-page="regulation"] tr,
  #races.race-workspace [data-race-page="regulation"] td { display:block; width:100%; box-sizing:border-box; }
  #races.race-workspace [data-race-page="regulation"] thead { display:none; }
  #races.race-workspace [data-race-page="regulation"] tr { border-bottom:2px solid #33724a; padding:12px 0; }
}

/* Admin mobile: navigazione a cassetto e superfici operative touch-first */
.mobile-nav-btn,
.mobile-nav-backdrop,
.mobile-bottom-nav,
.mobile-nav-utilities,
.mobile-admin-launchpad,
.mobile-dashboard-details-btn {
  display: none;
}

@media (max-width: 980px) {
  html {
    scroll-padding-top: 76px;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .app {
    display: block;
    min-height: 100dvh;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 1300;
    min-height: 62px;
    padding: 9px 14px;
    background: rgba(12, 13, 13, 0.96);
    border-bottom: 1px solid rgba(255,255,255,.13);
  }

  .top-actions {
    justify-content: flex-end;
    gap: 7px;
  }

  .mobile-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    max-width: min(52vw, 250px);
    margin-right: auto;
    padding: 8px 11px;
    color: #fff !important;
    background: #242424 !important;
  }

  .mobile-nav-btn > span:first-child {
    color: var(--green);
    font-size: 20px;
    line-height: 1;
  }

  #mobileNavCurrent {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tabs {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1500;
    display: block;
    width: min(86vw, 330px);
    max-width: 330px;
    height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: transform 190ms ease;
    box-shadow: 22px 0 60px rgba(0,0,0,.62);
  }

  body.mobile-nav-open .tabs {
    transform: translateX(0);
  }

  .tabs .sidebar-club {
    display: grid !important;
    width: 100%;
    padding: 4px 4px 14px;
    margin-bottom: 10px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }

  .tabs .sidebar-search {
    display: grid !important;
    margin: 10px 0 14px;
  }

  .tabs .nav-section-label {
    display: flex !important;
  }

  .tabs .sidebar-sponsors {
    display: none !important;
  }

  .tabs .golee-nav-group {
    display: grid !important;
    width: 100%;
    gap: 4px;
  }

  .tabs .golee-nav-group.is-collapsed {
    display: none !important;
  }

  .tabs .tab {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    white-space: normal;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1400;
    width: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0,0,0,.64);
    backdrop-filter: blur(2px);
  }

  body.mobile-nav-open .mobile-nav-backdrop {
    display: block;
  }

  main {
    width: 100%;
    padding: 18px clamp(12px, 3vw, 24px) 38px;
    overflow: hidden;
  }

  .view,
  .panel,
  .panel-body,
  .dashboard-controls,
  .module-guide,
  .registration-bulk-card,
  .registration-manual-details {
    min-width: 0;
    max-width: 100%;
  }

  .table-wrap,
  .race-calendar-shell {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .table-wrap::after {
    content: 'Scorri orizzontalmente per vedere tutti i dati →';
    position: sticky;
    left: 10px;
    display: block;
    width: max-content;
    max-width: calc(100vw - 54px);
    padding: 7px 0 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .table-wrap table {
    min-width: max(680px, 100%);
  }

  .panel-head,
  .dashboard-controls,
  .golee-toolbar,
  .athlete-wardrobe-shortcut,
  .remote-update-banner {
    align-items: stretch;
  }

  .panel-head > *,
  .golee-toolbar > *,
  .golee-toolbar-group {
    min-width: 0;
  }

  .notification-panel {
    position: fixed;
    inset: 70px 10px auto;
    width: auto;
    max-height: calc(100dvh - 82px);
  }

  .top-tools-panel {
    position: fixed;
    inset: 70px 10px auto;
    width: auto;
    max-height: calc(100dvh - 82px);
  }

  dialog,
  [role="dialog"] .panel,
  .race-workspace-dialog {
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
}

@media (max-width: 620px) {
  button,
  .file-button,
  input,
  select {
    min-height: 44px;
  }

  main {
    padding: 12px 10px 34px;
  }

  .topbar {
    padding: 8px 10px;
  }

  .top-actions > .access-user-pill,
  .top-actions > #desktopAreaSwitchBtn {
    display: none !important;
  }

  .notification-bell,
  .access-logout-btn,
  .top-tools-menu summary {
    min-width: 44px;
    padding-inline: 10px;
    font-size: 0;
  }

  .notification-bell .notification-badge,
  .notification-bell .bell-shape,
  .top-tools-menu summary::before {
    font-size: 12px;
  }

  .access-logout-btn::before {
    content: '↪';
    font-size: 20px;
  }

  .top-tools-menu summary::before {
    margin: 0;
    font-size: 20px;
  }

  .mobile-nav-btn {
    max-width: calc(100vw - 166px);
  }

  .dashboard-admin-grid,
  .metrics,
  .dashboard-controls,
  .dashboard-grid,
  .grid,
  .grid-wide,
  .form-grid,
  .toolbar,
  .ranking-tools,
  .registration-module-nav {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .metrics {
    gap: 8px;
  }

  .metric,
  .dashboard-admin-card,
  .panel,
  .dashboard-controls,
  .module-guide {
    border-radius: 10px;
  }

  .panel-head,
  .panel-body,
  .dashboard-controls,
  .dashboard-admin-card {
    padding: 13px;
  }

  .panel-head,
  .dashboard-controls,
  .golee-toolbar,
  .golee-toolbar-group,
  .remote-update-banner {
    flex-direction: column;
  }

  .panel-head button,
  .panel-head select,
  .dashboard-controls button,
  .golee-toolbar button,
  .golee-toolbar select,
  .golee-toolbar-group,
  .golee-toolbar-group > *,
  .row-actions button {
    width: 100%;
  }

  .golee-segment {
    width: 100%;
    overflow-x: auto;
  }

  .golee-segment button {
    width: auto;
    flex: 1 0 auto;
  }

  .access-gate {
    padding: 10px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .access-card[style] {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    border-radius: 16px !important;
  }

  .access-brand {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 18px 16px 10px;
  }

  .access-brand img {
    width: 58px;
    height: 58px;
  }

  .access-brand h2 {
    font-size: 19px;
  }

  .access-role-grid,
  .access-form,
  .access-setup,
  .access-card .status {
    padding-inline: 16px;
  }

  .remote-update-banner {
    top: 70px;
    width: calc(100vw - 20px);
  }

  .remote-update-banner button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tabs {
    transition: none;
  }
}

/* Mobile v140: gerarchia più semplice e caricamento dati esplicito */
body.access-loading .access-card > :not(.access-brand):not(.status) {
  display: none !important;
}

body.access-loading .access-card .status {
  position: relative;
  padding: 22px 18px 22px 52px;
  color: #fff;
  background: rgba(0,200,83,.09);
  border-top: 1px solid rgba(0,200,83,.26);
}

body.access-loading .access-card .status::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid rgba(255,255,255,.28);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: mobile-admin-spin .8s linear infinite;
}

@keyframes mobile-admin-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 620px) {
  .module-guide {
    display: none !important;
  }

  .dashboard-controls .hint {
    display: none;
  }

  .dashboard-controls {
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .dashboard-controls > div:first-child {
    width: 100%;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-bottom: 10px;
  }

  .metric {
    min-height: 82px;
    padding: 12px;
  }

  .metric span {
    font-size: 10px;
    line-height: 1.2;
  }

  .metric strong {
    font-size: 23px;
  }

  .dashboard-admin-grid {
    gap: 10px;
  }

  .dashboard-admin-card {
    min-height: 0;
  }

  .dashboard-admin-list {
    max-height: 150px;
    overflow: auto;
  }

  .dashboard-admin-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .view > .panel,
  .view > .dashboard-admin-grid,
  .view > .grid,
  .view > .grid-wide,
  .view > .registration-module-nav {
    margin-bottom: 10px;
  }

  .panel-head h2,
  .dashboard-admin-head h2 {
    font-size: 17px;
    line-height: 1.2;
  }

  .panel-head p,
  .registration-helper,
  .hint {
    font-size: 12px;
    line-height: 1.45;
  }

  .table-wrap::after {
    display: none;
  }

  .table-wrap {
    border-radius: 8px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 58px 50px;
    width: 100%;
  }

  .mobile-nav-btn {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .notification-bell,
  .access-logout-btn,
  .top-tools-menu summary {
    width: 100%;
    padding-inline: 6px;
  }

  .access-logout-btn {
    font-size: 12px;
  }

  .access-logout-btn::before {
    display: none;
  }

  .top-tools-menu summary {
    justify-content: center;
    font-size: 11px;
  }

  .top-tools-menu summary::before {
    display: none;
  }
}

/* Mobile v141: navigazione da app e azioni sempre raggiungibili */
@media (max-width: 620px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  main { padding: 10px 8px 24px; }
  .topbar { min-height: 56px; padding: 7px 8px; }
  .top-actions { display: block; }
  .mobile-nav-btn {
    display: flex;
    width: 100%;
    min-height: 44px;
    max-width: none;
    justify-content: flex-start;
    border-color: rgba(0,200,83,.35) !important;
    background: linear-gradient(180deg,#242827,#191b1a) !important;
  }
  #mobileNavCurrent { font-size: 15px; }
  .top-actions > :not(.mobile-nav-btn) { display: none !important; }

  .mobile-nav-utilities {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
    margin-top: 20px;
    padding: 14px 0 max(16px,env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.12);
  }
  .mobile-nav-utilities button {
    min-width: 0;
    min-height: 44px;
    padding: 7px 4px;
    font-size: 11px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1250;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 2px;
    min-height: calc(62px + env(safe-area-inset-bottom));
    padding: 5px 6px max(5px,env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.16);
    background: rgba(13,14,14,.97);
    box-shadow: 0 -12px 34px rgba(0,0,0,.45);
    backdrop-filter: blur(14px);
  }
  .mobile-bottom-nav button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 50px;
    padding: 4px 2px;
    border: 0;
    border-radius: 9px;
    color: #aaa;
    background: transparent;
    box-shadow: none;
    font-size: 10px;
    line-height: 1;
  }
  .mobile-bottom-nav button span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 7px;
    color: #ddd;
    background: rgba(255,255,255,.07);
    font-size: 15px;
    font-weight: 900;
  }
  .mobile-bottom-nav button.active { color: #fff; background: rgba(0,200,83,.10); }
  .mobile-bottom-nav button.active span { color: #fff; background: var(--green); }

  .panel,
  .dashboard-admin-card,
  .dashboard-controls {
    border-color: rgba(255,255,255,.12);
    background: #151817;
    box-shadow: 0 7px 18px rgba(0,0,0,.22);
  }
  .panel-head {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,.10);
  }
  .panel-head > div:last-child,
  .panel-head > .row-actions,
  .panel-head > .golee-toolbar-group {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 7px;
    width: 100%;
  }
  .panel-head button,
  .panel-head select,
  .dashboard-admin-actions button,
  .golee-toolbar button,
  .golee-toolbar select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    white-space: normal;
    font-size: 12px;
    line-height: 1.15;
  }
  .panel-body { padding: 12px; }

  .row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 116px;
  }
  .row-actions button {
    width: auto;
    min-width: 70px;
    min-height: 38px;
    flex: 1 1 auto;
    padding: 6px 8px;
    font-size: 11px;
  }
  .table-wrap table { min-width: max(600px,100%); }
  .table-wrap th:first-child,
  .table-wrap td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 108px;
    background: #171a19;
    box-shadow: 5px 0 10px rgba(0,0,0,.28);
  }
  .table-wrap th:first-child { z-index: 4; background: #212522; }
  .table-wrap td:last-child:has(.row-actions) {
    position: sticky;
    right: 0;
    z-index: 3;
    min-width: 118px;
    background: #171a19;
    box-shadow: -5px 0 10px rgba(0,0,0,.28);
  }
  .form-grid { gap: 10px; }
  label { margin-bottom: 5px; font-size: 11px; line-height: 1.25; }
  input,
  select,
  textarea { font-size: 16px; }
  .empty { padding: 18px 12px; }

  .mobile-admin-launchpad {
    display: block;
    margin-bottom: 10px;
    padding: 13px;
    border: 1px solid rgba(0,200,83,.28);
    border-radius: 14px;
    background: linear-gradient(145deg,rgba(0,72,38,.30),rgba(25,19,19,.96));
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
  }
  .mobile-admin-launchpad-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
  }
  .mobile-admin-launchpad-head span,
  .mobile-admin-launchpad-head strong { display: block; }
  .mobile-admin-launchpad-head > div > span {
    color: var(--green);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .mobile-admin-launchpad-head strong { margin-top: 2px; font-size: 18px; }
  .mobile-admin-launchpad-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
  }
  .mobile-admin-launchpad-grid button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 72px;
    padding: 8px 4px;
    border-color: rgba(255,255,255,.12);
    background: rgba(10,12,11,.82);
    font-size: 10px;
    line-height: 1.1;
  }
  .mobile-admin-launchpad-grid b {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: #fff;
    background: var(--green);
    font-size: 13px;
  }
  .mobile-admin-launchpad-grid span { overflow-wrap: anywhere; }

  #dashboard .dashboard-admin-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 8px;
  }
  #dashboard .dashboard-admin-card {
    padding: 11px;
    border-radius: 12px;
  }
  #dashboard .dashboard-admin-card:last-child { grid-column: 1 / -1; }
  #dashboard .dashboard-admin-head h2 { font-size: 13px; }
  #dashboard .dashboard-admin-stat strong { font-size: 27px; }
  #dashboard .dashboard-admin-stat span { font-size: 9px; }
  #dashboard .dashboard-admin-text {
    min-height: 30px;
    margin: 5px 0 8px;
    font-size: 10px;
    line-height: 1.3;
  }
  #dashboard .dashboard-admin-list { display: none; }
  #dashboard .dashboard-admin-actions button { min-height: 38px; font-size: 10px; }

  .mobile-dashboard-details-btn {
    display: block;
    width: 100%;
    margin: 10px 0;
  }
  #dashboard > .dashboard-podium-section,
  #dashboard > .dashboard-main-grid,
  #dashboard > .dashboard-society-card,
  #dashboard > section.panel {
    display: none;
  }
  body.mobile-dashboard-expanded #dashboard > .dashboard-podium-section,
  body.mobile-dashboard-expanded #dashboard > .dashboard-main-grid,
  body.mobile-dashboard-expanded #dashboard > .dashboard-society-card,
  body.mobile-dashboard-expanded #dashboard > section.panel {
    display: block;
  }

  table.mobile-card-table,
  table.mobile-card-table tbody,
  table.mobile-card-table tr,
  table.mobile-card-table td { display:block; width:100%; min-width:0 !important; box-sizing:border-box; }
  table.mobile-card-table { min-width:0 !important; border:0; background:transparent; }
  table.mobile-card-table thead { display:none; }
  table.mobile-card-table tbody { display:grid; gap:9px; padding:8px; }
  table.mobile-card-table tr {
    overflow:hidden; border:1px solid rgba(255,255,255,.13); border-left:3px solid var(--green);
    border-radius:12px; background:linear-gradient(145deg,#1d211f,#111312); box-shadow:0 5px 14px rgba(0,0,0,.20);
  }
  table.mobile-card-table td {
    position:static !important; display:grid; grid-template-columns:minmax(86px,36%) minmax(0,1fr);
    align-items:start; gap:9px; min-height:0; padding:8px 10px; border:0;
    border-bottom:1px solid rgba(255,255,255,.075); background:transparent !important;
    box-shadow:none !important; text-align:left !important; white-space:normal; overflow-wrap:anywhere;
  }
  table.mobile-card-table td:last-child { border-bottom:0; }
  table.mobile-card-table td::before {
    content:attr(data-label); color:#8f9893; font-size:9px; font-weight:900;
    letter-spacing:.045em; text-transform:uppercase;
  }
  table.mobile-card-table td[data-label=""] { display:block; padding:16px 12px; text-align:center !important; }
  table.mobile-card-table td[data-label=""]::before { display:none; }
  table.mobile-card-table .row-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; min-width:0; gap:6px; }
  table.mobile-card-table .row-actions button { width:100%; min-width:0; min-height:42px; margin:0; }

  #raceRegistrations .registration-module-nav,
  #wardrobe .warehouse-subnav {
    display:flex; gap:7px; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x proximity;
  }
  #raceRegistrations .registration-module-card { flex:0 0 145px; min-height:78px; padding:10px; scroll-snap-align:start; }
  #raceRegistrations .registration-module-card small { display:none; }
  #raceRegistrations .registration-module-card strong { font-size:11px; }
  #raceRegistrations .registration-situation-head { display:grid; gap:9px; }
  #raceRegistrations .registration-situation-head .row-actions { display:grid; grid-template-columns:1fr; width:100%; }
  #wardrobe .warehouse-subnav button { flex:0 0 auto; min-width:132px; min-height:44px; scroll-snap-align:start; }
  #wardrobe .metrics,
  #raceRegistrations > .metrics { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #wardrobe .metrics .metric:last-child,
  #raceRegistrations > .metrics .metric:last-child { grid-column:1 / -1; }
  #athletes .athlete-editor-panel .form-grid,
  #raceRegistrations .form-grid,
  #wardrobe .form-grid { grid-template-columns:minmax(0,1fr) !important; }
  #athletes .athlete-editor-panel .wide,
  #raceRegistrations .wide,
  #wardrobe .wide { grid-column:auto !important; }
}

@media (max-width:980px) and (pointer:coarse) {
  body { padding-bottom:calc(70px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav {
    position:fixed; z-index:1250; inset:auto 0 0; display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr)); padding:5px 6px max(5px,env(safe-area-inset-bottom));
    border-top:1px solid rgba(255,255,255,.16); background:rgba(13,14,14,.97);
  }
}
.race-result-roster-panel { margin-bottom: 14px; }
.result-roster-table input,
.result-roster-table select { min-width: 120px; }
.result-roster-table [data-roster-field="bib"] { min-width: 90px; }
.result-roster-table [data-roster-field="position"] { min-width: 80px; }
.result-roster-table [data-roster-score] { font-weight: 800; text-align: right; }
@media (max-width: 760px) {
  .race-result-roster-panel .toolbar > * { width: 100%; }
  .result-roster-table { min-width: 850px; }
}

