/* ==========================================================================
   VOYAGER CHART PRO / VOY FINANCE HUB — DESIGN SYSTEM TOKENS
   Identidade: Voy Solutions (Petróleo, Tangerina e Bone)
   Espaço de Cores: OKLCH
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ------------------------------------------------------------------------
     1. Cores Nucleares da Marca (Brand Colors)
     ------------------------------------------------------------------------ */
  --color-petrol: oklch(0.35 0.055 190);         /* Tom principal Voy Solutions */
  --color-petrol-dark: oklch(0.26 0.045 192);    /* Superfícies profundas */
  --color-petrol-light: oklch(0.52 0.06 188);   /* Bordas e destaques suaves */

  --color-tangerine: oklch(0.68 0.16 47);        /* Ação primária, conversão, anel de foco */
  --color-tangerine-soft: oklch(0.83 0.09 55);   /* Destaques sutis e fundos de badge */

  --color-bone: oklch(0.975 0.004 190);          /* Fundo marfim tecnológico claro */

  /* ------------------------------------------------------------------------
     2. Tokens Semânticos — Modo Claro (Light Mode)
     ------------------------------------------------------------------------ */
  --background: oklch(0.975 0.004 190);
  --foreground: oklch(0.26 0.045 192);

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.26 0.045 192);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.26 0.045 192);

  --primary: oklch(0.35 0.055 190);              /* Petróleo */
  --primary-foreground: oklch(0.975 0.004 190);   /* Bone */

  --secondary: oklch(0.95 0.008 190);
  --secondary-foreground: oklch(0.30 0.05 191);

  --muted: oklch(0.955 0.006 190);
  --muted-foreground: oklch(0.52 0.03 192);

  --accent: oklch(0.93 0.045 55);
  --accent-foreground: oklch(0.30 0.05 191);

  --destructive: oklch(0.55 0.20 27);            /* Vermelho despesa / erro */
  --destructive-foreground: oklch(0.98 0.004 190);

  --success: oklch(0.52 0.09 165);               /* Verde receita / recebido */
  --success-foreground: oklch(0.98 0.004 190);

  --warning: oklch(0.70 0.18 55);                /* Tangerina alerta / pendente */
  --warning-foreground: oklch(0.20 0.035 192);

  --info: oklch(0.50 0.12 240);                   /* Azul bancário informativo */
  --info-foreground: oklch(0.98 0.004 190);

  --border: oklch(0.90 0.012 190);
  --input: oklch(0.90 0.012 190);
  --ring: oklch(0.68 0.16 47);                   /* Anel de foco acessível */

  --sidebar: oklch(0.26 0.045 192);
  --sidebar-foreground: oklch(0.94 0.006 190);
  --sidebar-primary: oklch(0.68 0.16 47);
  --sidebar-primary-foreground: oklch(0.99 0.004 190);
  --sidebar-accent: oklch(0.32 0.05 191);
  --sidebar-accent-foreground: oklch(0.99 0.004 190);
  --sidebar-border: oklch(0.36 0.05 191);
  --sidebar-ring: oklch(0.68 0.16 47);

  /* ------------------------------------------------------------------------
     3. Paleta de Gráficos (DataViz — Modo Claro)
     ------------------------------------------------------------------------ */
  --chart-1: oklch(0.45 0.14 195);               /* Petróleo vibrante */
  --chart-2: oklch(0.65 0.20 150);               /* Verde receita */
  --chart-3: oklch(0.58 0.22 27);                /* Vermelho despesa */
  --chart-4: oklch(0.70 0.18 55);                /* Tangerina / tributos */
  --chart-5: oklch(0.58 0.17 250);               /* Azul bancário */
  --chart-6: oklch(0.55 0.19 300);               /* Púrpura operacional */
  --chart-7: oklch(0.75 0.14 200);               /* Ciano investimentos */
  --chart-8: oklch(0.65 0.21 350);               /* Magenta comercial */

  /* ------------------------------------------------------------------------
     4. Tipografia
     ------------------------------------------------------------------------ */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ------------------------------------------------------------------------
     5. Geometria, Raios de Borda e Sombras
     ------------------------------------------------------------------------ */
  --radius: 0.625rem;                            /* 10px */
  --radius-sm: 0.375rem;                         /* 6px */
  --radius-md: 0.5rem;                           /* 8px */
  --radius-lg: 0.625rem;                         /* 10px */
  --radius-xl: 0.875rem;                         /* 14px */
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-drawer: 0 -10px 25px -5px rgb(0 0 0 / 0.15);
}

/* ==========================================================================
   Modo Escuro (Dark Mode)
   ========================================================================== */
.dark,
[data-theme="dark"] {
  --background: oklch(0.19 0.035 192);
  --foreground: oklch(0.97 0.004 190);

  --card: oklch(0.24 0.04 192);
  --card-foreground: oklch(0.97 0.004 190);

  --popover: oklch(0.24 0.04 192);
  --popover-foreground: oklch(0.97 0.004 190);

  --primary: oklch(0.68 0.16 47);                /* Tangerina no dark mode */
  --primary-foreground: oklch(0.20 0.035 192);

  --secondary: oklch(0.29 0.04 192);
  --secondary-foreground: oklch(0.97 0.004 190);

  --muted: oklch(0.29 0.04 192);
  --muted-foreground: oklch(0.74 0.02 190);

  --accent: oklch(0.34 0.06 60);
  --accent-foreground: oklch(0.97 0.004 190);

  --destructive: oklch(0.63 0.20 27);
  --destructive-foreground: oklch(0.98 0.004 190);

  --success: oklch(0.62 0.11 165);
  --success-foreground: oklch(0.20 0.035 192);

  --warning: oklch(0.76 0.17 55);
  --warning-foreground: oklch(0.20 0.035 192);

  --info: oklch(0.65 0.14 240);
  --info-foreground: oklch(0.98 0.004 190);

  --border: oklch(1 0 0 / 12%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.68 0.16 47);

  --sidebar: oklch(0.19 0.035 192);
  --sidebar-foreground: oklch(0.94 0.006 190);
  --sidebar-primary: oklch(0.68 0.16 47);
  --sidebar-primary-foreground: oklch(0.20 0.035 192);
  --sidebar-accent: oklch(0.26 0.045 192);
  --sidebar-accent-foreground: oklch(0.97 0.004 190);
  --sidebar-border: oklch(1 0 0 / 10%);
  --sidebar-ring: oklch(0.68 0.16 47);

  /* Gráficos em Dark Mode */
  --chart-1: oklch(0.65 0.15 195);
  --chart-2: oklch(0.72 0.20 150);
  --chart-3: oklch(0.66 0.22 27);
  --chart-4: oklch(0.76 0.17 55);
  --chart-5: oklch(0.68 0.16 250);
  --chart-6: oklch(0.66 0.19 300);
  --chart-7: oklch(0.82 0.13 200);
  --chart-8: oklch(0.72 0.20 350);
}

/* ==========================================================================
   Classes Utilitárias Tipográficas e Financeiras
   ========================================================================== */
.font-display {
  font-family: var(--font-display);
}

.font-sans {
  font-family: var(--font-sans);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Regra Obrigatória para Numerais Financeiros e Fiscais */
.tabular-nums {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Escalas Tipográficas Mobile-First */
.voy-text-hero {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .voy-text-hero {
    font-size: 2.75rem;
  }
}

.voy-text-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .voy-text-h1 {
    font-size: 2.25rem;
  }
}

.voy-text-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

@media (min-width: 768px) {
  .voy-text-h2 {
    font-size: 1.625rem;
  }
}

.voy-text-h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .voy-text-h3 {
    font-size: 1.25rem;
  }
}

.voy-text-body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .voy-text-body {
    font-size: 1rem;
  }
}

.voy-text-caption {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .voy-text-caption {
    font-size: 0.8125rem;
  }
}

.voy-text-kpi {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}

@media (min-width: 768px) {
  .voy-text-kpi {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   Acessibilidade e Mobile Axioms
   ========================================================================== */
.touch-target {
  min-height: 44px;
  min-width: 44px;
}

.touch-target-lg {
  min-height: 48px;
  min-width: 48px;
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Componentes Primitivos Mobile-First
   ========================================================================== */

/* 1. VoyButton */
.voy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
  position: relative;
  gap: 0.5rem;
}

.voy-btn:active:not(:disabled):not(.voy-btn-disabled) {
  transform: scale(0.98);
}

.voy-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.68 0.16 47 / 35%);
}

.voy-btn:disabled,
.voy-btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Tamanhos de Botão */
.voy-btn-sm {
  min-height: 36px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
}

.voy-btn-md {
  min-height: 44px;
  padding: 0.5rem 1.125rem;
  font-size: 0.9375rem;
}

.voy-btn-lg {
  min-height: 48px;
  padding: 0.625rem 1.375rem;
  font-size: 1rem;
}

.voy-btn-full {
  width: 100%;
}

/* Variantes de Botão */
.voy-btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.voy-btn-primary:hover:not(:disabled) {
  opacity: 0.92;
}

.voy-btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}
.voy-btn-secondary:hover:not(:disabled) {
  background-color: var(--muted);
}

.voy-btn-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
  border-color: var(--destructive);
}
.voy-btn-destructive:hover:not(:disabled) {
  opacity: 0.92;
}

.voy-btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}
.voy-btn-ghost:hover:not(:disabled) {
  background-color: var(--muted);
}

.voy-btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.voy-btn-outline:hover:not(:disabled) {
  background-color: var(--muted);
}

.voy-btn-spinner {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: voySpin 0.7s linear infinite;
}

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

/* 2. VoyCard */
.voy-card {
  background-color: var(--card);
  color: var(--card-foreground);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1rem; /* 16px no mobile */
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

@media (min-width: 768px) {
  .voy-card {
    padding: 1.5rem; /* 24px no desktop */
  }
}

.voy-card-elevated {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.voy-card-outlined {
  border: 1px solid var(--border);
  box-shadow: none;
}

.voy-card-flat {
  border: none;
  box-shadow: none;
  background-color: var(--muted);
}

.voy-card-interactive {
  cursor: pointer;
}
.voy-card-interactive:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.voy-card-header {
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

.voy-card-body {
  width: 100%;
}

.voy-card-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* 3. VoyBadge */
.voy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  vertical-align: middle;
}

.voy-badge-dot-indicator {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: currentColor;
}

/* Subtle Badges */
.voy-badge-subtle.voy-badge-success {
  background-color: oklch(0.52 0.09 165 / 15%);
  color: var(--success);
}
.voy-badge-subtle.voy-badge-destructive {
  background-color: oklch(0.55 0.20 27 / 15%);
  color: var(--destructive);
}
.voy-badge-subtle.voy-badge-warning {
  background-color: oklch(0.70 0.18 55 / 18%);
  color: oklch(0.48 0.15 48);
}
.voy-badge-subtle.voy-badge-info {
  background-color: oklch(0.50 0.12 240 / 15%);
  color: var(--info);
}
.voy-badge-subtle.voy-badge-petrol {
  background-color: oklch(0.35 0.055 190 / 15%);
  color: var(--color-petrol);
}
.voy-badge-subtle.voy-badge-neutral {
  background-color: var(--muted);
  color: var(--muted-foreground);
}

/* Solid Badges */
.voy-badge-solid.voy-badge-success {
  background-color: var(--success);
  color: var(--success-foreground);
}
.voy-badge-solid.voy-badge-destructive {
  background-color: var(--destructive);
  color: var(--destructive-foreground);
}
.voy-badge-solid.voy-badge-warning {
  background-color: var(--warning);
  color: var(--warning-foreground);
}
.voy-badge-solid.voy-badge-info {
  background-color: var(--info);
  color: var(--info-foreground);
}
.voy-badge-solid.voy-badge-petrol {
  background-color: var(--color-petrol);
  color: var(--color-bone);
}
.voy-badge-solid.voy-badge-neutral {
  background-color: var(--muted-foreground);
  color: var(--background);
}

/* Outline Badges */
.voy-badge-outline {
  background-color: transparent;
  border: 1px solid currentColor;
}
.voy-badge-outline.voy-badge-success { color: var(--success); }
.voy-badge-outline.voy-badge-destructive { color: var(--destructive); }
.voy-badge-outline.voy-badge-warning { color: oklch(0.48 0.15 48); }
.voy-badge-outline.voy-badge-info { color: var(--info); }
.voy-badge-outline.voy-badge-petrol { color: var(--color-petrol); }
.voy-badge-outline.voy-badge-neutral { color: var(--muted-foreground); border-color: var(--border); }

/* 4. VoyMoneyInput */
.voy-money-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-family: var(--font-sans);
  width: 100%;
}

.voy-input-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.voy-money-input-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--card);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  min-height: 48px; /* Touch target ideal mobile */
  padding: 0 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.voy-money-input-wrapper:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(0.68 0.16 47 / 25%);
}

.voy-money-input-wrapper.voy-money-input-error {
  border-color: var(--destructive);
}
.voy-money-input-wrapper.voy-money-input-error:focus-within {
  box-shadow: 0 0 0 3px oklch(0.55 0.20 27 / 25%);
}

.voy-money-input-prefix {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted-foreground);
  padding-right: 0.5rem;
  user-select: none;
}

.voy-money-input-field {
  border: none;
  background: transparent;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  text-align: right;
  color: var(--foreground);
  font-variant-numeric: tabular-nums lining-nums;
  outline: none;
}

.voy-money-input-field:disabled {
  cursor: not-allowed;
  color: var(--muted-foreground);
}

.voy-input-error-text {
  font-size: 0.75rem;
  color: var(--destructive);
  margin-top: 0.125rem;
}

.voy-input-helper-text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

/* VoyTextInput */
.voy-text-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-family: var(--font-sans);
  width: 100%;
}

.voy-text-input-wrapper {
  display: flex;
  align-items: center;
  background-color: var(--card);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  min-height: 48px; /* Touch target ideal mobile */
  padding: 0 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.voy-text-input-wrapper:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(0.68 0.16 47 / 25%);
}

.voy-text-input-wrapper.voy-text-input--error {
  border-color: var(--destructive);
}
.voy-text-input-wrapper.voy-text-input--error:focus-within {
  box-shadow: 0 0 0 3px oklch(0.55 0.20 27 / 25%);
}

.voy-text-input--compact {
  min-height: 38px;
  padding: 0 0.625rem;
}

.voy-text-input--large {
  min-height: 56px;
  padding: 0 1rem;
}

.voy-text-input-field {
  border: none;
  background: transparent;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
  font-variant-numeric: tabular-nums lining-nums;
  outline: none;
}

.voy-text-input-field:disabled {
  cursor: not-allowed;
  color: var(--muted-foreground);
}

/* 5. VoyBottomSheet */
.voy-bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background-color: oklch(0 0 0 / 50%);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: voyFadeIn 0.2s ease-out;
}

.voy-bottom-sheet-container {
  background-color: var(--card);
  color: var(--card-foreground);
  width: 100%;
  max-width: 600px;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  padding: 0.75rem 1.25rem 1.5rem 1.25rem;
  animation: voySlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .voy-bottom-sheet-backdrop {
    align-items: center;
  }
  .voy-bottom-sheet-container {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding-bottom: 1.5rem;
    animation: voyFadeScale 0.2s ease-out;
  }
}

.voy-bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background-color: var(--muted-foreground);
  opacity: 0.35;
  border-radius: 9999px;
  align-self: center;
  margin-bottom: 0.75rem;
  cursor: grab;
}

.voy-bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.voy-bottom-sheet-close-btn {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.voy-bottom-sheet-close-btn:hover {
  background-color: var(--muted);
  color: var(--foreground);
}

.voy-bottom-sheet-body {
  overflow-y: auto;
  flex: 1 1 auto;
}

.voy-bottom-sheet-footer {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}

@keyframes voyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes voySlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes voyFadeScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   PIN Pad e Código de Segurança da Empresa
   ========================================================================== */
.voy-pin-pad-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  outline: none;
}

.voy-pin-pad--disabled {
  opacity: 0.6;
  pointer-events: none;
}

.voy-pin-dots {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0;
}

.voy-pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background-color: var(--background);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.voy-pin-dot--current {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(0.35 0.08 190 / 20%);
}

.voy-pin-dot--filled {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.15);
}

.voy-pin-dot--error {
  border-color: var(--destructive);
  background-color: oklch(0.55 0.20 27 / 15%);
}

.voy-pin-error {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--destructive);
  background-color: oklch(0.55 0.20 27 / 10%);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.voy-pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
}

.voy-pin-key {
  height: 56px;
  min-height: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.voy-pin-key:hover:not(:disabled) {
  background-color: var(--secondary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.voy-pin-key:active:not(:disabled) {
  transform: scale(0.96);
  background-color: var(--muted);
}

.voy-pin-key--action {
  font-size: 1.125rem;
  background-color: var(--muted);
  color: var(--muted-foreground);
}

.voy-pin-key:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.voy-security-pin-modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.voy-security-pin-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.voy-security-pin-shield-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.voy-security-pin-desc {
  color: var(--muted-foreground);
  max-width: 320px;
}

.voy-security-pin-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--primary);
}

.voy-security-pin-actions {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   VoyKpiCard
   ========================================================================== */
.voy-kpi-card {
  width: 100%;
}
.voy-kpi-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.voy-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.voy-kpi-title {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}
.voy-kpi-value {
  color: var(--foreground);
}
.voy-kpi-footer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.25rem;
}
.voy-kpi-variation {
  font-size: 0.8125rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.voy-kpi-variation--positive {
  color: var(--success);
}
.voy-kpi-variation--negative {
  color: var(--destructive);
}
.voy-kpi-variation--neutral {
  color: var(--muted-foreground);
}
.voy-kpi-subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ==========================================================================
   VoyTenantSelector
   ========================================================================== */
.voy-tenant-selector {
  position: relative;
  display: inline-block;
}
.voy-tenant-selector-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--foreground);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  transition: all 0.15s ease;
  user-select: none;
}
.voy-tenant-selector-trigger:hover:not(:disabled) {
  border-color: var(--primary);
  background-color: var(--muted);
}
.voy-tenant-selector--compact .voy-tenant-selector-trigger {
  min-height: 38px;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}
.voy-tenant-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.voy-tenant-name {
  font-weight: 600;
  line-height: 1.2;
}
.voy-tenant-cnpj {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}
.voy-tenant-chevron {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  margin-left: 0.25rem;
}
.voy-tenant-selector-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.voy-tenant-search-input {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  outline: none;
}
.voy-tenant-search-input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(0.68 0.16 47 / 25%);
}
.voy-tenant-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 50vh;
  overflow-y: auto;
}
.voy-tenant-option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  min-height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.voy-tenant-option-item:hover {
  border-color: var(--primary);
  background-color: var(--muted);
}
.voy-tenant-option-item--selected {
  border-color: var(--primary);
  background-color: oklch(0.35 0.055 190 / 8%);
}
.voy-tenant-item-left {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.voy-tenant-item-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.voy-tenant-check {
  color: var(--primary);
  font-weight: 700;
}

/* ==========================================================================
   VoyThemeToggle
   ========================================================================== */
.voy-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}
.voy-theme-toggle:hover {
  background-color: var(--muted);
  border-color: var(--ring);
  transform: rotate(15deg);
}
.voy-theme-icon {
  font-size: 1.125rem;
  line-height: 1;
}
.voy-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   VoyDataCardList
   ========================================================================== */
.voy-data-card-list {
  width: 100%;
}
.voy-data-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  color: var(--muted-foreground);
}
.voy-data-cards-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.voy-data-table-desktop {
  display: none;
}
@media (min-width: 768px) {
  .voy-data-cards-mobile {
    display: none;
  }
  .voy-data-table-desktop {
    display: block;
  }
}
.voy-table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--card);
}
.voy-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}
.voy-data-table th {
  padding: 0.75rem 1rem;
  background-color: var(--muted);
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.voy-data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
}
.voy-data-table tr:last-child td {
  border-bottom: none;
}
.voy-data-table tr:hover td {
  background-color: var(--muted);
}

/* ==========================================================================
   Shared Page Layout, Alerts & Empty States
   ========================================================================== */
.voy-page-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .voy-page-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}
.voy-page-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-petrol);
  margin: 0.25rem 0;
  letter-spacing: -0.02em;
}
.dark .voy-page-title,
[data-theme="dark"] .voy-page-title {
  color: var(--foreground);
}
.voy-page-subtitle {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin: 0;
}
.voy-alert {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
}
.voy-alert-success {
  background-color: oklch(0.92 0.08 140 / 30%);
  color: var(--success);
  border: 1px solid var(--success);
}
.voy-alert-error {
  background-color: oklch(0.55 0.20 27 / 15%);
  color: var(--destructive);
  border: 1px solid var(--destructive);
}
.voy-alert-close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: inherit;
  padding: 0 0.25rem;
}
.voy-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  gap: 0.5rem;
}
.voy-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.voy-empty-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}
.voy-empty-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  max-width: 400px;
  margin: 0;
}
.voy-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}
.voy-spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: voySpin 0.7s linear infinite;
}

/* ==========================================================================
   Shell Híbrido Mobile-First / Desktop Sidebar
   ========================================================================== */
.voy-app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
}
.voy-mobile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  min-height: 56px;
  padding: 0 1rem;
  background-color: var(--color-petrol-dark);
  color: var(--color-bone);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.voy-mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}
.voy-mobile-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--color-tangerine);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}
.voy-mobile-brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1;
}
.voy-mobile-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.voy-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--card);
  border-top: 1px solid var(--border);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.voy-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem;
  min-width: 56px;
  min-height: 48px;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.6875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  user-select: none;
}
.voy-bottom-nav-item:hover,
.voy-bottom-nav-item.active {
  color: var(--color-tangerine);
}
.voy-bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}
@media (min-width: 1024px) {
  .voy-app-shell {
    flex-direction: row;
  }
  .voy-mobile-top-bar,
  .voy-bottom-nav {
    display: none !important;
  }
  .voy-desktop-sidebar {
    width: 270px;
    min-width: 270px;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--color-petrol-dark);
    color: var(--sidebar-foreground);
    border-right: 1px solid var(--sidebar-border);
    z-index: 60;
  }
  .voy-main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;
    overflow-x: hidden;
  }
}
@media (max-width: 1023px) {
  .voy-desktop-sidebar {
    display: none !important;
  }
  .voy-main-content-wrapper {
    flex: 1;
    padding-bottom: 76px;
  }
}
