/* Reset bÃ¡sico e tipografia */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background-color: #f0f2f5;
  color: #333;
}

/* Estrutura principal: sidebar + conteÃºdo */
.app-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns .25s ease;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: linear-gradient(180deg, #223247 0%, #111b2a 85%);
  color: #cbd1db;            /* cor do texto do menu */
  display: flex;
  flex-direction: column;
  padding: 0rem;
  overflow-y: auto;
  transition: left .3s ease, width .25s ease;
  scrollbar-width: none; /* Firefox */
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar ul {
  list-style: none;
}
.sidebar li + li {
  margin-top: 0.5rem;
}
.sidebar a {
  display: block;
  padding: 0.5rem 1rem 0.5rem 36px; /* reserva coluna fixa para o ícone */
  color: #cbd1db;            /* texto do menu */
  font-size: 0.88rem;        /* reduz ligeiramente o tamanho */
  font-weight: 300;          /* texto mais leve */
  text-decoration: none;
  border-radius: 0px;
  text-align: left;          /* garante alinhamento à esquerda */
  position: relative;        /* base para posicionar o ícone */
  transition: background-color .32s ease, color .32s ease;
}
/* Garante a cor do texto do menu em todos os estados relevantes */
.sidebar a:visited,
.sidebar a:focus {
  color: #cbd1db;
}
/* Garante que spans e ícones dentro do link herdam a mesma cor */
.sidebar a span,
.sidebar a i {
  color: #cbd1db;
}
.sidebar-logo-link:hover {
  background: none !important;
}
.sidebar a:hover,
.sidebar a.active {
  background: #516f90;       /* hover do menu */
  color: #cbd1db;
  border-radius: 0em;
}

/* 2. DÃ¡ um espacinho entre o Ã­cone e o texto, e deixa o Ã­cone um pouco menor */
.sidebar nav ul li a i {
  /* espaÃ§o Ã  direita do Ã­cone */
  margin-right: 0.3rem;
  /* escala do Ã­cone */
  font-size: 0.8em;
  /* alinha verticalmente junto ao texto */
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;       /* substitui margin-right do <i> */
}

/* ConteÃºdo principal */
.main-content {
  grid-column: 2;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: margin-left .25s ease;
  margin-left: 240px;
}

/* Remove bottom spacing from the viewport */
html, body, .app-container, .main-content {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* BotÃ£o toggle mobile */
.menu-toggle-mobile {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background-color: #2f3e4e;
  color: #edf2f7;
  border: none;
  padding: 0.75rem;
  font-size: 1.5rem;
  border-radius: 4px;
  z-index: 200;
  cursor: pointer;
}

/* Em ecrÃ£s atÃ© 768px: escondemos sidebar e mostramos botÃ£o */
@media (max-width: 768px) {
  /* Sidebar escondida e conteÃºdo em full-width */
  .app-container {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .sidebar {
    left: -240px;
  }
  .sidebar.open {
    left: 0;
  }
  .main-content.shifted {
    margin-left: 240px;
  }
  .menu-toggle-mobile {
    display: block;
  }
}

@media (max-width: 768px) {
  /* Garante que em mobile cada â€œcolunaâ€ ocupe toda a largura */
  .dynamic-form form.two-cols > .coluna-1,
  .dynamic-form form.two-cols > .coluna-2 {
    flex: 0 0 100% !important;     /* impede a base de 50% */
    max-width: 100% !important;    /* limita ao container */
    width: 100% !important;        /* forÃ§a 100% */
    margin-bottom: 1rem;           /* espaÃ§o entre colunas empilhadas */
  }
}

/* Container genÃ©rico */
.dynamic-container {
  flex: 1;
  width: 100%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Mobile: expansÃ£o full-width sem bordas ou padding no main */
@media (max-width: 768px) {
  .main-content {
    padding: 5px !important;
    margin-left: 0px;
  }
  .dynamic-container {
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }
}

/* CabeÃ§alho (tÃ­tulo e aÃ§Ãµes) */
.dynamic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.dynamic-header h2 {
  font-size: 1.5rem;
}
.dynamic-actions .btn {
  margin-left: 0.5rem;
}

/* Demais estilos permanecem inalterados... */



/* Filtros: em Ãºnica linha com botÃ£o no fim */
/* Filtros: em Ãºnica linha com botÃ£o no fim */
.dynamic-filters {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}
.dynamic-filters > .filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  width: 100%;
}
.dynamic-filters .filter-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.dynamic-filters label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.dynamic-filters input,
.dynamic-filters select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
}
.dynamic-filters input[type="checkbox"] {
  width: auto;
  margin-top: 0.5rem;
}
.dynamic-filters button[type="submit"] {
  flex: 0 0 auto;
  margin-left: auto;
  height: 2.5rem;
  align-self: flex-end;
}

.dynamic-filters .filter-group {
  display: flex;
  flex-direction: column;
}
.dynamic-filters label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.dynamic-filters input,
.dynamic-filters select {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 120px;
  width: auto;
}
.dynamic-filters input[type="checkbox"] {
  width: auto;
  margin-top: 0.5rem;
}
.dynamic-filters button[type="submit"] {
  margin-left: auto;           /* empurra para o fim da linha */
  height: 2.5rem;
  align-self: flex-end;
}

/* Grid de dados */
.dynamic-list-card {
  gap: 0.6rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafb 60%, #f3f4f6 100%);
  border: 1px solid #e4e7ec;
  max-height: calc(100vh - 60px);
  overflow: hidden;
  backdrop-filter: blur(4px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  position: relative;
}
.dynamic-list-card::before,
.dynamic-list-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
}
.dynamic-list-card::before {
  padding: 1px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(244, 63, 94, 0.25));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}
.dynamic-list-card::after {
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 55%);
  mix-blend-mode: multiply;
}
.dynamic-list-card > * {
  position: relative;
  z-index: 1;
  border-radius: inherit;
}
.dynamic-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.dynamic-list-count {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
  font-weight: 600;
  position: relative;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.dynamic-list-count::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-block;
}
.dynamic-list-actions {
  display: inline-flex;
  gap: 0.75rem;
}
.dynamic-list-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform .15s ease, box-shadow .15s ease;
  border: 1px solid rgba(148, 163, 184, 0.4);
}
.dynamic-list-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.24), 0 0 18px rgba(255, 255, 255, 0.42);
}
.dynamic-list-actions .btn-primary {
  background: linear-gradient(135deg, #2563eb, #ec4899);
  border: none;
  color: #fff;
}
.dynamic-list-actions .btn-outline-secondary {
  background: rgba(15, 23, 42, 0.03);
  color: #0f172a;
}
.dynamic-grid-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 0.25rem;
  position: relative;
}
.dynamic-grid-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.dynamic-grid {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
}
.dynamic-grid table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-spacing: 0;
}
.dynamic-grid th,
.dynamic-grid td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid #e1e4e8;
}
.dynamic-grid th {
  background-color: #f6f8fa;
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 rgba(226, 232, 240, 0.9);
}
.dynamic-grid tbody tr {
  font-size: 14px;
  transition: background-color .15s ease;
}
.dynamic-grid tbody tr:hover {
  background-color: #f1f3f5;
  cursor: pointer;
}
.dynamic-grid tbody tr:nth-child(even) {
  background-color: rgba(249, 250, 251, 0.7);
}
.dynamic-grid tbody tr:nth-child(even):hover {
  background-color: #e8edf3;
}
.dynamic-grid td {
  color: #1f2937;
  font-size: 0.88rem;
}
.dynamic-grid td:first-child {
  font-weight: 600;
  color: #0f172a;
}
.dynamic-grid tbody tr:hover td:first-child {
  color: #2563eb;
}
.dynamic-grid td + td {
  color: #475569;
}
.dynamic-grid table tbody tr:focus-within,
.dynamic-grid table tbody tr:active {
  outline: none;
  box-shadow: inset 2px 0 0 #2563eb;
}
.dynamic-grid::-webkit-scrollbar {
  width: 8px;
}
.dynamic-grid::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.5);
  border-radius: 999px;
}
.dynamic-grid::-webkit-scrollbar-track {
  background: transparent;
}

.dynamic-form-card {
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(15,23,42,0.12);
  padding: 1.5rem;
}
.dynamic-form-actions .btn {
  border-radius: 999px;
  padding-inline: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dynamic-form-body {
  background: transparent;
  padding: 0;
  margin-top: 0;
}
.dynamic-form-body-modern {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.dynamic-form-toolbar .btn {
  border-radius: 999px;
  padding-inline: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dynamic-form-body-modern .row > [class*="col-"] {
  padding-bottom: 0.75rem;
}
.dynamic-form-body-modern label {
  font-weight: 500;
  color: #0f172a;
}
.dynamic-form-body-modern input:not([type="checkbox"]):not([type="radio"]),
.dynamic-form-body-modern textarea,
.dynamic-form-body-modern .form-control {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.55rem 0.95rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15,23,42,0.07);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  font-family: "Inter", "Nunito", sans-serif;
  font-size: 0.93rem;
}
.dynamic-form-body-modern .decimal-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.dynamic-form-body-modern .form-select {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.55rem 0.95rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15,23,42,0.07);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%232563EB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 1rem) center;
  background-size: 12px 8px;
  padding-right: 2.5rem;
}
.dynamic-form-body-modern .form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18), 0 10px 26px rgba(37, 99, 235, 0.16);
}
.dynamic-form-body-modern input:not([type="checkbox"]):not([type="radio"]):focus,
.dynamic-form-body-modern textarea:focus,
.dynamic-form-body-modern .form-control:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18), 0 10px 26px rgba(37, 99, 235, 0.16);
}
.dynamic-form-body-modern .form-check {
  margin-top: 2.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dynamic-form-body-modern .form-check-input {
  margin-top: 0;
}
.dynamic-form-body-modern select::-ms-expand {
  display: none;
}
.dynamic-form-panels {
  margin-top: 1rem;
}
.dynamic-form-panels .accordion-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
.dynamic-form-panels .accordion-button {
  font-weight: 600;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  color: #0f172a;
}
.dynamic-form-panels .accordion-button:focus {
  box-shadow: none;
}
.dynamic-form-panels .accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #e0edff, #d3e1ff);
  color: #2563eb;
}
.dynamic-form-panels .accordion-button::after {
  filter: invert(33%) sepia(60%) saturate(2477%) hue-rotate(205deg) brightness(92%) contrast(95%);
}
.dynamic-form .form-actions {
  border-top: 1px solid rgba(15,23,42,0.08);
  padding-top: 1.5rem;
  margin-top: 2rem;
}
.dynamic-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.dynamic-form .form-actions .btn,
#modalFiltros .dynamic-form-modal-actions .btn {
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  box-shadow: 0 10px 25px rgba(15,23,42,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dynamic-form .form-actions .btn-save,
#modalFiltros .dynamic-form-modal-actions .btn-save {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border: none;
}
.dynamic-form .form-actions .btn-cancel,
.dynamic-form .form-actions .btn-back,
#modalFiltros .dynamic-form-modal-actions .btn-cancel,
#modalFiltros .dynamic-form-modal-actions .btn-back {
  background: linear-gradient(135deg, #f4f6fb, #dfe7ff);
  color: #1e293b;
}
.dynamic-form .form-actions .btn-delete,
#modalFiltros .dynamic-form-modal-actions .btn-delete {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
}
.dynamic-form .form-actions .btn:hover,
#modalFiltros .dynamic-form-modal-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 35px rgba(15,23,42,0.2);
}

@media (max-width: 768px) {
  .dynamic-list-card {
    padding: 1rem;
    max-height: none;
    overflow: visible;
  }
  .dynamic-list-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .dynamic-list-actions {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .dynamic-list-actions .btn {
    flex: 1;
    justify-content: center;
  }
  .dynamic-grid {
    flex: 1;
    min-height: 0;
    height: auto;
    overflow-y: auto;
  }
  .dynamic-grid table {
    width: 100%;
    border-collapse: collapse;
  }
  .dynamic-grid th,
  .dynamic-grid td {
    padding: 0.6rem 0.1rem;
    border-bottom: 1px solid #e1e4e8;
    font-size: smaller;
  }
  .dynamic-grid th {
    background-color: #f6f8fa;
    font-size: 12px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .dynamic-grid tbody tr {
    font-size: 14px;
  }
  .dynamic-grid tbody tr:hover {
    background-color: #f1f3f5;
    cursor: pointer;
  }
}

/* BotÃµes gerais */
.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  margin-top: 0rem;
  border-radius: 100px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-primary {
  background-color: #223044;
  color: #fff;
}
/* Hover para botões primários */
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #0b5ed7;
}
.btn-secondary {
  background-color: #707070; /* cor dos botões Cancelar */
  color: #fff;
}
/* Hover/focus/active dos botões Cancelar */
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: #4f4f4f;
  color: #fff;
}

/* Botão específico: Cancelar */
.btn-cancel {
  background-color: #af9b5c;
  color: #fff;
  border: none;
}
.btn-cancel:hover,
.btn-cancel:focus,
.btn-cancel:active {
  background-color: #ffc107;
  color: #fff;
}

/* Botão específico: Voltar (caso se use .btn-back) */
.btn-back {
  background-color: #707070;
  color: #fff;
  border: none;
}
.btn-back:hover,
.btn-back:focus,
.btn-back:active {
  background-color: #4f4f4f;
  color: #fff;
}

/* Botões de Eliminar */
.btn-danger,
.btn-delete {
  background-color: #a83c38; /* cor base eliminar */
  color: #fff;
  border: none;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-delete:hover,
.btn-delete:focus,
.btn-delete:active {
  background-color: #d73932; /* hover eliminar */
  color: #fff;
}
.btn:hover {
  opacity: 0.9;
}
.btn-new {
  border-radius: 4px;
  background-color: #223044;
  color: #fff;
}
.btn-new:hover,
.btn-new:focus,
.btn-new:active { background-color: #0b5ed7; }
/* FormulÃ¡rio dinÃ¢mico */
.dynamic-form {
  width: 100%;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}
.dynamic-form form.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.dynamic-form .form-group {
  margin-bottom: 1rem;
}

/* Checkboxes no form: input antes do label, alinhado */
/* Checkboxes no formulÃ¡rio: checkbox antes do label, alinhado Ã  esquerda */
.dynamic-form .form-group.checkbox {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.dynamic-form .form-group.checkbox input[type="checkbox"] {
  margin: 0;
  width: 24px;
  width: 1.5em;
  height: 1.5em;
}
.dynamic-form .form-group.checkbox label {
  margin: 0;
}

.dynamic-form .form-group.checkbox input[type="checkbox"] {
  order: 0;
}
.dynamic-form .form-group.checkbox label {
  order: 1;
  margin: 0;
}

.dynamic-form label {
  font-weight: 500;
  font-size: smaller;
  margin-bottom: 0.25rem;
}
.dynamic-form input,
.dynamic-form select,
.dynamic-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.dynamic-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Datepicker (Flatpickr) ajustes mÃ­nimos */
.flatpickr-date {
  width: 100%;
}
/* Mobile: reduzir margens/paddings de listas e formulÃ¡rios */
@media (max-width: 768px) {
  .dynamic-container,
  .dynamic-filters,
  .dynamic-grid,
  .dynamic-form {
    padding: 0.5rem !important;
    margin: 0 !important;
  }
}
@media (max-width: 768px) {
  .form-actions .btn {
    padding: 0.5rem;
    width: 2.5rem;        /* quadrado */
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .form-actions .btn .btn-text {
    display: none;       /* sÃ³ o Ã­cone */
  }
  .form-actions .btn i {
    font-size: 1.2rem;
  }
}
/* Tornar o botÃ£o Filtrar (dentro de .dynamic-filters) num btn-secondary */
.dynamic-filters button {
  background-color: #6c757d; /* cinzento secundÃ¡rio */
  color: white;
  border-color: #6c757d;
}
.dynamic-filters button:hover {
  background-color: #5a6268;
  border-color: #545b62;
}
.dynamic-filters buttonnew {
  background-color: #5a6268;
  border-color: #545b62;
}
/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Login experience (alinhado com os layouts dinamicos) */
.app-container {
  padding: 0;
}
.main-content {
  padding: 2rem;
}
.main-content,
.app-container {
  background-color: transparent;
}

body:not(.authenticated) {
  background:
    radial-gradient(circle at 18% 22%, rgba(59, 130, 246, 0.18), transparent 35%),
    radial-gradient(circle at 82% 0%, rgba(14, 165, 233, 0.22), transparent 32%),
    linear-gradient(135deg, #111b2a 0%, #1a2434 55%, #0f172a 100%);
}
body:not(.authenticated) .app-container {
  height: 100vh;
  padding: 0;
  overflow: hidden;
}
body:not(.authenticated) .main-content {
  margin-left: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: visible;
}
.login-page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3.25rem);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(59, 130, 246, 0.18), transparent 35%),
    radial-gradient(circle at 82% 0%, rgba(14, 165, 233, 0.22), transparent 32%),
    linear-gradient(135deg, #111b2a 0%, #1a2434 55%, #0f172a 100%);
  color: #e2e8f0;
}
.login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(80% 80% at 100% 0%, rgba(255,255,255,0.05), transparent 40%);
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(236,244,255,0.92));
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35), 0 12px 24px rgba(0,0,0,0.12);
  padding: 1.75rem 1.75rem 1.5rem;
  color: #0f172a;
  backdrop-filter: blur(4px);
}
.login-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.login-brand {
  display: grid;
  gap: 0.2rem;
}
.login-logo-wrap {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  background: radial-gradient(circle at 20% 20%, #ecfeff, #e0f2fe);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 10px 28px rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.login-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
}
.login-title {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
  font-size: 1.7rem;
  line-height: 1.1;
}
.login-subtitle {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 500;
}
.login-form .form-group {
  margin-bottom: 1rem;
}
.login-form label {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.35rem;
  display: block;
}
.input-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 10px 24px rgba(15,23,42,0.08);
}
.input-with-icon i {
  color: #475569;
  font-size: 1rem;
}
.input-with-icon .form-control {
  border: none;
  box-shadow: none;
  padding: 0.35rem 0.2rem;
  font-size: 1rem;
}
.input-with-icon .form-control:focus {
  outline: none;
  box-shadow: none;
}
.login-card .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #223247 0%, #111b2a 100%);
  box-shadow: 0 14px 30px rgba(34, 50, 71, 0.35);
}
.login-card .btn-primary:hover,
.login-card .btn-primary:focus {
  background: linear-gradient(135deg, #2c4160 0%, #111b2a 100%);
}
.login-actions {
  margin-top: 0.85rem;
  text-align: center;
}
.login-forgot-link {
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
}
.login-forgot-link:hover,
.login-forgot-link:focus {
  color: #334155;
  text-decoration: underline;
}
.login-card-footer {
  margin-top: 1.1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  font-size: 0.78rem;
  color: #94a3b8;
}
.login-card .alert {
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.15);
}
@media (max-width: 768px) {
  body:not(.authenticated) .app-container {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
  }

  body:not(.authenticated) .main-content {
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
  }

  .login-page {
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    padding:
      max(2.5rem, calc(env(safe-area-inset-top) + 1rem))
      1rem
      max(1.5rem, calc(env(safe-area-inset-bottom) + 0.5rem));
    overflow: visible;
  }

  .login-card {
    width: min(420px, 100%);
    padding: 1.25rem 1.1rem 1rem;
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.26), 0 8px 18px rgba(0,0,0,0.1);
  }

  .login-card-header {
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    text-align: left;
  }

  .login-logo-wrap,
  .login-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .login-title {
    font-size: 1.35rem;
  }

  .login-subtitle {
    font-size: 0.9rem;
  }

  .login-form .form-group {
    margin-bottom: 0.9rem;
  }

  .login-form label {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }

  .input-with-icon {
    gap: 0.55rem;
    padding: 0.38rem 0.6rem;
    border-radius: 11px;
  }

  .input-with-icon i {
    font-size: 0.95rem;
  }

  .input-with-icon .form-control {
    min-height: 2.1rem;
    padding: 0.2rem 0;
    font-size: 0.98rem;
  }

  .login-card .btn-primary {
    padding: 0.78rem 1rem;
    border-radius: 11px;
  }

  .login-actions {
    margin-top: 0.7rem;
  }

  .login-forgot-link {
    font-size: 0.82rem;
  }

  .login-card-footer {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    font-size: 0.72rem;
  }
}
/* Labels sempre em cima dos campos de filtro */
.dynamic-filters .filter-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem; /* pequeno espaÃ§amento entre grupos */
}

.dynamic-filters .filter-item label {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #444;
}
/* â”€â”€â”€ Filtros: checkbox maior para alinhamento â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dynamic-filters .filter-item {
  display: flex;
  flex-direction: column;
}

.dynamic-filters .filter-item input[type="checkbox"] {
  /* aumenta a caixa para alinhar com outros campos */
  width: 1.5em;
  height: 1.5em;
  margin-top: 0.5rem; /* pequeno espaÃ§amento ao rÃ³tulo */
  margin-bottom: 0.5rem;
  margin-left: 0rem;
}

/* opcional: centra horizontalmente o checkbox no seu wrapper */
.dynamic-filters .filter-item.checkbox {
  align-items: left;
}
/* â”€â”€â”€ Checkbox filters: tÃ­tulo em cima e caixa em baixo, ambos centrados â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Usa :has() para afetar sÃ³ os wrappers que contÃªm um checkbox */
.dynamic-filters .filter-item:has(input[type="checkbox"]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;  /* espaÃ§amento entre label e checkbox */
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Dynamic Form â€¢ duas colunas no desktop, uma coluna no mobile
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.two-cols {
  display: flex;
  gap: 1rem;              /* espaÃ§o entre colunas */
}
.two-cols .coluna-1,
.two-cols .coluna-2 {
  flex: 1;                /* cada coluna ocupa igual largura */
}

@media (max-width: 768px) {
  .two-cols {
    flex-direction: column;  /* empilha coluna 2 abaixo da 1 */
  }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Dynamic Form: duas colunas no desktop, empilhar no mobile
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dynamic-form form.two-cols {
  display: flex;
  gap: 1rem;            /* espaÃ§o horizontal entre colunas */
  flex-wrap: wrap;      /* deixa as colunas â€œencolheremâ€ se preciso */
}

.dynamic-form form.two-cols > .coluna-1,
.dynamic-form form.two-cols > .coluna-2 {
  flex: 1 1 calc(50% - 0.5rem);  /* cada coluna ocupa ~50% do espaÃ§o */
}

/* em ecrÃ£s mais estreitos */
@media (max-width: 768px) {
  .dynamic-form form.two-cols {
    flex-direction: column;      /* empilha as colunas */
  }
  .dynamic-form form.two-cols > .coluna-1,
  .dynamic-form form.two-cols > .coluna-2 {
    flex: none;
    width: 100%;                 /* ocupam toda a largura */
    margin-bottom: 1rem;         /* separaÃ§Ã£o vertical */
  }
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Dynamic Form â€“ em mobile cada coluna ocupa 100%
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
  .dynamic-form form.two-cols > .coluna-1,
  .dynamic-form form.two-cols > .coluna-2 {
    /* remove o basis de 50% e forÃ§a 100% */
    flex: 0 0 100% !important;
    max-width: 100%     !important;
    width: 100%         !important;
  }
}


@media (max-width: 768px) {
  .dynamic-form form.two-cols {
    display: flex !important;
    flex-direction: column !important;
  }

  .dynamic-form form.two-cols > .coluna-1,
  .dynamic-form form.two-cols > .coluna-2 {
    flex: none !important;
    width: 100%  !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  /* Faz o container ocupar toda a largura disponÃ­vel */
  .dynamic-container {
    width: 100%      !important;
    max-width: none  !important;
    margin: 0 auto   !important; /* centra, mas como Ã© 100% vai colar Ã s margens */
    padding: 0 1rem  !important; /* um bocadinho de padding lateral, opcional */
  }

  /* E garante que o prÃ³prio form se estica dentro do container */
  .dynamic-form {
    width: 100%      !important;
    max-width: none  !important;
  }
  .dynamic-grid table {
  width: 100%;
  border-collapse: collapse;
  font-size: smaller;
  }
}


@media (max-width: 768px) {
  /* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
     1) Fecha a coluna da sidebar para 0, assim o content ocupa 100%
  â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  .app-container {
    grid-template-columns: 0 1fr !important;
  }

  /* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
     2) Remove o limite de 400px do card/modal-content
     e faz o form ocupar toda a largura Ãºtil
  â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  #modalFiltros .modal-content {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 16px !important;
  }

  /* Se estiveres a usar .dynamic-container ou .dynamic-form, forÃ§a tambÃ©m aqui */
  .dynamic-container,
  .dynamic-form {
    width: 100%         !important;
    max-width: none     !important;
  }
}
/* Evita auto-zoom aumentando o font-size mÃ­nimo dos campos */
.dynamic-form input,
.dynamic-form select,
.dynamic-form textarea,
.dynamic-form button {
  font-size: 16px;
}
/* Sidebar logo */
.sidebar-logo {
  padding: 1.2rem;
  text-align: left;
  font-size: larger;
  font-weight: 900;
}

.sidebar-logo__img {
  max-width: 100%;
  height: auto;
  /* Se quiseres forÃ§ar uma largura fixa, podes usar:
  width: 120px;
  height: auto;
  */
  display: inline-block;
}

/* Dashboard columns */
.dashboard {
  display: flex;
  gap: 0.5rem;
  margin: 0rem 0rem 0 0rem;
}
.col {
  flex: 1;
  min-width: 280px;
  background: transparent;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Widget card */
.widget {
  background: #fff;
  border: 1.5px solid #e1e5e8;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  padding: 1.25rem 1.25rem 1.5rem 1.25rem;
  margin-bottom: 0.5rem;
  min-width: 240px;
}
.widget h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: .01em;
}
.widget table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  margin-bottom: 0.5rem;
  font-size: small;
}
.widget th,
.widget td {
  padding: 0.3rem 0.2rem;
  text-align: left;
  border-bottom: 1px solid #e1e5e8;
  font-size: smaller;
}
.widget th {
  background: #f5f7f9;
  font-weight: 600;
}
.widget tbody tr:nth-child(odd) {
  background: #fcfdfe;
}
.widget tbody tr:hover {
  background: #f0f4f8;
}

/* Dashboard grids (widgets ANALISE) */
.widget .dashboard-grid-wrap {
  max-height: 100%;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.widget table.dashboard-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.widget table.dashboard-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  border-bottom: 1px solid #dbe3ee;
  padding: 7px 8px;
}
.widget table.dashboard-grid tbody td {
  padding: 6px 8px;
  color: #1e293b;
  border-bottom: 1px solid #edf2f7;
}
.widget table.dashboard-grid tbody tr:nth-child(even) td {
  background: #fbfdff;
}
.widget table.dashboard-grid tbody tr:hover td {
  background: #f1f5f9;
}
.widget table.dashboard-grid tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: #eef2ff;
  font-weight: 700;
  border-top: 1px solid #dbe3ee;
  padding: 7px 8px;
}
.dashboard-grid-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 18px 12px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  background: #f8fafc;
}
@media (max-width: 768px) {
  .dashboard { flex-direction: column; }
  .col { min-width: 100%; }
}
.widget td.num, .widget th.num {
  text-align: right !important;
}
/* --- Tornar a Ã¡rea do widget rolÃ¡vel --- */
.widget .widget-body {
  overflow-x: auto;
  /* opcional: espaÃ§o interno para nÃ£o colar nas bordas */
  padding-bottom: 0.5rem;
}

/* --- Garantir que a tabela nÃ£o saia do container --- */
.widget .widget-body table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
}
/* --- Faz o canvas do widget grÃ¡fico preencher 100% da largura --- */
.widget.widget-grafico .widget-body {
  position: relative; /* assegura que o Chart.js fica responsivo */
}

.widget.widget-grafico .widget-body canvas {
  width: 100% !important;
  height: auto !important;
  display: block;     /* remove espaÃ§os brancos Ã  volta */
}
/* Limita e expande widgets */
.widget-body { transition: max-height 0.3s ease; }
.widget.expanded .widget-body { max-height: none !important; }

/* BotÃ£o expandir */
.widget .widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.widget .expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.widget-body {
  transition: max-height 1.5s ease;
}
.widget.expanded .widget-body {
  max-height: 1000px !important; /* ou um valor generoso > maior conteÃºdo */
}
/* Evita quebra em cÃ©lulas numÃ©ricas */
.widget-body table th.num,
.widget-body table td.num {
  white-space: nowrap;
}
/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Grid do Dashboard
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}


/* Em mobile, faz sÃ³ uma coluna */
@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
}

/* DÃ¡ 5px de margem em baixo aos tÃ­tulos H2 de lista e formulÃ¡rio genÃ©ricos */
.dynamic-list h2,
.dynamic-form h2 {
  margin-bottom: 25px;
  color: #2b2b2b;
}
/* Header global */
.app-header {
  background-color: #2d3e50;  /* fundo do header para combinar com sidebar */
  color: #fff;
  padding: 0.5rem 1rem;
  width:100%-240px
}

/* Inner flex container: tÃ­tulo Ã  esquerda, avatar Ã  direita */
.app-header .header-inner {
  display: flex;
  flex: 0;
  justify-content: space-between;
  align-items: center;
}

/* TÃ­tulo da pÃ¡gina */
.app-header .page-title {
  margin: 10px;
  font-size: 1.5rem;
  font-weight: 200;
  width: 400px;
}

/* Avatar do utilizador */
.app-header .user-avatar img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.6);
}

/* Desktop: empurra o header para a direita da sidebar */
@media (min-width: 769px) {
  .app-header {
    margin-left: 240px;                  /* largura fixa da sidebar */
    width: calc(100% - 240px);           /* resto do ecrÃ£ */
  }
}

/* Mobile/tablet: header em full-width */
@media (max-width: 768px) {
  .app-header {
    margin-left: 0;
    width: 100%;
  }
}
/* Ajusta a altura da Ã¡rea principal para levar em conta o header */
.app-container {
  display: flex;
  height: calc(100vh - var(--header-height, 3rem)); /* 3rem = altura aproximada do header */
}

/* Se jÃ¡ tiver height:100% em main-content, substitua por: */
.main-content {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-height, 3rem));
  padding: 1rem;
}

/* Define uma variÃ¡vel CSS para a altura do header, ou ajuste diretamente */
.app-header {
  --header-height: 3rem;   /* ajuste este valor conforme o padding/font-size real */
  height: var(--header-height);
}


/* BotÃ£o dentro do header */
.app-header .header-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  margin-right: 1rem;
  cursor: pointer;
  color: inherit;
}
/* 1) Torna o header um flexâ€container que jÃ¡ inclui o toggle, tÃ­tulo e avatar */
.app-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
}

/* 2) Ajusta o wrapper interno para isolar tÃ­tulo e avatar */
.app-header .header-inner {
  flex: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 3) Estilo base para o botÃ£o no header */
.app-header .menu-toggle-mobile.header-toggle {
  position: static;      /* jÃ¡ nÃ£o Ã© fixed nem absoluto */
  bottom: auto;
  left: auto;
  display: inline-flex;  /* visÃ­vel e inline */
  background: none;
  border: none;
  font-size: 1.5rem;     /* aumenta um pouco */
  margin-right: 0.2rem;    /* espaÃ§o antes do tÃ­tulo */
  color: inherit;
  cursor: pointer;
  display: none;
}

/* 4) Continua a aparecer em mobile (display:block jÃ¡ Ã© tratado pela media query) */
@media (max-width: 768px) {
  .app-header .menu-toggle-mobile.header-toggle {
    display: inline-flex;
  }
}
/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Header e botÃµes de toggle
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.app-header {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  left: 0px;
}

.app-header .header-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;        /* ajusta Ã  cor do header */
  cursor: pointer;
  margin-right: 1rem;
  display: none;      /* escondidos por defeito */
}

/* sempre mostramos o â€œabrirâ€ quando a sidebar estiver fechada */
.menu-toggle-mobile.open-toggle {
  display: inline-flex;
}

/* quando a sidebar ganha a classe â€œopenâ€, invertemos */
.sidebar.open ~ .app-header .open-toggle {
  display: none;
}
.sidebar.open ~ .app-header .close-toggle {
  display: inline-flex;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Sidebar: toggle da classe open
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* (jÃ¡ deverÃ¡s ter JS que faz `sidebar.classList.toggle('open')`
   quando clicares no #menuToggleMobile) */
/* botÃ£o dentro do header */
.app-header {
  display: flex;
  align-items: center;
}

.header-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  margin-right: 1rem;
}

:root {
  --sidebar-width: 240px;   /* largura da sidebar */
  --header-height: 3.5rem;  /* ajusta Ã  altura real do header */
}

/* 1) Header permanece no fluxo normal */
.app-header {
  position: relative;      /* desfaz qualquer fixed que pudesse existir */
  width: 100% - 240px;
  height: var(--header-height);
  line-height: var(--header-height);
  background-color: #2d3e50; /* harmonizado com a sidebar */
  display: flex;
  align-items: center;
  padding: 0 0rem;
  box-sizing: border-box;
  z-index: 100;
}

/* Modern shell header */
.glass-header {
  background: linear-gradient(135deg, #223247 0%, #1a2535 55%, #111b2a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(15,23,42,0.35);
  border-radius: 0;
  margin-left: var(--sidebar-width, 240px);
  margin-right: 0;
  margin-top: 0;
  padding: 0;
}
.glass-header .header-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0 0.85rem 0.2rem;
  gap: 1rem;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.page-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.glass-header .page-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
  color: #f8fafc;
}
.user-menu-container {
  position: relative;
  margin-left: auto;
}
.user-menu-container .btn-user {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(15,23,42,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.user-menu-container #headerUserPhoto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.user-menu-container #headerUserIcon {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.7);
}
.dropdown-menu {
  right: 0;
  left: auto;
  min-width: 200px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.1);
  box-shadow: 0 20px 50px rgba(15,23,42,0.35), 0 5px 15px rgba(0,0,0,0.15);
  margin-top: 0.75rem;
  top: 40px;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .glass-header {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
  }
  .header-right {
    gap: 0.6rem;
  }
}
@media (max-width: 768px) {
  .header-quick-actions {
    display: none !important;
  }
}

/* Sidebar modern blocks */
.sidebar-head {
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 78px;
  position: relative;
}
.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: #fff;
  flex: 1;
  transition: opacity .32s ease;
}
.sidebar-app {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}
.sidebar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}
.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(203, 209, 219, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  opacity: 1;
}
@media (max-width: 768px) {
  .sidebar-collapse-btn {
    display: none !important;
  }
}
body:not(.sidebar-collapsed) .sidebar-collapse-btn {
  margin-top: -48px;
}
.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #e3e7ef;
}

body.sidebar-collapsed .app-container {
  grid-template-columns: 48px 1fr;
}
body.sidebar-collapsed .sidebar {
  width: 48px;
}
body.sidebar-collapsed .main-content {
  margin-left: 48px;
}
@media (min-width: 769px) {
  body.sidebar-collapsed .app-header {
    margin-left: 48px;
    width: calc(100% - 48px);
  }
}
body.sidebar-collapsed .sidebar-head {
  padding: 0.6rem 0.4rem;
  justify-content: center;
  min-height: 78px;
}
body.sidebar-collapsed .sidebar-collapse-btn {
  position: absolute;
  right: 8px;
  top: calc(50% - 20px);
  transform: translateY(-50%);
  margin-top: 0;
}
body.sidebar-collapsed .sidebar-brand {
  opacity: 0;
  visibility: hidden;
}
body.sidebar-collapsed .sidebar-footer {
  opacity: 1;
  display: flex;
}
body.sidebar-collapsed .sidebar-label {
  opacity: 0;
}
.sidebar-label {
  transition: opacity .32s ease;
}
.menu-new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 6px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  position: relative;
  top: 2px;
  line-height: 1;
}
body.sidebar-collapsed .menu-new-badge {
  display: none;
}
body.sidebar-collapsed .menu-has-new > i:first-child,
body.sidebar-collapsed .menu-has-new > span > i:first-child {
  position: relative;
}
body.sidebar-collapsed .menu-has-new > i:first-child::after,
body.sidebar-collapsed .menu-has-new > span > i:first-child::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  top: 6px;
  right: -4px;
  box-shadow: 0 0 0 2px #2d3e50;
}
.sidebar a i {
  transition: opacity .32s ease;
}
.sidebar-footer {
  transition: opacity .32s ease;
}

body.sidebar-fading .sidebar-brand,
body.sidebar-fading .sidebar-label,
body.sidebar-fading .sidebar-footer,
body.sidebar-fading .sidebar a i {
  opacity: 0;
}
body.sidebar-icons-hidden .sidebar a i {
  opacity: 0;
}
body.sidebar-menu-hidden .sidebar-brand,
body.sidebar-menu-hidden .sidebar-label,
body.sidebar-menu-hidden .sidebar-footer {
  opacity: 0;
}
body.sidebar-menu-hidden .sidebar a.active {
  background: transparent !important;
  color: #cbd1db !important;
}
body.sidebar-menu-hidden .sidebar a.active span,
body.sidebar-menu-hidden .sidebar a.active i {
  color: #cbd1db !important;
}
body.sidebar-fading .sidebar-collapse-btn {
  opacity: 0;
  transition: opacity .32s ease;
}
body.sidebar-collapsed .sidebar a {
  padding: 0.55rem 0;
  font-size: 0;
  text-align: center;
}
body.sidebar-collapsed .sidebar-footer-link {
  padding: 0.45rem 0;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-footer-link i {
  margin-right: 0 !important;
}
body.sidebar-collapsed .sidebar a i {
  font-size: 14px;
}
body.sidebar-collapsed .sidebar nav ul li a > i:first-child,
body.sidebar-collapsed .sidebar nav ul li a span > i:first-child {
  position: static;
  transform: none;
  width: auto;
  margin-right: 0 !important;
}
body.sidebar-collapsed .sidebar .sidebar-label,
body.sidebar-collapsed .sidebar .sidebar-group .fa-chevron-down {
  display: none;
}
body.sidebar-collapsed .sidebar .collapse {
  display: none !important;
}
body.sidebar-collapsed .sidebar a:hover,
body.sidebar-collapsed .sidebar a.active {
  background: transparent;
  color: #cbd1db;
}
@media (min-width: 769px) {
  .app-header {
    transition: margin-left .25s ease, width .25s ease;
  }
}
body.sidebar-collapsed .sidebar-flyout {
  display: block;
}
.sidebar-flyout {
  position: fixed;
  z-index: 2100;
  min-width: 190px;
  max-width: 260px;
  background: #152131;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: 0 18px 36px rgba(5, 10, 20, 0.4);
  display: none;
  opacity: 0;
  transition: opacity .32s ease;
}
.sidebar-flyout.sidebar-flyout-show {
  opacity: 1;
}
.sidebar-flyout .flyout-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  padding: 0.4rem 0.6rem 0.2rem;
}
.sidebar-flyout a {
  display: block;
  color: #cbd1db;
  text-decoration: none;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.sidebar-flyout a i {
  width: 18px;
  text-align: center;
  flex: 0 0 18px;
  margin-right: 0 !important;
}
.sidebar-flyout a:hover {
  background: rgba(81, 111, 144, 0.45);
  color: #fff;
}
.sidebar-nav {
  padding: 1rem;
}
.sidebar-group {
  font-weight: 500;
  color: #cbd5f5;
}
.sidebar-footer {
  margin-top: auto;
  padding: 1.5rem 0.75rem 1.5rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.sidebar-footer-link {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.2rem;
  border-radius: 6px;
}
.sidebar-footer-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}


/* 2) Empurra o container todo abaixo do header */
.app-container {
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* 3) Sidebar fixa em altura completa abaixo do header */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
}

/* 4) Main content ocupa o resto e permite scroll interno */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

@media (min-width: 769px) {
  body.authenticated:not(.no-sidebar) .main-content {
    flex: 0 0 calc(100% - 240px);
    width: calc(100% - 240px) !important;
    max-width: calc(100% - 240px) !important;
  }
  body.authenticated.sidebar-collapsed:not(.no-sidebar) .main-content {
    flex-basis: calc(100% - 48px);
    width: calc(100% - 48px) !important;
    max-width: calc(100% - 48px) !important;
  }
}

/* 5) Em mobile, podes fazer o reset do margin e largura da sidebar se quiseres */
@media (max-width: 768px) {
  .app-header {
    /* mantÃ©ns relative, full width */
    left: 0px;
    width: 100%-140px;
  }
  .app-header {
  left: 0px;
  width: 100%-140px;
  }  
  .app-container {
    display: block;       /* sidebar + main em bloco */
    height: auto;
  }
  .main-content {
    margin-top: 0;
    height: auto;
  }
/* header posicionado normalmente */
.app-header {
  position: relative;
  left: 0;
  width:100%-240px;
  transition: left 0.3s ease;
}

/* quando o body tiver a classe sidebar-open, desloca o header */
body.sidebar-open .app-header {
  left: 240px; /* ou var(--sidebar-width) */
  width: 100%-240px !important;
}
}

#modalBody .form-group {
  margin-bottom: 1rem;
}
#modalBody label {
  font-weight: 500;
}
#modalBody input, #modalBody select {
  width: 100%;
  padding: .5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.modal {
  display: none;
  color:#0a0e25;  
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  color: #cbd1db;            /* cor dos itens do menu */
}

.sidebar ul li a {
  padding: 8px 10px 8px 36px; /* mesmo alinhamento do topo */
  margin-left: 0;
  display: block;
  text-decoration: none;
  color: #cbd1db;
  font-size: 0.88rem;        /* manter tamanho reduzido também aqui */
}

/* Reserva uma coluna fixa para os ícones e alinha o texto igual em todos */
.sidebar nav ul li a > i:first-child,
.sidebar nav ul li a span > i:first-child {
  position: absolute;
  left: 12px;                /* margem à esquerda do ícone */
  top: 50%;                  /* alinha verticalmente ao centro */
  transform: translateY(-50%);
  width: 20px;               /* largura fixa para todos os ícones */
  text-align: center;        /* centraliza o ícone na coluna */
  display: inline-block;     /* sobrepõe regras anteriores */
  margin-right: 0 !important;
}

/* Mantém a indentação dos submenus (igual ao Bootstrap ps-3) */
.sidebar .collapse.list-unstyled.ps-3 {
  padding-left: 1rem !important;
}

.sidebar ul li a.active {
  background: #516f90;
  color: #cbd1db;
}
/* Hover específico com maior especificidade para prevalecer */
.sidebar ul li a:hover {
  background: #516f90;
  color: #cbd1db;
}

/* deixar o fundo do modal transparente e borrado */
.modal-backdrop.show {
  background-color: transparent !important;    /* retira o preto/azulado */
  backdrop-filter: blur(100%);                  /* aplica blur no conteÃºdo por trÃ¡s */
}

/* opcional: se quiseres tambÃ©m escurecer ligeiramente o que hÃ¡ por trÃ¡s */
.modal-backdrop.show::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.2);
}

/* 1ï¸âƒ£ Torna o backdrop totalmente transparente */
.modal-backdrop {
  background-color: transparent !important;
}


/* 3ï¸âƒ£ Garante que o modal fica acima de tudo */
.modal {
  z-index: 2000;   /* por cima do backdrop e do resto */
}

/* CalendÃ¡rio como widget igual aos outros */
.widget-calendar {
  /* Reaproveita o estilo base de .widget */
  /* (pode estar vazio se quiseres o mesmo) */
}

.widget-calendar .widget-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.widget-calendar .widget-body {
  padding: 1rem 0.5rem 0 0.5rem; /* um bocadinho mais de espaÃ§o em cima e em baixo */
  overflow-x: auto;             /* scroll horizontal se necessÃ¡rio */
}

/* Ajuste extra para a tabela dentro do widget */
.widget-calendar .calendar-table {
  margin-bottom: 0;
  border: none; /* tira borda externa se houver */
}

.widget-calendar .calendar-table th,
.widget-calendar .calendar-table td {
  border: 1px solid #e1e5e8; /* mantÃ©m linhas internas */
}

/* BotÃµes de navegaÃ§Ã£o ficam mais discretos */
.widget-calendar .btn-link {
  color: #5192b8;
  text-decoration: none;
  font-size: 1.25rem;
}
/* â”€â”€â”€ Desativa o blur de fundo ao abrir o modalFiltros â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.btn-group {
  width: 120px;
}

.planner-table {
  width: 1600px;
}
.planner-table th,
.planner-table td {
  border: 1px solid #dee2e6 !important;  /* forÃ§a linhas de grelha */
}
.table-secondary td{
  background-color: #ffffff;
}

.gantt-bar-checkout {
  box-shadow: 0 2px 8px 0 rgba(0,123,255,0.09);
}

.team-dropdown .dropdown-item:hover {
  background: #f0f8ff;
}
/* 1) AcordeÃ£o mais compacto */
.accordion .accordion-button {
  padding: 0.5rem 1rem;       /* menos padding vertical */
  font-size: 0.95rem;         /* texto ligeiramente mais pequeno */
  min-height: 2.5rem;         /* forÃ§a uma altura consistente */
  background-color: #e9ecef;  /* cor suave por defeito */
  color: #313131;
  border: 1px solid #dfe3e8;  /* separador */
  border-radius: 4px !important;
  transition: background-color .2s;
}

/* 2) CabeÃ§alho activo (expandido) */
.accordion .accordion-button:not(.collapsed) {
  background-color: #e0edff;
  color: #2563eb;
}

/* 3) Retirar o â€œgapâ€ em branco ao fechar:
   fecha os cantos inferiores do header para encostar no prÃ³ximo item */
.accordion .accordion-button.collapsed {
  border-bottom-left-radius: 4 !important;
  border-bottom-right-radius: 4 !important;
}

/* 4) Os items tambÃ©m com borda suave e arredondado */
.accordion .accordion-item {
  border: none;
  margin-bottom: 0.5rem;
}

/* 5) O corpo do acordeÃ£o (quando aberto) */
.accordion .accordion-collapse .accordion-body {
  padding: 0;                 /* para usar o padding do card interno */
  background-color: transparent;
}

/* 6) O card interno (detalhes / anexos) */
.accordion .accordion-body > .card {
  margin: 0;
  border: 1px solid #dfe3e8;
  border-top: none;           /* junta ao header */
  border-radius: 0 0 4px 4px; /* sÃ³ os cantos de baixo */
}

/* 7) BottÃ£o Anexar fixo a 200px */
#btnAddAnexo {
  width: 120px !important;
}
/* Garante que a coluna de checkbox nÃ£o desapaarece */
.table-responsive table th:first-child,
.table-responsive table td:first-child {
  width: 2rem;
  text-align: center;
  vertical-align: middle;
}
input[type="checkbox"].detail-select {
  width: 1.2em;
  height: 1.2em;
  aspect-ratio: 1 / 1;         /* forÃ§a formato quadrado */
  vertical-align: middle;
  margin: 0;
}

.badge-dev-edit {
    background-color: #1c8aff;
    color: white;
    font-weight: 900;
    border-radius: 0.5rem;
    font-size: 0.6rem;
    padding: 2px 5px;
    margin-left: 6px;
    vertical-align: middle;
    transition: background-color 0.2s ease;
}

.badge-dev-edit:hover {
  background-color: #0056b3;
}
.calendar-table {
  table-layout: fixed;
  width: 100%;
}

.calendar-table th,
.calendar-table td {
  width: 14.2857%;
}
/* CabeÃ§alhos (Dias da semana) centrados */
.calendar-table th {
  text-align: center;
}

/* CÃ©lulas do corpo (nÃºmeros dos dias e eventos) alinhados Ã  esquerda */
.calendar-table td {
  text-align: left !important;
  padding-left: 0.75rem; /* opcional: um pouco de espaÃ§amento Ã  esquerda */
}
.was-validated :invalid {
  border-color: red !important;
}

/* â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   Estilo refinado para a pÃ¡gina de AnÃ¡lise (com zebra + hover)
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.analise-wrapper {
  padding: 0rem 0rem;
  max-width: 100%;
}

.analise-box {
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  overflow-x: auto;
  font-size: 0.8rem;
}

.analise-box h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.analise-box table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: inherit;
}

.analise-box th,
.analise-box td {
  padding: 0.4rem 0.6rem;
  border: 1px solid #eee;
  white-space: nowrap;
  font-size: smaller;
}

.analise-box th {
  background: #f5f7f9;
  font-weight: bold;
  text-align: left;
}

.analise-box tbody tr:nth-child(odd) {
  background: #fafafa;
}

.analise-box tbody tr:hover {
  background: #f0f4ff;
}

.analise-box td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analise-box tfoot td {
  font-weight: bold;
  background: #f9f9f9;
}

.btn-dashboard {
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.4rem 0.8rem;
  background: linear-gradient(135deg, #2563eb, #ec4899);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
}
.btn-dashboard:hover {
  background: linear-gradient(135deg, #2f6df2, #f05aab);
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.link-tile {
  display: flex;
  align-items: center;
  padding: 0.3rem 0.5rem;
  border-radius: 9px;
  background: #f0f0f0;
  text-decoration: none;
  color: #222;
  font-weight: 300;
  font-size: small;
  transition: background 0.7s;
}
.link-tile .icon {
  font-size: 0.7rem;
  margin-right: 0.6rem;
}
.link-tile .label {
  flex-grow: 1;
}

.link-tile:hover {
  background: #e0e0e0;
}

.link-tile.blue  { background: #e7f0fd; color: #084298; }
.link-tile.green { background: #e9f7ef; color: #1e5631; }
.link-tile.red   { background: #fcebea; color: #842029; }

.link-tile.blue:hover  { background: #d0e4fc; }
.link-tile.green:hover { background: #d2f4e3; }
.link-tile.red:hover   { background: #f8d7da; }

#prev-day,
#next-day {
  background-color: #223044;  /* tom suave */
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
}
#prev-day:hover,
#next-day:hover {
  background-color: #0b5ed7;
}
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
  }

  .app-container, .main-content, .sidebar {
    overflow-x: hidden !important;
    max-width: 100vw;
  }

  * {
    box-sizing: border-box;
  }
}
.no-sidebar .main-content {
  margin-left: 0 !important;
}

.no-sidebar .app-container {
  padding-left: 0 !important;
}

.no-sidebar .sidebar {
  display: none !important;
}


body:not(.authenticated) .main-content {
  margin-left: 0;
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
  max-width: 100%;
}
@media (max-width: 768px) {
  .app-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
}

.planner-table tr {
  overflow: visible !important;
}

.planner-table td {
  position: relative;
  overflow: visible;
}
.small-text {
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.22), transparent 32%),
              radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.24), transparent 30%),
              rgba(10, 16, 28, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 220ms cubic-bezier(.72,0,.23,1);
}
.loading-panel {
  background: rgba(17, 24, 39, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 1.1rem 1.35rem 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-width: 230px;
}
.loading-spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.35);
  border-top-color: #38bdf8;
  border-right-color: rgba(148, 163, 184, 0.25);
  animation: loading-spin 1s linear infinite;
  position: relative;
  box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12);
}
.loading-spinner::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 2px dashed rgba(148, 163, 184, 0.35);
  border-top-color: #c084fc;
  border-left-color: rgba(148, 163, 184, 0.15);
  animation: loading-spin 1.4s linear infinite reverse;
}
.loading-text {
  color: #e5e7eb;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.loading-progress {
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.loading-progress-bar {
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, #38bdf8, #a78bfa, #38bdf8);
  border-radius: inherit;
  animation: loading-slide 1.3s ease-in-out infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}
@keyframes loading-slide {
  0% { left: -45%; }
  50% { left: 30%; }
  100% { left: 110%; }
}

.lds-glassdots {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  height: 20px;
}
.lds-glassdots div {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b0b3b8 0%, #686868 100%);
  box-shadow: 0 2px 8px 0 rgba(80,80,80,0.09);
  opacity: 0.18;
  animation: glass-bounce 1.1s infinite cubic-bezier(.62,.28,.23,.99);
  filter: blur(0.1px);
  will-change: transform, opacity;
  transition: background 0.2s;
}
.lds-glassdots div:nth-child(1) { animation-delay: 0s; }
.lds-glassdots div:nth-child(2) { animation-delay: 0.18s; }
.lds-glassdots div:nth-child(3) { animation-delay: 0.36s; }

@keyframes glass-bounce {
  0%, 80%, 100% { transform: translateY(0) scale(1); opacity: 0.18; }
  40% { transform: translateY(-9px) scale(1.09); opacity: 0.62; }
}

.fab-btn {
  position: fixed;
  bottom: 18px;    /* distÃ¢ncia ao topo (ajusta conforme header) */
  right: 18px;
  z-index: 1032;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #2563eb, #ec4899);
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.24), 0 0 18px rgba(255, 255, 255, 0.42);
  font-size: 1.7rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: box-shadow .16s, background .22s;
}
.fab-btn:hover,
.fab-btn:focus {
  background: linear-gradient(135deg, #2f6df2, #f05aab);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 34px rgba(96,165,250,0.32), 0 0 24px rgba(255, 255, 255, 0.55);
}

.fab-menu {
  position: fixed;
  bottom: 70px; right: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(15,23,42,0.35), 0 4px 12px rgba(0,0,0,0.12);
  min-width: 180px;
  padding: 8px 0;
  border: 1px solid rgba(15,23,42,0.08);
}
.fab-menu-item {
  display: flex; align-items: left;
  background: none; border: none; width: 100%; text-align: left;
  font-size: 1.05rem; padding: 8px 22px; color: #1c1c1c;
  cursor: pointer;
  transition: background 0.14s;
}
.fab-menu-item:hover {
  background: #f7fafd;
  color: #1677ff;
}

.planner-container {
  position: relative;
}

.planner2-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.planner2-card {
  flex: 1 1 auto;
  min-height: 0;
}
.planner2-body {
  height: 100%;
  min-height: 0;
}
.planner2-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.planner2-filters-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.planner2-filters-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.planner2-filter-toggles {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
}
.planner2-filters .btn.btn-outline-primary {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.6);
  color: #2563eb;
}
.planner2-save:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}
.planner2-team-dropdown {
  position: fixed;
  z-index: 3000;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 20px 40px rgba(15,23,42,0.18);
  min-width: 160px;
  font-size: 12px;
}
.planner2-cleaning-menu {
  position: fixed;
  z-index: 3000;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 20px 40px rgba(15,23,42,0.18);
  min-width: 150px;
  font-size: 12px;
}
.planner2-cleaning-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.planner2-cleaning-menu-item:hover {
  background: #f1f5f9;
}
.planner2-cleaning-menu-item i {
  width: 18px;
  text-align: center;
  color: #475569;
}
.planner2-team-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.planner2-team-item:hover {
  background: #f1f5f9;
}
.planner2-team-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 10px;
}
.planner2-body {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.planner2-gantt {
  flex: 0 0 1282px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.planner2-side {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}
.planner2-side-card {
  height: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 14px 30px rgba(15,23,42,0.1);
  overflow-y: auto;
  scrollbar-width: none;
}
.planner2-side-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.planner2-side-title {
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.5rem;
}
.planner2-team-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.planner2-team-card {
  border: 1px solid rgba(124,58,237,0.65);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.35), rgba(236,72,153,0.35));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.planner2-team-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}
.planner2-team-chip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 10px;
}
.planner2-team-name {
  flex: 1 1 auto;
}
.planner2-team-total {
  font-size: 0.8rem;
  color: #2563eb;
  font-weight: 700;
}
.planner2-team-rows {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.2rem;
}
.planner2-team-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #475569;
}
.planner2-team-schedule {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.planner2-team-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.planner2-team-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  font-weight: 700;
}
.planner2-team-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.planner2-team-section-meta {
  font-size: 0.75rem;
  color: #475569;
}
.planner2-team-section-alerts {
  font-size: 0.72rem;
  color: #b91c1c;
  font-weight: 600;
}
.planner2-team-section-suggested {
  margin-top: 0.8rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(148,163,184,0.6);
}
.planner2-team-section-suggested .planner2-team-schedule {
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 0.35rem;
}
.planner2-team-apply {
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  border-radius: 999px;
}
.planner2-team-tag {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.75);
  border: 1px solid #cbd5e1;
  font-size: 0.75rem;
  color: #111827;
  font-weight: 600;
  white-space: nowrap;
}
.planner2-team-lunch {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.55);
  color: #92400e;
  font-weight: 700;
  font-size: 0.7rem;
}
.planner2-team-lunch .planner2-team-tag-meta {
  color: #92400e;
  font-weight: 700;
}
.planner2-team-tag-meta {
  font-size: 0.7rem;
  font-weight: 600;
  color: #334155;
}
.planner2-team-gap {
  background: #475569;
  color: #f8fafc;
  font-weight: 600;
}
.planner2-team-gap span {
  color: inherit;
}
.planner2-team-gap .planner2-team-tag-meta {
  color: #e2e8f0;
}
.planner2-team-arrow {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 700;
}

.geo-page {
  display: grid;
  grid-template-columns: 340px 1fr 360px;
  gap: 1rem;
  height: calc(100vh - 140px);
}
.geo-topbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.geo-count {
  font-weight: 600;
  margin-left: 0.4rem;
}
.geo-disabled {
  opacity: 0.6;
  pointer-events: none;
}
.geo-readonly {
  opacity: 0.7;
}
.geo-rotas {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  min-width: 0;
  box-shadow: 0 10px 20px rgba(15,23,42,0.06);
}
.geo-rotas-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.4rem;
}
.geo-rotas-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.geo-rotas-bar {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.geo-rotas-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #ec4899);
  border-radius: 999px;
  transition: width 0.2s ease;
}
.geo-rotas-text {
  font-size: 0.75rem;
  color: #334155;
  margin-top: 0.25rem;
}
.geo-rotas-counts {
  font-size: 0.72rem;
  color: #64748b;
}
.geo-left,
.geo-right,
.geo-poi {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.geo-poi-detail .card{
  border:1px solid #e2e8f0;
  border-radius:12px;
  box-shadow:0 8px 18px rgba(15,23,42,0.06);
}
.geo-poi-modal-results{
  max-height: 360px;
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
}
.geo-poi-modal-row{
  padding:.55rem .65rem;
  border-bottom:1px solid #f1f5f9;
}
.geo-poi-modal-row:last-child{border-bottom:0;}
.geo-right-top {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 0.8rem;
}
.geo-right-top > .geo-form,
.geo-right-top > .geo-rotas {
  flex: 1;
  min-width: 0;
}
.geo-right-top > .geo-form {
  flex: 7;
}
.geo-right-top > .geo-rotas {
  flex: 3;
}
.geo-right-top > .geo-form,
.geo-right-top > .geo-rotas {
  height: 100%;
}
.geo-right-top .card {
  height: 100%;
}
.geo-right-top .geo-form {
  margin-bottom: 0;
}
.geo-list-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.geo-status {
  font-size: 0.8rem;
  color: #64748b;
}
.geo-list {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.5rem;
}
.geo-item {
  padding: 0.58rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.25);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.05);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.geo-item + .geo-item {
  margin-top: 0.45rem;
}
.geo-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.geo-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  padding: 0.2rem 0.4rem;
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.geo-item-badge.ok {
  color: #065f46;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.geo-item-badge.warn {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fdba74;
}
.geo-item.geo-item-no-coords .geo-item-title {
  color: #334155;
}
.geo-item:hover {
  background: #f8fbff;
  border-color: rgba(59,130,246,0.35);
  box-shadow: 0 8px 18px rgba(37,99,235,0.12);
  transform: translateY(-1px);
}
.geo-item.active {
  background: linear-gradient(180deg, rgba(219,234,254,0.72) 0%, rgba(239,246,255,0.92) 100%);
  border: 1px solid rgba(59,130,246,0.55);
  box-shadow: 0 10px 24px rgba(37,99,235,0.14);
}
.geo-item-title {
  font-weight: 600;
  font-size: 0.88rem;
}
.geo-item-sub {
  margin-top: 0.16rem;
  font-size: 0.73rem;
  color: #64748b;
}
.geo-empty {
  text-align: center;
  color: #94a3b8;
  padding: 1rem;
}
.geo-form {
  flex: 1;
  margin-bottom: 0.8rem;
}
.geo-field-value {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.85rem;
  color: #334155;
}
.geo-right-top .geo-rotas {
  align-self: stretch;
}
.geo-form-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.geo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.geo-selected-name {
  font-weight: 700;
  font-size: 1rem;
}
.geo-dirty {
  display: none;
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 600;
}
.geo-dirty.visible {
  display: block;
}
.geo-alt {
  margin-top: 0.6rem;
}
.geo-route-info{
  margin-top: .5rem;
  padding: .45rem .6rem;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: .8rem;
  font-weight: 600;
}
.geo-route-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.5rem;
  max-height: 340px;
  overflow: auto;
}
.geo-route-card {
  border: 1px solid rgba(148,163,184,0.3);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 0.5rem 0.6rem;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15,23,42,0.05);
  transition: all 0.15s ease;
}
.geo-route-card:hover {
  border-color: rgba(59,130,246,0.45);
  background: #eff6ff;
  box-shadow: 0 8px 18px rgba(37,99,235,0.12);
  transform: translateY(-1px);
}
.geo-route-card.active {
  border-color: #2563eb;
  background: linear-gradient(180deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.35), 0 8px 18px rgba(37,99,235,0.16);
}
.geo-route-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}
.geo-route-card-sub {
  font-size: 0.72rem;
  color: #475569;
}
.geo-route-loading {
  display: none;
  margin-top: 0.7rem;
  align-items: center;
  gap: 0.45rem;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
}
.geo-route-loading.visible {
  display: inline-flex;
}
.geo-route-stop-icon {
  background: transparent;
  border: 0;
}
.geo-route-stop-icon span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d4ed8;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 2px 6px rgba(15,23,42,0.25);
}
.geo-alt-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 0.25rem;
}
.geo-alt-list {
  display: grid;
  gap: 0.35rem;
}
.geo-alt-item {
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  background: #fff;
  font-size: 0.75rem;
}
.geo-alt-item:hover {
  background: #f8fafc;
}
.geo-alt-loading,
.geo-alt-error {
  font-size: 0.8rem;
  color: #64748b;
}
.geo-map {
  flex: 1;
  min-height: 360px;
}
#geoMap {
  height: 100%;
  min-height: 360px;
  border-radius: 12px;
}

@media (max-width: 992px) {
  .geo-page {
    grid-template-columns: 1fr;
    height: auto;
  }
}
.planner2-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(15,23,42,0.1);
  width: 1282px;
}
.planner2-table {
  width: max-content;
  border-collapse: collapse;
  table-layout: fixed;
}
.planner2-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 2;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  height: 44px;
}
.planner2-table thead th.planner2-col-lodge {
  left: 0;
  z-index: 4;
  background: #fbfdff;
}
.planner2-table th,
.planner2-table td {
  border: 1px solid #e5e7eb;
  padding: 0;
  text-align: center;
}
.planner2-table td.planner2-col-lodge,
.planner2-table th.planner2-col-lodge {
  text-align: left !important;
  padding-left: 10px !important;
}
.planner2-col-lodge {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  text-align: left !important;
  padding: 0 0.6rem 0 10px;
  font-weight: 700;
  font-size: 11px;
  color: #1f2937;
  background: #fbfdff;
  position: sticky;
  left: 0;
  z-index: 3;
}
.planner2-col-hour {
  min-width: 64px;
}
.planner2-slot {
  width: 32px;
  min-width: 32px;
  height: 32px;
  background: #fff;
}
.planner2-table tbody tr {
  position: relative;
}
.planner2-table tbody tr:nth-child(even) {
  background: #f9fafb;
}
.planner2-table tbody tr:hover {
  background: #eef2f7;
}
.planner2-bar {
  position: absolute;
  top: 4px;
  height: 24px;
  border-radius: 8px;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(14,165,233,0.35), rgba(124,58,237,0.25));
  border: 1px solid rgba(124,58,237,0.65);
  color: #0f172a;
  display: flex;
  align-items: center;
}
.planner2-bar-center {
  justify-content: center;
}
.planner2-bar-label {
  font-size: 10px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}
.planner2-bar-label-left {
  padding-left: 6px;
}
.planner2-bar-label-right {
  margin-left: auto;
  padding-right: 6px;
}
.planner2-bar-checkout {
  background: linear-gradient(90deg, rgba(14,165,233,0.35), rgba(124,58,237,0.25));
  border-color: rgba(124,58,237,0.65);
  pointer-events: auto;
  cursor: default;
}
.planner2-bar-checkin {
  background: linear-gradient(90deg, rgba(14,165,233,0.35), rgba(124,58,237,0.25));
  border-color: rgba(124,58,237,0.65);
  pointer-events: auto;
  cursor: default;
}
.planner2-bar-occupied {
  background: linear-gradient(90deg, rgba(148,163,184,0.35), rgba(100,116,139,0.25));
  border-color: rgba(148,163,184,0.6);
  pointer-events: auto;
}
.planner2-bar-cleaning {
  border-color: rgba(15,23,42,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  pointer-events: auto;
}
.planner2-bar-cleaning {
  cursor: default;
}
.planner2-bar-cleaning.planner2-bar-dragging {
  cursor: default;
  opacity: 0.85;
}
.planner2-bar-cleaning .planner2-bar-label {
  color: #0f172a;
  font-weight: 800;
  font-size: 8px;
  text-shadow: none;
  text-align: center;
  width: 100%;
}
.planner2-tooltip {
  position: fixed;
  z-index: 3000;
  background: #f7efc6;
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
  font-weight: 500;
  pointer-events: none;
}
@media (max-width: 1024px) {
  .geo-page{
    grid-template-columns: 1fr;
    height: auto;
  }
  .geo-left, .geo-right, .geo-poi{
    min-height: 420px;
  }
  .planner2-body {
    flex-direction: column;
  }
  .planner2-gantt,
  .planner2-side {
    flex: 1 1 auto;
  }
  .planner2-wrapper {
    height: auto;
  }
}
#btnPrintLabels {
  transition: box-shadow 0.18s, background 0.18s;
}
#btnPrintLabels:hover {
  box-shadow: 0 2px 14px #2230442e;
  background: #1564cf;
}
/* --- ForÃ§a o botÃ£o do utilizador no canto superior direito do header --- */
.app-header,
.page-header,
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-title {
  margin: 0;
  flex: 1;            /* Ocupa o espaÃ§o restante */
}

.user-menu-container {
  position: absolute !important;
  right: 12px;               /* encostado Ã  direita */
  top: 50%;                  /* centrado verticalmente no header */
  transform: translateY(-50%);
  margin-left: 0 !important; /* neutraliza o ms-auto */
  z-index: 10;               /* para aparecer acima */
}

/* Garante que o dropdown abre para a direita */
.dropdown-menu {
  left: auto !important;
  right: 0 !important;
}


/* Overrides específicos de mobile para o perfil */
@media (max-width: 768px) {
  .form-actions #btnChangePwd {
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 0.75rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .form-actions #btnChangePwd .btn-text {
    display: inline !important;
  }
}






/* Perfil - bloco da foto */
.profile-photo-block {
  width: 220px;
}

@media (max-width: 768px) {
  #profilePhotoSection {
    align-items: center;
  }
}
.header-right .btn-outline-secondary {
  border-color: rgba(148, 163, 184, 0.7);
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #ec4899);
}
.header-right .btn-outline-secondary:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2f6df2, #f05aab);
  box-shadow: 0 4px 16px rgba(96, 165, 250, 0.3);
}
.g-2,
.gy-2 {
  --bs-gutter-y: 0rem;
}
.dynamic-form-body-modern .form-check .form-check-input {
  width: auto;
  margin-right: 0.4rem;
}
#modalFiltros .modal-dialog {
  max-width: 540px;
}
#modalFiltros .modal-content {
  border-radius: 20px;
  border: 1px solid rgba(15,23,42,0.12);
  box-shadow: 0 40px 90px rgba(15,23,42,0.45), 0 10px 30px rgba(15,23,42,0.25);
  backdrop-filter: blur(10px);
}
#modalFiltros .modal-header,
#modalFiltros .modal-footer {
  border: none;
}
#modalFiltros .modal-body {
  padding: 1.5rem;
}
#filter-form .form-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#filter-form .form-control,
#filter-form .form-select {
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
#filter-form .form-control:focus,
#filter-form .form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18), 0 6px 18px rgba(37,99,235,0.16);
  background-color: #fff;
}
#modalFiltros .dynamic-form-modal-actions {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
