* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at center, #292929 0%, #111111 55%, #070707 100%);
    color: #ffffff;
}

#app {
    min-height: 100vh;
}

/* BARRA SUPERIORE */

.topbar {
    height: 90px;
    padding: 10px 35px;

    display: flex;
    align-items: center;
    gap: 18px;

    background: rgba(8, 8, 8, 0.95);
    border-bottom: 1px solid #b99745;
}

.league-logo {
    width: 66px;
    height: 66px;
    object-fit: contain;
    border-radius: 8px;
}

.topbar-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.topbar-title span {
    font-size: 12px;
    letter-spacing: 3px;
    color: #b8b8b8;
}

.topbar-title strong {
    font-size: 24px;
    letter-spacing: 2px;
    color: #d8b55b;
}

/* SCHERMATA INIZIALE */

.welcome {
    min-height: calc(100vh - 90px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 35px;
    text-align: center;
}

.arena-logo {
    width: min(430px, 80vw);
    max-height: 430px;
    object-fit: contain;

    margin-bottom: 20px;

    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.65));
}

.welcome h1 {
    font-size: clamp(38px, 5vw, 64px);
    letter-spacing: 5px;
    color: #d8b55b;
    margin-bottom: 8px;
}

.subtitle {
    color: #bdbdbd;
    font-size: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* PULSANTE PRINCIPALE */

#startButton {
    padding: 16px 34px;

    border: 1px solid #d8b55b;
    border-radius: 7px;

    background: linear-gradient(180deg, #d4b057, #9c792c);
    color: #0b0b0b;

    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

#startButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(216, 181, 91, 0.25);
}

#startButton:active {
    transform: translateY(0);
}
/* PREPARAZIONE ASTA */

.setup-screen {
    display: none;
}
.setup-screen {
    min-height: calc(100vh - 90px);
    padding: 50px;
}

.setup-header {
    text-align: center;
    margin-bottom: 45px;
}

.setup-header span {
    color: #d8b55b;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 4px;
}

.setup-header h2 {
    margin-top: 8px;
    font-size: 38px;
    letter-spacing: 3px;
}

.setup-header p {
    margin-top: 8px;
    color: #999999;
    font-size: 15px;
}

.setup-steps {
    max-width: 1100px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.setup-step {
    min-height: 110px;
    padding: 18px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background: #171717;
    border: 1px solid #363636;
    border-radius: 8px;
}

.step-number {
    font-size: 28px;
    font-weight: bold;
    color: #666666;
}

.setup-step strong {
    font-size: 13px;
    letter-spacing: 1px;
    color: #aaaaaa;
}

.setup-step.active {
    border-color: #d8b55b;
    background:
        linear-gradient(
            145deg,
            rgba(216, 181, 91, 0.12),
            #171717
        );
}

.setup-step.active .step-number,
.setup-step.active strong {
    color: #d8b55b;
}
/* CONTENUTO CONFIGURAZIONE */

.setup-content {
    max-width: 1100px;
    margin: 30px auto 0;
    padding: 30px;

    background: rgba(20, 20, 20, 0.75);
    border: 1px solid #363636;
    border-radius: 10px;
}

.content-header {
    margin-bottom: 25px;
}

.content-kicker {
    color: #d8b55b;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 3px;
}

.content-header h3 {
    margin-top: 5px;
    font-size: 26px;
    letter-spacing: 1px;
}

.content-header p {
    margin-top: 6px;
    color: #999999;
    font-size: 14px;
}

.import-box {
    min-height: 190px;
    padding: 30px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;

    border: 1px dashed #6b6b6b;
    border-radius: 8px;
    background: #121212;
}

.import-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d8b55b;
    border-radius: 50%;

    color: #d8b55b;
    font-size: 24px;
    font-weight: bold;
}

.import-box h4 {
    font-size: 18px;
    margin-bottom: 6px;
}

.import-box p {
    color: #888888;
    font-size: 13px;
    margin-bottom: 18px;
}

#selectPlayersFile {
    padding: 12px 22px;

    border: 1px solid #d8b55b;
    border-radius: 6px;

    background: transparent;
    color: #d8b55b;

    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;

    cursor: pointer;
}

#selectPlayersFile:hover {
    background: #d8b55b;
    color: #111111;
}
/* RISULTATO IMPORTAZIONE */

.import-result {
    margin-top: 18px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    color: #ffffff;
}

.import-result:empty {
    display: none;
}

.import-result strong {
    color: #d8b55b;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.import-result span {
    color: #aaaaaa;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
}
.teams-content {
    display: none;
}
/* CONFIGURAZIONE SQUADRE */

.teams-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.team-setup-card {
    position: relative;
    padding: 18px 18px 18px 72px;

    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 10px 12px;
    align-items: center;

    background: #121212;
    border: 1px solid #363636;
    border-radius: 8px;
}

.team-buzzer {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d8b55b;
    border-radius: 50%;

    color: #d8b55b;
    font-size: 20px;
    font-weight: bold;
}

.team-position {
    grid-column: 1 / -1;

    color: #777777;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.team-name-input,
.team-budget-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;

    background: #1c1c1c;
    border: 1px solid #444444;
    border-radius: 5px;

    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.team-name-input:focus,
.team-budget-input:focus {
    border-color: #d8b55b;
}

.team-name-input::placeholder,
.team-budget-input::placeholder {
    color: #6f6f6f;
}
/* TEST BUZZER */

.buzzers-content {
    display: none;
}
.buzzers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 24px;
}

.buzzer-test-card {
    min-height: 120px;
    padding: 18px;

    display: flex;
    align-items: center;
    gap: 16px;

    background: #121212;
    border: 1px solid #363636;
    border-radius: 8px;
}

.buzzer-test-number {
    width: 52px;
    height: 52px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #d8b55b;
    border-radius: 50%;

    color: #d8b55b;
    font-size: 24px;
    font-weight: bold;
}

.buzzer-test-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.buzzer-test-info strong {
    color: #ffffff;
    font-size: 13px;
}

.buzzer-test-info span {
    color: #777777;
    font-size: 12px;
}
.buzzer-test-card.detected {
    background: #102117;
    border-color: #39a866;
}

.buzzer-test-card.detected .buzzer-test-number {
    border-color: #39a866;
    color: #39a866;
}

.buzzer-test-card.detected .buzzer-test-info span {
    color: #39a866;
    font-weight: bold;
}
.buzzer-team-name {
    color: #d8b55b;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* SCHERMATA LE TUE ASTE */

.auctions-screen {
    display: none;
}
.auctions-actions {
    display: flex;
    justify-content: center;
    margin-top: 35px;
}

#newAuctionButton {
    min-width: 220px;
    height: 52px;
    padding: 0 28px;

    background: #d8b55b;
    border: 1px solid #d8b55b;
    border-radius: 6px;

    color: #111111;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;

    cursor: pointer;
}

#newAuctionButton:hover {
    background: #e4c66f;
}
/* PULSANTE INDIETRO */

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 20px;
    padding: 9px 14px;

    background: transparent;
    border: 1px solid #363636;
    border-radius: 6px;

    color: #8a8a8a;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;

    cursor: pointer;
    transition: 0.2s ease;
}

.back-button:hover {
    color: #d8b55b;
    border-color: #d8b55b;
    background: #171717;
    transform: translateX(-2px);
}
/* ASTA CORRENTE */

.current-auction-card {
    max-width: 900px;
    margin: 18px auto 0;
    padding: 24px 28px;

    display: flex;
    align-items: center;
    gap: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(216, 181, 91, 0.06),
            rgba(18, 18, 18, 0.96) 35%
        );

    border: 1px solid #403a2b;
    border-radius: 10px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.current-auction-card:hover {
    transform: translateY(-2px);
    border-color: #76643a;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.current-auction-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-right: auto;
}

.current-auction-info span {
    color: #d8b55b;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.current-auction-info strong {
    color: #ffffff;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.current-auction-info p {
    margin: 0;
    color: #858585;
    font-size: 12px;
}
/* PULSANTI CARD ASTA */

.auction-continue-button,
.auction-delete-button {
    height: 42px;
    padding: 0 18px;

    border-radius: 6px;

    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


/* CONTINUA */

.auction-continue-button {
    background: #d8b55b;
    border: 1px solid #d8b55b;
    color: #111111;
}

.auction-continue-button:hover {
    background: #e4c66f;
    border-color: #e4c66f;
    transform: translateY(-1px);
}


/* ELIMINA */

.auction-delete-button {
    background: transparent;
    border: 1px solid #444444;
    color: #888888;
}

.auction-delete-button:hover {
    color: #d35c5c;
    border-color: #7a3434;
    background: #1b1111;
    transform: translateY(-1px);
}

/* MODAL NUOVA ASTA */

.auction-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;

    align-items: center;
    justify-content: center;

    padding: 20px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
}

.auction-modal-box {
    width: 100%;
    max-width: 460px;

    padding: 32px;

    background: #121212;
    border: 1px solid #3b3423;
    border-radius: 12px;

    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.auction-modal-kicker {
    display: block;
    margin-bottom: 8px;

    color: #d8b55b;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.auction-modal-box h2 {
    margin: 0 0 8px;

    color: #ffffff;
    font-size: 24px;
}

.auction-modal-box p {
    margin: 0 0 24px;

    color: #858585;
    font-size: 13px;
}

#newAuctionName {
    width: 100%;
    box-sizing: border-box;

    padding: 14px 15px;

    background: #0c0c0c;
    border: 1px solid #363636;
    border-radius: 7px;

    color: #ffffff;
    font-size: 14px;

    outline: none;
}

#newAuctionName:focus {
    border-color: #d8b55b;
}
/* NUMERO SQUADRE NUOVA ASTA */

.auction-teams-field {
    margin-top: 18px;
}

.auction-teams-field label {
    display: block;
    margin-bottom: 8px;

    color: #d8b55b;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

#newAuctionTeams {
    width: 100%;
    padding: 14px 15px;

    background: #0c0c0c;
    border: 1px solid #363636;
    border-radius: 7px;

    color: #ffffff;
    font-size: 14px;

    outline: none;
}

#newAuctionTeams:focus {
    border-color: #d8b55b;
}

.auction-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 24px;
}

#cancelNewAuctionButton,
#confirmNewAuctionButton {
    padding: 11px 17px;

    border-radius: 6px;

    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;

    cursor: pointer;
}

#cancelNewAuctionButton {
    background: transparent;
    border: 1px solid #3b3b3b;
    color: #888888;
}

#confirmNewAuctionButton {
    background: #d8b55b;
    border: 1px solid #d8b55b;
    color: #111111;
}
.control-content {
    display: none;
}
.control-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
    margin-bottom: 30px;
}

.control-stats > div {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-stats span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    opacity: 0.6;
}

.control-stats strong {
    font-size: 28px;
    font-weight: 800;
}
.control-teams {
    margin-top: 10px;
}

.control-section-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.4px;
    margin-bottom: 14px;
    opacity: 0.7;
}

.control-teams {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
}

.control-section-title {
    grid-column: 1 / -1;
}

.control-team-row {
    display: grid;
    grid-template-columns: 42px 1fr 120px 100px;
    align-items: center;
    gap: 12px;

    padding: 13px 16px;

    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.control-team-row > span:first-child {
    font-size: 18px;
    font-weight: 800;
    opacity: 0.5;
}

.control-team-row strong {
    font-size: 15px;
    font-weight: 800;
}

.control-team-row span:nth-child(3) {
    font-size: 13px;
    opacity: 0.7;
}

.control-team-row span:last-child {
    font-size: 12px;
    font-weight: 800;
    text-align: right;
}
.control-ready {
    margin-top: 22px;
    padding: 18px 20px;

    display: flex;
    align-items: center;
    gap: 16px;

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

.control-ready-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;

    font-size: 22px;
    font-weight: 800;
}

.control-ready > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.control-ready strong {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
}

.control-ready span {
    font-size: 13px;
    opacity: 0.65;
}
.start-content {
    display: none;
}
.start-auction-box {
    margin-top: 20px;
    padding: 38px 30px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.03);
}

.start-auction-label {
    margin-bottom: 8px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;

    opacity: 0.65;
}

.start-auction-box h2 {
    margin: 0 0 10px;

    font-size: 34px;
    font-weight: 900;
}

.start-auction-box p {
    max-width: 520px;
    margin: 0 0 26px;

    font-size: 14px;
    line-height: 1.6;

    opacity: 0.7;
}

#launchAuctionButton {
    min-width: 240px;
    padding: 16px 28px;

    border: none;
    border-radius: 8px;

    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;

    cursor: pointer;
}
.pre-arena-screen {
    display: none;
}
.arena-screen {
    display: none;
}
/* PULSANTE ENTRA NELL'ARENA */

#enterArenaButton {
    display: block;
    min-width: 260px;
    height: 54px;

    margin: 24px auto 0;
    padding: 0 28px;

    background: #d8b55b;
    border: 1px solid #d8b55b;
    border-radius: 7px;

    color: #111111;

    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.5px;

    cursor: pointer;

    transition: 0.2s ease;
}

#enterArenaButton:hover:not(:disabled) {
    background: #e4c66f;
    transform: translateY(-2px);
}

#enterArenaButton:disabled {
    background: #1b1b1b;
    border-color: #363636;
    color: #555555;

    cursor: not-allowed;
    opacity: 0.7;
}
/* =========================
   ARENA
========================= */

.arena-screen {
    display: none;
}

.arena-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;
    padding: 8px 14px;

    background: transparent;
    border: none;
    border-radius: 0;
}

.arena-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.arena-header > div:first-child > span {
    color: #d8b55b;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
}

.arena-header h2 {
    margin: 0;

    color: #ffffff;

    font-size: 26px;
    font-weight: 900;
}
/* INDIETRO ARENA */

.arena-back-button {
    width: fit-content;
    padding: 6px 10px;

    background: transparent;
    border: 1px solid #333333;
    border-radius: 5px;

    color: #777777;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.2px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.arena-back-button:hover {
    color: #d8b55b;
    border-color: #d8b55b;
    background: rgba(216, 181, 91, 0.06);

    transform: translateX(-2px);
}

.arena-status {
    padding: 9px 14px;

    background: rgba(57, 168, 102, 0.10);
    border: 1px solid #39a866;
    border-radius: 20px;

    color: #39a866;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
}
/* NAVIGAZIONE ARENA */

.arena-nav {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-bottom: 24px;
    padding: 6px;

    background: #121212;
    border: 1px solid #363636;
    border-radius: 8px;
}

.arena-nav button {
    flex: 1;

    padding: 13px 18px;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;

    color: #777777;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;

    cursor: pointer;
    transition: 0.2s ease;
}

.arena-nav button:hover {
    color: #d8b55b;
    background: #171717;
}

.arena-nav button.active {
    background: #d8b55b;
    border-color: #d8b55b;
    color: #111111;
}
/* SQUADRE ARENA */

.arena-teams-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 8px;

    margin-bottom: 0;
}

.arena-team-card {
    min-width: 0;
    min-height: 82px;
    padding: 14px 12px;

    background: #121212;
    border: 1px solid #444444;
    border-radius: 8px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    transition: 0.2s ease;
}

.arena-team-top {
    display: grid;
    grid-template-columns: 28px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 8px;

    margin-bottom: 11px;
}

.arena-team-buzzer {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    border: 1px solid #d8b55b;
    border-radius: 50%;

    color: #d8b55b;

    font-size: 11px;
    font-weight: 900;
}

.arena-team-name {
    overflow: hidden;

    color: #ffffff;

    font-size: 14px;
    font-weight: 900;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.arena-team-budget {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;

    color: #d8b55b;

    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.arena-team-roster {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px 8px;

    margin-top: 10px;
    padding-top: 10px;

    border-top: 1px solid #292929;
}

.arena-team-roster span {
    color: #b5b5b5;

    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}
/* BLOCCO SITUAZIONE SQUADRE */

.arena-teams-section {
    margin-top: 18px;
    padding: 18px;

    background: #101010;
    border: 1px solid #363636;
    border-radius: 10px;
}

.arena-teams-title {
    margin-bottom: 14px;

    color: #777777;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.8px;
}
/* TURNO DI CHIAMATA */

.arena-main {
    margin-top: 18px;
}

.arena-call-header {
    display: flex;
    align-items: center;
    gap: 24px;

    min-height: 74px;
    padding: 20px 26px;

    background:
        linear-gradient(
            90deg,
            rgba(216, 181, 91, 0.16),
            rgba(16, 16, 16, 0.96) 38%
        );

    border: 2px solid #d8b55b;
    border-radius: 10px;

    box-shadow:
        0 0 0 1px rgba(216, 181, 91, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.25);
}

.arena-call-label {
    color: #777777;

    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1.8px;
    white-space: nowrap;
}

.arena-call-team {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    flex: 1;
}

#arenaCallBuzzer {
    padding: 9px 13px;

    background: #d8b55b;
    border: 1px solid #d8b55b;
    border-radius: 6px;

    color: #111111;

    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
}

#arenaCallTeamName {
    color: #ffffff;

    font-size: 28px;
    font-weight: 900;
}

.arena-call-role {
    margin-left: auto;

    color: #d8b55b;

    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.2px;
}
/* SQUADRA CON TURNO DI CHIAMATA */

.arena-team-card.current-turn {
    background:
        linear-gradient(
            135deg,
            rgba(216, 181, 91, 0.20),
            #121212 65%
        );

    border: 2px solid #d8b55b;

    box-shadow:
        0 0 0 1px rgba(216, 181, 91, 0.10),
        0 0 18px rgba(216, 181, 91, 0.16);
}
/* RICERCA GIOCATORE ARENA */

.arena-player-search {
    margin-top: 14px;
    padding: 18px 22px;

    display: flex;
    align-items: center;
    gap: 18px;

    background: #101010;
    border: 1px solid #363636;
    border-radius: 10px;
}

.arena-search-label {
    min-width: 135px;

    color: #d8b55b;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

#arenaPlayerSearch {
    flex: 1;

    height: 58px;
    padding: 0 16px;

    background: #0b0b0b;
    border: 1px solid #404040;
    border-radius: 7px;

    color: #ffffff;

    font-size: 18px;
    font-weight: 700;

    outline: none;
}

#arenaPlayerSearch:focus {
    border-color: #d8b55b;
}

#arenaPlayerSearch::placeholder {
    color: #666666;
}
/* RISULTATI RICERCA - POSIZIONE */

.arena-player-search {
    position: relative;
}

.arena-search-results {
    position: absolute;

    top: calc(100% - 18px);
    left: 175px;
    right: 22px;

    z-index: 50;

    display: flex;
    flex-direction: column;

    background: #101010;

    border: 1px solid #3d3d3d;
    border-top: none;

    border-radius: 0 0 8px 8px;

    overflow: hidden;
}
/* RICERCA GIOCATORE - LAYOUT COMPATTO */

.arena-player-search {
    width: 50%;
    margin: 14px auto 0;

    padding: 16px 18px;

    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.arena-search-label {
    min-width: 0;
    font-size: 12px;
    text-align: left;
}

#arenaPlayerSearch {
    width: 100%;
    box-sizing: border-box;
}

.arena-search-results {
    top: calc(100% - 16px);
    left: 18px;
    right: 18px;
}
/* RISULTATI RICERCA GIOCATORE */

.arena-search-result {
    min-height: 52px;
    padding: 0 16px;

    display: grid;
    grid-template-columns: 48px 1fr 180px 80px;
    align-items: center;
    gap: 12px;

    background: #121212;
    border-bottom: 1px solid #303030;

    cursor: pointer;
}

.arena-search-result:last-child {
    border-bottom: none;
}

.arena-search-result:hover {
    background: #1c1a14;
}

.search-player-role {
    color: #d8b55b;
    font-size: 16px;
    font-weight: 900;
}

.search-player-name {
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
}

.search-player-team {
    color: #aaaaaa;
    font-size: 14px;
    font-weight: 700;
}

.search-player-quotation {
    color: #d8b55b;
    font-size: 15px;
    font-weight: 900;
    text-align: right;
}
/* =========================================================
   GIOCATORE CHIAMATO
========================================================= */

.arena-current-player {
    width: 58%;
    margin: 16px auto 0;
}

.arena-current-player:not(:empty) {
    min-height: 110px;
    padding: 18px 22px;

    display: grid;
    grid-template-columns: 65px minmax(220px, 1fr) 130px 170px;
    grid-template-rows: auto auto auto;

    align-items: center;
    gap: 20px;

    box-sizing: border-box;

    background: #121212;
    border: 2px solid #d8b55b;
    border-radius: 10px;
}


/* RUOLO */

.current-player-role {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    background: #d8b55b;
    border-radius: 8px;

    color: #111111;
    font-size: 22px;
    font-weight: 900;
}


/* NOME + SQUADRA */

.current-player-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.current-player-info strong {
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
}

.current-player-info span {
    color: #8f8f8f;
    font-size: 15px;
    font-weight: 700;
}


/* QUOTAZIONE */

.current-player-quotation {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.current-player-quotation span {
    color: #777777;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.current-player-quotation strong {
    color: #d8b55b;
    font-size: 24px;
    font-weight: 900;
}


/* BASE D'ASTA */

.current-player-base {
    padding-left: 20px;
    border-left: 1px solid #3b3b3b;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.current-player-base > span {
    color: #d8b55b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;
}

.current-player-base-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#arenaStartingPrice {
    width: 85px;
    height: 38px;

    box-sizing: border-box;

    background: #1c1c1c;
    border: 1px solid #555555;
    border-radius: 6px;

    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.current-player-base-controls > span {
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}


/* =========================================================
   TIMER RILANCIO
========================================================= */

.current-player-timer-setting {
    grid-column: 1 / -1;

    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-top: 4px;

    text-align: center;
}

.current-player-timer-setting > span {
    color: #777777;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

#arenaTimerDuration {
    min-width: 145px;
    height: 42px;

    padding: 0 14px;

    background: #111111;
    color: #d8b55b;

    border: 1px solid #3a3a3a;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 900;

    text-align: center;
    cursor: pointer;

    outline: none;
}

#arenaTimerDuration:focus {
    border-color: #d8b55b;
}


/* APRI ASTA */

.arena-open-auction-button {
    grid-column: 1 / -1;
    justify-self: center;

    min-width: 240px;
    height: 46px;

    margin-top: 0;
    padding: 0 30px;

    background: #d8b55b;
    border: none;
    border-radius: 7px;

    color: #111111;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;

    cursor: pointer;
}

.arena-open-auction-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}


/* =========================================================
   PONTOS ARENA — SCHERMATA ASTA LIVE
========================================================= */

.live-auction-screen {
    display: none;

    min-height: calc(100vh - 90px);

    padding: 18px 36px 30px;

    box-sizing: border-box;
}


/* HEADER LIVE */

.live-screen-header {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 12px;
    margin-bottom: 18px;

    border-bottom: 1px solid #303030;
}

.live-screen-header span {
    color: #d8b55b;

    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
}

.live-screen-header strong {
    color: #777777;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
}


/* CONTENITORE CENTRALE LIVE */

.live-auction-content {
    width: 100%;
    max-width: 1050px;

    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* GIOCATORE LIVE */

.live-player {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-top: 10px;
}

.live-player-role {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 11px;

    background: #d8b55b;
    border-radius: 10px;

    color: #111111;

    font-size: 25px;
    font-weight: 900;
}

.live-player-data {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.live-player-label {
    color: #8a8a8a;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2.2px;
}

.live-player-data h1 {
    margin: 5px 0 0;

    color: #ffffff;

    font-size: 58px;
    line-height: 1;
    font-weight: 900;

    text-align: center;
}

.live-player-data p {
    margin: 7px 0 0;

    color: #a0a0a0;

    font-size: 18px;
    font-weight: 700;
}


/* TIMER LIVE */

.live-timer-area {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-top: 24px;
}

.live-timer-area span {
    color: #8a8a8a;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2.2px;
}

#liveAuctionTimer {
    margin-top: 3px;

    color: #ffffff;

    font-size: 94px;
    line-height: 0.9;
    font-weight: 900;
}


/* OFFERTA + MIGLIOR OFFERENTE */

.live-offer-row {
    width: 100%;

    margin-top: 27px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 18px;
}

.live-current-offer,
.live-leader {
    width: 100%;
    min-height: 115px;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #111111;

    border: 1px solid #353535;
    border-radius: 12px;
}

.live-current-offer {
    border: 2px solid #d8b55b;
}

.live-current-offer > span,
.live-leader > span {
    color: #858585;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.live-current-offer > span {
    color: #d8b55b;
}

#liveCurrentPrice {
    margin-top: 4px;

    color: #ffffff;

    font-size: 46px;
    line-height: 0.95;
    font-weight: 900;
}

.live-current-offer small {
    margin-top: 5px;

    color: #858585;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

#liveLeaderTeam {
    margin-top: 9px;

    color: #d8b55b;

    font-size: 30px;
    line-height: 1;
    font-weight: 900;

    text-align: center;
}


/* DISPONIBILITÀ SQUADRE */

.live-teams-budgets {
    width: 100%;

    margin-top: 24px;
    padding-top: 18px;

    display: grid;
    grid-template-columns: repeat(5, 1fr);

    gap: 10px;

    border-top: 1px solid #303030;
}

.live-teams-budgets::before {
    content: "DISPONIBILITÀ SQUADRE";

    grid-column: 1 / -1;

    margin-bottom: 6px;

    color: #858585;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;

    text-align: center;
}


/* CARD SQUADRA LIVE */

.live-budget-team {
    min-width: 0;
    min-height: 72px;

    padding: 10px 12px;

    box-sizing: border-box;

    display: flex;
    align-items: center;

    gap: 10px;

    background: #111111;

    border: 1px solid #353535;
    border-radius: 9px;
}

.live-budget-buzzer {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #d8b55b;
    border-radius: 50%;

    color: #d8b55b;

    font-size: 14px;
    font-weight: 900;
}

.live-budget-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.live-budget-info strong {
    width: 100%;

    overflow: hidden;

    color: #ffffff;

    font-size: 14px;
    font-weight: 900;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.live-budget-info span {
    margin-top: 4px;

    color: #d8b55b;

    font-size: 16px;
    font-weight: 900;

    white-space: nowrap;
}
/* SQUADRA CON REPARTO COMPLETATO */

.live-budget-team.role-completed {
    background: rgba(57, 168, 102, 0.12);
    border-color: #39a866;
}

.live-budget-team.role-completed .live-budget-buzzer {
    border-color: #39a866;
    color: #39a866;
}

.live-budget-team.role-completed .live-budget-role {
    color: #39a866;
    font-weight: 900;
}

.live-budget-role {
    display: block;
    margin-top: 4px;

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;

    color: #777777;
}


/* SCHERMI PIÙ PICCOLI */

@media (max-width: 1100px) {

    .live-auction-content {
        max-width: 920px;
    }

    .live-player-data h1 {
        font-size: 50px;
    }

    #liveAuctionTimer {
        font-size: 82px;
    }

    .live-budget-team {
        padding: 9px;
    }

    .live-budget-info strong {
        font-size: 12px;
    }

    .live-budget-info span {
        font-size: 14px;
    }
}
/* =========================================================
   PONTOS ARENA — FINALE ASTA
========================================================= */

.live-auction-content.auction-finished {
    position: relative;

    min-height: calc(100vh - 130px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}


/* NASCONDE GLI ELEMENTI DELLA LIVE */

.live-auction-content.auction-finished .live-player,
.live-auction-content.auction-finished .live-timer-area,
.live-auction-content.auction-finished .live-offer-row,
.live-auction-content.auction-finished .live-teams-budgets {
    display: none;
}


/* BAGLIORE CENTRALE */

.live-auction-content.auction-finished::before {
    content: "";

    position: absolute;

    width: 650px;
    height: 650px;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    background:
        radial-gradient(
            circle,
            rgba(216, 181, 91, 0.16) 0%,
            rgba(216, 181, 91, 0.05) 35%,
            transparent 70%
        );

    pointer-events: none;

    animation: auctionGlow 1.2s ease-out;
}


/* RISULTATO */

.live-auction-result {
    position: relative;
    z-index: 2;

    width: min(760px, 90%);

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 45px 50px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(216, 181, 91, 0.08),
            rgba(12, 12, 12, 0.96) 45%
        );

    border: 2px solid #d8b55b;
    border-radius: 16px;

    box-shadow:
        0 0 45px rgba(216, 181, 91, 0.10),
        0 25px 70px rgba(0, 0, 0, 0.45);

    animation: auctionResultEnter 0.45s ease-out;
}


.live-result-label {
    color: #d8b55b;

    font-size: 20px;
    font-weight: 900;

    letter-spacing: 5px;
}


#liveResultPlayer {
    margin-top: 12px;

    color: #ffffff;

    font-size: clamp(46px, 6vw, 76px);
    line-height: 1;

    font-weight: 900;
}


.live-result-details {
    width: 100%;

    margin-top: 34px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 14px;
}


.live-result-details > div {
    min-height: 100px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #101010;

    border: 1px solid #353535;
    border-radius: 10px;
}


.live-result-details span {
    color: #777777;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 2px;
}


.live-result-details strong {
    margin-top: 8px;

    color: #d8b55b;

    font-size: 30px;
    font-weight: 900;
}


/* PULSANTI */

.live-auction-actions {
    position: relative;
    z-index: 2;

    margin-top: 22px;

    align-items: center;
    justify-content: center;

    gap: 12px;

    animation: auctionActionsEnter 0.55s ease-out;
}


.live-assign-button,
.live-cancel-button {
    min-width: 190px;
    height: 48px;

    padding: 0 24px;

    border-radius: 7px;

    font-size: 12px;
    font-weight: 900;

    letter-spacing: 1.3px;

    cursor: pointer;
}


.live-assign-button {
    background: #d8b55b;

    border: 1px solid #d8b55b;

    color: #111111;
}


.live-assign-button:hover {
    background: #e4c66f;

    transform: translateY(-1px);
}


.live-cancel-button {
    background: transparent;

    border: 1px solid #484848;

    color: #8d8d8d;
}


.live-cancel-button:hover {
    border-color: #777777;

    color: #ffffff;
}


/* ANIMAZIONI */

@keyframes auctionResultEnter {

    from {
        opacity: 0;
        transform: scale(0.90) translateY(18px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


@keyframes auctionActionsEnter {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes auctionGlow {

    0% {
        opacity: 0;
        transform:
            translate(-50%, -50%)
            scale(0.5);
    }

    45% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform:
            translate(-50%, -50%)
            scale(1);
    }
}
/* ========================= */
/* TRANSIZIONE FINE REPARTO  */
/* ========================= */

.role-completed-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at center,
            rgba(57, 168, 102, 0.12) 0%,
            rgba(10, 10, 10, 0.97) 55%
        );

    backdrop-filter: blur(8px);
}

.role-completed-content {
    width: min(680px, 85%);
    padding: 55px 45px;

    text-align: center;

    background: rgba(18, 18, 18, 0.96);

    border: 1px solid rgba(57, 168, 102, 0.65);
    border-radius: 18px;

    box-shadow:
        0 0 60px rgba(57, 168, 102, 0.12);

    animation: roleCompletedEnter 0.45s ease-out;
}

.role-completed-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin: 0 auto 22px;

    border: 2px solid #39a866;
    border-radius: 50%;

    color: #39a866;

    font-size: 28px;
    font-weight: 900;
}

.role-completed-label {
    color: #d8b55b;

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 3px;
}

.role-completed-content h1 {
    margin: 12px 0 8px;

    color: #ffffff;

    font-size: 38px;
    font-weight: 900;
    letter-spacing: 1px;
}

.role-completed-content p {
    margin: 0;

    color: #888888;

    font-size: 13px;
    font-weight: 700;
}

.role-completed-next {
    margin-top: 34px;
    padding-top: 22px;

    border-top: 1px solid #2b2b2b;

    color: #777777;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 2px;
}

.role-completed-next strong {
    display: block;

    margin-top: 7px;

    color: #d8b55b;

    font-size: 18px;
    letter-spacing: 2px;
}

@keyframes roleCompletedEnter {

    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

}
/* ========================= */
/* ROSE */
/* ========================= */

#squadsTabContent {
    padding: 22px 0 30px;
}

.squads-view-header {
    margin-bottom: 22px;
}

.squads-view-header > span {
    display: block;

    color: #d8b55b;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1.5px;

    margin-bottom: 5px;
}

.squads-view-header h3 {
    margin: 0;

    color: #ffffff;

    font-size: 22px;
    font-weight: 900;
}

.squads-view-header p {
    margin: 5px 0 0;

    color: #8d8d8d;

    font-size: 12px;
}


/* GRIGLIA SQUADRE */

.squads-overview {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;
}


/* CARD */

.squad-overview-card {
    position: relative;

    display: grid;

    grid-template-columns: 38px 1fr;
    grid-template-rows: auto auto auto;

    gap: 12px;

    padding: 18px;

    background: #242424;

    border: 1px solid #454545;
    border-radius: 9px;
}


/* NUMERO BUZZER */

.squad-overview-buzzer {
    grid-row: 1 / 3;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border: 1px solid #d8b55b;
    border-radius: 50%;

    color: #d8b55b;

    font-size: 13px;
    font-weight: 900;
}


/* NOME + CREDITI */

.squad-overview-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.squad-overview-info strong {
    color: #ffffff;

    font-size: 16px;
    font-weight: 900;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.squad-overview-info span {
    color: #d8b55b;

    font-size: 14px;
    font-weight: 900;

    white-space: nowrap;
}


/* COMPOSIZIONE ROSA */

.squad-overview-roster {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 6px;
}

.squad-overview-roster span {
    padding: 7px 5px;

    background: #1b1b1b;

    border: 1px solid #383838;
    border-radius: 5px;

    color: #cfcfcf;

    text-align: center;

    font-size: 11px;
    font-weight: 800;
}


/* VEDI ROSA */

.squad-view-button {
    grid-column: 1 / -1;

    height: 38px;

    background: transparent;

    border: 1px solid #555555;
    border-radius: 6px;

    color: #d8b55b;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1px;

    cursor: pointer;
}

.squad-view-button:hover {
    background: #d8b55b;

    border-color: #d8b55b;

    color: #111111;
}
/* ========================= */
/* DETTAGLIO ROSA */
/* ========================= */

.squad-detail {
    padding: 4px 0 30px;
}

.squad-detail-back {
    margin-bottom: 18px;
    padding: 0;
    background: transparent;
    border: none;
    color: #8d8d8d;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
}

.squad-detail-back:hover {
    color: #d8b55b;
}

.squad-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 20px 22px;

    background: #242424;
    border: 1px solid #454545;
    border-radius: 9px;
}

.squad-detail-header > div {
    min-width: 0;
}

.squad-detail-header span {
    display: block;
    margin-bottom: 5px;

    color: #d8b55b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.3px;
}

.squad-detail-header h2 {
    margin: 0;

    color: #ffffff;
    font-size: 24px;
    font-weight: 900;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.squad-detail-header > strong {
    flex-shrink: 0;

    padding: 9px 13px;

    background: #1b1b1b;
    border: 1px solid #4b4b4b;
    border-radius: 6px;

    color: #d8b55b;
    font-size: 16px;
    font-weight: 900;
}
/* ========================= */
/* DETTAGLIO ROSA - REPARTI */
/* ========================= */

.squad-detail-identity small {
    display: block;
    margin-top: 7px;

    color: #858585;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.squad-detail-budget {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: end;

    min-width: 105px;
    padding: 11px 14px;

    background: #1b1b1b;
    border: 1px solid #454545;
    border-radius: 7px;

    text-align: right;
}

.squad-detail-budget span {
    grid-column: 1 / -1;

    margin-bottom: 3px;

    color: #777777;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
}

.squad-detail-budget strong {
    color: #d8b55b;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.squad-detail-budget small {
    margin-left: 4px;

    color: #d8b55b;
    font-size: 10px;
    font-weight: 900;
}

.squad-role-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
    margin-top: 14px;
}

.squad-role-section {
    overflow: hidden;

    background: #242424;
    border: 1px solid #454545;
    border-radius: 9px;
}

.squad-role-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 42px;
    padding: 0 15px;

    background: #1d1d1d;
    border-bottom: 1px solid #3b3b3b;
}

.squad-role-header strong {
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
}

.squad-role-header span {
    min-width: 38px;
    padding: 4px 7px;

    background: #292929;
    border: 1px solid #414141;
    border-radius: 4px;

    color: #d8b55b;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
}

.squad-role-players {
    padding: 7px 12px;
}

.squad-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    min-height: 43px;
    padding: 7px 3px;

    border-bottom: 1px solid #343434;
}

.squad-player-row:last-child {
    border-bottom: none;
}

.squad-player-main {
    min-width: 0;
}

.squad-player-main strong {
    display: block;

    overflow: hidden;

    color: #ffffff;
    font-size: 16px;
    font-weight: 900;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.squad-player-main span {
    display: block;
    margin-top: 2px;

    color: #7f7f7f;
    font-size: 12px;
    font-weight: 700;
}

.squad-player-price {
    flex-shrink: 0;

    color: #d8b55b;
    font-size: 14px;
    font-weight: 900;
}

.squad-empty-role {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 58px;

    color: #666666;
    font-size: 10px;
    font-weight: 700;
}
/* ========================= */
/* GIOCATORI */
/* ========================= */

#playersTabContent {
    padding: 22px 0 30px;
}

.players-view-header {
    margin-bottom: 18px;
}

.players-view-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.players-view-header p {
    margin: 5px 0 0;
    color: #8d8d8d;
    font-size: 12px;
}


/* BARRA STRUMENTI */

.players-toolbar {
    margin-bottom: 16px;
    padding: 14px;

    background: #242424;
    border: 1px solid #454545;
    border-radius: 9px;
}


/* RICERCA */

.players-search {
    margin-bottom: 12px;
}

.players-search input {
    width: 100%;
    height: 42px;
    box-sizing: border-box;

    padding: 0 14px;

    background: #1b1b1b;
    border: 1px solid #444444;
    border-radius: 6px;

    color: #ffffff;
    font-size: 13px;
    font-weight: 700;

    outline: none;
}

.players-search input::placeholder {
    color: #666666;
}

.players-search input:focus {
    border-color: #d8b55b;
}


/* FILTRI */

.players-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.players-role-filters,
.players-status-filters {
    display: flex;
    gap: 6px;
}


/* PULSANTI FILTRO */

.player-filter,
.player-status-filter {
    height: 32px;
    padding: 0 12px;

    background: #1b1b1b;
    border: 1px solid #414141;
    border-radius: 5px;

    color: #8d8d8d;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;

    cursor: pointer;
}

.player-filter:hover,
.player-status-filter:hover {
    border-color: #666666;
    color: #ffffff;
}

.player-filter.active,
.player-status-filter.active {
    background: #d8b55b;
    border-color: #d8b55b;
    color: #111111;
}
/* ========================= */
/* LISTA GIOCATORI */
/* ========================= */

#playersOverview {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.players-overview-row {
    display: grid;
    grid-template-columns: 42px 1fr 110px 150px;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 8px 14px;
    background: #242424;
    border: 1px solid #3d3d3d;
    border-radius: 7px;
}

.players-overview-role {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #1a1a1a;
    border: 1px solid #d8b55b;
    border-radius: 5px;
    color: #d8b55b;
    font-size: 13px;
    font-weight: 900;
}

.players-overview-player {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.players-overview-player strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.players-overview-player span {
    color: #888888;
    font-size: 11px;
    font-weight: 700;
}

.players-overview-quotation {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.players-overview-quotation span {
    color: #777777;
    font-size: 10px;
    font-weight: 900;
}

.players-overview-quotation strong {
    color: #ffffff;
    font-size: 15px;
}

.players-overview-status {
    justify-self: end;
    font-size: 10px;
    font-weight: 900;
}

.players-overview-status.available {
    font-size: 13px;
    color: #66c98b;
}

.players-overview-status.assigned {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.players-overview-status.assigned strong {
    color: #d8b55b;
    font-size: 13px;
}

.players-overview-status.assigned span {
    color: #999999;
    font-size: 13px;
}
/* ASSEGNAZIONE DIRETTA */

.arena-direct-assign-button {
    display: block;
    width: 100%;
    height: 36px;
    margin-top: 8px;

    background: transparent;
    border: 1px solid #d8b55b;
    border-radius: 6px;

    color: #d8b55b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.6px;

    cursor: pointer;
}
.arena-direct-assign-button:hover {
    background: #d8b55b;
    color: #111111;
}


#arenaDirectAssignPanel {
    grid-column: 1 / -1;
justify-self: center;
width: 316px;
    margin-top: 10px;
    padding: 12px;

    background: #1b1b1b;
    border: 1px solid #3f3f3f;
    border-radius: 7px;

}


#arenaDirectAssignTeam,
#arenaDirectAssignPrice {
    height: 38px;
    box-sizing: border-box;

    background: #242424;
    border: 1px solid #494949;
    border-radius: 5px;

    color: #ffffff;
    font-size: 12px;
    font-weight: 800;

    outline: none;
}


#arenaDirectAssignTeam {
    width: 65%;
    padding: 0 10px;
}


#arenaDirectAssignPrice {
    width: calc(35% - 6px);
    margin-left: 6px;
    padding: 0 10px;
}


#arenaDirectAssignTeam:focus,
#arenaDirectAssignPrice:focus {
    border-color: #d8b55b;
}


#arenaDirectAssignConfirm {
    width: 100%;
    height: 38px;
    margin-top: 8px;

    background: #d8b55b;
    border: none;
    border-radius: 5px;

    color: #111111;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5px;

    cursor: pointer;
}


#arenaDirectAssignConfirm:hover {
    filter: brightness(1.08);
}
.arena-auction-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 340px;

    grid-column: 1 / -1;
    justify-self: center;

    margin-left: auto;
    margin-right: auto;
}

.arena-auction-actions .arena-open-auction-button,
.arena-auction-actions .arena-direct-assign-button {
    position: static;
    width: 100%;
    margin: 0;
}

.arena-auction-actions .arena-direct-assign-button {
    height: 36px;
    white-space: nowrap;
}
/* ===================================
   PONTOS ARENA - ASTA COMPLETATA
=================================== */

.auction-completed-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(9, 11, 13, 0.97);
    padding: 24px;
    box-sizing: border-box;
}

.auction-completed-content {
    width: 100%;
    max-width: 700px;
    padding: 48px 36px;
    box-sizing: border-box;

    text-align: center;
    background: #191b1e;
    border: 1px solid #b9984b;
    border-radius: 16px;

    box-shadow: 0 0 65px rgba(216, 181, 91, 0.10);
}

.auction-completed-icon {
    font-size: 58px;
    margin-bottom: 18px;
}

.auction-completed-label {
    color: #d8b55b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 12px;
}

.auction-completed-content h1 {
    color: #ffffff;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0 0 18px;
}

.auction-completed-subtitle {
    color: #aeb2b7;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 36px;
}

.auction-completed-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}

.auction-completed-stats > div {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 10px;

    background: #23262a;
    border: 1px solid #373b40;
    border-radius: 9px;
}

.auction-completed-stats span {
    color: #aeb2b7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.auction-completed-stats strong {
    color: #d8b55b;
    font-size: 30px;
    font-weight: 900;
}

.confirm-auction-completion {
    width: 100%;
    max-width: 360px;
    height: 52px;

    background: #d8b55b;
    color: #111111;
    border: none;
    border-radius: 8px;

    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: 0.2s;
}

.confirm-auction-completion:hover {
    background: #f0ce76;
}

@media (max-width: 600px) {
    .auction-completed-content {
        padding: 32px 18px;
    }

    .auction-completed-content h1 {
        font-size: 28px;
    }

    .auction-completed-stats {
        gap: 6px;
    }

    .auction-completed-stats > div {
        padding: 16px 5px;
    }

    .auction-completed-stats strong {
        font-size: 23px;
    }

    .auction-completed-stats span {
        font-size: 9px;
    }
}

/* Initial auction history: reuse roster cards and the existing gold palette. */
.initial-history-screen { max-width: 1000px; margin: 0 auto; padding: 28px 24px; }
.initial-history-screen[hidden] { display: none; }
.initial-history-screen .history-date { color: #b8b8b8; margin: 12px 0 24px; }
.initial-history-screen .squad-detail-header { flex-wrap: wrap; }
.initial-history-screen h2, .initial-history-screen .squad-player-main { overflow-wrap: anywhere; }
.initial-history-button { white-space: normal; }
.current-auction-card:has(.initial-history-button) { flex-wrap: wrap; }
@media (max-width: 600px) {
    .initial-history-screen { padding: 20px 12px; }
    .initial-history-screen .squad-detail-header { padding: 16px; }
    .initial-history-screen .squad-player-price { flex-shrink: 0; }
    .current-auction-card:has(.initial-history-button) { padding: 20px 16px; }
}

/* Repair preparation uses the existing history and roster components. */
.repair-note { color: #b8b8b8; margin: 18px 0; line-height: 1.6; }
.current-auction-card:has(.repair-note) { flex-wrap: wrap; }
.repair-team-card { margin: 16px 0; }
.repair-team-card p { color: #b8b8b8; margin-top: 10px; line-height: 1.6; }
.repair-future { margin-top: 28px; }
.repair-future ul { padding: 20px 36px; color: #b8b8b8; line-height: 2; }

/* Read-only repair list preview. */
.repair-import-section { margin-top: 28px; }
.repair-import-body { padding: 18px; color: #b8b8b8; line-height: 1.6; }
.repair-import-body label { display: block; margin: 16px 0 8px; color: #ffffff; }
.repair-import-body input { max-width: 100%; }
#repairListPreview { margin-top: 20px; overflow-wrap: anywhere; }
#repairListPreview h3, #repairListPreview h4 { color: #d8b55b; margin: 16px 0 8px; }
#repairListPreview ul { padding-left: 22px; }
.repair-preview-outcome { font-weight: bold; color: #ffffff; }
.repair-preview-player { border-top: 1px solid #343434; padding: 12px 0; }
#repairListPreview summary { cursor: pointer; color: #d8b55b; margin: 18px 0; }

.repair-import-body input::file-selector-button {
    background: #d8b55b; color: #111111; border: none; border-radius: 6px;
    padding: 12px 16px; margin-right: 10px; font: inherit; font-weight: bold; cursor: pointer;
}

#confirmRepairListImport[hidden] { display: none; }
#confirmRepairListImport { max-width: 100%; white-space: normal; margin-top: 18px; }

/* Auction backup uses the existing menu and repair cards. */
.current-auction-card:has(.auction-backup-button) { flex-wrap: wrap; gap: 12px; }
#auctionRestorePanel[hidden], #confirmAuctionRestore[hidden] { display: none; }
#auctionRestorePreview { white-space: pre-line; overflow-wrap: anywhere; }
#auctionRestorePanel button, .auction-backup-button { max-width: 100%; white-space: normal; }

#auctionRestorePanel { width: calc(100% - 24px); max-width: 900px; margin: 28px auto; box-sizing: border-box; }
.auctions-actions:has(#restoreBackupMenuButton) { flex-wrap: wrap; gap: 12px; align-items: center; padding: 0 12px; }

/* Extra credits reuse the preparation cards and existing colors. */
.extra-credit-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.extra-credit-fields input, .extra-credit-fields select { box-sizing: border-box; width: 100%; max-width: 100%; padding: 12px; border: 1px solid #343434; border-radius: 6px; background: #111111; color: #ffffff; font: inherit; }
#extraCreditsSection h3 { margin-top: 24px; color: #d8b55b; }
#extraCreditRegister { overflow-wrap: anywhere; }
#confirmExtraCredit { max-width: 100%; white-space: normal; }
@media (max-width: 600px) { .extra-credit-fields { grid-template-columns: 1fr; } }

#initialReviewScreen[hidden] { display: none; }
.initial-review-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; }
.initial-review-row input, #initialReviewTeam { padding: 12px; border: 1px solid #343434; border-radius: 6px; background: #111111; color: #ffffff; font: inherit; max-width: 100%; box-sizing: border-box; }
.initial-review-row input { width: 100px; }
#openInitialReview { margin-bottom: 12px; }

.initial-adjustment-form[hidden] { display: none; }
.initial-adjustment-form input { box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid #343434; border-radius: 6px; background: #111111; color: #ffffff; font: inherit; }
.initial-adjustment-form button { max-width: 100%; white-space: normal; }

/* Auction menu: one primary action, secondary commands in a native disclosure. */
#auctionsScreen .auction-menu-heading { max-width: 900px; margin: 44px auto 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 12px; }
#auctionsScreen .auction-menu-heading .setup-header { text-align: left; margin: 0; }
#auctionsScreen .auction-menu-heading h2 { margin-bottom: 10px; }
#auctionsScreen .current-auction-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 24px; margin-bottom: 16px; position: relative; overflow: visible; }
#auctionsScreen .current-auction-info { min-width: 0; }
#auctionsScreen .current-auction-info strong { overflow-wrap: anywhere; }
#auctionsScreen .current-auction-info .auction-state { display: inline-block; align-self: flex-start; margin-top: 10px; padding: 6px 9px; border-radius: 5px; background: rgba(216,181,91,.09); color: #d8b55b; font-size: 10px; letter-spacing: .6px; line-height: 1.5; }
#auctionsScreen .current-auction-info .auction-team-count { color: #8d8d8d; font-size: 11px; margin-top: 9px; }
#auctionsScreen .current-auction-card > .auction-continue-button { max-width: 265px; white-space: normal; line-height: 1.5; height: auto; min-height: 46px; }
.auction-options { position: relative; align-self: center; }
.auction-options summary { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; list-style: none; cursor: pointer; border: 1px solid #343434; border-radius: 6px; color: #b8b8b8; background: #171717; font-size: 26px; }
.auction-options summary::-webkit-details-marker { display: none; }
.auction-options summary:hover, .auction-options[open] summary { border-color: #d8b55b; color: #d8b55b; }
.auction-options-panel { position: absolute; right: 0; top: 50px; z-index: 30; width: 235px; max-width: calc(100vw - 48px); padding: 6px; background: #202020; border: 1px solid #45413a; border-radius: 8px; box-shadow: 0 12px 36px #0009; }
#auctionsScreen .auction-options-panel button { display: block; width: 100%; max-width: none; margin: 0; border: 0; border-radius: 4px; padding: 12px; height: auto; min-height: 44px; background: transparent; color: #d0d0d0; font: inherit; font-size: 12px; text-align: left; letter-spacing: .4px; cursor: pointer; white-space: normal; }
#auctionsScreen .auction-options-panel button:hover { background: #303030; color: #ffffff; }
#auctionsScreen .auction-options-panel .auction-delete-button { color: #e19a92; border-top: 1px solid #343434; }
.auction-options summary:focus-visible, .auction-options-panel button:focus-visible { outline: 2px solid #d8b55b; outline-offset: 3px; }
#auctionsScreen .current-auction-card > .repair-note { grid-column: 1 / -1; margin: 0; font-size: 12px; }
#auctionsScreen .auctions-actions { margin-top: 26px; }
#restoreBackupMenuButton { background: transparent; color: #a5a5a5; border: 1px solid #343434; }
#restoreBackupMenuButton:hover { border-color: #d8b55b; color: #d8b55b; background: transparent; }
@media (max-width: 640px) {
    #auctionsScreen .auction-menu-heading { flex-direction: column; align-items: stretch; margin-top: 28px; gap: 18px; }
    #auctionsScreen .auction-menu-heading h2 { font-size: 32px; }
    #auctionsScreen .auction-menu-heading #newAuctionButton { width: 100%; }
    #auctionsScreen .current-auction-card { margin: 0 12px 14px; padding: 20px 16px; grid-template-columns: minmax(0, 1fr) 42px; gap: 16px; }
    #auctionsScreen .current-auction-card > .auction-continue-button { grid-column: 1 / -1; grid-row: 2; width: 100%; max-width: none; }
    .auction-options { grid-column: 2; grid-row: 1; align-self: start; }
    #auctionsScreen .current-auction-card > .repair-note { grid-row: 3; }
}

#auctionsScreen .current-auction-card:has(.auction-options[open]) { z-index: 40; transform: none; }

#playerReleasesSection h3, #releaseRoster h4, #playerReleasesSection summary { color: #d8b55b; margin-top: 18px; }
#playerReleasesSection summary { cursor: pointer; }
#releaseRegister, #releasePreview { overflow-wrap: anywhere; }
#confirmPlayerRelease { max-width: 100%; white-space: normal; }
#confirmPlayerRelease:disabled { opacity: .45; cursor: not-allowed; }
#releaseRegister { max-height: 420px; overflow-y: auto; padding-right: 8px; }
#releaseRegister:focus-visible { outline: 2px solid #d8b55b; outline-offset: 3px; }

/* Compact repair preparation; styles are scoped to this screen. */
#repairPreparationScreen .setup-header { margin: 20px 0 14px; }
#repairPreparationScreen .setup-header h2 { font-size: 36px; }
#repairPreparationScreen .repair-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
#repairPreparationScreen .repair-toolbar .repair-note { margin: 0; font-size: 12px; }
#repairPreparationOverview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.repair-overview-item { background: #1c1c1c; border: 1px solid #343434; border-radius: 7px; padding: 12px; display: flex; align-items: center; gap: 10px; }
.repair-overview-item strong { color: #d8b55b; font-size: 24px; }
.repair-overview-item span { color: #b8b8b8; font-size: 12px; }
#repairPreparationContent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
#repairPreparationScreen .repair-team-card { display: block; position: relative; margin: 0; padding: 16px; min-width: 0; }
#repairPreparationScreen .repair-team-card h2 { font-size: 18px; line-height: 1.4; padding-right: 145px; margin: 0 0 12px; }
#repairPreparationScreen .repair-team-counts { font-size: 12px; line-height: 1.7; margin: 0; }
#repairPreparationScreen .repair-team-budget { position: absolute; top: 16px; right: 16px; white-space: nowrap; font-size: 12px; padding: 7px 9px; }
#repairPreparationScreen .repair-budget-details { margin-top: 10px; }
#repairPreparationScreen .repair-budget-details summary { color: #b8b8b8; font-size: 12px; cursor: pointer; }
#repairPreparationScreen .repair-budget-details p { font-size: 12px; line-height: 1.7; margin: 8px 0 0; overflow-wrap: anywhere; }
#repairPreparationScreen .repair-import-section { margin-top: 18px; }
#repairPreparationScreen .repair-import-body { padding: 16px; }
#repairPreparationScreen .repair-import-body label { margin: 10px 0 6px; }
#repairListSection #lastRepairListImport { margin: 0 0 10px; font-size: 12px; overflow-wrap: anywhere; }
#repairListSection #repairListPreview { margin-top: 10px; font-size: 12px; }
#repairListSection #repairListPreview h3 { font-size: 14px; margin: 8px 0; }
#repairListSection #repairListPreview summary { margin: 8px 0; }
#repairListSection #repairListPreview .repair-preview-outcome { margin: 6px 0; }
#repairOperations { margin-top: 18px; }
.repair-tabs { display: flex; gap: 6px; padding: 6px; border: 1px solid #343434; background: #171717; border-radius: 8px; }
.repair-tabs button { flex: 1; min-width: 0; padding: 12px 8px; border: 0; border-radius: 5px; color: #b8b8b8; background: transparent; font: inherit; font-size: 12px; font-weight: bold; cursor: pointer; }
.repair-tabs button[aria-selected="true"] { background: #d8b55b; color: #111111; }
.repair-tabs button:focus-visible, .repair-budget-details summary:focus-visible { outline: 2px solid #d8b55b; outline-offset: 3px; }
#repairOperations [role="tabpanel"][hidden] { display: none; }
#repairOperations .repair-import-section { margin-top: 10px; }
#repairOperations [role="tabpanel"] > .squad-role-header { display: none; }
#repairOperations .repair-note { margin: 12px 0; font-size: 13px; }
#repairOperations .repair-import-body > p:first-child { font-size: 12px; }
.repair-registers-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.repair-registers-grid > div { min-width: 0; }
#repairRegistersSection h3 { color: #d8b55b; font-size: 14px; margin: 0 0 10px; }
#repairRegistersSection #extraCreditRegister, #repairRegistersSection #releaseRegister { max-height: 420px; overflow-y: auto; overflow-wrap: anywhere; padding-right: 8px; font-size: 12px; }
#repairPreparationScreen .repair-future { margin-top: 16px; border: 1px solid #343434; border-radius: 6px; }
#repairPreparationScreen .repair-future > summary { cursor: pointer; color: #b8b8b8; padding: 12px; font-size: 12px; }
#repairPreparationScreen .repair-future ul { padding: 8px 30px 14px; font-size: 12px; }
@media (max-width: 640px) {
    #repairPreparationContent { grid-template-columns: 1fr; }
    #repairPreparationScreen .setup-header h2 { font-size: 28px; }
    .repair-overview-item { flex-direction: column; gap: 3px; padding: 10px 6px; }
    .repair-overview-item span { font-size: 11px; text-align: center; }
    #repairPreparationScreen .repair-team-card h2 { padding-right: 140px; }
    .repair-tabs button { font-size: 10px; padding: 12px 4px; white-space: nowrap; }
    .repair-registers-grid { grid-template-columns: 1fr; }
}

#repairPreparationScreen .repair-roster-meta { display: block; color: #aaa; font-size: 11px; margin-bottom: 8px; }
#repairPreparationScreen .repair-role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#repairPreparationScreen .repair-role-grid > span { padding: 5px 3px; border-radius: 4px; background: #191919; text-align: center; }
#repairPreparationScreen .repair-role-grid b { display: block; color: #d0d0d0; font-size: 12px; }
#repairPreparationScreen .repair-role-grid small { display: block; color: #969696; font-size: 10px; white-space: nowrap; }

/* Final repair checks use the existing cards, typography and gold buttons. */
#repairVerificationScreen .setup-header { margin: 20px 0; }
#repairVerificationScreen .setup-header h2 { font-size: 32px; }
#repairVerificationContent .repair-import-section { padding: 16px; margin: 16px 0; }
#repairVerificationContent h3 { color: #d4af37; font-size: 17px; margin-bottom: 10px; }
#repairVerificationContent p, #repairVerificationContent li { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#repairVerificationContent h4 { font-size: 13px; margin-top: 12px; }
#repairVerificationContent ul { padding-left: 20px; }
#repairVerificationContent .repair-check-result[data-outcome="BLOCCANTE"] { border-color: #b65050; }
#repairVerificationContent .repair-check-result[data-outcome="BLOCCANTE"] h3 { color: #f08080; }
.repair-check-roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.repair-check-roles strong { background: #191919; border-radius: 4px; padding: 10px; text-align: center; color: #d4af37; }
.repair-check-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#repairVerificationContent .repair-check-team { display: block; min-width: 0; margin: 0; padding: 16px; }
.repair-check-budget { display: grid; grid-template-columns: minmax(0, 1fr) auto; font-size: 12px; gap: 6px 12px; margin-top: 12px; }
.repair-check-budget dd { text-align: right; color: #d4af37; margin: 0; }
@media (max-width: 640px) {
    .repair-check-teams { grid-template-columns: 1fr; }
    #repairVerificationScreen .setup-header h2 { font-size: 24px; }
}

#repairFinalContent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#repairFinalContent > section { padding: 16px; margin: 0; min-width: 0; }
#repairFinalContent h3 { color: #d4af37; font-size: 16px; overflow-wrap: anywhere; }
#repairFinalContent h4 { margin-top: 12px; color: #d4af37; }
#repairFinalContent p { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
@media (max-width: 640px) { #repairFinalContent { grid-template-columns: 1fr; } }

@media (max-width: 640px) {
    .repair-live-session #arenaScreen .arena-teams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .repair-live-session #arenaScreen .arena-call-header { flex-wrap: wrap; gap: 12px; padding: 14px; }
    .repair-live-session #arenaScreen .arena-call-role { min-width: 0; font-size: 14px; }
    .repair-live-session #arenaScreen .arena-player-search, .repair-live-session #arenaScreen .arena-current-player { width: calc(100% - 24px); box-sizing: border-box; }
    .repair-live-session #arenaScreen .arena-search-result { grid-template-columns: 32px minmax(0, 1fr); padding: 12px; }
    .repair-live-session #arenaScreen .arena-current-player:not(:empty) { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 12px; }
    .repair-live-session #arenaScreen .arena-auction-actions { flex-wrap: wrap; width: 100%; }
    .repair-live-session #arenaScreen #arenaDirectAssignPanel { width: 100%; box-sizing: border-box; }
    .repair-live-session #arenaScreen .current-player-info strong { font-size: 20px; overflow-wrap: anywhere; }
    .repair-live-session #arenaScreen .arena-current-player > div { min-width: 0; }
    .repair-live-session #arenaScreen .arena-header h2 { font-size: 18px; overflow-wrap: anywhere; }
    .repair-live-session #liveAuctionScreen .live-teams-budgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Compact, read-only official roster export. */
.roster-pdf-panel { border: 1px solid #454545; border-radius: 8px; padding: 14px; margin: 16px 0; }
.roster-pdf-panel > summary { color: #d8b55b; font-weight: bold; cursor: pointer; }
.roster-pdf-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.roster-pdf-controls select { max-width: 100%; min-width: 0; padding: 10px; background: #242424; color: #fff; border: 1px solid #494949; border-radius: 5px; }
.roster-pdf-controls p { flex-basis: 100%; margin: 0; }
@media (max-width: 640px) { .roster-pdf-controls { flex-direction: column; align-items: stretch; } }

/* Show Mode: presentation only, shared by initial and repair auctions. */
@media (min-width: 1024px) {
#liveAuctionScreen { position: fixed; inset: 0; z-index: 50; height: 100dvh; min-height: 0; padding: 18px 30px; background: radial-gradient(ellipse at 10% 10%, #30271855, transparent 42%), radial-gradient(ellipse at 92% 25%, #ac85361c, transparent 38%), linear-gradient(145deg,#090a0d,#161619 65%,#090a0d); }
#liveAuctionScreen::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg,transparent 20%,#dfb86509 21%,transparent 35%),linear-gradient(245deg,transparent 20%,#dfb86508 21%,transparent 35%); }
#liveAuctionScreen .live-screen-header { height: 50px; margin: 0 0 16px; padding: 0 0 10px; box-sizing: border-box; }
#liveAuctionScreen .live-brand { display: flex; align-items: center; gap: 14px; }
#liveAuctionScreen .live-brand img { width: 38px; height: 38px; object-fit: contain; }
#liveAuctionScreen .live-brand strong { font-size: 23px; color: #e2c271; letter-spacing: 2px; }
#liveAuctionScreen .live-screen-header > span { font-size: 18px; }
#liveAuctionContent { position: relative; max-width: none; height: calc(100% - 66px); display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: minmax(0,1fr) minmax(150px,27vh) 64px; gap: 16px 24px; margin: 0; align-items: stretch; }
#liveAuctionContent .live-player { display: grid; grid-template-columns: minmax(120px,35%) minmax(0,1fr); grid-template-rows: 54px minmax(0,1fr); align-items: center; gap: 12px 24px; margin: 0; padding: 20px; border: 1px solid #b08c403d; border-radius: 12px; background: linear-gradient(120deg,#22202466,#10111599); min-width: 0; }
#liveAuctionContent .live-player-portrait { grid-row: 1 / -1; height: 100%; min-height: 0; position: relative; display: flex; align-items: end; background: radial-gradient(ellipse at 50% 45%,#b8913935,transparent 70%); border-bottom: 2px solid #a98a4b; }
#liveAuctionContent .live-player-portrait svg { width: 100%; height: 100%; max-height: 470px; filter: drop-shadow(0 0 12px #c4992b20); }
#liveAuctionContent .live-player-role { margin: 0; width: 50px; height: 50px; font-size: 28px; }
#liveAuctionContent .live-player-data { align-items: start; gap: 14px; min-width: 0; }
#liveAuctionContent .live-player-label { font-size: 14px; color: #b4ad9d; }
#liveAuctionContent .live-player-data h1 { font-size: clamp(32px,3.2vw,62px); line-height: 1.08; text-align: left; margin: 0; color: #f4f0e5; overflow-wrap: anywhere; }
#liveAuctionContent .live-player-data p { font-size: clamp(22px,1.7vw,32px); margin: 0; color: #c7c3b8; }
#liveAuctionContent .live-auction-stage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0,1fr) minmax(88px,.55fr); gap: 14px; min-width: 0; }
#liveAuctionContent .live-timer-area { grid-column: 2; grid-row: 1; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #85807355; border-radius: 12px; background: #131416bb; }
#liveAuctionContent .live-timer-area > span { font-size: 16px; }
#liveAuctionContent #liveAuctionTimer { font-size: clamp(66px,6.5vw,124px); line-height: 1.1; margin-top: 12px; font-variant-numeric: tabular-nums; color: #f6f1e5; }
#liveAuctionContent .live-offer-row { display: contents; }
#liveAuctionContent .live-current-offer { grid-column: 1; grid-row: 1; margin: 0; min-height: 0; width: auto; padding: 14px; border: 1px solid #d8b55b88; background: linear-gradient(145deg,#b8902520,#141414); border-radius: 12px; }
#liveAuctionContent #liveCurrentPrice { font-size: clamp(72px,6.7vw,128px); line-height: 1.1; color: #e6c165; font-variant-numeric: tabular-nums; }
#liveAuctionContent .live-current-offer > span, #liveAuctionContent .live-leader > span { font-size: 14px; }
#liveAuctionContent .live-current-offer small { font-size: 16px; color: #c1b795; }
#liveAuctionContent .live-leader { grid-column: 1 / -1; grid-row: 2; margin: 0; width: auto; min-height: 0; padding: 12px; border: 1px solid #53504a; border-radius: 12px; background: #161719; gap: 8px; }
#liveAuctionContent #liveLeaderTeam { font-size: clamp(24px,2.1vw,40px); line-height: 1.1; overflow-wrap: anywhere; }
#liveAuctionContent .live-teams-budgets { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); grid-auto-rows: minmax(0,1fr); gap: 10px; margin: 0; width: 100%; padding-top: 24px; min-height: 0; position: relative; box-sizing: border-box; }
#liveAuctionContent .live-teams-budgets::before { position: absolute; top: 0; left: 0; right: 0; font-size: 12px; margin: 0; }
#liveAuctionContent .live-budget-team { min-height: 0; padding: 8px 12px; gap: 12px; border-radius: 9px; }
#liveAuctionContent .live-budget-buzzer { width: 42px; height: 42px; flex-shrink: 0; font-size: 24px; }
#liveAuctionContent .live-budget-info { min-width: 0; }
#liveAuctionContent .live-budget-info strong { font-size: clamp(17px,1.25vw,24px); overflow-wrap: anywhere; line-height: 1.1; }
#liveAuctionContent .live-budget-info span { font-size: clamp(22px,1.6vw,30px); }
#liveAuctionContent .live-budget-role { font-size: 13px; }
#liveAuctionContent.auction-finished .live-player, #liveAuctionContent.auction-finished .live-timer-area { display: grid; }
#liveAuctionContent.auction-finished .live-timer-area { display: flex; }
#liveAuctionContent.auction-finished .live-offer-row { display: contents; }
#liveAuctionContent.auction-finished .live-teams-budgets { display: grid; }
#liveAuctionContent.auction-finished { min-height: 0; }
#liveAuctionContent.auction-finished::before { display: none; }
#liveAuctionContent .live-auction-result { grid-column: 1; grid-row: 3; width: auto; height: 64px; box-sizing: border-box; padding: 8px 12px; margin: 0; border: 1px solid #a58748; border-radius: 8px; flex-direction: row; gap: 12px; animation: none; text-align: left; }
#liveAuctionContent #liveResultPlayer { display: none; }
#liveAuctionContent .live-result-label { font-size: 14px; white-space: nowrap; }
#liveAuctionContent .live-result-details { display: flex; gap: 16px; margin: 0; }
#liveAuctionContent .live-result-details > div { padding: 0; background: none; border: 0; min-width: 0; min-height: 0; }
#liveAuctionContent .live-result-details span { font-size: 10px; }
#liveAuctionContent .live-result-details strong { font-size: 18px; }
#liveAuctionContent .live-auction-actions { grid-column: 2; grid-row: 3; width: 100%; margin: 0; gap: 12px; justify-content: end; }
#liveAuctionContent .live-auction-actions button { font-size: 18px; min-width: 0; height: 54px; padding: 10px 24px; }
}
@media (max-width: 1023px) {
.live-brand { display: flex; align-items: center; gap: 10px; }
.live-brand img { width: 30px; height: 30px; object-fit: contain; }
.live-player-portrait { display: none; }
}

/* Manual award confirmation: existing result and buttons, central presentation. */
#liveAuctionContent #liveAwardOverlay { display: none; position: fixed; inset: 0; z-index: 70; padding: 24px; box-sizing: border-box; background: rgba(0,0,0,.72); align-items: center; justify-content: center; }
#liveAuctionContent.auction-finished #liveAwardOverlay:has(#liveAuctionResult[style*="flex"]) { display: flex; }
#liveAuctionContent .live-award-panel { width: min(1000px,100%); padding: clamp(20px,3vh,36px); box-sizing: border-box; border: 2px solid #d8b55b; border-radius: 18px; background: radial-gradient(ellipse at top,#51402235,transparent 65%),linear-gradient(145deg,#1c1d20,#0d0e10); box-shadow: 0 24px 80px #000a; }
#liveAuctionContent #liveAwardOverlay .live-auction-result { position: static; width: 100%; height: auto; min-height: 0; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; border-radius: 0; animation: none; flex-direction: column; gap: 18px; text-align: center; }
#liveAuctionContent #liveAwardOverlay .live-result-label { color: #e6c165; font-size: clamp(24px,2.2vw,38px); letter-spacing: 3px; }
#liveAuctionContent #liveAwardOverlay #liveResultPlayer { display: block; color: #f6f1e5; font-size: clamp(32px,3.3vw,62px); line-height: 1.1; margin: 0; overflow-wrap: anywhere; }
#liveAuctionContent #liveAwardOverlay .live-result-details { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin: 8px 0 0; width: 100%; }
#liveAuctionContent #liveAwardOverlay .live-result-details > div { min-height: 120px; padding: 16px; box-sizing: border-box; background: #121315; border: 1px solid #514933; border-radius: 10px; gap: 12px; }
#liveAuctionContent #liveAwardOverlay .live-result-details span { font-size: 15px; letter-spacing: 2px; }
#liveAuctionContent #liveAwardOverlay #liveResultTeam { font-size: clamp(26px,2.3vw,42px); line-height: 1.1; overflow-wrap: anywhere; }
#liveAuctionContent #liveAwardOverlay #liveResultPrice { font-size: clamp(36px,3.5vw,64px); color: #e6c165; line-height: 1.1; }
#liveAuctionContent #liveAwardOverlay .live-auction-actions { position: static; width: 100%; margin: 26px 0 0; justify-content: center; gap: 20px; animation: none; }
#liveAuctionContent #liveAwardOverlay .live-auction-actions button { height: 62px; min-width: 210px; padding: 12px 28px; font-size: 22px; }
@media (max-width: 640px) {
    #liveAuctionContent #liveAwardOverlay { padding: 12px; }
    #liveAuctionContent #liveAwardOverlay .live-result-details { grid-template-columns: 1fr; gap: 10px; }
    #liveAuctionContent #liveAwardOverlay .live-result-details > div { min-height: 80px; padding: 10px; }
    #liveAuctionContent #liveAwardOverlay .live-auction-actions { gap: 10px; }
    #liveAuctionContent #liveAwardOverlay .live-auction-actions button { min-width: 0; flex: 1; padding: 10px; font-size: 18px; }
}

/* Photos overlay the existing portrait; its SVG still fixes the layout dimensions. */
#liveAuctionContent .live-player-portrait.has-player-photo svg { visibility: hidden; }
#liveAuctionContent .live-player-portrait > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#photoArchiveScreen #photoArchiveSearch, #photoArchiveScreen #photoArchiveRole { width: 100%; padding: 12px; margin: 10px 0; background: #202020; color: #fff; border: 1px solid #494949; border-radius: 6px; box-sizing: border-box; }
#photoArchiveResults { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
.photo-search-result { padding: 12px; text-align: left; color: #eee; background: #242424; border: 1px solid #494949; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
#photoArchivePreview { display: flex; align-items: center; justify-content: center; min-height: 100px; margin: 12px 0; color: #aaa; }
#photoArchivePreview img { max-width: 100%; max-height: 280px; object-fit: contain; }
#photoArchiveScreen input[type=file] { max-width: 100%; margin: 10px 0; }
#photoArchiveScreen .repair-import-body { padding: 16px; }
#welcomeScreen #openPhotoArchive { margin-top: 16px; background: transparent; color: #bbb; font-size: 12px; }
@media (max-width:640px) { #photoArchiveResults { grid-template-columns: 1fr; } }

#photoArchiveScreen button:disabled { opacity: .45; cursor: not-allowed; }

#photoArchiveResults .photo-presence { display: block; margin-top: 6px; color: #aaa; font-size: 12px; letter-spacing: .06em; }
#photoArchiveResults .photo-presence.has-photo { color: #dfbd65; }

/* LIVE bid milestones: transforms/light only, no layout or interaction changes. */
#liveAuctionContent .live-current-offer { position: relative; overflow: hidden; }
#liveAuctionContent #liveCurrentPrice { position: relative; z-index: 1; transform-origin: center; }
#liveAuctionContent[data-bid-effect="pulse"] .live-current-offer { animation: bidGoldPulse .65s ease-out; }
#liveAuctionContent[data-bid-effect="pulse"] #liveCurrentPrice { animation: bidPricePulse .65s ease-out; }
#liveAuctionContent[data-bid-effect="wave"] #liveCurrentPrice { animation: bidPriceWave .95s ease-out; }
#liveAuctionContent[data-bid-effect="wave"] .live-current-offer::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg,transparent 25%,#dfbd6538 48%,transparent 70%); animation: bidGoldWave .95s ease-out; }
#liveAuctionContent[data-bid-effect="legendary"] #liveCurrentPrice { animation: bidPriceLegendary 1.2s ease-out; }
#liveAuctionContent[data-bid-effect="legendary"]::after { content: ""; position: fixed; inset: 0; z-index: 51; pointer-events: none; border: 3px solid #d8b55b; box-sizing: border-box; background: radial-gradient(ellipse at center,transparent 55%,#d8b55b18); box-shadow: inset 0 0 70px #dfbd6530; animation: bidArenaLegendary 1.2s ease-out; }
@keyframes bidPricePulse { 0%,100% { transform: scale(1); text-shadow: none; } 35% { transform: scale(1.06); text-shadow: 0 0 18px #d8b55b99; } }
@keyframes bidGoldPulse { 0%,100% { box-shadow: none; } 35% { box-shadow: inset 0 0 24px #d8b55b44; } }
@keyframes bidPriceWave { 0%,100% { transform: scale(1); text-shadow: none; } 35% { transform: scale(1.10); text-shadow: 0 0 24px #e6c165bb; } }
@keyframes bidGoldWave { from { transform: translateX(-100%); opacity: 0; } 35% { opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
@keyframes bidPriceLegendary { 0%,100% { transform: scale(1); text-shadow: none; } 35% { transform: scale(1.15); text-shadow: 0 0 30px #ffdd88cc,0 0 50px #c99b4755; } }
@keyframes bidArenaLegendary { 0%,100% { opacity: 0; } 35% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    #liveAuctionContent[data-bid-effect] #liveCurrentPrice,
    #liveAuctionContent[data-bid-effect] .live-current-offer,
    #liveAuctionContent[data-bid-effect] .live-current-offer::after,
    #liveAuctionContent[data-bid-effect]::after { animation: none; }
    #liveAuctionContent[data-bid-effect]::after, #liveAuctionContent[data-bid-effect] .live-current-offer::after { display: none; }
}
/* Larger photo frame; contain preserves the face and all original proportions. */
@media (min-width: 1024px) {
    #liveAuctionContent .live-player:has(.has-player-photo) { grid-template-columns: minmax(0,46%) minmax(0,1fr); gap: 12px 16px; padding: 16px; }
    #liveAuctionContent .live-player:has(.has-player-photo) .live-player-data h1 { font-size: clamp(28px,2.7vw,52px); }
    #liveAuctionContent .live-player-portrait > img { object-fit: contain; object-position: center; }
}

/* Keep the PWA action hidden until a prepared version can be applied. */
#pwaApply[hidden] { display: none; }

/* Home / settings utility screens; Arena presentation remains unchanged. */
#welcomeScreen .home-settings-button { margin-top: 16px; min-width: 254px; padding: 12px 24px; font-size: 13px; color: #d8b55b; border-color: #7e6631; background: linear-gradient(145deg, #1e1c16, #101010); }
.home-offline-status { color: #aaa18c; font-size: 12px; letter-spacing: 1px; margin-top: 22px; max-width: 100%; overflow-wrap: anywhere; }
.settings-screen { max-width: 1100px; margin: 0 auto; }
.settings-panels { display: grid; gap: 22px; }
.settings-card { min-width: 0; padding: 24px; border: 1px solid #55472c; border-radius: 14px; background: linear-gradient(135deg, #1c1b18, #111214); box-shadow: 0 12px 30px #0004; overflow-wrap: anywhere; }
.settings-card h3 { color: #d8b55b; letter-spacing: 2px; margin: 0 0 14px; }
.settings-card > p { color: #bdbdbd; line-height: 1.6; }
.settings-card .roster-pdf-panel { margin: 0; padding: 0; border: 0; }
.settings-card button { max-width: 100%; white-space: normal; }
@media (max-width: 600px) { .settings-card { padding: 18px; } .settings-card h3 { font-size: 16px; } }

/* Manual backup transfer: quiet status, no LIVE/SHOW MODE changes. */
.backup-receipt, .backup-reminder { font-size: 12px; line-height: 1.5; color: #b9aa86; overflow-wrap: anywhere; }
.backup-comparison { white-space: pre-line; line-height: 1.6; color: #e0c279; overflow-wrap: anywhere; }
.backup-acknowledgement { display: block; padding: 14px; border: 1px solid #8c7036; border-radius: 8px; margin: 14px 0; line-height: 1.6; }
#exportBeforeRestore[hidden], #auctionRestoreAcknowledgement[hidden] { display: none; }
#auctionRestorePanel button { max-width: 100%; white-space: normal; }

#backupTransferStatus { overflow-wrap: anywhere; }
.backup-acknowledgement input { width: auto; margin-right: 8px; }
