/* === Campionato Biliardo — stile.css === */

/* Classifica */
.cb-classifica {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.cb-tabella {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.cb-tabella thead th {
    background: #1a1a2e;
    color: #e0e0f0;
    padding: 12px 14px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 13px;
    text-transform: uppercase;
}

.cb-tabella thead th.cb-nome { text-align: left; }
.cb-tabella thead th:first-child { border-radius: 8px 0 0 0; }
.cb-tabella thead th:last-child  { border-radius: 0 8px 0 0; }

.cb-tabella tbody tr {
    border-bottom: 1px solid #e8e8e8;
    transition: background 0.15s;
}
.cb-tabella tbody tr:hover { background: #f5f7ff; }

.cb-tabella td {
    padding: 11px 14px;
    text-align: center;
    vertical-align: middle;
}

.cb-nome { text-align: left !important; font-weight: 500; }

/* Podi */
.cb-oro     { background: #fffbea; }
.cb-argento { background: #f8f8f8; }
.cb-bronzo  { background: #fff5f0; }

.cb-medaglia { font-size: 18px; }

.cb-vinte { color: #1a7a3f; font-weight: 600; }
.cb-perse { color: #c0392b; }

/* Barra ratio */
.cb-ratio-cell { min-width: 140px; }
.cb-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    height: 22px;
    background: #eef0f5;
    border-radius: 11px;
    overflow: hidden;
    padding: 0;
}
.cb-bar {
    height: 100%;
    background: linear-gradient(90deg, #3a5fc8, #6b8ef5);
    border-radius: 11px;
    transition: width 0.4s ease;
    min-width: 2px;
}
.cb-ratio-val {
    position: absolute;
    right: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #2d3561;
    z-index: 1;
}
.cb-vuoto {
    text-align: center;
    color: #888;
    padding: 2rem !important;
    font-style: italic;
}

/* Pannello inserimento */
.cb-pannello {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 640px;
    background: #fff;
    border: 1px solid #dde1f0;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.cb-sezione { margin-bottom: 1.5rem; }
.cb-sezione h3 {
    margin: 0 0 1rem;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    border-bottom: 2px solid #eef0f5;
    padding-bottom: 6px;
}
.cb-sezione-mini { padding-top: 1rem; border-top: 1px solid #eef0f5; }

.cb-form-login h3 {
    margin: 0 0 1rem;
    font-size: 16px;
    color: #1a1a2e;
}

.cb-riga {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.cb-riga > div { display: flex; flex-direction: column; gap: 4px; }

label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input[type="text"],
input[type="password"],
input[type="date"],
select {
    padding: 8px 10px;
    border: 1px solid #ccd0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #f9faff;
    color: #1a1a2e;
    outline: none;
    transition: border-color 0.15s;
}
input:focus, select:focus { border-color: #3a5fc8; background: #fff; }

.cb-azioni { margin-top: 1rem; display: flex; gap: 10px; flex-wrap: wrap; }

button {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, transform 0.1s;
}
button:hover { opacity: 0.88; }
button:active { transform: scale(0.98); }

.cb-btn-primario { background: #3a5fc8; color: #fff; }
.cb-btn-danger   { background: #fff; color: #c0392b; border: 1px solid #c0392b; }

/* Messaggi */
.cb-msg {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 1rem;
}
.cb-ok     { background: #eafaf1; color: #1a7a3f; border: 1px solid #a9dfbf; }
.cb-errore { background: #fdedec; color: #c0392b; border: 1px solid #f1948a; }

/* Avviso e sublabel */
.cb-avviso {
    color: #888;
    font-style: italic;
    font-size: 14px;
    margin: 0.5rem 0;
}
.cb-sublabel {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 6px;
}
.cb-riga-stretta { align-items: flex-end; }

/* Responsive */
@media (max-width: 520px) {
    .cb-riga { flex-direction: column; }
    .cb-azioni { flex-direction: column; }
    .cb-tabella thead th, .cb-tabella td { font-size: 13px; padding: 9px 8px; }
}
