/*
 * Azera Pay design system — shared visual layer.
 * This stylesheet deliberately changes presentation only. It is loaded after
 * legacy portal layers so every route consumes the same tokens and controls.
 */
html.az-portal-enhanced {
  --az-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --az-canvas: #f5f8fc;
  --az-surface: #ffffff;
  --az-surface-raised: #ffffff;
  --az-surface-muted: #edf3fa;
  --az-stroke: #dbe5f0;
  --az-stroke-strong: #c3d3e4;
  --az-ink: #0a1d38;
  --az-soft: #62758e;
  --az-faint: #8595a9;
  --az-nav: #ffffff;
  --az-nav-ink: #25415f;
  --az-nav-hover: #edf5ff;
  --az-accent: #146cf2;
  --az-accent-strong: #0d57cf;
  --az-accent-soft: #eaf3ff;
  --az-cyan: #00b8d9;
  --az-success: #0a8f59;
  --az-success-soft: #e9f8f0;
  --az-danger: #c83a4a;
  --az-danger-soft: #fff0f2;
  --az-warning: #ae6a04;
  --az-warning-soft: #fff7e7;
  --az-radius-sm: 8px;
  --az-radius: 12px;
  --az-radius-lg: 16px;
  --az-shadow: 0 1px 2px rgba(11, 35, 67, .04), 0 8px 24px rgba(11, 35, 67, .06);
  --az-shadow-raised: 0 12px 34px rgba(11, 35, 67, .10);
  --az-focus: 0 0 0 3px color-mix(in srgb, var(--az-accent) 27%, transparent);
  color-scheme: light;
}

html.az-portal-enhanced[data-az-theme="blue"] {
  --az-canvas: #071a36;
  --az-surface: #0d274b;
  --az-surface-raised: #103057;
  --az-surface-muted: #12355e;
  --az-stroke: #244d78;
  --az-stroke-strong: #32638f;
  --az-ink: #f3f8ff;
  --az-soft: #aec4df;
  --az-faint: #809ab9;
  --az-nav: #091f40;
  --az-nav-ink: #d7e5f6;
  --az-nav-hover: #153b67;
  --az-accent: #4ba8ff;
  --az-accent-strong: #6db8ff;
  --az-accent-soft: #123d6e;
  --az-success: #3cce8a;
  --az-success-soft: #103d35;
  --az-danger: #ff8490;
  --az-danger-soft: #492630;
  --az-warning: #ffc75c;
  --az-warning-soft: #423516;
  --az-shadow: 0 1px 2px rgba(0, 7, 21, .25), 0 9px 26px rgba(0, 7, 21, .24);
  --az-shadow-raised: 0 16px 38px rgba(0, 7, 21, .34);
  color-scheme: dark;
}

html.az-portal-enhanced[data-az-theme="black"] {
  --az-canvas: #080d15;
  --az-surface: #111a26;
  --az-surface-raised: #152132;
  --az-surface-muted: #19283a;
  --az-stroke: #293b50;
  --az-stroke-strong: #3c526b;
  --az-ink: #f4f8fc;
  --az-soft: #afbecf;
  --az-faint: #7e90a4;
  --az-nav: #0b111a;
  --az-nav-ink: #dbe6f2;
  --az-nav-hover: #17283a;
  --az-accent: #4ba8ff;
  --az-accent-strong: #73bbff;
  --az-accent-soft: #12365e;
  --az-success: #45d590;
  --az-success-soft: #113b32;
  --az-danger: #ff8994;
  --az-danger-soft: #45252e;
  --az-warning: #ffc960;
  --az-warning-soft: #403315;
  --az-shadow: 0 1px 2px rgba(0, 0, 0, .32), 0 9px 26px rgba(0, 0, 0, .26);
  --az-shadow-raised: 0 16px 38px rgba(0, 0, 0, .36);
  color-scheme: dark;
}

html.az-portal-enhanced,
html.az-portal-enhanced body,
html.az-portal-enhanced :is(button, input, textarea, select) { font-family: var(--az-font) !important; }
html.az-portal-enhanced body,
html.az-portal-enhanced .app-shell { background: var(--az-canvas) !important; color: var(--az-ink) !important; }
html.az-portal-enhanced .app-shell { grid-template-columns: 280px minmax(0, 1fr) !important; }
html.az-portal-enhanced.az-sidebar-collapsed .app-shell { grid-template-columns: 76px minmax(0, 1fr) !important; }
html.az-portal-enhanced .workspace { min-width: 0; background: var(--az-canvas) !important; }
html.az-portal-enhanced .content { width: min(100%, 1680px) !important; max-width: 1680px !important; margin: 0 auto !important; padding: 30px 36px 56px !important; }

/* Navigation: one quiet surface, clear active state, official artwork untouched. */
html.az-portal-enhanced .sidebar { background: var(--az-nav) !important; border-right: 1px solid var(--az-stroke) !important; box-shadow: none !important; }
html.az-portal-enhanced .sidebar .az-brand-full,
html.az-portal-enhanced .sidebar .az-brand-light-wordmark { filter: none !important; }
html.az-portal-enhanced .sidebar .side-nav > a,
html.az-portal-enhanced .sidebar .az-nav-group > summary {
  min-height: 44px !important; margin: 2px 0 !important; padding: 10px 12px !important;
  border: 1px solid transparent !important; border-radius: var(--az-radius-sm) !important;
  color: var(--az-nav-ink) !important; font-size: 14px !important; font-weight: 650 !important;
  letter-spacing: -.005em; transition: background .16s ease, border-color .16s ease, color .16s ease !important;
}
html.az-portal-enhanced .sidebar .side-nav > a:hover,
html.az-portal-enhanced .sidebar .az-nav-group > summary:hover { transform: none !important; background: var(--az-nav-hover) !important; color: var(--az-ink) !important; }
html.az-portal-enhanced .sidebar .side-nav > a.active { background: var(--az-accent-soft) !important; border-color: color-mix(in srgb, var(--az-accent) 28%, var(--az-stroke)) !important; box-shadow: inset 3px 0 0 var(--az-accent) !important; color: var(--az-accent) !important; }
html.az-portal-enhanced .sidebar .nav-label { color: var(--az-faint) !important; font-size: 10px !important; font-weight: 800 !important; letter-spacing: .12em !important; }
html.az-portal-enhanced .sidebar .side-nav :is(svg,.icon) { width: 20px !important; height: 20px !important; flex: 0 0 20px !important; overflow: visible !important; }

/* Content hierarchy. */
html.az-portal-enhanced .topbar { min-height: 64px !important; padding: 9px 28px !important; background: color-mix(in srgb, var(--az-surface) 94%, transparent) !important; border-bottom: 1px solid var(--az-stroke) !important; box-shadow: none !important; }
html.az-portal-enhanced .page-head { gap: 18px !important; margin-bottom: 24px !important; }
html.az-portal-enhanced .page-head h1 { margin: 0 !important; color: var(--az-ink) !important; font-size: clamp(25px, 2.2vw, 34px) !important; font-weight: 760 !important; letter-spacing: -.045em !important; line-height: 1.12 !important; }
html.az-portal-enhanced .page-head :is(p,.muted) { color: var(--az-soft) !important; font-size: 14px !important; line-height: 1.5 !important; }
html.az-portal-enhanced .card,
html.az-portal-enhanced .az-feature-card,
html.az-portal-enhanced .az-reference-panel,
html.az-portal-enhanced .az-affiliate-link-card,
html.az-portal-enhanced .az-financial-rules,
html.az-portal-enhanced .az-acquirer-card {
  border: 1px solid var(--az-stroke) !important; border-radius: var(--az-radius-lg) !important;
  background: var(--az-surface) !important; box-shadow: var(--az-shadow) !important;
}
html.az-portal-enhanced .card:hover,
html.az-portal-enhanced .az-feature-card:hover,
html.az-portal-enhanced .az-reference-panel:hover { transform: none !important; border-color: var(--az-stroke-strong) !important; box-shadow: var(--az-shadow) !important; }
html.az-portal-enhanced .metric { min-height: 154px !important; padding: 21px !important; }
html.az-portal-enhanced .metric h2,
html.az-portal-enhanced .money { color: var(--az-ink) !important; font-size: clamp(22px, 2vw, 30px) !important; font-weight: 740 !important; letter-spacing: -.045em !important; font-variant-numeric: tabular-nums; }
html.az-portal-enhanced .metric-icon { width: 40px !important; height: 40px !important; min-width: 40px !important; border: 1px solid color-mix(in srgb, var(--az-accent) 22%, var(--az-stroke)) !important; border-radius: 10px !important; background: var(--az-accent-soft) !important; color: var(--az-accent) !important; }
html.az-portal-enhanced .metric-icon svg { width: 19px !important; height: 19px !important; }
html.az-portal-enhanced .az-med-balance .metric-icon { background: color-mix(in srgb, var(--az-cyan) 14%, var(--az-surface)) !important; border-color: color-mix(in srgb, var(--az-cyan) 34%, var(--az-stroke)) !important; color: var(--az-cyan) !important; }

/* Controls: consistent height, hit target, focus and status colors. */
html.az-portal-enhanced :is(.button,.primary,.ghost-button,.icon-button,.az-range-trigger) { min-height: 40px !important; padding: 9px 14px !important; border-radius: 10px !important; font-size: 13px !important; font-weight: 720 !important; line-height: 1.2 !important; box-shadow: none !important; transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease !important; }
html.az-portal-enhanced :is(.button.primary,.primary:not(.ghost-button)) { background: var(--az-accent) !important; border-color: var(--az-accent) !important; color: #fff !important; }
html.az-portal-enhanced :is(.button.primary,.primary:not(.ghost-button)):hover { background: var(--az-accent-strong) !important; border-color: var(--az-accent-strong) !important; transform: none !important; }
html.az-portal-enhanced :is(.ghost-button,.icon-button,.secondary) { background: var(--az-surface) !important; border-color: var(--az-stroke) !important; color: var(--az-ink) !important; }
html.az-portal-enhanced :is(.ghost-button,.icon-button,.secondary):hover { background: var(--az-surface-muted) !important; border-color: var(--az-stroke-strong) !important; color: var(--az-accent) !important; }
html.az-portal-enhanced :is(.danger,.az-delete-key,[data-action="danger"]) { background: var(--az-danger-soft) !important; border-color: color-mix(in srgb, var(--az-danger) 35%, var(--az-stroke)) !important; color: var(--az-danger) !important; }
html.az-portal-enhanced :is(input,select,textarea) { min-height: 42px !important; border: 1px solid var(--az-stroke) !important; border-radius: 10px !important; background: var(--az-surface) !important; color: var(--az-ink) !important; box-shadow: none !important; }
html.az-portal-enhanced textarea { min-height: 98px !important; }
html.az-portal-enhanced :is(a,button,input,select,textarea,[tabindex]):focus-visible { outline: none !important; box-shadow: var(--az-focus) !important; }
html.az-portal-enhanced :is(.badge,.status-badge,.pill) { border-radius: 999px !important; padding: 5px 9px !important; font-size: 11px !important; font-weight: 750 !important; }

/* Data-dense views. */
html.az-portal-enhanced .tabs,
html.az-portal-enhanced .tab-list,
html.az-portal-enhanced .segmented-control { gap: 3px !important; padding: 3px !important; border: 1px solid var(--az-stroke) !important; border-radius: 10px !important; background: var(--az-surface-muted) !important; }
html.az-portal-enhanced :is(.tabs,.tab-list,.segmented-control) > :is(button,a,[role="tab"]) { min-height: 34px !important; padding: 7px 11px !important; border-radius: 7px !important; color: var(--az-soft) !important; font-size: 12px !important; font-weight: 700 !important; }
html.az-portal-enhanced :is(.tabs,.tab-list,.segmented-control) > :is(button,a,[role="tab"]):is(.active,[aria-selected="true"]) { background: var(--az-surface) !important; color: var(--az-ink) !important; box-shadow: 0 1px 3px rgba(11,35,67,.12) !important; }
html.az-portal-enhanced .table-wrap { min-width: 0 !important; border: 1px solid var(--az-stroke) !important; border-radius: var(--az-radius) !important; background: var(--az-surface) !important; box-shadow: none !important; }
html.az-portal-enhanced .table-wrap table { min-width: 680px !important; }
html.az-portal-enhanced .table-wrap th { height: 42px !important; background: var(--az-surface-muted) !important; color: var(--az-soft) !important; font-size: 10px !important; font-weight: 800 !important; letter-spacing: .08em !important; }
html.az-portal-enhanced .table-wrap td { height: 56px !important; border-color: var(--az-stroke) !important; color: var(--az-ink) !important; font-size: 13px !important; }
html.az-portal-enhanced .table-wrap tbody tr:hover { background: color-mix(in srgb, var(--az-accent) 4%, var(--az-surface)) !important; }

/* Remove noisy competing motion; preserve intentional feedback and accessibility. */
html.az-portal-enhanced .az-card-beam { display: none !important; }
html.az-portal-enhanced .az-hero-carousel { overflow: hidden !important; border: 1px solid var(--az-stroke) !important; border-radius: var(--az-radius-lg) !important; box-shadow: var(--az-shadow-raised) !important; }
html.az-portal-enhanced .az-hero-carousel::before { display: none !important; }
html.az-portal-enhanced .az-hero-arrow { width: 36px !important; height: 36px !important; border: 1px solid color-mix(in srgb, #fff 38%, transparent) !important; border-radius: 50% !important; background: rgba(5, 20, 44, .56) !important; }
html.az-portal-enhanced .az-hero-dots button { width: 7px !important; height: 7px !important; }
html.az-portal-enhanced .az-hero-dots button.is-active { width: 20px !important; border-radius: 999px !important; }
html.az-portal-enhanced .az-empty-reference,
html.az-portal-enhanced .az-empty-chart { min-height: 220px !important; border-color: var(--az-stroke) !important; color: var(--az-soft) !important; }
html.az-portal-enhanced .az-empty-reference strong { color: var(--az-ink) !important; }

@media (max-width: 1080px) {
  html.az-portal-enhanced .content { padding: 26px 24px 48px !important; }
}
@media (max-width: 780px) {
  html.az-portal-enhanced .app-shell,
  html.az-portal-enhanced.az-sidebar-collapsed .app-shell { grid-template-columns: minmax(0, 1fr) !important; }
  html.az-portal-enhanced .content { width: 100% !important; padding: 20px 16px 40px !important; }
  html.az-portal-enhanced .topbar { min-height: 58px !important; padding: 8px 16px !important; }
  html.az-portal-enhanced .page-head { align-items: flex-start !important; flex-direction: column !important; gap: 12px !important; }
  html.az-portal-enhanced .page-head .head-actions { width: 100% !important; justify-content: stretch !important; }
  html.az-portal-enhanced .page-head .head-actions > :is(a,button) { flex: 1 1 auto !important; }
  html.az-portal-enhanced .metric { min-height: 138px !important; padding: 18px !important; }
  html.az-portal-enhanced .table-wrap { margin-inline: -1px !important; }
  html.az-portal-enhanced .az-hero-arrow { width: 32px !important; height: 32px !important; }
  /* O painel móvel é deliberadamente operacional: só painel, vendas e financeiro. */
  html.az-portal-enhanced .az-hero-carousel { display: none !important; }
  html.az-portal-enhanced .side-nav a.az-mobile-desktop-only,
  html.az-portal-enhanced .side-nav button.az-mobile-desktop-only,
  html.az-portal-enhanced .az-nav-group.az-mobile-desktop-only,
  html.az-portal-enhanced .nav-label.az-mobile-desktop-only { display: none !important; }
}
@media (max-width: 480px) {
  html.az-portal-enhanced .page-head h1 { font-size: 27px !important; }
  html.az-portal-enhanced .metric h2,
  html.az-portal-enhanced .money { font-size: 25px !important; }
  html.az-portal-enhanced :is(.button,.primary,.ghost-button) { width: 100%; justify-content: center; }
}

/* Mobile operational navigation: only Dashboard, Configurações, Receber Pix and Sacar Pix. */
html.az-portal-enhanced .side-nav a.az-mobile-only { display: none !important; }
@media (max-width: 780px) {
  html.az-portal-enhanced .side-nav a.az-mobile-only { display: flex !important; }
}
@media (prefers-reduced-motion: reduce) {
  html.az-portal-enhanced *, html.az-portal-enhanced *::before, html.az-portal-enhanced *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
