/* Importação da Fonte e Reset Básico */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* --- Paleta de Cores e Variáveis Globais --- */
:root {
    /* Tema Escuro (Padrão) */
    --bg-dark: #121212;
    --bg-medium: #1E1E1E;
    --bg-light: #2a2a2e;
    --border-color: #333333;
    --text-primary: #E0E0E0;
    --text-secondary: #A0A0A0;
    
    /* Cores de Acento Padrão (Roxo) */
    --accent-purple: #9370DB;
    --accent-purple-hover: #7E57C2;
    
    /* Cores de acento temáticas */
    --accent-red: #F44336;
    --accent-red-hover: #D32F2F;
    --accent-cyan: #00BCD4;
    --accent-cyan-hover: #0097A7;
    --accent-green: #2E7D32;
    --accent-green-hover: #1B5E20;

    --accent-blue: #4169E1;
    --accent-blue-hover: #3557C4;
    --success: #4CAF50;
    --error: #F44336;
    --warning: #FFC107;
    --transition-speed: 0.3s ease;
    --gold-color: #FFD700;
    --silver-color: #C0C0C0;
    --bronze-color: #CD7F32;

    /* Variáveis para Tema Claro */
    --light-bg-dark: #e1e2e4;
    --light-bg-medium: #7c7c7c;
    --light-bg-light: #a8a8a8;
    --light-border-color: #000000;
    --light-text-primary: #000000;
    --light-text-secondary: #000000;
}

body.light-mode {
    --bg-dark: var(--light-bg-dark);
    --bg-medium: var(--light-bg-medium);
    --bg-light: var(--light-bg-light);
    --border-color: var(--light-border-color);
    --text-primary: var(--light-text-primary);
    --text-secondary: var(--light-text-secondary);
}

/* Temas de Cores Dinâmicas por Cargo */
body.theme-red {
    --accent-purple: var(--accent-red);
    --accent-purple-hover: var(--accent-red-hover);
}

body.theme-cyan {
    --accent-purple: var(--accent-cyan);
    --accent-purple-hover: var(--accent-cyan-hover);
}

body.theme-green {
    --accent-purple: var(--accent-green);
    --accent-purple-hover: var(--accent-green-hover);
}


body {
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    position: relative; /* Necessário para a animação de fundo */
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Animação de Fundo "Chuva Digital" */
#background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    background-color: var(--accent-purple);
    border-radius: 50%;
    opacity: 0;
    animation: fall linear infinite;
}

@keyframes fall {
    from {
        transform: translateY(-20px);
        opacity: 0.6;
    }
    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}


#app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative; /* Garante que o app fique sobre a animação de fundo */
    z-index: 1;
}

/* --- Barra de Navegação Lateral (Sidebar) --- */
#sidebar {
    width: 260px;
    background-color: var(--bg-medium);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    transition: width var(--transition-speed), transform 0.4s ease, background-color var(--transition-speed), border-color var(--transition-speed);
    transform: translateX(0);
}
#sidebar.hidden {
    transform: translateX(-100%);
    width: 0;
    padding: 1.5rem 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

@keyframes float-glow {
    0%, 100% {
        transform: translateY(0);
        filter: drop-shadow(0 0 3px var(--accent-purple));
    }
    50% {
        transform: translateY(-5px);
        filter: drop-shadow(0 0 8px var(--accent-purple));
    }
}

.sidebar-header .logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    animation: float-glow 4s ease-in-out infinite;
}

.sidebar-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.menu-links {
    list-style: none;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    width: 100%;
    text-align: left;
    font-size: 1rem;
    transition: background-color var(--transition-speed), color var(--transition-speed), transform 0.2s ease;
}

.menu-item:hover, .menu-item.active {
    background-color: var(--accent-purple);
    color: white;
    transform: translateX(5px);
}

.menu-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

#sidebar .sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    transition: border-color var(--transition-speed);
}

#user-info {
    padding: 0 1rem 1rem 1rem;
}
#user-name {
    font-weight: 500;
    color: var(--text-primary);
}
#user-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* --- Conteúdo Principal --- */
#main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem 3rem;
    height: 100vh;
}

.view {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* --- Tela de Boas-Vindas / Login --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    position: relative;
}

#welcome-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-out;
    z-index: 10;
    cursor: pointer;
}
#welcome-splash.shrink {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

@keyframes logo-enter {
    0% { transform: scale(0.5) rotate(-360deg); opacity: 0; }
    70% { transform: scale(1.1) rotate(15deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.splash-logo {
    width: 150px;
    margin-bottom: 2rem;
    animation: logo-enter 1.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards,
               float-glow 4s ease-in-out 1.6s infinite;
}

#welcome-splash h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

@keyframes text-glow-and-fade-in {
    0% {
        opacity: 0;
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        text-shadow: 0 0 10px var(--accent-purple), 0 0 20px var(--accent-purple);
        transform: translateY(0);
    }
}
body.light-mode #welcome-splash h1 span {
    text-shadow: none;
}

#welcome-splash h1 span {
    display: inline-block;
    opacity: 0;
    animation: text-glow-and-fade-in 0.8s forwards;
}

@keyframes subtle-pulse {
    0%, 100% { color: var(--text-secondary); }
    50% { color: var(--text-primary); }
}

#welcome-splash p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-in-out 2s forwards, subtle-pulse 2.5s infinite 2s;
}

#welcome-splash.logged-in-welcome .splash-logo {
    width: 120px;
}
#welcome-splash.logged-in-welcome h1 {
    font-size: 2.5rem;
}

.auth-box {
    background: var(--bg-medium);
    padding: 3rem;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
    transition: opacity 0.8s ease-in, transform 0.8s ease-in-out, background-color var(--transition-speed), border-color var(--transition-speed);
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
body.light-mode .auth-box {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.auth-box.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
}
.welcome-logo {
    width: 120px;
    margin-bottom: 2rem;
}

.auth-box h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.auth-box p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-box .link {
    color: var(--accent-purple);
    cursor: pointer;
    text-decoration: none;
}
.auth-box .link:hover {
    text-decoration: underline;
}


/* --- Estilos de Componentes Genéricos --- */
.card {
    background-color: var(--bg-medium);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}
.card h2, .card h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color var(--transition-speed);
}
.card h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-align: left;
}
input[type="text"], input[type="password"], input[type="file"], input[type="number"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed), color var(--transition-speed);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-purple) 30%, transparent);
}

.paste-area {
    border: 2px dashed var(--border-color);
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: border-color 0.3s, background-color 0.3s;
    cursor: pointer;
}
.paste-area.pasting {
    border-color: var(--success);
    background-color: color-mix(in srgb, var(--success) 10%, transparent);
}
.paste-area p { text-align: center !important; margin-bottom: 0.5rem !important; }
.paste-area small { font-size: 0.8rem; }


button, label.button {
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color var(--transition-speed), transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
button:hover, label.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
button:active, label.button:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: none;
}
button:disabled {
    background-color: #555 !important;
    color: #888 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
button.primary, label.button.primary {
    background-color: var(--accent-purple);
    color: white;
}
button.primary:hover, label.button.primary:hover {
    background-color: var(--accent-purple-hover);
}
button.secondary, label.button.secondary {
    background-color: transparent;
    color: var(--accent-blue);
    border: 1px solid var(--accent-blue);
}
button.secondary:hover, label.button.secondary:hover {
    background-color: var(--accent-blue);
    color: white;
}
.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.button-group .back-button {
     background-color: #444;
     color: var(--text-secondary);
}
.button-group .back-button:hover {
    background-color: #555;
    color: var(--text-primary);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}
.modal-content {
    background-color: var(--bg-medium);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    border-top: 4px solid var(--accent-purple);
    animation: popIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    transition: background-color var(--transition-speed);
}
.modal-content.large-modal {
    max-width: 90%;
    width: 850px;
}
.modal-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    background: none;
    border: none;
}
.image-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}


/* --- Sistema de Notificação (Toast) --- */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    min-width: 320px;
    animation: slideInUp 0.5s forwards;
    opacity: 0;
}
@keyframes slideInUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes slideOutDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(100%); opacity: 0; }
}
.toast.removing {
    animation: slideOutDown 0.5s forwards;
}
.toast.success { background-color: var(--success); }
.toast.error { background-color: var(--error); }
.toast.info { background-color: var(--accent-blue); }
.toast i { font-size: 1.5rem; }

/* --- Overlay de Carregamento com Barra --- */
#loading-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}
#loading-overlay.hidden { display: none; }
.loading-content { text-align: center; width: 300px; }
#loading-message {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    min-height: 20px;
}
#loading-success { color: var(--success); }
#loading-success i {
    font-size: 60px;
    animation: popIn 0.3s ease;
}
@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.loading-bar-container {
    width: 100%;
    height: 10px;
    background-color: var(--bg-light);
    border-radius: 5px;
    margin: 0 auto;
    overflow: hidden;
}
.loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 5px;
    transition: width 0.4s ease-out;
    animation: loading-shine 2s infinite;
}
@keyframes loading-shine {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* --- Botão de Iniciar Recrutamento / Curso --- */
.start-process-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}
.start-process-card {
    text-align: center;
    background: none;
    border: none;
    box-shadow: none;
}
.start-process-card h2 {
    font-size: 2.5rem;
    border: none;
    justify-content: center;
}
.start-process-card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 2.5rem auto;
}
.start-process-btn {
    padding: 20px 40px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50px;
    border: 2px solid var(--accent-purple);
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-blue));
    box-shadow: 0 0 20px color-mix(in srgb, var(--accent-purple) 40%, transparent);
    animation: pulse-glow 2.5s infinite ease-in-out;
    text-transform: none;
}
.start-process-btn i {
    margin-right: 15px;
}
.start-process-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 35px color-mix(in srgb, var(--accent-purple) 70%, transparent);
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px color-mix(in srgb, var(--accent-purple) 40%, transparent);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 30px color-mix(in srgb, var(--accent-purple) 60%, transparent);
    }
}

/* Estilos para Checklist */
.checklist-container {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.checklist-item {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}
.checklist-item:hover {
    background-color: color-mix(in srgb, var(--text-primary) 5%, var(--bg-light));
}
.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    accent-color: var(--accent-purple);
    cursor: pointer;
}
.checklist-item label {
    margin-bottom: 0;
    width: 100%;
    cursor: pointer;
}

/* Estilos para links pós-recrutamento */
#post-recruitment-links-view .card {
    text-align: center;
}
.link-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-blue);
    text-align: left;
}
.link-box strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.link-box a {
    color: var(--accent-blue);
    word-break: break-all;
}


/* --- Painel Admin --- */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.admin-tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    text-transform: capitalize;
}
.admin-tab:hover {
    color: var(--text-primary);
}
.admin-tab.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-purple);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.4s; }

.spinner-container {
    display: flex;
    justify-content: center;
    padding: 3rem;
}

.list-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    background-color: var(--bg-light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-blue);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
}
.list-item:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
body.light-mode .list-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.list-item-info {
    flex-grow: 1;
}
.list-item.is-inactive { border-left-color: var(--error); opacity: 0.6; }
.list-item.is-pending { border-left-color: var(--warning); }
.list-item.is-blacklist { border-left-color: var(--error); }
.list-item.is-dirty-record { border-left-color: var(--warning); }
.list-item.is-reproved { border-left-color: var(--error); }
.list-item.is-cancelled { border-left-color: var(--error); opacity: 0.6; }


.list-item p {
    margin: 0.2rem 0;
    text-align: left;
}
.list-item-header {
    font-weight: 700;
    color: var(--text-primary);
}
.list-item-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}
.list-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.list-item-controls {
    margin-left: auto;
    padding-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-actions-menu {
    position: relative;
    display: inline-block;
}
.actions-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.actions-menu-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-dark);
}
.actions-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 10;
    min-width: 220px;
    overflow: hidden;
    animation: fadeIn 0.2s;
}
.actions-dropdown.visible {
    display: block;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}
.action-item:hover {
    background-color: var(--accent-purple);
    color: white;
}
.action-item i {
    width: 16px;
    text-align: center;
}
.action-item.delete-action, .action-item.cancel-action {
    color: var(--error);
}
.action-item.delete-action:hover, .action-item.cancel-action:hover {
    background-color: var(--error);
    color: white;
}
.action-item.start-action { color: var(--success); }
.action-item.start-action:hover { background-color: var(--success); color: white; }


.progress-bar-container {
    width: 100%;
    background-color: var(--bg-light);
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.progress-bar {
    width: 0%;
    height: 10px;
    background-color: var(--accent-purple);
    border-radius: 5px;
    transition: width var(--transition-speed);
}

/* Estilos para Resumo de Recrutamento */
.recruitment-summary-content .card { border: none; background: none; box-shadow: none; padding: 0; }
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.summary-item {
    background-color: var(--bg-dark);
    padding: 1rem;
    border-radius: 8px;
    word-wrap: break-word;
}
.summary-item strong {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.summary-item span {
    color: var(--text-primary);
    font-size: 1.1rem;
}
.summary-item a.image-view-link {
    color: var(--accent-blue);
    text-decoration: none;
    cursor: pointer;
    font-size: 1.1rem;
}
.summary-item a.image-view-link:hover {
    text-decoration: underline;
}
.question-results-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}
.question-results-list li {
    background-color: var(--bg-dark);
    padding: 0.75rem 1rem;
    border-radius: 5px;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.icon-correct { color: var(--success); }
.icon-incorrect { color: var(--error); }
.question-results-list li > i {
    margin-top: 4px;
    font-size: 1.2rem;
}
.question-results-list li > div {
    flex: 1;
}

.feedback-box {
    background-color: var(--bg-dark);
    border-left: 3px solid var(--accent-purple);
    padding: 0.75rem;
    margin-top: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: left;
}
.feedback-box strong {
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
}

.status-approved { color: var(--success); font-weight: bold; }
.status-reproved { color: var(--error); font-weight: bold; }

.hidden {
    display: none !important;
}

/* --- Contabilidade e Top Performers --- */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: -1rem; /* Compensa margem do h2 */
}
.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    width: 100%;
    margin-top: -1rem;
    margin-bottom: 1rem;
}
.view-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.view-toggle label {
    margin-bottom: 0;
}
.view-toggle select {
    margin-bottom: 0;
    padding: 8px 12px;
    min-width: 220px;
}
.week-accordion .week-header {
    background-color: var(--bg-light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}
.week-accordion .week-header:hover {
    background-color: color-mix(in srgb, var(--text-primary) 5%, var(--bg-light));
}
.week-accordion .week-header h3 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.2rem;
}
.week-accordion .week-header .toggle-icon {
    transition: transform 0.3s;
}
 .week-accordion .week-header.active .toggle-icon {
    transform: rotate(180deg);
}
.week-accordion .week-content {
    display: none;
    padding: 1.5rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    animation: fadeIn 0.4s;
}
.accounting-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.accounting-table th, .accounting-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.accounting-table th {
    color: var(--text-secondary);
    font-weight: 500;
}
.accounting-table td {
    color: var(--text-primary);
}
.accounting-table tr:last-child td {
    border-bottom: none;
}
.accounting-table .currency {
    color: var(--success);
    font-weight: 700;
}

.log-list {
    list-style: none;
    padding: 0;
}
.log-item {
    background-color: var(--bg-dark);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--accent-blue);
    transition: background-color 0.2s;
}
.log-item:hover {
    background-color: var(--bg-light);
}
.log-item .log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 10px;
}
.log-item .log-header strong {
    color: var(--text-primary);
    font-size: 1.1rem;
    text-transform: capitalize;
}
.log-item .log-header .log-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.log-item .log-details {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.log-accordion {
    background-color: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: background-color 0.3s;
}
.log-accordion[open] {
    background-color: var(--bg-dark);
}
.log-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    list-style: none;
}
.log-accordion-header::-webkit-details-marker {
    display: none;
}
.log-accordion-header:hover {
    background-color: var(--bg-light);
}
.log-accordion-header div {
    display: flex;
    align-items: center;
    gap: 10px;
}
.log-accordion-header strong {
    font-size: 1.2rem;
    color: var(--text-primary);
}
.log-accordion-header .log-count {
    background-color: var(--bg-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.log-accordion[open] summary.log-accordion-header .log-count {
     background-color: var(--accent-purple);
     color: white;
}
.log-accordion-header::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}
.log-accordion[open] > .log-accordion-header::after {
    transform: rotate(180deg);
}

.log-accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
}
.log-accordion-content .log-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
.log-accordion-content .log-list::-webkit-scrollbar {
    width: 8px;
}
.log-accordion-content .log-list::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}
.log-accordion-content .log-list::-webkit-scrollbar-thumb {
    background-color: var(--bg-light);
    border-radius: 4px;
    border: 2px solid var(--bg-dark);
}
.log-accordion-content .log-list .log-item {
    border-left: none;
    padding-left: 0;
    background: none;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
 .log-accordion-content .log-list .log-item:last-child {
    border-bottom: none;
 }
.log-accordion-content .log-list .log-item:hover {
    background: rgba(0, 0, 0, 0.03);
}
body.light-mode .log-accordion-content .log-list .log-item:hover {
     background: rgba(0, 0, 0, 0.03);
}


#watermark {
    position: fixed;
    bottom: 15px;
    left: 15px;
    font-size: 0.8rem;
    color: color-mix(in srgb, var(--text-primary) 20%, transparent);
    z-index: 500;
    pointer-events: none;
    transition: left 0.4s ease, color 0.3s;
    font-weight: 300;
}

/* Estilos para Top Performers */
.top-performer-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.top-performer-item {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    gap: 1rem;
}
.trophy {
    font-size: 2rem;
    width: 30px;
    text-align: center;
}
.trophy.gold { color: var(--gold-color); }
.trophy.silver { color: var(--silver-color); }
.trophy.bronze { color: var(--bronze-color); }

.performer-info .name {
    font-weight: 700;
    color: var(--text-primary);
}
.performer-info .count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Multi-selector para Cursos */
.multi-selector-container {
    position: relative;
    margin-bottom: 1rem;
}
.selected-items-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    border-radius: 8px;
    min-height: 48px;
    margin-bottom: 0.5rem;
}
.selected-item-pill {
    background-color: var(--accent-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.remove-pill-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}
.remove-pill-btn:hover {
    opacity: 1;
}
.available-items-list {
    position: absolute;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    list-style: none;
    padding: 0;
    margin-top: -0.5rem;
}
.available-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
}
.available-item:hover {
    background-color: var(--accent-purple);
    color: white !important;
}
.available-item.disabled {
    cursor: not-allowed;
    color: var(--text-secondary);
}
.available-item small {
    color: var(--text-secondary);
}
.available-item:hover small {
    color: var(--text-primary);
}
body.light-mode .available-item:hover small {
    color: #f0f2f5;
}


/* NOVO: Estilo para resumo de curso */
.course-summary-container {
    padding: 0;
    background: none;
}
.course-summary-header {
    text-align: center;
    margin-bottom: 2rem;
}
.course-summary-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    border: none;
    margin: 0 0 0.5rem 0;
    justify-content: center;
}
.course-summary-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}
.course-summary-main-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.detail-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}
.detail-card i {
    font-size: 2rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
}
.detail-card h4 {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.detail-card p {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
}
.course-participants-section {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
}
.course-participants-section h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.participant-item {
    background-color: var(--bg-dark);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.participant-item i {
    color: var(--text-secondary);
}

/* NOVO: Estilos para o Botão de Tema */
#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--bg-light);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1500;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    color: var(--accent-purple);
}

#theme-toggle i {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

#theme-toggle .fa-sun {
    display: none;
}
body.light-mode #theme-toggle .fa-moon {
    display: none;
}
body.light-mode #theme-toggle .fa-sun {
    display: block;
}

/* NOVO: Estilos para Profile > Mudar Senha */
.profile-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.profile-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
}

/* Estilos para Barra de Pesquisa do Admin */
.admin-search-container {
    position: relative;
    margin-bottom: 1rem;
}

.admin-search-input {
    width: 100%;
    padding: 12px 12px 12px 40px; /* Add padding for the icon */
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed), color var(--transition-speed);
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-purple) 30%, transparent);
}

.admin-search-container .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none; /* Garante que o ícone não intercepte cliques */
}


/* --- Ajustes para a Tela de Seleção de Auxiliares (ATUALIZADO E CENTRALIZADO) --- */
.simple-multi-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto; /* Adicionado para centralizar */
    margin-right: auto; /* Adicionado para centralizar */
    margin-bottom: 1.5rem;
    text-align: left;
}


.simple-multi-selector label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.simple-multi-selector .selected-items-display {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-dark);
    min-height: 120px;
    padding: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}

.simple-multi-selector .selected-items-display p {
    width: 100%;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: auto;
}

.simple-multi-selector .available-items-list {
    position: static;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-light);
    min-height: 150px;
    max-height: 250px;
    overflow-y: auto;
}

.simple-multi-selector .available-items-list .available-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.simple-multi-selector .available-items-list .available-item:hover {
    background-color: var(--accent-purple);
    color: white;
}

#officers-container .button-group {
    margin-top: 0;
    justify-content: center; /* Centraliza o botão */
    width: 100%;
}

#submitOfficers {
    padding: 12px 25px; /* Define o tamanho do botão */
    font-size: 1rem;    /* Define o tamanho da fonte */
    max-width: 300px;   /* Define uma largura máxima */
}