/* ==========================
   AXIS4 – Visual Identity CSS
   Inspirado em UIUX Project Platform (Behance)
   ========================== */

body {
    background-color: #EFEFEF; /* Light Gray */
    color: #2A2A2A;            /* Primary Text */
    font-family: 'Inter', 'Segoe UI', sans-serif;
    padding: 2rem;
}

:root {
    --atividade-drawer-width: 680px;
}

.dashboard-title {
    color: #333;
}

/* ================= HEADER ================= */
.header {
    background-color: #191919; /* Darkest */
    color: #3086FF;            /* Blue */
    padding: 1.2rem 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    border-radius: 12px;
}

/* ============== MAIN CONTAINER ============== */
.content {
    margin-top: 2rem;
    background-color: white;
    padding: 2.2rem;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* ============== BUTTONS ============== */
button, .btn {
    background-color: #3086FF;  /* Blue */
    color: white;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

button:hover, .btn:hover {
    background-color: #256DD9;
}

.btn-editar {
    background-color: #FFC107 !important; /* Yellow */
    color: #2A2A2A !important;
}

.btn-editar:hover {
    background-color: #E6B800 !important;
}

.btn-excluir {
    background-color: #F44336 !important; /* Red */
    color: white !important;
}

.btn-excluir:hover {
    background-color: #C82333 !important;
}

/* ============== BOOTSTRAP SELECT ============== */
.bootstrap-select .dropdown-menu {
    max-height: 200px;
    overflow-y: auto;
}

.bootstrap-select .btn {
    background-color: white !important;
    color: #2A2A2A !important;
    border: 1px solid #ced4da;
    font-weight: 500;
    border-radius: 30px;
    padding: 0.4rem 1.2rem;
}

.bootstrap-select .btn:hover {
    background-color: #F1F1F1 !important;
}

.bootstrap-select .bs-actionsbox .btn {
    width: 48%;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    margin: 0 1%;
    border-radius: 20px;
}

/* ============== ALERT TOGGLE BUTTON ============== */
.alert-toggle {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 4px;
}

.alert-toggle:hover,
.alert-toggle:focus {
    background-color: transparent !important;
    outline: none;
    box-shadow: none;
}

/* ============== RISK MATRIX COLORS ============== */
.heatmap-wrapper .bg-baixo {
    background-color: #4CAF50 !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.heatmap-wrapper .bg-moderado {
    background-color: #FBC02D !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.heatmap-wrapper .bg-alto {
    background-color: #FF9800 !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.heatmap-wrapper .bg-critico {
    background-color: #F44336 !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.heatmap-wrapper table td,
.heatmap-wrapper table th {
    vertical-align: middle;
}

.heatmap-wrapper .table thead th[colspan] {
    text-align: center;
}

.heatmap-wrapper .table thead th,
.heatmap-wrapper .table tbody td {
    width: 20%;
    min-width: 120px;
}

.heatmap-wrapper .coluna-probabilidade {
    width: auto !important;
    white-space: nowrap;
}

/* ============== PROJETOS - HEADER & EQUIPE ============== */
#projeto-header .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.375rem;
    gap: 0;
}

#projeto-header .btn-icon i {
    font-size: 1.1rem;
    line-height: 1;
}

#projeto-header .btn-icon.btn-outline-secondary {
    color: #495057;
    border-color: #ced4da;
    background-color: #ffffff;
}

#projeto-header .btn-icon.btn-outline-secondary:hover,
#projeto-header .btn-icon.btn-outline-secondary:focus {
    color: #343a40;
    border-color: #adb5bd;
    background-color: #f8f9fa;
}

#projeto-header .btn-icon.btn-outline-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.project-team-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-team-member {
    display: flex;
    align-items: center;
}

.project-team-member-content {
    width: 100%;
    min-width: 0;
}

.project-team-member-name {
    min-width: 0;
}

.project-team-member-badge {
    white-space: nowrap;
}

/* ============== PROJETOS - KANBAN ============== */
[data-kanban-board] {
    gap: 1rem 0;
}

.kanban-column-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.kanban-column-body {
    min-height: 6rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.kanban-column-body.is-drag-over {
    background-color: #e9f2ff;
}

.kanban-card {
    cursor: grab;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

[data-kanban-board][data-kanban-enabled="false"] .kanban-card {
    cursor: default;
}

.kanban-card-chosen {
    box-shadow: 0 0 0.75rem rgba(13, 110, 253, 0.35);
}

.kanban-card-ghost {
    opacity: 0.4;
}

.kanban-card-loading {
    opacity: 0.6;
}

.kanban-card-dragging {
    cursor: grabbing;
    opacity: 0.85;
}

.kanban-card-updated {
    animation: kanbanPulse 1s ease;
}

@keyframes kanbanPulse {
    0% {
        box-shadow: 0 0 0 rgba(13, 110, 253, 0.0);
    }
    50% {
        box-shadow: 0 0 0.75rem rgba(13, 110, 253, 0.4);
    }
    100% {
        box-shadow: 0 0 0 rgba(13, 110, 253, 0.0);
    }
}

/* ============== PROJETOS - TIMELINE ============== */
:root {
    --tl-color-ainiciar: #6c757d;
    --tl-color-ainiciar-border: #565e64;
    --tl-color-ainiciar-hover: #818992;
    --tl-color-ainiciar-glow: rgba(108, 117, 125, 0.35);

    --tl-color-emandamento: #f2c94c;
    --tl-color-emandamento-border: #c39b00;
    --tl-color-emandamento-hover: #f6d878;
    --tl-color-emandamento-glow: rgba(242, 201, 76, 0.35);

    --tl-color-concluida: #27ae60;
    --tl-color-concluida-border: #1f8e4c;
    --tl-color-concluida-hover: #2fc972;
    --tl-color-concluida-glow: rgba(39, 174, 96, 0.35);

    --tl-color-revisada: #2f80ed;
    --tl-color-revisada-border: #1c6dd0;
    --tl-color-revisada-hover: #3a8bff;
    --tl-color-revisada-glow: rgba(47, 128, 237, 0.35);

    --tl-color-atrasada: #eb5757;
    --tl-color-atrasada-border: #c44545;
    --tl-color-atrasada-hover: #f06f6f;
    --tl-color-atrasada-glow: rgba(235, 87, 87, 0.35);

    --tl-tooltip-max-width: 420px;
    --tl-bar-height: 24px;
    --tl-bar-radius: 10px;
}

.projeto-timeline {
    --tl-row-height: 36px;
    --tl-bar-height: 24px;
    --tl-bar-radius: 10px;
    --tl-bar-border-width: 1px;
    --tl-bar-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    --tl-bar-shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.12);
}

@media (max-width: 576px) {
    .projeto-timeline {
        --tl-row-height: 32px;
        --tl-bar-height: 22px;
    }
}

.projeto-timeline .timeline-filters label {
    font-weight: 500;
}

.projeto-timeline .timeline-controls {
    gap: 0.75rem;
}

/* ============== PROJETOS - DETALHE (LISTA) ============== */
.atividade-link {
    color: #212529;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.atividade-link:visited {
    color: #212529;
}

.atividade-link:hover,
.atividade-link:focus {
    color: #212529;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(13, 110, 253, 0.6);
}

.atividade-link:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.35);
    outline-offset: 2px;
    border-radius: 2px;
}

.btn.btn-ghost {
    background-color: transparent;
    color: #495057;
    border: 1px solid rgba(73, 80, 87, 0.4);
    box-shadow: none;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn.btn-ghost:hover,
.btn.btn-ghost:focus {
    color: #212529;
    background-color: rgba(73, 80, 87, 0.08);
    border-color: rgba(73, 80, 87, 0.6);
    text-decoration: none;
}

.btn.btn-ghost:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.35);
    outline-offset: 2px;
}

.btn.btn-ghost:active {
    color: #1f2326;
    background-color: rgba(73, 80, 87, 0.15);
    border-color: rgba(73, 80, 87, 0.6);
}

.btn.btn-ghost.text-danger {
    color: var(--bs-danger) !important;
    border-color: rgba(var(--bs-danger-rgb), 0.4);
}

.btn.btn-ghost.text-danger:hover,
.btn.btn-ghost.text-danger:focus {
    color: var(--bs-danger) !important;
    background-color: rgba(var(--bs-danger-rgb), 0.08);
    border-color: rgba(var(--bs-danger-rgb), 0.6);
}

.btn.btn-ghost.text-danger:active {
    color: var(--bs-danger) !important;
    background-color: rgba(var(--bs-danger-rgb), 0.15);
    border-color: rgba(var(--bs-danger-rgb), 0.6);
}

.btn.btn-ghost.btn-sm {
    padding: 0.25rem 0.5rem;
    line-height: 1.25;
}

.badge.badge-muted {
    color: #495057;
    background-color: #e9ecef;
    border: 1px solid rgba(73, 80, 87, 0.25);
    font-weight: 500;
}

.pacote-card-header {
    gap: 0.75rem;
}

.pacote-card-actions {
    flex: 0 0 auto;
}

.pacote-card-actions .btn {
    white-space: nowrap;
}

.pacote-card-actions .dropdown-menu {
    min-width: 14rem;
}

.pacote-card-actions .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.atividade-actions .btn {
    white-space: nowrap;
}

.atividade-actions .dropdown-menu {
    min-width: 10rem;
}

.projeto-timeline .timeline-controls .timeline-search {
    min-width: 220px;
}

.projeto-timeline .timeline-controls .timeline-search input[type="search"] {
    min-height: 2.25rem;
}

.projeto-timeline .timeline-group-actions .btn {
    white-space: nowrap;
}

.projeto-timeline .timeline-status-fieldset {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    padding: 1rem;
    background-color: #f8f9fa;
}

.projeto-timeline .timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.projeto-timeline .timeline-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.projeto-timeline .timeline-legend-color {
    width: 1.75rem;
    height: 0.65rem;
    border-radius: var(--tl-bar-radius);
    border: var(--tl-bar-border-width, 1px) solid rgba(0, 0, 0, 0.2);
    box-shadow: var(--tl-bar-shadow);
    display: inline-block;
}

.projeto-timeline .timeline-legend-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    text-transform: none;
}

.projeto-timeline .timeline-viewport-wrapper {
    min-height: 260px;
}

.projeto-timeline .timeline-viewport {
    min-height: 220px;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    background-color: #fff;
    padding: 0.5rem;
}

.projeto-timeline .timeline-loading {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: #0d6efd;
}

.projeto-timeline .timeline-empty {
    border: 1px dashed #ced4da;
    border-radius: 0.75rem;
    background-color: #f8f9fa;
}

.projeto-timeline .timeline-tooltip {
    position: fixed;
    z-index: 2000;
    background-color: #212529;
    color: #f8f9fa;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.25);
    max-width: var(--tl-tooltip-max-width, 420px);
    font-size: 0.875rem;
    pointer-events: auto;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.projeto-timeline .timeline-tooltip .timeline-tooltip-id {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ced4da;
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.projeto-timeline .timeline-tooltip .timeline-tooltip-id a {
    color: #ffe08a;
    font-weight: 600;
}

.projeto-timeline .timeline-tooltip .timeline-tooltip-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #f8f9fa;
}

.projeto-timeline .timeline-tooltip .timeline-tooltip-description {
    font-size: 0.825rem;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    color: #e9ecef;
}

.projeto-timeline .timeline-tooltip .timeline-tooltip-meta {
    font-size: 0.75rem;
    line-height: 1.3;
}

.projeto-timeline .timeline-tooltip .timeline-tooltip-meta strong {
    color: #f8f9fa;
}

.projeto-timeline .timeline-tooltip a {
    color: #ffc107;
    text-decoration: underline;
}

.projeto-timeline .timeline-tooltip a:hover,
.projeto-timeline .timeline-tooltip a:focus {
    color: #ffe08a;
}

/* Ajuste de especificidade para garantir que o estilo das barras do vis.js
   respeite os tokens de Planos de Ação (raio, sombra e borda). */
.projeto-timeline .vis-timeline .vis-item {
    position: relative;
    border-width: var(--tl-bar-border-width, 1px);
    border-style: solid;
    border-radius: var(--tl-bar-radius);
    background-color: var(--timeline-item-fill);
    color: #fff;
    font-size: 0;
    min-height: var(--tl-bar-height);
    overflow: hidden;
    box-shadow: var(--tl-bar-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    z-index: 0;
    --timeline-item-fill: var(--tl-color-ainiciar);
    --timeline-item-fill-hover: var(--tl-color-ainiciar-hover);
    --timeline-item-border-color: var(--tl-color-ainiciar-border);
    --timeline-item-shadow-color: var(--tl-color-ainiciar-glow);
}

.projeto-timeline .vis-timeline .vis-item.timeline-item {
    border-color: var(--timeline-item-border-color);
    padding-top: 0;
    padding-bottom: 0;
}

.projeto-timeline .vis-timeline .vis-item.timeline-item .vis-item-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: var(--tl-bar-height);
    line-height: var(--tl-bar-height);
    border-radius: var(--tl-bar-radius);
}

.projeto-timeline .vis-timeline .vis-item.timeline-item:hover,
.projeto-timeline .vis-timeline .vis-item.timeline-item:focus-visible {
    background-color: var(--timeline-item-fill-hover);
    box-shadow: var(--tl-bar-shadow-hover);
}

.projeto-timeline .vis-timeline .vis-item.timeline-item:focus-visible {
    outline: none;
}

.projeto-timeline .vis-timeline .vis-item.timeline-item.vis-selected,
.projeto-timeline .vis-timeline .vis-item.timeline-item:focus-visible {
    background-color: var(--timeline-item-fill-hover);
    box-shadow: var(--tl-bar-shadow-hover), 0 0 0 3px var(--timeline-item-shadow-color);
}

.projeto-timeline .vis-item.timeline-item.tl-status--ainiciar {
    --timeline-item-fill: var(--tl-color-ainiciar);
    --timeline-item-fill-hover: var(--tl-color-ainiciar-hover);
    --timeline-item-border-color: var(--tl-color-ainiciar-border);
    --timeline-item-shadow-color: var(--tl-color-ainiciar-glow);
}

.projeto-timeline .timeline-legend-color.tl-status--ainiciar {
    background-color: var(--tl-color-ainiciar);
    border-color: var(--tl-color-ainiciar-border);
}

.projeto-timeline .vis-item.timeline-item.tl-status--emandamento {
    --timeline-item-fill: var(--tl-color-emandamento);
    --timeline-item-fill-hover: var(--tl-color-emandamento-hover);
    --timeline-item-border-color: var(--tl-color-emandamento-border);
    --timeline-item-shadow-color: var(--tl-color-emandamento-glow);
}

.projeto-timeline .timeline-legend-color.tl-status--emandamento {
    background-color: var(--tl-color-emandamento);
    border-color: var(--tl-color-emandamento-border);
}

.projeto-timeline .vis-item.timeline-item.tl-status--concluida {
    --timeline-item-fill: var(--tl-color-concluida);
    --timeline-item-fill-hover: var(--tl-color-concluida-hover);
    --timeline-item-border-color: var(--tl-color-concluida-border);
    --timeline-item-shadow-color: var(--tl-color-concluida-glow);
}

.projeto-timeline .timeline-legend-color.tl-status--concluida {
    background-color: var(--tl-color-concluida);
    border-color: var(--tl-color-concluida-border);
}

.projeto-timeline .vis-item.timeline-item.tl-status--revisada {
    --timeline-item-fill: var(--tl-color-revisada);
    --timeline-item-fill-hover: var(--tl-color-revisada-hover);
    --timeline-item-border-color: var(--tl-color-revisada-border);
    --timeline-item-shadow-color: var(--tl-color-revisada-glow);
}

.projeto-timeline .timeline-legend-color.tl-status--revisada {
    background-color: var(--tl-color-revisada);
    border-color: var(--tl-color-revisada-border);
}

.projeto-timeline .vis-item.timeline-item.tl-status--atrasada {
    --timeline-item-fill: var(--tl-color-atrasada);
    --timeline-item-fill-hover: var(--tl-color-atrasada-hover);
    --timeline-item-border-color: var(--tl-color-atrasada-border);
    --timeline-item-shadow-color: var(--tl-color-atrasada-glow);
}

.projeto-timeline .timeline-legend-color.tl-status--atrasada {
    background-color: var(--tl-color-atrasada);
    border-color: var(--tl-color-atrasada-border);
}


.projeto-timeline .timeline-group-hidden {
    display: none;
}

.projeto-timeline .timeline-item-hidden {
    display: none !important;
}

.projeto-timeline .vis-label,
.projeto-timeline .vis-itemset .vis-group {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: var(--tl-row-height, 36px);
}

.projeto-timeline .vis-label {
    text-align: left;
    gap: 0.5rem;
}

.projeto-timeline .vis-label .vis-inner {
    padding-block: calc((var(--tl-row-height, 36px) - var(--tl-bar-height, 24px)) / 2);
}

.projeto-timeline .vis-itemset .vis-group {
    padding-block: calc((var(--tl-row-height, 36px) - var(--tl-bar-height, 24px)) / 2);
}

.projeto-timeline .vis-panel.vis-left {
    width: var(--timeline-group-width, 32%) !important;
}

.projeto-timeline .vis-panel.vis-center,
.projeto-timeline .vis-panel.vis-right {
    left: var(--timeline-group-width, 32%) !important;
}

.projeto-timeline .timeline-group-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #212529;
}

.projeto-timeline .timeline-group-label--pacote {
    font-size: 0.95rem;
}

.projeto-timeline .timeline-group-label--atividade {
    font-weight: 500;
    font-size: 0.85rem;
    color: #495057;
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
}

.projeto-timeline .timeline-group-label--atividade .activity-id {
    color: #555;
    font-weight: 600;
    font-size: 0.82rem;
}

.projeto-timeline .timeline-group-label--atividade .activity-title {
    line-height: 1.35;
    display: inline-block;
}

.projeto-timeline .timeline-group-label--atividade .timeline-activity-link,
.projeto-timeline .vis-label .timeline-activity-link {
    color: #212529 !important;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.projeto-timeline .timeline-group-label--atividade .timeline-activity-link:visited,
.projeto-timeline .vis-label .timeline-activity-link:visited {
    color: #212529 !important;
    text-decoration: none;
}

.projeto-timeline .timeline-group-label--atividade .timeline-activity-link:hover,
.projeto-timeline .timeline-group-label--atividade .timeline-activity-link:focus,
.projeto-timeline .vis-label .timeline-activity-link:hover,
.projeto-timeline .vis-label .timeline-activity-link:focus {
    text-decoration: underline;
}

.projeto-timeline .timeline-group-label--atividade .timeline-activity-link:focus-visible,
.projeto-timeline .vis-label .timeline-activity-link:focus-visible {
    outline: 2px solid rgba(13, 110, 253, .35);
    outline-offset: 2px;
    text-decoration: underline;
}

.projeto-timeline .timeline-group-label--atividade .timeline-activity-link:active,
.projeto-timeline .vis-label .timeline-activity-link:active {
    opacity: .85;
}

.projeto-timeline .vis-label.vis-group-level-0 .vis-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.projeto-timeline .vis-label.vis-group-level-1 .vis-inner {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* propriedade padrão para navegadores modernos */
    line-height: 1.35;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    gap: 0.35rem;
}

.projeto-timeline .vis-label .vis-expand {
    flex: 0 0 auto;
    cursor: pointer;
    color: #6c757d;
    margin-left: 0.25rem;
}

.projeto-timeline .vis-label .vis-expand:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.7);
    outline-offset: 2px;
}

.projeto-timeline [data-timeline-tooltip] {
    pointer-events: auto;
}

/* ============== MODAL EXPORTAÇÃO ============== */
#loadingModal .modal-content {
    border-radius: 16px;
    background-color: white;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.15);
    border: 2px solid #3086FF;
}

#loadingModal .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.35rem;
    color: #3086FF;
}

#loadingModal p {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #2A2A2A;
}

#cancelarExportacao {
    background-color: #F44336 !important;
    color: white !important;
    border: none;
    font-weight: bold;
    padding: 0.4rem 1.2rem;
    border-radius: 12px;
}

#cancelarExportacao:hover {
    background-color: #C82333 !important;
    color: white !important;
}

.bg-baixo {
    background-color: #4CAF50 !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.bg-moderado {
    background-color: #FBC02D !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.bg-alto {
    background-color: #FF9800 !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.bg-critico {
    background-color: #F44336 !important;
    color: #15151f !important;
    font-weight: bold;
    text-align: center;
}

.badge-risk {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-weight: 600;
}

/* ===== Importação: células inválidas ===== */
.cell-error {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border: 1px solid #dc3545 !important;
}
/* ============== LOGIN PAGE ============== */
.login-bg {
    background-image: url('../img/PlanodeFundo.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Dropdown submenu positioning */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.25rem;
    margin-left: .1rem;
}

/* Support submenus opening to the left */
.dropdown-submenu.dropstart > .dropdown-menu {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: .25rem;
}

/* Evita que menus sejam cortados e garante sobreposição correta */

.navbar,
.navbar .container {
    overflow: visible;
}

/* Tamanho máximo para menus em telas estreitas */
.dropdown-menu {
    max-width: min(90vw, 360px);
}

/* Ensure dropdowns appear above other content */
.navbar .dropdown-menu {
    z-index: 1050;
}

.atividade-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(100vw, var(--atividade-drawer-width));
    max-width: 100vw;
    background-color: #fff;
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 1045;
    display: flex;
    flex-direction: column;
}

.atividade-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.atividade-drawer__panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.atividade-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.atividade-drawer__title {
    font-weight: 600;
}

.atividade-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem 2.5rem;
}

.atividade-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1040;
}

.atividade-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

body.is-atividade-drawer-open {
    overflow: hidden;
}

.atividade-detalhe-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.atividade-detalhe-panel__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.atividade-detalhe-panel__title-group {
    flex: 1 1 auto;
    min-width: 0;
}

.atividade-detalhe-panel__title {
    word-break: break-word;
}

.atividade-detalhe-panel__subtitle {
    font-size: 0.875rem;
}

.atividade-detalhe-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.atividade-detalhe-panel__meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.atividade-detalhe-panel__meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.atividade-status-dropdown {
    position: relative;
    display: inline-flex;
}

.atividade-status-dropdown__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.atividade-status-dropdown__toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.35);
}

.atividade-status-dropdown__toggle[aria-expanded="true"] {
    transform: translateY(1px);
}

.atividade-status-dropdown__toggle.is-busy {
    pointer-events: none;
    opacity: 0.85;
}

.atividade-status-dropdown__label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.atividade-status-dropdown__caret {
    font-size: 0.75rem;
    line-height: 1;
    opacity: 0.85;
}

.atividade-status-dropdown .dropdown-menu {
    min-width: max(180px, 100%);
    z-index: 1100;
}

.atividade-status-dropdown .dropdown-item.disabled,
.atividade-status-dropdown .dropdown-item[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.atividade-detalhe-panel__meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
}

.atividade-detalhe-panel__meta-value {
    font-weight: 500;
}

.atividade-detalhe-panel__highlights {
    background: #f8fafc;
    border-left: 3px solid #0d6efd;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.atividade-detalhe-panel__section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.atividade-detalhe-panel__section-title {
    font-weight: 600;
    color: #1f2937;
}

.atividade-detalhe-panel__description p,
.atividade-detalhe-panel__comment {
    margin-bottom: 0;
    white-space: pre-wrap;
}

.atividade-detalhe-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.atividade-detalhe-panel__list-item {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.atividade-detalhe-panel__list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.atividade-detalhe-panel__list-meta {
    font-size: 0.8rem;
}

.atividade-detalhe-panel__link {
    font-weight: 500;
    color: #0d6efd;
    text-decoration: none;
}

.atividade-detalhe-panel__link:hover,
.atividade-detalhe-panel__link:focus {
    text-decoration: underline;
}

.atividade-detalhe-panel__timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.atividade-detalhe-panel__timeline-item {
    border-left: 2px solid #e2e8f0;
    padding-left: 1rem;
    position: relative;
}

.atividade-detalhe-panel__timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.3rem;
    width: 0.75rem;
    height: 0.75rem;
    background: #0d6efd;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.atividade-detalhe-panel__timeline-header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.atividade-detalhe-panel__timeline-body {
    font-size: 0.9rem;
}

.atividade-detalhe-panel__timeline-status,
.atividade-detalhe-panel__timeline-details {
    font-size: 0.8rem;
}

.atividade-detalhe-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.atividade-detalhe-page .breadcrumb {
    margin-bottom: 0;
}

.atividade-detalhe-page__layout {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .atividade-drawer {
        width: 100vw;
    }

    .atividade-detalhe-panel__actions {
        width: 100%;
        justify-content: stretch;
    }

    .atividade-detalhe-panel__actions .btn {
        flex: 1 1 auto;
    }
}

.responsaveis-role-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .responsaveis-role-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.responsaveis-role-grid__item .select2-container {
    width: 100% !important;
}

.responsaveis-role-grid__item .select2-container.responsaveis-role-grid__select2 {
    font-size: inherit;
}

.responsaveis-role-grid__select2 .select2-selection {
    background-color: #fff;
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: 0.5rem;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0;
    direction: ltr;
    text-align: left;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    position: relative;
}

.responsaveis-role-grid__select2 .select2-selection--single {
    display: flex;
    align-items: center;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
}

.responsaveis-role-grid__select2 .select2-selection--single .select2-selection__rendered {
    flex: 1 1 auto;
    padding: 0;
    margin: 0;
    line-height: 1.5;
    color: inherit;
    text-align: left;
}

.responsaveis-role-grid__select2 .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}

.responsaveis-role-grid__select2 .select2-selection--single .select2-selection__arrow {
    height: auto;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
}

.responsaveis-role-grid__select2 .select2-selection--multiple {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
}

.responsaveis-role-grid__select2 .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
    list-style: none;
    justify-content: flex-start;
    text-align: left;
}

.responsaveis-role-grid__select2 .select2-selection--multiple .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    float: none;
    margin: 0;
    border: 0;
    border-radius: 9999px;
    background-color: var(--bs-gray-200, #e9ecef);
    color: inherit;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.responsaveis-role-grid__select2 .select2-selection__choice--placeholder {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #6c757d;
    padding: 0;
    font-weight: 400;
}

.responsaveis-role-grid__select2 .select2-selection--multiple .select2-selection__choice__display {
    color: inherit;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.responsaveis-role-grid__select2 .select2-selection--multiple .select2-selection__choice__remove {
    order: 0;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: 0.7;
}

.responsaveis-role-grid__select2 .select2-selection--multiple .select2-selection__choice__remove:hover,
.responsaveis-role-grid__select2 .select2-selection--multiple .select2-selection__choice__remove:focus {
    opacity: 1;
    background-color: rgba(15, 23, 42, 0.12);
}

.responsaveis-role-grid__select2 .select2-search--inline {
    display: flex;
    flex: 1 1 auto;
    min-width: 2.5rem;
}

.responsaveis-role-grid__select2 .select2-selection--multiple .select2-search__field {
    flex: 1 1 auto;
    min-width: 2.5rem;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: 1.5;
    height: 1.5rem;
    color: inherit;
    text-align: left;
}

.responsaveis-role-grid__select2 .select2-selection__clear {
    right: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
}

.responsaveis-role-grid__select2.select2-container--focus .select2-selection,
.responsaveis-role-grid__select2 .select2-selection:focus,
.responsaveis-role-grid__select2 .select2-selection:focus-visible {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

.responsaveis-role-grid__select2.select2-container--open .select2-selection {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.responsaveis-role-grid__select2.is-invalid .select2-selection {
    border-color: var(--bs-danger, #dc3545);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.responsaveis-role-grid__select2.is-invalid.select2-container--focus .select2-selection,
.responsaveis-role-grid__select2.is-invalid.select2-container--open .select2-selection {
    border-color: var(--bs-danger, #dc3545);
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.responsaveis-role-grid__select2-dropdown {
    border-radius: 0.5rem;
    overflow: hidden;
    border-color: var(--bs-border-color, #ced4da);
}

.responsaveis-role-grid__select2-dropdown .select2-search--dropdown {
    padding: 0.5rem 0.75rem 0;
}

.responsaveis-role-grid__select2-dropdown .select2-search--dropdown .select2-search__field {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color, #ced4da);
    font-size: inherit;
    line-height: 1.5;
    color: inherit;
    text-align: left;
    direction: ltr;
}

.responsaveis-role-grid__select2-dropdown .select2-results {
    padding: 0.25rem 0;
}

.responsaveis-role-grid__select2-dropdown .select2-results__option {
    padding: 0.375rem 0.75rem;
}

.responsaveis-role-grid__select2-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: var(--bs-primary, #0d6efd);
    color: #fff;
}

.responsaveis-role-grid__select2-dropdown .select2-results__message {
    color: #6c757d;
    padding: 0.5rem 0.75rem;
}

[data-responsaveis-feedback] {
    display: block;
}
