/* Compact CSS cho layout có sidebar */
.cau-cap-filter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    color: #fff;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 12px;
}

.form-control {
    width: 100%;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
}

.filter-actions {
    text-align: center;
    margin-top: 10px;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 5px;
    transition: all 0.3s;
    font-size: 13px;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-primary:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.pair-selection {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.selection-title {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.table-tslt {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table-tslt th, .table-tslt td {
    border: 1px solid #ddd;
    padding: 6px 4px;
    text-align: center;
}

.table-tslt th {
    background: #f2f2f2;
    font-size: 11px;
}

.table-tslt label {
    cursor: pointer;
    display: block;
    font-size: 12px;
}

.pair-checkbox {
    margin-right: 3px;
    cursor: pointer;
}

.btn-tslt {
    display: inline-block;
    padding: 5px 10px;
    margin: 3px;
    background: #6c757d;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 11px;
}

.btn-tslt.active {
    background: #007bff;
    font-weight: 600;
}

.btn-tslt:hover {
    background: #5a6268;
}

.btn-tk {
    display: inline-block;
    padding: 4px 8px;
    background: #6c757d;
    color: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-tk.active {
    background: #cf0000;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.btn-tk:hover {
    background: #5a6268;
}

.result-section {
    margin: 20px 0;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #c6c1c1;
}

.section-title {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.section-title i {
    color: #667eea;
    margin-right: 8px;
    font-size: 16px;
}

.method-desc {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
    padding: 8px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    font-size: 13px;
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.cap-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s;
}

.cap-card:hover {
    transform: translateY(-3px);
}

.cap-card.rank-1 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.cap-card.rank-2 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.cap-card.rank-3 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.medal {
    font-size: 24px;
}

.rank {
    font-size: 11px;
    opacity: 0.9;
}

.card-pair {
    font-size: 32px;
    font-weight: bold;
    margin: 12px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.card-score {
    font-size: 13px;
    margin: 10px 0;
}

.card-reason {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.5;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 10px;
    margin-top: 10px;
}

.table-responsive {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 12px;
}

.stats-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stats-table th {
    padding: 10px 6px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
}

.stats-table td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.stats-table tbody tr:hover {
    background: #f8f9fa;
}

.pair-cell {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
}

.note-cell {
    font-size: 11px;
    color: #666;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background: #007bff;
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #333;
}

.confidence {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
}

.confidence.very-high {
    background: #28a745;
    color: white;
}

.confidence.high {
    background: #17a2b8;
    color: white;
}

.confidence.medium {
    background: #ffc107;
    color: #333;
}

#loading-indicator {
    text-align: center;
    padding: 30px;
}

#loading-indicator i {
    color: #667eea;
}

#loading-indicator p {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .recommended-grid {
        grid-template-columns: 1fr;
    }

    .stats-table {
        font-size: 11px;
    }

    .stats-table th,
    .stats-table td {
        padding: 6px 4px;
    }

    .pair-cell {
        font-size: 14px;
    }

    .card-pair {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .cau-cap-filter {
        padding: 10px;
    }

    .table-tslt {
        font-size: 10px;
    }

    .btn-tslt, .btn-tk {
        font-size: 10px;
        padding: 3px 6px;
        margin: 2px;
    }
}