/* Adaptadores Next.js — mapeia seletores Streamlit → shell Next (pixel parity) */

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-sans, "Inter", ui-sans-serif, system-ui, sans-serif);
}

.arh-app-shell {
  min-height: 100vh;
  background: var(--surface-base);
  color: var(--text-primary);
}

/* Topnav fixed 56px — igual layout.css Streamlit */
.arh-topnav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  margin-left: 0 !important;
  z-index: 1000 !important;
}

.arh-main {
  margin-top: 56px !important;
  min-height: calc(100vh - 56px) !important;
  overflow-x: hidden !important;
  background: var(--surface-base);
}

.arh-page-content,
.arh-page {
  font-family: var(--font-sans);
  color: var(--text-primary);
  padding: 24px 20px;
  max-width: 1400px;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.5;
  animation: arhPageFadeIn 150ms ease-out;
  width: 100%;
  box-sizing: border-box;
}

@keyframes arhPageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .arh-page-content,
  .arh-page { animation: none !important; }
}

.arh-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.arh-page-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.arh-page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  line-height: 1.25;
}
.arh-page-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.arh-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Mock badge fixo — posição canônica topo-direita Streamlit */
.arh-mock-badge-fixed {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 1100;
  pointer-events: none;
}

/* Island iframes */
.arh-island-frame {
  width: 100%;
  border: 0;
  display: block;
  background: #0B1220;
  border-radius: 8px;
}

.arh-island-frame.embedded {
  border: 1px solid var(--border-default);
}

.arh-rm-island {
  min-height: min(360px, calc(100vh - 115px));
  height: calc(100vh - 115px) !important;
  border-radius: 0;
  border-left: 0 !important;
  border-right: 0 !important;
}

/* Roadmap gantt full-bleed sob a topnav (paridade Streamlit) */
.arh-page:has(.arh-rm-island) {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}
.arh-page:has(.arh-rm-island) .arh-page-header {
  padding-left: 20px;
  padding-right: 20px;
}

.arh-sf-island {
  min-height: 560px;
}

/* SubTabs no PageHeader: sem margin-top extra do wrap Streamlit */
.arh-page-header .arh-atd-pill-wrap,
.arh-page-header .arh-cv-pill-wrap,
.arh-page-header .arh-gv-pill-wrap {
  margin: 0;
  justify-content: flex-end;
}

/* Alias gv pill (= atd) se CSS legado não definir */
.arh-gv-pill-wrap { display: flex; justify-content: center; margin: 24px 0 0; }
.arh-gv-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}
.arh-gv-pill {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
}
.arh-gv-pill.active {
  background: var(--accent-brand);
  color: #fff;
  font-weight: 600;
}
.arh-gv-pill:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

/* SubTabs cfg/dir: faixa própria abaixo do título, igual em todas as abas */
.arh-page > .arh-cfg-pill-wrap,
.arh-page > .arh-dir-pill-wrap {
  justify-content: flex-start;
  margin: 0 0 20px;
}

/* SubTabs cfg/dir no PageHeader (outras telas) */
.arh-page-header .arh-cfg-pill-wrap,
.arh-page-header .arh-dir-pill-wrap {
  margin: 0;
  justify-content: flex-end;
}

/* cfg locked — visual muted, ainda clicável (paridade Next) */
.arh-cfg-pill.arh-cfg-pill--locked {
  opacity: 0.4;
  color: var(--text-disabled, var(--text-muted));
  pointer-events: auto;
  cursor: pointer;
}
.arh-cfg-pill.arh-cfg-pill--locked:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

/* ── AuthGate Next adapt (auth.css é Streamlit-tied) ── */
.arh-auth-screen {
  min-height: 100vh;
  background: var(--surface-base);
  color: var(--text-primary);
}
.arh-auth-main {
  padding: 72px 16px 32px;
  width: 100%;
  box-sizing: border-box;
}
.arh-auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  padding: 40px 36px 32px;
  text-align: center;
  box-sizing: border-box;
}
@media (max-width: 480px) {
  .arh-auth-card { padding: 28px 16px 24px; }
}
.arh-auth-card-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.arh-auth-card-logo {
  width: 48px;
  height: 48px;
  background: var(--accent-brand);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -1px;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
}
.arh-auth-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 12px;
}
.arh-auth-underline {
  width: 32px;
  height: 2px;
  background: var(--accent-brand);
  border-radius: 1px;
  margin: 0 auto 12px;
}
.arh-auth-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 28px;
}
.arh-auth-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.arh-auth-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.arh-auth-input {
  height: 40px;
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
  background: var(--auth-input-bg, var(--input-bg, var(--surface-sunken)));
  border: 1px solid var(--auth-input-border, var(--border-default));
  border-radius: var(--radius-base, 4px);
  color: var(--auth-input-text, var(--text-primary));
  font-size: 14px;
  letter-spacing: 0.05em;
  font-family: inherit;
  margin-bottom: 16px;
}
.arh-auth-input::placeholder {
  color: var(--auth-input-placeholder, var(--text-muted));
  letter-spacing: 0.1em;
}
.arh-auth-input:focus {
  outline: none;
  border-color: var(--auth-input-focus-ring, var(--accent-brand));
  box-shadow: 0 0 0 3px var(--auth-input-focus-glow, rgba(29, 78, 216, 0.25));
}
.arh-auth-input--error {
  border-color: var(--state-danger);
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.18);
}
.arh-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--alert-danger-bg, rgba(231, 76, 60, 0.12));
  border: 1px solid var(--alert-danger-border, rgba(231, 76, 60, 0.35));
  border-radius: var(--radius-base, 4px);
  color: var(--alert-danger-text, var(--state-danger));
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 16px;
}
.arh-auth-submit {
  height: 42px;
  width: 100%;
  background: var(--btn-primary-bg, var(--accent-brand));
  border: 1px solid var(--btn-primary-border, var(--accent-brand));
  border-radius: var(--radius-base, 4px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: var(--btn-primary-shadow, none);
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 24px;
}
.arh-auth-submit:hover:not(:disabled) {
  background: var(--btn-primary-bg-hover, var(--accent-brand));
  filter: brightness(1.05);
}
.arh-auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.arh-auth-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.arh-auth-hint code {
  color: var(--accent-brand-text, var(--accent-brand));
  font-size: 12px;
}

/* Direcionamento — botão ligar habilitado + histórico */
.dir-btn-ligar:not(:disabled) {
  opacity: 1;
  cursor: pointer;
}
.dir-btn-ligar:not(:disabled):hover {
  filter: brightness(1.06);
}
.dir-status-badge.active {
  background: rgba(46, 204, 113, 0.12);
  color: var(--state-success);
  border: 1px solid rgba(46, 204, 113, 0.25);
  margin-bottom: 16px;
}
.dir-status-badge.active .dot {
  background: var(--state-success);
  opacity: 1;
}
.dir-historico-section {
  max-width: 480px;
  margin: 0 auto 32px;
  padding: 0 8px;
}
.dir-historico-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dir-historico-title {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-secondary);
}
.dir-historico-meta {
  font-size: 0.75em;
  color: var(--text-muted);
}
.dir-historico-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 128px;
}
.dir-historico-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dir-historico-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: color-mix(in srgb, var(--accent-brand) 70%, transparent);
  min-height: 4px;
}
.dir-historico-label {
  font-size: 10px;
  color: var(--text-muted);
}

/* Config — drive badge + toggle + sync new */
.cfg-drive-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78em;
  font-weight: 600;
  background: rgba(46, 204, 113, 0.12);
  color: var(--state-success);
  border: 1px solid rgba(46, 204, 113, 0.12);
}
.cfg-drive-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}
.cfg-sync-new {
  display: inline-block;
  background: var(--accent-brand);
  color: var(--btn-primary-text, #fff);
  font-size: 0.68em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.cfg-toggle-wrap {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.cfg-toggle-wrap .cfg-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border-default);
  border-radius: 22px;
  transition: background 120ms;
}
.cfg-toggle-wrap .cfg-toggle-track::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--surface-base);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 120ms;
}
.cfg-toggle-wrap.cfg-toggle-on .cfg-toggle-track {
  background: var(--accent-brand);
}
.cfg-toggle-wrap.cfg-toggle-on .cfg-toggle-track::after {
  transform: translateX(18px);
}
@keyframes cfgSpin {
  to { transform: rotate(360deg); }
}
.cfg-spin {
  display: inline-block;
  animation: cfgSpin 0.8s linear infinite;
}

/* ── Painel BI chrome (tbnav/chips/nicho — CSS vive no Streamlit page) ── */
.arh-pbi-tbnav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  margin-bottom: 14px;
}
.arh-pbi-tbnav-period {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-base);
  font-size: 13px;
  color: var(--text-primary);
  min-width: 220px;
  cursor: pointer;
  position: relative;
  user-select: none;
  transition: border-color 120ms, background 120ms;
}
.arh-pbi-tbnav-period:hover,
.arh-pbi-tbnav-period.open {
  border-color: var(--accent-brand);
  background: var(--surface-hover, var(--surface-raised));
}
.arh-pbi-tbnav-period i.ico { font-size: 13px; color: var(--text-muted); }
.arh-pbi-tbnav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.arh-pbi-tbnav-period-value { font-weight: 500; }
.arh-pbi-tbnav-period .caret {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: auto;
  transition: transform 120ms;
}
.arh-pbi-tbnav-period.open .caret { transform: rotate(180deg); }
.arh-pbi-tbnav-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.arh-pbi-tbnav-badge.ano {
  color: var(--accent-brand-text);
  background: rgba(77, 159, 255, 0.16);
}
.arh-pbi-period-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px;
  min-width: 300px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  display: none;
  text-align: left;
  cursor: default;
}
.arh-pbi-period-popover.open { display: block; }
.arh-pbi-period-popover .pop-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.arh-pbi-period-popover .range-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.arh-pbi-period-popover .range-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.arh-pbi-period-popover .range-field label {
  font-size: 11px;
  color: var(--text-muted);
}
.arh-pbi-period-popover .range-field input[type="date"] {
  padding: 8px 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface-sunken);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
}
.arh-pbi-period-popover .pop-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}
.arh-pbi-period-popover .pop-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.arh-pbi-period-popover .pop-contract {
  font-size: 12px;
  color: var(--text-secondary);
}
.arh-pbi-period-popover .pop-clear,
.arh-pbi-period-popover .pop-apply {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--surface-sunken);
  color: var(--text-secondary);
}
.arh-pbi-period-popover .pop-apply {
  background: var(--accent-brand);
  border-color: var(--accent-brand);
  color: #fff;
}

.arh-pbi-chips-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 8px);
  margin-top: 0;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.arh-pbi-chips-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-right: 4px;
}
.arh-pbi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 4px 0 10px;
  background: rgba(29, 78, 216, 0.08);
  border: 1px solid rgba(29, 78, 216, 0.3);
  border-radius: 999px;
  box-sizing: border-box;
  font-size: 12px;
  color: var(--accent-brand-text);
  white-space: nowrap;
  cursor: pointer;
}
.arh-pbi-chip i { font-size: 12px; opacity: 0.8; }
.arh-pbi-chip strong { color: var(--text-primary); font-weight: 600; }
.arh-pbi-chip-value { color: var(--accent-brand-text); font-weight: 500; }
.arh-pbi-chip-x {
  cursor: pointer;
  border: none;
  background: var(--surface-sunken);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  font-family: inherit;
  padding: 0;
}
.arh-pbi-chip-x:hover {
  color: #fff;
  background: var(--state-danger);
}
.arh-pbi-chip-add-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.arh-pbi-btn-limpar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.arh-pbi-btn-limpar:hover {
  color: var(--text-primary);
  border-color: var(--border-default);
}
.arh-pbi-add-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 250;
  min-width: 200px;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  padding: 8px;
  display: none;
}
.arh-pbi-add-dropdown.open { display: block; }
.arh-pbi-add-dropdown h4 {
  margin: 0 0 6px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.arh-pbi-add-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.arh-pbi-add-item:hover,
.arh-pbi-add-item.active {
  background: rgba(29, 78, 216, 0.1);
  color: var(--accent-brand-text);
}

/* nicho / card — paridade _bi_shared */
.nicho { margin-top: 24px; }
.nicho:first-child { margin-top: 2px; }
/* Em grid (3 donuts), todos os nichos alinhados no topo */
.arh-pbi-two-col > .nicho {
  margin-top: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.arh-pbi-two-col > .nicho > .card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.arh-pbi-two-col .plot.donut-h {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nicho-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}
.nicho-head .tx {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
  color: var(--text-muted);
}
.nicho-head .per {
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.85;
  color: var(--text-muted);
}
.nicho-head .ln {
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.nicho > .card {
  padding: 13px 16px 10px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

/* Roadmap/Consulta: tipo-card as <button> */
button.arh-cv-tipo-card {
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

/* ── Navigation loading (páginas + abas) ── */
.arh-main-wrapper {
  position: relative;
  min-height: calc(100vh - 56px);
}

.arh-nav-progress {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  overflow: hidden;
  background: transparent;
}
.arh-nav-progress.active {
  opacity: 1;
}
.arh-nav-progress-bar {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent-brand), #5EB3E4, var(--accent-brand));
  background-size: 200% 100%;
  border-radius: 0 2px 2px 0;
  animation: arhNavProgress 900ms ease-in-out infinite;
  box-shadow: 0 0 8px rgba(29, 78, 216, 0.55);
}
@keyframes arhNavProgress {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(120%); }
  100% { transform: translateX(280%); }
}

.arh-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: var(--surface-base);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 24px 20px;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  box-sizing: border-box;
  /* cobre o main inteiro, não só o max-width da página */
  width: 100%;
  max-width: none;
  margin: 0;
}
.arh-loading-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.arh-nav-loading-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arh-nav-loading-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.arh-nav-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-brand);
  border-top-color: transparent;
  border-radius: 50%;
  animation: arhNavSpin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes arhNavSpin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .arh-nav-progress-bar,
  .arh-nav-spinner {
    animation: none !important;
  }
  .arh-nav-progress.active .arh-nav-progress-bar {
    width: 70%;
    transform: none;
  }
}

/* ── Admin modules (usuários / clientes) ─────────────────────────────── */
.arh-btn-primary,
.arh-btn-ghost,
.arh-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-base, 4px);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
}
.arh-btn-primary {
  background: var(--accent-brand);
  color: #fff;
}
.arh-btn-primary:disabled,
.arh-btn-ghost:disabled,
.arh-btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }
.arh-btn-ghost {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-primary);
}
.arh-btn-danger {
  background: var(--state-danger);
  color: #fff;
  border-color: var(--state-danger);
}

.arh-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.cfg-panel-header + * > .arh-admin-toolbar:first-of-type {
  margin-top: 0;
}
.arh-admin-search,
.arh-admin-select {
  flex: 1 1 220px;
  min-width: 180px;
  height: 40px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: var(--radius-base, 4px);
  border: 1px solid var(--border-default);
  background: var(--surface-sunken, var(--surface-base));
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.arh-admin-select {
  flex: 0 1 auto;
  min-width: 140px;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface-sunken, var(--surface-base));
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%237a96b5' d='M1.2 1.2 6 6.2 10.8 1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.arh-admin-search::placeholder {
  color: var(--text-muted);
}
.arh-admin-search:focus,
.arh-admin-select:focus {
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px var(--focus-ring-glow, rgba(29, 78, 216, 0.25));
}

.arh-admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-elevated, var(--surface-card));
}
.arh-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.arh-admin-table th,
.arh-admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle, var(--border-default));
  text-align: left;
  vertical-align: middle;
  color: var(--text-secondary);
}
.arh-admin-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #7a8698);
  background: rgba(0,0,0,0.12);
}
.arh-admin-sort {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.arh-admin-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arh-admin-name strong { color: var(--text-primary); font-weight: 650; }
.arh-admin-name span { font-size: 11px; color: var(--text-muted, #7a8698); }
.arh-admin-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.arh-admin-chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(77, 159, 255, 0.14);
  color: var(--accent-brand-text, #4D9FFF);
}
.arh-admin-status.is-on { color: #34d399; font-weight: 650; }
.arh-admin-status.is-off { color: #f87171; font-weight: 650; }
button.arh-admin-status.is-toggle {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
button.arh-admin-status.is-toggle.is-on {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
}
button.arh-admin-status.is-toggle.is-off {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
}
button.arh-admin-status.is-toggle:hover,
button.arh-admin-status.is-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring-glow, rgba(29, 78, 216, 0.25));
}
.arh-admin-actions { white-space: nowrap; }
.arh-admin-actions button {
  background: none;
  border: 0;
  color: var(--accent-brand-text, #4D9FFF);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
  padding: 0;
}
.arh-admin-actions button.is-danger { color: #f87171; }
.arh-admin-empty {
  text-align: center;
  padding: 28px 12px !important;
  color: var(--text-muted);
}

.arh-admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.arh-admin-pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.arh-admin-pager-controls button {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--surface-base);
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}
.arh-admin-pager-controls button:disabled { opacity: 0.45; cursor: not-allowed; }

.arh-admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.arh-admin-inline-form .arh-field-input { max-width: 200px; }

.arh-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
}
.arh-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.arh-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--surface-elevated, #1a2736);
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 32px rgba(0,0,0,0.35);
}
.arh-drawer-head,
.arh-drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-default);
}
.arh-drawer-foot {
  border-bottom: 0;
  border-top: 1px solid var(--border-default);
  justify-content: flex-end;
}
.arh-drawer-head h2 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}
.arh-drawer-head button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.arh-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.arh-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.arh-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.arh-field-input,
select.arh-field-input,
textarea.arh-field-input {
  height: 40px;
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: var(--radius-base, 4px);
  border: 1px solid var(--border-default);
  background: var(--surface-sunken, var(--surface-base));
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
select.arh-field-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface-sunken, var(--surface-base));
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%237a96b5' d='M1.2 1.2 6 6.2 10.8 1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.arh-field-input::placeholder {
  color: var(--text-muted);
}
.arh-field-input:focus,
select.arh-field-input:focus,
textarea.arh-field-input:focus {
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px var(--focus-ring-glow, rgba(29, 78, 216, 0.25));
}
.arh-field-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.arh-field-input--error,
select.arh-field-input.arh-field-input--error,
textarea.arh-field-input.arh-field-input--error {
  border-color: var(--state-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}
.arh-field-input--error:focus,
select.arh-field-input.arh-field-input--error:focus,
textarea.arh-field-input.arh-field-input--error:focus {
  border-color: var(--state-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}
.arh-field > .arh-field-error {
  margin: 0;
}
.arh-field-textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
}
.arh-field-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.arh-field-row > .arh-field {
  flex: 1 1 0;
}
.arh-field-row > .arh-field--sm {
  flex: 0 0 80px;
}
.arh-field-hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted, #7a8698);
  line-height: 1.4;
}
.arh-field-error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #f87171;
}
.arh-field-checks {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arh-field-multicheck {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base, 4px);
  background: var(--surface-sunken, transparent);
  max-height: 160px;
  overflow: auto;
}
.arh-tz-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.arh-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  min-height: 28px;
  cursor: pointer;
}
.arh-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid var(--border-default);
  border-radius: 3px;
  background: var(--surface-sunken, var(--surface-base));
  cursor: pointer;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.arh-check input[type="checkbox"]:checked {
  background-color: var(--accent-brand);
  border-color: var(--accent-brand);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='%23fff' stroke-width='2' d='M2 6.5 4.8 9.2 10 3.2'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}
.arh-check input[type="checkbox"]:focus-visible {
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 3px var(--focus-ring-glow, rgba(29, 78, 216, 0.25));
}

/* ── Confirm / alert modal ───────────────────────────────────────────── */
.arh-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.arh-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.arh-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: var(--surface-elevated, #1a2736);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.arh-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.arh-modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.arh-modal-prompt {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.arh-modal-prompt kbd {
  display: inline-block;
  padding: 1px 6px;
  margin: 0 2px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--surface-sunken, var(--surface-base));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base, 4px);
}
.arh-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
