/* Stili Gestione Tornei Scacchi */

:root {
    /* Colori header/gradient */
    --color-primary-dark: #1a1a2e;
    --color-primary-mid: #16213e;
    --color-primary-light: #0f3460;

    /* Colori accent */
    --color-accent-blue: #3498db;
    --color-accent-green: #27ae60;
    --color-accent-orange: #f39c12;
    --color-accent-red: #e74c3c;

    /* Colori testo */
    --color-text-dark: #2d3748;
    --color-text-medium: #4a5568;
    --color-text-light: #718096;

    /* Colori sfondo */
    --color-bg-light: #f8fafc;
    --color-bg-page: #f0f2f5;
    --color-border: #e2e8f0;

    /* Legacy variables (per retrocompatibilità) */
    --primary: #1a1a2e;
    --secondary: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #f8fafc;
    --dark: #1a1a2e;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--color-bg-page);
    color: var(--color-text-dark);
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-mid) 50%, var(--color-primary-light) 100%);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.4rem;
    font-weight: 600;
}

.header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Georgia', serif;
}

.header .logo span {
    color: #a855f7;
}

.header .logo:hover {
    opacity: 0.9;
}

.header nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 1.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.header nav a:hover {
    background: rgba(255,255,255,0.15);
}

.header nav a.active {
    background: rgba(255,255,255,0.2);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.card-header {
    background: var(--color-bg-light);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text-dark);
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.25);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.25);
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.25);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35);
}

.btn-secondary {
    background: var(--color-bg-light);
    color: var(--color-text-medium);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text-medium);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--color-bg-light);
    transition: all 0.2s ease;
}

.form-control:hover {
    border-color: #cbd5e0;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-inline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-inline .form-group {
    margin-bottom: 0;
}

select.form-control {
    cursor: pointer;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: var(--light);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.table tr:hover {
    background: #f8f9fa;
}

.table-sm th,
.table-sm td {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

/* Pairings Table */
.pairing-table {
    font-size: 0.95rem;
    table-layout: fixed;
}

.pairing-table .tavolo {
    width: 50px;
    text-align: center;
    font-weight: bold;
}

.pairing-table .risultato {
    width: 100px;
    text-align: center;
}

.pairing-table .giocatore {
    padding: 0.5rem;
}

.pairing-table .col-bianco,
.pairing-table .col-nero {
    width: 30%;
}

.pairing-table .col-punti {
    width: 50px;
    text-align: center;
}

.pairing-table .bianco {
    background: #fff;
}

.pairing-table .nero {
    background: #333;
    color: #fff;
}

.pairing-table .punti {
    width: 50px;
    text-align: center;
}

/* Bye request buttons */
.bye-dropdown {
    position: relative;
    display: inline-block;
}

.bye-dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 4px;
    z-index: 100;
    right: 0;
}

.bye-dropdown:hover .bye-dropdown-content {
    display: block;
}

.bye-dropdown-content button {
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 8px 12px;
    cursor: pointer;
}

.bye-dropdown-content button:hover {
    background: #f0f0f0;
}

/* Standings */
.classifica-table .posizione {
    width: 40px;
    text-align: center;
    font-weight: bold;
}

.classifica-table .punti {
    font-weight: bold;
    text-align: center;
}

.classifica-table .spareggio {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background: var(--secondary); color: var(--white); }
.badge-success { background: var(--success); color: var(--white); }
.badge-warning { background: var(--warning); color: var(--dark); }
.badge-danger { background: var(--danger); color: var(--white); }
.badge-info { background: #17a2b8; color: var(--white); }

/* Titoli scacchistici */
.titolo {
    font-weight: bold;
    margin-right: 0.3rem;
}
.titolo-gm { color: #c0392b; }
.titolo-im { color: #e67e22; }
.titolo-fm { color: #27ae60; }
.titolo-cm { color: #2980b9; }
.titolo-wgm { color: #c0392b; }
.titolo-wim { color: #e67e22; }
.titolo-wfm { color: #27ae60; }
.titolo-wcm { color: #2980b9; }

/* Link giocatori */
.table td a[href*="giocatore_torneo"]:hover {
    color: var(--secondary) !important;
    text-decoration: underline !important;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.col {
    flex: 1;
    padding: 0.5rem;
}

.col-2 { flex: 0 0 16.66%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.33%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.66%; }
.col-12 { flex: 0 0 100%; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mr-1 { margin-right: 0.5rem; }
.ml-1 { margin-left: 0.5rem; }

/* Stato torneo */
.stato-iscrizioni { color: var(--secondary); }
.stato-in_corso { color: var(--success); }
.stato-concluso { color: #7f8c8d; }

/* Risultati partita */
.risultato-btn {
    padding: 0.3rem 0.5rem;
    margin: 0.1rem;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.85rem;
}

.risultato-btn:hover {
    background: var(--light);
}

.risultato-btn.selected {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--light);
    margin-bottom: 1rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

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

.tab.active {
    border-bottom-color: var(--secondary);
    color: var(--secondary);
    font-weight: 600;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.spinner {
    border: 3px solid var(--light);
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .header nav {
        margin-top: 1rem;
    }

    .header nav a {
        margin: 0.5rem;
    }

    .row {
        flex-direction: column;
    }

    .col-2, .col-3, .col-4, .col-6, .col-8 {
        flex: 0 0 100%;
    }

    .form-inline {
        flex-direction: column;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* Progress bar per import */
.progress {
    height: 20px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--secondary);
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
}

/* === FORM TORNEO - STILI MODERNI === */

/* Card principale */
.tournament-card {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Header Card */
.tournament-card > .card-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 24px 32px;
    border-bottom: none;
}

.tournament-card > .card-header h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.tournament-card > .card-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

.tournament-card > .card-body {
    padding: 32px;
}

/* Sezioni Form */
.tournament-card .form-section {
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid #eef0f2;
}

.tournament-card .form-section:last-of-type {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d1e9f6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    position: relative;
    display: inline-block;
    margin: 0;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3498db, transparent);
    border-radius: 2px;
}

/* Griglia Form */
.form-row {
    display: grid;
    gap: 20px;
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-row.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-row.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Form Group */
.tournament-card .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.tournament-card .form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    display: block;
}

.tournament-card .form-group label .required {
    color: #e53e3e;
    margin-left: 2px;
}

/* Input Fields */
.tournament-card .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #2d3748;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.tournament-card .form-control:hover {
    border-color: #cbd5e0;
    background: #fff;
}

.tournament-card .form-control:focus {
    outline: none;
    border-color: #3498db;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.tournament-card .form-control::placeholder {
    color: #a0aec0;
}

/* Select */
.tournament-card select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Helper Text */
.helper-text {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 6px;
}

/* Toggle Switch Group */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: background 0.2s;
}

.toggle-group:hover {
    background: #f1f5f9;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e0;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
}

.toggle-description {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
}

/* Textarea */
.tournament-card textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Form Actions */
.tournament-card .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eef0f2;
}

.tournament-card .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tournament-card .btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.tournament-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.tournament-card .btn-secondary {
    background: #f8fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.tournament-card .btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.tournament-card .btn svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .tournament-card > .card-header {
        padding: 20px;
    }

    .tournament-card > .card-body {
        padding: 20px;
    }

    .form-row.cols-2,
    .form-row.cols-3,
    .form-row.cols-4 {
        grid-template-columns: 1fr;
    }

    .tournament-card .form-actions {
        flex-direction: column;
    }

    .tournament-card .btn {
        justify-content: center;
    }
}

/* === LISTA TORNEI - STILI MODERNI === */

.tornei-list-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tornei-list-card > .card-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.tornei-list-card > .card-header h2 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.tornei-list-card .btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tornei-list-card .btn-add:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.tornei-list-card .btn-add svg {
    width: 16px;
    height: 16px;
}

.tornei-list-card > .card-body {
    padding: 0;
}

/* Empty State */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Tabella Moderna */
.table-modern {
    width: 100%;
    border-collapse: collapse;
}

.table-modern thead {
    background: #f8fafc;
}

.table-modern th {
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.table-modern td {
    padding: 16px 20px;
    font-size: 0.95rem;
    color: #2d3748;
    border-bottom: 1px solid #eef0f2;
    vertical-align: middle;
}

.table-modern tbody tr {
    transition: background 0.15s ease;
}

.table-modern tbody tr:hover {
    background: #f8fafc;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* Celle specifiche */
.nome-torneo a {
    color: #1a1a2e;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.nome-torneo a:hover {
    color: #3498db;
}

.data-torneo {
    color: #718096;
    font-size: 0.9rem;
}

.turni-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #edf2f7;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
}

.iscritti-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d1e9f6 100%);
    border-radius: 8px;
    font-weight: 600;
    color: #2b6cb0;
    font-size: 0.9rem;
}

/* Badge Stato */
.stato-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stato-iscrizioni {
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    color: #2b6cb0;
}

.stato-incorso {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    color: #276749;
}

.stato-concluso {
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    color: #718096;
}

/* Bottoni Azione */
.azioni-cell {
    display: flex;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action svg {
    width: 18px;
    height: 18px;
}

.btn-open {
    background: #ebf8ff;
    color: #3182ce;
}

.btn-open:hover {
    background: #3182ce;
    color: white;
}

.btn-delete {
    background: #fff5f5;
    color: #e53e3e;
}

.btn-delete:hover {
    background: #e53e3e;
    color: white;
}

/* Responsive tabella */
@media (max-width: 768px) {
    .tornei-list-card > .card-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .table-modern th,
    .table-modern td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    .table-modern th:nth-child(3),
    .table-modern td:nth-child(3),
    .table-modern th:nth-child(4),
    .table-modern td:nth-child(4) {
        display: none;
    }

    .azioni-cell {
        flex-direction: column;
        gap: 4px;
    }
}
