/* LeadScore CSS Styles */

:root {
    --color-alta: #198754;
    --color-media: #ffc107;
    --color-baja: #fd7e14;
    --color-ninguna: #dc3545;
    --color-primary: #0d6efd;
    --color-secondary: #6c757d;
}

/* Priority badges */
.badge-prioridad-alta {
    background-color: var(--color-alta) !important;
    color: white;
}

.badge-prioridad-media {
    background-color: var(--color-media) !important;
    color: black;
}

.badge-prioridad-baja {
    background-color: var(--color-baja) !important;
    color: white;
}

.badge-prioridad-ninguna {
    background-color: var(--color-ninguna) !important;
    color: white;
}

/* Form styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
}

/* Tables */
.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Progress bars */
.progress {
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-text strong {
    font-weight: 600;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Spinner animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Worker sections */
.worker-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.worker-section:hover {
    border-color: var(--color-primary);
}

.worker-header {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem 0.375rem 0 0;
    font-weight: 600;
}

.worker-body {
    padding: 1rem;
}

/* Score circle animation */
.score-circle {
    transition: all 0.5s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn {
        font-size: 0.875rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    /* Stack statistics cards on mobile */
    .row [class*="col-md-3"] {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .card-header h5 {
        font-size: 1rem;
    }

    .table thead th {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }

    .table tbody td {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Custom scrollbar for table */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/error states */
.is-valid {
    border-color: #198754;
}

.is-invalid {
    border-color: #dc3545;
}

/* Custom form validation */
.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.4.71.1-.08c.21-.14.24-.4.24-.58.01-.19.1-.4.1-.58 0-.19.17-.33.17-.45v-.02c0-.1-.14-.27-.25-.42l-.05-.07-.07-.1c-.13-.17-.28-.38-.43-.6-.14-.22-.3-.45-.47-.7s-.34-.52-.5-.77c-.17-.25-.32-.47-.46-.67-.14-.21-.26-.39-.36-.55l-.03-.05-.2-.31c-.03-.05-.06-.09-.09-.14-.01-.02-.02-.04-.04-.06l-.02-.03v-.02c0-.01 0-.02.01-.03l.01-.02c.03-.07.07-.13.13-.18.05-.05.12-.09.19-.12.05-.02.1-.03.15-.03.07 0 .14.02.2.05l.02.01c.01 0 .02.01.03.02.06.04.11.09.15.15l.01.01c.05.07.09.15.12.24l.01.02c.01.03.02.06.03.09l.01.03v.01l.01.02v.01l.01.02v.01l.01.02v.01c0 .01.01.03.01.04v.01c0 .01.01.03.01.04v.02c0 .01.01.03.01.04v.02c0 .01.01.03.01.04v.02c0 .01.01.02.01.03v.02c0 .01.01.02.01.03v.01c0 .01 0 .02.01.03v.01c0 .01 0 .02.01.03v.01c0 .01 0 .02.01.03v.01c0 .01 0 .02.01.03v.01c0 .01 0 .02.01.03v.01c0 .01 0 .02.01.03v.01c0 .01 0 .01.01.02v.01c0 .01 0 .01.01.02v.01c0 .01 0 .01.01.02v.01c0 .01 0 .01.01.02v.01c0 0 0 .01.01.02v.01c0 0 0 .01.01.02v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 .01.01.01v.01c0 0 0 0 .01.01v.01h.01'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid #f3f3f3;
    border-top: 0.3rem solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Print styles */
@media print {
    .navbar,
    .btn,
    .card-header,
    nav {
        display: none !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }

    body {
        font-size: 12pt;
    }
}