      .container, .container-md, .container-sm {
          max-width: 95% !important;
      }

      :root {
          --bg-color: #ffffff;
          --text-color: #212529;
          --card-bg: #ffffff;
          --border-color: #ddd;
          --navbar-bg: #212529;
          --navbar-text-color: #ffffff;
          --footer-bg: #f8f9fa;
      }

      .dark-mode {
          --bg-color: #2b2b2b;
          --text-color: #e2e2e2;
          --card-bg: #383838;
          --border-color: #505050;
          --navbar-bg: #1c1c1c;
          --navbar-text-color: #e2e2e2;
          --footer-bg: #1c1c1c;
      }

      body {
          background-color: var(--bg-color);
          color: var(--text-color);
          transition: background-color 0.3s, color 0.3s;
      }

      .card {
          background-color: var(--card-bg);
          border: 1px solid var(--border-color);
          transition: background-color 0.3s, border-color 0.3s;
      }

      .navbar, .navbar-dark {
          background-color: var(--navbar-bg) !important;
      }

      .navbar .navbar-brand,
      .navbar .nav-link,
      .navbar .btn-outline-light {
          color: var(--navbar-text-color) !important;
      }

      footer {
          background-color: var(--footer-bg);
          color: var(--text-color);
          transition: background-color 0.3s, color 0.3s;
      }

      /* Inputs e selects para adequação do modo dark */
      input, select {
          background-color: var(--card-bg);
          color: var(--text-color);
          border-color: var(--border-color);
          transition: all 0.3s ease-in-out;
      }

      /* =============================================== */
      /* Trecho novo para deixar o texto branco no modo dark */
      /* =============================================== */

      .dark-mode, 
      .dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5,
      .dark-mode p, .dark-mode small, .dark-mode label, .dark-mode div {
          color: #ffffff !important;
      }

      .dark-mode .btn-outline-light {
          color: #ffffff !important;
          border-color: #ffffff !important;
      }

      .dark-mode input, .dark-mode select {
          color: #ffffff !important;
      }

      .dark-mode ::placeholder {
          color: #ccc !important;
      }

      .dark-mode footer,
      .dark-mode footer.text-muted {
          color: #ffffff !important; /* cor branca para footer */
          border-color: var(--border-color) !important; /* borda ajustada */
          background-color: var(--footer-bg) !important; /* fundo coerente com modo escuro */
      }

      /* Ajustes específicos para tela de relatórios no modo escuro */

      .dark-mode .accordion-item {
          background-color: var(--card-bg);
          border-color: var(--border-color);
          color: #ffffff;
      }

      .dark-mode .accordion-button {
          background-color: var(--card-bg);
          color: #ffffff;
      }

      .dark-mode .accordion-button:not(.collapsed) {
          background-color: #454545;
          color: #ffffff;
      }

      .dark-mode .accordion-button::after {
          filter: invert(1); /* Ícone branco no accordion */
      }

      .dark-mode .list-group-item {
          background-color: var(--card-bg);
          border-color: var(--border-color);
          color: #ffffff;
      }

      .dark-mode .card {
          background-color: var(--card-bg);
          color: #ffffff;
          border-color: var(--border-color);
      }

      .dark-mode .form-control,
      .dark-mode .form-select {
          background-color: #454545;
          color: #ffffff;
          border-color: var(--border-color);
      }

      .dark-mode label {
          color: #ffffff;
      }

      .dark-mode input[type="date"]::-webkit-calendar-picker-indicator {
          filter: invert(1);
      }

      .dark-mode hr {
          border-top-color: var(--border-color);
      }

      /* Ajuste específico para gráficos canvas */
      .dark-mode canvas {
          background-color: transparent;
      }

      /* Ajustes específicos para a tela Detalhes da Tarefa no modo dark */

      .dark-mode .card {
          background-color: var(--card-bg);
          color: #ffffff;
          border-color: var(--border-color);
      }

      .dark-mode .card-header {
          background-color: #0056b3 !important; /* Azul escuro para header do card */
          color: #ffffff !important;
      }

      .dark-mode .badge.bg-warning {
          background-color: #f5b942 !important;
          color: #000 !important;
      }

      .dark-mode .badge.bg-secondary {
          background-color: #6c757d !important;
          color: #ffffff !important;
      }

      .dark-mode .badge.bg-success {
          background-color: #28a745 !important;
          color: #ffffff !important;
      }

      .dark-mode .badge.bg-danger {
          background-color: #dc3545 !important;
          color: #ffffff !important;
      }

      .dark-mode .border.rounded.bg-light {
          background-color: #454545 !important;
          border-color: var(--border-color) !important;
          color: #ffffff !important;
      }

      .dark-mode .table,
      .dark-mode .table th,
      .dark-mode .table td {
          background-color: var(--card-bg) !important;
          color: #ffffff !important;
          border-color: var(--border-color) !important;
      }

      .dark-mode .table-light th {
          background-color: #454545 !important;
          color: #ffffff !important;
      }

      .dark-mode .alert {
          background-color: #454545 !important;
          color: #ffffff !important;
          border-color: var(--border-color) !important;
      }

      .dark-mode .text-muted {
          color: #cccccc !important;
      }

      .dark-mode .markdown-body {
          background-color: transparent !important;
          color: #ffffff !important;
      }

      .dark-mode .toastui-editor-defaultUI {
          background-color: #454545 !important;
          color: #ffffff !important;
          border-color: var(--border-color) !important;
      }

      .dark-mode .toastui-editor-defaultUI-toolbar,
      .dark-mode .toastui-editor-defaultUI-toolbar button {
          background-color: #383838 !important;
          color: #ffffff !important;
      }

      .dark-mode video {
          background-color: transparent;
      }

      /* Ajustes finais para Toast UI no Modo Dark */

      .dark-mode .toastui-editor-defaultUI,
      .dark-mode .toastui-editor-contents,
      .dark-mode .toastui-editor-md-container,
      .dark-mode .toastui-editor-ww-container {
          background-color: #2c2c2c !important;
          color: #ffffff !important;
      }

      .dark-mode .toastui-editor-defaultUI-toolbar {
          background-color: #1f1f1f !important;
          border-bottom-color: var(--border-color) !important;
      }

      .dark-mode .toastui-editor-defaultUI-toolbar button {
          color: #ffffff !important;
      }

      .dark-mode .toastui-editor-defaultUI .ProseMirror,
      .dark-mode .toastui-editor-defaultUI .toastui-editor-md-preview {
          background-color: #2c2c2c !important;
          color: #ffffff !important;
      }

      .dark-mode .toastui-editor-defaultUI .scroll-sync.active {
          color: #00bfff !important;
      }

      .dark-mode .toastui-editor-defaultUI .toastui-editor-mode-switch {
          background-color: #1f1f1f !important;
          border-color: var(--border-color) !important;
          color: #ffffff !important;
      }

      .dark-mode .toastui-editor-defaultUI .toastui-editor-md-tab-container {
          background-color: #2c2c2c !important;
      }

      .dark-mode .toastui-editor-defaultUI .toastui-editor-statusbar {
          background-color: #1f1f1f !important;
          border-top-color: var(--border-color) !important;
          color: #ffffff !important;
      }

      .dark-mode .toastui-editor-defaultUI .toastui-editor-statusbar .toastui-editor-mode-switch button {
          color: #ffffff !important;
      }

      .dark-mode .toastui-editor-defaultUI .toastui-editor-mode-switch button.active {
          background-color: #383838 !important;
      }


      /* Faz os cards terem o mesmo tamanho, alinhando os botões */
      .card {
        display: flex;
        flex-direction: column;
        height: auto;       /* cresce de acordo com o conteúdo */
        overflow: visible;
      }

      .card-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* distribui conteúdo e botões */
        padding: 0.76rem;
        gap: 0.1rem;
        overflow: visible;
      }

      /* Garante alinhamento dos botões no rodapé do card */
      .btn-group {
          margin-top: auto;
          display: flex;
          flex-wrap: wrap;
          gap: 2px;
      }

      .btn-group .btn {
          flex: 1 1 auto;
          white-space: nowrap;
      }
      /* Quebra de linha forçada para consistência */
      h5, small, .tempo {
        word-break: break-word;
      }

      /* Melhora scrollbar (opcional, mais elegante) */
      ::-webkit-scrollbar {
          width: 6px;
      }
      ::-webkit-scrollbar-thumb {
          background-color: rgba(0,0,0,0.2);
          border-radius: 3px;
      }

        /* Reseta todos os botões para branco */
        .navbar .btn,
        .navbar .btn-outline-light,
        .navbar .btn-outline-secondary {
            color: #fff !important;
            border-color: #fff !important;
        }

        /* Botão especial: Colmeia em amarelo */
        .navbar .btn-colmeia {
            color: var(--bs-warning) !important;
            border-color: var(--bs-warning) !important;
        }
        .navbar .btn-colmeia:hover {
            background-color: var(--bs-warning) !important;
            color: #000 !important;
        }

        /* Base dos cards de métrica */
        .card.stat {
        border-width: 2px !important;
        border-radius: .8rem;
        }

        /* Título menor em cinza leve, número em negrito */
        .card.stat h6 { margin-bottom: .25rem; opacity: .75; }
        .card.stat h4 { margin: 0; font-weight: 700; }

        /* Variantes por status (mantendo a paleta do gráfico) */
        .card.stat.total {
        border-color: var(--bs-secondary) !important;
        color: var(--bs-secondary) !important;
        }
        .card.stat.inicial {
        border-color: var(--bs-primary) !important;
        color: var(--bs-primary) !important;
        }
        .card.stat.andamento {
        border-color: var(--bs-warning) !important;
        color: var(--bs-warning) !important;
        }
        .card.stat.concluidas {
        border-color: var(--bs-success) !important;
        color: var(--bs-success) !important;
        }
        .card.stat.parada {
        border-color: var(--bs-danger) !important;
        color: var(--bs-danger) !important;
        }

        /* Hover sutil */
        .card.stat:hover {
        box-shadow: 0 0 0 3px rgba(255,193,7,.15); /* brilho do warning */
        }

        /* Modo dark: mantém contraste do título/valor */
        .dark-mode .card.stat h6,
        .dark-mode .card.stat h4 { color: currentColor !important; 
        }
        /* Navbar: borda inferior amarela só no modo dark */
        .dark-mode .navbar {
        border-bottom-color: var(--bs-warning) !important; /* amarelo */
        /* opcional: espessura */
        /* border-bottom-width: 2px; */
        }

/* ===== Menções (Tribute.js) – dark fix baseado em .dark-mode ===== */

/* Light (já está ok acima) */
:root {
  --mention-bg: #ffffff;
  --mention-fg: #111827;
  --mention-muted: #6b7280;
  --mention-border: #e5e7eb;
  --mention-hover: #f3f4f6;
  --mention-shadow: 0 10px 20px rgba(0,0,0,.12), 0 6px 6px rgba(0,0,0,.08);
}

/* Dark: use a classe que você já aplica no <body> */
.dark-mode {
  --mention-bg: #111827;      /* fundo do popup */
  --mention-fg: #e5e7eb;      /* texto principal */
  --mention-muted: #9ca3af;   /* texto "secundário" (nome) */
  --mention-border: #374151;  /* borda */
  --mention-hover: #1f2937;   /* item hover/selecionado */
  --mention-shadow: 0 12px 24px rgba(0,0,0,.45), 0 8px 12px rgba(0,0,0,.35);
}

/* Força as cores do popup (independente do Bootstrap) */
.tribute-container,
.tribute-container ul,
.tribute-container li {
  background: var(--mention-bg) !important;
  color: var(--mention-fg) !important;
  border-color: var(--mention-border) !important;
}

.tribute-container {
  z-index: 99999 !important;
  border: 1px solid var(--mention-border) !important;
  box-shadow: var(--mention-shadow) !important;
  border-radius: 8px;
  overflow: hidden;
  max-height: 280px;
}

.tribute-container li { padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.tribute-container li span,
.tribute-container li strong { color: var(--mention-fg) !important; }

/* item selecionado / hover */
.tribute-container li.highlight,
.tribute-container li:hover {
  background: var(--mention-hover) !important;
  color: var(--mention-fg) !important;
}

/* o "nome completo" que você coloca com .text-muted */
.tribute-container .text-muted { 
  color: var(--mention-muted) !important;
  opacity: 1 !important;
}

/* rolagem interna do editor: conteúdo longo (imagem + texto) rola dentro da
   caixa em vez de estourar por cima do resto da página */
.toastui-editor-ww-container .ProseMirror {
  overflow-y: auto !important;
}

/* ========================= */
/* Notificações - Light Mode */
/* ========================= */

.dropdown-menu {
    background-color: #ffffff;
    color: #212529;
}

.dropdown-menu .dropdown-item {
    color: #212529 !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f1f3f5;
}

.dropdown-menu .dropdown-header {
    color: #6c757d;
}

.dropdown-menu .text-muted {
    color: #6c757d !important;
}

/* ======================== */
/* Notificações - Dark Mode */
/* ======================== */

.dark-mode .dropdown-menu {
    background-color: #1f1f1f !important;
    border-color: #3a3a3a;
}

.dark-mode .dropdown-menu .dropdown-item {
    color: #e2e2e2 !important;
}

.dark-mode .dropdown-menu .dropdown-item:hover {
    background-color: #2a2a2a !important;
}

.dark-mode .dropdown-menu .dropdown-header {
    color: #bdbdbd !important;
}

.dark-mode .dropdown-menu .text-muted {
    color: #9e9e9e !important;
}

/* Notificação não lida */
.dark-mode .dropdown-item.bg-light {
    background-color: #2d2d2d !important;
}
/* Não lida */
.notif-unread {
    background-color: #f8f9fa;
}

.dark-mode .notif-unread {
    background-color: #2d2d2d !important;
}

/* Avatar + ícone de tipo no dropdown de notificações */
.notif-avatar-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.notif-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.notif-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #adb5bd;
    color: #fff;
    font-size: 1rem;
}

.notif-type-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #fff;
    border: 2px solid #fff;
}

.dark-mode .notif-type-badge {
    border-color: #2d2d2d;
}

/* ============================= */
/* ===== KANBAN DESIGN V2 ===== */
/* ============================= */

#kanban-board-wrapper {
    overflow-x: auto;
    padding-bottom: 10px;
}

#kanban-board {
    align-items: flex-start;
}

/* COLUNA */
.kanban-column {
    background: rgba(0,0,0,0.02);
    border-radius: 14px;
    padding: 10px;
    min-width: 280px;
    transition: all 0.2s ease-in-out;
}

.dark-mode .kanban-column {
    background: rgba(255,255,255,0.05);
}

/* HEADER COLUNA */
.kanban-column-header {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .kanban-column-header {
    background: rgba(255,255,255,0.08);
}

/* CONTADOR */
.kanban-count-jira {
    background: #dee2e6;
    color: #333;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.dark-mode .kanban-count-jira {
    background: #444;
    color: #fff;
}

/* CARD */
.kanban-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.2s ease-in-out;
    cursor: grab;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* DRAG */
.kanban-card.dragging {
    opacity: 0.6;
    transform: rotate(2deg);
}

.kanban-column.drop-target {
    background: rgba(13,110,253,0.08);
    border: 2px dashed #0d6efd;
}

/* NOVA COLUNA (+) */
.kanban-column-add {
    min-width: 160px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: transparent;
}

.kanban-add-column-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    border: 2px dashed rgba(0,0,0,0.15);
    color: inherit;
    opacity: 0.7;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.kanban-add-column-btn:hover {
    opacity: 1;
    border-color: #0d6efd;
    color: #0d6efd;
    background: rgba(13,110,253,0.06);
}

.dark-mode .kanban-add-column-btn {
    border-color: rgba(255,255,255,0.2);
}

/* REORDENAR COLUNA (drag do cabeçalho) */
.kanban-column-header[draggable="true"] {
    cursor: grab;
}

.kanban-column-header.dragging-column {
    opacity: 0.5;
}

/* TÍTULO */
.kanban-card h5 {
    font-size: 0.95rem;
    font-weight: 600;
}

/* CARDS EM COLUNA DE CONCLUSÃO (coluna com "marca data de conclusão"),
   no estilo do Asana: o card continua com o fundo normal, mas fica
   esmaecido, sem sombra, com um check verde redondo no título. O estilo vem
   da coluna, então o card muda na hora ao ser arrastado para ela. Ao passar
   o mouse, volta ao normal. */
.kanban-column--concluida .kanban-card {
    opacity: 0.6;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.kanban-column--concluida .kanban-card:hover {
    opacity: 1;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.kanban-column--concluida .kanban-card h5 {
    font-weight: 500;
}

.kanban-column--concluida .kanban-card h5::before {
    content: "\F26A"; /* bi-check-circle-fill */
    font-family: "bootstrap-icons";
    color: #2f9e44;
    margin-right: 6px;
    vertical-align: -0.12em;
}

/* Prazo vencido não importa mais em tarefa concluída. */
.kanban-column--concluida .kanban-card .text-danger {
    color: inherit !important;
    font-weight: normal !important;
}

.dark-mode .kanban-column--concluida .kanban-card {
    opacity: 0.55;
}

.dark-mode .kanban-column--concluida .kanban-card:hover {
    opacity: 1;
}

.dark-mode .kanban-column--concluida .kanban-card h5::before {
    color: #51cf66;
}

/* BADGES */
.kanban-card .badge {
    font-size: 0.65rem;
    padding: 4px 6px;
    border-radius: 6px;
}

/* BOTÕES */
.kanban-card .btn {
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 3px 8px;
}

/* LISTA */
.kanban-list {
    min-height: 60px;
}

/* SCROLL SUAVE */
.kanban-list::-webkit-scrollbar {
    width: 6px;
}

.kanban-list::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.15);
    border-radius: 4px;
}


/* ===== RELATÓRIO TEMPO FUTURISTA ===== */

.tempo-dia-header {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: .7;
}

.tempo-dia-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.tempo-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 16px;
    width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.2s ease-in-out;
}

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

.tempo-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tempo-titulo {
    font-weight: 600;
    font-size: 0.95rem;
}

.tempo-status {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(13,110,253,0.1);
}

.tempo-times {
    margin-top: 10px;
    font-size: 0.8rem;
    display: grid;
    gap: 4px;
}

.tempo-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}


/* ===== SISTEMA CARDS ===== */

.sistema-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    height: 100%;
}

.sistema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.sistema-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sistema-info {
    font-size: 0.85rem;
    opacity: .85;
}

.sistema-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}

.calendar-day:hover {
    transform: translateY(-3px);
}

.today {
    border: 2px solid #6366f1;
}

.agenda-card {
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
    cursor: pointer;
}

.agenda-card.pessoal {
    background: #e0f2fe;
}

.agenda-card.servico {
    background: #ede9fe;
}

.agenda-card.concluido {
    opacity: 0.5;
    text-decoration: line-through;
}

.agenda-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
    position: relative;
}

.agenda-title {
    font-weight: 600;
    font-size: 22px;
}

.nav-month {
    text-decoration: none;
    font-size: 22px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #111;
    transition: 0.2s ease;
}

.nav-month:hover {
    background: #6366f1;
    color: white;
}

.btn-novo {
    position: absolute;
    right: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 14px;
}

.calendar-day {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    min-height: 150px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    transform: translateY(-4px);
}

.today {
    border: 2px solid #6366f1;
}

.out-month {
    opacity: 0.35;
}

.day-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.badge {
    background: #e5e7eb;
    border-radius: 50px;
    padding: 3px 8px;
    font-size: 12px;
}

.agenda-card {
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agenda-card.pessoal {
    background: #dbeafe;
}

.agenda-card.servico {
    background: #ede9fe;
}

.agenda-card.concluido {
    opacity: 0.5;
    text-decoration: line-through;
}

.agenda-card:hover {
    transform: scale(1.02);
}

.btn-check {
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.dark-mode .modal-content {
    background: var(--card-bg);
    color: #fff;
}

.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
    color: #6b7280;
}

.calendar-weekdays div {
    padding: 8px 0;
}

/* Fim de semana */

.calendar-day.sabado {
    background: rgba(0,0,0,0.02);
}

.calendar-day.domingo {
    background: rgba(220,38,38,0.05);
}

/* Melhor ainda: deixar mais elegante */

.calendar-day.sabado .day-header span:first-child {
    color: #64748b;
}

.calendar-day.domingo .day-header span:first-child {
    color: #dc2626;
    font-weight: 600;
}

/* ============================= */
/* ===== AGENDA DARK MODE ===== */
/* ============================= */

.dark-mode .agenda-card.pessoal {
    background: #1e3a8a;  /* azul escuro */
    color: #fff;
}

.dark-mode .agenda-card.servico {
    background: #5b21b6;  /* roxo escuro */
    color: #fff;
}

.dark-mode .agenda-card.concluido {
    opacity: 0.4;
}

.dark-mode .badge {
    background: #444;
    color: #fff;
}

.dark-mode .nav-month {
    background: #383838;
    color: #fff;
}

.dark-mode .nav-month:hover {
    background: #6366f1;
}

.dark-mode .calendar-day.sabado {
    background: #2f2f2f;
}

.dark-mode .calendar-day.domingo {
    background: #3a1f1f;
}

.dark-mode .calendar-weekdays {
    color: #aaa;
}
.dark-mode .calendar-day {
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}


/* ============================= */
/* ===== AGENDA TOPBAR ===== */
/* ============================= */

.agenda-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.agenda-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.agenda-actions {
    display: flex;
    gap: 10px;
}

/* Botão sincronizar elegante */

.btn-sync {
    background: transparent;
    border: 1px solid #6366f1;
    color: #6366f1;
    transition: 0.2s ease;
}

.btn-sync:hover {
    background: #6366f1;
    color: white;
}

/* Dark mode */

.dark-mode .btn-sync {
    border-color: #818cf8;
    color: #818cf8;
}

.dark-mode .btn-sync:hover {
    background: #818cf8;
    color: #111;
}

/* Evento compartilhado */
.agenda-card.shared {
    border-left: 4px solid #f59e0b;
}

/* Texto pequeno de quem compartilhou */
.shared-label {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
}

/* Dark mode */
.dark-mode .agenda-card.shared {
    border-left: 4px solid #fbbf24;
}

.modal-actions-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

/* LADO ESQUERDO */
.actions-left {
    display: flex;
    gap: 10px;
}

/* LADO DIREITO */
.actions-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* BOTÕES GRANDES */
.btn-action {
    height: 42px;              /* 👈 altura fixa */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;           /* padding horizontal apenas */
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* BOTÃO PRINCIPAL */
.btn-main {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.25);
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.35);
}

/* EDITAR */
.btn-edit {
    background: #2563eb;
    color: white;
}

.btn-edit:hover {
    background: #1d4ed8;
}

/* BOTÕES ÍCONE */
.btn-icon {
    width: 42px;
    height: 42px;  
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
}

/* EXCLUIR */
.btn-delete {
    background: #fef2f2;
    width: 42px;
    height: 42px; 
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-delete:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

/* FECHAR */
.btn-close {

    width: 22px;
    height: 22px;

    border-radius: 8px;

    background-color: #e5e7eb !important;

    opacity: 1;

    transition: all 0.2s ease;
}

.btn-close:hover {

    background-color: #d1d5db !important;

    transform: scale(1.03);
}

/* ============================= */
/* ===== EISENHOWER MATRIX ===== */
/* ============================= */

.eisenhower-wrapper {
    margin-top: 20px;
}

.eisenhower-header h2 {
    font-weight: 600;
    margin-bottom: 4px;
}

.eisenhower-header p {
    color: #6b7280;
    margin-bottom: 25px;
}

.eisenhower-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.quadrant {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 15px;
    border: 1px solid var(--border-color);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.quadrant-header {
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.count {
    background: var(--border-color);
    color: var(--text-color);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.quadrant-body {
    flex: 1;
    overflow-y: auto;
}

.task-card {
    display: block;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.dark-mode .task-card:hover {
    background: #454545;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.task-title {
    font-weight: 500;
    margin-bottom: 6px;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.8;
}

/* Cores laterais dos quadrantes */

.q-danger { border-left: 6px solid #dc2626; }
.q-warning { border-left: 6px solid #eab308; }
.q-info { border-left: 6px solid #2563eb; }
.q-success { border-left: 6px solid #16a34a; }

/* Prioridade badge */

.priority-alta { background: #dc2626; color: white; }
.priority-media { background: #f59e0b; color: white; }
.priority-baixa { background: #16a34a; color: white; }

.empty {
    text-align: center;
    margin-top: 30px;
    opacity: 0.6;
}

/* ===== NAV MODERNA SAAS ===== */

.navbar-nav .nav-link.nav-pill {
    color: #cfd3dc;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link.nav-pill:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.navbar-nav .nav-link.nav-pill.active {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255,193,7,0.4);
}

.nav-pill-colmeia.active {
    background: linear-gradient(135deg, #ffb300, #ff6f00);
    color: #000 !important;
}
.nav-pill-colmeia {
    color: #ffc107 !important;
    border: 1px solid rgba(255,193,7,0.4);
}

.nav-pill-colmeia:hover {
    background: rgba(255,193,7,0.15);
    color: #ffc107 !important;
}
.quadrant-body {
    max-height: 400px;   /* altura da lista */
    overflow-y: auto;    /* ativa scroll vertical */
    padding-right: 5px;  /* evita cortar scrollbar */
}

.quadrant {
    display: flex;
    flex-direction: column;
}

.quadrant-body {
    max-height: 400px;
    overflow-y: auto;
}

/*CSS para melhorar a aparência da agenda*/

.modal-info{
    margin-top:10px;
    max-height:400px;
    overflow-y:auto;
    font-size:14px;
    line-height:1.6;
}

.modal-info .linha{
    padding:6px 0;
    border-bottom:1px solid #eee;
}

.modal-info .label{
    font-weight:600;
    color:#666;
}

.modal-info a{
    color:#0d6efd;
    text-decoration:none;
}
.modal-content{
    width:700px;
    max-width:90%;
}

/* dashboard colaborador  */

.colaborador-board{
    display:flex;
    gap:20px;
    overflow-x:auto;
}

.colaborador-coluna{
    min-width:280px;
    background:var(--card-bg);
    border:1px solid var(--border-color);
    border-radius:14px;
    padding:12px;
}

.colaborador-header{
    font-weight:600;
    margin-bottom:12px;
    font-size:15px;
    opacity:.8;
}

/* CARD TAREFA */

.tarefa-card{
    display:block;
    background:var(--card-bg);
    border:1px solid var(--border-color);
    padding:10px;
    margin-bottom:10px;
    border-radius:10px;
    text-decoration:none;
    color:var(--text-color);
    transition:all .2s ease;
}

.tarefa-card:hover{
    transform: translateY(-2px);
    box-shadow:0 8px 20px rgba(0,0,0,0.15);
    border-color:#6366f1;
}

/* STATUS */

.meta{
    font-size:12px;
    opacity:.7;
}


.meta{
    font-size:12px;
    opacity:0.7;
}

.status-inicial{
    color:#3b82f6;
    font-weight:500;
}

.status-andamento{
    color:#f59e0b;
    font-weight:500;
}

/* ====================================== */
/* ===== RESPONSIVIDADE MENU + DASH ===== */
/* ====================================== */

/* Melhor controle geral */
html, body {
    overflow-x: hidden;
}

.app-main {
    min-height: calc(100vh - 180px);
}

/* Navbar base */
.app-navbar .container {
    align-items: center;
}

.brand-wrap {
    min-width: 0;
    max-width: calc(100% - 60px);
}

.brand-logo {
    height: 48px;
    width: auto;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: normal;
}

/* Abelha pixel art ao lado do nome (desenho em bee.css, gerado por ops/gerar_abelha.py).
   Absoluta, no espaço livre entre o nome e o menu: não reserva espaço, então o menu
   fica exatamente igual com ou sem ela. Só aparece onde esse espaço sempre sobra:
   - celular (menu recolhido), de 380px até 991px;
   - desktop a partir de 1840px (menu todo em uma linha, sobram 60px+).
   Entre 992 e 1839px os itens do menu quebram linha conforme a largura e o espaço
   livre oscila entre 0 e ~70px, então ela some. */
.bee-host {
    position: relative;
}

.bee-anchor--header {
    left: calc(100% + 4px);
    top: 50%;
    margin-top: calc(-8 * var(--bee-pixel));
}

@media (max-width: 379.98px), (min-width: 992px) and (max-width: 1839.98px) {
    .bee-anchor--header {
        display: none;
    }
}

.navbar-main-list {
    gap: 6px;
}

.nav-user-block {
    width: auto;
}

.nav-user-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-user-text {
    white-space: nowrap;
}

.nav-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-notif-item,
.nav-busca-item {
    display: flex;
    align-items: center;
}

.nav-busca-menu {
    min-width: 320px;
}

.notif-menu {
    min-width: 340px;
    max-width: min(92vw, 380px);
    max-height: 60vh;
    overflow: auto;
}

/* Dashboard */
.dashboard-new-task-btn {
    min-width: 180px;
}

.kanban-filter-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.kanban-filter-form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.kanban-board-mobile {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.kanban-card .tempo {
    font-size: 0.85rem;
}

.kanban-actions .btn {
    width: 100%;
}

/* ===== Tablet ===== */
@media (max-width: 991.98px) {
    .container, .container-md, .container-sm {
        max-width: 100% !important;
        padding-left: 16px;
        padding-right: 16px;
    }

    .navbar-collapse {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .navbar-main-list {
        align-items: stretch !important;
        gap: 8px;
    }

    .navbar-nav .nav-link.nav-pill {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 42px;
        border-radius: 12px;
        padding: 10px 14px;
    }

    .nav-user-block {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }

    .nav-user-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .nav-notif-item,
    .nav-busca-item {
        margin-top: 8px;
        width: 100%;
    }

    .nav-busca-item {
        flex-wrap: wrap;
    }

    .nav-busca-menu {
        min-width: unset;
        width: 100%;
    }

    .nav-notif-item .nav-link {
        width: fit-content;
        padding-left: 10px;
    }

    .notif-menu {
        min-width: unset;
        width: min(92vw, 380px);
    }

    #kanban-board-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 12px;
    }

    .kanban-column {
        min-width: 320px;
        max-width: 320px;
        flex: 0 0 320px;
    }
}

/* ===== Mobile ===== */
@media (max-width: 767.98px) {
    body {
        font-size: 0.95rem;
    }

    .container, .container-md, .container-sm {
        padding-left: 12px;
        padding-right: 12px;
    }

    .brand-logo {
        height: 40px;
    }

    .brand-title {
        font-size: 0.92rem;
        line-height: 1.15;
    }

    .navbar-toggler {
        padding: 0.35rem 0.55rem;
    }

    .nav-user-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-user-text {
        white-space: normal;
    }

    .nav-user-actions {
        width: 100%;
    }

    .nav-user-actions .btn,
    .nav-user-actions form {
        width: auto;
    }

    .dashboard-mobile-header h2 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .dashboard-action-wrap,
    .dashboard-new-task-btn {
        width: 100%;
    }

    .dashboard-new-task-btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        min-height: 44px;
    }

    .kanban-filter-form {
        padding: 14px;
        border-radius: 14px;
    }

    .kanban-filter-form .btn,
    .kanban-filter-form .form-control,
    .kanban-filter-form .form-select {
        min-height: 44px;
    }

    .kanban-column {
        min-width: 88vw;
        max-width: 88vw;
        flex: 0 0 88vw;
        padding: 10px;
    }

    .kanban-column-header {
        font-size: 0.9rem;
        padding: 8px 10px;
    }

    .kanban-card {
        padding: 12px;
        border-radius: 12px;
    }

    .kanban-card h5 {
        font-size: 0.92rem;
        line-height: 1.3;
    }

    .kanban-card small {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .kanban-card .btn {
        min-height: 38px;
    }

    .kanban-card .tempo {
        width: 100%;
        margin-top: 4px;
    }

    footer {
        padding-left: 12px;
        padding-right: 12px;
        line-height: 1.5;
    }
}

/* ===== Mobile bem pequeno ===== */
@media (max-width: 420px) {
    .brand-title {
        font-size: 0.84rem;
    }

    .kanban-column {
        min-width: 92vw;
        max-width: 92vw;
        flex: 0 0 92vw;
    }

    .notif-menu {
        width: 94vw;
    }
}

/* ===================================== */
/* ===== EISENHOWER RESPONSIVO V2 ====== */
/* ===================================== */

.eisenhower-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.eisenhower-title-wrap h2 {
    font-weight: 700;
    margin-bottom: 4px;
}

.eisenhower-title-wrap p {
    font-size: 0.95rem;
}

.eisenhower-filter-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    min-width: 320px;
}

.eisenhower-filter-fields {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.eisenhower-filter-item {
    min-width: 220px;
    flex: 1;
}

.eisenhower-filter-actions {
    display: flex;
    gap: 10px;
    min-width: 220px;
}

.eisenhower-filter-actions .btn {
    min-height: 42px;
}

/* Grid mais elegante */
.eisenhower-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* Quadrantes */
.quadrant {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--border-color);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.quadrant:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.quadrant-header {
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.98rem;
}

.count {
    background: var(--border-color);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.quadrant-body {
    flex: 1;
    overflow-y: auto;
    max-height: 440px;
    padding-right: 4px;
}

/* Card da tarefa */
.task-card {
    display: block;
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.dark-mode .task-card:hover {
    background: #454545;
}

.task-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 12px;
    opacity: 0.92;
}

.task-meta-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.task-meta-info span {
    word-break: break-word;
}

.task-meta .badge {
    flex-shrink: 0;
    align-self: flex-start;
    font-size: 0.72rem;
    padding: 6px 10px;
    border-radius: 999px;
}

/* Tablet */
@media (max-width: 991.98px) {
    .eisenhower-topbar {
        align-items: stretch;
    }

    .eisenhower-filter-form {
        width: 100%;
        min-width: unset;
    }

    .eisenhower-filter-fields {
        width: 100%;
    }

    .eisenhower-filter-item {
        min-width: 200px;
    }

    .eisenhower-filter-actions {
        min-width: 200px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .eisenhower-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .eisenhower-title-wrap h2 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .eisenhower-title-wrap p {
        font-size: 0.88rem;
    }

    .eisenhower-filter-form {
        padding: 14px;
        border-radius: 14px;
    }

    .eisenhower-filter-fields {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .eisenhower-filter-item,
    .eisenhower-filter-actions {
        width: 100%;
        min-width: unset;
    }

    .eisenhower-filter-actions {
        flex-direction: column;
    }

    .eisenhower-filter-form .form-select,
    .eisenhower-filter-form .btn {
        min-height: 44px;
    }

    .eisenhower-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .quadrant {
        min-height: unset;
        padding: 14px;
        border-radius: 16px;
    }

    .quadrant-header {
        font-size: 0.92rem;
        align-items: center;
    }

    .quadrant-body {
        max-height: unset;
        overflow: visible;
        padding-right: 0;
    }

    .task-card {
        padding: 12px;
        border-radius: 12px;
    }

    .task-title {
        font-size: 0.92rem;
        margin-bottom: 8px;
    }

    .task-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 0.78rem;
    }

    .task-meta .badge {
        font-size: 0.68rem;
        padding: 5px 9px;
    }

    .empty {
        margin-top: 16px;
        font-size: 0.9rem;
    }
}

/* Mobile pequeno */
@media (max-width: 420px) {
    .quadrant-header {
        font-size: 0.88rem;
    }

    .count {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* ===================================== */
/* ===== COLABORADOR RESPONSIVO V2 ===== */
/* ===================================== */

.colaborador-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.colaborador-title h2 {
    font-weight: 700;
}

.colaborador-title p {
    font-size: 0.95rem;
}

/* Filtro */
.colaborador-filter {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    min-width: 280px;
}

.colaborador-filter-fields {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 180px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    min-width: 200px;
}

/* Board */
.colaborador-board {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 18px; /* com o espelhamento, vira o espaço entre a barra e as colunas */
    /* espelha o board para a barra de rolagem horizontal ficar no topo;
       as colunas são desespelhadas abaixo */
    transform: rotateX(180deg);
}

/* Coluna */
.colaborador-coluna {
    transform: rotateX(180deg);
    min-width: 280px;
    max-width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

/* Header */
.colaborador-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 12px;
}

.colaborador-nome {
    font-size: 0.95rem;
}

.colaborador-count {
    background: var(--border-color);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
}

/* Cards */
.tarefa-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.tarefa-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #6366f1;
}

.tarefa-titulo {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.92rem;
    line-height: 1.3;
}

/* Meta */
.tarefa-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.9;
}

.tarefa-meta .prazo {
    font-size: 11px;
}

/* ===================== */
/* ===== TABLET ======== */
/* ===================== */

@media (max-width: 991.98px) {

    .colaborador-topbar {
        align-items: stretch;
    }

    .colaborador-filter {
        width: 100%;
        min-width: unset;
    }

    .colaborador-coluna {
        min-width: 260px;
        max-width: 260px;
    }
}

/* ===================== */
/* ===== MOBILE ======== */
/* ===================== */

@media (max-width: 767.98px) {

    .colaborador-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .colaborador-title h2 {
        font-size: 1.35rem;
    }

    .colaborador-title p {
        font-size: 0.85rem;
    }

    .colaborador-filter-fields {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-item,
    .filter-actions {
        width: 100%;
    }

    .filter-actions {
        flex-direction: column;
    }

    .colaborador-filter .form-select,
    .colaborador-filter .btn {
        min-height: 44px;
    }

    .colaborador-board {
        gap: 14px;
    }

    .colaborador-coluna {
        min-width: 85vw;
        max-width: 85vw;
    }

    .tarefa-card {
        padding: 12px;
    }

    .tarefa-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 0.78rem;
    }

    .tarefa-meta .prazo {
        font-size: 0.75rem;
    }
}

/* Mobile pequeno */
@media (max-width: 420px) {
    .colaborador-coluna {
        min-width: 92vw;
        max-width: 92vw;
    }
}

/* ================================= */
/* ===== AGENDA RESPONSIVO V2 ===== */
/* ================================= */

.agenda-topbar-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.agenda-title {
    font-weight: 700;
}

/* Grid mais elegante */
.agenda-grid {
    gap: 10px;
}

/* Melhor leitura dos cards */
.agenda-title-text {
    font-size: 13px;
    line-height: 1.3;
    display: block;
}

/* ===================== */
/* ===== MOBILE ======== */
/* ===================== */

@media (max-width: 767.98px) {

    .calendar-weekdays {
        display: none;
    }

    .agenda-topbar-modern {
        flex-direction: column;
        align-items: stretch;
    }

    .agenda-nav {
        justify-content: space-between;
        width: 100%;
    }

    .agenda-actions {
        display: flex;
        gap: 10px;
        width: 100%;
    }

    .agenda-actions .btn {
        flex: 1;
        min-height: 44px;
    }

    /* 🔥 Aqui está o segredo */
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-day {
        min-height: 120px;
        padding: 10px;
    }

    .day-header {
        font-size: 12px;
    }

    .agenda-card {
        font-size: 11px;
        padding: 5px;
    }
}

/* Mobile pequeno */
@media (max-width: 420px) {

    .calendar-grid {
        grid-template-columns: 1fr;
    }

}

/* ====================================== */
/* ===== DETALHES TAREFA RESPONSIVO ===== */
/* ====================================== */

.task-detail-page {
    width: 100%;
}

.task-detail-container {
    max-width: 1100px;
    margin: 0 auto;
}

.task-detail-card {
    border-radius: 18px;
    overflow: hidden;
}

.task-detail-header {
    padding: 16px 20px;
}

.task-detail-title {
    font-size: 1.15rem;
    line-height: 1.35;
    word-break: break-word;
}

.task-section {
    padding-top: 4px;
}

.task-section-title {
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 1rem;
}

.task-info-box {
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    height: 100%;
    word-break: break-word;
}

.dark-mode .task-info-box {
    background: rgba(255,255,255,0.04);
}

.task-link-wrap a {
    word-break: break-word;
}

.task-observacao-box {
    border-radius: 14px !important;
}

.task-pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
}

.task-checklist-form {
    background: rgba(0,0,0,0.015);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
}

.dark-mode .task-checklist-form {
    background: rgba(255,255,255,0.03);
}

.task-check-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.task-check-item:last-child {
    border-bottom: none;
}

.task-comment-box {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
    background: var(--card-bg);
}

.task-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.task-actions-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

/* tabelas */
.table-responsive {
    border-radius: 14px;
    overflow: auto;
}

/* Mobile */
@media (max-width: 767.98px) {
    .task-detail-container {
        max-width: 100%;
    }

    .task-detail-header {
        padding: 14px 16px;
    }

    .task-detail-title {
        font-size: 1rem;
    }

    .task-section-title {
        font-size: 0.95rem;
    }

    .task-info-box {
        padding: 12px;
        border-radius: 12px;
    }

    .task-pre {
        font-size: 0.88rem;
    }

    .task-comment-box {
        padding: 12px;
        border-radius: 14px;
    }

    .task-actions-footer .btn {
        width: 100%;
        min-height: 44px;
    }

    .table th,
    .table td {
        white-space: nowrap;
        font-size: 0.82rem;
    }

    #toast-editor {
        overflow: hidden;
        border-radius: 12px;
    }
}

/* Mobile pequeno */
@media (max-width: 420px) {
    .task-detail-title {
        font-size: 0.95rem;
    }

    .task-section-title {
        font-size: 0.92rem;
    }
}

/* ====================================== */
/* ===== DETALHES TAREFA COMPACTO ======= */
/* ====================================== */

/* largura melhor */
.detalhes-tarefa-page .card,
.col-md-8.offset-md-2 .card {
    border-radius: 14px;
    overflow: hidden;
}

/* header mais enxuto */
.detalhes-tarefa-page .card-header,
.col-md-8.offset-md-2 .card-header {
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.3;
}

/* corpo mais compacto */
.detalhes-tarefa-page .card-body,
.col-md-8.offset-md-2 .card-body {
    padding: 16px 18px;
}

/* linhas de informação */
.detalhes-tarefa-page .row.mb-2,
.col-md-8.offset-md-2 .row.mb-2 {
    margin-bottom: 10px !important;
}

/* colunas com menos “cara de vazio” */
.detalhes-tarefa-page .row > [class*="col-"],
.col-md-8.offset-md-2 .row > [class*="col-"] {
    margin-bottom: 6px;
}

/* badges menores e mais elegantes */
.detalhes-tarefa-page .badge,
.col-md-8.offset-md-2 .badge {
    font-size: 0.72rem;
    padding: 6px 9px;
    border-radius: 999px;
}

/* títulos internos */
.detalhes-tarefa-page h4,
.detalhes-tarefa-page h5,
.col-md-8.offset-md-2 h4,
.col-md-8.offset-md-2 h5 {
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 700;
}

/* hr mais discreto */
.detalhes-tarefa-page hr,
.col-md-8.offset-md-2 hr {
    margin: 18px 0;
    opacity: 0.12;
}

/* observação mais limpa */
.detalhes-tarefa-page pre,
.col-md-8.offset-md-2 pre {
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
}

/* caixas claras no dark mode */
.dark-mode .bg-light {
    background: #2b2b2b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

/* checklist mais enxuto */
.form-check {
    margin-bottom: 8px;
}

.form-check-label {
    font-size: 0.92rem;
}

/* tabelas mais compactas */
.col-md-8.offset-md-2 .table,
.detalhes-tarefa-page .table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.col-md-8.offset-md-2 .table th,
.col-md-8.offset-md-2 .table td,
.detalhes-tarefa-page .table th,
.detalhes-tarefa-page .table td {
    padding: 10px 12px;
    vertical-align: middle;
}

/* tabelas com rolagem segura */
.col-md-8.offset-md-2 .table,
.detalhes-tarefa-page .table {
    min-width: 620px;
}

.col-md-8.offset-md-2 .table-responsive,
.detalhes-tarefa-page .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* alertas menos “altos” */
.alert {
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 0;
}

/* comentário mais compacto */
.col-md-8.offset-md-2 .border.p-2.mb-2,
.detalhes-tarefa-page .border.p-2.mb-2 {
    border-radius: 12px !important;
    padding: 12px !important;
}

.markdown-body {
    font-size: 0.92rem;
    line-height: 1.55;
    /* A lib github-markdown-css troca sozinha pro tema escuro dela conforme a
       preferência do sistema operacional (prefers-color-scheme), sem ligação
       com o botão de tema do site. Deixamos sempre transparente aqui pra usar
       a cor de fundo do próprio card/box ao redor, e quem manda no escuro é
       só a classe .dark-mode do app (ver regra abaixo). */
    background-color: transparent !important;
    color: inherit !important;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* editor */
#toast-editor {
    border-radius: 12px;
    overflow: hidden;
}

/* ações finais */
.col-md-8.offset-md-2 .mt-4 .btn,
.detalhes-tarefa-page .mt-4 .btn {
    min-height: 40px;
}

/* ====================================== */
/* ============ TABLET ================== */
/* ====================================== */

@media (max-width: 991.98px) {
    .col-md-8.offset-md-2 {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
}

/* ====================================== */
/* ============ MOBILE ================== */
/* ====================================== */

@media (max-width: 767.98px) {

    .col-md-8.offset-md-2 .card-header,
    .detalhes-tarefa-page .card-header {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .col-md-8.offset-md-2 .card-body,
    .detalhes-tarefa-page .card-body {
        padding: 14px;
    }

    .col-md-8.offset-md-2 h4,
    .col-md-8.offset-md-2 h5,
    .detalhes-tarefa-page h4,
    .detalhes-tarefa-page h5 {
        font-size: 0.95rem;
    }

    .col-md-8.offset-md-2 .table,
    .detalhes-tarefa-page .table {
        font-size: 0.82rem;
    }

    .col-md-8.offset-md-2 .table th,
    .col-md-8.offset-md-2 .table td,
    .detalhes-tarefa-page .table th,
    .detalhes-tarefa-page .table td {
        padding: 8px 10px;
        white-space: nowrap;
    }

    .col-md-8.offset-md-2 .btn,
    .detalhes-tarefa-page .btn {
        min-height: 42px;
    }

    .col-md-8.offset-md-2 .mt-4,
    .detalhes-tarefa-page .mt-4 {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .col-md-8.offset-md-2 .mt-4 .btn,
    .detalhes-tarefa-page .mt-4 .btn {
        width: 100%;
        margin: 0 !important;
    }

    .markdown-body {
        font-size: 0.88rem;
    }

    .form-check-label {
        font-size: 0.88rem;
    }
}

/* ====================================== */
/* ===== TABELAS MOBILE (TEMPO) ========= */
/* ====================================== */

@media (max-width: 767.98px) {

    /* Remove aparência de tabela */
    .table {
        border: none;
        min-width: 100% !important;
    }

    .table thead {
        display: none; /* esconde cabeçalho */
    }

    .table tr {
        display: block;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 10px;
        margin-bottom: 10px;
    }

    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none !important;
        font-size: 0.85rem;
    }

    .table td::before {
        font-weight: 600;
        opacity: 0.7;
    }

    /* Tempo Geral */
    .table td:nth-child(1)::before { content: "Usuário"; }
    .table td:nth-child(2)::before { content: "Início"; }
    .table td:nth-child(3)::before { content: "Fim"; }
    .table td:nth-child(4)::before { content: "Tempo"; }

    /* Tempos externos */
    .table td:nth-child(2):has(+ td:nth-child(3))::before {
        content: "Sistema";
    }

}

/* ====================================== */
/* ===== RELATÓRIO EQUIPE V1 ============ */
/* ====================================== */

.relatorio-page {
    max-width: 1400px;
}

/* Header */
.relatorio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.relatorio-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.relatorio-subtitle {
    color: #6b7280;
    font-size: 0.96rem;
    max-width: 800px;
}

.dark-mode .relatorio-subtitle {
    color: #b6bcc8;
}

/* Filtro */
.relatorio-filter-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.relatorio-filter-card .form-label {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.9;
}

.relatorio-filter-card .form-control,
.relatorio-filter-card .form-select {
    min-height: 44px;
    border-radius: 12px;
}

.relatorio-filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.relatorio-filter-actions .btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
}

/* Resumo */
.relatorio-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.relatorio-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 5px solid transparent;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.relatorio-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.relatorio-stat-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.78;
    margin-bottom: 8px;
}

.relatorio-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

/* Cores */
.relatorio-stat-card.total { border-left-color: #6c757d; }
.relatorio-stat-card.cor-secondary { border-left-color: #6c757d; }
.relatorio-stat-card.cor-primary { border-left-color: #0d6efd; }
.relatorio-stat-card.cor-info { border-left-color: #0dcaf0; }
.relatorio-stat-card.cor-warning { border-left-color: #ffc107; }
.relatorio-stat-card.cor-success { border-left-color: #198754; }
.relatorio-stat-card.cor-danger { border-left-color: #dc3545; }

/* Títulos de seção */
.relatorio-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 14px;
}

/* Blocos de gráfico */
.relatorio-chart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

/* Separadores */
.relatorio-page hr {
    margin: 28px 0;
    opacity: 0.12;
}

/* ===================== */
/* ===== TABLET ======== */
/* ===================== */

@media (max-width: 991.98px) {
    .relatorio-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ===================== */
/* ===== MOBILE ======== */
/* ===================== */

@media (max-width: 767.98px) {
    .relatorio-title {
        font-size: 1.45rem;
    }

    .relatorio-subtitle {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .relatorio-filter-card {
        padding: 14px;
        border-radius: 16px;
    }

    .relatorio-filter-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .relatorio-filter-actions .btn {
        width: 100%;
    }

    .relatorio-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .relatorio-stat-card {
        padding: 14px;
        border-radius: 16px;
    }

    .relatorio-stat-label {
        font-size: 0.8rem;
    }

    .relatorio-stat-value {
        font-size: 1.6rem;
    }

    .relatorio-section-title {
        font-size: 1rem;
    }

    .relatorio-chart-card {
        padding: 14px;
        border-radius: 16px;
    }
}

/* ===================== */
/* ===== MOBILE PEQ ==== */
/* ===================== */

@media (max-width: 420px) {
    .relatorio-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ====================================== */
/* ========= RELATÓRIO EQUIPE =========== */
/* ====================================== */

.relatorio-page {
    max-width: 1400px;
}

/* =============================== */
/* ========= HEADER ============== */
/* =============================== */

.relatorio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.relatorio-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.relatorio-subtitle {
    color: #6b7280;
    font-size: 0.96rem;
    max-width: 800px;
}

.dark-mode .relatorio-subtitle {
    color: #b6bcc8;
}

/* =============================== */
/* ========= FILTROS ============= */
/* =============================== */

.relatorio-filter-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.relatorio-filter-card .form-label {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.9;
}

.relatorio-filter-card .form-control,
.relatorio-filter-card .form-select {
    min-height: 44px;
    border-radius: 12px;
}

.relatorio-filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

.relatorio-filter-actions .btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
}

/* =============================== */
/* ========= RESUMO ============== */
/* =============================== */

.relatorio-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.relatorio-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 5px solid transparent;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.relatorio-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.relatorio-stat-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.78;
    margin-bottom: 8px;
}

.relatorio-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

/* Cores dos cards */
.relatorio-stat-card.total { border-left-color: #6c757d; }
.relatorio-stat-card.cor-secondary { border-left-color: #6c757d; }
.relatorio-stat-card.cor-primary { border-left-color: #0d6efd; }
.relatorio-stat-card.cor-info { border-left-color: #0dcaf0; }
.relatorio-stat-card.cor-warning { border-left-color: #ffc107; }
.relatorio-stat-card.cor-success { border-left-color: #198754; }
.relatorio-stat-card.cor-danger { border-left-color: #dc3545; }

/* =============================== */
/* ========= TITULOS ============= */
/* =============================== */

.relatorio-section-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 14px;
}

/* =============================== */
/* ========= CARDS/BLOCOS ======== */
/* =============================== */

.relatorio-chart-card,
.relatorio-block-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.relatorio-block-header {
    margin-bottom: 16px;
}

.relatorio-block-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* =============================== */
/* ========= SELECT ANO ========== */
/* =============================== */

.relatorio-ano-form .form-select {
    min-width: 110px;
    border-radius: 12px;
}

/* =============================== */
/* ========= TABELAS ============= */
/* =============================== */

.relatorio-table {
    margin-bottom: 0;
    font-size: 0.92rem;
}

.relatorio-table th,
.relatorio-table td {
    vertical-align: middle;
    padding: 10px 12px;
    white-space: nowrap;
}

.relatorio-table small {
    font-size: 0.72rem;
    opacity: 0.8;
}

.relatorio-page .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
}

/* =============================== */
/* ========= ACCORDION =========== */
/* =============================== */

.relatorio-accordion .accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 14px !important;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--card-bg);
}

.relatorio-accordion .accordion-button {
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px 16px;
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: none !important;
}

.relatorio-accordion .accordion-button:not(.collapsed) {
    background: rgba(13,110,253,0.06);
    color: var(--text-color);
}

.dark-mode .relatorio-accordion .accordion-button:not(.collapsed) {
    background: rgba(255,255,255,0.05);
}

.relatorio-accordion .accordion-button:focus {
    box-shadow: none !important;
}

.relatorio-accordion .accordion-body {
    padding: 14px 16px;
}

.relatorio-accordion .list-group-item {
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
    margin-bottom: 10px;
    padding: 12px 14px;
    background: var(--card-bg);
}

/* =============================== */
/* ========= ORÇAMENTO =========== */
/* =============================== */

.orcamento-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* =============================== */
/* ========= GRÁFICOS ============ */
/* =============================== */

.relatorio-chart-card canvas {
    width: 100% !important;
    max-width: 100%;
}

/* =============================== */
/* ========= SEPARADORES ========= */
/* =============================== */

.relatorio-page hr {
    margin: 28px 0;
    opacity: 0.12;
}

/* ====================================== */
/* ================ TABLET ============== */
/* ====================================== */

@media (max-width: 991.98px) {
    .relatorio-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ====================================== */
/* ================ MOBILE ============== */
/* ====================================== */

@media (max-width: 767.98px) {

    .relatorio-title {
        font-size: 1.45rem;
    }

    .relatorio-subtitle {
        font-size: 0.88rem;
        line-height: 1.5;
    }

    .relatorio-filter-card,
    .relatorio-chart-card,
    .relatorio-block-card {
        padding: 14px;
        border-radius: 16px;
    }

    .relatorio-filter-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .relatorio-filter-actions .btn {
        width: 100%;
    }

    .relatorio-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .relatorio-stat-card {
        padding: 14px;
        border-radius: 16px;
    }

    .relatorio-stat-label {
        font-size: 0.8rem;
    }

    .relatorio-stat-value {
        font-size: 1.6rem;
    }

    .relatorio-section-title {
        font-size: 1rem;
    }

    .relatorio-block-header-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .relatorio-ano-form {
        width: 100%;
    }

    .relatorio-ano-form .form-select {
        width: 100%;
        min-height: 42px;
    }

    .relatorio-accordion .accordion-button {
        padding: 12px 14px;
        font-size: 0.88rem;
    }

    .relatorio-accordion .accordion-button span.d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 4px;
    }

    .relatorio-accordion .accordion-body {
        padding: 12px 14px;
    }

    .relatorio-accordion .list-group-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px;
        font-size: 0.88rem;
    }

    .orcamento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .relatorio-table {
        font-size: 0.82rem;
    }

    .relatorio-table th,
    .relatorio-table td {
        padding: 8px 10px;
    }
}

/* ====================================== */
/* ============ MOBILE PEQUENO ========== */
/* ====================================== */

@media (max-width: 420px) {
    .relatorio-summary-grid {
        grid-template-columns: 1fr;
    }

    .orcamento-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================== */
/* ========= GRÁFICOS FIX ========= */
/* =============================== */

/* Desktop - deixa grande de verdade */
.relatorio-chart-card {
    height: 420px;
}

/* Canvas ocupa tudo */
.relatorio-chart-card canvas {
    height: 100% !important;
}

/* Tablet */
@media (max-width: 991px) {
    .relatorio-chart-card {
        height: 360px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .relatorio-chart-card {
        height: 320px;
    }
}

/* Mobile pequeno */
@media (max-width: 420px) {
    .relatorio-chart-card {
        height: 280px;
    }
}

/* Corrige campo de tarefa (select2 / select longo) */
.select2-container .select2-selection--single {
    height: auto !important;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.select2-selection__rendered {
    white-space: normal !important;   /* permite quebrar linha */
    word-break: break-word;
    line-height: 1.2;
    padding-top: 6px;
    padding-bottom: 6px;
}
/* Faixa do superusuário com o departamento que está vendo (abaixo da navbar) */
.admin-dept-bar {
    background: #fff3cd;
    color: #664d03;
    border-bottom: 1px solid #ffe69c;
    font-size: 0.85rem;
    padding: 0.3rem 0;
}
.admin-dept-bar-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.admin-dept-bar-link:hover {
    text-decoration: underline;
}
.dark-mode .admin-dept-bar {
    background: #332701;
    color: #ffda6a;
    border-bottom-color: #664d03;
}
