:root {
  --bg-page: #f3f7fa;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --sidebar-bg: #0f293a;
  --sidebar-hover: rgba(255, 255, 255, 0.09);
  --sidebar-active: linear-gradient(135deg, #007e76 0%, #0d9488 100%);
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-width: 264px;
  --sidebar-collapsed-width: 78px;
  --brand-primary: #007e76;
  --brand-primary-hover: #00665f;
  --brand-accent: #10b981;
  --text-main: #162a3a;
  --text-muted: #5c7285;
  --border-color: #d8e3ec;
  --border-focus: #007e76;
  --danger-color: #c81e32;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(15, 41, 58, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 41, 58, 0.08);
  font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  font-size: 16px;
  line-height: 1.5;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body.has-sidebar {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   1. ASIDE MENU LATERAL (SIDEBAR) E HEADER DE VISITANTE
   ========================================================================== */
header.app-sidebar {
  background: var(--sidebar-bg);
  color: #f1f5f9;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 4px 0 24px rgba(15, 41, 58, 0.12);
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

body.guest-layout header.app-sidebar {
  width: 100%;
  min-width: 100%;
  height: auto;
  min-height: 76px;
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: #ffffff;
  color: var(--text-main);
  border-right: 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}

body.guest-layout .sidebar-top {
  border-bottom: 0;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
}

body.guest-layout .brand {
  color: #142e45;
  font-size: 24px;
}

.brand span {
  color: #34d399;
}

body.guest-layout .brand span {
  color: var(--brand-primary);
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 126, 118, 0.3);
  transition: transform 0.22s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.05) rotate(-2deg);
}

.sidebar-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.28s ease;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hamburger-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.mobile-nav-open .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.mobile-nav-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
body.mobile-nav-open .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.sidebar-nav-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
  padding: 12px 12px 16px;
  overflow-y: auto;
}

header.app-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

header.app-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}

header.app-sidebar nav a .nav-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

header.app-sidebar nav a:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
  transform: translateX(3px);
}

header.app-sidebar nav a:hover .nav-icon {
  opacity: 1;
  transform: scale(1.08);
}

header.app-sidebar nav a.is-active {
  background: var(--sidebar-active);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 126, 118, 0.35);
}

header.app-sidebar nav a.is-active .nav-icon {
  opacity: 1;
}

/* Rodapé da conta no Aside Menu */
.account {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.account-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  overflow: hidden;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.account-info:hover {
  background: var(--sidebar-hover);
  color: #ffffff;
}

.account-info.is-active {
  background: var(--sidebar-active);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 126, 118, 0.35);
}

.account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #007e76;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account form {
  margin: 0;
  width: 100%;
}

.btn-logout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.28);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-logout:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* Estado Recolhido (Desktop) */
body.sidebar-collapsed header.app-sidebar {
  width: var(--sidebar-collapsed-width);
  min-width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .account-name,
body.sidebar-collapsed .logout-text {
  display: none;
}

body.sidebar-collapsed .sidebar-top {
  flex-direction: column;
  padding: 16px 10px;
  gap: 10px;
}

body.sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed header.app-sidebar nav a {
  justify-content: center;
  padding: 11px;
}

body.sidebar-collapsed .account-info {
  justify-content: center;
  padding: 6px;
}

body.sidebar-collapsed .btn-logout {
  padding: 10px;
}

body.has-sidebar:not(.guest-layout) .app-workspace {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

body.has-sidebar.sidebar-collapsed:not(.guest-layout) .app-workspace {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

/* Tooltip Customizado para o Aside Menu Recolhido */
.sidebar-custom-tooltip {
  position: fixed;
  transform: translateY(-50%) translateX(-4px);
  padding: 7px 12px;
  border-radius: 8px;
  background: #0f293a;
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 22px rgba(15, 41, 58, 0.32);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 3000;
}

.sidebar-custom-tooltip::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right-color: #0f293a;
}

.sidebar-custom-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   2. ÁREA PRINCIPAL DE CONTEÚDO (WORKSPACE) E SUB-ROTAS
   ========================================================================== */
.app-workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

main {
  width: 100%;
  max-width: 1240px;
  margin: 34px auto;
  padding: 0 28px;
  min-height: calc(100vh - 140px);
}

a {
  color: #007e76;
  transition: color 0.15s ease;
}

a:hover {
  color: #005a54;
}

h1 {
  font-size: clamp(24px, 2.5vw, 32px);
  letter-spacing: -0.7px;
  margin: 6px 0 16px;
  color: #0f293a;
}

h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
  color: #162a3a;
  margin-top: 0;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

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

/* Barra de Sub-rotas dos Módulos (Produtos/NCM, Simples, Lucro Real, Planilhador, Empresas, Morpho) */
.subroute-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  margin: 0 0 22px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.subroute-link,
.subroute-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #3b5266;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.subroute-link:hover,
.subroute-nav a:hover {
  background: #eef6f6;
  color: var(--brand-primary);
  border-color: #cde6e4;
}

.subroute-link.is-active,
.subroute-nav a.is-active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(0, 126, 118, 0.25);
}

.subroute-spacer {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subroute-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 16px;
}

.subroute-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #e6f4f2;
  color: #00665f;
  border: 1px solid #b8e1dc;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.15s ease;
}

.subroute-pill:hover {
  background: #d0ece8;
  transform: translateY(-1px);
}

/* ==========================================================================
   3. CARDS, GRIDS E TABELAS
   ========================================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin: 22px 0;
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.metric {
  font-size: 46px;
  font-weight: 800;
  color: #0f293a;
  display: block;
  margin: 6px 0;
}

.auth {
  max-width: 470px;
  margin: 48px auto;
}

.heading, .actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.search input,
.search select {
  max-width: 380px;
  margin: 0;
}

.data-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 24px;
  align-items: start;
}

.data-form > * {
  min-width: 0;
  margin-top: 0;
}

.data-form > p {
  margin: 0 0 4px;
  position: relative;
}

.data-form > .actions,
.data-form > .errorlist {
  grid-column: 1 / -1;
}

.table-wrap,
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5edf3;
  vertical-align: middle;
}

th {
  color: #52697d;
  font-weight: 600;
  background: #f8fbfd;
  white-space: nowrap;
}

tbody tr:hover {
  background: #f9fcfe;
}

/* ==========================================================================
   4. INPUTS, SELECTS, CHECKBOXES MODERNAS E TOOLTIP (?)
   ========================================================================== */
label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13.5px;
  color: #233b4e;
  margin-bottom: 2px;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  font: inherit;
  font-size: 14.5px;
  color: var(--text-main);
  padding: 10.5px 13px;
  border: 1px solid #bacbd7;
  border-radius: var(--radius-sm);
  background: #ffffff;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

textarea {
  resize: vertical;
  min-height: 92px;
  max-height: 440px;
}

input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
  color: #8fa3b5;
  opacity: 1;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3.5px rgba(0, 126, 118, 0.15);
}

/* Estados de Validação Customizada (errorMessage) e Shake Suave */
label.is-label-invalid {
  color: #dc2626 !important;
}

input:not([type="checkbox"]):not([type="radio"]).is-field-invalid,
select.is-field-invalid,
textarea.is-field-invalid {
  border-color: #dc2626 !important;
  background-color: #fffafa;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

input:not([type="checkbox"]):not([type="radio"]).is-field-invalid:focus,
select.is-field-invalid:focus,
textarea.is-field-invalid:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3.5px rgba(220, 38, 38, 0.22);
}

.field-error-message {
  display: block;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  margin-top: -5px;
  margin-bottom: 6px;
}

@keyframes fieldShakeSubtle {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3.5px); }
  80% { transform: translateX(3.5px); }
}

.is-field-shake {
  animation: fieldShakeSubtle 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Checkboxes modernas com animação e visual refinado */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0 4px 0 0;
  border: 1.75px solid #94a9b9;
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2.2px solid #ffffff;
  border-bottom: 2.2px solid #ffffff;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: -1px;
}

input[type="checkbox"]:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 126, 118, 0.1);
}

input[type="checkbox"]:checked {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}

input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3.5px rgba(0, 126, 118, 0.25);
}

label.custom-check-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 7px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

label.custom-check-label:hover {
  background-color: #f1f7fa;
}

/* Ícone '?' e Tooltip Explicativo */
.input-with-tip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 380px;
}

.field-help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  min-width: 17px;
  border-radius: 50%;
  background: #e2eef3;
  color: #0f4c5c;
  border: 1px solid #b8d0dc;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  user-select: none;
  flex-shrink: 0;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.field-help-tip:hover,
.field-help-tip:focus-visible {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  transform: scale(1.08);
  outline: none;
  z-index: 60;
}

.field-help-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #0f293a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 22px rgba(15, 41, 58, 0.25);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 1000;
}

.field-help-tip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f293a;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  z-index: 1001;
}

.field-help-tip:hover::after,
.field-help-tip:focus-visible::after,
.field-help-tip:hover::before,
.field-help-tip:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   5. ACCORDIONS (<details> / <summary>) COM ANIMAÇÃO SUAVE
   ========================================================================== */
details {
  border: 1px solid #dce6ee;
  border-radius: 10px;
  background: #fbfdfe;
  padding: 4px 14px;
  margin: 10px 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

details[open] {
  background: #ffffff;
  border-color: #b9d3e0;
  box-shadow: 0 4px 14px rgba(15, 41, 58, 0.04);
  padding-bottom: 12px;
}

details > summary {
  cursor: pointer;
  padding: 10px 4px;
  font-weight: 600;
  color: #163247;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
  transition: color 0.18s ease;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid #007e76;
  border-bottom: 2px solid #007e76;
  transform: rotate(-45deg);
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 8px;
  flex-shrink: 0;
}

details[open] > summary::before {
  transform: rotate(45deg);
}

details > summary > span:first-child {
  margin-right: auto;
}

details[open] > *:not(summary) {
  animation: accordionSlideDown 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

details.is-closing > *:not(summary) {
  animation: accordionSlideUp 0.22s ease forwards;
}

@keyframes accordionSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes accordionSlideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

details ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 6px;
  padding: 6px 0 0;
  margin: 0;
  list-style: none;
}

details label {
  font-weight: 400;
}

/* ==========================================================================
   6. BOTÕES, UTILITÁRIOS E COMPATIBILIDADE COM TEMPLATES DOS MÓDULOS
   ========================================================================== */
button, .button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10.5px 18px;
  background: var(--brand-primary);
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

button:hover, .button:hover, .btn-primary:hover {
  background: var(--brand-primary-hover);
  color: #ffffff;
}

.quiet, .btn-outline-secondary, .btn-secondary {
  background: #edf3f7;
  color: #2c4456;
  border: 1px solid #d2dfe8;
}

.quiet:hover, .btn-outline-secondary:hover, .btn-secondary:hover {
  background: #dfe9f0;
  color: #162a3a;
}

.btn-outline-primary {
  background: #eef7f6;
  color: var(--brand-primary);
  border: 1px solid #b5deda;
}

.btn-outline-danger, .btn-danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.btn-outline-danger:hover, .btn-danger:hover {
  background: #b91c1c;
  color: #ffffff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  align-items: start;
}
.col-12, .col-md-12 { grid-column: span 12; }
.col-md-7 { grid-column: span 7; }
.col-md-6 { grid-column: span 6; }
.col-md-5 { grid-column: span 5; }
.col-md-4 { grid-column: span 4; }
.col-md-2 { grid-column: span 2; }

.d-flex { display: flex; flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.gap-2 { gap: 10px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 6px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-4 { margin-top: 24px; }
.my-4 { margin: 24px 0; }
.w-100 { width: 100%; }
.text-end { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.fw-semibold, .fw-medium { font-weight: 600; }

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e2eef3;
  color: #163247;
}
.bg-success { background: #d1fae5; color: #065f46; }
.bg-danger { background: #fee2e2; color: #991b1b; }
.bg-secondary { background: #e2e8f0; color: #334155; }

.errorlist {
  color: #a62435;
  font-size: 13.5px;
  list-style: none;
  padding: 0;
  margin: 4px 0;
}

.helptext {
  font-size: 12px;
  color: #62788b;
  display: block;
  margin-top: -4px;
  margin-bottom: 8px;
}

.helptext ul {
  padding-left: 20px;
}

.notice, .alert {
  padding: 14px 18px;
  background: #e2f4ed;
  border: 1px solid #b7e4d3;
  color: #0f5132;
  border-radius: 10px;
  margin: 14px 0;
}

dt {
  font-weight: 600;
  margin-top: 12px;
}

dd {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

footer {
  text-align: center;
  color: #728699;
  font-size: 13px;
  padding: 24px;
  border-top: 1px solid #e4ecf2;
  background: #ffffff;
}

/* ==========================================================================
   7. MODAL DE DOUBLE-CHECK PARA LOGOUT (SAIR)
   ========================================================================== */
.logout-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 41, 58, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.logout-modal-backdrop[hidden] {
  display: none !important;
}

.logout-modal-backdrop.is-open {
  opacity: 1;
}

.logout-modal-card {
  background: #ffffff;
  border-radius: 16px;
  max-width: 430px;
  width: 100%;
  padding: 28px 26px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 41, 58, 0.28);
  border: 1px solid var(--border-color);
  transform: scale(0.95) translateY(8px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.logout-modal-backdrop.is-open .logout-modal-card {
  transform: scale(1) translateY(0);
}

.logout-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-confirm-modal-icon {
  background: #e6f4f2;
  color: #007e76;
}

.logout-modal-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.logout-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ==========================================================================
   8. BOTÕES DE VOLTAR (SUBPÁGINAS) E TELA DE PERFIL DA EMPRESA
   ========================================================================== */
.subpage-back-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.subpage-back-top {
  margin-bottom: 16px;
}

.subpage-back-bottom {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #e2ecf3;
}

.subpage-back-bottom.is-compact-hidden {
  display: none;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8.5px 15px;
  border-radius: 9px;
  background: #ffffff;
  color: #1e3a52;
  border: 1px solid #cad8e4;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(15, 41, 58, 0.05);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease;
}

.btn-back .btn-back-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.btn-back:hover {
  background: #eef6f6;
  color: var(--brand-primary);
  border-color: #9ed4ce;
  box-shadow: 0 3px 10px rgba(0, 126, 118, 0.12);
}

.btn-back:hover .btn-back-icon {
  transform: translateX(-3px);
}

/* Tela de Perfil da Empresa / Conta (Somente Leitura) */
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--sidebar-active);
  color: #ffffff;
  font-size: 25px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 126, 118, 0.25);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-logo-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.profile-logo-field {
  flex: 1 1 280px;
  min-width: 0;
}

.profile-logo-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-title-block {
  min-width: 0;
}

.profile-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px 20px;
  margin: 14px 0 0;
}

.profile-field {
  background: #f8fbfd;
  border: 1px solid #e2ecf3;
  border-radius: 10px;
  padding: 12px 15px;
  min-width: 0;
}

.profile-field-wide {
  grid-column: 1 / -1;
}

.profile-field dt {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5c7285;
}

.profile-field dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #162a3a;
  overflow-wrap: anywhere;
}

.profile-field dd.pre-line {
  white-space: pre-line;
  font-weight: 500;
}

/* ==========================================================================
   9. RESPONSIVIDADE (TABLET E MOBILE — MENU HAMBÚRGUER FULLSCREEN)
   ========================================================================== */
@media (max-width: 1024px) {
  body.has-sidebar {
    flex-direction: column;
  }

  body.has-sidebar:not(.guest-layout) .app-workspace,
  body.has-sidebar.sidebar-collapsed:not(.guest-layout) .app-workspace {
    margin-left: 0 !important;
    width: 100% !important;
  }

  header.app-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    position: sticky;
    top: 0;
    bottom: auto;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .sidebar-top {
    padding: 12px 18px;
    border-bottom: 0;
  }

  .sidebar-collapse-btn {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .sidebar-nav-panel {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: calc(100dvh - 62px);
    background: var(--sidebar-bg);
    z-index: 1500;
    padding: 20px 22px 32px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s ease;
  }

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

  body.mobile-nav-open .sidebar-nav-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  header.app-sidebar nav a {
    font-size: 16px;
    padding: 13px 16px;
  }

  main {
    margin: 22px auto;
    padding: 0 16px;
  }
}

/* ==========================================================================
   10. INPUT[TYPE="FILE"], DROPDOWN CUSTOMIZADO (<SELECT>), FILTROS E PAGINAÇÃO
   ========================================================================== */

/* 10.1 Estilização moderna para input[type="file"] e botão "Escolher arquivo" */
input[type="file"] {
  padding: 7px 12px 7px 8px;
  background: #f8fbfd;
  border: 1.5px dashed #b4c8d8;
  border-radius: 10px;
  color: #3f586d;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="file"]:hover {
  border-color: var(--brand-primary);
  background: #f2f9f8;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7.5px 15px;
  margin-right: 12px;
  border: 1px solid #007e76;
  border-radius: 8px;
  background: linear-gradient(180deg, #008e85 0%, #00736b 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 126, 118, 0.18);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
}

input[type="file"]:hover::file-selector-button,
input[type="file"]:hover::-webkit-file-upload-button {
  background: linear-gradient(180deg, #007971 0%, #005f58 100%);
  border-color: #005f58;
  box-shadow: 0 4px 10px rgba(0, 126, 118, 0.25);
}

input[type="file"]:active::file-selector-button,
input[type="file"]:active::-webkit-file-upload-button {
  transform: translateY(1px);
}

/* 10.2 Select modernizado + Popover customizado para a lista de itens aberta */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23233b4e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
}

select:hover {
  border-color: #89a7ba;
  background-color: #fcfdfe;
}

select.is-custom-select-open {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3.5px rgba(0, 126, 118, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23007e76' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'/%3E%3C/svg%3E");
}

select option {
  padding: 10px 14px;
  background: #ffffff;
  color: #162a3a;
  font-size: 14px;
}

.custom-select-popover {
  position: fixed;
  z-index: 2600;
  background: #ffffff;
  border: 1px solid #c6d8e4;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15, 41, 58, 0.16), 0 3px 10px rgba(15, 41, 58, 0.07);
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.99);
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.15s ease;
}

.custom-select-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.custom-select-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.8px;
  font-weight: 500;
  color: #1e3547;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.13s ease, color 0.13s ease;
}

.custom-select-option:hover,
.custom-select-option.is-highlighted {
  background: #eef7f6;
  color: #00665f;
}

.custom-select-option.is-selected {
  background: #e3f4f2;
  color: #00665f;
  font-weight: 600;
}

.custom-select-option.is-disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.custom-select-check {
  width: 15px;
  height: 15px;
  color: var(--brand-primary);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.custom-select-option.is-selected .custom-select-check {
  opacity: 1;
}

/* 10.3 Filtros estruturados da tela de Divergências Fiscais (/produtos/divergencias/) */
.divergences-filter-form {
  margin: 0;
}

.divergences-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(170px, 1fr) minmax(190px, 1.1fr) auto;
  gap: 14px;
  align-items: start;
}

.divergences-filter-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.divergences-filter-field label {
  margin-bottom: 4px;
}

.divergences-filter-field input,
.divergences-filter-field select,
.divergences-filter-field input:not([type="checkbox"]):not([type="radio"]) {
  margin: 0 !important;
  height: 43px;
  box-sizing: border-box;
}

.divergences-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.divergences-filter-actions button {
  margin: 0;
  height: 43px;
  padding: 0 20px;
}

/* 10.4 Componente padronizado de Paginação de Tabelas (.table-pagination) */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 16px;
  background: #f8fbfd;
  border: 1px solid #e1ebf2;
  border-radius: 10px;
}

.card.table-wrap > .table-pagination,
.card > .table-pagination {
  margin-top: 16px;
}

.table-pagination-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.2px;
  color: #4b6376;
}

.table-pagination-info strong {
  color: #162a3a;
  font-weight: 600;
}

.table-pagination-divider {
  color: #b0c4d4;
}

.table-pagination-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.table-pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.table-pagination-size-label {
  font-size: 12.8px;
  font-weight: 600;
  color: #4b6376;
  margin: 0;
  white-space: nowrap;
}

select.pagination-per-page-select {
  width: auto;
  min-width: 124px;
  margin: 0;
  padding: 6.5px 34px 6.5px 11px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border-color: #c5d6e2;
  background-color: #ffffff;
}

.table-pagination-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn,
.pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid #cbd9e4;
  background: #ffffff;
  color: #1e3a52;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.pagination-page {
  min-width: 34px;
  padding: 6px 9px;
}

a.pagination-btn:hover,
a.pagination-page:hover {
  background: #eef7f6;
  color: var(--brand-primary);
  border-color: #9ad1cb;
  text-decoration: none;
}

.pagination-page.is-active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 6px rgba(0, 126, 118, 0.22);
}

.pagination-btn.is-disabled {
  opacity: 0.48;
  background: #f3f7fa;
  color: #7c93a6;
  border-color: #dce6ee;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 900px) {
  .divergences-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
  .divergences-filter-actions {
    grid-column: 1 / -1;
  }
  .divergences-filter-actions button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .divergences-filter-grid {
    grid-template-columns: 1fr;
  }
  .table-pagination {
    flex-direction: column;
    align-items: stretch;
  }
  .table-pagination-controls {
    justify-content: space-between;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .grid,
  .data-form {
    grid-template-columns: 1fr;
  }

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

  .col-12, .col-md-12, .col-md-7, .col-md-6, .col-md-5, .col-md-4, .col-md-2 {
    grid-column: 1 / -1;
  }

  .card {
    padding: 18px 16px;
    margin: 16px 0;
  }

  .heading,
  .actions,
  .search {
    flex-direction: column;
    align-items: stretch;
  }

  .search input,
  .search select,
  .input-with-tip {
    max-width: 100%;
    width: 100%;
  }

  .subroute-nav {
    padding: 8px;
    gap: 6px;
  }

  .subroute-link,
  .subroute-nav a {
    font-size: 12.5px;
    padding: 6px 10px;
  }

  .subroute-spacer {
    margin-left: 0;
    width: 100%;
  }

  th, td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .field-help-tip::after {
    left: auto;
    right: -10px;
    transform: translateY(4px);
    max-width: 220px;
  }

  .field-help-tip:hover::after,
  .field-help-tip:focus-visible::after {
    transform: translateY(0);
  }
}

/* ==========================================================================
   11. BANNER GOOGLE ADS (EXCLUSIVO FREEMIUM) & PLANOS / FATURAMENTO
   ========================================================================== */
.t360-ad-banner {
  width: 100%;
  max-width: 760px;
  margin: 12px auto 16px;
  padding: 0 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.t360-ad-placeholder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px dashed #b9c9d8;
  background: #f8fbfd;
  font-size: 12.5px;
  color: #4f667a;
}

.t360-ad-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5eff8;
  color: #16486d;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.t360-ad-copy a {
  font-weight: 600;
}

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.billing-metric-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #dce6ef;
  background: #f9fcff;
}

.billing-metric-label {
  font-size: 12px;
  color: #5c7285;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.billing-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: #12293a;
  margin: 4px 0;
}

.billing-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e5edf4;
  overflow: hidden;
  margin: 8px 0 4px;
}

.billing-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1b6ca8, #14967f);
  border-radius: 999px;
}

.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.plan-card {
  border: 1px solid #dce6ef;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.plan-card.is-current {
  border-color: #1b6ca8;
  box-shadow: 0 0 0 2px rgba(27, 108, 168, 0.12);
  background: #f6fbff;
}

.plan-card-price {
  font-size: 22px;
  font-weight: 800;
  color: #0f293a;
}

.plan-card-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #364e62;
  line-height: 1.5;
}

.user-add-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
  margin: 12px 0 18px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #e1eaf2;
  background: #f9fcff;
}

.user-add-form > p {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-add-form > p > label {
  line-height: 21px;
  min-height: 21px;
  margin-bottom: 4px;
}

.user-add-form > p > input,
.user-add-form > p > select,
.user-add-form > p > input[type="file"] {
  height: 43px;
  margin: 0 !important;
  box-sizing: border-box;
}

.user-add-form > p > input[type="file"] {
  padding: 6px 10px;
}

.user-add-form > div {
  padding-top: 25px;
}

.user-add-form > div > button {
  height: 43px;
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .t360-ad-banner {
    max-width: 100%;
    padding: 0 12px;
    margin: 8px auto 12px;
  }

  .t360-ad-placeholder {
    font-size: 12px;
    padding: 8px 10px;
  }

  .user-add-form > div {
    padding-top: 0;
  }
}

/* ==========================================================================
   12. NOTIFICAÇÕES NO RODAPÉ DA SIDEBAR & BARRAS DE ROLAGEM GLASSMORPHISM
   ========================================================================== */
.account-notif-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  color: rgba(232, 242, 250, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  box-sizing: border-box;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.account-notif-link:hover,
.account-notif-link.is-active {
  background: rgba(20, 150, 127, 0.22);
  border-color: rgba(20, 150, 127, 0.55);
  color: #ffffff;
}

.account-notif-link .nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.notif-pill-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Glassmorphism Scrollbars globais (WebKit + Firefox) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 41, 58, 0.28) rgba(255, 255, 255, 0.35);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(15, 41, 58, 0.26), rgba(20, 150, 127, 0.34));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(15, 41, 58, 0.45), rgba(20, 150, 127, 0.58));
}

/* Variante dark-glass para a barra lateral */
header.app-sidebar *,
header.app-sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.04);
}

header.app-sidebar::-webkit-scrollbar,
header.app-sidebar *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

header.app-sidebar::-webkit-scrollbar-track,
header.app-sidebar *::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

header.app-sidebar::-webkit-scrollbar-thumb,
header.app-sidebar *::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

header.app-sidebar::-webkit-scrollbar-thumb:hover,
header.app-sidebar *::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 150, 127, 0.6);
}
