/* ============================================================
   SCORE INTEGRITY — Audit, Locking, Dual Scorecard
   ============================================================ */

/* Score Locked Banner */
.score-locked-banner {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #ffc107;
}

.score-locked-banner button {
    margin-top: 8px;
    padding: 6px 16px;
    background: #856404;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Change Request Modal */
.change-request-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.change-request-modal {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.change-request-modal h3 {
    margin: 0 0 15px 0;
    color: #2B5A9E;
}

.cr-hole-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.cr-hole-item {
    text-align: center;
    padding: 6px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.cr-hole-item.modified {
    border-color: #ffc107;
    background: #fff8e1;
}

.cr-hole-item .hole-label {
    font-size: 0.7rem;
    color: #999;
}

.cr-hole-item input {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    background: transparent;
    outline: none;
}

.cr-reason-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 15px;
    resize: vertical;
    min-height: 60px;
}

.cr-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #dee2e6;
}

.admin-tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.admin-tab.active {
    color: #2B5A9E;
    border-bottom-color: #2B5A9E;
}

.admin-tab:hover:not(.active) {
    color: #333;
    background: #f8f9fa;
}

.pending-badge {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.3rem;
    min-width: 18px;
    text-align: center;
}

/* Change Request Cards */
.change-request-card {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.change-request-card.pending {
    border-left: 4px solid #ffc107;
}

.change-request-card.approved {
    border-left: 4px solid #28a745;
    opacity: 0.7;
}

.change-request-card.rejected {
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.cr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cr-date {
    font-size: 0.75rem;
    color: #999;
}

.cr-changes {
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.change-diff {
    display: inline-block;
    margin-right: 0.75rem;
    margin-bottom: 0.25rem;
}

.old-value {
    color: #dc3545;
    text-decoration: line-through;
}

.new-value {
    color: #28a745;
    font-weight: 600;
}

.cr-reason {
    font-size: 0.8rem;
    color: #666;
    margin: 0.5rem 0;
    font-style: italic;
}

.cr-rejection {
    font-size: 0.8rem;
    color: #dc3545;
    margin-top: 0.5rem;
}

.cr-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Dual Scorecard Comparison */
.dual-comparison-header {
    background: #e8f4fd;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
    font-weight: 600;
    color: #2B5A9E;
}

.mismatch-summary {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 600;
}

.mismatch-cell {
    background: #f8d7da !important;
    color: #721c24 !important;
    font-weight: 700;
}

.match-badge {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
    font-weight: 600;
}

.verification-badge {
    display: inline-block;
    background: #17a2b8;
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Divider between audit log and change requests in combined tab */
.audit-section-divider {
    border: none;
    border-top: 2px solid #dee2e6;
    margin: 2rem 0 1.5rem;
}

/* No data placeholder */
.no-data {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Audit log table compact */
.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.audit-table th {
    background: #f8f9fa;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.audit-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

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

@media (max-width: 768px) {
    .admin-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .cr-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .change-request-modal {
        width: 95%;
        padding: 15px;
    }
}

/* Dual scorecard polling spinner */
.dual-poll-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #dee2e6;
    border-top-color: #2B5A9E;
    border-radius: 50%;
    margin: 0 auto;
    animation: dualSpin 0.8s linear infinite;
}

@keyframes dualSpin {
    to { transform: rotate(360deg); }
}
