.selecao-page {
    background-image: url('/assets/waves.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* height: 100vh; */
    display: flex;
    /* align-items: center; */
    /* justify-content: center; */
}

.selecao-page .container {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.selecao-page .module-card {
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.selecao-page .module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.selecao-page .card-body {
    display: flex;
    align-items: center;
    height: 100%;
}

.selecao-page .card-body img {
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selecao-page .card-description {
    flex: 1;
    margin-left: 15px;
}

.selecao-page .card-footer {
    display: flex;
    justify-content: space-between;
}

.selecao-page .exit-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 18px;
}

.selecao-page .exit-btn i {
    margin-right: 5px;
}

.fixed-logo {
    height: auto;
    width: 15rem;
}

/* Fix: dropdown do DataTable de anoxia dentro do modal */

#table-anoxia .dash-table-container {
    overflow: visible !important;
}

#table-anoxia .dash-spreadsheet-container {
    overflow: visible !important;
}

#table-anoxia .dash-spreadsheet-inner {
    overflow: visible !important;
}

/* Corrige conflito Bootstrap .row dentro do DataTable */
#table-anoxia .row {
    display: block;
    margin: 0;
}

/* ── Página de Projetos ── */

/* Cards de projeto */
.project-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    background: #fff;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.project-card.selected {
    border: 2px solid #2196f3;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.25);
}

.project-card .card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card .project-name {
    font-size: 1.05rem;
    font-weight: 500;
    color: #222;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card .project-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.6rem;
}

.project-card .project-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.project-card .project-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: flex-end;
    margin-top: auto;
}

.project-card .project-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Card de novo projeto (botão +) */
.project-card-new {
    border: 2px dashed #ccc;
    border-radius: 10px;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.project-card-new:hover {
    border-color: #2196f3;
    background: #e3f2fd;
}

.project-card-new .plus-icon {
    font-size: 2.5rem;
    color: #aaa;
    transition: color 0.2s;
}

.project-card-new:hover .plus-icon {
    color: #2196f3;
}

/* Badges de tipo de simulação */
.sim-badge-marinha {
    background-color: #e3f2fd;
    color: #1565c0;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.sim-badge-lacustre {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Painel de simulações */
#simulations-panel h4 {
    color: #353766;
}

#simulations-panel .dash-table-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ── Container principal da pagina de projetos ── */
.projects-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 20px);
    padding: 20px 24px;
}

.projects-content-card {
    width: 100%;
    max-width: 1400px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    padding: 16px 28px 28px;
    margin: auto;
}

/* ── Modal de detalhes da simulacao ── */
#sim-detail-modal .modal-dialog {
    max-width: 950px;
}

#sim-detail-modal .modal-body {
    max-height: 80vh;
    overflow-y: auto;
}

.sim-detail-section {
    margin-bottom: 1.5rem;
}

.sim-detail-section-title {
    color: #353766;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
}

.sim-stat-table th {
    background-color: #353766;
    color: white;
    font-size: 0.85rem;
}

.sim-stat-table td {
    font-size: 0.85rem;
}

.sim-param-label {
    font-weight: 500;
    color: #555;
    min-width: 180px;
    width: 35%;
}

/* Barra de Projeto/Simulação */
#project-bar {
    padding: 0 0.5rem !important;
}

#project-bar .btn {
    font-size: 0.8rem;
}

/* card-1 precisa de position:relative para ancorar os tabs absolutamente posicionados
   (.tab_level1 usa position:absolute; top:-52px) */
#card-1 {
    position: relative;
}

/* Barra de controles de simulação (painel direito COT) */
.sim-ctrl-label {
    font-size: 0.72rem;
    margin-bottom: 0;
    color: #6c757d;
    white-space: nowrap;
}

.sim-controls-row > .col,
.sim-controls-row > [class*="col-"] {
    padding: 0 4px;
}

/* Alinhar altura dos dropdowns Dash com inputs (36px) */
#project-bar .dash-dropdown .Select-control,
.sim-controls-row .dash-dropdown .Select-control {
    height: 36px !important;
    min-height: 36px !important;
    overflow: hidden;
}

#project-bar .dash-dropdown .Select-value,
#project-bar .dash-dropdown .Select-placeholder,
.sim-controls-row .dash-dropdown .Select-value,
.sim-controls-row .dash-dropdown .Select-placeholder {
    line-height: 36px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#project-bar .dash-dropdown .Select-input,
.sim-controls-row .dash-dropdown .Select-input {
    height: 34px !important;
}

#project-bar .dash-dropdown .Select-input > input,
.sim-controls-row .dash-dropdown .Select-input > input {
    padding: 0 !important;
    line-height: 34px !important;
}

/* Remover margem extra do wrapper .Select */
#project-bar .dash-dropdown .Select,
.sim-controls-row .dash-dropdown .Select {
    margin: 0 !important;
}

/* Inputs e dropdowns: garantir mesma altura de 36px */
#project-bar .form-control,
.sim-controls-row .form-control {
    height: 36px !important;
    font-size: 0.85rem;
}

.sim-controls-row .btn {
    font-size: 0.8rem;
}

/* Override materia.css que força estilo escuro no #plot-toc */
.sim-controls-row #plot-toc {
    background-color: transparent !important;
    background-image: none !important;
    color: #2196f3 !important;
    border: 1px solid #2196f3 !important;
    box-shadow: none !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0.25rem 0.5rem !important;
    padding-left: 0.5rem !important;
}

.sim-controls-row #plot-toc:hover {
    background-color: #2196f3 !important;
    color: #fff !important;
}

/* Override materia.css para #events-collapse-button */
.sim-controls-row #events-collapse-button {
    font-size: 0.8rem !important;
    width: 100% !important;
    background: rgb(33 150 243 / 15%) !important;
    border: 1px solid #2196f3 !important;
    color: #1565c0 !important;
}

.sim-controls-row #events-collapse-button:hover {
    background: rgb(33 150 243 / 30%) !important;
}

/* Modal de anoxia */
#events-collapse .modal-dialog {
    max-width: 900px;
}

/* ===== Modal de Gestão de Usuários (Admin) ===== */

#admin-modal .modal-dialog {
    max-width: 1000px;
}

#admin-modal .modal-body {
    padding: 20px 25px;
}

/* Tabela */
.admin-table-wrapper {
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    overflow: hidden;
}

.admin-table-wrapper .dash-spreadsheet-container .dash-spreadsheet-inner td.dash-cell {
    cursor: pointer;
}

/* Badges de status */
.admin-status-active {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #d4edda;
    color: #155724;
}

.admin-status-pending {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #fff3cd;
    color: #856404;
}

.admin-status-inactive {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: #f8d7da;
    color: #721c24;
}

/* Contadores */
.admin-count-card {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.admin-count-total {
    background: #e8eaf6;
    color: #283593;
}

.admin-count-active {
    background: #d4edda;
    color: #155724;
}

.admin-count-pending {
    background: #fff3cd;
    color: #856404;
}

.admin-count-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Badge de contagem */
.admin-badge-count {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #e8eaf6;
    color: #283593;
}

/* Projeto list items */
.admin-project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 4px;
    background: #f8f9fc;
    font-size: 13px;
}

.admin-project-item:hover {
    background: #eef2ff;
}

.admin-project-sims {
    font-size: 11px;
    color: #6c757d;
}

/* Filtro ativo */
.admin-filter-btn.active {
    font-weight: 600;
}

/* Detalhe do usuário */
#admin-user-detail {
    animation: fadeIn 0.2s ease-in;
}

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