/*
associar_candidatos.css
 */
:root {
    --primary-color: #CC0000;
    --primary-dark: #8B0000;
    --primary-light: #FF5555;
    --accent-color: #FFD700;
    --bg-light: #fff5f5;
    --bg-gradient: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    --shadow-color: rgba(204, 0, 0, 0.15);
    --text-primary: #343a40;
    --text-secondary: #6c757d;
    --border-color: rgba(204, 0, 0, 0.1);
    --card-radius: 20px;
    --transition: all 0.3s ease;

    --status-active: #28a745;
    --status-inactive: #dc3545;
    --status-waiting: #ffc107;
    --status-ended: #6c757d;
}

html, body {
    height: 100%;
    background: var(--bg-gradient);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background-color: white;
    box-shadow: 0 4px 12px var(--shadow-color);
    padding: 0.8rem 1rem;
}

.navbar-brand {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.6rem;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.main-container {
    min-height: calc(100vh - 70px);
    padding: 2rem 1rem;
}

.content-card {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: var(--card-radius);
    box-shadow: 0 15px 35px var(--shadow-color);
    animation: fadeIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-title i {
    font-size: 1.6rem;
}

.card-body {
    padding: 2rem;
}

/* Instruction Panel */
.instruction-panel {
    background-color: var(--bg-light);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
    animation: fadeInUp 0.5s ease-out;
}

.instruction-icon {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.instruction-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.instruction-text p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.5;
}

/* Form Panels */
.form-panel {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

.form-panel-header {
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.form-panel-header i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.form-panel-header h3 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.form-panel-body {
    padding: 1.5rem;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-select, .form-control {
    border: 1px solid #ced4da;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    transition: var(--transition);
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(204, 0, 0, 0.15);
}

.form-select-lg {
    font-size: 1rem;
}

/* Eleição Info */
.eleicao-info {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1.2rem;
    margin-top: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Status Counter */
.status-counter {
    background-color: var(--bg-light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Candidatos Container */
.candidates-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 10px;
    background-color: #f8f9fa;
    padding: 1rem;
}

.candidate-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    border: 1px solid #e9ecef;
    transition: var(--transition);
    cursor: pointer;
}

.candidate-item:hover {
    transform: translateX(8px);
    background-color: var(--bg-light);
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.candidate-item:last-child {
    margin-bottom: 0;
}

.candidate-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    appearance: none;
    background: white;
    transition: var(--transition);
}

.candidate-checkbox:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.candidate-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.candidate-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #adb5bd;
}

.candidate-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    flex-grow: 1;
}

/* Search Input */
.search-container {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    padding-left: 2.5rem;
}

/* Status Colors */
.status-active {
    color: var(--status-active);
}

.status-inactive {
    color: var(--status-inactive);
}

.status-waiting {
    color: var(--status-waiting);
}

.status-ended {
    color: var(--status-ended);
}

/* Buttons */
.buttons-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-primary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #F3F4F6;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .buttons-container {
        flex-direction: column;
    }

    .instruction-panel {
        flex-direction: column;
    }

    .instruction-icon {
        margin-bottom: 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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