/* ================= FONTES INLINED ================= */
/* Substituímos cadeia de @import por declarações diretas para reduzir round trips.
    Futuro (melhoria de performance): converter TTF -> WOFF2 e ajustar abaixo.
    Comando exemplo (local): pyftsubset poppins-400.ttf --output-file=poppins-400.woff2 --flavor=woff2 --layout-features='*' --unicodes='U+000-5FF'
*/
/* Poppins */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/poppins/poppins-300.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins/poppins-400.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins/poppins-500.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins/poppins-600.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins/poppins-700.ttf") format("truetype");
}

/* Ubuntu */
@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/ubuntu/ubuntu-300.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ubuntu/ubuntu-400.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ubuntu/ubuntu-500.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ubuntu/ubuntu-700.ttf") format("truetype");
}

/* Ubuntu Mono */
@font-face {
  font-family: "Ubuntu Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ubuntu-mono/ubuntu-mono-400.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ubuntu-mono/ubuntu-mono-700.ttf") format("truetype");
}

/* ================= Regions (checkbox grid) ================= */
.regions-box {
  width: 100%;
}

.regions-box .regions-list {
  display: flex;
  gap: 18px;
  width: 100%;
}

.regions-box .regions-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.regions-box .region-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  /* line-height: 1.1; */
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}

.regions-box .region-item input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color, #0a57b5);
}

.regions-box .region-item .region-name {
  display: inline-block;
}

@media (max-width: 640px) {
  .regions-box .regions-list {
    flex-direction: column;
  }

  .regions-box .regions-col {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .regions-box .region-item {
    width: 50%;
  }
}

.mono {
  font-family: "Ubuntu Mono", monospace;
}

/* Ajuste específico para badges dentro de células mono */
.mono .status-badge {
  max-width: none !important;
  width: auto !important;
  display: inline-flex !important;
}

* {
  margin: 0;
  padding: 0;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colors */
  --white-1: rgb(255, 255, 255);
  --white-2: rgba(255, 255, 255, 0.9);
  --white-3: rgba(255, 255, 255, 0.7);
  --white-4: rgba(255, 255, 255, 0.5);
  --black-1: black;
  --black-3: rgba(0, 0, 0, 0.95);
  --black-4: rgba(0, 0, 0, 0.5);
  --black-5: rgba(0, 0, 0, 0.3);
  --black-6: rgba(0, 0, 0, 0.1);
  --black-A: #0b1220;
  --black-C: #1f2937;
  --black-E: #374151;
  --black-G: #4b5563;
  --black-I: #6b7280;

  --red-1: rgb(220, 38, 38);
  --red-4: rgba(220, 38, 38, 0.3);
  --red-5: rgba(220, 38, 38, 0.2);

  --blue-1: rgb(15, 23, 42);
  --blue-2: rgb(30, 41, 59);
  --blue-3: rgb(51, 65, 85);

  --orange-1: rgb(255, 152, 0);
  --orange-2: rgb(234, 88, 12);
  --orange-3: rgb(194, 65, 12);
  --orange-4: rgba(255, 152, 0, 0.3);
  --orange-6: rgba(255, 152, 0, 0.1);

  /* Border accents */
  --sidebar-border-color: rgba(255, 152, 0, 0.22);

  --gray-1: rgb(252, 254, 255);
  --gray-2: rgb(226, 232, 240);
  --gray-3: rgb(148, 163, 184);
  --gray-4: rgb(100, 116, 139);
  --gray-5: rgb(71, 85, 105);
  --gray-6: rgb(51, 65, 85);

  /* Card Colors */

  --card-c: 168, 85, 247;
  --card-d: 251, 191, 36;
  --card-e: 255, 107, 53;
  --card-f: 139, 69, 19;
  --card-g: 16, 185, 129;
  --card-h: 14, 165, 233;
  --card-i: 99, 102, 241;
  --card-j: 236, 72, 153;
  --card-k: 249, 115, 22;
  --card-l: 220, 53, 69;

  /* Badge Colors */
  --badge-info: var(--orange-3);
  --badge-info-bg: var(--orange-6);
  --badge-neutral: #6b7280;
  --badge-neutral-bg: #fbfdff;
  --badge-success: #16a34a;
  --badge-success-bg: #ecfdf5;

  /* Modal Icons */
  --modal-icon-info: var(--orange-2);
  --modal-icon-success: #22c55e;
  --modal-icon-error: #ef4444;

  /* Dimensions */
  --form-control-height: 48px;
  --login-control-height: 56px;
  --nextBtn-height: 56px;
  --sidebar-width: 230px;
  /* Standard pill height (based on landing pill visual) */
  --pill-height: 36px;
  --navbar-height: 56px;
  --border-radius-xl: 16px;

  /* Borders and Effects */
  --control-border-thin: 1px;
  --control-border-thick: 2px;
  --control-focus-ring: 3px;
  --control-focus-ring-small: 2px;
  --shadow-light: 0 2px 8px rgba(71, 85, 105, 0.15);
  --shadow-medium: 0 4px 16px rgba(71, 85, 105, 0.2);
  --shadow-heavy: 0 8px 32px rgba(71, 85, 105, 0.25);
  --blur-light: blur(4px);

  /* Modal */
  --modal-line-height: 1.06;
  --modal-item-gap: 12px;
  --modal-btn-padding: 10px 18px;
}

body.theme-light {
  --current-bg: var(--white-1);
  --current-surface: var(--white-1);
  --current-text: var(--gray-6);
  --current-text-muted: var(--gray-4);
  --current-border: var(--gray-3);
  --current-accent: var(--orange-1);
  --current-accent-contrast: var(--white-1);
  --modal-bg: var(--white-1);
  --modal-border: var(--gray-3);
  --border-color: var(--gray-3);
  --bg-primary: var(--white-1);
  --text-primary: var(--gray-6);
  --text-secondary: var(--gray-4);
  --sidebar-bg: var(--white-1);
  --header-bg: rgb(3, 67, 159);
  --nav-hover-bg: var(--gray-2);
  --nav-active-bg: var(--gray-2);
  /* --landing-header-bg removed (not used globally). Keep landing visuals defined per-rule when needed. */
  --landing-text: var(--gray-6);
  --landing-subtext: var(--gray-5);
  --landing-muted: var(--gray-4);
  --landing-card-bg: rgba(255, 255, 255, 0.8);
  --landing-card-border: var(--gray-3);
}

/* Cabeçalho das tabelas no tema claro: usar --header-bg e texto branco para contraste */
body.theme-light .dataTables_wrapper table.dataTable thead th,
body.theme-light .dataTables_wrapper table.dataTable thead td,
body.theme-light .table-section thead th,
body.theme-light table.display thead th {
  background: var(--header-bg);
  color: var(--white-1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Cabeçalho das tabelas no tema escuro: usar --header-bg também */
body.theme-dark .dataTables_wrapper table.dataTable thead th,
body.theme-dark .dataTables_wrapper table.dataTable thead td,
body.theme-dark .table-section thead th,
body.theme-dark table.display thead th {
  background: var(--header-bg);
  color: var(--white-1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Separador visual entre colunas do thead.
   Aplicamos uma borda esquerda sutil em cada <th> exceto o primeiro para
   criar uma separação visual sem alterar o layout da tabela. A cor usa
   variável de tema quando disponível para manter contraste adequado. */
.dataTables_wrapper table.dataTable thead th + th {
  border-left: 2px solid rgba(0, 0, 0, 0.18);
  /* mais espesso e contrastante por padrão */
  padding-left: 14px;
  /* espaço interno maior para leitura */
  /* sombra interna mais visível para reforçar separação */
  box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.06);
}

/* Ajuste de cor do separador para tema claro (alto contraste) */
body.theme-light .dataTables_wrapper table.dataTable thead th + th {
  border-left-color: rgba(0, 0, 0, 0.22);
  box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.08);
}

/* Ajuste de cor do separador para tema escuro (alto contraste) */
body.theme-dark .dataTables_wrapper table.dataTable thead th + th {
  border-left-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 2px 0 4px rgba(255, 255, 255, 0.04);
}

/* Forçar altura uniforme das linhas das listagens (DataTables e tabelas similares)
   Definimos altura do <tr> e das células <td> para 38px e ajustamos padding/line-height
   para garantir alinhamento vertical consistente em diferentes navegadores. */
.dataTables_wrapper table.dataTable tbody tr,
.table-section tbody tr,
table.display tbody tr,
.table-listing tbody tr {
  height: 38px;
}

.dataTables_wrapper table.dataTable tbody td,
.table-section tbody td,
table.display tbody td,
.table-listing tbody td {
  height: 38px;
  line-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Para listas que usam elementos <li> (ex.: listagens customizadas), garantir altura similar */
.listing-row,
.listings li {
  height: 38px;
  line-height: 38px;
}

body.theme-dark {
  --current-bg: var(--blue-1);
  --current-surface: var(--blue-2);
  --current-text: var(--white-1);
  --current-text-muted: var(--white-3);
  --current-border: var(--blue-3);
  --current-accent: var(--orange-1);
  --current-accent-contrast: var(--white-1);
  --modal-bg: var(--blue-2);
  --modal-border: var(--blue-3);
  --border-color: var(--blue-3);
  --bg-primary: var(--blue-2);
  --text-primary: var(--white-1);
  --text-secondary: var(--white-3);
  --sidebar-bg: var(--blue-2);
  --header-bg: var(--blue-3);
  --nav-hover-bg: var(--blue-3);
  --nav-active-bg: var(--gray-5);
  --landing-text: var(--white-1);
  --landing-subtext: var(--white-3);
  --landing-muted: var(--white-4);
  --landing-card-bg: rgba(255, 255, 255, 0.04);
  --landing-card-border: rgba(255, 255, 255, 0.08);
}

/* ===== BODY AND LAYOUT ===== */
body {
  /* Pilha de fontes com fallback para garantir legibilidade caso Poppins não carregue */
  font-family: "Poppins", "Ubuntu", Arial, Helvetica, sans-serif;
  background-color: var(--current-bg);
  color: var(--current-text);
  line-height: 1.6;
  overflow-x: hidden;
  /* Evita rolagem horizontal */
  margin: 0;
  /* Remove margens padrão */
}

/* Tornar ícone de anexo desativado visualmente distinto */
.doc-btn.disabled,
.btn-attach.disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* When an image background is active apply it to the body so the whole viewport shows it */
body.image-bg {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Preservar cor de fundo do tema quando não há imagem de background ativa */
body.image-bg:not([style*="background-image"]) {
  background-color: var(--current-bg);
}

/* Quando há imagem de background, usar transparente apenas se necessário */
body.image-bg[style*="background-image"] {
  background-color: transparent;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  left: 0;
  width: var(--sidebar-width);
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border-color);
  transform: translateX(0);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 900;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 5px 10px rgba(15, 23, 42, 0.3);
}

.sidebar.minimized {
  width: 70px;
}

.nav-menu {
  list-style: none;
  padding: 1rem 0;
}

.nav-item {
  margin: 0.6rem 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  color: var(--white-D);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  min-height: 3rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0.5px 0.5px rgba(0, 0, 0, 0.1);
}

/* Sidebar footer with user name/level displayed in two lines */
.sidebar-footer {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  padding: 8px 6px;
  border-top: 1px solid var(--current-border, rgba(0, 0, 0, 0.06));
  color: var(--current-text);
}

.sidebar-user-first {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0.5px 0.5px rgba(0, 0, 0, 0.1);
}

.sidebar-user-level {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--current-text-muted);
}

/* User avatar + info layout in sidebar footer */
.sidebar-user {
  display: flex;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nav-active-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--current-text);
  flex-shrink: 0;
}

.sidebar-user-avatar i {
  font-size: 16px;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-first {
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0.5px 0.5px rgba(0, 0, 0, 0.1);
}

.sidebar-user-level {
  white-space: nowrap;
}

/* Botão de logout na sidebar */
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 8px;
  background: transparent;
  color: var(--current-text);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  color: var(--current-accent, #ff9800);
  opacity: 1;
}

.sidebar-logout-btn i {
  font-size: 1rem;
}

.sidebar.minimized .sidebar-footer {
  /* Mostrar footer compactado quando a sidebar estiver minimizada: manter avatar visível */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 6px;
  overflow: hidden;
}

/* Esconder informações textuais (nome / nível) quando minimizada, mantendo avatar */
.sidebar.minimized .sidebar-user-info,
.sidebar.minimized .sidebar-user-first,
.sidebar.minimized .sidebar-user-level {
  display: none !important;
}

.nav-link:hover {
  background: var(--nav-hover-bg);
  color: var(--header-bg);
  border-left-color: var(--header-bg);
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
}

.nav-link.active {
  background: var(--nav-active-bg);
  color: var(--header-bg);
  border-left-color: blue;
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
}

.nav-link.disabled,
.nav-link.nav-disabled,
.nav-item .nav-link[data-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.nav-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(133, 133, 133, 0.541);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.nav-text-box {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 40px;
  transition: all 0.3s ease;
}

.nav-text-box span {
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-icon {
  width: 20px;
  text-align: center;
}

.sidebar.minimized .nav-text-box {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
}

.sidebar.minimized .nav-link {
  padding: 6px 12px 6px 12px;
  gap: 0;
  justify-content: flex-start;
}

.sidebar.minimized .nav-link:hover::after {
  content: attr(data-tooltip);
  position: fixed;
  left: calc(70px + 10px);
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  padding: 8px 12px;
  border-radius: 50px;
  font-size: 0.85rem;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0.5px 0.5px rgba(0, 0, 0, 0.1);
  z-index: 1200;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--navbar-height);
  padding: 8px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: margin-left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.minimized {
  margin-left: 70px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Button Variants */
.btn-primary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white-3);
}

.btn-primary:hover:not(:disabled) {
  background: rgba(255, 152, 0, 0.15);
  border-color: var(--orange-1);
  color: var(--orange-1);
  box-shadow: 0 4px 12px var(--black-5);
}

.btn-secondary {
  background: transparent;
  color: var(--orange-1);
  border: 1px solid var(--orange-1);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--orange-1);
  color: var(--white-1);
}

.btn-outline {
  background: transparent;
  color: var(--white-3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: rgb(76, 175, 80);
  color: var(--white-1);
}

/* Cancel button used in modals and forms */
.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 6px;
  background: transparent;
  color: var(--orange-1);
  border: 1px solid var(--orange-1);
  font-weight: 600;
  cursor: pointer;
  /* remover transição para evitar animação/tilt indesejada no botão Cancelar */
  transition: none;
}

.btn-cancel:hover:not(:disabled) {
  background: var(--orange-1);
  color: var(--white-1);
  box-shadow: 0 4px 12px var(--black-5);
}

.btn-cancel:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-danger {
  background: var(--red-4);
  color: var(--white-1);
}

.btn-warning {
  background: var(--orange-1);
  color: var(--white-1);
}

/* Button Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.125rem;
}

.btn-xl {
  padding: 18px 36px;
  font-size: 1.25rem;
}

.btn-pill {
  border-radius: 9999px;
  min-height: 40px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-pill-compact {
  padding: 6px 10px;
  white-space: nowrap;
}

.action-btn {
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  color: var(--current-text);
}

.action-btn.btn-sm {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  font-size: 0.95rem;
}

.action-btn.btn-view,
.view-btn {
  color: #065f46;
  border-color: rgba(6, 95, 70, 0.14);
  background: rgba(6, 95, 70, 0.04);
}

.action-btn.btn-edit,
.edit-btn {
  color: #0b61d6;
  border-color: rgba(11, 97, 214, 0.12);
  background: rgba(11, 97, 214, 0.04);
}

.action-btn.btn-delete,
.delete-btn,
.action-btn.btn-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.12);
  background: rgba(185, 28, 28, 0.04);
}

.action-btn:hover {
  background: rgba(255, 152, 0, 0.15);
  border-color: var(--orange-1);
  color: var(--orange-1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--black-5);
}

/* Doc button (paperclip) in actions column */
.actions .action-btn.doc-btn {
  color: #374151;
  /* slightly darker than base text */
  background: rgba(55, 65, 81, 0.04);
  border-color: rgba(55, 65, 81, 0.08);
}

/* When disabled, keep the icon visible but muted */
.actions .action-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Enhanced disabled styling for permission denied actions */
.actions .action-btn.permission-denied {
  opacity: 0.3 !important;
  background-color: #f5f5f5 !important;
  border-color: #e0e0e0 !important;
  color: #999999 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(70%) !important;
  transition: all 0.2s ease;
}

.actions .action-btn.permission-denied:hover {
  opacity: 0.3 !important;
  transform: none !important;
}

/* Specific styling for icons within disabled buttons */
.actions .action-btn.permission-denied i {
  color: #cccccc !important;
}

/* ===== FORMS ===== */
.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.form-group label {
  color: var(--current-text-muted);
  font-weight: 600;
  margin-top: 8px;
  font-size: 0.95rem;
  font-family: "Poppins", sans-serif;
}

/* Versão textual (não-associada) usada para rótulos estáticos onde não há controle labelable */
.form-group .field-label {
  color: var(--current-text-muted);
  font-weight: 600;
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  font-family: "Poppins", sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 15px;
  border: 2px solid var(--current-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--current-surface);
  color: var(--current-text);
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--current-accent);
  box-shadow: 0 0 0 var(--control-focus-ring) rgba(255, 152, 0, 0.2);
  background: rgb(241, 200, 138);
}

/* Classe para destacar campo quando um condutor é encontrado */
.highlight-field {
  animation: field-highlight 1.5s ease;
}

@keyframes field-highlight {
  0% {
    background-color: rgba(255, 152, 0, 0.3);
    border-color: #ff9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
  }

  100% {
    background-color: var(--current-surface);
    border-color: var(--current-border);
    box-shadow: none;
  }
}

.field-readonly,
input[readonly],
textarea[readonly],
select.field-readonly {
  background-color: #f8f8f8;
  color: #666;
  cursor: not-allowed;
  opacity: 0.9;
  border-color: #ddd;
  border-style: dashed;
  border-width: 1px;
  box-shadow: none;
}

/* Em modo escuro */
body.theme-dark .field-readonly,
body.theme-dark input[readonly],
body.theme-dark textarea[readonly],
body.theme-dark select.field-readonly {
  background-color: #333;
  color: #999;
  border-color: #555;
  border-style: dashed;
  border-width: 1px;
  box-shadow: none;
}

/* Estilo melhorado para campos calculados */
body.theme-light input#per_liter[readonly],
body.theme-light .calculated-field[readonly] {
  background-color: #f0f8ff;
  color: #0066cc;
  border-color: #99ccff;
  font-weight: 500;
  box-shadow: inset 0 0 3px rgba(0, 102, 204, 0.15);
  transition: all 0.2s ease;
  cursor: default;
}

body.theme-light input#per_liter[readonly]:hover,
body.theme-light .calculated-field[readonly]:hover {
  background-color: #e6f3ff;
  cursor: not-allowed;
}

body.theme-light input#per_liter[readonly]:focus,
body.theme-light .calculated-field[readonly]:focus {
  outline: none;
  border-color: #66a3ff;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

body.theme-dark input#per_liter[readonly],
body.theme-dark .calculated-field[readonly] {
  background-color: #1a2535;
  color: #66a3ff;
  border-color: #336699;
  font-weight: 500;
  box-shadow: inset 0 0 3px rgba(102, 163, 255, 0.2);
  transition: all 0.2s ease;
  cursor: default;
}

body.theme-dark input#per_liter[readonly]:hover,
body.theme-dark .calculated-field[readonly]:hover {
  background-color: #243045;
  cursor: not-allowed;
}

body.theme-dark input#per_liter[readonly]:focus,
body.theme-dark .calculated-field[readonly]:focus {
  outline: none;
  border-color: #4d88cc;
  box-shadow: 0 0 0 2px rgba(102, 163, 255, 0.15);
}

/* Estilo para label de campo calculado */
.calculated-field-label {
  font-weight: 500;
}

/* Usando Font Awesome para campos calculados */
.input-group.calc-field-group {
  position: relative;
}

/* Classe para estilizar o grupo de campos calculados */
.input-group.calc-field-group {
  position: relative;
}

/* Estilos especiais para o ícone de calculadora */
.input-group.calc-field-group i.fa-calculator {
  color: #0066cc;
  opacity: 0.85;
}

body.theme-dark .input-group.calc-field-group i.fa-calculator {
  color: #66a3ff;
}

/* Margem superior para elementos */
.mt-3 {
  margin-top: 1rem;
}

/* Estilo para botão com destaque de ação principal */
.accent-button {
  background-color: var(--current-accent);
  color: white;
  font-weight: bold;
  border-color: var(--current-accent-dark);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-group {
  position: relative;
  align-items: center;
}

.input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--current-text-muted);
  z-index: 1;
  font-size: 1rem;
  pointer-events: none;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding-left: 3rem;
}

.input-group input:focus,
.input-group select:focus,
.input-group .searchable-select-input:focus {
  background: rgb(241, 200, 138);
}

input:-webkit-autofill,
input:-webkit-autofill:focus {
  background: rgb(241, 200, 138);
  -webkit-box-shadow: 0 0 0 1000px rgb(241, 200, 138) inset;
  box-shadow: 0 0 0 1000px rgb(241, 200, 138) inset;
  color: var(--current-text);
}

.input-group input[type="password"] {
  padding-right: 52px;
}

#balance_hours {
  height: 44px;
  line-height: 44px;
  box-sizing: border-box;
}

.form-group #balance_hours,
.input-group #balance_hours {
  height: 44px;
  line-height: 44px;
}

input[type="time"] {
  height: 44px;
  line-height: 44px;
  box-sizing: border-box;
}

.toggle-password {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.custom-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.custom-file .btn-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: 1px solid var(--current-border);
  color: inherit;
}

.custom-file .btn-file:hover {
  transform: translateY(-1px);
}

.custom-file .btn-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  border: 1px solid var(--current-border);
  color: inherit;
  min-width: 120px;
  box-sizing: border-box;
}

.custom-file .btn-file:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.custom-file .btn-file:active {
  transform: translateY(0);
}

::-webkit-file-upload-button {
  display: none;
}

::file-selector-button {
  display: none;
}

.searchable-select-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--current-border);
  border-radius: 8px;
  background: var(--current-surface);
  color: var(--current-text);
}

.searchable-select-input:hover {
  border-color: var(--blue-4);
}

.searchable-select-input:focus {
  border-color: var(--blue-4);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  outline: none;
  background: var(--white-1);
}

.searchable-select-input.searchable-readonly {
  background-color: #f0f8ff;
  color: #0066cc;
  border-color: #99ccff;
  font-weight: 500;
  box-shadow: inset 0 0 3px rgba(0, 102, 204, 0.15);
  transition: all 0.2s ease;
  cursor: default;
  opacity: 1;
}

body.theme-dark .searchable-select-input.searchable-readonly {
  background-color: #1a2535;
  color: #66a3ff;
  border-color: #336699;
  font-weight: 500;
  box-shadow: inset 0 0 3px rgba(102, 163, 255, 0.2);
  transition: all 0.2s ease;
  cursor: default;
  opacity: 1;
}

.searchable-select-input.searchable-readonly:hover {
  background-color: #e6f3ff;
  cursor: not-allowed;
}

body.theme-dark .searchable-select-input.searchable-readonly:hover {
  background-color: #243045;
  cursor: not-allowed;
}

.searchable-select-input.searchable-readonly:focus {
  outline: none;
  border-color: #66a3ff;
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

body.theme-dark .searchable-select-input.searchable-readonly:focus {
  outline: none;
  border-color: #4d88cc;
  box-shadow: 0 0 0 2px rgba(102, 163, 255, 0.15);
}

.searchable-select-wrapper.readonly {
  position: relative;
}

.searchable-select-wrapper.readonly::after {
  opacity: 0.4;
  pointer-events: none;
}

.searchable-select-wrapper.readonly::before {
  content: "\1F512";
  /* Ícone de cadeado */
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--input-disabled-text, #666);
  z-index: 10;
  pointer-events: none;
}

/* Estilos para região bloqueada no header do modal */
.modal-header .region-locked {
  background: rgba(255, 193, 7, 0.1);
  color: #856404;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.9em;
  border: 1px solid rgba(255, 193, 7, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modal-header .region-locked i {
  font-size: 0.8em;
}

.searchable-select-dropdown {
  position: fixed;
  left: 0;
  top: calc(100% + 2px);
  width: 100%;
  max-height: calc(5 * 40px);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--white-1);
  border: 0.5px solid var(--header-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 0;
  margin: 0;
  border-radius: 8px;
  z-index: 16000;
  display: none;
  box-sizing: border-box;
}

.searchable-select-dropdown::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}

.searchable-select-dropdown::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  border-right: 3px solid transparent;
  background-clip: padding-box;
}

.searchable-select-dropdown > div {
  width: 100%;
  box-sizing: border-box;
}

.searchable-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

body.theme-dark .searchable-select-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  border-right: 3px solid transparent;
  background-clip: padding-box;
}

.searchable-select-option {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  color: var(--current-text);
  background-color: var(--white-1);
  transition: background-color 0.2s ease;
  position: relative;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.searchable-select-option[aria-value=""] {
  display: none;
}

body.theme-light .searchable-select-option.highlight,
body.theme-light .searchable-select-option:hover {
  background: var(--header-bg);
  color: white;
  font-weight: 600;
  width: 100%;
  padding: 0 12px;
  margin: 0;
  box-sizing: border-box;
}

body.theme-dark .searchable-select-option.highlight,
body.theme-dark .searchable-select-option:hover {
  background: var(--current-accent);
  color: white;
  font-weight: 600;
  width: 100%;
  padding: 0 12px;
  margin: 0;
  box-sizing: border-box;
}

.searchable-select-option:first-child {
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.searchable-select-option:last-child {
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

body.theme-light .searchable-select-option {
  color: var(--blue-5);
  background-color: var(--white-1);
}

body.theme-dark .searchable-select-option {
  color: var(--white-1);
  background: transparent;
}

body.theme-light .searchable-select-input {
  background: var(--white-1);
  color: var(--blue-5);
  border-color: var(--blue-4);
  border-width: 0.5px;
}

body.theme-dark .searchable-select-input {
  background: var(--blue-2);
  color: var(--white-1);
  border-color: var(--blue-3);
  border-width: 0.5px;
}

body.theme-light .searchable-select-wrapper::after {
  color: var(--blue-4);
}

body.theme-dark .searchable-select-wrapper::after {
  color: var(--white-3);
}

body.theme-light .searchable-select-dropdown {
  background: var(--white-1);
  border: 0.5px solid var(--header-bg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.theme-dark .searchable-select-dropdown {
  background: var(--blue-3);
  border: 0.5px solid var(--current-accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body.theme-light .searchable-select-option.selected {
  background: var(--header-bg);
  color: white;
  font-weight: 600;
  width: 100%;
  padding: 0 12px;
  margin: 0;
  box-sizing: border-box;
}

body.theme-dark .searchable-select-option.selected {
  background: var(--current-accent);
  color: white;
  font-weight: 600;
  width: 100%;
  padding: 0 12px;
  margin: 0;
  box-sizing: border-box;
}

.searchable-select-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.searchable-select-wrapper::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 12px;
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--current-text-muted);
  pointer-events: none;
  z-index: 2;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.searchable-select-wrapper.dropdown-open::after {
  transform: translateY(-50%) rotate(180deg);
}

.searchable-select-wrapper {
  cursor: text;
}

.searchable-select-wrapper::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 3;
  pointer-events: auto;
}

.searchable-select-wrapper:hover::after {
  color: var(--blue-4);
}

.input-group .searchable-select-wrapper {
  padding-left: 0;
}

.input-group .searchable-select-input {
  padding-left: 3rem;
  padding-right: 32px;
}

select::-webkit-scrollbar {
  width: 8px;
}

select::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  border-right: 3px solid transparent;
  background-clip: padding-box;
}

select::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

body.theme-dark select::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

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

.form-group.full-width {
  grid-column: span 12;
}

.form-group.gg {
  grid-column: span 9;
}

.form-group.lg {
  grid-column: span 8;
}

.form-group.ll {
  grid-column: span 7;
}

.form-group.ml {
  grid-column: span 6;
}

.form-group.mm {
  grid-column: span 5;
}

.form-group.sm {
  grid-column: span 4;
}

.form-group.ss {
  grid-column: span 3;
}

.form-group.nn {
  grid-column: span 2;
}

.painel-section {
  margin-bottom: 1.8rem;
}

.section-subtitle {
  font-size: 1.08rem;
  margin-bottom: 0.2rem;
  font-weight: 600;
  padding-left: 0.8rem;
  padding-top: 0.7rem;
}

.painel-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.painel-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.85rem;
  text-align: center;
  box-shadow: 0 9px 26px rgba(2, 6, 23, 0.56);
  border: 2px solid rgba(255, 255, 255, 0.07);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.painel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.8);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem;
  font-size: 1.15rem;
  color: var(--orange-1);
  background: rgba(255, 152, 0, 0.12);
  transition: all 0.2s ease;
}

.card-icon:hover {
  transform: scale(1.1);
}

.card-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.card-value.loading {
  color: var(--orange-1);
  opacity: 0.7;
  animation: pulse-loading 1.5s ease-in-out infinite;
}

@keyframes pulse-loading {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.loading-indicator {
  margin-left: 12px;
  color: var(--orange-1);
  font-size: 0.9rem;
  opacity: 0.8;
}

.loading-indicator i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Transições suaves para todos os valores de cards */
.card-value {
  transition: none;
}

/* Estados clicáveis dos painel cards */
.painel-card.card-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.painel-card.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.painel-card.card-disabled {
  opacity: 0.6;
  cursor: default !important;
  pointer-events: none !important;
  user-select: none;
}

.painel-card.card-zero-value {
  opacity: 0.5;
  filter: grayscale(0.3);
  pointer-events: none !important;
}

.painel-card.card-non-clickable {
  cursor: default !important;
  pointer-events: none !important;
}

/* Sobrescrever hover para cards desabilitados */
.painel-card.card-disabled:hover,
.painel-card.card-zero-value:hover,
.painel-card.card-non-clickable:hover {
  transform: none !important;
  box-shadow: inherit !important;
}

/* Indicador de status de polling em tempo real */
.polling-status {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  z-index: 1000;
  display: none;
  transition: all 0.3s ease;
}

.polling-status.active {
  display: block;
  background: rgba(40, 167, 69, 0.9);
}

.polling-status.checking {
  display: block;
  background: rgba(255, 193, 7, 0.9);
  color: #000;
}

.polling-status.error {
  display: block;
  background: rgba(220, 53, 69, 0.9);
}

.polling-status i {
  margin-right: 5px;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.painel-card:has(.oses-total) {
  border-color: rgba(59, 130, 246, 0.9);
}

.painel-card:has(.oses-fuel) {
  border-color: rgba(34, 197, 94, 0.95);
}

.painel-card:has(.oses-no-fuel) {
  border-color: rgba(168, 85, 247, 0.9);
}

.painel-card:has(.oses-month) {
  border-color: rgba(var(--card-d), 0.95);
}

.painel-card:has(.vehicles) {
  border-color: rgba(var(--card-e), 0.9);
}

.painel-card:has(.active) {
  border-color: rgba(var(--card-f), 0.95);
}

.painel-card:has(.maintenance) {
  border-color: rgba(var(--card-g), 0.95);
}

.painel-card:has(.fuel) {
  border-color: rgba(var(--card-h), 0.95);
}

.painel-card:has(.drivers-total) {
  border-color: rgba(var(--card-i), 0.9);
}

.painel-card:has(.drivers-active) {
  border-color: rgba(var(--card-j), 0.95);
}

.painel-card:has(.drivers-licensed) {
  border-color: rgba(var(--card-k), 0.95);
}

.painel-card:has(.drivers-expiring) {
  border-color: rgba(168, 85, 247, 0.9);
}

.painel-card:has(.drivers-expired) {
  border-color: rgba(var(--card-l), 0.9);
}

/* Card Icon Colors */
.card-icon.oses-total {
  color: rgba(59, 130, 246, 1);
  background: rgba(59, 130, 246, 0.12);
}

.card-icon.oses-fuel {
  color: rgba(34, 197, 94, 1);
  background: rgba(34, 197, 94, 0.12);
}

.card-icon.oses-no-fuel {
  color: rgba(168, 85, 247, 1);
  background: rgba(168, 85, 247, 0.12);
}

.card-icon.oses-month {
  color: rgba(var(--card-d), 1);
  background: rgba(var(--card-d), 0.12);
}

.card-icon.vehicles {
  color: rgba(var(--card-e), 1);
  background: rgba(var(--card-e), 0.12);
}

.card-icon.active {
  color: rgba(var(--card-f), 1);
  background: rgba(var(--card-f), 0.12);
}

.card-icon.maintenance {
  color: rgba(var(--card-g), 1);
  background: rgba(var(--card-g), 0.12);
}

.card-icon.fuel {
  color: rgba(var(--card-h), 1);
  background: rgba(var(--card-h), 0.12);
}

.card-icon.drivers-total {
  color: rgba(var(--card-i), 1);
  background: rgba(var(--card-i), 0.12);
}

.card-icon.drivers-active {
  color: rgba(var(--card-j), 1);
  background: rgba(var(--card-j), 0.12);
}

.card-icon.drivers-licensed {
  color: rgba(var(--card-k), 1);
  background: rgba(var(--card-k), 0.12);
}

.card-icon.drivers-expiring {
  color: rgba(168, 85, 247, 1);
  background: rgba(168, 85, 247, 0.12);
}

.card-icon.drivers-expired {
  color: rgba(var(--card-l), 1);
  background: rgba(var(--card-l), 0.12);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgb(224, 224, 224);
  margin-top: 10px;
  margin-bottom: 14px;
}

body.theme-dark .section-header {
  border-bottom-color: var(--orange-1);
}

.section-title {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.section-actions .action-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-actions .action-spacer {
  flex: 1 1 auto;
}

/* ===== TABLES ===== */
.table-section {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.6);
  overflow: hidden;
  border: 1px solid var(--header-bg, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  overflow-x: auto;
  overflow-y: auto;
  height: calc(100vh - 140px);
  min-height: 360px;
  padding: 4px;
  position: relative;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}

.table td {
  box-sizing: border-box;
  padding: 10px 8px;
  text-align: left;
  min-height: 48px;
  height: auto;
  vertical-align: middle;
  line-height: 1.4;
  font-family: "Ubuntu Mono", monospace;
  overflow: visible;
}

.table th {
  background: var(--header-bg);
  color: var(--white-1);
  font-weight: 700;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.table tbody tr {
  height: 50px;
}

.table tbody tr td {
  font-size: 14px;
  font-family: "Ubuntu Mono", monospace;
}

.dataTables_wrapper {
  color: var(--current-text);
}

.dataTables_wrapper table.dataTable thead th,
.dataTables_wrapper table.dataTable thead td {
  box-sizing: border-box;
  padding: 0 10px;
  height: 48px;
  /* Reduzido de 50px para corresponder às células do corpo */
  line-height: 50px;
  font-weight: 700;
}

.dataTables_wrapper table.dataTable tbody td {
  box-sizing: border-box;
  padding: 6px 10px;
  min-height: 48px;
  height: auto;
  /* Permitir que a célula se expanda para acomodar o conteúdo */
  line-height: 1.5;
  /* Atualizado para corresponder à altura */
  vertical-align: middle;
  font-family: "Ubuntu Mono", monospace;
}

.dataTables_wrapper table.dataTable tbody tr.samu-odd {
  background: rgba(0, 0, 0, 0.02);
}

.dataTables_wrapper table.dataTable tbody tr.samu-even {
  background: transparent;
}

.dataTables_wrapper table.dataTable tbody tr:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.theme-dark .dataTables_wrapper table.dataTable tbody tr.samu-odd {
  background: var(--black-C);
}

body.theme-dark .dataTables_wrapper table.dataTable tbody tr.samu-even {
  background: var(--black-E);
}

body.theme-dark .dataTables_wrapper table.dataTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  padding: 6px 0;
}

.action-btn.btn-sm {
  font-size: 0.9rem;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.dataTables_filter {
  margin-bottom: 8px;
}

.dataTables_scrollBody {
  max-height: 58vh;
  min-height: 200px;
  overflow-y: auto;
}

body.theme-dark .dataTables_wrapper {
  color: var(--current-text);
}

/* ===== DATATABLES RESPONSIVE ===== */
/* Estilos para o controle de expansão responsivo (setinhas) */
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
}

table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
  top: 50%;
  left: 5px;
  height: 1em;
  width: 1em;
  margin-top: -9px;
  display: block;
  position: absolute;
  color: var(--current-text);
  border: 1px solid var(--current-border);
  border-radius: 3px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
  box-sizing: content-box;
  text-align: center;
  text-indent: 0 !important;
  font-family: "Courier New", monospace;
  line-height: 1em;
  content: "+";
  background-color: var(--current-bg);
  font-size: 12px;
  font-weight: bold;
}

table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > th.dtr-control:before {
  content: "-";
  background-color: var(--current-accent);
  color: white;
  border-color: var(--current-accent);
}

/* Linha expandida com detalhes */
table.dataTable.dtr-inline.collapsed > tbody > tr.child {
  padding: 0.5em 1em;
  border-bottom: 1px solid var(--current-border);
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child > td {
  border-top: none;
  padding-left: 0.75em;
  padding-right: 0.75em;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child ul.dtr-details {
  display: inline-block;
  list-style-type: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child ul.dtr-details > li {
  border-bottom: 1px solid var(--current-border);
  padding: 0.5em 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.child
  ul.dtr-details
  > li:last-child {
  border-bottom: none;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child span.dtr-title {
  display: inline-block;
  min-width: 75px;
  font-weight: bold;
  color: var(--current-text-muted);
  text-align: right;
  margin-right: 1em;
  flex: 0 0 auto;
}

table.dataTable.dtr-inline.collapsed > tbody > tr.child span.dtr-data {
  flex: 1 1 auto;
  text-align: left;
  font-family: "Ubuntu Mono", monospace;
}

/* Tema escuro para responsivo */
body.theme-dark
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr
  > td.dtr-control:before,
body.theme-dark
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr
  > th.dtr-control:before {
  background-color: var(--blue-2);
  color: var(--white-1);
  border-color: var(--blue-3);
}

body.theme-dark
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > td.dtr-control:before,
body.theme-dark
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > th.dtr-control:before {
  background-color: var(--orange-1);
  color: var(--white-1);
  border-color: var(--orange-1);
}

body.theme-dark table.dataTable.dtr-inline.collapsed > tbody > tr.child {
  background-color: rgba(255, 152, 0, 0.05);
}

/* Tema claro para responsivo */
body.theme-light
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr
  > td.dtr-control:before,
body.theme-light
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr
  > th.dtr-control:before {
  background-color: var(--white-1);
  color: var(--gray-6);
  border-color: var(--gray-3);
}

body.theme-light
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > td.dtr-control:before,
body.theme-light
  table.dataTable.dtr-inline.collapsed
  > tbody
  > tr.parent
  > th.dtr-control:before {
  background-color: var(--header-bg);
  color: var(--white-1);
  border-color: var(--header-bg);
}

body.theme-light table.dataTable.dtr-inline.collapsed > tbody > tr.child {
  background-color: rgba(3, 67, 159, 0.03);
}

body.theme-dark .dataTables_scrollHead table thead th {
  background: var(--header-bg);
  color: var(--white-1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-dark .dataTables_scrollHeadInner table thead th,
body.theme-dark .dataTables_wrapper .dataTables_scrollHead table thead th,
body.theme-dark .dataTables_wrapper table.dataTable thead th {
  background: var(--header-bg);
  color: var(--white-1);
}

body.theme-dark .dataTables_wrapper table.dataTable tbody tr.samu-odd,
body.theme-dark .dataTables_wrapper table.dataTable tbody tr.odd,
body.theme-dark table.dataTable tbody tr:nth-child(odd) {
  background: var(--blue-1);
}

body.theme-dark .dataTables_wrapper table.dataTable tbody tr.samu-even,
body.theme-dark .dataTables_wrapper table.dataTable tbody tr.even,
body.theme-dark table.dataTable tbody tr:nth-child(even) {
  background: rgba(145, 145, 145, 0.04);
}

/* Hover overlay para linhas em tema escuro */
body.theme-dark .dataTables_wrapper table.dataTable tbody tr:hover {
  background: var(--blue-2);
}

/* Tema claro: zebra rows com --white-2 e --white-3 */
body.theme-light .dataTables_wrapper table.dataTable tbody tr.samu-odd,
body.theme-light .dataTables_wrapper table.dataTable tbody tr.odd,
body.theme-light table.dataTable tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.04);
}

body.theme-light .dataTables_wrapper table.dataTable tbody tr.samu-even,
body.theme-light .dataTables_wrapper table.dataTable tbody tr.even,
body.theme-light table.dataTable tbody tr:nth-child(even) {
  background: var(--white-4);
}

body.theme-light .dataTables_wrapper table.dataTable tbody tr:hover {
  background: var(--gray-2);
}

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  height: 22px;
  line-height: 22px;
  min-height: 22px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 6px;
  gap: 6px;
  box-shadow: none;
  width: fit-content;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge.badge-user-level,
.status-badge[class*="region-"] {
  min-width: unset;
  width: auto;
  display: inline-flex;
  flex-shrink: 0;
  max-width: none;
  padding: 0 10px;
}

/* Regra específica para células de tabela com badges */
td .status-badge.badge-user-level,
td .status-badge[class*="region-"] {
  width: fit-content !important;
  min-width: unset !important;
  max-width: none !important;
  padding: 0 10px !important;
}

.status-badge.small {
  padding: 3px 6px;
  font-size: 10px;
  min-width: 40px;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Display de regiões no perfil do usuário */
.user-regions-display {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  align-items: center;
  padding: 8px 0;
}

.user-regions-display .status-badge {
  margin: 0;
}

/* Badge Variants */
.status-badge.success,
.status-badge.status-active {
  background: rgba(37, 99, 235, 0.15);
  color: rgb(37, 99, 235);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

/* Vermelho padronizado para badges de status (Inativo/Vencida) */
.status-badge.danger,
.status-badge.status-danger,
.status-badge.cnh-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Inativo (veículos/usuários genérico) - vermelho direto */
.status-badge.status-inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.status-badge.status-valid {
  background: rgba(37, 99, 235, 0.15);
  color: rgb(37, 99, 235);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.status-badge.warning,
.status-badge.status-warning,
.status-badge.status-expiring {
  background: rgba(245, 158, 11, 0.15);
  color: rgb(245, 158, 11);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Estado específico: Manutenção (usar tom roxo para diferenciar de ativo/inativo) */
.status-badge.status-maintenance {
  background: rgba(139, 92, 246, 0.2);
  color: #6d28d9;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.status-badge.info {
  color: var(--badge-info);
  background: var(--badge-info-bg);
  border: 1px solid rgba(237, 125, 49, 0.12);
}

.status-badge.neutral {
  /* Cores originais eram texto escuro + fundo claro.
       Pedido: inverter as cores para destacar "Não Possui".
       Mantemos uma borda suave e garantimos contraste AA. */
  background: var(--badge-neutral);
  color: #ffffff;
  /* Texto branco para contraste sobre o tom neutro */
  border: 1px solid var(--badge-neutral);
}

/* Variante específica para ausência real de região (texto "Não Possui").
   Mantemos a neutral básica já invertida; esta classe permite ajustes futuros sem impactar outros usos neutros como "--" */
.status-badge.no-region {
  background: var(--badge-neutral);
  color: #ffffff;
  border: 1px solid var(--badge-neutral);
  font-weight: 600;
}

.status-badge.status-admin {
  color: #3b2fa5;
  background: rgba(79, 70, 229, 0.16);
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.status-badge.disabled,
.status-badge[aria-disabled="true"] {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral);
  border: 1px solid rgba(107, 114, 128, 0.06);
  opacity: 0.55;
  pointer-events: none;
}

/* Region Badges */
.status-badge.region-uram {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.08);
  border: 1px solid rgba(107, 114, 128, 0.12);
}

.status-badge.region-leste {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.06);
  border: 1px solid rgba(251, 146, 60, 0.12);
}

.status-badge.region-norte {
  color: #15803d;
  background: rgba(21, 128, 61, 0.06);
  border: 1px solid rgba(21, 128, 61, 0.12);
}

.status-badge.region-centro {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
  border: 1px solid rgba(185, 28, 28, 0.12);
}

.status-badge.region-sul {
  color: #1e3a8a;
  background: rgba(30, 58, 138, 0.06);
  border: 1px solid rgba(30, 58, 138, 0.12);
  width: fit-content !important;
  min-width: unset !important;
}

.status-badge.region-sudeste {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.12);
  width: fit-content !important;
  min-width: unset !important;
}

.status-badge.region-oeste {
  color: #6b3f00;
  background: rgba(107, 63, 0, 0.06);
  border: 1px solid rgba(107, 63, 0, 0.12);
}

.status-badge.region-sede {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.12);
}

/* Mapear cores dos níveis de usuário para cores das regiões pedidas */
/* Colaborador -> mesma cor de .region-sede */
.status-badge.badge-user-level.neutral,
.status-badge.badge-user-level.status-inactive {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.12);
}

/* Supervisor -> mesma cor de .region-norte */
/* Supervisor -> mesma cor de .region-leste (ajustado conforme pedido) */
.status-badge.badge-user-level.status-valid {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.06);
  border: 1px solid rgba(251, 146, 60, 0.12);
}

/* Administrador -> mesma cor de .region-sudeste */
.status-badge.badge-user-level.status-admin {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.12);
}

/* Icon inside status badge (region icons) */
.status-badge .badge-icon {
  margin-right: 6px;
  font-size: 0.85em;
  vertical-align: -0.08em;
  opacity: 0.95;
}

/* Container específico para múltiplas badges de região (usuários) */
.region-badges {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  /* manter numa única linha sem quebras; permitir scroll horizontal para ver todas as badges */
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: auto;
  max-width: 100%;
  /* ocupar o espaço disponível na célula sem ultrapassar */
  padding: 3px 0;
  /* espaço para a scrollbar quando visível */
  flex-wrap: nowrap;
}

/* Garantir que cada badge dentro do container tenha seu tamanho próprio */
.region-badges .status-badge {
  width: fit-content !important;
  min-width: unset !important;
}

/* Estilização simples da scrollbar horizontal das region-badges */
.region-badges::-webkit-scrollbar {
  height: 6px;
}

.region-badges::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

.region-badges::-webkit-scrollbar-track {
  background: transparent;
}

/* Small badges used for 'Sim/Não' in OSEs fuel column (scoped) */
.ose-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* match standard badge height */
  padding: 0 8px;
  height: 22px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
  min-height: 22px;
}

.ose-badge-yes {
  background: rgba(34, 197, 94, 0.12);
  color: rgb(34, 197, 94);
  border: 1px solid rgba(34, 197, 94, 0.14);
}

.ose-badge-no {
  background: rgba(239, 68, 68, 0.12);
  color: rgb(239, 68, 68);
  border: 1px solid rgba(239, 68, 68, 0.14);
}

/* Make the small badge icons slightly smaller and centered */
.ose-badge .badge-icon {
  font-size: 0.75rem;
  margin-right: 6px;
  vertical-align: middle;
}

/* CNH status badges */
.status-badge.cnh-expired {
  background: rgba(239, 68, 68, 0.12);
  color: rgb(185, 28, 28);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.cnh-expiring {
  background: rgba(245, 158, 11, 0.12);
  color: rgb(245, 158, 11);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.status-badge.cnh-expires-today {
  background: rgba(234, 88, 12, 0.15);
  color: rgb(234, 88, 12);
  border: 1px solid rgba(234, 88, 12, 0.25);
  font-weight: 600;
}

.status-badge.cnh-ok {
  background: rgba(34, 197, 94, 0.12);
  color: rgb(16, 185, 129);
  border: 1px solid rgba(34, 197, 94, 0.18);
}

/* ===== MODALS ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--black-3);
  backdrop-filter: var(--blur-light);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  /* desativar animação de abertura para evitar transições/tilt indesejados */
  animation: none;
  padding: 1rem;
  box-sizing: border-box;
}

.modal.show,
.modal.open,
.modal.active,
.modal[data-open],
.modal.is-open,
.modal.visible {
  display: flex;
  pointer-events: auto;
}

.modal-content {
  background: var(--current-surface);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-heavy);
  width: min(900px, 95%);
  max-width: 900px;
  min-width: 320px;
  margin: 0 auto;
  border: 1px solid var(--current-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* desativar animação de entrada do conteúdo modal */
  animation: none;
}

/* Campos de modais em foco com fundo destacado */
.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus,
.modal-content .searchable-select-input:focus {
  background: rgb(241, 200, 138);
}

.modal-content.success,
.modal-content.error,
.modal-content.info,
.modal-content.warning,
.modal-content.confirm {
  max-width: 420px;
  width: auto;
  padding: 1rem 1rem 1.25rem 1rem;
  text-align: left;
}

.modal-header {
  background: var(--orange-2);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--current-border);
}

.modal-header h2 {
  color: var(--white-1);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.close-modal {
  font-size: 2rem;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
  background: transparent;
  border: none;
  animation: closePop 320ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.close-modal:hover {
  color: var(--orange-1);
  transform: scale(1.08) rotate(5deg);
}

/* Se o elemento é o botão 'Cancelar' e também tem a classe close-modal,
   neutralizar animações/transforms para evitar tilt/rotação ao abrir modais. */
.btn-cancel.close-modal {
  animation: none;
  transition: none;
  transform: none;
}

.btn-cancel.close-modal:hover,
.btn-cancel.close-modal:focus-visible {
  transform: none;
}

.modal-body {
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  gap: var(--modal-item-gap);
  overflow-y: auto;
  line-height: var(--modal-line-height);
}

/* Garantir que o grid de formulário em modais funcione corretamente */
.modal-body .form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 15px;
  width: 100%;
}

/* Garantir que os form-groups dentro do grid em modais mantenham sua largura */
.modal-body .form-grid .form-group {
  width: 100%;
  min-width: 0;
}

/* Garantir que os inputs dentro dos form-groups em modais respeitem o tamanho do grid */
.modal-body .form-grid .form-group input,
.modal-body .form-grid .form-group select,
.modal-body .form-grid .form-group textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Dropdown uses position: fixed, so no overflow changes needed */

.modal-footer {
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--current-border);
}

/* Modal específico para seleção de região */
#chooseRegionModal .modal-content {
  max-width: 500px;
  width: auto;
}

#chooseRegionModal .modal-content.small {
  max-width: 420px;
}

#chooseRegionModal .modal-header {
  background: var(--blue-2);
}

#chooseRegionModal .modal-header h2 {
  color: var(--white-1);
  font-size: 1.1rem;
  font-weight: 600;
}

#chooseRegionModal .modal-body {
  padding: 20px;
  text-align: center;
}

#chooseRegionModal .modal-header h2 {
  color: var(--white-1);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

#chooseRegionModal .modal-body {
  padding: 24px;
  text-align: center;
}

#chooseRegionModal .modal-body p {
  margin-bottom: 20px;
  color: var(--current-text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#chooseRegionModal .regions-badges-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}

/* Melhorar badges dentro do modal */
#chooseRegionModal .region-badge {
  font-size: 0.9rem;
  padding: 6px 14px;
  height: auto;
  min-height: 28px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: none;
  position: relative;
  overflow: visible;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

#chooseRegionModal .region-badge .badge-icon {
  margin-right: 6px;
}

#chooseRegionModal .region-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#chooseRegionModal .region-badge.selected {
  transform: translateY(-2px) scale(1.1) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
  z-index: 1;
}

#chooseRegionModal .region-badge:focus {
  outline: 2px solid var(--focus-color, #3b82f6);
  outline-offset: 2px;
}

/* Classes de rotação para ícones */
.rot-135 {
  transform: rotate(135deg);
  display: inline-block;
}

/* Melhorar o ícone de rotação do sudeste no modal */
#chooseRegionModal .region-badge .rot-135 {
  transform: rotate(135deg);
  display: inline-block;
}

.modal-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: calc(var(--modal-item-gap) + 6px);
}

.modal-detail-item {
  background: var(--current-surface);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-detail-item label {
  font-weight: 700;
  color: var(--current-text-muted);
  font-size: 0.98rem;
  font-family: "Poppins", sans-serif;
  margin: 0;
  flex: 0 0 40%;
}

.modal-detail-item span {
  color: var(--current-text);
  font-size: 1.06rem;
  font-weight: 600;
  font-family: "Ubuntu Mono", monospace;
  text-align: right;
  flex: 1 1 60%;
}

/* Responsivo: em telas pequenas alinhar verticalmente */
@media (max-width: 640px) {
  .modal-detail-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-detail-item label {
    flex: none;
    margin-bottom: 6px;
  }

  .modal-detail-item span {
    text-align: left;
    width: 100%;
  }
}

/* Message Overlays */
.message-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  /* Ensure message overlays are above navbar/modals/etc. Use high value and to avoid
       stacking-context issues (some elements use backdrop-filter which creates stacking contexts). */
  z-index: 20001;
  /* ensure overlays (success/confirm) sit above all modals and toasts */
}

.message-overlay.show {
  display: flex;
}

/* ===== SEARCH ===== */

/* ===== SEARCH ===== */
.search-group {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 1000px;
}

.search-field {
  flex: 1 1 auto;
  min-width: 420px;
  max-width: calc(100% - 180px);
  padding: 10px 14px 10px 56px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--white-1);
  border-radius: 999px;
  min-height: 44px;
  height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.search-select {
  min-width: 140px;
  max-width: 240px;
  padding: 10px 36px 10px 14px;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--white-1);
  border-radius: 999px;
  min-height: 44px;
  height: 44px;
  -webkit-appearance: none;
  appearance: none;
}

.search-group .input-group i {
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white-1);
  margin-left: -6px;
}

/* ===== LANDING PAGE ===== */
.landing-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.landing-nav .nav-link {
  text-decoration: none;
  color: var(--landing-muted);
  font-weight: 500;
  transition: color 0.3s ease;
}

.landing-nav .nav-link:hover {
  color: var(--white-1);
  transform: translateY(-2px);
}

.landing-nav .btn-login {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--current-accent);
  color: white;
  padding: 0 20px;
  height: var(--pill-height);
  line-height: var(--pill-height);
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Apply softened outline and shadow to the landing/login "Entrar" pill */
.landing-nav .btn-login,
.landing-nav .btn-login i {
  -webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.6);
  text-shadow: 0 0.6px 0 rgba(0, 0, 0, 0.6), 0 1.2px 4px rgba(0, 0, 0, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.25);
}

.landing-nav .btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--black-3);
  backdrop-filter: var(--blur-light);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 15000;
  /* modals sit below message overlays but above other UI */
  animation: fadeIn 0.2s;
  padding: 1rem;
  box-sizing: border-box;
}

/* Espaço reservado para futuros estilos */

.hero-content {
  position: relative;
  z-index: 10;
  display: grid;
  align-items: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-text h1 {
  font-size: 4.8rem;
  font-weight: 700;
  color: var(--white-1, #ffffff);
  margin-bottom: 1rem;
  line-height: 1.1;
  /* softened outline and shadow to match user pill */
  -webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.6);
  text-shadow: 0 0.6px 0 rgba(0, 0, 0, 0.6), 0 1.2px 4px rgba(0, 0, 0, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Desktop two-column layout: texto à esquerda, imagem/estatísticas à direita */
@media (min-width: 1100px) {
  .hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
  }

  .hero-text {
    text-align: left;
    padding-right: 1rem;
  }

  .hero-image {
    align-items: flex-end;
  }
}

.hero-subtitle,
.hero-description {
  color: var(--white-1, #ffffff);
  -webkit-text-stroke: 0.9px rgba(0, 0, 0, 0.85);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.55),
    0 6px 18px rgba(0, 0, 0, 0.45);
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.7rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.hero-description {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  line-height: 1.7;
  font-weight: 700;
}

.hero-image {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
}

.hero-image .ambulance-icon {
  width: 220px;
  height: 220px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--landing-card-bg);
  border: 1px solid var(--landing-card-border);
  color: var(--current-accent);
  box-shadow: var(--shadow-heavy);
  font-size: 4rem;
  animation: float-ambulance 4.5s ease-in-out infinite;
}

.hero-image .stats {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: flex-end;
}

.hero-image .stat-item {
  text-align: right;
  padding: 10px 16px;
  background: var(--landing-card-bg);
  border-radius: 12px;
  border: 1px solid var(--landing-card-border);
  box-shadow: var(--shadow-medium);
  min-width: 140px;
  animation: float-ambulance-tilt 4.5s ease-in-out infinite;
}

.hero-image .stat-item:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-heavy);
}

.hero-image .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--landing-text);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6), 0 0 8px rgba(0, 0, 0, 0.4);
}

.hero-image .stat-label {
  font-size: 0.9rem;
  color: var(--landing-muted);
  margin-top: 0.25rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.theme-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  margin-right: 12px;
}

.theme-selector .theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--landing-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 120ms ease, transform 120ms ease;
}

.theme-selector .theme-btn .theme-icon {
  font-size: 1.05rem;
  color: var(--landing-muted);
  transition: color 140ms ease, transform 140ms ease;
  /* add subtle shadow to theme icons for better contrast */
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}

/* Active theme button uses the accent color (matches pill) */
.theme-selector .theme-btn.active .theme-icon,
.theme-selector .theme-btn[aria-pressed="true"] .theme-icon {
  color: var(--current-accent);
  animation: pulse 2.6s ease-in-out infinite;
  /* stronger shadow when active to match accent pill visual weight */
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 2px 6px rgba(0, 0, 0, 0.5);
}

.theme-selector .theme-btn .theme-text {
  font-weight: 600;
  font-size: 0.85rem;
}

.theme-selector .theme-btn:hover {
  color: var(--landing-text);
  transform: translateY(-2px) scale(1.02);
}

.theme-selector .theme-btn:hover .theme-icon {
  transform: scale(1.06);
}

.about,
.services {
  color: var(--white-1);
  padding: 3.5rem 0 4rem 0;
}

.about {
  background: linear-gradient(
    180deg,
    rgba(127, 29, 29, 0.04) 0%,
    rgba(12, 18, 30, 0.02) 100%
  );
}

.services {
  background: linear-gradient(
    180deg,
    rgba(12, 18, 30, 0.04) 0%,
    rgba(127, 29, 29, 0.02) 100%
  );
}

.about h2,
.services h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--white-2);
  margin-bottom: 3rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 4rem;
  align-items: start;
}

.about-card {
  background: var(--red-5);
  border: 1px solid var(--orange-1);
  padding: 1.8rem;
  border-radius: 14px;
  box-shadow: 0 26px 60px rgba(2, 6, 23, 0.32);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  flex-direction: column;
  min-height: 200px;
}

.about-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.about-card .card-icon {
  font-size: 3.4rem;
  color: var(--orange-1);
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1.25rem;
  color: var(--white-1);
  margin: 0.6rem 0 0.6rem 0;
}

.about-card p {
  color: var(--white-2);
  line-height: 1.6;
  margin: 0.4rem 0 0 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.service-item {
  text-align: center;
  padding: 2rem;
  border-radius: 15px;
  background: var(--landing-card-bg);
  border: 1px solid var(--landing-card-border);
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease;
  min-height: 200px;
}

.service-item:hover {
  transform: translateY(-5px);
}

.service-item i {
  font-size: 2.5rem;
  color: var(--orange-1);
  margin-bottom: 1rem;
}

.service-item h3 {
  font-size: 1.2rem;
  color: var(--white-1);
  margin-bottom: 0.8rem;
}

.service-item p {
  color: var(--white-C);
  line-height: 1.6;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: transparent;
  /* Remover fundo escuro para usar o background-image */
}

.login-container {
  width: 385px;
  /* 10% mais largo que login-section (350px + 35px) */
  height: 495px;
  /* 10% mais alto que login-section (450px + 45px) */
  max-width: none;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.15);
  /* Fundo semi-transparente mais leve */
  border-radius: 16px;
  /* Borda um pouco mais arredondada que o login-section */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  /* Sombra menos intensa */
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInScale 0.5s ease forwards;
  overflow: visible;
  box-sizing: border-box;
}

/* Theme-specific overrides for the login box background */
body.theme-light .login-page .login-container,
body.theme-light .login-container {
  background: rgba(255, 255, 255, 0.15);
  /* Fundo mais claro para tema claro */
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary, #111827);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  position: relative;
  /* Garantir que o posicionamento esteja correto */
}

/* Ajuste das bordas das divisões para tema claro */
body.theme-light .form-navigation {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-dark .login-page .login-container,
body.theme-dark .login-container {
  background: rgba(0, 0, 0, 0.25);
  /* Fundo mais escuro para tema escuro, mas menos opaco */
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--current-text, #fff);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  /* Garantir que o posicionamento esteja correto */
}

/* Ajuste das bordas das divisões para tema escuro */
body.theme-dark .form-navigation {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 1100px) {
  .login-container {
    padding: 3rem;
  }
}

.login-page .login-container {
  max-height: none;
  min-height: auto;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-page .hero {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  max-width: none;
  /* Fill viewport minus navbar so centering accounts for fixed navbar */
  min-height: calc(100vh - var(--navbar-height));
  padding-top: var(--navbar-height);
  padding-bottom: 0;
  /* remove extra padding that shifts vertical centering */
  margin: 0 auto;
}

.login-page .hero-content .login-container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
}

.main-header {
  text-align: center;
  padding: 0 20px;
}

/* Ensure landing page hero is vertically centered (does not affect .login-page) */
.landing-page .hero {
  display: flex;
  align-items: center;
  justify-content: center;
  /* make hero fill viewport minus navbar so content is centered */
  min-height: calc(100vh - var(--navbar-height));
  /* remove extra top padding (if any) so centering is exact) */
  padding-top: 0;
}

.main-header h1 {
  color: var(--white-1);
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-header h1 i {
  color: var(--orange-1);
  margin-right: 12px;
}

.main-header p {
  color: var(--white-3);
  font-size: 1.1rem;
  margin: 0;
  font-weight: 400;
}

.login-grid {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: auto;
  min-height: 600px;
  overflow: hidden;
  margin: 0 auto;
  padding: 0;
}

.login-page .login-container .login-grid {
  min-height: auto;
  overflow: visible;
}

.login-section {
  position: absolute;
  width: 350px;
  /* Largura exata conforme solicitado */
  height: 450px;
  /* Altura exata conforme solicitado */
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 30px;
  box-sizing: border-box;
  transition: opacity 0.5s ease;
  /* Apenas transição de opacidade */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Centraliza perfeitamente */
  backdrop-filter: blur(8px);
  /* Efeito de vidro fosco mais intenso */
  -webkit-backdrop-filter: blur(8px);
  /* Suporte para Safari */
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.25);
  /* Centralizar horizontalmente */
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-section.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  z-index: 2;
  visibility: visible;
  transform: translate(-50%, -50%);
  /* Centralizar vertical e horizontalmente */
  transition: opacity 0.4s ease-in-out;
  /* Apenas transição de opacidade */
  width: 350px;
  height: 450px;
  box-sizing: border-box;
  pointer-events: all;
  /* Permitir interação */
  position: absolute;
  width: 350px;
  height: 450px;
  box-sizing: border-box;
}

.login-page .login-section.active {
  padding: 32px 26px;
  margin: 0 auto;
  position: absolute;
  /* Mantém posição absoluta */
  height: 450px;
  width: 350px;
  max-height: none;
  box-sizing: border-box;
  overflow: visible;
  opacity: 1;
  /* Garantir visibilidade */
  visibility: visible;
  /* Garantir visibilidade */
  z-index: 10;
  /* Na frente */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Centraliza perfeitamente */
}

/* Melhorar a legibilidade dos textos no formulário */
.login-section label {
  font-weight: 500;
  margin-bottom: 8px;
  color: rgba(0, 0, 0, 0.85);
  text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
}

body.theme-dark .login-section label {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.4);
}

.login-section input {
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.theme-dark .login-section input {
  background-color: rgba(30, 30, 30, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Garantir que o form e seus elementos estejam bem posicionados */
.login-section .auth-form {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.login-section.slide-left,
.login-section.slide-right {
  opacity: 0;
  z-index: 1;
  position: absolute;
  visibility: hidden;
  transform: translate(-50%, -50%);
  /* Mantém centralizado vertical e horizontalmente */
  transition: opacity 0.4s ease-in-out;
  pointer-events: none;
  /* Evitar cliques em elementos invisíveis */
}

.login-columns {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  width: 100%;
  padding-bottom: 51px;
  position: relative;
  z-index: 1;
  /* Valor menor para ficar abaixo dos botões */
}

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

.login-column.actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.auth-form {
  display: block;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  display: none;
}

.auth-form .form-group label {
  display: block;
  font-weight: 500;
  font-size: 1rem;
  color: var(--white-3);
}

.auth-form .input-group input {
  width: 100%;
  height: var(--login-control-height);
  padding: 12px 15px 12px 3rem;
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white-C);
  box-sizing: border-box;
}

.auth-form .input-group input[type="password"] {
  padding: 12px 52px 12px 3rem;
}

/* Garante que os campos de entrada e seus componentes não sobreponham outros elementos */
.auth-form .input-group {
  z-index: 1;
}

/* Ajuste específico para o botão de mostrar senha em formulários de autenticação */
.auth-form .input-group .toggle-password {
  position: absolute;
  height: 30px;
  width: 30px;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  /* Remove foco ao navegar com Tab */
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  pointer-events: auto;
}

/* Remover qualquer estilo de foco do botão toggle */
.auth-form .input-group .toggle-password:focus,
.auth-form .input-group .toggle-password:focus-visible {
  outline: none;
  box-shadow: none;
  border: none;
}

.auth-form .input-group input:focus {
  outline: none;
  border-color: var(--orange-1);
  background: rgba(255, 255, 255, 0.08);
}

.auth-form .input-group input::placeholder {
  color: var(--white-I);
}

.login-section .auth-form:not(.register-form) .input-group input {
  height: var(--login-control-height);
  line-height: var(--login-control-height);
}

.login-section .auth-form:not(.register-form) .btn-primary {
  width: 100%;
  height: var(--login-control-height);
  margin: 0;
  font-size: 1.1rem;
}

.auth-form .btn-primary {
  width: 100%;
  padding: 1.2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--orange-1);
  color: var(--black-A);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.auth-form .btn-primary:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s ease;
  z-index: -1;
}

.auth-form .btn-primary:hover {
  background: var(--orange-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

.auth-form .btn-primary:hover:before {
  left: 100%;
}

.auth-form .form-footer {
  text-align: center;
  margin-top: 0;
}

.auth-form .form-footer p {
  color: var(--white-3);
  margin: 0;
  font-size: 0.9rem;
}

.auth-form .form-footer a {
  color: var(--orange-1);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-form .form-footer a:hover {
  color: rgb(255, 140, 66);
  text-decoration: underline;
}

/* ===== LIGHT THEME: improve contrast for login form controls ===== */
body.theme-light .auth-form .form-group label,
body.theme-light .auth-form .input-group label {
  color: rgba(16, 24, 40, 0.85);
}

body.theme-light .auth-form .input-group input,
body.theme-light .auth-form .input-group select,
body.theme-light .auth-form .input-group textarea {
  background: #ffffff;
  /* solid white to ensure legibility */
  color: rgba(16, 24, 40, 0.9);
  border: 1px solid rgba(16, 24, 40, 0.12);
  box-shadow: none;
}

/* placeholder color darker in light theme */
body.theme-light .auth-form .input-group input::placeholder,
body.theme-light .auth-form .input-group textarea::placeholder {
  color: rgba(16, 24, 40, 0.48);
}

/* icons inside inputs (input-group i) should be darker on light theme */
body.theme-light .input-group i {
  color: rgba(16, 24, 40, 0.54);
}

/* focus ring for light theme inputs */
body.theme-light .auth-form .input-group input:focus,
body.theme-light .auth-form .input-group textarea:focus,
body.theme-light .auth-form .input-group select:focus {
  outline: none;
  border-color: var(--orange-1);
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.12);
}

/* primary button contrast */
body.theme-light .auth-form .btn-primary {
  background: var(--orange-1);
  color: #0b0b0b;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
}

body.theme-light .auth-form .btn-primary:hover {
  background: var(--orange-2);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.08);
}

/* small adjustments for login-section surfaces in light theme */
body.theme-light .login-section {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(16, 24, 40, 0.06);
}

/* Ensure paragraph texts inside login are readable in light theme */
body.theme-light .login-container p,
body.theme-light .login-container .main-header p,
body.theme-light .login-container .auth-form .form-footer p,
body.theme-light .login-container .login-section p {
  color: rgba(16, 24, 40, 0.78);
}

.progress-steps,
.step-indicators {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  /* Aumentado para dar mais espaço após a linha */
  position: relative;
  flex-direction: row;
  width: 100%;
}

.progress-steps::before,
.step-indicators::before {
  content: "";
  position: absolute;
  top: 60px;
  /* Movido para baixo dos rótulos */
  left: 30px;
  right: 30px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 1;
}

.login-page .progress-steps::before {
  display: none;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-number {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white-I);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  margin-bottom: 0.4rem;
}

.step-label {
  font-size: 0.7rem;
  color: var(--white-I);
  text-align: center;
  transition: color 0.3s ease;
}

.step.active .step-number {
  background: var(--orange-1);
  color: var(--white-1);
  box-shadow: 0 0 10px rgba(255, 140, 66, 0.5);
}

.step.active .step-label {
  color: var(--orange-1);
  font-weight: 500;
}

.step.completed .step-number {
  background: rgb(34, 197, 94);
  color: var(--white-1);
}

.step.completed .step-label {
  color: rgb(34, 197, 94);
}

.auth-form.register-form .form-step {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.auth-form.register-form .form-step.active {
  display: block;
}

.step-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

/* Estilos removidos - usando apenas .form-navigation .btn-primary */

/* Ícones dos botões */
#prevBtn i,
#nextBtn i,
#submitBtn i,
#loginBtn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Estilo específico para o botão de login */
#loginBtn {
  height: var(--nextBtn-height);
  box-sizing: border-box;
  padding: 0 18px;
  line-height: 56px;
  margin: 0;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* Container dos botões de navegação */
.form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
}

/* Estilos de navegação removidos - usando estilos padrão do sistema */

.step-navigation .btn-secondary {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--white-3);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* ===== PROFILE PAGE ===== */
.profile-header,
.settings-header {
  margin-bottom: 30px;
}

.profile-header h1,
.settings-header h1,
.app-page-title,
.section-title,
.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-container,
.settings-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  max-width: 1200px;
  margin: auto;
  padding: 50px 20px;
}

.settings-container {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  max-width: 1400px;
  grid-auto-rows: 1fr;
}

.profile-section,
.settings-section {
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--current-border);
  transition: all 0.3s ease;
  height: fit-content;
  color: var(--current-text);
}

.settings-section {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

/* Layout com dois quadros lado a lado na tela 'Sobre' */
#settings .settings-container {
  max-width: 1200px;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

#settings .settings-section {
  max-width: none;
  margin: 0;
}

.profile-section:hover,
.settings-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
}

.profile-section .section-header,
.settings-section .section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--orange-1);
}

.profile-section .section-header h2,
.settings-section .section-header h2 {
  color: var(--current-text);
  font-size: 1.5rem;
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-section .section-header p,
.settings-section .section-header p {
  color: var(--current-text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.4;
}

/* Settings Specific */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--header-bg);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.setting-item.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--orange-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.setting-info {
  text-align: left;
}

.setting-item.centered .setting-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Imagem do autor na tela Sobre: forçar 150x150 e manter crop */
.setting-item.author .setting-info img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* Centralizar todo o conteúdo do bloco 'author' */
.setting-item.author {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.setting-item.author .setting-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.setting-info label {
  color: var(--white-1);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  display: block;
}

.setting-info small {
  color: var(--white-3);
  display: block;
  margin-top: 5px;
  line-height: 1.4;
}

.toggle-switch {
  position: relative;
  display: inline-block;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  display: block;
  width: 60px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  background: var(--white-1);
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-label {
  background: var(--orange-1);
}

.toggle-switch input:checked + .toggle-label .toggle-slider {
  transform: translateX(28px);
}

.version-badge {
  padding: 8px 16px;
  background: var(--red-1);
  color: var(--white-1);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.clear-cache-btn {
  padding: 10px 20px;
  background: rgba(255, 152, 0, 0.15);
  color: var(--orange-1);
  border: 1px solid var(--orange-1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.clear-cache-btn:hover {
  background: var(--orange-1);
  color: var(--white-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--black-5);
}

/* Save Buttons */
.btn-save,
.btn-save-all {
  align-self: flex-start;
  padding: 12px 28px;
  background: linear-gradient(90deg, var(--current-accent), var(--orange-1));
  color: var(--white-1);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Form actions (buttons area) - align buttons horizontally and keep spacing */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
}

/* Force buttons in modals to stay side-by-side (no wrapping) */
.modal .form-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  /* keep actions aligned to the right in modals */
}

.modal .form-actions .btn-save,
.modal .form-actions .btn-cancel {
  white-space: nowrap;
  /* prevent button internal text wrapping */
}

/* On very small screens allow slightly smaller buttons to avoid overflow */
@media (max-width: 420px) {
  .modal .form-actions .btn-save,
  .modal .form-actions .btn-cancel {
    min-width: 92px;
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

.form-actions .btn-save {
  /* ensure save sits inline with cancel */
  align-self: center;
}

.form-actions .btn-cancel {
  /* make cancel visually smaller and aligned with save */
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  align-self: center;
  min-width: 120px;
}

.form-actions .btn-save {
  min-width: 120px;
}

/* Ensure Save and Cancel share identical appearance and hover in the actions area */
.form-actions .btn-save,
.form-actions .btn-cancel {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* manter transição apenas para o botão de salvar; o cancelar deve ser estático */
  transition: all 0.25s ease;
}

.form-actions .btn-save:hover {
  box-shadow: var(--shadow-medium);
}

.form-actions .btn-cancel:hover {
  /* não aplicar transform/tilt no hover do cancelar */
  box-shadow: var(--shadow-medium);
  transform: none;
}

.btn-save-all {
  padding: 15px 30px;
  background: var(--red-4);
  font-size: 1.1rem;
}

.btn-save:hover,
.btn-save-all:hover {
  background: linear-gradient(90deg, var(--orange-1), var(--current-accent));
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-save-all:hover {
  background: var(--orange-2);
  box-shadow: 0 8px 20px var(--black-5);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes messageSlide {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes closePop {
  0% {
    transform: scale(0.92) rotate(-8deg);
    opacity: 0;
  }

  60% {
    transform: scale(1.06) rotate(4deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes float-ambulance {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-6px) rotate(-1deg);
  }

  50% {
    transform: translateY(0) rotate(0deg);
  }

  75% {
    transform: translateY(-4px) rotate(1deg);
  }

  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes float-ambulance-tilt {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-6px) rotate(-3.5deg);
  }

  50% {
    transform: translateY(0) rotate(0deg);
  }

  75% {
    transform: translateY(-4px) rotate(2.5deg);
  }

  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* Desynchronize stat items */
.hero-image .stat-item:nth-child(1) {
  animation-delay: 0s;
  animation-duration: 4.4s;
}

.hero-image .stat-item:nth-child(2) {
  animation-delay: 0.28s;
  animation-duration: 4.6s;
}

.hero-image .stat-item:nth-child(3) {
  animation-delay: 0.72s;
  animation-duration: 4.2s;
}

.hero-image .stat-item:nth-child(4) {
  animation-delay: 0.5s;
  animation-duration: 4.7s;
}

.hero-image .stat-item:nth-child(5) {
  animation-delay: 0.12s;
  animation-duration: 4.3s;
}

.hero-image .stat-item:nth-child(6) {
  animation-delay: 0.9s;
  animation-duration: 4.8s;
}

/* ===== THEME-SPECIFIC OVERRIDES ===== */
body.theme-light .btn,
body.theme-light .btn-primary,
body.theme-light .btn-save {
  background: var(--blue-2);
  border-color: var(--blue-3);
  color: var(--white-1);
}

/* In light theme the Cancel button should use the modal/header blue instead of orange */
body.theme-light .btn-cancel {
  color: var(--header-bg);
  border-color: var(--header-bg);
}

body.theme-light .btn-cancel:hover:not(:disabled) {
  background: var(--header-bg);
  color: var(--white-1);
  transform: none;
}

/* In dark theme keep the orange styling (default), but be explicit for clarity */
body.theme-dark .btn-cancel {
  color: var(--orange-1);
  border-color: var(--orange-1);
}

body.theme-light .btn:hover,
body.theme-light .btn-primary:hover,
body.theme-light .btn-save:hover {
  background: var(--blue-1);
  transform: none;
}

body.theme-light .modal-header {
  background: rgb(3, 67, 159);
}

/* Make inputs inside modals "puros" in light theme: remove heavy borders/boxes
   but keep a minimal, accessible focus indicator for keyboard users using :focus-visible. */
body.theme-light .modal .form-group input,
body.theme-light .modal .form-group select,
body.theme-light .modal .form-group textarea {
  /* keep original border/background from .form-group; remove only extra box-shadow */
  box-shadow: none;
}

body.theme-light .modal .input-group input,
body.theme-light .modal .input-group select,
body.theme-light .modal .input-group textarea {
  /* preserve spacing for icons (match .input-group default) and remove extra box-shadow */
  box-shadow: none;
  padding-left: 3rem;
}

/* Keep a subtle, accessible focus ring only for keyboard users */
body.theme-light .modal .form-group input:focus-visible,
body.theme-light .modal .form-group select:focus-visible,
body.theme-light .modal .form-group textarea:focus-visible,
body.theme-light .modal .input-group input:focus-visible,
body.theme-light .modal .input-group select:focus-visible,
body.theme-light .modal .input-group textarea:focus-visible {
  outline: none;
  /* preserve original border-width and only change color to avoid layout shift */
  border-color: rgba(3, 67, 159, 0.85);
  box-shadow: 0 0 0 4px rgba(3, 67, 159, 0.08);
}

/* Theme-specific enforcement for form action buttons
   Make Cancel style the canonical appearance for action buttons:
   outlined (transparent) with colored border/text, and filled on hover.
*/
body.theme-light .form-actions .btn-save,
body.theme-light .form-actions .btn-cancel {
  background: transparent;
  border: 1px solid var(--header-bg);
  color: var(--header-bg);
}

body.theme-light .form-actions .btn-save:hover {
  background: var(--header-bg);
  color: var(--white-1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

body.theme-light .form-actions .btn-cancel:hover {
  background: var(--header-bg);
  color: var(--white-1);
  transform: none;
  box-shadow: var(--shadow-medium);
}

/* =============================================================
   AUMENTO DE CONTRASTE (SOMENTE TEMA CLARO) PARA MODAIS
   Objetivo: melhorar leitura dos quadros / cartões / campos dentro
   dos modais mantendo o tema escuro inalterado.
   - Fundo dos cards levemente cinza (slate) para separar do branco puro
   - Bordas mais definidas (#cbd5e1) garantindo contraste WCAG >= 3:1
   - Textos primários mais escuros (#0f172a / #1e293b) e labels #334155
   - Campos de formulário com borda visível e placeholders mais contrastantes
   - Região de checkboxes recebe fundo e borda para clara delimitação
   ============================================================= */
body.theme-light .modal-content {
  background: #ffffff;
  /* branco puro para máximo contraste com header azul */
  border: 1px solid #cbd5e1;
  /* slate-300 */
}

body.theme-light .modal-header {
  background: #0f4aa3;
  /* azul mais saturado para contraste AA+ com branco */
  border-bottom: 1px solid #0c408f;
}

body.theme-light .modal-detail-item {
  background: #f1f5f9;
  /* slate-100 */
  border: 1px solid #cbd5e1;
  /* slate-300 */
}

body.theme-light .modal-detail-item label {
  color: #334155;
  /* slate-600 */
}

body.theme-light .modal-detail-item span {
  color: #0f172a;
  /* slate-900 */
}

/* Campos e labels do formulário dentro do modal */
body.theme-light .modal .form-group label,
body.theme-light .modal .field-label {
  color: #1e293b;
  /* slate-800 */
}

body.theme-light .modal .input-group i {
  color: #1e293b;
  opacity: 0.85;
}

body.theme-light .modal .form-group input,
body.theme-light .modal .form-group select,
body.theme-light .modal .form-group textarea,
body.theme-light .modal .input-group input,
body.theme-light .modal .input-group select,
body.theme-light .modal .input-group textarea {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

body.theme-light .modal .form-group input::placeholder,
body.theme-light .modal .form-group textarea::placeholder,
body.theme-light .modal .input-group input::placeholder,
body.theme-light .modal .input-group textarea::placeholder {
  color: #64748b;
  /* slate-500 */
  opacity: 1;
}

/* Caixa de regiões */
body.theme-light .modal .regions-box {
  background: #f8fafc;
  /* slate-50 */
  border: 1px solid #cbd5e1;
}

body.theme-light .modal .regions-box .region-item {
  background: #ffffff;
  border: 1px solid #dbe3eb;
  /* leve variação para modularidade */
}

body.theme-light .modal .regions-box .region-item:hover {
  background: #e2e8f0;
  /* slate-200 */
}

/* Ajustar foco para manter coerência com nova paleta */
body.theme-light .modal .form-group input:focus-visible,
body.theme-light .modal .form-group select:focus-visible,
body.theme-light .modal .form-group textarea:focus-visible,
body.theme-light .modal .input-group input:focus-visible,
body.theme-light .modal .input-group select:focus-visible,
body.theme-light .modal .input-group textarea:focus-visible {
  border-color: #0f4aa3;
  box-shadow: 0 0 0 3px rgba(15, 74, 163, 0.25);
}

/* Destacar background do campo em foco dentro do modal (tema claro) */
body.theme-light .modal .form-group input:focus,
body.theme-light .modal .input-group input:focus {
  background: #e3f0ff;
  transition: background 0.18s;
}

/* Botões dentro do modal: usar azul consistente em vez de tonalidades múltiplas */
body.theme-light .modal .btn-save,
body.theme-light .modal .btn-confirm {
  border-color: #0f4aa3;
  color: #0f4aa3;
}

body.theme-light .modal .btn-save:hover,
body.theme-light .modal .btn-confirm:hover {
  background: #0f4aa3;
  color: #ffffff;
}

/* Cancel mantém abordagem outline mas com cor coerente */
body.theme-light .modal .btn-cancel {
  border-color: #334155;
  color: #334155;
}

body.theme-light .modal .btn-cancel:hover {
  background: #334155;
  color: #ffffff;
}

/* Dark theme: use Cancel's outlined orange as canonical */
body.theme-dark .form-actions .btn-save,
body.theme-dark .form-actions .btn-cancel {
  background: transparent;
  color: var(--orange-1);
  border: 1px solid var(--orange-1);
}

body.theme-dark .modal .form-group input:focus,
body.theme-dark .modal .input-group input:focus {
  background: #7e592f;
  transition: background 0.18s;
}

/* Estilos para o sistema de auto-complete */
.suggestions-container {
  position: absolute;
  width: calc(100% - 40px);
  max-height: 200px;
  overflow-y: auto;
  background-color: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  z-index: 12010;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-top: -5px;
  margin-left: 40px;
}

.suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-item:hover {
  background-color: rgba(120, 120, 120, 0.1);
}

body.theme-light .suggestions-container {
  background-color: white;
  border: 1px solid #cbd5e1;
}

body.theme-light .suggestion-item:hover {
  background-color: #e3f0ff;
}

body.theme-dark .suggestions-container {
  background-color: #1b1f24;
  border: 1px solid #2d333b;
}

body.theme-dark .suggestion-item:hover {
  background-color: #232a36;
}

/* Estilos para as abas no formulário */
.form-tabs {
  width: 100%;
}

.tabs-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(120, 120, 120, 0.2);
  padding-bottom: 10px;
}

.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--current-text-muted);
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--current-text);
  background: rgba(120, 120, 120, 0.1);
  box-shadow: 0 -3px 0 var(--current-accent) inset;
}

body.theme-light .tab-btn.active {
  box-shadow: 0 -3px 0 #0f4aa3 inset;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s;
}

.tab-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn-next,
.btn-prev {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  border: 1px solid var(--current-accent);
  color: var(--current-accent);
}

.btn-next:hover,
.btn-prev:hover {
  background: var(--current-accent);
  color: white;
}

/* Ajustes para tema claro e escuro */
body.theme-light .btn-next,
body.theme-light .btn-prev {
  border-color: #0f4aa3;
  color: #0f4aa3;
}

body.theme-light .btn-next:hover,
body.theme-light .btn-prev:hover {
  background: #0f4aa3;
  color: white;
}

body.theme-dark .btn-next,
body.theme-dark .btn-prev {
  border-color: var(--orange-1);
  color: var(--orange-1);
}

body.theme-dark .btn-next:hover,
body.theme-dark .btn-prev:hover {
  background: linear-gradient(90deg, var(--current-accent), var(--orange-1));
  color: white;
}

body.theme-dark .form-actions .btn-save:hover {
  background: linear-gradient(90deg, var(--current-accent), var(--orange-1));
  color: var(--white-1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

body.theme-dark .form-actions .btn-cancel:hover {
  background: linear-gradient(90deg, var(--current-accent), var(--orange-1));
  color: var(--white-1);
  transform: none;
  box-shadow: var(--shadow-medium);
}

.modal-header h2 {
  font-size: 1.75rem;
}

.modal .btn-save,
.modal .btn-cancel,
.modal .btn-confirm {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
  background: transparent;
  border: 1px solid var(--header-bg);
  color: var(--header-bg);
}

.modal .btn-save:hover,
.modal .btn-confirm:hover,
.modal .btn-save:focus-visible,
.modal .btn-confirm:focus-visible {
  background: var(--header-bg);
  color: var(--white-1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.modal .btn-cancel:hover,
.modal .btn-cancel:focus-visible {
  background: var(--header-bg);
  color: var(--white-1);
  transform: none;
  box-shadow: var(--shadow-medium);
}

body.theme-dark .modal .btn-save,
body.theme-dark .modal .btn-cancel,
body.theme-dark .modal .btn-confirm {
  border-color: var(--orange-1);
  color: var(--orange-1);
}

body.theme-dark .modal .btn-save:hover,
body.theme-dark .modal .btn-cancel:hover,
body.theme-dark .modal .btn-confirm:hover {
  background: linear-gradient(90deg, var(--current-accent), var(--orange-1));
  color: var(--white-1);
}

.modal .form-actions .btn-save,
.modal .form-actions .btn-cancel {
  min-width: 110px;
}

.modal .form-actions {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  margin-top: 18px;
  padding-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

@media (max-width: 420px) {
  .modal .form-actions {
    padding-top: 10px;
    margin-top: 12px;
    justify-content: center;
    gap: 8px;
  }
}

body.theme-dark .modal .form-actions {
  border-top-color: rgba(255, 255, 255, 0.06);
}

body.theme-light .modal .form-actions {
  border-top-color: rgba(3, 67, 159, 0.06);
}

.modal-detail-pairs {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 28px;
  align-items: center;
  justify-content: center;
  max-width: 820px;
  margin: 6px auto 0 auto;
}

.modal-detail-pairs label {
  text-align: right;
  font-weight: 700;
  color: var(--current-text-muted);
  font-size: 0.98rem;
}

.modal-detail-pairs .value {
  text-align: left;
  font-family: "Ubuntu Mono", monospace;
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--current-text);
}

.modal-detail-pairs .value.detail-text {
  /* Usar mesma família que os outros valores do modal para consistência,
       mas manter peso normal para legibilidade em textos longos */
  font-family: "Ubuntu Mono", monospace;
  font-size: 1.06rem;
  font-weight: 600;
  white-space: pre-line;
  line-height: 1.5;
  padding: 8px 0;
}

.modal-detail-pairs .value .status-badge {
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 720px) {
  .modal-detail-pairs {
    grid-template-columns: 1fr;
    gap: 8px 0;
    padding: 0 6px;
  }

  .modal-detail-pairs label {
    text-align: left;
  }

  .modal-detail-pairs .value {
    text-align: left;
  }
}

body.theme-light .search-field,
body.theme-light .search-select {
  border-color: rgb(3, 67, 159);
}

body.theme-dark .search-field,
body.theme-dark .search-select {
  border-color: #e07d13;
}

body.theme-dark .table-section thead th {
  background: var(--orange-2);
}

body.theme-dark .status-admin {
  color: #d6bbff;
}

/* ===== AUTOFILL FIXES ===== */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px var(--blue-2) inset;
  box-shadow: 0 0 0px 1000px var(--blue-2) inset;
  -webkit-text-fill-color: var(--white-1);
}

body:not(.theme-light) input,
body:not(.theme-light) textarea,
body:not(.theme-light) select {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--white-1);
  -webkit-text-fill-color: var(--white-1);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .painel-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Landing/login specific navbar visuals (navbar is full-width by default) */
  body.landing-page .samu-navbar,
  body.login-page .samu-navbar {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--sidebar-border-color);
  }

  body.landing-page .samu-navbar-inner,
  body.login-page .samu-navbar-inner {
    max-width: 1400px;
    padding: 0 20px;
  }

  /* Hide sidebar toggle on pages without sidebar */
  body.landing-page .samu-navbar .menu-toggle,
  body.login-page .samu-navbar .menu-toggle {
    display: none;
  }

  /* Avoid overlapping content on landing/login (navbar is fixed) */
  body.landing-page,
  body.login-page {
    padding-top: 72px;
  }
}

@media (max-width: 900px) {
  .painel-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 3.4rem;
  }

  .landing-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .login-page .hero .hero-content {
    height: auto;
    padding: 18px;
    overflow: visible;
  }

  .login-page .login-section.active {
    padding: 22px;
    overflow: auto;
    position: relative;
    width: 350px;
    height: 450px;
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  .logo-full {
    display: none;
  }

  .logo-short {
    display: inline;
  }

  .painel-card {
    height: 165px;
    padding: 0.8rem;
  }

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

  .form-group,
  .form-group.sm,
  .form-group.mm,
  .form-group.lg,
  .form-group.full-width {
    grid-column: span 1;
  }

  .profile-container,
  .settings-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }

  .profile-header h1,
  .settings-header h1,
  .section-title {
    font-size: 2rem;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-pill-compact {
    width: 100%;
    justify-content: center;
  }

  .theme-selector .theme-btn .theme-text {
    display: none;
  }

  .search-group .search-field {
    min-width: 140px;
    padding-left: 48px;
  }
}

@media (max-width: 640px) {
  .theme-selector {
    gap: 6px;
    padding: 2px;
  }

  .theme-selector .theme-btn {
    padding: 6px;
    min-width: 40px;
    justify-content: center;
  }

  .regions-list {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }

  .regions-list label {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .painel-cards {
    grid-template-columns: 1fr;
  }

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

  .painel-card {
    height: auto;
    padding: 0.9rem;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  /* .landing-header selectors removed: layout controlled by .landing-container and page-specific styles */

  .profile-section,
  .settings-section {
    padding: 15px;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .theme-selector .theme-btn .theme-icon,
  .hero-image .ambulance-icon,
  .hero-image .stat-item {
    animation: none;
    transition: none;
  }

  .theme-selector .theme-btn:hover {
    transform: none;
  }
}

/* ===== UTILITY CLASSES ===== */
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: "Ubuntu Mono", monospace;
}

.value-positive {
  color: #0b8a3e;
  font-weight: 700;
}

.text-landing-muted {
  color: var(--landing-muted);
}

.samu-field-error {
  border-color: var(--red-1);
  box-shadow: 0 0 0 var(--control-focus-ring) var(--red-5);
  background: rgba(255, 0, 0, 0.05);
  animation: shake 0.4s linear;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-5px);
  }

  40%,
  80% {
    transform: translateX(5px);
  }
}

.samu-field-hint {
  display: none;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--red-1);
}

/* Font Awesome icon safeguard */
.fa,
.fas,
.far,
.fab {
  font-family: "Font Awesome 5 Free", "Font Awesome 5 Brands";
  font-weight: 900;
}

/* ===== NAVBAR (new include: includes/navbar.php) ===== */
.samu-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--navbar-height);
  /* keep slight translucent background + stronger fallback to ensure contrast */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--sidebar-border-color);
  /* place navbar above all other UI layers (existing top values in the CSS go up to 12000) */
  z-index: 12001;
  display: flex;
  align-items: center;
  /* visual elevation */
  box-shadow: 0 5px 10px rgba(15, 23, 42, 0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.samu-navbar-inner {
  width: 100%;
  /* fluid container: occupy full width with internal padding */
  margin: 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.samu-navbar-left,
.samu-navbar-center,
.samu-navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.samu-navbar-left {
  min-width: 240px;
}

.samu-navbar-center {
  flex: 1;
  justify-content: center;
}

.samu-navbar-right {
  min-width: 220px;
  justify-content: flex-end;
}

.samu-navbar .brand {
  color: var(--white-1, #ffffff);
  -webkit-text-stroke: 0.9px rgba(0, 0, 0, 0.85);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.55),
    0 5px 10px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.7;
}

.samu-navbar .logo-short {
  display: none;
  font-size: 1.2rem;
}

.samu-navbar .logo-full {
  font-size: 1.35rem;
}

.samu-navbar .brand .brand-icon {
  color: var(--current-accent, #ff9800);
  margin-right: 8px;
  font-size: 1.6rem;
  vertical-align: middle;
  text-shadow: 0 0.6px 0 rgba(0, 0, 0, 0.6), 0 1.2px 4px rgba(0, 0, 0, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.25);
  -webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.6);
}

.menu-toggle {
  background: transparent;
  border: none;
  color: var(--current-text);
  font-size: 1.05rem;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
}

.menu-toggle:focus {
  outline: none;
}

body.landing-page .menu-toggle,
body.login-page .menu-toggle {
  display: none;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 6px 8px;
  border-radius: 9999px;
  color: var(--current-text);
}

.user-pill .btn-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--current-accent, #ff9800);
  color: #fff;
  padding: 0 12px;
  height: var(--pill-height);
  line-height: var(--pill-height);
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Force visibility when layout collisions try to hide the login pill; kept minimal */
.user-pill .btn-login {
  position: relative;
  z-index: 13000;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.user-pill .btn-login i {
  font-size: 0.9rem;
}

.user-pill .btn-login,
.user-pill .btn-login i {
  -webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.6);
  text-shadow: 0 0.6px 0 rgba(0, 0, 0, 0.6), 0 1.2px 4px rgba(0, 0, 0, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.25);
}

/* Ensure logout anchor aligns nicely as a small icon/button */
.btn-logout-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  background: transparent;
  color: var(--current-text);
  padding: 6px;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  cursor: pointer;
}

.btn-logout-inline i {
  font-size: 0.95rem;
}

.btn-logout-inline:hover {
  /* Match the landing page "Entrar" pill hover: subtle lift and smaller shadow */
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Logout button with icon only - no pill background */
.btn-logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  background: transparent;
  color: var(--current-text);
  padding: 8px;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout-icon i {
  font-size: 1.1rem;
}

.btn-logout-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  color: var(--current-accent, #ff9800);
}

/* Keep a distinct, stronger hover for the user-pill's login variant only.
   Important: avoid including .landing-nav .btn-login here so the landing
   hover (defined earlier) keeps its own smaller shadow and lift. */
.user-pill .btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  filter: brightness(1.03);
}

.landing-nav .btn-login:focus-visible,
.user-pill .btn-login:focus-visible,
.btn-logout-inline:focus-visible,
.btn-logout-icon:focus-visible,
.sidebar-logout-btn:focus-visible {
  outline: 3px solid rgba(255, 152, 0, 0.18);
  outline-offset: 3px;
}

/* Botões no footer do modal */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.form-submit {
  margin-top: 20px;
  text-align: right;
}

.form-submit .btn-primary {
  background: rgb(15, 23, 42);
  color: #fff;
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  min-width: 100px;
}

.modal-footer .btn-cancel {
  background: transparent;
  color: var(--header-bg);
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid var(--header-bg);
  font-weight: 600;
  cursor: pointer;
  min-width: 100px;
}

.modal-footer .btn-save:hover {
  /* removed translate to prevent tilt/rotation on hover */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer .btn-cancel:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer .btn-save:hover {
  background: rgb(2, 56, 134);
}

.modal-footer .btn-cancel:hover {
  background: var(--header-bg);
  color: #fff;
}

/* Section actions pill (Adicionar Base) - compact pill matching table header */
.section-actions .btn-login,
.section-actions .btn-login i,
.btn-add-base,
.btn-add-driver,
.btn-add-ose,
.btn-add-vehicle,
.btn-add-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* slightly tighter than landing pill */
  /* use table header background for visual grouping */
  background: var(--header-bg);
  color: var(--white-1);
  padding: 0 10px;
  /* reduce horizontal padding so icon is closer to edges */
  height: var(--pill-height);
  line-height: var(--pill-height);
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.22s ease;
}

/* Force icon spacing reset to ignore inline margin and avoid extra gaps */
.section-actions .btn-login i,
.btn-add-base i,
.btn-add-driver i,
.btn-add-ose i,
.btn-add-vehicle i,
.btn-add-user i {
  margin: 0;
  padding: 0;
  display: inline-block;
  width: 18px;
  /* keep icon visually centered */
  text-align: center;
  font-size: 0.95rem;
}

.section-actions .btn-login:hover,
.btn-add-base:hover,
.btn-add-driver:hover,
.btn-add-ose:hover,
.btn-add-vehicle:hover,
.btn-add-user:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.section-actions .btn-login:focus-visible,
.btn-add-base:focus-visible,
.btn-add-driver:focus-visible,
.btn-add-ose:focus-visible,
.btn-add-vehicle:focus-visible,
.btn-add-user:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.18);
  outline-offset: 3px;
}

body.sidebar-minimized .main-content {
  margin-left: 70px;
}

/* Estilos para o efeito de crossfade da imagem de fundo */
.hero-bg-fade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-color: rgba(0, 0, 0, 0.1);
  /* Leve escurecimento para melhorar contraste */
  pointer-events: none;
}

.image-bg {
  position: relative;
  transition: background-image 0.3s ease-in-out;
  background-color: var(--bg-color);
}

.theme-light .image-bg {
  background-color: var(--light-bg);
}

.theme-dark .image-bg {
  background-color: var(--dark-bg);
}

@media (max-width: 900px) {
  .samu-navbar {
    left: 0;
  }

  .samu-navbar-left {
    min-width: auto;
  }

  .samu-navbar .logo-full {
    display: none;
  }

  .samu-navbar .logo-short {
    display: inline;
  }

  .samu-navbar-center {
    display: none;
  }

  /* Esconder sidebar em telas pequenas para evitar sobreposição */
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    z-index: 1100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.minimized {
    transform: translateX(-100%);
    width: 70px;
  }

  /* Quando o sidebar está aberto em mobile, mostrar com overlay */
  .sidebar.mobile-open {
    transform: translateX(0) !important;
    width: var(--sidebar-width) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  .main-content {
    padding-top: 64px;
    margin-left: 0;
  }

  .main-content.minimized {
    margin-left: 0;
  }

  /* Backdrop para mobile sidebar */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
  }
}

/* ===== CHANGELOG STYLES ===== */
.changelog-container {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

.changelog-container::-webkit-scrollbar {
  width: 6px;
}

.changelog-container::-webkit-scrollbar-track {
  background: var(--current-border);
  border-radius: 10px;
  opacity: 0.3;
}

.changelog-container::-webkit-scrollbar-thumb {
  background: var(--orange-1);
  border-radius: 10px;
}

.changelog-container::-webkit-scrollbar-thumb:hover {
  background: var(--orange-2);
}

.changelog-version {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--current-border);
  padding-bottom: 20px;
}

.changelog-version:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.version-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 15px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 8px;
  border-left: 4px solid var(--orange-1);
}

/* Tema claro - ajuste do background do header de versão */
body.theme-light .version-header {
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.2);
}

/* Tema escuro - mantém o background original */
body.theme-dark .version-header {
  background: rgba(255, 152, 0, 0.1);
}

.version-number {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--orange-1);
}

.version-date {
  font-size: 0.9rem;
  color: var(--current-text-muted);
  background: var(--current-border);
  padding: 4px 10px;
  border-radius: 12px;
  opacity: 0.6;
}

.version-content {
  color: var(--current-text);
  line-height: 1.6;
}

.version-content h4 {
  color: var(--orange-1);
  font-size: 1rem;
  font-weight: 600;
  margin: 16px 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.version-content h4:before {
  content: "▶";
  font-size: 0.8rem;
  color: var(--orange-2);
}

.version-content ul {
  margin: 8px 0 16px 0;
  padding-left: 0;
  list-style: none;
}

.version-content li {
  margin: 6px 0;
  padding-left: 20px;
  position: relative;
  color: var(--current-text);
  line-height: 1.5;
}

.version-content li:before {
  content: "•";
  color: var(--orange-1);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

.version-content li strong {
  color: var(--current-accent);
  font-weight: 600;
}

.version-content p {
  margin: 8px 0;
  color: var(--current-text);
}

.changelog-error {
  text-align: center;
  padding: 20px;
  color: var(--current-text-muted);
  background: var(--current-surface);
  border-radius: 8px;
  border: 1px solid var(--current-border);
}

.changelog-error i {
  color: var(--orange-1);
  font-size: 1.2rem;
  margin-bottom: 8px;
  display: block;
}

/* ================= STATUS ONLINE DOS USUÁRIOS ================= */
.online-status {
  font-size: 0.7rem;
  margin-right: 6px;
  vertical-align: middle;
}

.online-status.online {
  color: #28a745;
  filter: drop-shadow(0 0 4px #28a745);
}

.online-status.offline {
  color: #6c757d;
}

/* ================= CARDS SEM ANIMAÇÃO ================= */

/* ================= NOTIFICAÇÃO DE MUDANÇAS ================= */
.change-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--surface-color);
  color: var(--text-color);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 4px solid var(--accent-color);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease-out;
  pointer-events: none;
}

.change-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.change-notification i {
  margin-right: 8px;
  color: var(--accent-color);
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}
