/* Variáveis globais */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #008CBA;
    --danger-color: #ff3b3b;
    --text-color: #333;
    --bg-color: #f7f7f7;
    --border-color: #ddd;
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1; /* Faz o container crescer e empurrar o footer para baixo */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
}

/* Estilos melhorados para o menu administrativo */
.admin-nav {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    border-radius: 5px;
}

.admin-nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

.nav-link i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .admin-nav {
        width: 100%;
    }

    .admin-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
    }
}

/* Formulários */
.form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-center {
    display: block;
    margin: 0 auto;
}

/* Tabelas */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-top: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 0.9rem;
    margin: 0;
}

.table th,
.table td {
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 150px;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* Estilo para links na tabela */
.table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.table a:hover {
    text-decoration: underline;
}

/* Estilos para links na tabela */
.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-link:hover {
    background-color: rgba(76, 175, 80, 0.1);
    text-decoration: none;
}

.btn-link i {
    font-size: 1rem;
}

.text-muted {
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.text-muted i {
    font-size: 1rem;
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
    margin-top: auto; /* Empurra o footer para baixo */
}

.footer-text {
    font-size: 0.8rem;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer-logo {
    max-width: 100px;
    height: auto;
    margin-right: 1rem;
}

.footer a:hover {
    text-decoration: underline;
}

/* Utilitários */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .form-container {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .table {
        font-size: 0.9rem;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }
}

/* Página de Login */
.login-page {
    background: url('../img/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    height: 100vh; /* Alterado de min-height para height */
    overflow: hidden; /* Previne rolagem */
}

.login-page .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
}

.login-page .form-container {
    width: 100%;
    max-width: 400px;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.75);
}

.login-page .footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.login-form {
    background-color: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    margin: 2rem auto;
}

/* Estilo para o logo no login */
.login-logo {
    display: block;
    margin: 0 auto 2rem auto;
    max-width: 150px;
    height: auto;
}

/* Estilo para o logo na página inicial */
.index-logo {
    display: block;
    margin: 0 auto 1rem auto;
    max-width: 200px;
    height: auto;
}

.initiative-text {
    color: var(--text-color);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.text-danger {
    color: var(--danger-color);
    margin-top: 10px;
    text-align: center;
}

/* Grupo de botões para login */
.login-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
    width: 100%;
}

.login-buttons .btn {
    flex: 1;
    max-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-buttons .btn i {
    margin-right: 5px;
}

/* Seção de opções na página inicial */
.options-section {
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 769px) {
    .options-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        margin-top: 2rem;
    }

    .option-card {
        margin-bottom: 0;
    }
}

.option-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.option-card .card-content {
    flex-grow: 1;
}

.option-card .card-footer {
    margin-top: auto;
}

.section-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.option-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.option-card:hover {
    transform: translateY(-5px);
}

.option-card h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.option-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.option-card .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.option-card .btn i {
    margin-right: 8px;
}

.option-card .btn.btn-secondary {
    background-color: #007bff;
    transition: background-color 0.3s;
}

.option-card .btn.btn-secondary:hover {
    background-color: #0056b3;
}

.option-card form {
    max-width: 400px;
    margin: 0 auto;
}

.range-container {
    margin: 10px 0;
}
.range-info {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}
input[type="range"] {
    width: 100%;
}
.btn-submit {
    background-color: #4CAF50; /* Verde */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-submit:hover {
    background-color: #45a049; /* Verde escuro */
}

/* Estilo para mensagens de alerta */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Estilos para o campo de pesquisa melhorado */
.search-container {
    margin: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 500px;
}

.search-input {
    width: 100%;
    padding: 12px 40px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    transition: all 0.3s ease;
    background-color: white;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-tooltip {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: help;
}

.search-tooltip span {
    visibility: hidden;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    width: 200px;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.search-tooltip:hover span {
    visibility: visible;
    opacity: 1;
}

.search-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-buttons .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
}

.search-buttons .btn i {
    font-size: 1.1rem;
}

/* Responsividade para o campo de pesquisa */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .search-buttons {
        width: 100%;
    }

    .search-buttons .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Estilos para paginação personalizada */
.custom-paginate {
    margin-top: 1rem;
    text-align: center;
}

/* Remove o container padrão do DataTables */
.dataTables_wrapper .dataTables_paginate {
    float: none !important;
    text-align: center !important;
    padding-top: 1rem !important;
}

/* Estiliza os botões de paginação */
.dataTables_wrapper .paginate_button {
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem !important;
    border: 1px solid var(--border-color) !important;
    background: white !important;
    border-radius: 4px !important;
    color: var(--text-color) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.dataTables_wrapper .paginate_button:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.dataTables_wrapper .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.dataTables_wrapper .paginate_button.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Ajuste do layout da tabela */
.dataTables_wrapper {
    padding: 1rem 0;
    font-size: 0.9rem;
}

.dataTables_length {
    margin-bottom: 1rem;
    margin: 0.5rem 0;
}

.dataTables_length select {
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 0.3rem;
    margin: 0 0.3rem;
}

/* Estilos para a tabela de inscrições */
.table-inscricoes {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    background-color: white;
}

.table-inscricoes th,
.table-inscricoes td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 200px !important; /* Aumenta a largura máxima */
    font-family:sans-serif;
    font-size: 11px;
}

/* Adicione este estilo específico para a coluna do código de inscrição */
.table-inscricoes td:nth-child(23) { /* 23ª coluna (código de inscrição) */
    min-width: 250px !important; /* Aumentado de 150px para 250px */
    max-width: none !important; /* Remove o max-width */
    white-space: nowrap !important;
    overflow: visible !important; /* Alterado de hidden para visible */
    text-overflow: clip !important; /* Alterado de ellipsis para clip */
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 8px 12px !important;
}

.table-inscricoes th {
    background-color: var(--primary-color);
    color: white;
}

.table-inscricoes tr:nth-child(even) {
    background-color: #f2f2f2;
}

.table-inscricoes tr:hover {
    background-color: #e9e9e9;
}

.table-inscricoes .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.table-inscricoes .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.table-inscricoes .btn-primary:hover {
    background-color: #45a049;
}

.table-inscricoes .btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.table-inscricoes .btn-danger:hover {
    background-color: #e60000;
}