:root{
  /* === CORES DA LOGO === */
  --brand:#00214D;      /* Azul */
  --brand-2:#DA0236;    /* Vermelho */

  /* (opcional) gradiente pode continuar existindo p/ backgrounds,
     mas NÃO vamos usar em botões */
  --brand-gradient: linear-gradient(90deg, var(--brand), var(--brand-2));
  --brand-soft: rgba(0,33,77,.10);
  --brand-soft-2: rgba(218,2,54,.10);

  /* Base UI */
  --page-bg:#f4f6fb;
  --card-shadow:0 12px 35px rgba(2,6,23,.06);

  /* Inputs */
  --focus-ring: 0 0 0 .25rem rgba(0,33,77,.20);

  /* Sidebar clara */
  --sidebar-bg:#f8fafc;
  --sidebar-border:#e5e7eb;
  --sidebar-text:#334155;
  --sidebar-muted:#64748b;
  --sidebar-icon:#475569;
  --sidebar-hover-bg: rgba(0,33,77,.06);
  --sidebar-active-bg: rgba(0,33,77,.12);

  /* Estados */
  --success:#0f766e;
  --warning:#d97706;
  --danger:#dc2626;
}

body{
  background:var(--page-bg);
  color:#0f172a;
}

/* ===== LINKS ===== */
a{ color:var(--brand); }
a:hover{ opacity:.9; }

/* ===== CARDS ===== */
.card{
  border:0;
  border-radius:1rem;
  box-shadow:var(--card-shadow);
}

/* =========================================================
   ===== BOTÕES (SÓ AZUL E VERMELHO, SEM GRADIENTE) =====
   ========================================================= */

/* Base: remove qualquer gradiente herdado */
.btn,
.btn-primary,
.btn-brand,
.btn-danger,
.btn-warning,
.btn-success{
  background-image: none !important;
}

/* ✅ Botão principal AZUL (logo) */
.btn-brand,
.btn-primary{
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color:#fff !important;
  font-weight: 700;
}

.btn-brand:hover,
.btn-primary:hover{
  background-color: #001a3d !important; /* azul mais escuro */
  border-color: #001a3d !important;
}

.btn-brand:active,
.btn-primary:active{
  background-color: #001533 !important;
  border-color: #001533 !important;
}

.btn-brand:focus,
.btn-primary:focus{
  box-shadow: var(--focus-ring);
}

/* ✅ Botão VERMELHO (logo) */
.btn-brand-red{
  background-color: var(--brand-2) !important;
  border-color: var(--brand-2) !important;
  color:#fff !important;
  font-weight:700;
}

.btn-brand-red:hover{
  background-color: #b9022e !important;
  border-color: #b9022e !important;
}

.btn-brand-red:active{
  background-color: #9f0228 !important;
  border-color: #9f0228 !important;
}

.btn-brand-red:focus{
  box-shadow: 0 0 0 .25rem rgba(218,2,54,.20);
}

/* ✅ Outline azul */
.btn-outline-primary{
  border:1px solid rgba(0,33,77,.35);
  color:var(--brand);
}
.btn-outline-primary:hover{
  background:var(--brand-soft);
  color:var(--brand);
}

/* ✅ Outline vermelho (se quiser) */
.btn-outline-danger{
  border:1px solid rgba(218,2,54,.45);
  color:var(--brand-2);
}
.btn-outline-danger:hover{
  background:var(--brand-soft-2);
  color:var(--brand-2);
}

/* ✅ Secondary fica neutro (mantém) */
.btn-secondary{
  background:#e5e7eb;
  border:0;
  color:#334155;
}
.btn-secondary:hover{
  background:#d1d5db;
}

/* ✅ Se quiser forçar que Warning/Success usem somente as cores da logo: */
.btn-warning{
  background-color: var(--brand-2) !important;
  border-color: var(--brand-2) !important;
  color:#fff !important;
}
.btn-success{
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color:#fff !important;
}

/* ===== INPUTS ===== */
.form-control:focus,
.form-select:focus,
.form-check-input:focus{
  border-color:var(--brand);
  box-shadow:var(--focus-ring);
}

/* ===== LOGIN ===== */
.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(0,33,77,.35), transparent 60%),
    radial-gradient(1200px 600px at 90% 20%, rgba(218,2,54,.20), transparent 60%),
    linear-gradient(180deg,#071025,#0b1533);
  padding:24px;
}
.login-card{
  max-width:980px;
  width:100%;
  border-radius:1.5rem;
  overflow:hidden;
  box-shadow:0 30px 70px rgba(0,0,0,.35);
}
.login-left{
  background: linear-gradient(135deg, rgba(0,33,77,.30), rgba(218,2,54,.15));
  padding:48px;
  color:#e2e8f0;
}
.login-right{ padding:48px; background:#fff; }

/* ===== SIDEBAR (CLARA) ===== */
.sidebar{
  min-height:100vh;
  background:var(--sidebar-bg);
  border-right:1px solid var(--sidebar-border);
  position:sticky;
  top:0;
}

.sidebar a{
  color:var(--sidebar-text);
  text-decoration:none;
}

/* ===== MENU ORGANIZADO ===== */
.menu-title{
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  color:var(--sidebar-muted);
  margin-top:10px;
}

.menu-divider{
  border-color:var(--sidebar-border);
  margin:6px 0 10px;
}

.menu-link{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:10px;
  font-size:13px;
  color:var(--sidebar-text);
  transition:all .2s ease;
}

.menu-link i{
  font-size:16px;
  color:var(--sidebar-icon);
}

.menu-link:hover{
  background:var(--sidebar-hover-bg);
  color:var(--brand);
}
.menu-link:hover i{ color:var(--brand); }

.menu-link.active{
  background:var(--sidebar-active-bg);
  color:var(--brand);
  font-weight:800;
}
.menu-link.active i{ color:var(--brand); }

/* Sair */
.menu-link.text-danger{
  color:var(--danger) !important;
}
.menu-link.text-danger i{
  color:var(--danger) !important;
}
.menu-link.text-danger:hover{
  background:rgba(220,38,38,.12);
}

/* ===== FORÇAR MAIÚSCULO (VISUAL) ===== */
input[type="text"],
input[type="search"],
input[type="tel"],
textarea{
  text-transform:uppercase;
}

.chart-wrap{
  position: relative;
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px){
  .chart-wrap{ height: 220px; }
}

/* =========================================================
   ===== FILTRO DIA/SEMANA/MÊS/TUDO (Dashboard) =====
   ========================================================= */

.btn-group[role="group"] .btn.btn-sm{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 34px;        /* centra verticalmente */
  line-height: 1;      /* evita texto “subindo” */
  padding: 0 14px;     /* ajusta lateral */
  font-weight: 700;
}

/* estado normal */
.btn-group[role="group"] .btn-outline-primary{
  color: var(--brand) !important;
  border-color: rgba(0,33,77,.35) !important;
  background: transparent !important;
}

/* hover */
.btn-group[role="group"] .btn-outline-primary:hover{
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

/* ✅ ativo */
.btn-group[role="group"] .btn-outline-primary.active{
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

/* foco: mantém seu padrão */
.btn-group[role="group"] .btn:focus{
  box-shadow: var(--focus-ring) !important;
}

/* mobile: um pouco mais compacto */
@media (max-width: 576px){
  .btn-group[role="group"] .btn.btn-sm{
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }
}

/* =========================================================
   ===== DASHBOARD (route-dashboard / page-dashboard) =====
   ========================================================= */

/* Sub-linha (Curso/Professor/Funcionário) na tabela "Recentes" */
.page-dashboard .subline{
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.15;
}
.page-dashboard .subline .dot{
  opacity: .6;
  padding: 0 6px;
}
.page-dashboard .titleCell{
  min-width: 360px;
}
.page-dashboard .nowrap{
  white-space: nowrap;
}

/* =========================================================
   ===== DASHBOARD: filtro Dia/Semana/Mês/Tudo =====
   ========================================================= */

/* Centraliza texto verticalmente e padroniza altura */
.range-filter .btn.btn-sm{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 34px;
  line-height: 1;
  padding: 0 14px;
  font-weight: 700;
}

/* Normal */
.range-filter .btn-outline-primary{
  color: var(--brand) !important;
  border-color: rgba(0,33,77,.35) !important;
  background: transparent !important;
}

/* Hover */
.range-filter .btn-outline-primary:hover{
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

/* ✅ Ativo */
.range-filter .btn-outline-primary.active{
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

/* Foco */
.range-filter .btn:focus{
  box-shadow: var(--focus-ring) !important;
}

/* =========================================================
   ===== DASHBOARD: ajustes mobile =====
   ========================================================= */

@media (max-width: 576px){
  /* reduz padding geral da página no celular */
  .page-dashboard{
    padding: 14px !important;
  }

  /* filtros mais compactos */
  .range-filter .btn.btn-sm{
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }

  /* números grandes não estourarem */
  .page-dashboard .display-6{
    font-size: 1.9rem;
  }

  /* melhora leitura da tabela recente no mobile */
  .page-dashboard .titleCell{
    min-width: 260px;
  }
  .page-dashboard .table td,
  .page-dashboard .table th{
    padding-top: .6rem;
    padding-bottom: .6rem;
  }
}

/* =========================================================
   ===== ATIVIDADES (route-activities / page-activities) =====
   ========================================================= */

/* Linha secundária (curso/prof/func) */
.page-activities .subline{
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.15;
}
.page-activities .subline .dot{
  opacity: .6;
  padding: 0 6px;
}

/* Largura mínima do título (desktop/tablet) */
.page-activities .titleCell{
  min-width: 340px;
}
.page-activities .nowrap{
  white-space: nowrap;
}

/* =========================================================
   ===== ATIVIDADES: filtros =====
   ========================================================= */

.page-activities .activities-filters .form-label{
  margin-bottom: 6px;
}

/* =========================================================
   ===== ATIVIDADES: tabela =====
   ========================================================= */

.page-activities .activities-table .table th,
.page-activities .activities-table .table td{
  vertical-align: middle;
}

/* =========================================================
   ===== ATIVIDADES: ajustes mobile =====
   ========================================================= */

@media (max-width: 576px){
  .page-activities{
    padding: 14px !important;
  }

  /* Botão "Nova atividade" mais fácil de clicar */
  .page-activities .btn.btn-brand-red{
    width: 100%;
    justify-content: center;
  }

  /* Filtros ficam mais confortáveis */
  .page-activities .activities-filters .row{
    row-gap: 10px;
  }

  /* Título não precisa de min-width grande no celular */
  .page-activities .titleCell{
    min-width: 240px;
  }

  /* Tabela com padding mais “tocável” */
  .page-activities .activities-table .table th,
  .page-activities .activities-table .table td{
    padding-top: .65rem;
    padding-bottom: .65rem;
  }
}

/* =========================================================
   ===== ACTIVITY VIEW (page-activity-view) =====
   ========================================================= */

.page-activity-view .activity-view-pre{
  white-space: pre-wrap;
}

/* Botões do topo (evita estourar no mobile) */
.page-activity-view .activity-view-actions .btn{
  white-space: nowrap;
}

/* Lista de dias: botão X não “quebra” o card */
.page-activity-view .activity-segments .list-group-item{
  border-radius: 14px;
  margin-bottom: 8px;
  border: 1px solid rgba(15,23,42,.10);
}

/* Editor de tempo */
.page-activity-view .time-editor-card{
  background: rgba(2,6,23,.02);
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  padding:14px;
}
.page-activity-view .time-editor-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.page-activity-view .time-editor-title{ font-weight:900; }
.page-activity-view .time-editor-meta{ font-size:12px; color:#64748b; }
.page-activity-view #timeSlider{ margin-top:12px; }

/* noUiSlider */
.page-activity-view .noUi-target{
  border-radius:999px;
  border:0;
  box-shadow:none;
  height:18px;
  background: rgba(2,6,23,.10);
}
.page-activity-view .noUi-connect{
  border-radius:999px;
  background: var(--brand, #3b82f6);
}
.page-activity-view .noUi-handle{
  width:34px;
  height:34px;
  border-radius:999px;
  top:-8px;
  right:-17px;
  border:2px solid rgba(255,255,255,.9);
  box-shadow:0 10px 24px rgba(2,6,23,.20);
}
.page-activity-view .noUi-handle:before,
.page-activity-view .noUi-handle:after{ display:none; }
.page-activity-view .noUi-tooltip{
  border-radius:10px;
  border:1px solid rgba(15,23,42,.12);
  font-weight:900;
  font-size:12px;
  padding:6px 8px;
}

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

@media (max-width: 576px){

  .page-activity-view{
    padding: 14px !important;
  }

  /* Topo: botões em largura total */
  .page-activity-view .activity-view-actions{
    width: 100%;
  }
  .page-activity-view .activity-view-actions .btn{
    width: 100%;
    justify-content: center;
  }

  /* Status box: evita ficar “apertado” */
  .page-activity-view .activity-view-status{
    width: 100%;
  }
  .page-activity-view .activity-view-status .form-select{
    min-width: 220px;
  }

  /* Cards: padding mais confortável */
  .page-activity-view .card{
    padding: 16px !important;
  }

  /* Botão excluir e encerrar: largura total */
  .page-activity-view .activity-view-danger form,
  .page-activity-view .activity-view-closebtn{
    width: 100%;
  }
  .page-activity-view .activity-view-danger .btn,
  .page-activity-view .activity-view-closebtn .btn{
    width: 100%;
    justify-content: center;
  }

  /* Segmentos: melhora clique e quebra linha */
  .page-activity-view .activity-segments .fw-semibold{
    line-height: 1.2;
  }
}

/* =========================================================
   ===== ACTIVITY NEW (page-activity-new) =====
   ========================================================= */

.page-activity-new #timeSliderNew{ margin-top:12px; }

/* noUiSlider (mesmo padrão do view) */
.page-activity-new .noUi-target{
  border-radius:999px;
  border:0;
  box-shadow:none;
  height:18px;
  background: rgba(2,6,23,.10);
}
.page-activity-new .noUi-connect{
  border-radius:999px;
  background: var(--brand, #3b82f6);
}
.page-activity-new .noUi-handle{
  width:34px;
  height:34px;
  border-radius:999px;
  top:-8px;
  right:-17px;
  border:2px solid rgba(255,255,255,.9);
  box-shadow:0 10px 24px rgba(2,6,23,.20);
}
.page-activity-new .noUi-handle:before,
.page-activity-new .noUi-handle:after{ display:none; }
.page-activity-new .noUi-tooltip{
  border-radius:10px;
  border:1px solid rgba(15,23,42,.12);
  font-weight:900;
  font-size:12px;
  padding:6px 8px;
}

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

@media (max-width: 576px){
  .page-activity-new{
    padding: 14px !important;
  }

  .page-activity-new .card{
    padding: 16px !important;
  }

  /* KPIs do horário ficam “um embaixo do outro” e mais legíveis */
  .page-activity-new .new-time-kpis{
    gap: 14px !important;
  }
}

/* =========================================================
   ===== ACTIVITY FORM (reutilizado em NEW/EDIT) =====
   ========================================================= */

.activity-form .form-label{
  font-weight: 700;
}

/* Chip do departamento (modo USER) */
.activity-dept-lock{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,.10);
  border-radius: 12px;
  background: rgba(2,6,23,.02);
  color:#475569;
  font-size: 13px;
}

/* Resultados do autocomplete de professor */
.prof-results .list-group-item{
  cursor:pointer;
  border-radius: 12px;
  margin-bottom: 6px;
  border: 1px solid rgba(15,23,42,.10);
}
.prof-results .list-group-item:hover{
  background: rgba(2,6,23,.03);
}

/* Ações do formulário */
.activity-form-actions{
  margin-top: 4px;
}

/* =========================================================
   ===== MOBILE: FORM =====
   ========================================================= */

@media (max-width: 576px){

  /* botões empilhados e full-width */
  .activity-form-actions{
    flex-direction: column;
  }
  .activity-form-actions .btn{
    width: 100%;
  }

  /* autocomplete: evita lista gigante */
  .prof-results{
    max-height: 240px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* input groups ficam mais confortáveis */
  .activity-form .input-group .input-group-text{
    min-width: 44px;
    justify-content: center;
  }

  /* textarea com melhor toque */
  .activity-form textarea.form-control{
    min-height: 140px;
  }
}

/* =========================================================
   ===== PAGE: ACTIVITY EDIT =====
   ========================================================= */

.page-activity-edit .page-head{
  margin-bottom: 16px;
}

/* Mobile: padding menor e botão voltar full */
@media (max-width: 576px){

  .page-activity-edit{
    padding: 16px !important;
  }

  .page-activity-edit .page-head .btn{
    width: 100%;
  }

  .page-activity-edit .card{
    padding: 16px !important;
  }
}

/* =========================================================
   ===== NOTES: EDIT / NEW (anotacao_edit.php) =====
   ========================================================= */

.page-note-edit .page-head{
  margin-bottom: 16px;
}

/* Textos auxiliares */
.hint{
  font-size: 12px;
  color: #64748b;
}

/* Badges pequenos (pills) */
.pill{
  font-size: 12px;
  font-weight: 800;
  color:#334155;
  background: rgba(148,163,184,.18);
  padding: 4px 8px;
  border-radius: 999px;
}

/* Grid principal (conteúdo + links) */
.note-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

@media (max-width: 992px){
  .note-grid{
    grid-template-columns: 1fr;
  }
}

/* Preview de links */
.links-preview a{
  text-decoration: none;
}

.links-preview .item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:14px;
}

.links-preview .item:hover{
  background: rgba(0,33,77,.05);
}

/* Mobile: respiro e botão Voltar 100% */
@media (max-width: 576px){
  .page-note-edit{
    padding: 16px !important;
  }
  .page-note-edit .page-head .btn{
    width: 100%;
  }
  .page-note-edit .card{
    padding: 16px !important;
  }
  .page-note-edit textarea{
    min-height: 180px;
  }
}

/* =========================================================
   ===== NOTES LIST (anotacoes.php) =====
   - Desktop: tabela
   - Mobile: cards
   ========================================================= */

.page-notes .page-head{
  margin-bottom: 16px;
}

/* Filtros: em telas menores, quebra em linhas bonitas */
.notes-filters .notes-q{
  min-width: 220px;
}

/* Mobile: inputs e botões com largura boa */
@media (max-width: 576px){
  .page-notes{
    padding: 16px !important;
  }

  .page-notes .card{
    padding: 16px !important;
  }

  /* botão novo 100% no mobile (já setamos classes, aqui reforça caso falte) */
  .page-notes .page-head .btn{
    width: 100%;
  }

  /* filtros viram “grid” leve */
  .notes-filters{
    width: 100%;
  }
  .notes-filters .notes-q{
    flex: 1 1 auto;
    min-width: 0;
  }
  .notes-filters .notes-submit{
    flex: 0 0 auto;
  }
}

/* Cards mobile */
.notes-card{
  border-radius: 16px;
}

.notes-card .fw-bold{
  line-height: 1.15;
}

/* Secrets: evitar URL quebrar layout no mobile */
@media (max-width: 576px){
  .notes-card .text-secondary{
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}

/* =========================================================
   ===== SECRET VIEW (segredo_view.php) =====
   - Quebra URL/user longos
   - Botões e input-group bons no mobile
   ========================================================= */

.page-secret-view .secret-break{
  word-break: break-word;
  overflow-wrap: anywhere;
}

.page-secret-view .secret-link{
  text-decoration: none;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Observações sem style inline */
.page-secret-view .secret-notes{
  white-space: pre-wrap;
}

/* Mobile refinamentos */
@media (max-width: 576px){
  .page-secret-view{
    padding: 16px !important;
  }

  .page-secret-view .card{
    padding: 16px !important;
  }

  /* ações (voltar/editar) empilhadas e com largura cheia */
  .page-secret-view .secret-actions{
    width: 100%;
  }
  .page-secret-view .secret-actions .btn{
    width: 100%;
  }

  /* input-group da senha: botões mais confortáveis */
  .page-secret-view .secret-pw-group .btn{
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =========================================================
   ===== SECRET EDIT (segredo_edit.php) =====
   - Header responsivo
   - Input-group da senha confortável no mobile
   ========================================================= */

.page-secret-edit .secret-pw-group .btn{
  min-width: 44px; /* alvo de toque */
}

@media (max-width: 576px){
  .page-secret-edit{
    padding: 16px !important;
  }
  .page-secret-edit .card{
    padding: 16px !important;
  }

  /* Botão voltar 100% */
  .page-secret-edit .btn.w-100{
    width: 100%;
  }

  /* Input-group: botões menos apertados */
  .page-secret-edit .secret-pw-group .btn{
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =========================================================
   ===== VAULT UNLOCK (desbloquear cofre) =====
   - Centraliza o card
   - No mobile fica 100% largura
   - Remove necessidade de inline style
   ========================================================= */

.page-vault-unlock .vault-wrap{
  display: flex;
  justify-content: center;
}

.page-vault-unlock .vault-card{
  width: 100%;
  max-width: 520px; /* substitui o inline */
}

@media (max-width: 576px){
  .page-vault-unlock{
    padding: 16px !important;
  }
  .page-vault-unlock .vault-card{
    padding: 16px !important;
  }
}

/* =========================================================
   ===== CALENDÁRIO (FullCalendar) =====
   - Remove inline styles da página
   - Ajusta toolbar/botões no mobile
   - Ajusta barra de filtros + busca
   - Mantém lembretes roxos
   ========================================================= */

.page-calendar .legend-item{
  display:flex;
  align-items:center;
  gap:8px;
}

.page-calendar .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
}
.page-calendar .dot-open{ background:#2563eb; }
.page-calendar .dot-progress{ background:#f59e0b; }
.page-calendar .dot-done{ background:#22c55e; }
.page-calendar .dot-cancel{ background:#ef4444; }
.page-calendar .dot-reminder{ background:#a855f7; }

/* ✅ Busca do calendário (tira inline max-width) */
.page-calendar .cal-search{
  width: 100%;
  max-width: 320px;
}

/* ===== Lembretes: roxo sólido (mês/semana/dia/lista) ===== */
.fc .reminder-event,
.fc .reminder-event.fc-daygrid-event,
.fc .reminder-event.fc-timegrid-event{
  background-color: #a855f7 !important;
  border-color: #a855f7 !important;
  color: #fff !important;
}

.fc .reminder-event .fc-event-main,
.fc .reminder-event .fc-event-main-frame{
  background-color: #a855f7 !important;
  color: #fff !important;
}

.fc .reminder-event .fc-daygrid-event-dot{
  border-color: #a855f7 !important;
}

.fc .reminder-event{
  border-radius: 10px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  font-weight: 600;
}

/* =========================================================
   ===== RESPONSIVO (mobile) =====
   ========================================================= */
@media (max-width: 576px){

  .page-calendar{
    padding: 16px !important;
  }

  /* Busca ocupa a linha toda */
  .page-calendar .cal-search{
    max-width: 100%;
  }

  /* Filtros e busca organizados melhor */
  .page-calendar .cal-filters-card .cal-filters-left,
  .page-calendar .cal-filters-card .cal-filters-right{
    width: 100%;
  }

  /* Botões do calendário: permitir quebra + ficar menor */
  .fc .fc-header-toolbar{
    flex-wrap: wrap;
    gap: 10px;
  }

  .fc .fc-toolbar-chunk{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  /* Título centralizado e sem estourar */
  .fc .fc-toolbar-title{
    font-size: 1.05rem;
    text-align: center;
    width: 100%;
  }

  /* Botões menores no mobile */
  .fc .fc-button{
    padding: .35rem .55rem;
    font-size: .85rem;
  }

  /* Reduz “respiro” do calendário no card */
  .page-calendar .cal-card{
    padding: 12px !important;
  }
}

/* =========================================================
   ===== LEMBRETES =====
   (remove CSS inline do lembretes.php)
   ========================================================= */

.page-reminders .when-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.7));
}

.page-reminders .chip-btn{
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .82rem;
  line-height: 1;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  transition: transform .12s ease;
}
.page-reminders .chip-btn:hover{ transform: translateY(-1px); }
.page-reminders .chip-btn.active{
  border-color: rgba(13,110,253,.35);
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.12);
}

.page-reminders .mini-help{
  font-size: .82rem;
  color: #6c757d;
}

.page-reminders .preview-pill{
  border-radius: 999px;
  background: rgba(13,110,253,.08);
  border: 1px solid rgba(13,110,253,.15);
  padding: .35rem .6rem;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

/* =========================================================
   ===== RESPONSIVO (mobile) =====
   - ações viram 2 colunas + botão lixo compacto
   - cards com padding menor
   ========================================================= */
@media (max-width: 576px){

  .page-reminders{
    padding: 16px !important;
  }

  /* ações em grade para não estourar */
  .page-reminders .reminder-actions{
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    justify-content: start;
  }

  /* garante que os forms ocupem a coluna */
  .page-reminders .reminder-actions form{
    margin: 0;
  }

  /* deixa os botões mais “tocáveis” sem ficar gigante */
  .page-reminders .reminder-actions .btn{
    width: 100%;
    white-space: nowrap;
  }

  /* botão de excluir (ícone) menor */
  .page-reminders .reminder-actions form:last-child .btn{
    width: auto;
    padding-left: .6rem;
    padding-right: .6rem;
  }
}

/* =========================================================
   ===== MINHAS ATIVIDADES (cards) =====
   ========================================================= */

.page-my-activities .activity-card{
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-my-activities .ma-card{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}

.page-my-activities .activity-card:hover .ma-card{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.07);
  border-color: rgba(0,0,0,.10);
}

.page-my-activities .activity-card:focus-visible{
  outline: none;
}

.page-my-activities .activity-card:focus-visible .ma-card{
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.15), 0 16px 40px rgba(0,0,0,.07);
  border-color: rgba(13,110,253,.35);
}

.page-my-activities .line-clamp-2{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-my-activities .meta-chip{
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.02);
}

.page-my-activities .ma-soft-divider{
  height: 1px;
  background: rgba(0,0,0,.06);
}

/* animação de entrada */
.page-my-activities .activity-item{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
  will-change: opacity, transform;
}
.page-my-activities .activity-item.is-shown{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .page-my-activities .activity-item{
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* =========================================================
   ===== Ajustes de layout dos filtros (sem inline style) =====
   ========================================================= */
.page-my-activities .ma-status{
  max-width: 220px;
}

.page-my-activities .ma-search{
  max-width: 360px;
}

/* =========================================================
   ===== RESPONSIVO (mobile) =====
   - filtros ocupam 100%
   - header botões quebram bonito
   ========================================================= */
@media (max-width: 576px){

  .page-my-activities{
    padding: 16px !important;
  }

  .page-my-activities .ma-status{
    max-width: 100%;
    width: 100%;
  }

  .page-my-activities .ma-search{
    max-width: 100%;
    width: 100%;
  }

  .page-my-activities #filtersForm .btn,
  .page-my-activities #filtersForm a.btn{
    width: 100%;
  }

  /* chips mais compactos */
  .page-my-activities .meta-chip{
    padding: .45rem .7rem !important;
  }
}

/* ==============================
   professor_new.php / professor_edit.php (route-professors)
   Estilo do select múltiplo de cursos
   ============================== */

body.route-professors select[multiple].form-select{
  padding: .5rem;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(2,6,23,.02);
  box-shadow: 0 10px 24px rgba(2,6,23,.04);
}

body.route-professors select[multiple].form-select option{
  padding: .45rem .6rem;
  border-radius: 10px;
}

/* Alguns browsers aplicam hover em option */
body.route-professors select[multiple].form-select option:hover{
  background: rgba(2,6,23,.06);
}

body.route-professors select[multiple].form-select:focus{
  border-color: rgba(13,110,253,.35);
  box-shadow: 0 0 0 .25rem rgba(13,110,253,.12);
}

/* =========================
   Professor Edit (route: professors)
   ========================= */

.route-professors.professor-edit .professor-form-card{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  overflow: hidden;
}

.route-professors.professor-edit .professor-courses-select{
  min-height: 220px; /* deixa mais confortável no desktop */
}

/* ==========================
   PROFESSOR VIEW
   Body: .route-professors
   ========================== */

.route-professors .professor-view{
  padding: 1.5rem; /* desktop padrão */
}

.route-professors .professor-view-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap; /* ✅ mobile: quebra */
}

.route-professors .professor-view-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap; /* ✅ mobile: quebra */
  justify-content: flex-end;
}

.route-professors .professor-courses-card,
.route-professors .professor-acts-card{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  border-radius: 16px;
}

.route-professors .professor-acts-card .table thead th{
  font-size: .9rem;
  white-space: nowrap;
}

.route-professors .professor-acts-card .table td{
  vertical-align: middle;
}

.route-professors .professor-acts-card .table td,
.route-professors .professor-acts-card .table th{
  white-space: nowrap; /* ✅ evita quebrar e mantém scroll horizontal */
}

/* ✅ Mobile adjustments */
@media (max-width: 576px){
  .route-professors .professor-view{
    padding: 1rem; /* menos padding no celular */
  }

  .route-professors .professor-view-actions .btn{
    width: 100%; /* botões em coluna no celular */
  }
}

/* ==========================
   PROFESSOR LIST
   Body: .route-professors
   ========================== */

.route-professors .professor-list{
  padding: 1.5rem;
}

.route-professors .professor-list-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap; /* ✅ mobile */
  margin-bottom: 1rem;
}

.route-professors .professor-list-newbtn{
  white-space: nowrap;
}

.route-professors .professor-list-filters{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  border-radius: 16px;
}

.route-professors .professor-list-search{
  min-width: 260px;
  flex: 1 1 320px; /* ✅ cresce e quebra no mobile */
}

.route-professors .professor-list-tablecard{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  border-radius: 16px;
}

.route-professors .professor-list-tablecard .table th,
.route-professors .professor-list-tablecard .table td{
  white-space: nowrap; /* ✅ mantém alinhado e deixa o scroll fazer o trabalho */
  vertical-align: middle;
}

.route-professors .professor-list-actions-col{
  width: 160px; /* ✅ substitui style inline */
}

.route-professors .professor-list-actions{
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

/* ✅ Mobile */
@media (max-width: 576px){
  .route-professors .professor-list{
    padding: 1rem;
  }

  /* botão novo professor ocupa a linha toda */
  .route-professors .professor-list-newbtn{
    width: 100%;
  }
}

/* ==========================
   COURSES
   Body: .route-courses
   ========================== */

.route-courses .courses-page{
  padding: 1.5rem;
}

.route-courses .courses-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* ✅ mobile */
  margin-bottom: 1rem;
}

.route-courses .courses-newbtn{
  white-space:nowrap;
}

/* Card visual padrão */
.route-courses .courses-tablecard{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  border-radius: 16px;
}

/* Mantém colunas alinhadas (scroll faz o trabalho em telas pequenas) */
.route-courses .courses-tablecard .table th,
.route-courses .courses-tablecard .table td{
  white-space: nowrap;
  vertical-align: middle;
}

.route-courses .courses-actions-col{
  width: 140px;
}

.route-courses .courses-actions{
  display:inline-flex;
  gap:6px;
  align-items:center;
  justify-content:flex-end;
  white-space: nowrap;
}

/* Modal um pouco mais "premium" */
.route-courses .modal-content{
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

/* ✅ Mobile */
@media (max-width: 576px){
  .route-courses .courses-page{
    padding: 1rem;
  }

  .route-courses .courses-newbtn{
    width: 100%;
  }
}

/* ==========================
   DEPARTMENTS
   Body: .route-departments
   ========================== */

.route-departments .departments-page{
  padding: 1.5rem;
}

.route-departments .departments-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* ✅ mobile */
  margin-bottom: 1rem;
}

.route-departments .departments-newbtn{
  white-space: nowrap;
}

.route-departments .departments-tablecard{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
  border-radius: 16px;
}

.route-departments .departments-tablecard .table th,
.route-departments .departments-tablecard .table td{
  white-space: nowrap; /* ✅ evita quebrar ações */
  vertical-align: middle;
}

.route-departments .departments-actions-col{
  width: 160px;
}

.route-departments .departments-actions{
  display:inline-flex;
  gap:6px;
  align-items:center;
  justify-content:flex-end;
}

/* Modal mais “premium” */
.route-departments .modal-content{
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
}

/* ✅ Mobile */
@media (max-width: 576px){
  .route-departments .departments-page{
    padding: 1rem;
  }

  .route-departments .departments-newbtn{
    width: 100%;
  }
}

/* ==========================
   EMPLOYEES (NEW)
   Body: .route-employees
   ========================== */

.route-employees .employees-new-page{
  padding: 1.5rem;
}

.route-employees .employees-new-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* ✅ mobile */
  margin-bottom: 1rem;
}

.route-employees .employees-new-back{
  white-space: nowrap;
}

.route-employees .employees-new-card{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}

.route-employees .employees-new-actions{
  flex-wrap: wrap;
}

@media (max-width: 576px){
  .route-employees .employees-new-page{
    padding: 1rem;
  }

  .route-employees .employees-new-back{
    width: 100%;
  }

  .route-employees .employees-new-actions > .btn{
    width: 100%;
  }
}

/* ==========================
   EMPLOYEES (EDIT)
   Body: .route-employees
   ========================== */

.route-employees .employees-edit-page{
  padding: 1.5rem;
}

.route-employees .employees-edit-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* ✅ mobile */
  margin-bottom: 1rem;
}

.route-employees .employees-edit-back{
  white-space: nowrap;
}

.route-employees .employees-edit-card{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}

.route-employees .employees-edit-actions{
  flex-wrap: wrap;
}

@media (max-width: 576px){
  .route-employees .employees-edit-page{
    padding: 1rem;
  }

  .route-employees .employees-edit-back{
    width: 100%;
  }

  .route-employees .employees-edit-actions > .btn{
    width: 100%;
  }
}

/* ==========================
   EMPLOYEES (VIEW)
   Body: .route-employees
   ========================== */

.route-employees .employees-view-page{
  padding: 1.5rem;
}

.route-employees .employees-view-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* ✅ mobile */
  margin-bottom: 1rem;
}

.route-employees .employees-view-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap; /* ✅ mobile */
}

.route-employees .employees-view-sub .sep{
  margin: 0 .4rem;
  opacity: .7;
}

.route-employees .employees-view-data{
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}

.route-employees .employees-view-notes{
  white-space: normal;
  word-break: break-word;
}

.route-employees .employees-view-table{
  border: 1px solid rgba(0,0,0,.06);
}

/* ✅ Mobile refinements */
@media (max-width: 576px){
  .route-employees .employees-view-page{
    padding: 1rem;
  }

  .route-employees .employees-view-actions{
    width: 100%;
  }

  .route-employees .employees-view-actions .btn{
    width: 100%;
  }
}

/* ==========================
   EMPLOYEES (LIST)
   Body: .route-employees
   ========================== */

.route-employees .employees-list-page{
  padding: 1.5rem;
}

.route-employees .employees-list-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap; /* ✅ mobile */
  margin-bottom: 1rem;
}

.route-employees .employees-list-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap; /* ✅ mobile */
}

/* card/table leve */
.route-employees .employees-list-table{
  border: 1px solid rgba(0,0,0,.06);
}

/* ações */
.route-employees .employees-actions-mobile{ display:none; }
.route-employees .employees-col-actions{ width:200px; }

/* ✅ Mobile: ações viram dropdown e botões do topo empilham */
@media (max-width: 576px){
  .route-employees .employees-list-page{
    padding: 1rem;
  }

  .route-employees .employees-list-actions{
    width:100%;
  }
  .route-employees .employees-list-actions .btn{
    width:100%;
  }

  .route-employees .employees-actions-desktop{ display:none; }
  .route-employees .employees-actions-mobile{ display:inline-block; }

  .route-employees .employees-col-actions{
    width: 1%;
    white-space: nowrap;
  }
}

/* ==========================
   EMPLOYEE ROLES
   Body: .route-employees_roles
   ========================== */

.route-employees_roles .employee-roles-page{
  padding: 1.5rem;
}

.route-employees_roles .employee-roles-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 1rem;
}

.route-employees_roles .employee-roles-header-actions{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}

.route-employees_roles .employee-roles-table{
  border: 1px solid rgba(0,0,0,.06);
}

.route-employees_roles .employee-roles-col-count{ width:160px; }
.route-employees_roles .employee-roles-col-actions{ width:220px; }

.route-employees_roles .employee-roles-actions-mobile{ display:none; }

/* ✅ Mobile */
@media (max-width: 576px){
  .route-employees_roles .employee-roles-page{
    padding: 1rem;
  }

  /* header actions full width */
  .route-employees_roles .employee-roles-header-actions{
    width:100%;
  }
  .route-employees_roles .employee-roles-header-actions .btn{
    width:100%;
  }

  /* busca quebra bonito */
  .route-employees_roles .employee-roles-search form .btn,
  .route-employees_roles .employee-roles-search form a.btn{
    width: auto;
  }

  /* ações em dropdown */
  .route-employees_roles .employee-roles-actions-desktop{ display:none; }
  .route-employees_roles .employee-roles-actions-mobile{ display:inline-block; }

  .route-employees_roles .employee-roles-col-actions{
    width: 1%;
    white-space: nowrap;
  }
}

/* ==========================
   REPORT
   Body: .route-report
   ========================== */

.route-report .table-responsive > .table {
  min-width: 720px; /* evita quebrar feio no mobile, permite scroll horizontal */
}

.route-report .accordion-button .badge {
  font-weight: 600;
}

/* filtros: melhora espaçamento */
.route-report #reportFilters .form-label {
  margin-bottom: .25rem;
}

/* cards de resumo com um visual mais consistente */
.route-report .card .display-6 {
  line-height: 1.1;
}

/* ✅ Mobile improvements */
@media (max-width: 576px) {

  /* padding geral menor */
  .route-report main.p-4 {
    padding: 1rem !important;
  }

  /* Header: grupo de botões e export 100% */
  .route-report .btn-group,
  .route-report a.btn {
    max-width: 100%;
  }

  .route-report .btn-group {
    width: 100%;
  }

  .route-report .btn-group .btn {
    flex: 1 1 auto;
  }

  /* Export CSV ocupa largura total */
  .route-report a.btn.btn-outline-secondary.btn-sm.rounded-4 {
    width: 100%;
  }

  /* Filtros: botões aplicar/limpar em coluna */
  .route-report #reportFilters .col-md-3.d-flex {
    flex-direction: column;
  }
  .route-report #reportFilters .col-md-3.d-flex .btn,
  .route-report #reportFilters .col-md-3.d-flex a.btn {
    width: 100%;
  }

  /* Resumo (4 cards): 2 por linha no mobile */
  .route-report .row.g-3.mb-3 > .col-md-3 {
    flex: 0 0 auto;
    width: 50%;
  }

  /* Em telas bem pequenas, 1 por linha */
  @media (max-width: 380px) {
    .route-report .row.g-3.mb-3 > .col-md-3 {
      width: 100%;
    }
  }

  /* Accordion mais compacto */
  .route-report .accordion-button {
    padding: .75rem 1rem;
  }
  .route-report .accordion-body {
    padding: .75rem 1rem;
  }

  /* Tabelas dentro do accordion: scroll suave */
  .route-report .accordion-body .table-responsive > .table {
    min-width: 760px;
  }
}

/* ==========================
   USERS (Admin)
   Body: .route-users
   ========================== */

/* Tabelas: garante scroll horizontal e evita quebrar feio */
.route-users .table-responsive > .table {
  min-width: 860px;
}

/* Botões de ações mais consistentes */
.route-users td.text-end .btn {
  margin-left: .25rem;
}

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

  /* padding menor no conteúdo */
  .route-users main.p-4 {
    padding: 1rem !important;
  }

  /* Botão "Novo" e header quebram bem */
  .route-users .d-flex.align-items-center.justify-content-between.mb-3 {
    flex-wrap: wrap;
    gap: .5rem;
  }

  /* Modais mais confortáveis no celular */
  .route-users .modal-dialog {
    margin: .75rem;
  }

  /* Footer do modal: botões em coluna */
  .route-users .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }

  .route-users .modal-footer .btn {
    width: 100%;
  }
}

/* ================================
   SIDEBAR (DESKTOP + MOBILE)
================================ */

/* Base */
.sidebar{
  width: 250px;
  min-width: 250px;
  border-right: 1px solid rgba(15,23,42,.08);
  background: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  transition: width .18s ease, min-width .18s ease, transform .22s ease;
  z-index: 1045;
}

.sidebar-logo{ height: 44px; transition: height .18s ease; }

.sidebar-toggle{
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
}

.menu-title{
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  color: #64748b;
  margin-bottom: 6px;
}
.menu-divider{ opacity: .12; margin: 10px 0; }

.menu-link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
  margin: 2px 0;
  position: relative;
  font-size: 14px;
  line-height: 1.1;
}
.menu-link i{
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.menu-link:hover{ background: rgba(0,33,77,.06); }
.menu-link.active{
  background: linear-gradient(90deg, rgba(0,33,77,.12), rgba(218,2,54,.08));
  border: 1px solid rgba(15,23,42,.08);
}

.menu-link.is-sub{
  padding-left: 12px;
  margin-left: 10px;
}
.menu-link.is-sub i{ opacity: .9; }

.menu-collapse{
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #0f172a;
  font-weight: 900;
  font-size: 13px;
  margin: 2px 0;
}
.menu-collapse i{ font-size: 16px; }
.menu-collapse:hover{ background: rgba(0,33,77,.06); }
.menu-collapse.active{
  background: rgba(2,6,23,.04);
  border: 1px solid rgba(15,23,42,.06);
}
.menu-collapse .chevron{
  transition: transform .15s ease;
  opacity: .75;
}

.submenu{
  padding: 4px 0 6px;
  border-left: 2px solid rgba(15,23,42,.06);
  margin: 4px 0 8px 8px;
  display: none;
}
.submenu.is-open{ display:block; }

#remindersBadge{ font-size: 11px; font-weight: 900; padding: 3px 7px; }

/* ===== Recolhido (Desktop) ===== */
.sidebar.is-collapsed{ width: 76px; min-width: 76px; }
.sidebar.is-collapsed .menu-title,
.sidebar.is-collapsed .menu-divider{ display:none; }

.sidebar.is-collapsed .menu-link{
  justify-content: center;
  padding: 9px 0;
}
.sidebar.is-collapsed .menu-link span{ display:none; }

.sidebar.is-collapsed .sidebar-top{ justify-content: center !important; }
.sidebar.is-collapsed .sidebar-brand{ display:none !important; }

.sidebar.is-collapsed .sidebar-toggle{
  width: 42px; height: 42px; border-radius: 14px !important;
}

.sidebar.is-collapsed .menu-collapse{
  justify-content: center;
  padding: 9px 0;
}
.sidebar.is-collapsed .menu-collapse span,
.sidebar.is-collapsed .menu-collapse .chevron{
  display:none;
}
.sidebar.is-collapsed .submenu{ display:none !important; }

/* Tooltip (somente recolhido) */
.sidebar.is-collapsed .menu-link[data-tip]:hover::after,
.sidebar.is-collapsed .menu-collapse[data-tip]:hover::after{
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(2,6,23,.92);
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  z-index: 9999;
  box-shadow: 0 18px 35px rgba(2,6,23,.18);
}
.sidebar.is-collapsed .menu-link[data-tip]:hover::before,
.sidebar.is-collapsed .menu-collapse[data-tip]:hover::before{
  content: "";
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: rgba(2,6,23,.92);
}

/* ===== MOBILE OFFCANVAS ===== */
.sidebar-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.55);
  z-index: 1040;
  display: none;
}
.sidebar-backdrop.show{ display:block; }

body.sidebar-mobile-open{
  overflow: hidden;
}

/* Botão flutuante (hambúrguer) */
.sidebar-mobile-fab{
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: 52px;
  height: 52px;
  display: none;             /* só no mobile */
  align-items: center;
  justify-content: center;
  z-index: 1039;
  box-shadow: 0 16px 40px rgba(2,6,23,.18);
}

/* Em telas <= lg: sidebar vira offcanvas */
@media (max-width: 991.98px){
  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 86vw;
    max-width: 320px;
    min-width: 0;
    transform: translateX(-110%);
    box-shadow: 0 22px 60px rgba(2,6,23,.20);
    border-right: 1px solid rgba(15,23,42,.08);
  }

  .sidebar.is-mobile-open{
    transform: translateX(0);
  }

  /* no mobile não usamos estado recolhido */
  .sidebar.is-collapsed{
    width: 86vw;
    min-width: 0;
  }

  .sidebar-mobile-fab{
    display: inline-flex;
  }
}

/* =========================================
   DESATIVAR MAIÚSCULO FORÇADO (senhas / casos especiais)
   IMPORTANTE: quando você clica no "olho", o input vira type="text".
   Então precisamos garantir que inputs com .no-uppercase NÃO virem maiúsculo.
   ========================================= */
input.no-uppercase,
input.no-uppercase[type="text"],
input.no-uppercase[type="password"],
.no-uppercase input,
.no-uppercase textarea{
  text-transform: none !important;
}

/* extra: nunca aplicar uppercase em senha (mesmo sem classe) */
input[type="password"]{
  text-transform: none !important;
}
/* =========================================================
   ===== ACTIVITY VIEW: cor do bloco selecionado (lista de dias)
   - Usa o azul da logo (--brand)
   - Sobrescreve o Bootstrap .list-group-item.active
   ========================================================= */
.page-activity-view .activity-segments .list-group-item.active,
.page-activity-view .activity-segments .list-group-item-action.active{
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

/* badge de duração dentro do item ativo: mantém legível */
.page-activity-view .activity-segments .list-group-item.active .badge{
  background: rgba(255,255,255,.14) !important;
  border-color: rgba(255,255,255,.28) !important;
  color: #fff !important;
}

/* botão X dentro do item ativo */
.page-activity-view .activity-segments .list-group-item.active .btn-outline-danger{
  border-color: rgba(255,255,255,.55) !important;
  color: #fff !important;
}
.page-activity-view .activity-segments .list-group-item.active .btn-outline-danger:hover{
  background: rgba(255,255,255,.16) !important;
}

/* hover dos itens não-ativos */
.page-activity-view .activity-segments .list-group-item:not(.active):hover{
  background: rgba(0,33,77,.06) !important;
}

/* ===== SIDEBAR BASE ===== */
.sidebar {
  width: 280px;
  min-height: 100vh;
  position: sticky;
  top: 0;
  border-right: 1px solid rgba(0,0,0,.08);
  background: #fff;
  z-index: 1030; /* acima do conteúdo */
}

.sidebar .sidebar-logo { height: 34px; width: auto; }
.sidebar .sidebar-brand-text { font-weight: 700; }

/* Desktop collapsed (se você já usa isso, mantém compatível) */
.sidebar.is-collapsed { width: 84px; }
.sidebar.is-collapsed .menu-title,
.sidebar.is-collapsed .menu-link span,
.sidebar.is-collapsed .menu-collapse span span,
.sidebar.is-collapsed .submenu { display: none !important; }

/* Backdrop */
.sidebar-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1040;
}
.sidebar-backdrop.show{
  opacity: 1;
  pointer-events: auto;
}

/* FAB (botão flutuante no mobile) */
.sidebar-mobile-fab{
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: #1f6feb; /* azul da marca (ajusta se quiser) */
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  display: none; /* só no mobile */
  z-index: 1060;
}
.sidebar-mobile-fab i{ font-size: 22px; line-height: 1; }

/* ===== MOBILE: sidebar vira offcanvas ===== */
@media (max-width: 991.98px){
  .sidebar{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: auto;
    transform: translateX(-105%);
    transition: transform .22s ease;
    z-index: 1050;
    width: 86vw;
    max-width: 320px;
    border-right: 1px solid rgba(0,0,0,.08);
  }

  .sidebar.is-mobile-open{
    transform: translateX(0);
  }

  .sidebar-mobile-fab{
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* travar scroll do body quando menu aberto */
  body.sidebar-mobile-open{
    overflow: hidden;
  }

  /* no mobile, sempre mostrar o menu completo (não recolhido) */
  .sidebar.is-collapsed{
    width: 86vw;
  }
  .sidebar.is-collapsed .menu-title,
  .sidebar.is-collapsed .menu-link span,
  .sidebar.is-collapsed .menu-collapse span span,
  .sidebar.is-collapsed .submenu{
    display: initial !important;
  }
}
