:root {
    --primary-red: #FF0000;
    --dark-red: #CC0000;
    --light-red-bg: #FFEBEE;
    --text-dark: #333;
    --text-light: #fff;
    --border-color: #EEE;
    --body-bg: #f4f7f6;
    --gender-m-color: #2196F3;
    --gender-f-color: #E91E63;
    --whatsapp-green: #25d366;
    --whatsapp-green-hover: #128c7e;
}
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: var(--body-bg); 
    color: var(--text-dark); 
}
.main-container { 
    max-width: 1200px; 
    margin: 20px auto; 
    background-color: var(--text-light); 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
    border-radius: 8px; 
    overflow: hidden; 
    padding: 0; 
}
header { 
    background-color: var(--primary-red); 
    color: var(--text-light); 
    border-bottom: 5px solid var(--dark-red); 
}
.header-logo { 
    flex-shrink: 0; 
}
.header-info { 
    flex-grow: 1; 
}
.header-buttons { 
    flex-shrink: 0; 
    text-align: right; 
}
.header-title { 
    font-size: 1.8em; 
    font-weight: bold; 
}
.header-subtitle { 
    font-size: 1.1em; 
    opacity: 0.9; 
}
.btn-custom-red { 
    background-color: var(--primary-red); 
    color: var(--text-light); 
    border-color: var(--primary-red); 
}
.btn-custom-red:hover { 
    background-color: var(--dark-red); 
    border-color: var(--dark-red); 
    color: var(--text-light); 
}
.btn-setup { 
    background-color: rgba(255,255,255,0.15); 
    color: var(--text-light); 
    border: 1px solid rgba(255,255,255,0.5); 
}
.btn-setup:hover { 
    background-color: rgba(255,255,255,0.25); 
    color: var(--text-light); 
    border-color: var(--text-light); 
}
.btn-outline-custom { 
    color: var(--primary-red); 
    border-color: var(--primary-red); 
}
.btn-outline-custom:hover, .btn-outline-custom.active { 
    background-color: var(--primary-red); 
    color: var(--text-light); 
    border-color: var(--primary-red); 
}
.btn-dq-action.btn-warning { 
    background-color: #ffc107; 
    border-color: #ffc107; 
    color: #000; 
}
.btn-dq-action.btn-warning:hover { 
    background-color: transparent; 
    border-color: #ffc107; 
    color: #ffc107; 
}
.btn-dq-action.btn-danger { 
    background-color: #dc3545; 
    border-color: #dc3545; 
    color: #fff; 
}
.btn-dq-action.btn-danger:hover { 
    background-color: transparent; 
    border-color: #dc3545; 
    color: #dc3545; 
}
.athlete-card { 
    position: relative; 
    background-color: #fff; 
    border: 1px solid #e0e0e0; 
    border-radius: 0.5rem; 
    margin-bottom: 0.5rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
}
.card-summary { 
    padding: 0.75rem 1rem; 
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
}
.main-line { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    width: 100%; 
}
.position-group { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    width: 50px; 
    flex-shrink: 0; 
}
.position { 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: var(--primary-red); 
}
.bib-number { 
    font-size: 0.75rem; 
    color: #6c757d; 
    margin-top: -4px; 
}
.name { 
    font-size: 1.1rem; 
    font-weight: 600; 
    flex-grow: 1; 
    min-width: 0; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}
.time-block { 
    white-space: nowrap; 
    font-size: 1.1rem; 
    font-weight: 600; 
}
.expand-arrow { 
    color: #6c757d; 
    transition: transform 0.3s ease; 
}
.expand-arrow.expanded { 
    transform: rotate(180deg); 
}
.secondary-line { 
    display: flex; 
    align-items: flex-start; 
    gap: 1rem; 
    width: 100%; 
    padding-left: 50px; 
    margin-top: 4px; 
}
.status-beacon-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.75rem; 
    align-items: center; 
}
.beacon-group { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}
.beacon-pair { 
    display: flex; 
    gap: 4px; 
}
.beacon-label { 
    font-size: 0.65rem; 
    color: #6c757d; 
    margin-top: 2px; 
}
.status-beacon, .manual-beacon { 
    width: 10px; 
    height: 10px; 
}
.status-beacon { 
    border-radius: 50%; 
}
.manual-beacon { 
    border-radius: 2px; 
}
.status-beacon.green, .manual-beacon.green { 
    background-color: #28a745; 
}
.status-beacon.red, .manual-beacon.red { 
    background-color: #dc3545; 
}
.card-details-body { 
    background-color: #fafafa; 
    border-top: 1px solid var(--border-color); 
    padding: 1.5rem; 
}
.details-section { 
    padding: 1rem; 
    background-color: #fff; 
    border: 1px solid #e9ecef; 
    border-radius: .375rem; 
    margin-bottom: 1rem; 
}
.details-section h5 { 
    color: var(--primary-red); 
    font-weight: bold; 
    border-bottom: 2px solid var(--light-red-bg); 
    padding-bottom: 0.5rem; 
    margin-bottom: 1rem; 
}
.timeline { 
    position: relative; 
    padding: 0 0 0 20px; 
}
.timeline::before { 
    content: ''; 
    position: absolute; 
    left: 8px; 
    top: 0; 
    bottom: 0; 
    width: 4px; 
    background-color: #e9ecef; 
    border-radius: 2px; 
}
.timeline-item { 
    position: relative; 
    margin-bottom: 1.25rem; 
}
.timeline-item:last-child { 
    margin-bottom: 0; 
}
.timeline-icon { 
    position: absolute; 
    left: -1px; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 20px; 
    height: 20px; 
    border-radius: 50%; 
    border: 3px solid #f8f9fa; 
    z-index: 1; 
}
.timeline-icon.green { 
    background-color: #28a745; 
}
.timeline-icon.red { 
    background-color: #dc3545; 
}
.timeline-content { 
    margin-left: 30px; 
    padding: 0.75rem 1rem; 
    background-color: #fff; 
    border: 1px solid #e9ecef; 
    border-radius: .375rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,.05); 
}
.timeline-item-title { 
    font-weight: bold; 
    font-size: 1rem; 
    color: #343a40; 
}
.timeline-item-details { 
    font-size: 0.9rem; 
    color: #6c757d; 
}
.gender-m { 
    color: var(--gender-m-color); 
    font-weight: bold; 
}
.gender-f { 
    color: var(--gender-f-color); 
    font-weight: bold; 
}
footer { 
    background-color: var(--primary-red); 
    color: var(--text-light); 
    border-top: 3px solid var(--dark-red); 
}
.btn-whatsapp { 
    background-color: var(--whatsapp-green); 
    color: white; 
    border-color: var(--whatsapp-green); 
}
.btn-whatsapp:hover { 
    background-color: var(--whatsapp-green-hover); 
    border-color: var(--whatsapp-green-hover); 
    color: white; 
}
.accordion-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}
.accordion-flag-toggle {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}
.accordion-flag-toggle:hover {
    background-color: #e2e6ea;
    border-color: #adb5bd;
}
.accordion-flag-toggle[aria-expanded="true"] {
    background-color: var(--primary-red);
    color: var(--text-light);
    border-color: var(--dark-red);
}
.accordion-flag-toggle i {
    margin-right: 0.5rem;
}
@media (max-width: 768px) {
    body { 
        font-size: 0.8rem; 
    }
    header { 
        padding: 0.5rem 1rem !important; 
        min-height: 80px; 
    }
    header .header-logo { 
        display: none; 
    }
    .main-container { 
        margin: 0; 
        border-radius: 0; 
        min-height: 100vh; 
    }
    .position, .time-block { 
        font-size: 1rem; 
    }
    .name { 
        font-size: 0.95rem; 
    }
    .secondary-line { 
        padding-left: 50px; 
    }
    #validationModalList { 
        max-height: 250px; 
        overflow-y: auto; 
    }
    .accordion-flags {
        justify-content: center;
    }
    .accordion-flag-toggle {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}
.modal.fade.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1055 !important; /* Garante que fique acima do backdrop (z-index: 1050) */
}