:root {
  --app-blue: #0d6efd;
  --app-blue-700: #0b5ed7;
  --app-cyan: #06b6d4;
  --app-slate: #0f172a;
  --app-muted: #64748b;
  --app-bg: #f4f8fc;
  --app-line: #dbeafe;
  --app-header-h: 76px;
  --app-bottom-h: 72px;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef7fb 100%);
  color: var(--app-slate);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1040;
  min-height: var(--app-header-h);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--app-blue), var(--app-cyan));
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 12px 26px rgba(13, 110, 253, 0.22);
}

.nav-pills .nav-link {
  border: 1px solid var(--app-line);
  background: #fff;
  color: #1e293b;
  font-weight: 700;
  border-radius: 999px;
  transition: all 0.18s ease-in-out;
}

.nav-pills .nav-link:hover {
  transform: translateY(-1px);
  background: #eff6ff;
}

.nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--app-blue), var(--app-cyan));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(13, 110, 253, 0.2);
}

.page-host {
  min-height: calc(100vh - var(--app-header-h));
}

.page-section {
  padding: 1rem;
}

@media (min-width: 992px) {
  .page-section {
    padding: 1.25rem 1.5rem;
  }
}

.app-card {
  border: 1px solid var(--app-line);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.app-card-hover {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.app-card-hover:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.btn {
  font-weight: 700;
  border-radius: 0.85rem;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.98) !important;
}

.btn-app-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--app-blue), var(--app-cyan));
  border: 0;
  box-shadow: 0 10px 22px rgba(13, 110, 253, 0.22);
}
.btn-app-primary:hover {
  color: #fff;
  filter: brightness(0.98);
}

.form-select,
.form-control {
  border-color: #cfe3ff;
  border-radius: 0.9rem;
  min-height: 44px;
  font-weight: 650;
}
.form-select:focus,
.form-control:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.12);
}

.kpi-card {
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  height: 100%;
}
.kpi-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 0.9rem;
  background: #eff6ff;
  color: var(--app-blue);
}
.kpi-card small {
  color: var(--app-muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.kpi-card strong {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

/* Upload */
.upload-hero {
  max-width: 980px;
  margin-inline: auto;
}
.dropzone {
  border: 2px dashed #93c5fd;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #fff, #f8fbff);
  min-height: 260px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--app-blue);
  background: #eff6ff;
  transform: translateY(-2px);
}
.dropzone-icon {
  width: 70px;
  height: 70px;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, var(--app-blue), var(--app-cyan));
  color: #fff;
  font-size: 2rem;
}

/* Tabela full page */
.table-page {
  height: calc(100vh - var(--app-header-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem;
}
.table-appbar {
  flex: 0 0 auto;
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  padding: 0.6rem;
}
.table-shell {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.75rem;
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.table-responsive-full {
  height: 100%;
  overflow: auto;
}
.audit-table {
  min-width: 1380px;
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.audit-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, #1e40af, #1d4ed8);
  color: #fff;
  white-space: nowrap;
  font-size: 0.78rem;
  height: 44px;
  padding: 0.65rem 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
}
.audit-table tbody td {
  vertical-align: middle;
  height: 48px;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.86rem;
}
.audit-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
.audit-table tbody tr {
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}
.audit-table tbody tr:hover {
  background: #eaf3ff;
  box-shadow: inset 4px 0 0 var(--app-blue);
}
.audit-table tr.row-non-worked {
  background: #fbfdff !important;
  opacity: 0.58;
}
.audit-table tr.row-non-worked:hover {
  opacity: 0.92;
  background: #eef6ff !important;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
}
.pill-scale {
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #1d4ed8;
}
.pill-regime {
  border: 1px solid #bae6fd;
  background: #e0f2fe;
  color: #075985;
}
.pill-adjusted {
  border: 1px solid #fb923c;
  background: #fff7ed;
  color: #ea580c;
}
.pill-success {
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #166534;
}
.pill-muted {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border: 1px solid #cfe3ff;
  border-radius: 0.95rem;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #dbe3ee;
  position: relative;
  transition: background 0.18s ease;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  transition: transform 0.18s ease;
}
.toggle-switch input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--app-blue), var(--app-cyan));
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.floating-search {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1030;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--app-line);
  background: #fff;
  color: #0f172a;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}
.search-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5rem;
  z-index: 1030;
  width: min(420px, calc(100vw - 2rem));
  display: none;
}
.search-panel.show {
  display: block;
}

/* Bottom nav mobile */
.bottom-nav {
  height: var(--app-bottom-h);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}
.bottom-link {
  text-decoration: none;
  color: #475569;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
}
.bottom-link i {
  font-size: 1.2rem;
}
.bottom-link.active {
  color: var(--app-blue);
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: var(--app-bottom-h);
  }
  .table-page {
    height: calc(100vh - var(--app-header-h) - var(--app-bottom-h));
  }
  .brand small {
    display: none;
  }
}

.help-section h2,
.params-section h2 {
  letter-spacing: -0.03em;
}
.rule-block {
  border-left: 4px solid var(--app-blue);
  padding-left: 1rem;
}
.old-value {
  color: #dc3545;
  text-decoration: line-through;
  font-weight: 700;
}
.new-value {
  color: #198754;
  font-weight: 900;
}

/* V2 — Upload wide, processamento legado e parâmetros robustos */
.upload-page-v2 {
  min-height: calc(100vh - var(--app-header-h));
  display: flex;
  align-items: stretch;
}
.upload-main-card {
  min-height: calc(100vh - var(--app-header-h) - 2.5rem);
}
.v2-step {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.v2-step:last-of-type {
  border-bottom: 0;
}
.v2-step > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #0d6efd;
  font-weight: 900;
}
.v2-step p {
  margin: 0.25rem 0 0;
  color: #64748b;
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.processing-overlay:not(.d-none) {
  display: flex !important;
}
.processing-card {
  width: min(520px, 96vw);
  border-radius: 1.4rem;
  background: #fff;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}
.param-group-icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  color: #0d6efd;
  font-size: 1.45rem;
  flex: 0 0 48px;
}
.param-field-card {
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  transition: all 0.18s ease-in-out;
}
.param-field-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.params-section .tooltip-inner {
  max-width: 340px;
  text-align: left;
}
@media (min-width: 992px) {
  .upload-page-v2 .container-fluid {
    display: flex;
    flex-direction: column;
  }
}

/* V2.1 — camada legada oculta e estados vazios */
#legacyCompatLayer {
  display: none !important;
}
.audit-table tbody td[colspan] {
  height: 240px;
  font-size: 1rem;
}

/* V3 — processamento Bootstrap próprio */
body[data-route="upload"] .page-host {
  min-height: calc(100vh - var(--app-header-h));
}
.processing-card .progress {
  height: 0.65rem;
  border-radius: 999px;
}

/* V4 — cache opcional e filtros mais leves */
.cache-consent-card {
  border: 1px solid #bfdbfe;
  border-radius: 1.25rem;
  padding: 1rem;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}
.cache-consent-icon {
  width: 44px;
  height: 44px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0d6efd;
  color: #fff;
  box-shadow: 0 12px 24px rgba(13, 110, 253, 0.2);
  flex: 0 0 44px;
}
.table-appbar-clean {
  padding: 0.55rem 0.75rem;
}
.table-appbar-clean .input-group-text {
  background: #fff;
  color: #0d6efd;
  border-color: #dbeafe;
  font-weight: 800;
}
.table-appbar-clean .form-select {
  border-color: #dbeafe;
  font-weight: 700;
}
.appbar-filter-type {
  width: 260px;
}
.appbar-filter-value {
  min-width: 320px;
}
.appbar-toggle {
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #fff;
}
.appbar-mode {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 800;
}
.audit-table tbody tr {
  transition:
    background-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}
.audit-table tbody tr:hover {
  background: #eef6ff !important;
  box-shadow: inset 3px 0 0 #0d6efd;
}
.audit-table tbody tr.row-non-worked {
  opacity: 0.72;
  background: #f8fafc !important;
}
@media (max-width: 992px) {
  .appbar-filter-type,
  .appbar-filter-value {
    width: 100%;
    min-width: 0;
  }
}

/* V5 — tabela em linha única, exportação e parâmetros em colunas */
.table-filter-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  width: 100%;
}
.table-filter-row .appbar-filter-type {
  flex: 0 0 230px;
  width: 230px;
}
.table-filter-row .appbar-filter-value {
  flex: 1 1 auto;
  min-width: 280px;
}
.table-filter-row .appbar-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}
.table-filter-row .appbar-mode {
  flex: 0 0 auto;
  white-space: nowrap;
}
.table-filter-row .appbar-clear {
  flex: 0 0 auto;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 800;
}
.audit-table.table tbody tr:hover > td,
.audit-table tbody tr:hover > td {
  background: #eaf4ff !important;
}
.audit-table.table tbody tr:hover {
  cursor: default;
}
.pill-regime {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}
.params-columns .param-category-card {
  display: flex;
  flex-direction: column;
}
.param-category-card .param-field-card {
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: 1rem;
  background: #fff;
}
.export-page .kpi-card {
  min-height: 130px;
}
@media (max-width: 1100px) {
  .table-filter-row {
    flex-wrap: wrap;
  }
  .table-filter-row .appbar-filter-type,
  .table-filter-row .appbar-filter-value {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* V6 — Regime com siglas BH/HE e Ajuda de Custo correta */
.pill-regime-bh {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}
.pill-regime-he {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.pill-regime-escala {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}
.pill-regime-muted {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* V7 — Exportações funcionais */
.export-filter-card .form-select,
.export-filter-card .toggle-switch {
  min-height: 46px;
}
.export-page .btn {
  transition:
    transform 0.18s ease-in-out,
    box-shadow 0.18s ease-in-out,
    opacity 0.18s ease-in-out;
}
.export-page .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.12);
}
.export-page .btn:active {
  transform: scale(0.98);
}

/* V8 — XLSX formatado com abas originais */
.export-page .alert-info strong {
  color: #075985;
}

/* V9 — Tabela e XLSX refinados */
.audit-table thead th {
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
  vertical-align: middle;
}
.audit-table thead th[draggable="true"] {
  cursor: grab;
}
.audit-table thead th.dragging {
  opacity: 0.55;
}
.audit-table thead th.drag-over {
  outline: 2px dashed #93c5fd;
  outline-offset: -4px;
  background: #1d4ed8 !important;
}
.column-drag-handle {
  opacity: 0.45;
  margin-left: 0.45rem;
  font-size: 0.85rem;
}
.audit-table tbody tr.row-adjusted > td {
  background: #fff7ed !important;
  border-top: 1px solid #fdba74;
  border-bottom: 1px solid #fdba74;
}
.audit-table tbody tr.row-adjusted:hover > td {
  background: #ffedd5 !important;
}
.pill-adjusted {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fb923c;
  font-weight: 900;
}
.pill-scale-1236 {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.pill-scale-2472 {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.pill-scale-flex {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.pill-scale-padrao {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.dept-hover {
  cursor: help;
  text-decoration: underline dotted rgba(71, 85, 105, 0.45);
  text-underline-offset: 3px;
}
.search-panel.show {
  display: block;
}

/* V10 — refinamentos de tabela e filtros */
.audit-table th,
.audit-table td {
  border-right: 1px dashed rgba(148, 163, 184, 0.36);
}
.audit-table th:last-child,
.audit-table td:last-child {
  border-right: 0;
}
.audit-table tbody tr:hover td {
  background: #eff6ff !important;
  box-shadow:
    inset 0 1px 0 rgba(37, 99, 235, 0.08),
    inset 0 -1px 0 rgba(37, 99, 235, 0.08);
}
.export-filter-card select[multiple],
.table-appbar select[multiple] {
  min-height: 42px;
  padding-block: 0.35rem;
}
.param-category-card .param-field-card:has(label)::before {
  content: "";
}

/* V11 — ajustes finais de parâmetros, tabela e filtros */
.appbar-filter-menu {
  width: min(520px, 92vw);
  max-height: 380px;
  overflow: auto;
  border: 1px solid #dbeafe;
  border-radius: 16px;
}
.filter-check-list {
  display: grid;
  gap: 2px;
  max-height: 285px;
  overflow: auto;
}
.filter-check-item {
  border-radius: 10px;
  font-weight: 700;
}
.filter-check-item:hover {
  background: #eff6ff;
}
.column-filter-row th {
  background: #f8fbff !important;
  padding: 0.35rem 0.45rem !important;
  border-bottom: 1px solid #bfdbfe !important;
}
.column-filter {
  min-width: 92px;
  font-size: 0.76rem;
  border-radius: 10px;
}
.audit-table thead tr:first-child th {
  border-right: 1px dashed rgba(255, 255, 255, 0.42) !important;
}
.audit-table tbody td {
  border-right: 1px dashed #dbeafe !important;
}
.audit-table tbody tr:hover td {
  background: #eaf4ff !important;
}
.pill-adjusted-clean {
  font-size: 0.68rem !important;
  padding: 0.16rem 0.42rem !important;
  border-radius: 999px !important;
  line-height: 1.1;
  vertical-align: middle;
}
.params-section .param-field-card {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 1rem;
  transition: 0.18s ease-in-out;
}
.params-section .param-field-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}
.params-section .info-param {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.params-section .hhmm-badge {
  font-weight: 800;
}

/* V12 — ajustes HR e parâmetros recalculáveis */
#hrOwnFilterValue,
#exportFilterValue {
  min-height: 96px;
}
#hrOwnFilterBox {
  border-color: #dbeafe !important;
}

/* V13 — tabela sem filtros por coluna e hover reforçado */
.audit-table thead tr.column-filter-row {
  display: none !important;
}
.audit-table tbody tr:hover > td {
  background: #eaf4ff !important;
  box-shadow:
    inset 0 1px 0 #bfdbfe,
    inset 0 -1px 0 #bfdbfe;
}

/* V14 — navegação bloqueada até o processamento */
.nav-locked {
  opacity: 1;
}
#desktopNav .d-none,
#bottomNav .d-none {
  display: none !important;
}

/* V16 - correcoes runtime de Tabela e Exportar */
.audit-table thead tr.column-filter-row {
  display: none !important;
}
.audit-table tbody tr:hover > td {
  background: #eaf4ff !important;
}

/* V17 — filtro de exportação */
.export-filter-card #btnClearExportFilter {
  border-radius: 999px;
  font-weight: 700;
}

/* V19 — cards compactos de totais na exportação */
.export-totals-card .mini-total {
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  padding: 0.75rem 0.9rem;
  background: #fff;
  min-height: 72px;
}
.export-totals-card .mini-total span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.02em;
}
.export-totals-card .mini-total strong {
  display: block;
  font-size: 1.05rem;
  color: #0f172a;
  margin-top: 0.2rem;
  white-space: nowrap;
}
.export-totals-card .mini-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
}
.export-totals-card .mini-groups div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px dashed #dbeafe;
  padding: 0.15rem 0;
}
.export-totals-card .mini-groups span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
}
.export-totals-card .mini-groups strong {
  white-space: nowrap;
  color: #0f172a;
}
@media (max-width: 768px) {
  .export-totals-card .mini-groups {
    grid-template-columns: 1fr;
  }
}

/* V20 — Exportar: cards compactos e resumo em expander */
.export-page .export-totals-card {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.mini-total {
  min-height: 72px;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
}
.mini-total span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #64748b;
}
.mini-total strong {
  font-size: 1.15rem;
  color: #0f172a;
}
.mini-total-primary {
  background: #eff6ff;
}
.mini-total-success {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.mini-total-warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.export-mini-groups-centered {
  max-width: 920px;
  margin-inline: auto;
}
.export-summary-accordion .accordion-button {
  border-radius: 1.25rem !important;
  box-shadow: none;
}
.export-summary-accordion .accordion-button:not(.collapsed) {
  color: #0f172a;
  background: #f8fbff;
}
.export-mini-kpi {
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #fff;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.export-mini-kpi i {
  font-size: 1.35rem;
}
.export-mini-kpi span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #64748b;
}
.export-mini-kpi strong {
  font-size: 1.35rem;
  line-height: 1;
  color: #0f172a;
}

/* V20 — assinatura centralizada na página de ajuda */
.help-signature-footer {
  padding-bottom: calc(var(--app-bottom-h, 72px) + 1rem);
}

/* V21 — correções Exportar/Help */
.export-summary-accordion .accordion-item {
  border-radius: 1.25rem;
}
.export-summary-accordion .accordion-button {
  border-radius: 1.25rem !important;
  box-shadow: none;
}
.export-summary-accordion .accordion-button:not(.collapsed) {
  background: #f8fbff;
  color: #0f172a;
}
.export-mini-kpi {
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #fff;
  padding: 0.85rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.export-mini-kpi i {
  font-size: 1.35rem;
}
.export-mini-kpi span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #64748b;
}
.export-mini-kpi strong {
  font-size: 1.35rem;
  line-height: 1;
  color: #0f172a;
}
.help-signature-footer {
  padding-bottom: calc(var(--app-bottom-h, 72px) + 1rem);
}

/* V22 — Exportar: resumo único em expander, cards isonômicos e sem duplicidade */
.export-summary-accordion .accordion-body {
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}
.export-totals-panel {
  max-width: 1180px;
  margin-inline: auto;
}
.export-summary-card {
  min-height: 96px;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}
.export-summary-card i {
  font-size: 1.45rem;
}
.export-summary-card span {
  min-height: 2.15em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  font-weight: 800;
  color: #64748b;
}
.export-summary-card strong {
  font-size: 1.45rem;
  line-height: 1;
  color: #0f172a;
}
.export-summary-card-success {
  border-color: #bbf7d0;
  background: #f7fff9;
}
.export-summary-card-warning {
  border-color: #fde68a;
  background: #fffdf3;
}
.export-summary-card-primary {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.export-mini-groups-centered div {
  grid-template-columns: minmax(220px, 1fr) auto;
}
@media (max-width: 768px) {
  .export-mini-groups-centered div {
    grid-template-columns: 1fr;
  }
}

/* V23 — Exportar wide com estatísticas unificadas no expander */
.export-page > .container-fluid {
  max-width: none;
  padding-left: clamp(1rem, 2vw, 2rem);
  padding-right: clamp(1rem, 2vw, 2rem);
}
.export-summary-accordion {
  width: 100%;
}
.export-summary-accordion .accordion-item {
  border-radius: 1.25rem;
}
.export-summary-accordion .accordion-body {
  padding: clamp(1rem, 2vw, 2rem);
}
.export-totals-panel {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
}
.export-summary-card {
  min-height: 112px;
  height: 100%;
}
.export-summary-card span {
  min-height: 2.45em;
}
.export-group-results {
  max-width: 980px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
}
.export-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.58rem 0.75rem;
  border: 1px dashed #cfe2ff;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.82);
}
.export-group-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}
.export-group-row strong {
  white-space: nowrap;
  color: #0f172a;
}
@media (max-width: 992px) {
  .export-group-results {
    grid-template-columns: 1fr;
  }
}

/* V24 — Exportar: estatísticas agrupadas sem select bugado */
.export-grouped-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.export-group-section {
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}
.export-group-card {
  height: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}
.export-group-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.1);
}
.export-group-card-title {
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.7rem;
}
.export-group-card-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  font-size: 0.9rem;
}
.export-group-card-grid span {
  color: #64748b;
}
.export-group-card-grid strong {
  color: #0f172a;
  text-align: right;
}
.help-signature {
  font-size: 0.9rem;
  color: #64748b;
}
.help-signature a {
  font-weight: 800;
  color: #0d6efd;
  text-decoration: none;
}
.help-signature a:hover {
  text-decoration: underline;
}

/* V25 — Exportar: expander wide com abas e cards Bootstrap */
.export-summary-wide {
  max-width: none;
  width: 100%;
}
.export-summary-wide .accordion-body {
  padding: clamp(1rem, 2.2vw, 2.2rem);
}
.export-totals-wide {
  max-width: none;
  width: 100%;
}
.export-stats-tabs {
  gap: 0.5rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 0.35rem;
  background: #f8fbff;
  width: fit-content;
  max-width: 100%;
}
.export-stats-tabs .nav-link {
  border-radius: 999px;
  font-weight: 800;
  color: #334155;
}
.export-stats-tabs .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #0d6efd, #06b6d4);
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.22);
}
.export-stat-card {
  border: 1px solid #dbeafe !important;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}
.export-stat-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd !important;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.13) !important;
}
.export-stat-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.export-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.export-stat-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.7rem 0.75rem;
  background: #fff;
}
.export-stat-grid span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}
.export-stat-grid strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  margin-top: 0.15rem;
}
@media (max-width: 768px) {
  .export-stats-tabs {
    border-radius: 1rem;
  }
  .export-stats-tabs .nav-link {
    width: 100%;
  }
  .export-stat-grid {
    grid-template-columns: 1fr;
  }
}

/* V26 — Exportar: cards mais discretos, filtro explicativo e assinatura única */
.export-mini-cards .export-summary-card {
  min-height: 96px;
  padding: 1rem;
  box-shadow: none;
  background: #ffffff;
}
.export-mini-cards .export-summary-card i {
  font-size: 1.3rem;
}
.export-mini-cards .export-summary-card span {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.export-mini-cards .export-summary-card strong {
  font-size: 1.25rem;
}
.export-filter-card {
  border-radius: 1.25rem;
}
.export-filter-placeholder {
  min-height: 86px;
  border: 1px dashed #bfdbfe;
  border-radius: 0.9rem;
  background: #f8fbff;
  color: #64748b;
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
}
.export-filter-value {
  min-height: 86px;
}
.export-worked-toggle {
  min-height: 38px;
  justify-content: center;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  padding: 0.42rem 0.65rem;
  background: #fff;
}
.export-filter-result {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #334155;
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}
.help-signature {
  position: sticky;
  bottom: 1rem;
  z-index: 5;
}
.help-signature .rounded-pill,
.help-signature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* V27 — Correções finais Exportar/Help */
.export-mini-cards .export-summary-card {
  min-height: 96px;
  padding: 1rem;
  box-shadow: none;
  background: #ffffff;
}
.export-mini-cards .export-summary-card i {
  font-size: 1.3rem;
}
.export-mini-cards .export-summary-card span {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.export-mini-cards .export-summary-card strong {
  font-size: 1.25rem;
}

.export-filter-card {
  border-radius: 1.25rem;
}
.export-filter-card .form-text {
  font-size: 0.78rem;
  color: #64748b;
}
.export-filter-placeholder {
  min-height: 86px;
  border: 1px dashed #bfdbfe;
  border-radius: 0.9rem;
  background: #f8fbff;
  color: #64748b;
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
}
.export-filter-value {
  min-height: 86px;
}
.export-worked-toggle {
  min-height: 38px;
  justify-content: center;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  padding: 0.42rem 0.65rem;
  background: #fff;
}
.export-filter-result {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #334155;
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

/* V28 — Assinatura no fluxo da página e multiselect amigável */
.help-page,
.help-section {
  min-height: calc(100vh - 110px);
  padding-bottom: 2rem;
}
.help-signature-footer {
  position: static;
  transform: none;
  margin: 3rem auto 0;
  text-align: center;
}
.help-signature-pill {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.export-check-dropdown .dropdown-menu {
  width: 100%;
  max-height: 320px;
  overflow: hidden;
}
.export-check-button {
  min-height: 44px;
  background: #fff;
}
.export-check-menu {
  border: 1px solid #bfdbfe;
  border-radius: 0.9rem;
}
.export-check-list {
  max-height: 250px;
  overflow: auto;
  padding: 0.35rem;
}
.export-check-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 0.65rem;
  padding: 0.55rem 0.65rem;
}
.export-check-item:hover {
  background: #eff6ff;
}
.export-check-item .form-check-input {
  flex: 0 0 auto;
}
.export-filter-row {
  justify-content: flex-end;
}

/* V29 — dropdown multiseleção sem fechar após marcação */
.export-check-dropdown .dropdown-menu.show {
  display: block;
}
.export-check-menu {
  z-index: 1060;
}
.export-filter-result {
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}


/* TOTVS/PROTHEUS - página pós-upload */
.totvs-page .totvs-hero{
  background: linear-gradient(135deg, rgba(37,99,235,.045), rgba(20,184,166,.04)), #fff;
}
.totvs-page .totvs-card-clean{
  padding: .9rem 1.05rem;
  border-radius: 1rem;
  box-shadow: 0 8px 18px rgba(15,23,42,.025);
}
.totvs-hero-compact{
  display:flex;
  align-items:center;
  gap:.85rem;
}
.totvs-hero-mark{
  width:2.5rem;
  height:2.5rem;
  border-radius:.85rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, #2563eb, #06b6d4);
  color:#fff;
  flex:0 0 auto;
}
.totvs-kicker{
  display:block;
  color:#0d47a1;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  margin-bottom:.15rem;
}
.totvs-hero-title{max-width: 900px;}
.totvs-page .app-card{
  box-shadow: 0 8px 22px rgba(15,23,42,.035);
}
.totvs-workspace-toggle{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:1rem;
  flex-wrap:wrap;
}
.totvs-tab-nav{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  padding:.45rem;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#fff;
  box-shadow:0 10px 22px rgba(15,23,42,.035);
}
.totvs-tab-btn{
  border:0;
  background:transparent;
  border-radius:999px;
  padding:.65rem 1.05rem;
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  color:#334155;
  font-weight:900;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.totvs-tab-btn small{
  color:#64748b;
  font-weight:800;
  margin-left:.2rem;
}
.totvs-tab-btn:hover{
  background:#f8fbff;
  transform:translateY(-1px);
}
.totvs-tab-btn.active{
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  color:#fff;
  box-shadow:0 10px 22px rgba(37,99,235,.20);
}
.totvs-tab-btn.active small{
  color:rgba(255,255,255,.86);
}
.totvs-columns-toggle{
  display:inline-flex;
  align-items:center;
  cursor:pointer;
  user-select:none;
}
.totvs-columns-toggle input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.totvs-columns-toggle span{
  display:inline-flex;
  align-items:center;
  border:1px solid #dbeafe;
  border-radius:999px;
  padding:.65rem 1rem;
  background:#fff;
  color:#334155;
  font-weight:900;
  box-shadow:0 10px 22px rgba(15,23,42,.03);
}
.totvs-columns-toggle input:checked + span{
  color:#0d6efd;
  border-color:#93c5fd;
  background:#eff6ff;
}
.totvs-tab-panels .totvs-panel{
  max-width:1120px;
  margin:0 auto;
}
.totvs-two-columns{
  display:grid;
  grid-template-columns:minmax(0, 1.08fr) minmax(360px, .92fr);
  gap:1.25rem;
  align-items:start;
}
.totvs-hr-card .totvs-card-header{
  display:grid;
  grid-template-columns: minmax(0,1fr) minmax(260px, 330px);
  gap: 1rem;
  align-items:start;
}
.totvs-card-heading{
  display:flex;
  align-items:flex-start;
  gap:.75rem;
}
.totvs-file-icon{
  width:2.4rem;
  height:2.4rem;
  border-radius:.8rem;
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#15803d;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.totvs-format-box{
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: .75rem;
}
.totvs-format-box .btn-group .btn{
  font-weight: 800;
  padding:.5rem .65rem;
}
.totvs-filter-grid{
  display:grid;
  grid-template-columns: minmax(280px, 430px) minmax(190px, 260px) minmax(300px, 1fr);
  gap:1rem;
  align-items:start;
}
.totvs-field-wide{
  grid-column:auto;
}
.totvs-two-columns .totvs-hr-card .totvs-card-header,
.totvs-two-columns .totvs-filter-grid{
  grid-template-columns:1fr;
}
.totvs-two-columns .totvs-field-wide{
  grid-column:auto;
}
.totvs-context-banner{
  display:flex;
  gap:.65rem;
  align-items:center;
  border-radius: .95rem;
  padding: .65rem .8rem;
  border: 1px solid #dbeafe;
  background:#f8fbff;
}
.totvs-context-banner.is-success{border-color:#bbf7d0;background:#f0fdf4;}
.totvs-context-banner.is-warning{border-color:#fde68a;background:#fffbeb;}
.totvs-context-banner.is-info{border-color:#bae6fd;background:#f0f9ff;}
.totvs-context-banner.is-primary{border-color:#c7d2fe;background:#eef2ff;}
.totvs-context-banner.is-secondary{border-color:#e2e8f0;background:#f8fafc;}
.totvs-context-icon{
  width:2rem;
  height:2rem;
  border-radius:.7rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  color:#0f172a;
  flex:0 0 auto;
}
.totvs-context-content{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.35rem .6rem;
  color:#475569;
  font-size:.93rem;
}
.totvs-context-content strong{color:#0f172a;}
.totvs-download-strip{
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border-radius: 1.1rem;
  padding: 1rem;
}
.totvs-main-download{
  min-width: 280px;
  padding-inline: 1.35rem;
  box-shadow: 0 12px 22px rgba(37,99,235,.18);
}
.totvs-summary-card{
  overflow:hidden;
}
.totvs-summary-pill{
  border:1px solid #dbeafe;
  background:#f8fbff;
  color:#0d47a1;
  border-radius:999px;
  padding:.35rem .65rem;
  font-size:.78rem;
  font-weight:900;
  white-space:nowrap;
}
.totvs-metrics-panel{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:.6rem;
}
.totvs-two-columns .totvs-metrics-panel{
  grid-template-columns:1fr;
}
.totvs-metric-item{
  border:1px solid #e2e8f0;
  border-radius:1rem;
  background:#fff;
  overflow:hidden;
}
.totvs-metric{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  align-items:flex-start;
  width:100%;
  padding:.8rem .95rem;
  background:transparent;
  border:0;
  text-align:left;
}
.totvs-metric:hover{background:#f8fbff;}
.totvs-metric span{
  display:flex;
  flex-direction:column;
  gap:.15rem;
}
.totvs-metric span small{
  color:#64748b;
  font-size:.79rem;
  font-weight:700;
}
.totvs-metric span b{
  color:#0f172a;
  font-size:.96rem;
  font-weight:700;
}
.totvs-metric strong{
  font-size:1.02rem;
  color:#0f172a;
  text-align:right;
  flex:0 0 auto;
}
.totvs-metric-detail{
  border-top:1px solid #e2e8f0;
  background:#f8fafc;
  padding:.8rem .95rem .95rem;
  color:#475569;
  font-size:.92rem;
}
.totvs-detail-list{
  display:grid;
  gap:.4rem;
  max-height:220px;
  overflow:auto;
  margin-top:.55rem;
}
.totvs-detail-item{
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  padding:.45rem .6rem;
  border-radius:.75rem;
  border:1px solid #e2e8f0;
  background:#fff;
}
.totvs-detail-item span{color:#334155;}
.totvs-detail-item strong{
  color:#0f172a;
  white-space:nowrap;
}
.totvs-detail-empty{
  border:1px dashed #cbd5e1;
  border-radius:.75rem;
  padding:.7rem .8rem;
  color:#64748b;
  background:#fff;
}
@media (max-width: 1199.98px){
  .totvs-two-columns{
    grid-template-columns:1fr;
  }
  .totvs-filter-grid{
    grid-template-columns: 1fr 1fr;
  }
  .totvs-field-wide{
    grid-column:1 / -1;
  }
}
@media (max-width: 991.98px){
  .totvs-hr-card .totvs-card-header{
    grid-template-columns:1fr;
  }
  .totvs-format-box{width:100%;}
  .totvs-metrics-panel{
    grid-template-columns:1fr;
  }
}
@media (max-width: 767.98px){
  .totvs-page .totvs-card-clean{padding: .85rem;}
  .totvs-hero-compact{align-items:flex-start;}
  .totvs-workspace-toggle{align-items:stretch;}
  .totvs-tab-nav{
    width:100%;
    border-radius:1rem;
    flex-direction:column;
  }
  .totvs-tab-btn{
    width:100%;
    justify-content:center;
  }
  .totvs-columns-toggle,
  .totvs-columns-toggle span{
    width:100%;
    justify-content:center;
  }
  .totvs-filter-grid{grid-template-columns:1fr;}
  .totvs-field-wide{grid-column:auto;}
  .totvs-main-download{width:100%; min-width:0;}
  .totvs-download-strip{padding:.9rem;}
  .totvs-metric{
    flex-direction:column;
    align-items:flex-start;
  }
  .totvs-metric strong{text-align:left;}
  .totvs-detail-item{
    flex-direction:column;
  }
}


/* TOTVS/PROTHEUS v7 — banners em duas colunas e saída mais informativa */
.totvs-hr-card .totvs-context-banner,
.totvs-hr-card .totvs-download-strip{
  min-height: 100%;
}

.totvs-context-banner{
  align-items:flex-start;
}

.totvs-context-content{
  display:block;
}

.totvs-context-content strong{
  display:block;
  margin-bottom:.2rem;
}

.totvs-context-content span{
  display:block;
  line-height:1.45;
}

.totvs-path-mark{
  display:inline-block;
  margin-left:.25rem;
  padding:.1rem .42rem;
  border-radius:.55rem;
  background:#dcfce7;
  color:#14532d;
  border:1px solid #86efac;
  font-weight:900;
}

.totvs-download-strip{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:1rem;
  align-items:center;
}

.totvs-download-info{
  min-width:0;
}

.totvs-output-details{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.35rem .8rem;
  margin-top:.55rem;
  color:#475569;
  font-size:.88rem;
}

.totvs-output-details span{
  display:flex;
  align-items:flex-start;
  gap:.35rem;
  min-width:0;
}

.totvs-output-details i{
  color:#0d6efd;
  flex:0 0 auto;
  margin-top:.08rem;
}

.totvs-download-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  justify-content:flex-end;
  align-items:center;
}

.totvs-main-download{
  white-space:normal;
}

.totvs-hr-card .totvs-context-banner + .totvs-download-strip{
  margin-top:0;
}

.totvs-hr-card .totvs-context-banner{
  grid-area:banner;
}

.totvs-hr-card .totvs-download-strip{
  grid-area:download;
}

.totvs-hr-card .totvs-output-row{
  display:grid;
  grid-template-columns:minmax(0, .92fr) minmax(0, 1.08fr);
  gap:1rem;
  align-items:stretch;
}

@media (min-width: 1200px){
  .totvs-hr-card .totvs-context-banner,
  .totvs-hr-card .totvs-download-strip{
    margin-bottom:0 !important;
  }
}

@media (max-width: 1199.98px){
  .totvs-hr-card .totvs-output-row{
    grid-template-columns:1fr;
  }
  .totvs-download-strip{
    grid-template-columns:1fr;
  }
  .totvs-download-actions{
    justify-content:flex-start;
  }
}

@media (max-width: 767.98px){
  .totvs-output-details{
    grid-template-columns:1fr;
  }
  .totvs-download-actions .btn{
    width:100%;
  }
}


/* V8 — Botões com animação suave e limpar filtro discreto */
@keyframes softPulseAction {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, .30), 0 12px 22px rgba(37,99,235,.18);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 .42rem rgba(13, 110, 253, .08), 0 16px 28px rgba(37,99,235,.22);
    transform: translateY(-1px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0), 0 12px 22px rgba(37,99,235,.18);
    transform: translateY(0);
  }
}

.btn-soft-pulse {
  position: relative;
  overflow: hidden;
  animation: softPulseAction 2.6s ease-in-out infinite;
}

.btn-soft-pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.32) 45%, transparent 70%);
  transform: translateX(-120%);
  animation: softShineAction 3.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes softShineAction {
  0%, 35% { transform: translateX(-120%); }
  65%, 100% { transform: translateX(120%); }
}

.btn-soft-pulse:hover {
  animation-play-state: paused;
  transform: translateY(-2px);
}

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

.totvs-download-actions .totvs-main-download {
  width: 100%;
}

.totvs-clear-filter-link {
  align-self: center;
  padding: .2rem .45rem;
  color: #64748b;
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none;
}

.totvs-clear-filter-link:hover {
  color: #dc2626;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .btn-soft-pulse,
  .btn-soft-pulse::after {
    animation: none !important;
  }
}


/* V9 — modal de processamento moderno e ícone interativo no download */
.processing-overlay {
  background:
    radial-gradient(circle at 20% 20%, rgba(13,110,253,.22), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(6,182,212,.20), transparent 32%),
    rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

.processing-card-modern {
  position: relative;
  width: min(560px, 96vw);
  overflow: hidden;
  border: 1px solid rgba(219,234,254,.9);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.98));
}

.processing-card-modern::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto -30%;
  height: 180px;
  background: linear-gradient(90deg, transparent, rgba(13,110,253,.10), rgba(6,182,212,.12), transparent);
  transform: rotate(-8deg);
  animation: processingGlow 3.4s ease-in-out infinite;
}

@keyframes processingGlow {
  0%, 100% { transform: translateX(-20%) rotate(-8deg); opacity: .6; }
  50% { transform: translateX(20%) rotate(-8deg); opacity: 1; }
}

.processing-orbit-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  margin: 0 auto 1rem;
}

.processing-orbit {
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  border: 3px solid rgba(13,110,253,.12);
  border-top-color: #0d6efd;
  border-right-color: #06b6d4;
  animation: processingSpin 1.2s linear infinite;
}

.processing-orbit::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  border: 2px dashed rgba(6,182,212,.32);
  animation: processingSpinReverse 2.6s linear infinite;
}

.processing-core {
  position: absolute;
  inset: 30px;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d6efd, #06b6d4);
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 18px 34px rgba(13,110,253,.28);
  animation: processingCorePulse 1.8s ease-in-out infinite;
}

.processing-float {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 20px rgba(15,23,42,.10);
  font-size: 1rem;
}

.processing-float-a { top: 4px; right: 10px; animation: processingFloat 2.2s ease-in-out infinite; }
.processing-float-b { left: 2px; top: 48px; animation: processingFloat 2.2s ease-in-out .25s infinite; }
.processing-float-c { right: 4px; bottom: 12px; animation: processingFloat 2.2s ease-in-out .5s infinite; }

.processing-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .45rem;
  padding: .24rem .7rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #0d47a1;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.processing-card-modern h2,
.processing-card-modern p,
.processing-card-modern .processing-stats,
.processing-card-modern .processing-progress,
.processing-card-modern .processing-hint {
  position: relative;
  z-index: 1;
}

.processing-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .65rem;
  margin: .75rem 0 .55rem;
}

.processing-percent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  border-radius: 999px;
  padding: .35rem .7rem;
  background: #0d6efd;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(13,110,253,.20);
}

.processing-time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .35rem .65rem;
  border: 1px solid #dbeafe;
  background: #fff;
  color: #64748b;
  font-size: .86rem;
  font-weight: 800;
}

.processing-progress {
  height: .72rem !important;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.08);
}

.processing-progress .progress-bar {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d6efd, #06b6d4);
}

.processing-progress .progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(-100%);
  animation: processingBarShine 1.35s ease-in-out infinite;
}

.processing-hint {
  margin-top: .75rem;
  color: #64748b;
  font-size: .88rem;
  font-weight: 700;
}

@keyframes processingSpin { to { transform: rotate(360deg); } }
@keyframes processingSpinReverse { to { transform: rotate(-360deg); } }
@keyframes processingCorePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes processingFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes processingBarShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}

.totvs-download-icon {
  width: 1.85rem;
  height: 1.85rem;
  margin-right: .55rem;
  border-radius: .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  vertical-align: middle;
}

.totvs-download-icon i {
  display: inline-block;
  font-size: 1.08rem;
  animation: downloadIconBounce 1.35s ease-in-out infinite;
}

.totvs-main-download:hover .totvs-download-icon i {
  animation: downloadIconDrop .7s ease-in-out infinite;
}

@keyframes downloadIconBounce {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(3px); }
}

@keyframes downloadIconDrop {
  0% { transform: translateY(-5px); opacity: .55; }
  45% { transform: translateY(2px); opacity: 1; }
  100% { transform: translateY(5px); opacity: .75; }
}

@media (prefers-reduced-motion: reduce) {
  .processing-card-modern::before,
  .processing-orbit,
  .processing-orbit::after,
  .processing-core,
  .processing-float,
  .processing-progress .progress-bar::after,
  .totvs-download-icon i {
    animation: none !important;
  }
}


/* V10 — processamento mais leve e ícone de download rotativo */
.processing-overlay {
  backdrop-filter: none !important;
  background: rgba(15, 23, 42, 0.56) !important;
}

.processing-card-modern::before {
  animation-duration: 6s !important;
  opacity: .55;
}

.processing-orbit {
  animation-duration: 1.8s !important;
}

.processing-orbit::after {
  opacity: .45;
  animation-duration: 4.2s !important;
}

.processing-core {
  animation-duration: 2.8s !important;
}

.processing-float {
  display: none !important;
}

.processing-progress .progress-bar::after {
  animation-duration: 2.2s !important;
}

.totvs-download-icon {
  position: relative;
  overflow: hidden;
}

.totvs-icon-rotator {
  flex: 0 0 1.85rem;
}

.totvs-icon-rotator i {
  position: absolute;
  inset: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px) scale(.92);
  animation: totvsIconCycle 4.8s ease-in-out infinite !important;
}

.totvs-icon-rotator i:nth-child(1) { animation-delay: 0s !important; }
.totvs-icon-rotator i:nth-child(2) { animation-delay: 1.2s !important; }
.totvs-icon-rotator i:nth-child(3) { animation-delay: 2.4s !important; }
.totvs-icon-rotator i:nth-child(4) { animation-delay: 3.6s !important; }

.totvs-main-download:hover .totvs-icon-rotator i {
  animation-duration: 2.8s !important;
}

@keyframes totvsIconCycle {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(.92);
  }
  8%, 22% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  30%, 100% {
    opacity: 0;
    transform: translateY(-8px) scale(.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .totvs-icon-rotator i {
    animation: none !important;
  }
  .totvs-icon-rotator i:first-child {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* V11 — ícones refinados e toggle apenas com ícone */
.totvs-columns-toggle span.totvs-columns-toggle-icon{
  width: 46px;
  height: 46px;
  justify-content: center;
  padding: 0;
  position: relative;
}
.totvs-columns-toggle-icon i{
  position: absolute;
  font-size: 1.12rem;
  color: #0d6efd;
  transition: opacity .18s ease, transform .18s ease, color .18s ease;
}
.totvs-columns-toggle-icon i:last-child{
  opacity: 0;
  transform: scale(.8) rotate(-8deg);
}
.totvs-columns-toggle input:checked + .totvs-columns-toggle-icon i:first-child{
  opacity: 0;
  transform: scale(.8) rotate(8deg);
}
.totvs-columns-toggle input:checked + .totvs-columns-toggle-icon i:last-child{
  opacity: 1;
  transform: scale(1) rotate(0);
}
.totvs-columns-toggle input:checked + .totvs-columns-toggle-icon{
  background: #eff6ff;
}
.totvs-columns-toggle:hover .totvs-columns-toggle-icon{
  transform: translateY(-1px);
}

.totvs-format-option{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 74px;
}
.totvs-format-text{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
.totvs-format-text strong{
  font-size: .98rem;
}
.totvs-format-text small{
  color: inherit;
  opacity: .8;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.totvs-format-icon-card,
.totvs-download-icon{
  position: relative;
  overflow: hidden;
  border-radius: .78rem;
  background: #fff;
  border: 1px solid rgba(255,255,255,.42);
  box-shadow:
    inset 0 0 0 1px rgba(219,234,254,.9),
    0 8px 18px rgba(15,23,42,.10);
}

.totvs-format-icon-card{
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.totvs-download-icon{
  width: 2.1rem;
  height: 2.1rem;
  margin-right: .65rem;
  flex: 0 0 2.1rem;
}

.totvs-format-rotator i,
.totvs-icon-rotator i{
  position: absolute;
  inset: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px) scale(.92);
  animation: totvsIconCycle 7.2s ease-in-out infinite !important;
}

.totvs-format-rotator i:nth-child(1),
.totvs-icon-rotator i:nth-child(1){ animation-delay: 0s !important; }
.totvs-format-rotator i:nth-child(2),
.totvs-icon-rotator i:nth-child(2){ animation-delay: 1.2s !important; }
.totvs-format-rotator i:nth-child(3),
.totvs-icon-rotator i:nth-child(3){ animation-delay: 2.4s !important; }
.totvs-format-rotator i:nth-child(4),
.totvs-icon-rotator i:nth-child(4){ animation-delay: 3.6s !important; }
.totvs-icon-rotator i:nth-child(5){ animation-delay: 4.8s !important; }
.totvs-icon-rotator i:nth-child(6){ animation-delay: 6s !important; }

.totvs-format-rotator-csv i:nth-child(1),
.totvs-icon-rotator i:nth-child(1){ color:#2563eb; }
.totvs-format-rotator-csv i:nth-child(2),
.totvs-icon-rotator i:nth-child(2){ color:#0ea5e9; }
.totvs-format-rotator-csv i:nth-child(3),
.totvs-icon-rotator i:nth-child(3){ color:#7c3aed; }
.totvs-format-rotator-csv i:nth-child(4),
.totvs-icon-rotator i:nth-child(4){ color:#16a34a; }
.totvs-icon-rotator i:nth-child(5){ color:#eab308; }
.totvs-icon-rotator i:nth-child(6){ color:#ef4444; }

.totvs-format-rotator-xlsx i:nth-child(1){ color:#2563eb; }
.totvs-format-rotator-xlsx i:nth-child(2){ color:#16a34a; }
.totvs-format-rotator-xlsx i:nth-child(3){ color:#7c3aed; }
.totvs-format-rotator-xlsx i:nth-child(4){ color:#0ea5e9; }

.totvs-download-copy{
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .3rem .55rem;
}
.totvs-download-copy strong{
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .01em;
}
.totvs-download-copy em{
  display: inline-flex;
  align-items: center;
  padding: .14rem .52rem;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  color: rgba(255,255,255,.92);
  font-size: .82rem;
  font-style: normal;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .02em;
  opacity: .96;
}

.totvs-main-download:hover .totvs-icon-rotator i,
.totvs-format-option:hover .totvs-format-rotator i{
  animation-duration: 4.6s !important;
}

@media (max-width: 767.98px){
  .totvs-columns-toggle span.totvs-columns-toggle-icon{
    width: 44px;
  }
  .totvs-format-option{
    min-height: 66px;
    gap: .45rem;
  }
  .totvs-format-text strong{
    font-size: .9rem;
  }
  .totvs-download-copy{
    align-items: center;
  }
}


/* V12 — refinamento de textos e rotação de ícones */
.totvs-format-text small{
  opacity: .68;
  font-size: .60rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.totvs-download-copy em{
  background: #ffffff;
  color: #2563eb;
  border: 1px solid rgba(191,219,254,.95);
  box-shadow: 0 6px 14px rgba(15,23,42,.10);
  font-size: .79rem;
  font-weight: 700;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: .01em;
  padding: .18rem .58rem;
}

/* Rotação contínua sem quadro em branco */
.totvs-format-rotator i,
.totvs-icon-rotator i{
  animation-name: totvsIconCycleSeamless !important;
}

.totvs-format-rotator i:nth-child(1),
.totvs-icon-rotator i:nth-child(1){ animation-delay: 0s !important; }
.totvs-format-rotator i:nth-child(2),
.totvs-icon-rotator i:nth-child(2){ animation-delay: -1.2s !important; }
.totvs-format-rotator i:nth-child(3),
.totvs-icon-rotator i:nth-child(3){ animation-delay: -2.4s !important; }
.totvs-format-rotator i:nth-child(4),
.totvs-icon-rotator i:nth-child(4){ animation-delay: -3.6s !important; }
.totvs-icon-rotator i:nth-child(5){ animation-delay: -4.8s !important; }
.totvs-icon-rotator i:nth-child(6){ animation-delay: -6s !important; }

@keyframes totvsIconCycleSeamless {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(.92);
  }
  6%, 24% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  32%, 100% {
    opacity: 0;
    transform: translateY(-8px) scale(.92);
  }
}

@media (max-width: 767.98px){
  .totvs-format-text small{
    font-size: .57rem;
  }
  .totvs-download-copy em{
    font-size: .74rem;
    padding: .16rem .5rem;
  }
}


/* V13 — dropdown de filtro com checkboxes e rotação mais lenta */
.totvs-filter-dropdown-btn {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 700;
  background: #fff;
}
.totvs-filter-menu {
  width: min(520px, 92vw);
}
.totvs-filter-check-list {
  max-height: 220px;
}
.totvs-filter-check-item {
  user-select: none;
}
.totvs-filter-check-item .form-check-input {
  width: 1rem;
  height: 1rem;
}

/* desacelera a transição/rotação dos ícones */
.totvs-format-rotator i,
.totvs-icon-rotator i {
  animation-duration: 9.6s !important;
}
.totvs-main-download:hover .totvs-icon-rotator i,
.totvs-format-option:hover .totvs-format-rotator i {
  animation-duration: 6.6s !important;
}


/* V15 — correção definitiva da transição de ícones sem caixa em branco */
.totvs-format-rotator i,
.totvs-icon-rotator i{
  opacity: 0;
  transform: translateY(7px) scale(.94);
}

/* Toggle Formato da saída: 4 ícones, sem intervalo vazio */
.totvs-format-rotator i{
  animation-name: totvsIconCycle4 !important;
  animation-duration: 8s !important;
  animation-timing-function: ease-in-out !important;
  animation-iteration-count: infinite !important;
}
.totvs-format-rotator i:nth-child(1){ animation-delay: 0s !important; }
.totvs-format-rotator i:nth-child(2){ animation-delay: 2s !important; }
.totvs-format-rotator i:nth-child(3){ animation-delay: 4s !important; }
.totvs-format-rotator i:nth-child(4){ animation-delay: 6s !important; }

/* Botão HR Ahgora: 6 ícones, sem intervalo vazio */
.totvs-icon-rotator i{
  animation-name: totvsIconCycle6 !important;
  animation-duration: 12s !important;
  animation-timing-function: ease-in-out !important;
  animation-iteration-count: infinite !important;
}
.totvs-icon-rotator i:nth-child(1){ animation-delay: 0s !important; }
.totvs-icon-rotator i:nth-child(2){ animation-delay: 2s !important; }
.totvs-icon-rotator i:nth-child(3){ animation-delay: 4s !important; }
.totvs-icon-rotator i:nth-child(4){ animation-delay: 6s !important; }
.totvs-icon-rotator i:nth-child(5){ animation-delay: 8s !important; }
.totvs-icon-rotator i:nth-child(6){ animation-delay: 10s !important; }

@keyframes totvsIconCycle4 {
  0%, 3% {
    opacity: 0;
    transform: translateY(7px) scale(.94);
  }
  7%, 21% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  25%, 100% {
    opacity: 0;
    transform: translateY(-7px) scale(.94);
  }
}

@keyframes totvsIconCycle6 {
  0%, 2% {
    opacity: 0;
    transform: translateY(7px) scale(.94);
  }
  5%, 14% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  16.66%, 100% {
    opacity: 0;
    transform: translateY(-7px) scale(.94);
  }
}

/* fallback visual: se alguma animação falhar, o primeiro ícone nunca deixa o card vazio */
.totvs-format-rotator:not(:has(i:nth-child(2))) i:first-child,
.totvs-icon-rotator:not(:has(i:nth-child(2))) i:first-child{
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce){
  .totvs-format-rotator i,
  .totvs-icon-rotator i{
    animation: none !important;
    opacity: 0 !important;
  }
  .totvs-format-rotator i:first-child,
  .totvs-icon-rotator i:first-child{
    opacity: 1 !important;
    transform: none !important;
  }
}


/* V16 — tipo digitando e seletor único de formato */
.totvs-format-switch{
  display:flex;
  align-items:center;
  gap:.55rem;
}
.totvs-format-primary{
  flex:1 1 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.7rem;
  min-height:74px;
  border-radius:1rem;
  color:#fff;
  border:1px solid transparent;
  box-shadow:0 10px 22px rgba(15,23,42,.08);
}
.totvs-format-primary.is-csv{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
}
.totvs-format-primary.is-csv:hover{
  background:linear-gradient(135deg,#1d4ed8,#1e40af);
  color:#fff;
}
.totvs-format-primary.is-xlsx{
  background:linear-gradient(135deg,#16a34a,#22c55e);
}
.totvs-format-primary.is-xlsx:hover{
  background:linear-gradient(135deg,#15803d,#16a34a);
  color:#fff;
}
.totvs-format-cycle{
  width:42px;
  height:42px;
  border-radius:.9rem;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#64748b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.totvs-format-cycle:hover{
  color:#2563eb;
  border-color:#93c5fd;
  background:#eff6ff;
}
.totvs-format-cycle i{
  transition:transform .2s ease;
}
.totvs-format-cycle:hover i{
  transform:rotate(90deg);
}

/* oculta estilos antigos do grupo duplo */
.totvs-format-box .btn-group{display:block;}

.totvs-pill-typewriter{
  min-width:0;
}
.totvs-pill-typewriter span{
  display:inline-block;
  overflow:hidden;
  white-space:nowrap;
  width:0ch;
  max-width:21ch;
  vertical-align:bottom;
  border-right:1px solid rgba(37,99,235,.45);
  animation: totvsTypewriter 8s steps(21,end) infinite;
}
@keyframes totvsTypewriter{
  0%, 4% { width:0ch; }
  24% { width:21ch; }
  86% { width:21ch; }
  88%, 100% { width:0ch; }
}

@media (prefers-reduced-motion: reduce){
  .totvs-pill-typewriter span{
    animation:none !important;
    width:auto !important;
    border-right:0 !important;
    max-width:none !important;
  }
}

@media (max-width: 767.98px){
  .totvs-format-switch{
    gap:.45rem;
  }
  .totvs-format-primary{
    min-height:68px;
    gap:.55rem;
  }
}


/* V20 — correção efetiva do layout do banner e botões */
.totvs-output-row{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  gap:1rem !important;
}
.totvs-output-row .totvs-context-banner,
.totvs-output-row .totvs-download-strip,
.totvs-output-row .totvs-download-actions-center{
  width:100%;
  max-width:980px;
  margin-inline:auto;
}
.totvs-output-row .totvs-context-banner{
  justify-content:center !important;
  text-align:left;
  padding:.9rem 1rem !important;
}
.totvs-output-row .totvs-context-banner.is-csv{
  border-color:#bfdbfe !important;
  background:linear-gradient(135deg,#eff6ff,#f8fbff 50%,#eef6ff) !important;
}
.totvs-output-row .totvs-context-banner.is-xlsx{
  border-color:#bbf7d0 !important;
  background:linear-gradient(135deg,#ecfdf5,#f7fffb 50%,#effcf5) !important;
}
.totvs-output-row .totvs-context-content{ width:100%; }
.totvs-output-row .totvs-context-content strong{ display:block; margin-bottom:.18rem; }
.totvs-output-row .totvs-download-strip{
  display:block !important;
  padding:1.1rem 1.15rem !important;
  border-width:1px !important;
  border-radius:1.15rem;
  box-shadow:0 14px 30px rgba(15,23,42,.05) !important;
}
.totvs-output-row .totvs-download-strip.is-csv{
  border-color:#bfdbfe !important;
  background:linear-gradient(135deg,#eff6ff,#f8fbff 45%,#eef6ff) !important;
}
.totvs-output-row .totvs-download-strip.is-xlsx{
  border-color:#bbf7d0 !important;
  background:linear-gradient(135deg,#ecfdf5,#f7fffb 45%,#effcf5) !important;
}
.totvs-download-headline{ text-align:center; margin-bottom:.85rem; }
.totvs-download-kicker{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.22rem .65rem; border-radius:999px; font-size:.73rem; font-weight:900;
  text-transform:uppercase; letter-spacing:.06em; margin-bottom:.45rem;
}
.totvs-download-strip.is-csv .totvs-download-kicker{ background:#dbeafe; color:#1d4ed8; }
.totvs-download-strip.is-xlsx .totvs-download-kicker{ background:#dcfce7; color:#15803d; }
.totvs-download-title{ font-size:1.5rem; font-weight:900; color:#0f172a; line-height:1.15; }
.totvs-download-subtitle{ margin-top:.28rem; color:#64748b; font-size:.93rem; }
.totvs-output-row .totvs-output-details{
  display:grid !important; grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:.7rem .95rem !important; margin-top:.8rem !important;
}
.totvs-output-row .totvs-output-details span{
  padding:.58rem .7rem; border-radius:.85rem; background:rgba(255,255,255,.82);
  border:1px solid rgba(255,255,255,.95); box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.totvs-output-row .totvs-output-details span b{ color:#0f172a; margin-right:.2rem; }
.totvs-download-actions-center{
  display:flex !important; flex-direction:column !important; align-items:center !important;
  justify-content:center !important; gap:.4rem !important;
}
.totvs-download-actions-center .totvs-main-download{ width:min(780px, 100%) !important; }
.totvs-download-actions-center .totvs-clear-filter-link{ margin-top:.05rem; }
@media (max-width: 767.98px){
  .totvs-output-row .totvs-context-banner,
  .totvs-output-row .totvs-download-strip,
  .totvs-output-row .totvs-download-actions-center{ max-width:100%; }
  .totvs-download-title{ font-size:1.2rem; }
  .totvs-output-row .totvs-output-details{ grid-template-columns:1fr !important; }
}

/* V28 — Modal HR Ahgora pós-upload */
.hr-ready-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:2100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1.25rem;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(12px);
  animation:hrReadyFade .22s ease both;
}
.hr-ready-modal{
  position:relative;
  width:min(520px, 100%);
  overflow:hidden;
  border-radius:2rem;
  padding:2rem;
  text-align:center;
  background:linear-gradient(145deg,#ffffff,#f8fbff 45%,#ecfeff);
  border:1px solid rgba(191,219,254,.95);
  box-shadow:0 28px 80px rgba(15,23,42,.25), inset 0 1px 0 rgba(255,255,255,.9);
  animation:hrReadyPop .28s cubic-bezier(.2,.9,.2,1.08) both;
}
.hr-ready-glow{
  position:absolute;
  width:260px;
  height:260px;
  left:50%;
  top:-145px;
  transform:translateX(-50%);
  background:radial-gradient(circle, rgba(34,197,94,.28), rgba(14,165,233,.18) 45%, transparent 70%);
  pointer-events:none;
}
.hr-ready-close{
  position:absolute;
  right:1rem;
  top:1rem;
  z-index:2;
  width:38px;
  height:38px;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:.18s ease;
}
.hr-ready-close:hover{
  color:#0f172a;
  border-color:#93c5fd;
  transform:rotate(90deg);
}
.hr-ready-icon-wrap{
  position:relative;
  z-index:1;
  display:flex;
  justify-content:center;
  margin-bottom:.8rem;
}
.hr-ready-icon-card{
  width:92px;
  height:92px;
  border-radius:1.55rem;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#16a34a,#22c55e);
  color:#fff;
  box-shadow:0 18px 35px rgba(22,163,74,.28);
}
.hr-ready-icon-card i{
  font-size:3rem;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.15));
}
.hr-ready-kicker{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.34rem .75rem;
  border-radius:999px;
  background:#dcfce7;
  color:#15803d;
  font-weight:900;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.045em;
  margin-bottom:.7rem;
}
.hr-ready-title{
  position:relative;
  z-index:1;
  font-size:1.65rem;
  line-height:1.15;
  font-weight:950;
  color:#0f172a;
  margin:0 0 .45rem;
}
.hr-ready-text{
  color:#64748b;
  margin:0 auto 1rem;
  max-width:390px;
}
.hr-ready-file-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.12rem;
  margin:1.05rem auto 1.25rem;
  padding:1rem;
  border-radius:1.25rem;
  background:rgba(255,255,255,.84);
  border:1px solid #bbf7d0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 10px 24px rgba(15,23,42,.06);
}
.hr-ready-file-card strong{
  font-size:1.22rem;
  font-weight:950;
  color:#0f172a;
}
.hr-ready-file-card span{
  display:inline-flex;
  padding:.22rem .65rem;
  border-radius:999px;
  background:#dcfce7;
  color:#15803d;
  font-size:.82rem;
  font-weight:900;
}
.hr-ready-file-card small{
  margin-top:.25rem;
  color:#64748b;
  font-weight:700;
}
.hr-ready-actions{
  display:flex;
  flex-direction:column;
  gap:.65rem;
}
.hr-ready-download{
  border:0;
  border-radius:1rem;
  padding:.9rem 1rem;
  color:#fff;
  font-weight:950;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  box-shadow:0 16px 35px rgba(37,99,235,.28);
}
.hr-ready-download:hover{
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 18px 38px rgba(37,99,235,.34);
}
.hr-ready-secondary{
  border:1px solid #cbd5e1;
  border-radius:1rem;
  padding:.78rem 1rem;
  background:#fff;
  color:#475569;
  font-weight:850;
}
.hr-ready-secondary:hover{
  background:#f8fafc;
  border-color:#94a3b8;
  color:#0f172a;
}
@keyframes hrReadyFade{
  from{opacity:0;}
  to{opacity:1;}
}
@keyframes hrReadyPop{
  from{opacity:0; transform:translateY(16px) scale(.96);}
  to{opacity:1; transform:translateY(0) scale(1);}
}
@media (max-width:575.98px){
  .hr-ready-modal{padding:1.45rem; border-radius:1.5rem;}
  .hr-ready-icon-card{width:78px; height:78px;}
  .hr-ready-icon-card i{font-size:2.55rem;}
  .hr-ready-title{font-size:1.35rem;}
}


/* V29 — refinamento do modal HR Ahgora pós-upload */
.hr-ready-modal{
  width:min(540px, 100%);
  padding:2rem 2rem 1.85rem;
}
.hr-ready-title{
  display:none !important;
}
.hr-ready-text{
  margin-top:.2rem;
  margin-bottom:1rem;
}
.hr-ready-file-card{
  margin:1rem auto .9rem;
  padding:1.05rem 1rem 1rem;
}
.hr-ready-file-card small{
  display:none;
}
.hr-ready-stats{
  width:100%;
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:.45rem;
  margin-top:.85rem;
}
.hr-ready-stats div{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:58px;
  padding:.45rem .4rem;
  border-radius:.9rem;
  background:linear-gradient(180deg, rgba(248,250,252,.95), rgba(255,255,255,.9));
  border:1px solid #e2e8f0;
}
.hr-ready-stats b{
  line-height:1;
  font-size:1.08rem;
  font-weight:950;
  color:#0f172a;
}
.hr-ready-stats small{
  display:block;
  margin-top:.22rem;
  color:#64748b;
  font-size:.72rem;
  font-weight:850;
}
.hr-ready-path-hint{
  margin:.2rem auto .95rem;
  color:#64748b;
  font-size:.86rem;
  font-weight:750;
}
.hr-ready-actions{
  gap:0;
}
.hr-ready-secondary{
  display:none !important;
}
.hr-ready-download{
  position:relative;
  width:100%;
  min-height:58px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.72rem;
  overflow:hidden;
  border-radius:1.05rem;
}
.hr-ready-download::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform:translateX(-120%);
  animation:hrReadyButtonShine 4.2s ease-in-out infinite;
  pointer-events:none;
}
.hr-ready-download-icon{
  position:relative;
  z-index:1;
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:.85rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.96);
  color:#2563eb;
  box-shadow:0 8px 20px rgba(15,23,42,.12);
}
.hr-ready-icon-rotator i{
  position:absolute;
  opacity:0;
  transform:translateY(7px) scale(.94);
  animation:hrReadyIconCycle4 8s ease-in-out infinite;
}
.hr-ready-icon-rotator i:nth-child(1){ animation-delay:0s; }
.hr-ready-icon-rotator i:nth-child(2){ animation-delay:2s; }
.hr-ready-icon-rotator i:nth-child(3){ animation-delay:4s; }
.hr-ready-icon-rotator i:nth-child(4){ animation-delay:6s; }
.hr-ready-download-copy{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  min-width:0;
}
.hr-ready-download-copy strong{
  color:#fff;
  font-size:1rem;
  font-weight:950;
  letter-spacing:.01em;
}
.hr-ready-download-copy em{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.22rem .62rem;
  border-radius:999px;
  background:rgba(255,255,255,.95);
  color:#2563eb;
  font-style:normal;
  font-size:.76rem;
  font-weight:950;
  max-width:190px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@keyframes hrReadyButtonShine{
  0%, 40%{ transform:translateX(-120%); }
  70%, 100%{ transform:translateX(120%); }
}
@keyframes hrReadyIconCycle4{
  0%,3%{ opacity:0; transform:translateY(7px) scale(.94); }
  7%,21%{ opacity:1; transform:translateY(0) scale(1); }
  25%,100%{ opacity:0; transform:translateY(-7px) scale(.94); }
}
@media (max-width:575.98px){
  .hr-ready-stats{
    grid-template-columns:1fr;
  }
  .hr-ready-download-copy{
    flex-direction:column;
    gap:.18rem;
  }
}


/* V30 — modal HR Ahgora pós-upload: vazio, typewriter, ícones coloridos e marcas d'água */
.hr-ready-modal{
  isolation:isolate;
}
.hr-ready-modal::before{
  content:"";
  position:absolute;
  inset:auto -90px -125px auto;
  width:280px;
  height:280px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(37,99,235,.10), rgba(6,182,212,.07) 45%, transparent 70%);
  pointer-events:none;
  z-index:0;
}
.hr-ready-watermark{
  position:absolute;
  right:1.25rem;
  bottom:1rem;
  z-index:0;
  font-size:3.3rem;
  font-weight:950;
  letter-spacing:.06em;
  color:rgba(15,23,42,.045);
  transform:rotate(-7deg);
  pointer-events:none;
  user-select:none;
}
.hr-ready-modal.is-empty .hr-ready-glow{
  background:radial-gradient(circle, rgba(251,191,36,.30), rgba(14,165,233,.12) 45%, transparent 70%);
}
.hr-ready-modal.is-empty .hr-ready-icon-card{
  background:linear-gradient(135deg,#f59e0b,#fbbf24);
  box-shadow:0 18px 35px rgba(245,158,11,.24);
}
.hr-ready-kicker.is-empty{
  background:#fef3c7;
  color:#92400e;
}
.hr-ready-file-card{
  position:relative;
  overflow:hidden;
  z-index:1;
}
.hr-ready-file-card::after{
  content:attr(data-watermark);
  position:absolute;
  right:.85rem;
  bottom:.2rem;
  font-size:3.2rem;
  font-weight:950;
  color:rgba(22,163,74,.055);
  letter-spacing:.06em;
  pointer-events:none;
}
.hr-ready-scope-pill{
  display:inline-flex;
  padding:.22rem .65rem;
  border-radius:999px;
  background:#dcfce7;
  color:#15803d;
  font-size:.82rem;
  font-weight:900;
  max-width:100%;
}
.hr-ready-scope-pill span{
  display:inline-block;
  overflow:hidden;
  white-space:nowrap;
  width:0ch;
  max-width:21ch;
  border-right:1px solid rgba(21,128,61,.45);
  animation:hrReadyTypewriter 8s steps(21,end) infinite;
}
.hr-ready-stats div{
  position:relative;
  overflow:hidden;
}
.hr-ready-stats div::after{
  content:attr(data-watermark);
  position:absolute;
  right:.34rem;
  bottom:-.15rem;
  font-size:1.55rem;
  font-weight:950;
  color:rgba(15,23,42,.055);
  letter-spacing:.04em;
  pointer-events:none;
}
.hr-ready-stats small strong{
  color:#0f172a;
  font-size:.7rem;
  font-weight:950;
  letter-spacing:.01em;
}
.hr-ready-path-hint{
  margin:.65rem auto 0;
  font-size:.82rem;
}
.hr-ready-download{
  min-height:54px;
  border-radius:.95rem;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  box-shadow:0 12px 26px rgba(37,99,235,.20);
}
.hr-ready-download:hover{
  box-shadow:0 14px 30px rgba(37,99,235,.26);
}
.hr-ready-download-icon{
  color:transparent;
}
.hr-ready-icon-rotator i:nth-child(1){ color:#2563eb; }
.hr-ready-icon-rotator i:nth-child(2){ color:#16a34a; }
.hr-ready-icon-rotator i:nth-child(3){ color:#7c3aed; }
.hr-ready-icon-rotator i:nth-child(4){ color:#0284c7; }
.hr-ready-download-copy strong{
  font-size:.96rem;
}
.hr-ready-download-copy em{
  background:rgba(255,255,255,.94);
  color:#2563eb;
  max-width:205px;
}
.hr-ready-download-copy em span{
  display:inline-block;
  overflow:hidden;
  white-space:nowrap;
  width:0ch;
  max-width:21ch;
  border-right:1px solid rgba(37,99,235,.45);
  animation:hrReadyButtonTypewriter 8s steps(21,end) infinite;
}
.hr-ready-empty-note{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  width:100%;
  margin-top:.15rem;
  padding:.75rem .85rem;
  border-radius:1rem;
  background:#fffbeb;
  border:1px solid #fde68a;
  color:#92400e;
  font-size:.86rem;
  font-weight:850;
}
@keyframes hrReadyTypewriter{
  0%, 4%{ width:0ch; }
  24%{ width:21ch; }
  86%{ width:21ch; }
  88%, 100%{ width:0ch; }
}
@keyframes hrReadyButtonTypewriter{
  0%, 4%{ width:0ch; }
  24%{ width:21ch; }
  86%{ width:21ch; }
  88%, 100%{ width:0ch; }
}
@media (prefers-reduced-motion: reduce){
  .hr-ready-scope-pill span,
  .hr-ready-download-copy em span{
    animation:none !important;
    width:auto !important;
    border-right:0 !important;
  }
}


/* V31 — refinamento final do modal HR Ahgora */
.hr-ready-modal-backdrop{
  cursor:default;
}

/* botão mais compacto, clean e ajustado ao conteúdo */
.hr-ready-actions{
  align-items:center;
}
.hr-ready-download{
  width:auto !important;
  min-width:0 !important;
  max-width:100%;
  padding:.78rem 1.15rem !important;
  min-height:50px !important;
  border-radius:.95rem !important;
  gap:.62rem !important;
  box-shadow:0 10px 22px rgba(37,99,235,.18) !important;
}
.hr-ready-download-icon{
  width:34px !important;
  height:34px !important;
  flex-basis:34px !important;
  border-radius:.8rem !important;
}
.hr-ready-download-copy{
  gap:.42rem !important;
}
.hr-ready-download-copy strong{
  font-size:.95rem !important;
  letter-spacing:.01em;
}
.hr-ready-download-copy em{
  max-width:none !important;
  padding:.18rem .48rem !important;
  font-size:.76rem !important;
  border-radius:999px;
  color:#2563eb;
  background:#fff;
  line-height:1.15;
  animation:none !important;
  width:auto !important;
  border-right:0 !important;
}
.hr-ready-download-copy em span{
  animation:none !important;
  width:auto !important;
  border-right:0 !important;
}

/* marcas d'água dos cards mais discretas e sem sobreposição ruim */
.hr-ready-file-card::after{
  content:"CSV";
  right:1rem;
  bottom:.55rem;
  font-size:2.4rem;
  color:rgba(22,163,74,.035);
  transform:rotate(-6deg);
}
.hr-ready-stats div::after{
  right:.42rem;
  bottom:.18rem;
  font-size:1.25rem;
  color:rgba(15,23,42,.04);
}
.hr-ready-stats div[data-watermark="147"]::after{
  content:"";
}
.hr-ready-stats div{
  padding:.5rem .55rem .62rem;
}
.hr-ready-stats b,
.hr-ready-stats small{
  position:relative;
  z-index:1;
}

/* pill superior continua digitando, mas com cursor mais sutil */
.hr-ready-scope-pill span{
  border-right-color:rgba(21,128,61,.28);
}

/* frase de caminho sempre abaixo do botão e discreta */
.hr-ready-path-hint{
  margin:.72rem auto 0 !important;
  font-size:.82rem !important;
  color:#64748b;
}

/* compactação mobile */
@media (max-width:575.98px){
  .hr-ready-download{
    width:auto !important;
    padding:.72rem 1rem !important;
  }
}


/* V32 — modal HR Ahgora: flip cards, ciclo de escalas e texto refinado */
.hr-ready-text{
  max-width:520px !important;
  margin:.85rem auto 1.1rem !important;
  font-size:1.02rem !important;
  line-height:1.55 !important;
}
.hr-ready-file-card::after{
  content:"HR";
  right:1rem;
  top:.75rem;
  bottom:auto;
  font-size:2.2rem;
  color:rgba(22,163,74,.032);
  transform:rotate(-6deg);
}
.hr-ready-scope-pill{
  position:relative;
  min-width:230px;
  height:32px;
  align-items:center;
  justify-content:center;
}
.hr-ready-scope-pill > span{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  display:inline-block;
  overflow:hidden;
  white-space:nowrap;
  width:0ch;
  max-width:22ch;
  opacity:0;
  border-right:1px solid rgba(21,128,61,.28);
}
.hr-ready-scope-pill > span:nth-child(1){ animation:hrReadyCycleType1 24s steps(22,end) infinite; }
.hr-ready-scope-pill > span:nth-child(2){ animation:hrReadyCycleType2 24s steps(11,end) infinite; }
.hr-ready-scope-pill > span:nth-child(3){ animation:hrReadyCycleType3 24s steps(11,end) infinite; }

@keyframes hrReadyCycleType1{
  0%,1%{opacity:1;width:0ch;}
  10%{opacity:1;width:22ch;}
  29%{opacity:1;width:22ch;}
  32%,100%{opacity:0;width:0ch;}
}
@keyframes hrReadyCycleType2{
  0%,33%{opacity:0;width:0ch;}
  34%{opacity:1;width:0ch;}
  44%{opacity:1;width:11ch;}
  62%{opacity:1;width:11ch;}
  65%,100%{opacity:0;width:0ch;}
}
@keyframes hrReadyCycleType3{
  0%,66%{opacity:0;width:0ch;}
  67%{opacity:1;width:0ch;}
  77%{opacity:1;width:11ch;}
  95%{opacity:1;width:11ch;}
  98%,100%{opacity:0;width:0ch;}
}

/* Flip estatístico */
.hr-ready-stats{
  align-items:stretch;
}
.hr-ready-flip-card{
  perspective:900px;
  min-height:86px !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.hr-ready-flip-card::after{
  content:attr(data-watermark);
  position:absolute;
  right:.55rem;
  bottom:.28rem;
  font-size:1.28rem;
  font-weight:950;
  color:rgba(15,23,42,.045);
  letter-spacing:.04em;
  pointer-events:none;
  z-index:3;
}
.hr-ready-flip-card[data-watermark="147"]::after{
  content:"147";
}
.hr-ready-flip-inner{
  position:relative;
  width:100%;
  height:100%;
  min-height:86px;
  transform-style:preserve-3d;
  transition:transform .55s cubic-bezier(.2,.8,.2,1);
}
.hr-ready-flip-card:hover .hr-ready-flip-inner,
.hr-ready-flip-card:focus-within .hr-ready-flip-inner{
  transform:rotateY(180deg);
}
.hr-ready-flip-face{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:.58rem .5rem;
  border-radius:.9rem;
  background:linear-gradient(180deg, rgba(248,250,252,.98), rgba(255,255,255,.93));
  border:1px solid #e2e8f0;
  backface-visibility:hidden;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}
.hr-ready-back{
  transform:rotateY(180deg);
  background:linear-gradient(180deg, rgba(239,246,255,.98), rgba(255,255,255,.95));
}
.hr-ready-back strong{
  color:#0f172a;
  font-size:.78rem;
  font-weight:950;
  margin-bottom:.2rem;
}
.hr-ready-back span{
  color:#64748b;
  font-size:.7rem;
  font-weight:850;
  line-height:1.22;
}
.hr-ready-front b,
.hr-ready-front small{
  position:relative;
  z-index:2;
}
.hr-ready-stats div::after{
  content:none !important;
}

/* remove qualquer CSV perdido no card de intrajornada */
.hr-ready-file-card .hr-ready-flip-card[data-watermark="147"]::after{
  content:"147" !important;
}

/* botão mais limpo ainda */
.hr-ready-download{
  padding:.74rem 1.08rem !important;
  box-shadow:0 10px 24px rgba(37,99,235,.16) !important;
}
.hr-ready-download-copy em{
  min-width:auto !important;
}
.hr-ready-download-copy em::before{
  content:"";
}

@media (prefers-reduced-motion: reduce){
  .hr-ready-scope-pill > span{
    position:static !important;
    transform:none !important;
    width:auto !important;
    opacity:1 !important;
    border-right:0 !important;
    animation:none !important;
  }
  .hr-ready-scope-pill > span:nth-child(n+2){
    display:none !important;
  }
  .hr-ready-flip-inner{
    transform:none !important;
  }
  .hr-ready-back{
    display:none !important;
  }
}

@media (max-width:575.98px){
  .hr-ready-scope-pill{
    min-width:210px;
  }
  .hr-ready-flip-card,
  .hr-ready-flip-inner{
    min-height:78px !important;
  }
}


/* V33 — correção typewriter, cores por escala, flip legível e navegação no X */
.hr-ready-scope-pill{
  background:transparent !important;
  min-width:260px !important;
  width:260px !important;
  overflow:hidden !important;
}
.hr-ready-scope-pill > span{
  max-width:none !important;
  border-right:0 !important;
  text-align:center !important;
  padding:.22rem .74rem !important;
  border-radius:999px !important;
  box-sizing:border-box !important;
  line-height:1.2 !important;
}

/* desliga animações antigas que adicionavam largura incorreta e deixavam caracteres estranhos */
.hr-ready-scope-pill > span:nth-child(1),
.hr-ready-scope-pill > span:nth-child(2),
.hr-ready-scope-pill > span:nth-child(3){
  animation-duration:24s !important;
  animation-timing-function:steps(23,end) !important;
  animation-iteration-count:infinite !important;
}

/* Escala de Revezamento — verde */
.hr-ready-scope-pill > span:nth-child(1){
  background:#dcfce7 !important;
  color:#15803d !important;
  animation-name:hrReadyScopeText1 !important;
}
/* Escala 12x36 — azul */
.hr-ready-scope-pill > span:nth-child(2){
  background:#dbeafe !important;
  color:#1d4ed8 !important;
  animation-name:hrReadyScopeText2 !important;
}
/* Escala 24x72 — roxo */
.hr-ready-scope-pill > span:nth-child(3){
  background:#ede9fe !important;
  color:#6d28d9 !important;
  animation-name:hrReadyScopeText3 !important;
}

@keyframes hrReadyScopeText1{
  0%, 1% { opacity:1; width:0ch; }
  11% { opacity:1; width:23ch; }
  30% { opacity:1; width:23ch; }
  32%, 100% { opacity:0; width:0ch; }
}
@keyframes hrReadyScopeText2{
  0%, 33% { opacity:0; width:0ch; }
  34% { opacity:1; width:0ch; }
  44% { opacity:1; width:12ch; }
  63% { opacity:1; width:12ch; }
  65%, 100% { opacity:0; width:0ch; }
}
@keyframes hrReadyScopeText3{
  0%, 66% { opacity:0; width:0ch; }
  67% { opacity:1; width:0ch; }
  77% { opacity:1; width:12ch; }
  96% { opacity:1; width:12ch; }
  98%, 100% { opacity:0; width:0ch; }
}

/* Flip corrigido: não espelha a frente; exibe verso útil */
.hr-ready-flip-card{
  position:relative !important;
  transform-style:preserve-3d !important;
}
.hr-ready-flip-inner{
  position:relative !important;
  min-height:92px !important;
  transform-style:preserve-3d !important;
}
.hr-ready-flip-face{
  -webkit-backface-visibility:hidden !important;
  backface-visibility:hidden !important;
  transform-style:preserve-3d !important;
}
.hr-ready-front{
  transform:rotateY(0deg) !important;
}
.hr-ready-back{
  transform:rotateY(180deg) !important;
  gap:.12rem;
}
.hr-ready-back strong,
.hr-ready-back span{
  transform:translateZ(1px);
}
.hr-ready-flip-card:hover .hr-ready-flip-inner{
  transform:rotateY(180deg) !important;
}
.hr-ready-flip-card:hover .hr-ready-front{
  opacity:0 !important;
}
.hr-ready-flip-card:hover .hr-ready-back{
  opacity:1 !important;
}
.hr-ready-back span{
  display:block;
  font-size:.68rem !important;
}

/* marca d'água por card melhor posicionada */
.hr-ready-flip-card::after{
  right:.5rem !important;
  bottom:.18rem !important;
  font-size:1.05rem !important;
  opacity:.75;
}
.hr-ready-flip-card[data-watermark="147"]::after{
  content:"147" !important;
}

/* texto principal melhor posicionado */
.hr-ready-text{
  margin:.75rem auto 1.05rem !important;
  max-width:500px !important;
  text-align:center !important;
  text-wrap:balance;
}

@media (max-width:575.98px){
  .hr-ready-scope-pill{
    width:238px !important;
    min-width:238px !important;
  }
}


/* V34 — modal HR Ahgora: cards simples, sem flip, e pills centralizados */
.hr-ready-stats{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:.55rem !important;
  align-items:stretch !important;
}
.hr-ready-stat-card{
  position:relative;
  min-height:104px;
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.18rem;
  padding:.68rem .55rem .72rem !important;
  border-radius:1rem !important;
  background:linear-gradient(180deg, rgba(248,250,252,.98), rgba(255,255,255,.94)) !important;
  border:1px solid #e2e8f0 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 6px 16px rgba(15,23,42,.035) !important;
  overflow:hidden;
}
.hr-ready-stat-card::after{
  content:attr(data-watermark);
  position:absolute;
  right:.52rem;
  bottom:.22rem;
  z-index:0;
  font-size:1.35rem;
  font-weight:950;
  color:rgba(15,23,42,.04);
  letter-spacing:.04em;
  pointer-events:none;
}
.hr-ready-stat-card b,
.hr-ready-stat-card small,
.hr-ready-stat-card em{
  position:relative;
  z-index:1;
}
.hr-ready-stat-card b{
  line-height:1;
  font-size:1.12rem;
  font-weight:950;
  color:#0f172a;
}
.hr-ready-stat-card small{
  display:block !important;
  color:#64748b;
  font-size:.7rem;
  font-weight:850;
  line-height:1.23;
}
.hr-ready-stat-card small strong{
  display:inline-block;
  margin-bottom:.06rem;
  color:#0f172a;
  font-size:.72rem;
  font-weight:950;
}
.hr-ready-stat-card em{
  display:block;
  margin-top:.12rem;
  color:#64748b;
  font-style:normal;
  font-size:.62rem;
  font-weight:850;
  line-height:1.18;
}

/* Desliga completamente o flip antigo */
.hr-ready-flip-card,
.hr-ready-flip-inner,
.hr-ready-flip-face,
.hr-ready-front,
.hr-ready-back{
  transform:none !important;
  backface-visibility:visible !important;
  perspective:none !important;
}
.hr-ready-flip-card:hover .hr-ready-flip-inner,
.hr-ready-flip-card:hover .hr-ready-front,
.hr-ready-flip-card:hover .hr-ready-back{
  transform:none !important;
  opacity:1 !important;
}

/* Pill de escalas: centralizado, largura correta e sem cortar texto */
.hr-ready-scope-pill{
  position:relative !important;
  width:270px !important;
  min-width:270px !important;
  max-width:100% !important;
  height:34px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  background:transparent !important;
  padding:0 !important;
}
.hr-ready-scope-pill > span{
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  transform:translate(-50%, -50%) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:30px !important;
  padding:0 .75rem !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  text-align:center !important;
  border-radius:999px !important;
  border-right:0 !important;
  opacity:0;
  max-width:260px !important;
}

/* A animação usa largura em px para não cortar 12x36/24x72 e não aparecer caractere extra */
.hr-ready-scope-pill > span:nth-child(1){
  background:#dcfce7 !important;
  color:#15803d !important;
  animation:hrScopeTypeRevez 24s steps(22,end) infinite !important;
}
.hr-ready-scope-pill > span:nth-child(2){
  background:#dbeafe !important;
  color:#1d4ed8 !important;
  animation:hrScopeType1236 24s steps(11,end) infinite !important;
}
.hr-ready-scope-pill > span:nth-child(3){
  background:#ede9fe !important;
  color:#6d28d9 !important;
  animation:hrScopeType2472 24s steps(11,end) infinite !important;
}

@keyframes hrScopeTypeRevez{
  0%, 1% { opacity:1; width:0; }
  11% { opacity:1; width:230px; }
  31% { opacity:1; width:230px; }
  33%, 100% { opacity:0; width:0; }
}
@keyframes hrScopeType1236{
  0%, 33% { opacity:0; width:0; }
  34% { opacity:1; width:0; }
  44% { opacity:1; width:132px; }
  64% { opacity:1; width:132px; }
  66%, 100% { opacity:0; width:0; }
}
@keyframes hrScopeType2472{
  0%, 66% { opacity:0; width:0; }
  67% { opacity:1; width:0; }
  77% { opacity:1; width:132px; }
  97% { opacity:1; width:132px; }
  99%, 100% { opacity:0; width:0; }
}

@media (max-width:575.98px){
  .hr-ready-stats{
    grid-template-columns:1fr !important;
  }
  .hr-ready-stat-card{
    min-height:86px;
  }
  .hr-ready-scope-pill{
    width:250px !important;
    min-width:250px !important;
  }
}


/* V35 — modal HR Ahgora com 2 cards principais */
.hr-ready-stats.hr-ready-stats-two{
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  max-width:420px;
  margin-inline:auto;
}
.hr-ready-stat-card-strong{
  min-height:112px !important;
}
.hr-ready-stat-card-strong b{
  font-size:1.12rem !important;
  margin:.08rem 0;
}
.hr-ready-stat-card-strong small strong{
  font-size:.78rem !important;
  color:#0f172a;
}
.hr-ready-stat-card-strong em{
  font-size:.66rem !important;
  max-width:150px;
}
.hr-ready-stat-card-strong span{
  position:relative;
  z-index:1;
  display:inline-flex;
  margin-top:.12rem;
  padding:.14rem .45rem;
  border-radius:999px;
  background:#ecfdf5;
  color:#15803d;
  font-size:.62rem;
  font-weight:950;
}
.hr-ready-stat-card-strong[data-watermark="147"] span{
  background:#eff6ff;
  color:#1d4ed8;
}
.hr-ready-stat-card-strong::after{
  font-size:1.55rem !important;
  color:rgba(15,23,42,.035) !important;
}
@media (max-width:575.98px){
  .hr-ready-stats.hr-ready-stats-two{
    grid-template-columns:1fr !important;
    max-width:100%;
  }
}


/* V36 — modal bonito para upload sem registros extraídos */
.upload-empty-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:2200;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1.25rem;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(10px);
  animation:uploadEmptyFade .22s ease both;
}
.upload-empty-modal{
  position:relative;
  width:min(540px, 100%);
  overflow:hidden;
  border-radius:2rem;
  padding:2rem;
  text-align:center;
  background:linear-gradient(145deg,#ffffff,#f8fbff 48%,#fff7ed);
  border:1px solid rgba(254,215,170,.95);
  box-shadow:0 28px 80px rgba(15,23,42,.25), inset 0 1px 0 rgba(255,255,255,.9);
  animation:uploadEmptyPop .28s cubic-bezier(.2,.9,.2,1.08) both;
}
.upload-empty-glow{
  position:absolute;
  width:280px;
  height:280px;
  left:50%;
  top:-155px;
  transform:translateX(-50%);
  background:radial-gradient(circle, rgba(245,158,11,.26), rgba(14,165,233,.12) 45%, transparent 70%);
  pointer-events:none;
}
.upload-empty-watermark{
  position:absolute;
  right:1.2rem;
  bottom:.8rem;
  z-index:0;
  font-size:3.3rem;
  font-weight:950;
  letter-spacing:.06em;
  color:rgba(15,23,42,.045);
  transform:rotate(-7deg);
  pointer-events:none;
  user-select:none;
}
.upload-empty-close{
  position:absolute;
  right:1rem;
  top:1rem;
  z-index:2;
  width:38px;
  height:38px;
  border:1px solid #fed7aa;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:.18s ease;
}
.upload-empty-close:hover{
  color:#0f172a;
  border-color:#fb923c;
  transform:rotate(90deg);
}
.upload-empty-icon{
  position:relative;
  z-index:1;
  width:88px;
  height:88px;
  margin:0 auto .85rem;
  border-radius:1.55rem;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#f59e0b,#fb923c);
  color:#fff;
  box-shadow:0 18px 35px rgba(245,158,11,.25);
}
.upload-empty-icon i{
  font-size:2.8rem;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.15));
}
.upload-empty-kicker{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.34rem .75rem;
  border-radius:999px;
  background:#ffedd5;
  color:#9a3412;
  font-weight:950;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.045em;
  margin-bottom:.8rem;
}
.upload-empty-modal h2{
  position:relative;
  z-index:1;
  margin:0 0 .55rem;
  font-size:1.45rem;
  line-height:1.18;
  font-weight:950;
  color:#0f172a;
}
.upload-empty-modal p{
  position:relative;
  z-index:1;
  color:#64748b;
  margin:0 auto 1.1rem;
  max-width:430px;
  line-height:1.55;
}
.upload-empty-grid{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:.75rem;
  margin:1rem auto 1.15rem;
}
.upload-empty-grid div{
  border:1px solid #fed7aa;
  background:rgba(255,255,255,.82);
  border-radius:1rem;
  padding:.85rem .75rem;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 8px 18px rgba(15,23,42,.045);
}
.upload-empty-grid i{
  display:block;
  color:#ea580c;
  font-size:1.25rem;
  margin-bottom:.35rem;
}
.upload-empty-grid strong{
  display:block;
  color:#0f172a;
  font-size:.86rem;
  font-weight:950;
  margin-bottom:.18rem;
}
.upload-empty-grid span{
  display:block;
  color:#64748b;
  font-size:.76rem;
  font-weight:750;
  line-height:1.3;
}
.upload-empty-primary{
  position:relative;
  z-index:1;
  border:0;
  border-radius:1rem;
  padding:.78rem 1rem;
  color:#fff;
  font-weight:950;
  background:linear-gradient(135deg,#f97316,#f59e0b);
  box-shadow:0 14px 30px rgba(249,115,22,.22);
}
.upload-empty-primary:hover{
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 16px 34px rgba(249,115,22,.28);
}
@keyframes uploadEmptyFade{
  from{opacity:0;}
  to{opacity:1;}
}
@keyframes uploadEmptyPop{
  from{opacity:0; transform:translateY(16px) scale(.96);}
  to{opacity:1; transform:translateY(0) scale(1);}
}
@media (max-width:575.98px){
  .upload-empty-modal{padding:1.45rem; border-radius:1.5rem;}
  .upload-empty-grid{grid-template-columns:1fr;}
}


/* V37 — modal sem HR direciona para Tabela */
.hr-ready-modal.is-empty .hr-ready-text{
  max-width:500px !important;
}
.hr-ready-modal.is-empty .hr-ready-empty-note{
  text-align:center;
  line-height:1.45;
}
.hr-ready-modal.is-empty .hr-ready-empty-note i{
  color:#ea580c;
}


/* V38 — organização interna dos cards do modal HR Ahgora */
.hr-ready-stats.hr-ready-stats-two{
  max-width:440px !important;
  gap:.7rem !important;
}
.hr-ready-stat-card-strong{
  min-height:124px !important;
  justify-content:flex-start !important;
  padding:.78rem .72rem .72rem !important;
  gap:.32rem !important;
}
.hr-ready-stat-top{
  position:relative;
  z-index:1;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.38rem;
  min-height:24px;
}
.hr-ready-stat-top strong{
  color:#0f172a;
  font-size:.78rem;
  font-weight:950;
  line-height:1.05;
}
.hr-ready-stat-icon{
  width:22px;
  height:22px;
  border-radius:.58rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 22px;
  background:#ecfdf5;
  color:#15803d;
  font-size:.78rem;
}
.hr-ready-card-intra .hr-ready-stat-icon{
  background:#eff6ff;
  color:#1d4ed8;
}
.hr-ready-stat-card-strong b{
  font-size:1.22rem !important;
  line-height:1.05 !important;
  margin:.08rem 0 .1rem !important;
}
.hr-ready-stat-meta{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:1fr;
  gap:.2rem;
  width:100%;
  margin-top:.05rem;
}
.hr-ready-stat-meta span{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:.14rem .38rem;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#64748b;
  font-size:.64rem;
  font-weight:850;
  line-height:1.05;
}
.hr-ready-verba-pill{
  position:relative;
  z-index:1;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  margin-top:.08rem;
  padding:.14rem .48rem;
  border-radius:999px;
  background:#dcfce7;
  color:#15803d;
  font-size:.62rem;
  font-weight:950;
}
.hr-ready-card-intra .hr-ready-verba-pill{
  background:#dbeafe;
  color:#1d4ed8;
}
.hr-ready-stat-card-strong::after{
  right:.58rem !important;
  bottom:.35rem !important;
  font-size:1.7rem !important;
  color:rgba(15,23,42,.03) !important;
}
.hr-ready-card-ajuda{
  border-color:#bbf7d0 !important;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,253,244,.78)) !important;
}
.hr-ready-card-intra{
  border-color:#bfdbfe !important;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,246,255,.78)) !important;
}
@media (max-width:575.98px){
  .hr-ready-stat-card-strong{
    min-height:112px !important;
  }
  .hr-ready-stat-meta{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}


/* V39 — refatoração clean da página Upload */
.upload-page-refined{
  --upload-blue:#2563eb;
  --upload-cyan:#06b6d4;
  --upload-slate:#64748b;
  --upload-ink:#0f172a;
}

.upload-refined-shell{
  display:flex;
  flex-direction:column;
  gap:1.15rem;
}

.upload-refined-hero{
  position:relative;
  overflow:hidden;
  padding:1.35rem 1.45rem;
  border-radius:1.45rem;
  border:1px solid #dbeafe;
  background:linear-gradient(135deg,#ffffff,#f8fbff 52%,#eefbff);
}

.upload-refined-hero-bg{
  position:absolute;
  inset:-45% -12% auto auto;
  width:420px;
  height:220px;
  background:radial-gradient(circle, rgba(37,99,235,.11), rgba(6,182,212,.09) 45%, transparent 72%);
  pointer-events:none;
}

.upload-refined-hero-main{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:1rem;
}

.upload-refined-mark{
  width:54px;
  height:54px;
  flex:0 0 54px;
  border-radius:1.1rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:linear-gradient(135deg,var(--upload-blue),var(--upload-cyan));
  box-shadow:0 16px 30px rgba(37,99,235,.18);
  font-size:1.45rem;
}

.upload-refined-kicker,
.upload-section-label{
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  color:#2563eb;
  font-size:.75rem;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.055em;
}

.upload-refined-hero h1{
  margin:.25rem 0 .25rem;
  font-size:clamp(1.75rem, 3vw, 2.55rem);
  line-height:1.05;
  font-weight:950;
  color:var(--upload-ink);
}

.upload-refined-hero p{
  max-width:860px;
  margin:0;
  color:#64748b;
  line-height:1.55;
}

.upload-refined-hero-badges{
  position:relative;
  z-index:1;
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  margin-top:1rem;
  padding-left:70px;
}

.upload-refined-hero-badges span{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.38rem .7rem;
  border-radius:999px;
  background:#fff;
  border:1px solid #dbeafe;
  color:#475569;
  font-size:.78rem;
  font-weight:850;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}

.upload-refined-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.32fr) minmax(340px, .68fr);
  gap:1.15rem;
  align-items:stretch;
}

.upload-refined-left,
.upload-refined-right{
  display:flex;
  flex-direction:column;
  gap:1.15rem;
}

.upload-action-card,
.upload-cache-card,
.upload-flow-card,
.upload-output-card{
  border-radius:1.45rem;
  border:1px solid #dbeafe;
  box-shadow:0 18px 45px rgba(15,23,42,.045);
}

.upload-action-card{
  padding:1.45rem;
}

.upload-action-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:1rem;
}

.upload-action-head h2,
.upload-cache-content h2,
.upload-flow-head h2{
  margin:.18rem 0 .25rem;
  color:var(--upload-ink);
  font-size:1.35rem;
  font-weight:950;
  line-height:1.1;
}

.upload-action-head p,
.upload-cache-content p,
.upload-flow-head p{
  margin:0;
  color:#64748b;
  line-height:1.45;
}

.upload-selected-counter{
  min-width:82px;
  height:70px;
  border-radius:1.1rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#64748b;
}

.upload-selected-counter.has-files{
  background:linear-gradient(135deg,#eff6ff,#ecfeff);
  border-color:#93c5fd;
  color:#2563eb;
}

.upload-selected-counter strong{
  font-size:1.55rem;
  line-height:1;
  font-weight:950;
}

.upload-selected-counter span{
  margin-top:.2rem;
  font-size:.72rem;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.upload-dropzone-refined{
  position:relative;
  min-height:260px;
  border-radius:1.35rem !important;
  border:1.5px dashed #93c5fd !important;
  background:
    radial-gradient(circle at 50% 22%, rgba(37,99,235,.08), transparent 30%),
    linear-gradient(180deg,#ffffff,#f8fbff);
  transition:.2s ease;
}

.upload-dropzone-refined:hover,
.upload-dropzone-refined.dragover{
  transform:translateY(-1px);
  border-color:#2563eb !important;
  box-shadow:0 18px 45px rgba(37,99,235,.10);
}

.upload-dropzone-orbit{
  position:relative;
  width:82px;
  height:82px;
  margin-bottom:.85rem;
  display:flex;
  align-items:center;
  justify-content:center;
}

.upload-dropzone-orbit span{
  position:absolute;
  inset:4px;
  border-radius:999px;
  border:2px solid rgba(37,99,235,.12);
  border-top-color:#2563eb;
  border-right-color:#06b6d4;
  animation:uploadRefinedSpin 4s linear infinite;
}

.upload-dropzone-orbit i{
  width:58px;
  height:58px;
  border-radius:1rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  font-size:1.55rem;
  box-shadow:0 14px 28px rgba(37,99,235,.18);
}

.upload-dropzone-refined h3{
  margin:0 0 .25rem;
  color:#0f172a;
  font-size:1.35rem;
  font-weight:950;
}

.upload-dropzone-refined p{
  color:#64748b;
  margin-bottom:1rem;
}

.upload-select-btn{
  border-radius:1rem;
  padding:.78rem 1.25rem;
  font-weight:950;
  box-shadow:0 12px 26px rgba(37,99,235,.18);
}

.upload-status-card{
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.85rem 1rem;
  border-radius:1rem;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#64748b;
  font-weight:850;
}

.upload-status-card.has-files{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1d4ed8;
}

.upload-status-card i{
  font-size:1.25rem;
}

.upload-session-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:.85rem;
}

.upload-cache-card{
  padding:1.05rem;
  background:linear-gradient(135deg,#ffffff,#f8fbff);
}

.upload-cache-card.is-success{
  border-color:#bbf7d0;
  background:linear-gradient(135deg,#ffffff,#f0fdf4);
}

.upload-cache-card.is-muted{
  border-color:#e2e8f0;
  background:linear-gradient(135deg,#ffffff,#f8fafc);
}

.upload-cache-inner{
  display:flex;
  align-items:flex-start;
  gap:.9rem;
}

.upload-cache-inner.compact{
  align-items:center;
}

.upload-cache-icon{
  width:44px;
  height:44px;
  flex:0 0 44px;
  border-radius:.95rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  box-shadow:0 10px 24px rgba(37,99,235,.16);
}

.upload-cache-card.is-success .upload-cache-icon{
  background:linear-gradient(135deg,#16a34a,#22c55e);
}

.upload-cache-card.is-muted .upload-cache-icon{
  background:linear-gradient(135deg,#64748b,#94a3b8);
}

.upload-cache-content small{
  display:block;
  color:#64748b;
  margin-top:.4rem;
  font-size:.82rem;
  line-height:1.4;
}

.upload-cache-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin-top:.85rem;
}

.upload-flow-card{
  padding:1.25rem;
  height:100%;
}

.upload-flow-head{
  margin-bottom:.85rem;
}

.upload-flow-list{
  display:flex;
  flex-direction:column;
}

.upload-flow-step{
  display:grid;
  grid-template-columns:38px minmax(0, 1fr);
  gap:.8rem;
  padding:.8rem 0;
  border-bottom:1px solid #e2e8f0;
}

.upload-flow-step:last-child{
  border-bottom:0;
}

.upload-flow-step > span{
  width:32px;
  height:32px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#eff6ff;
  color:#2563eb;
  font-weight:950;
}

.upload-flow-step strong{
  color:#0f172a;
  font-weight:950;
}

.upload-flow-step p{
  margin:.18rem 0 0;
  color:#64748b;
  font-size:.9rem;
  line-height:1.4;
}

.upload-flow-note{
  display:flex;
  align-items:flex-start;
  gap:.65rem;
  padding:.85rem;
  border-radius:1rem;
  background:#fffbeb;
  border:1px solid #fde68a;
  color:#92400e;
  margin-top:.85rem;
}

.upload-flow-note i{
  margin-top:.1rem;
}

.upload-flow-note strong,
.upload-flow-note span{
  display:block;
}

.upload-flow-note span{
  font-size:.82rem;
  line-height:1.35;
}

.upload-output-card{
  padding:1.1rem;
}

.upload-output-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:.55rem;
  margin-top:.75rem;
}

.upload-output-grid div{
  display:grid;
  grid-template-columns:34px minmax(0, 1fr);
  column-gap:.7rem;
  align-items:center;
  padding:.7rem;
  border-radius:.95rem;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}

.upload-output-grid i{
  grid-row:span 2;
  width:34px;
  height:34px;
  border-radius:.75rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#2563eb;
  background:#eff6ff;
}

.upload-output-grid strong{
  color:#0f172a;
  font-weight:950;
  line-height:1.1;
}

.upload-output-grid span{
  color:#64748b;
  font-size:.82rem;
}

@keyframes uploadRefinedSpin{
  to{transform:rotate(360deg);}
}

@media (max-width:1199.98px){
  .upload-refined-grid{
    grid-template-columns:1fr;
  }
  .upload-refined-right{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:767.98px){
  .upload-refined-hero,
  .upload-action-card,
  .upload-flow-card,
  .upload-output-card{
    padding:1.05rem;
    border-radius:1.15rem;
  }
  .upload-refined-hero-main{
    align-items:flex-start;
  }
  .upload-refined-hero-badges{
    padding-left:0;
  }
  .upload-action-head{
    flex-direction:column;
  }
  .upload-selected-counter{
    width:100%;
    height:auto;
    min-height:58px;
  }
  .upload-refined-right{
    display:flex;
  }
  .upload-dropzone-refined{
    min-height:230px;
  }
}


/* V40 — ajustes finais Upload: hero compacto, confirmação visual e modal sem HR mais limpo */
.upload-refined-hero{
  padding:.9rem 1.05rem !important;
  border-radius:1.15rem !important;
}
.upload-refined-hero-main{
  gap:.75rem !important;
}
.upload-refined-mark{
  width:44px !important;
  height:44px !important;
  flex-basis:44px !important;
  border-radius:.9rem !important;
  font-size:1.18rem !important;
}
.upload-refined-kicker{
  font-size:.68rem !important;
}
.upload-refined-hero h1{
  font-size:clamp(1.35rem, 2.35vw, 1.95rem) !important;
  margin:.12rem 0 .15rem !important;
}
.upload-refined-hero p{
  font-size:.92rem !important;
  line-height:1.42 !important;
  max-width:780px !important;
}
.upload-refined-hero-badges{
  margin-top:.55rem !important;
  padding-left:58px !important;
  gap:.4rem !important;
}
.upload-refined-hero-badges span{
  padding:.26rem .55rem !important;
  font-size:.7rem !important;
}

/* Modal de confirmação visual para limpar sessão */
.upload-clear-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:2300;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1.25rem;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(10px);
  animation:uploadEmptyFade .2s ease both;
}
.upload-clear-modal{
  position:relative;
  width:min(460px, 100%);
  overflow:hidden;
  border-radius:1.65rem;
  padding:1.65rem;
  text-align:center;
  background:linear-gradient(145deg,#ffffff,#f8fbff 48%,#fff1f2);
  border:1px solid #fecdd3;
  box-shadow:0 28px 75px rgba(15,23,42,.24), inset 0 1px 0 rgba(255,255,255,.9);
  animation:uploadEmptyPop .25s cubic-bezier(.2,.9,.2,1.05) both;
}
.upload-clear-glow{
  position:absolute;
  width:240px;
  height:240px;
  left:50%;
  top:-150px;
  transform:translateX(-50%);
  background:radial-gradient(circle, rgba(239,68,68,.20), rgba(37,99,235,.08) 48%, transparent 72%);
  pointer-events:none;
}
.upload-clear-close{
  position:absolute;
  right:.85rem;
  top:.85rem;
  z-index:2;
  width:36px;
  height:36px;
  border:1px solid #fecdd3;
  border-radius:999px;
  background:#fff;
  color:#64748b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.upload-clear-close:hover{
  color:#991b1b;
  transform:rotate(90deg);
}
.upload-clear-icon{
  position:relative;
  z-index:1;
  width:70px;
  height:70px;
  margin:0 auto .75rem;
  border-radius:1.25rem;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#dc2626,#f97316);
  color:#fff;
  font-size:1.8rem;
  box-shadow:0 16px 32px rgba(220,38,38,.20);
}
.upload-clear-kicker{
  position:relative;
  z-index:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.3rem .65rem;
  border-radius:999px;
  background:#fee2e2;
  color:#991b1b;
  font-size:.74rem;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.045em;
  margin-bottom:.65rem;
}
.upload-clear-modal h2{
  position:relative;
  z-index:1;
  margin:0 0 .45rem;
  color:#0f172a;
  font-size:1.35rem;
  font-weight:950;
}
.upload-clear-modal p{
  position:relative;
  z-index:1;
  max-width:360px;
  margin:0 auto 1rem;
  color:#64748b;
  line-height:1.5;
}
.upload-clear-actions{
  position:relative;
  z-index:1;
  display:flex;
  justify-content:center;
  gap:.55rem;
  flex-wrap:wrap;
}
.upload-clear-secondary,
.upload-clear-primary{
  border-radius:.9rem;
  padding:.72rem 1rem;
  font-weight:950;
}
.upload-clear-secondary{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#475569;
}
.upload-clear-primary{
  border:0;
  color:#fff;
  background:linear-gradient(135deg,#dc2626,#f97316);
  box-shadow:0 12px 26px rgba(220,38,38,.18);
}

/* Sem arquivo HR/CSV: não mostra card hr_ahgora vazio */
.hr-ready-no-export-card{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  margin:1rem auto 1rem;
  max-width:430px;
  padding:1rem 1.05rem;
  border-radius:1.15rem;
  background:linear-gradient(135deg,#fff7ed,#ffffff);
  border:1px solid #fed7aa;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 10px 24px rgba(15,23,42,.05);
}
.hr-ready-no-export-card::after{
  content:"TABELA";
  position:absolute;
  right:.7rem;
  bottom:.05rem;
  color:rgba(154,52,18,.05);
  font-size:2.1rem;
  font-weight:950;
  letter-spacing:.04em;
}
.hr-ready-no-export-icon{
  width:42px;
  height:42px;
  border-radius:.95rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#ffedd5;
  color:#ea580c;
  font-size:1.3rem;
}
.hr-ready-no-export-card strong{
  color:#0f172a;
  font-size:1rem;
  font-weight:950;
}
.hr-ready-no-export-card span{
  position:relative;
  z-index:1;
  color:#64748b;
  font-size:.86rem;
  line-height:1.45;
  max-width:340px;
}

@media (max-width:767.98px){
  .upload-refined-hero-badges{
    padding-left:0 !important;
  }
}


/* V41 — Upload info na appbar e remoção do hero superior */
.upload-intro-topbar{
  flex:1 1 auto;
  max-width:540px;
  min-width:260px;
  display:flex;
  align-items:center;
  gap:.65rem;
  padding:.48rem .75rem;
  border-radius:1rem;
  background:linear-gradient(135deg,#eff6ff,#ecfeff);
  border:1px solid #dbeafe;
  box-shadow:0 8px 20px rgba(37,99,235,.045);
}
.upload-intro-topbar.d-none{
  display:none !important;
}
.upload-intro-icon{
  width:36px;
  height:36px;
  flex:0 0 36px;
  border-radius:.8rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  box-shadow:0 8px 18px rgba(37,99,235,.16);
}
.upload-intro-copy{
  min-width:0;
}
.upload-intro-copy strong{
  display:block;
  color:#0f172a;
  font-size:.92rem;
  font-weight:950;
  line-height:1.1;
}
.upload-intro-copy small{
  display:block;
  color:#64748b;
  font-size:.76rem;
  font-weight:800;
  margin-top:.08rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Antes do upload, remove o botão Upload da appbar; depois volta ao normal */
body.is-pre-upload #btnUploadTopbar,
body.is-pre-upload #bottomNav [data-route-link="upload"]{
  display:none !important;
}

/* Como o resumo foi para a appbar, a tela de upload começa direto nos cards de ação */
.upload-page-refined .upload-refined-shell{
  gap:1rem !important;
}
.upload-page-refined .upload-refined-grid{
  margin-top:0 !important;
}
body.is-pre-upload .page-host{
  padding-top:1.05rem;
}

@media (max-width:1199.98px){
  .upload-intro-topbar{
    max-width:430px;
  }
}
@media (max-width:991.98px){
  .upload-intro-topbar{
    display:none !important;
  }
}


/* V42 — appbar sem banner e ícone CSV clean */
.brand-csv-icon{
  flex:0 0 auto;
  color:#16a34a;
  font-size:1.65rem;
  line-height:1;
  filter:drop-shadow(0 4px 8px rgba(22,163,74,.12));
}
.brand-csv-icon i{
  display:block;
}

/* Garante que o antigo banner da appbar não apareça mais */
.upload-intro-topbar{
  display:none !important;
}

/* Antes do upload, continua escondendo o botão Upload da appbar */
body.is-pre-upload #btnUploadTopbar,
body.is-pre-upload #bottomNav [data-route-link="upload"]{
  display:none !important;
}

/* V41 — abas na tela de upload inicial e correção de reupload após limpeza */
.upload-pre-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  padding:.55rem;
  border:1px solid #dbeafe;
  border-radius:1.15rem;
  background:linear-gradient(135deg,#ffffff,#f8fbff);
  box-shadow:0 14px 34px rgba(15,23,42,.04);
}
.upload-pre-tab{
  border:0;
  border-radius:.9rem;
  padding:.72rem 1rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  color:#475569;
  background:transparent;
  font-weight:950;
  transition:.18s ease;
}
.upload-pre-tab:hover{
  background:#eff6ff;
  color:#2563eb;
}
.upload-pre-tab.active{
  color:#fff;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  box-shadow:0 12px 26px rgba(37,99,235,.16);
}
.upload-tab-pane{
  display:none;
}
.upload-tab-pane.active{
  display:block;
}
.upload-refined-info-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.78fr);
  gap:1.15rem;
  align-items:stretch;
}
.upload-refined-info-grid .upload-cache-card{
  grid-column:1 / -1;
}

@media (max-width:991.98px){
  .upload-refined-info-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width:575.98px){
  .upload-pre-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .upload-pre-tab{
    padding:.65rem .7rem;
  }
}

/* V43 — mantém o botão Upload visível antes do processamento para voltar de Orientações */
body.is-pre-upload #btnUploadTopbar{
  display:inline-flex !important;
}
body.is-pre-upload #bottomNav [data-route-link="upload"]{
  display:flex !important;
}

/* V44 — appbar simplificada e página de Configurações */
.config-access-card{
  min-height:150px;
  transition:.18s ease;
}
.config-access-card:hover{
  transform:translateY(-2px);
}
.config-access-icon{
  width:48px;
  height:48px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#2563eb;
  background:#eff6ff;
  flex:0 0 auto;
  font-size:1.35rem;
}
#btnUploadTopbar{
  cursor:pointer;
}
#btnUploadTopbar:not(.active){
  background:#fff;
}

/* Página explicativa: Ajuda de Custo e Intrajornada */
.regras-pagamento-section .rule-value-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.75rem .9rem;
  border:1px solid rgba(37,99,235,.14);
  border-radius:1rem;
  background:rgba(248,250,252,.92);
}
.regras-pagamento-section .rule-value-line span{color:#52627a;font-weight:700;font-size:.9rem;}
.regras-pagamento-section .rule-value-line strong{font-size:1.05rem;color:#06142d;white-space:nowrap;}
.regras-pagamento-section .rule-mini-card,
.regras-pagamento-section .rule-check-card{
  height:100%;
  padding:1rem;
  border:1px solid rgba(147,197,253,.55);
  border-radius:1rem;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.regras-pagamento-section .rule-mini-card strong,
.regras-pagamento-section .rule-check-card strong{display:block;color:#06142d;margin-bottom:.35rem;}
.regras-pagamento-section .rule-mini-card span,
.regras-pagamento-section .rule-check-card span{display:block;color:#52627a;font-size:.93rem;line-height:1.45;}
.regras-pagamento-section .rule-mini-card.danger{border-color:rgba(248,113,113,.45);background:linear-gradient(180deg,#fff 0%,#fff7f7 100%);}
.regras-pagamento-section .rule-list{padding-left:1.2rem;}
.regras-pagamento-section .rule-list li{margin-bottom:.65rem;color:#52627a;}
.regras-pagamento-section .rule-list li strong{color:#06142d;}
.regras-pagamento-section .regra-table th{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#2563eb;
  background:#f8fbff;
}
.regras-pagamento-section .regra-table td{color:#52627a;}
.regras-pagamento-section .regra-table td strong{color:#06142d;}

/* V47 — bloqueio por PIN da página de regras de pagamento */
.regras-pagamento-section .regras-lock-card{
  min-height: 320px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
#modalPinRegras .modal-content{
  border-radius: 1.35rem;
}
#modalPinRegras .alert{
  border-radius: 1rem;
}


/* V46 — parâmetros melhorados e Help incorporado às regras de pagamento */
.params-section-v2 .params-hero-v2{
  background:linear-gradient(135deg,#ffffff 0%,#f3f8ff 58%,#eefdf8 100%);
  border-color:rgba(147,197,253,.45);
}
.params-summary-card{
  height:100%;
  padding:1rem 1.1rem;
  border:1px solid rgba(147,197,253,.55);
  border-radius:1.1rem;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.045);
}
.params-summary-card i{font-size:1.35rem;color:#2563eb;display:block;margin-bottom:.55rem;}
.params-summary-card span{display:block;color:#52627a;font-weight:800;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;}
.params-summary-card strong{display:block;color:#06142d;font-size:1.18rem;margin-top:.2rem;}
.params-alert-v2{border-radius:1.1rem;}
.param-category-card-v2{position:relative;overflow:hidden;}
.param-category-card-v2:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:linear-gradient(90deg,#2563eb,#06b6d4);}
.param-group-icon-primary{background:#eff6ff;color:#2563eb;}
.param-group-icon-info{background:#ecfeff;color:#0891b2;}
.param-group-icon-warning{background:#fffbeb;color:#d97706;}
.param-field-card-v2{border-color:rgba(203,213,225,.8);background:linear-gradient(180deg,#fff 0%,#f8fbff 100%);}
.param-field-card-v2 .form-control{border-left:0;}
.param-field-card-v2 .input-group-text{background:#fff;color:#2563eb;font-weight:800;}
.param-unit-pill{display:inline-flex;align-items:center;justify-content:center;min-width:42px;padding:.25rem .55rem;border-radius:999px;background:#eef6ff;color:#2563eb;font-weight:900;font-size:.75rem;}
.params-action-card{position:sticky;bottom:1rem;z-index:5;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);}
@media (max-width:991.98px){.params-action-card{position:static;}}
.regras-pagamento-section .new-value{display:inline-flex;padding:.15rem .5rem;border-radius:999px;background:#e7f8ef;color:#087b47;font-weight:900;}
.regras-pagamento-section .rule-block{background:#f8fbff;border:1px solid rgba(147,197,253,.45);border-radius:1rem;padding:1rem;}

/* V47 — Formato da saída como informação, não como botão */
.totvs-format-box{
  background:#f8fafc;
  border:1px solid #dbeafe;
  border-radius:1rem;
  padding:.75rem;
}
.totvs-format-switch{
  display:flex;
  align-items:stretch;
  gap:.65rem;
}
.totvs-format-current{
  flex:1 1 auto;
  min-height:82px;
  border-radius:1rem;
  border:1px solid #dbeafe;
  background:#fff;
  color:#0f172a;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:.38rem;
  padding:.72rem .85rem;
  cursor:default;
  user-select:none;
}
.totvs-format-current.is-csv{
  border-left:5px solid #2563eb;
}
.totvs-format-current.is-xlsx{
  border-left:5px solid #22c55e;
}
.totvs-format-current-label{
  font-size:.68rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#64748b;
  line-height:1;
}
.totvs-format-current-body{
  display:flex;
  align-items:center;
  gap:.7rem;
}
.totvs-format-current .totvs-format-icon-card{
  border:1px solid #dbeafe;
  background:#f8fafc;
  box-shadow:none;
}
.totvs-format-current.is-csv .totvs-format-icon-card{
  color:#2563eb;
  background:#eff6ff;
}
.totvs-format-current.is-xlsx .totvs-format-icon-card{
  color:#16a34a;
  background:#f0fdf4;
}
.totvs-format-current .totvs-format-text strong{
  color:#0f172a;
  font-size:1rem;
}
.totvs-format-current .totvs-format-text small{
  color:#64748b;
  opacity:1;
}
.totvs-format-cycle{
  flex:0 0 auto;
  width:auto;
  min-width:88px;
  min-height:82px;
  height:auto;
  padding:.55rem .75rem;
  border-radius:1rem;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#334155;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.28rem;
  font-weight:900;
  font-size:.78rem;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}
.totvs-format-cycle:hover{
  color:#2563eb;
  border-color:#93c5fd;
  background:#eff6ff;
}
.totvs-format-cycle span{
  line-height:1;
}
.totvs-format-cycle i{
  font-size:1rem;
  transition:transform .2s ease;
}
.totvs-format-cycle:hover i{
  transform:rotate(90deg);
}
@media (max-width: 767.98px){
  .totvs-format-switch{
    flex-direction:column;
  }
  .totvs-format-cycle{
    min-height:44px;
    width:100%;
    flex-direction:row;
  }
}

/* V48 — formato da saída alterna clicando no próprio bloco, sem botão separado */
.totvs-format-box{
  padding:.65rem;
}
.totvs-format-switch{
  display:block;
}
button.totvs-format-current{
  width:100%;
  border-radius:1rem;
  text-align:left;
  font:inherit;
  appearance:none;
  -webkit-appearance:none;
  cursor:pointer;
  min-height:74px;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
button.totvs-format-current:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  border-color:#93c5fd;
  background:#ffffff;
}
button.totvs-format-current:focus-visible{
  outline:3px solid rgba(37,99,235,.24);
  outline-offset:3px;
}
.totvs-format-current-body{
  justify-content:space-between;
  width:100%;
}
.totvs-format-current-body .totvs-format-text{
  flex:1 1 auto;
}
.totvs-format-hint{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#475569;
  margin-left:.25rem;
}
button.totvs-format-current:hover .totvs-format-hint{
  color:#2563eb;
  border-color:#93c5fd;
  background:#eff6ff;
}
button.totvs-format-current:hover .totvs-format-hint i{
  transform:rotate(90deg);
}
.totvs-format-hint i{
  transition:transform .18s ease;
}

/* v49 - Auditoria, segurança, backup e memória de cálculo */
.audit-page-v49 .audit-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.audit-kpi-card{padding:18px;display:flex;flex-direction:column;gap:4px;min-height:126px}
.audit-kpi-card i{font-size:1.35rem}.audit-kpi-card span{font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:#53627a;font-weight:800}.audit-kpi-card strong{font-size:1.45rem;line-height:1.15}.audit-kpi-card small{color:#64748b;font-weight:600}.audit-checklist{display:grid;gap:10px}.audit-check-item{display:flex;align-items:flex-start;gap:12px;border:1px solid #dbe7fb;border-radius:14px;padding:12px;background:#f8fbff;cursor:pointer}.audit-check-item span{display:flex;flex-direction:column}.audit-check-item small{color:#64748b}.quick-audit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.audit-page-v49 .table td,.audit-page-v49 .table th{vertical-align:middle}.memoria-item .pill{white-space:nowrap}.memoria-list{max-width:none;width:100%}.memoria-page-v49 .alert{line-height:1.55}
@media (max-width:1400px){.audit-page-v49 .audit-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:768px){.audit-page-v49 .audit-kpi-grid,.quick-audit-grid{grid-template-columns:1fr}.audit-kpi-card{min-height:auto}}


/* V50 — modal estilizado da aplicação para confirmações e alertas */
.ahgora-modal-layer{position:fixed;inset:0;z-index:2200;display:flex;align-items:center;justify-content:center;padding:24px}
.ahgora-modal-layer.d-none{display:none!important}
.ahgora-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(2px)}
.ahgora-modal-card{position:relative;z-index:1;width:min(560px,100%);background:#fff;border:1px solid rgba(147,197,253,.65);box-shadow:0 28px 70px rgba(15,23,42,.25);border-radius:22px;padding:22px;display:flex;gap:16px}
.ahgora-modal-icon{width:48px;height:48px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0d6efd,#08a6c8);color:#fff;flex:0 0 auto;font-size:1.25rem;box-shadow:0 12px 26px rgba(13,110,253,.25)}
.ahgora-modal-body{min-width:0;flex:1}
.ahgora-modal-details{margin-top:14px;background:#f8fbff;border:1px solid #dbeafe;border-radius:14px;padding:12px 14px;color:#334155}
.ahgora-modal-details ul{margin:0;padding-left:18px}.ahgora-modal-details li+li{margin-top:4px}
.btn-app-danger{background:linear-gradient(135deg,#dc3545,#ff4d5e);border:0;color:#fff;font-weight:800;border-radius:14px;padding:.65rem 1rem}.btn-app-danger:hover{color:#fff;filter:brightness(.97)}
.audit-checklist-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.audit-checklist-grid .audit-check-item{min-height:96px;align-items:flex-start}
.audit-inconsistency-search{max-width:420px}
.memoria-employee details,.memoria-employee{width:100%}
.memoria-employee-card{border:1px solid #dbeafe;border-radius:20px;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.06);margin-bottom:14px;overflow:hidden}
.memoria-employee-card summary{cursor:pointer;list-style:none;padding:18px 20px;display:flex;justify-content:space-between;gap:12px;align-items:center}
.memoria-employee-card summary::-webkit-details-marker{display:none}
.memoria-days-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0 20px 20px}
.memoria-day-card{border:1px solid #e2e8f0;border-radius:16px;background:#f8fbff;padding:14px;min-height:170px}
.memoria-day-card .memoria-date{font-weight:900;color:#0f172a}.memoria-day-card small{color:#64748b}
@media (max-width:1200px){.memoria-days-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.audit-checklist-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:768px){.memoria-days-grid{grid-template-columns:1fr}.audit-checklist-grid{grid-template-columns:1fr}.ahgora-modal-card{display:block}.ahgora-modal-icon{margin-bottom:12px}}


/* V51 — Memória de cálculo wide e ordenação ciclo 21-20 */
.memoria-page-v50 > .container-fluid{
  max-width:none !important;
  width:100% !important;
}
.memoria-page-v50 .memoria-list{
  max-width:none !important;
  width:100% !important;
}
.memoria-page-v50 .memoria-employee-card{
  width:100% !important;
}
.memoria-page-v50 .memoria-days-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  width:100%;
}
@media (max-width:1400px){
  .memoria-page-v50 .memoria-days-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:992px){
  .memoria-page-v50 .memoria-days-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:640px){
  .memoria-page-v50 .memoria-days-grid{grid-template-columns:1fr;}
}


/* V52 — Apuração de Jornada na Tabela/Memória */
.pill-apuracao{
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
}
.pill-danger-soft{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fecaca;
  font-weight:950;
}
.pill-night{
  background:#ede9fe;
  color:#6d28d9;
  border:1px solid #ddd6fe;
  font-weight:950;
}
.pill-extra50{
  background:#ecfdf5;
  color:#15803d;
  border:1px solid #bbf7d0;
  font-weight:950;
}
.pill-extra100{
  background:#fff7ed;
  color:#c2410c;
  border:1px solid #fed7aa;
  font-weight:950;
}


/* V53 — Memória de cálculo refinada */
.memoria-summary-main{min-width:220px;flex:1}
.memoria-summary-sub{display:block}
.memoria-summary-badges{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;max-width:min(54%,700px)}
.memoria-summary-chevron{font-size:1.1rem;transition:transform .18s ease}
.memoria-employee-card[open] .memoria-summary-chevron{transform:rotate(180deg)}
.memoria-day-card{
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  border:1px solid #dbe7fb;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
  min-height:unset;
}
.memoria-day-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}
.memoria-regime{display:block;color:#64748b;line-height:1.35;margin-top:3px}
.memoria-hours-badge{font-weight:800;font-size:.88rem;padding:.45rem .6rem;border-radius:12px}
.memoria-chip-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.memoria-chip{display:inline-flex;gap:4px;align-items:center;background:#f8fafc;border:1px solid #dbeafe;border-radius:999px;padding:4px 10px;font-size:.78rem;color:#475569}
.memoria-badges-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.memoria-verbas-box{background:#f8fbff;border:1px solid #dbeafe;border-radius:14px;padding:12px 12px 6px;margin-bottom:12px}
.memoria-verbas-title{font-size:.78rem;font-weight:900;color:#2563eb;text-transform:uppercase;letter-spacing:.04em;margin-bottom:10px}
.memoria-verbas-list{display:grid;gap:8px}
.memoria-verba-row{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px}
.memoria-verba-head{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;margin-bottom:4px}
.memoria-verba-code{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:28px;border-radius:10px;background:#f1f5f9;color:#0f172a;font-weight:900;font-size:.76rem;padding:0 8px}
.memoria-verba-head strong{font-size:.9rem;color:#0f172a}
.memoria-verba-value{font-weight:900;color:#0f172a;white-space:nowrap}
.memoria-verba-row small{display:block;color:#64748b;line-height:1.35}
.memoria-verba-row.verba-145{border-color:#bbf7d0;background:linear-gradient(180deg,#ffffff 0%,#f0fdf4 100%)}
.memoria-verba-row.verba-145 .memoria-verba-code{background:#dcfce7;color:#166534}
.memoria-verba-row.verba-147{border-color:#fde68a;background:linear-gradient(180deg,#ffffff 0%,#fffbeb 100%)}
.memoria-verba-row.verba-147 .memoria-verba-code{background:#fef3c7;color:#92400e}
.memoria-verba-row.verba-135{border-color:#ddd6fe;background:linear-gradient(180deg,#ffffff 0%,#f5f3ff 100%)}
.memoria-verba-row.verba-135 .memoria-verba-code{background:#ede9fe;color:#6d28d9}
.memoria-verba-row.verba-136{border-color:#bbf7d0;background:linear-gradient(180deg,#ffffff 0%,#f0fdf4 100%)}
.memoria-verba-row.verba-136 .memoria-verba-code{background:#dcfce7;color:#15803d}
.memoria-verba-row.verba-137{border-color:#fed7aa;background:linear-gradient(180deg,#ffffff 0%,#fff7ed 100%)}
.memoria-verba-row.verba-137 .memoria-verba-code{background:#ffedd5;color:#c2410c}
.memoria-verba-row.verba-falta{border-color:#fecaca;background:linear-gradient(180deg,#ffffff 0%,#fef2f2 100%)}
.memoria-verba-row.verba-falta .memoria-verba-code{background:#fee2e2;color:#991b1b}
.memoria-memory-text{font-size:.87rem;color:#475569;line-height:1.55}
.memoria-memory-text b{color:#0f172a}
@media (max-width:1200px){
  .memoria-employee-card summary{align-items:flex-start;flex-direction:column}
  .memoria-summary-badges{justify-content:flex-start;max-width:none}
}
@media (max-width:768px){
  .memoria-verba-head{grid-template-columns:1fr;align-items:flex-start}
  .memoria-verba-value{white-space:normal}
  .memoria-day-card-top{flex-direction:column}
}



/* V55 — Central de Versões */
.version-center-btn{
  border:1px solid #dbeafe !important;
  background:#f8fbff !important;
  color:#1d4ed8 !important;
  font-weight:850;
}
.version-center-btn:hover{
  background:#eff6ff !important;
  color:#1e40af !important;
}
.version-center-modal{
  border:0;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 30px 80px rgba(15,23,42,.22);
}
.version-center-kicker{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  padding:.28rem .65rem;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:.72rem;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.version-center-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.version-card{
  display:flex;
  flex-direction:column;
  gap:.55rem;
  min-height:245px;
  padding:16px;
  border-radius:20px;
  border:1px solid #e2e8f0;
  background:linear-gradient(180deg,#fff,#f8fbff);
  box-shadow:0 12px 30px rgba(15,23,42,.06);
}
.version-card.is-current-version{
  border-color:#93c5fd;
  box-shadow:0 16px 36px rgba(37,99,235,.12);
}
.version-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
}
.version-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:48px;
  height:32px;
  padding:0 .7rem;
  border-radius:999px;
  color:#1d4ed8;
  background:#eff6ff;
  font-weight:950;
}
.version-badge-current{
  color:#166534;
  background:#dcfce7;
}
.version-current-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.22rem .5rem;
  border-radius:999px;
  background:#0f172a;
  color:#fff;
  font-size:.68rem;
  font-weight:900;
  white-space:nowrap;
}
.version-card h6{
  margin:.3rem 0 0;
  font-weight:950;
  color:#0f172a;
}
.version-card p{
  flex:1;
  margin:0;
  color:#64748b;
  font-size:.88rem;
  line-height:1.45;
}
.version-center-note{
  display:flex;
  gap:.6rem;
  align-items:flex-start;
  margin-top:14px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid #fde68a;
  background:#fffbeb;
  color:#92400e;
  font-size:.86rem;
  line-height:1.4;
}
@media (max-width:992px){
  .version-center-grid{grid-template-columns:1fr;}
  .version-card{min-height:unset;}
}
