.sc-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.sc-hdr {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 8px 14px;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sc-hdr .sc-gp {
    font-weight: 600;
    font-size: 1.05em;
}

.sc-hdr .sc-info {
    opacity: .8;
    font-size: .85em;
}

.sc-hdr .sc-credits {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: .8em;
}

.sc-hdr .sc-cr-label {
    opacity: .7;
}

.sc-hdr .sc-cr-val {
    font-weight: 700;
}

.sc-hdr .sc-cr-ok {
    color: #6fdc8c;
}

.sc-hdr .sc-cr-warn {
    color: #ffc107;
}

.sc-hdr .sc-cr-danger {
    color: #ff6b6b;
}

.sc-hdr .sc-cr-penalty {
    color: #ff6b6b;
    font-size: .75em;
}

.sc-body {
    padding: 10px 14px 14px;
}

.sc-label {
    font-weight: 600;
    font-size: .8em;
    color: #495057;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sc-label small {
    font-weight: 400;
    color: #adb5bd;
}

.sc-slot {
    position: relative;
    margin-bottom: 6px;
}

.sc-slot .sc-cost {
    font-size: .65em;
    color: #6c757d;
    position: absolute;
    right: 4px;
    bottom: -12px;
}

.sc-pole-box {
    background: #fffdf5;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 8px 10px 12px;
    margin-bottom: 8px;
}

.sc-gara-box {
    background: #f8f9ff;
    border: 1px solid #d6e0ff;
    border-radius: 8px;
    padding: 8px 10px 4px;
    margin-bottom: 8px;
}

.sc-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding-top: 4px;
}

.sc-actions .btn {
    font-size: .85em;
}

.sc-err {
    font-size: .8em;
    text-align: center;
}

.sc-warn-pole {
    font-size: .8em;
}

.sc-deadline {
    font-size: .8em;
    color: #adb5bd;
}

.info-card {
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.info-card-header {
    padding: 6px 12px;
    font-weight: 600;
    font-size: .8em;
    color: #fff;
}

.info-card-header-grid {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.info-card-header-standing {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
}

.sc-note {
    font-size: .78em;
    color: #6c757d;
}

.sc-select-gara {
    width: auto !important;
    max-width: 100% !important;
}

@media (min-width: 768px) {
    .sc-cols {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* ===== Motori / Risultati (condivisi con ciclismo) ===== */
.sc-tabs {
    gap: 8px;
}

.sc-tabs .nav-item {
    min-width: 0;
}

.sc-tabs .nav-link {
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .08);
    color: #495057;
    font-weight: 600;
    background: #fff;
    margin: 0;
    transition: all .2s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-tabs .nav-link.active {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(22, 33, 62, .25);
}

.sc-tabs .nav-link:hover {
    transform: translateY(-1px);
}

@media (max-width: 767.98px) {
    .sc-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 2px;
    }

    .sc-tabs .nav-item {
        flex: 0 0 auto !important;
        min-width: 120px;
    }

    .sc-tabs.sc-tabs-no-scroll {
        overflow-x: visible;
        gap: 4px;
    }

    .sc-tabs.sc-tabs-no-scroll .nav-item {
        flex: 1 1 0 !important;
        min-width: 0;
    }

    .sc-tabs.sc-tabs-no-scroll .nav-link {
        font-size: .74rem;
        padding: .32rem .3rem;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
}

.sc-tab-icon {
    width: 80%;
    height: auto;
    max-height: 50px;
    max-width: 50px;
    margin-bottom: 5px;
}

.sc-tab-title {
    font-size: .85em;
    font-weight: 600;
    color: inherit;
}

.sc-results-card {
    margin-top: 6px;
    margin-bottom: 8px;
}

.sc-results-hdr {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.sc-results-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sc-results-flag {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, .35);
    flex-shrink: 0;
}

.sc-results-title .sc-gp {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sc-results-type {
    font-size: .82em;
    opacity: .92;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    flex-shrink: 0;
}

.sc-hdr-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain;
    flex-shrink: 0;
}

.sc-results-table
{
    font-size: 0.8rem;
}
.sc-results-table th {
    background: #f1f4ff;
    color: #2c3e50;
    border-bottom: 1px solid #d6e0ff;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Medagliere in pagina (non in container scroll): sticky + modal rompe bordi/colonne */
.sc-results-table.sc-results-table--no-sticky th {
    position: static;
    z-index: auto;
}

.rankingIndex.sc-results-table .sc-total-pill {
    min-width: 2.2em;
    padding: 2px 6px;
    font-size: 0.85em;
}

.rankingIndex-medagliere th.med-col,
.rankingIndex-medagliere td.med-col,
.rankingIndex-medagliere th.med-col-tot,
.rankingIndex-medagliere td.med-col-tot {
    width: 1%;
    white-space: nowrap;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    vertical-align: middle;
}

.rankingIndex-medagliere td.med-col .sc-total-pill,
.rankingIndex-medagliere td.med-col-tot .sc-total-pill {
    min-width: 2em;
    padding: 2px 7px;
    font-size: 0.85em;
    display: inline-block;
}

.rankingIndex-medagliere .rk-user-cell a {
    color: inherit;
    text-decoration: none;
}

.rankingIndex-medagliere .rk-user-cell a:hover {
    text-decoration: underline;
}

.sc-results-table td {
    border-color: #eef2f7;
    vertical-align: middle;
}

.sc-results-table tbody tr:nth-child(even) td {
    background: #fafcff;
}

.sc-results-table tbody tr:hover td {
    background: #f4f7ff;
}

.sc-results-table tr.own_user td,
.sc-results-table tbody tr.own_user:nth-child(even) td,
.sc-results-table tbody tr.own_user:hover td {
    background: #FFC107 !important;
}

.sc-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2em;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    background: #e9eef8;
    color: #2c3e50;
    font-size: .9em;
}

.sc-pos-badge.pos-1 {
    background: linear-gradient(135deg, #f9d976, #f39f86);
    color: #2b1d00;
}

.sc-pos-badge.pos-2 {
    background: linear-gradient(135deg, #d7dbe6, #b8c0d3);
    color: #243447;
}

.sc-pos-badge.pos-3 {
    background: linear-gradient(135deg, #dfb58b, #c88c5d);
    color: #3d2209;
}

.sc-total-pill {
    display: inline-block;
    min-width: 4em;
    padding: 2px 10px;
    border-radius: 999px;
    background: #1a1a2e;
    color: #fff;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
}

/* Pill vuota: mostra "-" (0 resta 0) */
.sc-total-pill:empty::before {
    content: "-";
}

.sc-detail-line {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f3f6fb;
    font-size: .86em;
    color: #495057;
    white-space: nowrap;
}

.sc-score-card {
    margin-top: 6px;
}

.sc-score-table th {
    background: #f1f4ff;
    color: #2c3e50;
    border-bottom: 1px solid #d6e0ff;
    font-weight: 700;
}

.sc-score-table td {
    border-color: #eef2f7;
    vertical-align: middle;
}

.sc-score-table tbody tr:nth-child(even) td {
    background: #fafcff;
}

.sc-score-table tbody tr:hover td {
    background: #f4f7ff;
}

.sc-score-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2em;
    padding: 1px 8px;
    border-radius: 999px;
    background: #e9eef8;
    font-weight: 700;
    color: #2c3e50;
}

.sc-score-detail {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f6fb;
    white-space: nowrap;
    font-size: .9em;
}

.sc-bonus-plus {
    color: #198754;
    font-weight: 700;
}

.sc-bonus-minus {
    color: #dc3545;
    font-weight: 700;
}
