:root {
  --vf-ui-bg: var(--vf-color-canvas);
  --vf-ui-surface: var(--vf-color-surface);
  --vf-ui-surface-soft: var(--vf-color-surface-soft);
  --vf-ui-ink: var(--vf-color-ink);
  --vf-ui-muted: var(--vf-color-muted);
  --vf-ui-border: var(--vf-color-border);
  --vf-ui-navy: var(--vf-color-sidebar);
  --vf-ui-navy-2: #12263a;
  --vf-ui-blue: var(--vf-color-primary);
  --vf-ui-violet: var(--vf-color-intelligence);
  --vf-ui-cyan: var(--vf-color-teal);
  --vf-ui-success: var(--vf-color-success);
  --vf-ui-warning: var(--vf-color-warning);
  --vf-ui-danger: var(--vf-color-danger);
  --vf-ui-radius: var(--vf-radius-md);
  --vf-ui-shadow: var(--vf-shadow-sm);
}

body {
  background: var(--vf-ui-bg) !important;
  color: var(--vf-ui-ink);
}

.page-container,
.main-content { background: transparent !important; }

.sidebar {
  width: 252px !important;
  background: var(--vf-ui-navy) !important;
  border-right: 1px solid rgba(148, 163, 184, .11) !important;
  box-shadow: none;
}

.main-content { margin-left: 252px !important; }

.vf-sidebar-brand-wrap {
  padding: 24px 20px !important;
  border-bottom: 1px solid rgba(255,255,255,.075) !important;
}
.vf-sidebar-brand { gap: 9px !important; min-width:0; align-items:center; }
.vf-sidebar-mark {
  display:block;
  width:31px !important;
  height:31px !important;
  object-fit:contain;
  flex:0 0 31px;
  background:transparent;
  filter: none;
}
.vf-sidebar-brand-copy { min-width:0; }
.vf-sidebar-wordmark {
  color:#fff !important;
  font-size:17px !important;
  line-height:1 !important;
  font-weight:800 !important;
  letter-spacing:-.045em !important;
  white-space:nowrap;
}
.vf-sidebar-wordmark span { color:#8FAEFF !important; }

.nav-section {
  margin-top: 20px !important;
  margin-bottom: 6px !important;
  color: #93a6c1 !important;
  font-size: 12px !important;
  letter-spacing: .09em !important;
}
.nav-section.nav-section-active { color: #aabcfb !important; }
.nav-link {
  min-height: 44px;
  margin: 2px 7px !important;
  padding: 10px 12px !important;
  color: #bac8dd !important;
  border: 1px solid transparent;
  border-radius: var(--vf-radius-sm) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.nav-link > svg,
.nav-link > i {
  width: 17px !important;
  height: 17px !important;
  color: #91a4c0;
  transition: color .2s ease;
}
.nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.06);
}
.nav-link:hover > svg,
.nav-link:hover > i { color: #c5d2ff; }
.nav-link.active {
  color: #fff !important;
  background: #233b60 !important;
  border-color: #38557f;
  box-shadow: inset 3px 0 0 #8ba9ff !important;
}
.nav-link.active > svg,
.nav-link.active > i { color: #fff; }

.vf-sidebar-account-wrap { padding: 14px !important; }
.vf-sidebar-account {
  padding: 11px !important;
  border-radius: 15px !important;
  border-color: rgba(255,255,255,.075) !important;
  background: rgba(255,255,255,.055) !important;

}
.vf-sidebar-avatar {
  width: 36px !important;
  height: 36px !important;
  background: var(--vf-ui-blue) !important;
  box-shadow: none;
}

.vf-topbar {
  background: var(--vf-color-surface) !important;
  border-bottom: 1px solid rgba(226,232,240,.8) !important;

}
.vf-topbar-inner {
  min-height: var(--vf-topbar-height) !important;
  padding: 14px var(--vf-page-gutter) !important;
}
.vf-topbar h1 {
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -.035em !important;
  color: var(--vf-color-ink) !important;
}
.vf-topbar p { color: var(--vf-color-muted) !important; }
.vf-page-content {
  padding: 24px var(--vf-page-gutter) 40px !important;
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
}

.card {
  background: var(--vf-color-surface) !important;
  border: 1px solid var(--vf-ui-border) !important;
  border-radius: var(--vf-ui-radius) !important;
  box-shadow: var(--vf-shadow-sm) !important;
}
.card:hover { border-color: #dce2ee !important; }

.btn {
  min-height: 44px;
  padding: 10px 17px !important;
  border-radius: var(--vf-radius-sm) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}
.btn-primary {
  background: var(--vf-ui-blue) !important;
  box-shadow: 0 1px 2px rgba(16,30,52,.1) !important;
}
.btn-primary:hover {
  background: var(--vf-color-primary-hover) !important;
  box-shadow: 0 2px 5px rgba(16,30,52,.14) !important;
}
.btn-secondary {
  background: #fff !important;
  color: #536176 !important;
  border: 1px solid var(--vf-ui-border) !important;
  box-shadow: 0 3px 10px rgba(32, 45, 76, .035);
}
.btn-secondary:hover { background: #f8f9fc !important; border-color: #d8deea !important; }

.form-label {
  margin-bottom: 8px !important;
  color: #4b586d !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.form-input, .form-select, .form-textarea {
  min-height: 44px;
  padding: 11px 13px !important;
  color: #243047 !important;
  background: var(--vf-color-surface) !important;
  border: 1px solid var(--vf-color-border-strong) !important;
  border-radius: var(--vf-radius-sm) !important;
  box-shadow: none;
}
/* Garante espaço para prefixos, ícones de busca e sufixos. */
.form-input.pl-10, .form-select.pl-10 { padding-left: 2.5rem !important; }
.form-input.pr-11, .form-select.pr-11 { padding-right: 2.75rem !important; }
.form-input.pr-20, .form-select.pr-20 { padding-right: 5rem !important; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  background: #fff !important;
  border-color: var(--vf-color-primary) !important;
  box-shadow: var(--vf-focus-ring) !important;
}

/* Shared workspace language */
.vf-workspace { max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
.vf-workspace-wide { max-width: 1320px; }
.vf-workspace-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border: 1px solid var(--vf-color-border);
  border-radius: var(--vf-radius-lg);
  background: var(--vf-color-surface, #fff);
  box-shadow: var(--vf-ui-shadow);
}
.vf-workspace-hero::before, .vf-workspace-hero::after { content: none; }
.vf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--vf-color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.vf-hero-title {
  margin-top: 9px;
  color: var(--vf-color-ink);
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -.035em;
}
.vf-hero-copy { margin-top: 8px; max-width: 720px; color: var(--vf-color-muted); font-size: 14px; line-height: 1.65; }
.vf-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.vf-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.vf-span-12 { grid-column: span 12; }
.vf-span-8 { grid-column: span 8; }
.vf-span-6 { grid-column: span 6; }
.vf-span-4 { grid-column: span 4; }

.vf-panel {
  border: 1px solid var(--vf-ui-border);
  border-radius: var(--vf-radius-lg);
  background: var(--vf-color-surface, #fff);
  box-shadow: var(--vf-shadow-sm);
  overflow: hidden;
}
.vf-panel-head { padding: 19px 21px; border-bottom: 1px solid #edf0f5; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.vf-panel-body { padding: 21px; }
.vf-panel-title { color:#222d43; font-size:14px; font-weight:600; letter-spacing:-.02em; }
.vf-panel-copy { color:var(--vf-color-muted); font-size:13px; line-height:1.55; margin-top:3px; }

.vf-icon-box {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--vf-color-primary-soft, #edf4ff);
  color: var(--vf-color-primary, #2563eb);
  border: 1px solid #d7e5fb;
}
.vf-icon-box svg { width: 19px; height: 19px; }

.vf-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.vf-status::before { content:''; width:6px; height:6px; border-radius:999px; background:currentColor; opacity:.8; }
.vf-status-success { color:#118056; background:#eaf8f2; border:1px solid #d5f0e5; }
.vf-status-warning { color:#a46b16; background:#fff6e5; border:1px solid #f9e8c6; }
.vf-status-neutral { color:#657289; background:#f1f4f8; border:1px solid #e4e8ef; }
.vf-status-danger { color:#b43d4d; background:#fff0f2; border:1px solid #f8dce0; }

.vf-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid #eef1f6;
}
.vf-setting-row:last-child { border-bottom: 0; }
.vf-setting-label { color:#2e3a51; font-size:12px; font-weight:750; }
.vf-setting-copy { color:var(--vf-color-muted); font-size:13px; line-height:1.5; margin-top:3px; }

.vf-toggle { position:relative; width:44px; height:24px; flex:0 0 auto; }
.vf-toggle input { position:absolute; opacity:0; pointer-events:none; }
.vf-toggle-track {
  position:absolute; inset:0; border-radius:999px; background:#dfe4ec; transition:.2s ease; box-shadow:inset 0 1px 2px rgba(15,23,42,.08);
}
.vf-toggle-track::after {
  content:''; position:absolute; width:18px; height:18px; top:3px; left:3px; border-radius:50%; background:#fff; box-shadow:0 2px 7px rgba(15,23,42,.16); transition:.2s ease;
}
.vf-toggle input:checked + .vf-toggle-track { background:var(--vf-color-primary, #2563eb); }
.vf-toggle input:checked + .vf-toggle-track::after { transform:translateX(20px); }
.vf-toggle input:focus-visible + .vf-toggle-track { box-shadow:var(--vf-focus-ring); }

.vf-card-link {
  display:flex;
  flex-direction:column;
  gap:18px;
  min-height:180px;
  padding:22px;
  color:inherit;
  border:1px solid var(--vf-ui-border);
  border-radius:var(--vf-radius-lg);
  background:var(--vf-color-surface, #fff);
  box-shadow:var(--vf-shadow-sm);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.vf-card-link:hover { transform:none; border-color:var(--vf-color-primary-border); box-shadow:var(--vf-shadow-md); }
.vf-card-link-title { color:#253047; font-size:14px; font-weight:600; letter-spacing:-.025em; }
.vf-card-link-copy { color:var(--vf-color-muted); font-size:13px; line-height:1.6; }

.vf-callout {
  padding:16px 18px;
  border:1px solid #dfe6f8;
  border-radius:var(--vf-radius-md);
  background:var(--vf-color-surface-soft, #f8fafb);
  color:#536079;
  font-size:13px;
  line-height:1.6;
}

.data-table,
#customers-table { border-collapse: separate !important; border-spacing: 0 !important; }
.data-table th,
#customers-table th {
  background: var(--vf-color-surface-soft, #f8fafb) !important;
  color: var(--vf-color-muted, #66758a) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .045em !important;
  text-transform: uppercase;
}
.data-table td,
#customers-table td { border-bottom: 1px solid #edf1f4; }
.data-table tbody tr,
#customers-table tbody tr { transition: background-color .15s ease; }
.data-table tbody tr:hover,
#customers-table tbody tr:hover { background: var(--vf-color-primary-soft, #edf4ff) !important; box-shadow: none !important; }
.data-table a,
#customers-table a { transition: color .15s ease, background-color .15s ease; }
.payment-table th, .payment-table td { padding-top: 13px !important; padding-bottom: 13px !important; }

@media (max-width: 1024px) {
  .main-content { margin-left: 0 !important; }
  .vf-page-content { padding: 22px 18px 42px !important; }
  .vf-workspace-hero { padding:24px 22px; }
  .vf-span-8, .vf-span-6, .vf-span-4 { grid-column:span 12; }
}

@media (max-width: 640px) {
  .vf-topbar-inner { min-height:72px !important; }
  .vf-page-content { padding:18px 14px 36px !important; }
  .vf-workspace { gap:16px; }
  .vf-workspace-hero { padding:21px 18px; border-radius:var(--vf-radius-lg); }
  .vf-hero-title { font-size:22px; }
  .vf-panel-head, .vf-panel-body { padding:17px; }
  .vf-card-link { min-height:unset; padding:18px; }
}


/* Vidalys Signal role utilities */
.vf-role-action {
  color: var(--vf-color-primary);
  background: var(--vf-color-primary-soft);
  border-color: var(--vf-color-primary-border);
}
.vf-role-flow {
  color: var(--vf-color-teal);
  background: var(--vf-color-teal-soft);
  border-color: var(--vf-color-teal-border);
}
.vf-role-intelligence {
  color: var(--vf-color-intelligence);
  background: var(--vf-color-intelligence-soft);
  border-color: var(--vf-color-intelligence-border);
}
.vf-channel-whatsapp {
  color: var(--vf-color-channel-whatsapp);
  background: var(--vf-color-channel-whatsapp-soft);
}
.vf-channel-site {
  color: var(--vf-color-channel-site);
  background: var(--vf-color-channel-site-soft);
}
.vf-signal-stripe-action { box-shadow: inset 3px 0 0 var(--vf-color-primary); }
.vf-signal-stripe-flow { box-shadow: inset 3px 0 0 var(--vf-color-teal); }
.vf-signal-stripe-intelligence { box-shadow: inset 3px 0 0 var(--vf-color-intelligence); }

/* Shared interaction states, without overriding component-specific geometry. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--vf-color-primary);
  outline-offset: 3px;
}
.btn:disabled, button[disabled], input[disabled], select[disabled], textarea[disabled] {
  cursor: not-allowed;
  opacity: .6;
}
.btn:disabled { transform: none; box-shadow: none !important; }
[aria-invalid="true"] { border-color: var(--vf-color-danger) !important; }
.form-error { margin-top: 8px; color: #b42332; font-size: var(--vf-font-meta); line-height: 1.5; }
.form-help { margin-top: 8px; color: var(--vf-color-muted); font-size: var(--vf-font-meta); line-height: 1.5; }
[data-table-scroll] { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
[data-table-scroll]:focus-visible { outline-offset: -3px; }
.data-table tbody tr[data-order-url] { cursor: pointer; }
.vf-mobile-menu-button, .vf-sidebar-close {
  width: 44px; min-width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: var(--vf-radius-sm);
}
.vf-mobile-menu-button { color: var(--vf-color-ink); background: var(--vf-color-surface-soft); }
.vf-mobile-menu-button svg { width: 21px; height: 21px; }
.vf-sidebar-close { position: absolute; right: 10px; top: 16px; color: #dbeafe; }
.vf-sidebar-close:hover { background: rgba(255,255,255,.1); }
.vf-skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 1000;
  padding: 12px 18px; background: white; color: var(--vf-color-primary-strong);
  border: 2px solid currentColor; border-radius: var(--vf-radius-sm);
}
.vf-skip-link:focus { top: 12px; }
@media (min-width: 1025px) { .vf-sidebar-close, .vf-mobile-menu-button { display: none; } }
@media (max-width: 1024px) {
  body.vf-drawer-open { overflow: hidden; }
  .vf-sidebar-brand-wrap { position: relative; padding-right: 58px !important; }
}
@media (max-width: 640px) {
  .form-input, .form-select, .form-textarea, .vf-input { font-size: 16px !important; }
  .btn, .data-table a[title], .data-table button[title] { min-height: 44px; }
  .vf-topbar-inner { gap: 12px; padding: 12px 16px !important; }
  .vf-topbar h1 { font-size: 18px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Shared contextual navigation, empty states and compact controls. */
.vf-workspace-nav a { min-height: 40px; border-radius: var(--vf-radius-sm); font-size: 13px; font-weight: 600; }
.vf-workspace-nav a[aria-current="page"] { color: var(--vf-color-primary-strong); background: var(--vf-color-primary-soft); border-color: var(--vf-color-primary-border); }
.vf-empty-state h3 { font-size: 15px; font-weight: 600; }
.vf-empty-state p { font-size: 13px; line-height: 1.7; }
.vf-empty-state .vf-icon-box { width: 48px; height: 48px; border-radius: 16px; }
:where(.btn, .vf-status, .data-table td, .stat-card) { font-variant-numeric: tabular-nums; }

.form-input::placeholder, .form-textarea::placeholder, .vf-input::placeholder { color: var(--vf-color-muted); opacity: 1; }

/* Native operation dialogs keep keyboard focus, backdrop and short-screen scroll. */
dialog.vf-operation-dialog {
  margin: auto;
  padding: 0;
  width: min(28rem, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid var(--vf-color-border);
  border-radius: 16px;
  background: var(--vf-color-surface, #fff);
  color: var(--vf-color-ink);
  box-shadow: 0 24px 64px rgb(16 30 52 / 20%);
}
dialog.vf-operation-dialog::backdrop { background: rgb(16 30 52 / 55%); }
dialog.vf-operation-dialog > .max-w-sm { max-width: none; }
dialog.vf-operation-dialog > #payment-result-close { width: calc(100% - 40px); margin: 0 20px 20px; }
dialog.vf-operation-dialog[aria-busy="true"] > #payment-result-close { visibility: hidden; }
