/* live.css — Stili condivisi per app live, form iscrizione, area admin */

/* === Layout === */
[hidden] {
  display: none !important;
}

.container--narrow {
  max-width: 640px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav--simple {
  background: rgba(0, 0, 0, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 4rem;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 60, 0, 0.08), transparent 34rem),
    radial-gradient(circle at 82% 12%, rgba(212, 168, 67, 0.08), transparent 18rem),
    var(--bg-primary);
}

.form-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 75%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 75%);
  pointer-events: none;
}

.form-section > .container {
  position: relative;
  z-index: 1;
}

.form-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin: 0.5rem 0 1rem;
  text-transform: uppercase;
  line-height: 1.1;
}

.form-header p {
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

.admin-login-section .section__label {
  color: var(--accent-gold);
}

.admin-login-section .form-header h1 {
  color: var(--text-primary);
}

.form--admin-login {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(212, 168, 67, 0.32);
  border-radius: var(--radius-md);
  background: rgba(10, 10, 10, 0.94);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.4);
}

.admin-login-warning {
  margin-bottom: 1.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(212, 168, 67, 0.55);
  border-radius: 4px;
  color: var(--accent-gold);
  background: rgba(212, 168, 67, 0.08);
  font-family: var(--font-heading);
  font-size: 1rem;
  text-align: center;
  text-transform: uppercase;
}

.slot-dashboard {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  background: rgba(12, 12, 12, 0.74);
}

.slot-dashboard__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.slot-dashboard__header h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  text-transform: uppercase;
}

.slot-dashboard__header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.slot-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.slot-card.needs-cap {
  border-color: rgba(255, 255, 255, 0.16);
}

.slot-card.is-warning {
  border-color: rgba(212, 168, 67, 0.42);
}

.slot-card.is-full {
  border-color: rgba(255, 68, 68, 0.48);
  background: rgba(255, 68, 68, 0.08);
}

.slot-card__top,
.slot-card__numbers {
  display: grid;
  gap: 0.6rem;
}

.slot-card__top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.slot-card__top strong,
.slot-card__top span {
  font-family: var(--font-heading);
  text-transform: uppercase;
}

.slot-card__top span {
  max-width: 8.5rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid rgba(212, 168, 67, 0.28);
  border-radius: 4px;
  color: var(--accent-gold);
  background: rgba(212, 168, 67, 0.08);
  font-size: 0.85rem;
  line-height: 1.05;
  text-align: right;
}

.slot-card__numbers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.slot-card__numbers div {
  min-height: 4.25rem;
  min-width: 0;
  padding: 0.65rem 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.slot-card__numbers b,
.slot-card__numbers small {
  display: block;
}

.slot-card__numbers b {
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1;
  white-space: nowrap;
}

.slot-card__numbers small {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.slot-card__progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.slot-card__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
}

.slot-card__summary {
  min-height: 1.1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.slot-card__cap {
  display: grid;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.slot-card__cap input,
.share-box input,
.share-box__message {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.055);
}

.slot-card__cap input {
  padding: 0.55rem 0.65rem;
}

.share-box {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.share-box__row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.share-box__row label {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.share-box input,
.share-box__message {
  padding: 0.65rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.share-box__message {
  min-height: 9rem;
  resize: vertical;
}

.form-event-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 1.5rem auto 0;
  max-width: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
}

.form-event-summary div {
  padding: 0.85rem 0.75rem;
  background: rgba(10, 10, 10, 0.72);
}

.form-event-summary span {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-event-summary strong {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.app-install-note {
  display: grid;
  gap: 0.45rem;
  margin: 1rem auto 0;
  max-width: 560px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(212, 168, 67, 0.26);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: rgba(212, 168, 67, 0.07);
  text-align: left;
}

.app-install-note strong {
  color: var(--accent-gold);
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
}

.app-install-note span {
  display: block;
  font-size: 0.9rem;
  line-height: 1.35;
}

.category-status-panel {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  background: rgba(12, 12, 12, 0.72);
}

.category-status-panel__header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.category-status-panel__header h2 {
  margin: 0.15rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  text-transform: uppercase;
}

.category-status-panel__header > span {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: right;
}

.category-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.category-status-card {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.category-status-card strong,
.category-status-card span {
  font-family: var(--font-heading);
  text-transform: uppercase;
}

.category-status-card strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.category-status-card span {
  color: var(--accent-gold);
  font-size: 0.82rem;
}

.category-status-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.category-status-card.is-warning {
  border-color: rgba(212, 168, 67, 0.44);
}

.category-status-card.is-full {
  border-color: rgba(255, 68, 68, 0.5);
  background: rgba(255, 68, 68, 0.08);
}

.category-status-card.is-full span {
  color: #ff8888;
}

/* === Registration form === */
.form--registration {
  position: relative;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(12, 12, 12, 0.92);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
}

.form--registration::before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(1.25rem, 4vw, 2rem);
  right: clamp(1.25rem, 4vw, 2rem);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-gold), transparent);
}

.form__field--trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* === Form fields === */
.form__field {
  margin-bottom: 1.5rem;
}

.form__field label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 4px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form__field input::placeholder,
.form__field textarea::placeholder {
  color: rgba(176, 176, 176, 0.62);
}

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 60, 0, 0.14);
}

.form__field input.is-invalid,
.form__field select.is-invalid,
.form__field textarea.is-invalid {
  border-color: #ff4444;
  background: rgba(255, 68, 68, 0.08);
}

.form__field textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-body);
}

.form__field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ccc' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form__field option,
.form__field optgroup {
  color: #0A0A0A;
  background: #FFFFFF;
}

.form__error {
  display: block;
  color: #ff6666;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  min-height: 1.2em;
}

.form__hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

.form__disclaimer {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* === Buttons utility === */
.btn--full {
  width: 100%;
}

.btn--small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn--success {
  background: #2d8a4e;
  color: #fff;
  border: none;
}
.btn--success:hover {
  background: #34a05c;
}

.btn--danger {
  background: rgba(255, 80, 80, 0.15);
  color: #ff8888;
  border: 1px solid rgba(255, 80, 80, 0.3);
}
.btn--danger:hover {
  background: rgba(255, 80, 80, 0.25);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.is-loading {
  position: relative;
  color: transparent !important;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === Success / error states === */
.form-success,
.form-error {
  text-align: center;
  padding: 3rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  background: rgba(12, 12, 12, 0.78);
}

.form-success__icon,
.form-error__icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.form-success h2,
.form-error h2 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.form-success p,
.form-error p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.form-success a,
.form-success button,
.form-error a,
.form-error button {
  margin: 0.25rem 0.4rem;
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2d8a4e;
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast--err {
  background: #c92a2a;
}

/* === Admin app === */
.admin-app {
  min-height: 100vh;
  padding-bottom: 4rem;
}

.admin-header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  z-index: 100;
  padding-top: 1rem;
}

.admin-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-header__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 1px;
}

.admin-header__logo span {
  color: var(--accent-primary);
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0 0 0.5rem;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.7rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.is-active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.admin-tab__badge {
  background: var(--accent-primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  margin-left: 0.4rem;
  font-family: var(--font-body);
}

.admin-main {
  padding-top: 2rem;
}

.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: block;
}

.admin-panel h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.admin-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.admin-card__info {
  flex: 1;
  min-width: 200px;
}

.admin-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.admin-card__meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.admin-card__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* === Search input === */
.search-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* === Modal === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal__content {
  position: relative;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__close:hover {
  color: var(--text-primary);
}
.modal h3 {
  font-family: var(--font-heading);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

/* === Suggerimenti search === */
.suggerimenti {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  margin-top: 0.3rem;
  max-height: 280px;
  overflow-y: auto;
}
.suggerimenti__item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.suggerimenti__item:hover {
  background: rgba(255, 60, 0, 0.12);
}
.suggerimenti__item:last-child {
  border-bottom: none;
}
.suggerimenti__nome {
  font-weight: 600;
  font-size: 1rem;
}
.suggerimenti__meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

/* === Atleta pill (selezionato in tab Risultati) === */
.atleta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 0.5rem;
}
.atleta-pill button {
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  padding: 0;
}
.atleta-pill button:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* === Giudice attivo in tab Risultati === */
.ris-judge-strip {
  margin: 0.75rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(212, 168, 67, 0.22);
  border-left: 3px solid var(--accent-gold);
  border-radius: 6px;
  background: rgba(212, 168, 67, 0.06);
}
.ris-judge-strip .form__field {
  margin-bottom: 0;
}
.ris-judge-strip input {
  font-weight: 700;
}

/* === Anteprima EPI === */
.ris-anteprima {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 6px;
  text-align: center;
}
.ris-anteprima__label {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.ris-anteprima__valore {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--accent-gold);
  font-weight: 700;
  line-height: 1;
}
.ris-anteprima__hint {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.ris-anteprima.is-anomalous {
  background: rgba(255, 87, 34, 0.08);
  border-color: rgba(255, 87, 34, 0.5);
}
.ris-anteprima.is-anomalous .ris-anteprima__valore {
  color: #ff5722;
}
.ris-anteprima__alert {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(255, 87, 34, 0.4);
  color: #ff5722;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
}

/* === Pagina premiazione (podio.html) === */
.podio-body {
  background: radial-gradient(circle at 50% 0%, rgba(255, 60, 0, 0.15), transparent 60%), var(--bg-primary);
  min-height: 100vh;
}

.podio-hero {
  padding: 4rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.podio-hero__brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-gold);
}
.podio-hero__brand span {
  color: var(--accent-primary);
}
.podio-hero__title h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  margin: 0.6rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.podio-hero__title p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}
.podio-hero__status {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.podio-section {
  padding: 2rem 0 4rem;
}
.podio-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 3rem;
}
.podio-tab {
  padding: 0.65rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.podio-tab:hover { color: var(--text-primary); border-color: rgba(255, 255, 255, 0.3); }
.podio-tab.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #000;
  font-weight: 700;
}

.podio-stage {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1.5rem;
  align-items: end;
  max-width: 1100px;
  margin: 0 auto;
}
.podio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid;
  background: rgba(15, 15, 15, 0.85);
  position: relative;
  transition: all 0.4s ease;
}
.podio-card--gold {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, rgba(212, 168, 67, 0.18), rgba(15, 15, 15, 0.9) 70%);
  padding: 3rem 1.4rem 2.5rem;
  box-shadow: 0 25px 60px rgba(212, 168, 67, 0.18);
  transform: translateY(-1.4rem);
}
.podio-card--silver {
  border-color: rgba(195, 195, 200, 0.55);
  background: linear-gradient(180deg, rgba(195, 195, 200, 0.12), rgba(15, 15, 15, 0.85) 70%);
}
.podio-card--bronze {
  border-color: rgba(205, 127, 50, 0.55);
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.12), rgba(15, 15, 15, 0.85) 70%);
}
.podio-card__rank {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.6rem;
}
.podio-card--gold .podio-card__rank { color: var(--accent-gold); }
.podio-card--silver .podio-card__rank { color: rgba(220, 220, 224, 0.95); }
.podio-card--bronze .podio-card__rank { color: rgba(205, 127, 50, 0.95); }
.podio-card__nome {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.4rem;
  word-break: break-word;
}
.podio-card__box {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.podio-card__epi {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  letter-spacing: 0.05em;
  color: var(--accent-primary);
}
.podio-card.is-empty {
  opacity: 0.35;
  filter: grayscale(0.5);
}
.podio-empty {
  text-align: center;
  margin: 4rem auto;
  padding: 2rem;
  max-width: 480px;
  color: var(--text-muted);
  font-size: 1.1rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
}
.podio-hint {
  margin: 3rem auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.podio-hint code {
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  font-family: ui-monospace, monospace;
}

@media (max-width: 720px) {
  .podio-stage {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .podio-card--gold {
    transform: none;
    order: -1;
  }
}

/* === Badge presenza atleta === */
.atleta-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}
.atleta-badge--absent {
  background: rgba(255, 87, 34, 0.15);
  color: #ff5722;
  border: 1px solid rgba(255, 87, 34, 0.45);
}
.admin-card.is-absent {
  opacity: 0.65;
  background: rgba(255, 87, 34, 0.04);
  border-color: rgba(255, 87, 34, 0.2);
}
.admin-card.is-absent .admin-card__title {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 87, 34, 0.55);
}
.suggerimenti__item.is-absent {
  opacity: 0.6;
}
.suggerimenti__item.is-absent .suggerimenti__nome {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 87, 34, 0.5);
}

/* === Warning sovrascrittura === */
.ris-warning {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 165, 0, 0.1);
  border-left: 3px solid orange;
  border-radius: 4px;
  font-size: 0.9rem;
}
.ris-warning strong {
  display: block;
  margin-bottom: 0.3rem;
}
.ris-warning em {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-style: italic;
}
.ris-warning__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

/* === Form row 2 colonne === */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* === Tools tab === */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.tool-card--wide {
  grid-column: 1 / -1;
}
.tool-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.tool-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}
.tool-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.tool-card code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.85em;
}
.official-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.official-link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}
.official-link__qr {
  display: grid;
  place-items: center;
  padding: 0.35rem;
  border-radius: 4px;
  background: #fff;
}
.official-link__qr img {
  display: block;
  width: 84px;
  height: 84px;
}
.official-link__body {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}
.official-link__body strong {
  font-family: var(--font-heading);
  color: var(--text-primary);
  text-transform: uppercase;
}
.official-link__body span {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.official-link__body input {
  width: 100%;
  padding: 0.5rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.8rem;
}
.official-link__actions,
.official-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.official-actions {
  margin-top: 1rem;
}
.tool-output {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  white-space: pre-wrap;
  display: none;
  line-height: 1.5;
  max-height: 300px;
  overflow-y: auto;
}
.tool-output.is-visible {
  display: block;
}

.audit-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}
.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
}
.audit-row__main,
.audit-row__meta {
  min-width: 0;
}
.audit-row__athlete {
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audit-row__event,
.audit-row__judge {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}
.audit-row__score {
  text-align: right;
  font-family: var(--font-heading);
  color: var(--accent-gold);
  white-space: nowrap;
}
.audit-row__score b {
  display: block;
  font-size: 1.15rem;
  color: var(--accent-primary);
}
.audit-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .audit-row {
    grid-template-columns: 1fr;
  }
  .audit-row__score {
    text-align: left;
  }
  .audit-row__actions {
    justify-content: flex-start;
  }
}

/* Filtri drill-down correzione risultati */
.corr-filtri {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}
.corr-filtri label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.corr-filtri select {
  min-width: 160px;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-primary);
  font-size: 0.9rem;
}
.corr-contesto {
  margin: 0.25rem 0 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.audit-row--missing {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.85;
}
.audit-row--missing .audit-row__score {
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .corr-filtri {
    flex-direction: column;
    align-items: stretch;
  }
  .corr-filtri select {
    min-width: 0;
    width: 100%;
  }
}

/* === Live leaderboard === */
.live-hero {
  padding: 6rem 0 2rem;
  text-align: center;
}
.live-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  text-transform: uppercase;
  margin: 0.5rem 0 1rem;
  line-height: 1.1;
}
.live-hero p {
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

.live-section {
  padding: 1rem 0 4rem;
}

.live-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0 0 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-overflow-scrolling: touch;
}
.live-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.85rem 1.4rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.live-tab:hover {
  color: var(--text-primary);
}
.live-tab.is-active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.live-status {
  text-align: center;
  color: var(--text-muted);
  padding: 0.5rem 0 1rem;
  font-size: 0.85rem;
}
.live-status .live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #2d8a4e;
  border-radius: 50%;
  margin-right: 0.4rem;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}
.live-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-family: var(--font-body);
}
.live-table th,
.live-table td {
  padding: 0.85rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.live-table th {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  position: sticky;
  top: 0;
  z-index: 5;
}
.live-table tr:last-child td {
  border-bottom: none;
}
.live-table__rank {
  width: 50px;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}
.live-table__atleta {
  text-align: left !important;
  min-width: 180px;
  font-weight: 600;
}
.live-table__box {
  text-align: left !important;
  color: var(--text-secondary);
  font-size: 0.85rem;
  min-width: 110px;
}
.live-table__ev {
  width: 64px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.live-table__ev.has-score {
  color: var(--text-primary);
  font-weight: 600;
}
.live-table__epi {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  width: 110px;
  background: rgba(212, 168, 67, 0.05);
}

.live-table tr.is-podio-1 .live-table__rank { color: gold; }
.live-table tr.is-podio-2 .live-table__rank { color: silver; }
.live-table tr.is-podio-3 .live-table__rank { color: #cd7f32; }

.live-table tr.is-updated {
  animation: rowFlash 1.6s ease-out;
}
@keyframes rowFlash {
  0% { background: rgba(255, 60, 0, 0.35); }
  100% { background: transparent; }
}

.live-table__cell-vuota {
  color: var(--text-muted);
}

.live-empty {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}
.live-empty__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* === Mobile === */
@media (max-width: 640px) {
  .form-header h1 {
    font-size: 1.8rem;
  }
  .form-section {
    padding-top: 6rem;
  }
  .form-event-summary {
    grid-template-columns: 1fr;
  }
  .category-status-panel__header,
  .category-status-grid {
    grid-template-columns: 1fr;
  }
  .category-status-panel__header {
    display: grid;
  }
  .category-status-panel__header > span {
    text-align: left;
  }
  .form--registration {
    padding: 1rem;
  }
  .form-success a,
  .form-error button {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .slot-dashboard__header,
  .share-box__row {
    grid-template-columns: 1fr;
  }
  .slot-dashboard__header {
    display: grid;
  }
  .share-box__row .btn {
    width: 100%;
  }
  .admin-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-card__actions {
    width: 100%;
  }
  .official-link {
    grid-template-columns: 1fr;
  }
  .official-link__qr {
    width: 112px;
  }
  .ris-anteprima__valore {
    font-size: 2.5rem;
  }
  .live-hero {
    padding: 5rem 0 1rem;
  }
  .live-hero h1 {
    font-size: 1.8rem;
  }
  .live-table th,
  .live-table td {
    padding: 0.6rem 0.4rem;
  }
  .live-table__epi {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.is-loading::after,
  .live-table tr.is-updated {
    animation: none;
  }
}
