/* =====================
   PALETA PRINCIPAL E VARIÁVEIS
====================== */
:root {
  /* Variáveis padrão (tema light) */
  --color-bg: #f8f9fa;
  --color-bg-alt: #ffffff;
  --color-bg-tertiary: #f3f4f6;
  --color-text: #23272f;
  --color-text-secondary: #764ba2;
  --color-text-muted: #6b7280;
  --color-primary: #764ba2;
  --color-primary-dark: #5c357d;
  --color-secondary: #5c86ff;
  --color-secondary-dark: #3b5fc9;
  --color-accent: #f6ad55;
  --color-danger: #e53e3e;
  --color-success: #38a169;
  --color-border: #e2e8f0;
  --color-link: #5c86ff;
  --color-link-hover: #764ba2;
  --shadow: 0 4px 24px rgba(118, 75, 162, 0.07);
  --shadow-light: 0 2px 8px rgba(118, 75, 162, 0.05);
  --glow: rgba(118, 75, 162, 0.15);
  --glow-light: rgba(118, 75, 162, 0.08);
  --radius: 12px;
  --font-main: 'Nunito', 'Roboto', Arial, sans-serif;
  --font-mono: 'Roboto Mono', 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
  
  /* Sistema de espaçamentos padronizados */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  
  /* Sistema de tipografia */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  
  /* Pesos de fonte */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  
  /* Altura de linha */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Gradientes sutis */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-card: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg-tertiary) 100%);
  --gradient-button: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

[data-theme="dark"] {
  /* Mesmas variáveis, valores diferentes para dark */
  --color-bg: #181824;
  --color-bg-alt: #232336;
  --color-bg-tertiary: #2d2d3a;
  --color-text: #ffffff;
  --color-text-secondary: #bdbdf7;
  --color-text-muted: #a0a0b8;
  --color-primary: #764ba2;
  --color-primary-dark: #a3bffa;
  --color-secondary: #5c86ff;
  --color-secondary-dark: #3b5fc9;
  --color-accent: #f6ad55;
  --color-danger: #fc8181;
  --color-success: #68d391;
  --color-border: #35374a;
  --color-link: #90cdf4;
  --color-link-hover: #a084e8;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.2);
  --glow: rgba(92, 134, 255, 0.3);
  --glow-light: rgba(92, 134, 255, 0.15);
  
  /* Gradientes sutis para dark */
  --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  --gradient-card: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg-tertiary) 100%);
  --gradient-button: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

[data-theme="light"] {
  /* Mesmas variáveis, valores para light (já definidos em :root) */
  --color-bg: #f8f9fa;
  --color-bg-alt: #ffffff;
  --color-bg-tertiary: #f3f4f6;
  --color-text: #23272f;
  --color-text-secondary: #764ba2;
  --color-text-muted: #6b7280;
  --color-primary: #764ba2;
  --color-primary-dark: #5c357d;
  --color-secondary: #5c86ff;
  --color-secondary-dark: #3b5fc9;
  --color-accent: #f6ad55;
  --color-danger: #e53e3e;
  --color-success: #38a169;
  --color-border: #e2e8f0;
  --color-link: #5c86ff;
  --color-link-hover: #764ba2;
  --shadow: 0 4px 24px rgba(118, 75, 162, 0.07);
  --shadow-light: 0 2px 8px rgba(118, 75, 162, 0.05);
  --glow: rgba(118, 75, 162, 0.15);
  --glow-light: rgba(118, 75, 162, 0.08);
}

/* Correções específicas para o tema light */
[data-theme="light"] .btn,
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-secondary {
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary);
}

[data-theme="light"] .btn:hover,
[data-theme="light"] .btn:focus,
[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-primary:focus,
[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .btn-secondary:focus {
  background: var(--color-primary-dark);
  color: #fff;
  border-color: var(--color-primary-dark);
}

[data-theme="light"] .btn-secondary {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .btn-secondary:focus {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* Correções para campos de upload no tema light */
[data-theme="light"] input[type="file"],
[data-theme="light"] .file-upload-area {
  background: var(--color-bg-alt);
  border: 2px dashed var(--color-border);
  color: var(--color-text);
}

[data-theme="light"] input[type="file"]:hover,
[data-theme="light"] .file-upload-area:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-tertiary);
}

[data-theme="light"] input[type="file"]:focus,
[data-theme="light"] .file-upload-area:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary)22;
}

/* Correções para botões de seleção de estilos no tema light */
[data-theme="light"] .style-option,
[data-theme="light"] .template-option {
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
  color: var(--color-text);
}

[data-theme="light"] .style-option:hover,
[data-theme="light"] .template-option:hover {
  border-color: var(--color-primary);
  background: var(--color-bg-tertiary);
}

[data-theme="light"] .style-option.active,
[data-theme="light"] .template-option.active,
[data-theme="light"] .style-option.selected,
[data-theme="light"] .template-option.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Correções para formulários no tema light */
[data-theme="light"] .wizard-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
}

[data-theme="light"] .wizard-preview-sidebar {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
}

[data-theme="light"] .form-group label {
  color: var(--color-text);
}

[data-theme="light"] .input-text,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="url"],
[data-theme="light"] input[type="number"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

[data-theme="light"] .input-text:focus,
[data-theme="light"] input[type="text"]:focus,
[data-theme="light"] input[type="email"]:focus,
[data-theme="light"] input[type="password"]:focus,
[data-theme="light"] input[type="url"]:focus,
[data-theme="light"] input[type="number"]:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary)22;
}

[data-theme="light"] ::placeholder {
  color: var(--color-text-muted);
}

/* Correções para tooltips no tema light */
[data-theme="light"] .field-tooltip .tooltip-text {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

[data-theme="light"] .field-tooltip .tooltip-text::after {
  border-color: var(--color-bg-alt) transparent transparent transparent;
}

/* Correções para preview no tema light */
[data-theme="light"] .preview-header h3 {
  color: var(--color-primary);
}

[data-theme="light"] .preview-header h3 i {
  color: var(--color-primary);
}

[data-theme="light"] .preview-placeholder {
  color: var(--color-text-muted);
}

[data-theme="light"] .preview-placeholder i {
  color: var(--color-text-muted);
}

/* Estilos para upload-box */
.upload-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  background: var(--color-bg-alt);
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-box:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-primary-dark);
}

.upload-box:focus {
  outline: 2px solid var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary)22;
}

.upload-box .fa {
  font-size: 2em;
  color: var(--color-primary);
}

.upload-box .drag-hint {
  font-size: 0.82em;
  color: var(--color-primary);
  margin-top: 4px;
  text-align: center;
  opacity: 0.85;
}

.upload-icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

@media (max-width: 768px) {
  .upload-icon-container {
    padding: 18px;
  }
}

.upload-input {
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  cursor: pointer;
  tab-index: -1;
}

.upload-box.dragover {
  background: rgba(118, 75, 162, 0.08) !important;
  border-color: var(--color-primary-dark) !important;
}

/* Estilos para tattoo-style-card */
.tattoo-style-card {
  display: inline-block;
  padding: 12px 16px;
  margin: 4px;
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 100px;
  user-select: none;
}

.tattoo-style-card:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-primary);
}

.tattoo-style-card.active,
.tattoo-style-card.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.tattoo-style-card input[type="checkbox"] {
  display: none;
}

.tattoo-style-card label {
  cursor: pointer;
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
}

[data-theme="light"] .upload-box:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-primary-dark);
}

[data-theme="light"] .upload-box .fa {
  color: var(--color-primary);
}

[data-theme="light"] .upload-box .drag-hint {
  color: var(--color-primary);
}

[data-theme="light"] .tattoo-style-card {
  background: var(--color-bg-alt);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="light"] .tattoo-style-card:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-primary);
}

[data-theme="light"] .tattoo-style-card.active,
[data-theme="light"] .tattoo-style-card.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

[data-theme="light"] .tattoo-style-card label {
  color: inherit;
}

/* Correções para tema dark */
[data-theme="dark"] .upload-box {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-text);
}

[data-theme="dark"] .upload-box:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-primary-dark);
}

[data-theme="dark"] .upload-box .fa {
  color: var(--color-primary);
}

[data-theme="dark"] .upload-box .drag-hint {
  color: var(--color-primary);
}

[data-theme="dark"] .tattoo-style-card {
  background: var(--color-bg-alt);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .tattoo-style-card:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-primary);
}

[data-theme="dark"] .tattoo-style-card.active,
[data-theme="dark"] .tattoo-style-card.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

[data-theme="dark"] .tattoo-style-card label {
  color: inherit;
}

/* Estilos para o container dos estilos de tatuagem */
.tattoo-style-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Responsividade para os cards de tatuagem */
@media (max-width: 768px) {
  .tattoo-style-card {
    min-width: 80px;
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .tattoo-style-group {
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .tattoo-style-card {
    min-width: 70px;
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  .tattoo-style-group {
    gap: 4px;
  }
}

/* Reset básico */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}
[data-theme="dark"] body {
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}
[data-theme="light"] body {
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover, a:focus { color: var(--color-link-hover); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
  color: var(--color-text);
  letter-spacing: -0.025em;
}

h1 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-black); }
h2 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-extrabold); }
h3 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); }
h4 { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--font-size-lg); font-weight: var(--font-weight-medium); }
h6 { font-size: var(--font-size-base); font-weight: var(--font-weight-medium); }
p { margin-bottom: 1em; }
ul, ol { margin-left: 1.5em; margin-bottom: 1em; }
button, input, select, textarea {
  font-family: inherit;
  font-size: 1em;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.6em 1.2em;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: background var(--transition), color var(--transition);
}
button:hover, button:focus {
  background: var(--color-primary-dark);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-dark)22;
}
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2em 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5em;
}
.shadow { box-shadow: var(--shadow); }
.radius { border-radius: var(--radius); }
.bg-alt { background: var(--color-bg-alt); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-secondary { color: var(--color-secondary); }
/* Responsividade básica */
@media (max-width: 900px) {
  .container { padding: 1em; }
  body { font-size: 0.97rem; }
}
@media (max-width: 600px) {
  .container { padding: 0.5em; }
  h1 { font-size: 1.6em; }
  h2 { font-size: 1.3em; }
  h3 { font-size: 1.1em; }
} 

/* Scrollbar customizada */
body::-webkit-scrollbar {
  width: 6px;
  background: var(--color-secondary);
}
body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 8px;
}
[data-theme="dark"] body::-webkit-scrollbar, .preview-content::-webkit-scrollbar, .input-text::-webkit-scrollbar, .recovery-content::-webkit-scrollbar {
  background: var(--color-bg);
  border-radius: 8px;
  width: 6px;
}
[data-theme="dark"] body::-webkit-scrollbar-thumb, .preview-content::-webkit-scrollbar-thumb, .input-text::-webkit-scrollbar-thumb, .recovery-content::-webkit-scrollbar-thumb {
  background: var(--color-border);
  width: 6px;
}
/* Foco visível */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Formulários avançados */
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--color-primary);
  width: 1.1em;
  height: 1.1em;
}
select {
  background: var(--color-bg-alt);
  color: var(--color-text);
  padding: 0.4em 1.2em 0.4em 0.6em;
}
input.error, textarea.error, select.error {
  border-color: var(--color-danger);
  background: #fff0f0;
}
input.success, textarea.success, select.success {
  border-color: var(--color-success);
  background: #f0fff0;
}

/* Utilitários de espaçamento */
.mt-1 { margin-top: 0.5em; }
.mt-2 { margin-top: 1em; }
.mt-3 { margin-top: 2em; }
.mb-1 { margin-bottom: 0.5em; }
.mb-2 { margin-bottom: 1em; }
.mb-3 { margin-bottom: 2em; }
.pt-1 { padding-top: 0.5em; }
.pt-2 { padding-top: 1em; }
.pt-3 { padding-top: 2em; }
.pb-1 { padding-bottom: 0.5em; }
.pb-2 { padding-bottom: 1em; }
.pb-3 { padding-bottom: 2em; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.flex { display: flex; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }

/* Animações utilitárias */
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Tabelas básicas */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-alt);
  margin-bottom: 1.5em;
}
th, td {
  padding: 0.7em 1em;
  border: 1px solid var(--color-border);
  text-align: left;
}
th {
  background: var(--color-bg);
  font-weight: 700;
}
tr:nth-child(even) { background: var(--color-bg-alt); }
tr:hover { background: var(--color-primary)11; }

/* Badges e tags */
.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
}
.badge.secondary { background: var(--color-secondary); color: var(--color-text); }
.badge.success { background: var(--color-success); color: #fff; }
.badge.danger { background: var(--color-danger); color: #fff; }

/* Tooltips */
[data-tooltip] {
  position: relative;
  cursor: pointer;
}
[data-tooltip]:hover::after, [data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  background: var(--color-bg-alt);
  color: var(--color-text);
  padding: 0.4em 0.8em;
  border-radius: 6px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  font-size: 0.95em;
  z-index: 10;
  opacity: 1;
  pointer-events: none;
}
[data-tooltip]::after {
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
[data-tooltip]:hover::after, [data-tooltip]:focus::after {
  opacity: 1;
} 

/* Sidebar */
.dashboard-container {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.3s ease;
}

.sidebar {
  height: 92vh;
  max-height: 92vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 80px;
  background: var(--gradient-card);
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
  border-radius: 24px;
  padding: 2em 0.7em 1.2em 0.7em;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: width 0.28s cubic-bezier(.4,0,.2,1), background 0.2s, box-shadow 0.2s;
  z-index: 10;
  margin: 1.5em 0.5em 1.5em 0.5em;
}
.sidebar.expanded {
  width: 260px;
  align-items: flex-start;
  background: var(--color-bg);
  box-shadow: 0 12px 48px rgba(0,0,0,0.13);
}

[data-theme="dark"] .sidebar.expanded {
  background: var(--color-bg);
}

.sidebar-scrollable {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  width: 100%;
}
.sidebar-footer {
  flex-shrink: 0;
  width: 100%;
  background: var(--gradient-card);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 12px rgba(76,75,152,0.07);
  padding: 1.2em 1em 1.2em 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  z-index: 2;
  position: relative;
  transition: box-shadow 0.18s, background 0.18s;
  border-radius: 10px 10px 20px 20px;
}
.logo {
  width: 120px;
  display: block;
}
[data-theme="dark"] .logo {
  filter: brightness(0) invert(1);
}
.sidebar-nav {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  max-height: 100%;
}
.sidebar-nav::-webkit-scrollbar, .chart-container::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb, .chart-container::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 12px;
  border: 2px solid var(--color-bg-alt);
}
[data-theme="dark"] .sidebar-nav::-webkit-scrollbar-thumb, [data-theme="dark"] .chart-container::-webkit-scrollbar-thumb {
  background: var(--color-bg-tertiary);
}
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-group-title {
  font-weight: 700;
  font-size: 1.08em;
  padding: 0.7em 1em;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: background 0.2s;
}
.nav-group-title.open, .nav-group-title:focus {
  background: var(--color-primary)11;
}
.nav-sublist {
  list-style: none;
  padding: 0 0 0 1.2em;
  margin-left: 10px; /* Indent sub-items */
  display: none; /* Ocultar por padrão */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.sidebar .nav-list .nav-group.opened > .nav-sublist.active {
  display: block;
  max-height: 500px;
  opacity: 1;
  overflow: visible;
}

/* Animação para a seta */
.nav-group-title .fa-chevron-down {
  transition: transform 0.3s ease;
}

.nav-group.opened .nav-group-title .fa-chevron-down {
  transform: rotate(180deg);
}

.nav-item { margin: 0.3em 0; }
.nav-link {
  font-size: 1em;
  position: relative;
  margin-bottom: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.5em 0.7em;
  border-radius: 5px;
  color: var(--color-text);
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}
.nav-sublist { display: none; }
.nav-group.open .nav-sublist { display: block; }
.nav-item { margin: 0.25em 0; }
.nav-link.active, .nav-link:hover, .nav-link:focus {
  background: var(--color-primary)11;
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(76,75,152,0.07);
}
.admin-only { display: none; }

.user-name { font-weight: 700; margin-bottom: 0.2em; }
.user-role { font-size: 0.95em; color: var(--color-secondary); margin-bottom: 0.7em; }
.logout-btn {
  background: var(--color-danger);
  color: #fff;
  border: none;
  padding: 0.5em 1.2em;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.logout-btn:hover, .logout-btn:focus { background: var(--color-danger); }

/* Main Content */
.main-content {
  padding: 2.2em 2.5em 2.5em 2.5em;
  min-width: 0;
  transition: padding 0.3s ease;
}
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2em;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: start;
}
.metric-card {
  background: var(--color-bg-alt);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.2em 1em;
  text-align: center;
  border: 1px solid var(--color-border);
}
.metric-value {
  font-size: 2.1em;
  font-weight: 800;
  margin: 0.2em 0 0.1em 0;
  color: var(--color-primary);
}
.metric-label {
  font-size: 1em;
  color: var(--color-text);
  opacity: 0.7;
}
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: start;
}
.chart-container {
  background: var(--color-bg-alt);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.2em 1em;
  border: 1px solid var(--color-border);
  overflow-x: auto;
}

/* Tabelas e cards */
.card {
  background: var(--color-bg-alt);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.5em 1.2em;
  margin-bottom: 2em;
  border: 1px solid var(--color-border);
}
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-alt);
  margin-bottom: 1.5em;
}
.analytics-table th, .analytics-table td {
  padding: 0.7em 1em;
  border: 1px solid var(--color-border);
  text-align: left;
}
.analytics-table th {
  background: var(--color-bg);
  font-weight: 700;
}
.analytics-table tr:nth-child(even) { background: var(--color-bg-alt); }
.analytics-table tr:hover { background: var(--color-primary)11; }

/* Formulários e grids */
.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
}
.form-row {
  display: flex;
  gap: 1.2em;
  margin-bottom: 1em;
}
.form-row-2col { flex-direction: row; }
.form-group { flex: 1; }
.input-paste-wrapper {
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.btn-paste-inside {
  background: var(--color-secondary);
  color: #222;
  border: none;
  border-radius: 5px;
  padding: 0.3em 0.7em;
  font-size: 1em;
  cursor: pointer;
  margin-left: 0.2em;
  transition: background 0.18s;
}
.btn-paste-inside:hover, .btn-paste-inside:focus { background: var(--color-primary); color: #fff; }
/* Removido - definição duplicada movida para form.css */
/* Removido - definição duplicada movida para form.css */
.upload-preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
}

/* Responsividade */
@media (max-width: 1200px) {
  .main-content { padding: 1.2em 0.5em; }
  .sidebar { width: 210px; }
}
@media (max-width: 900px) {
  .dashboard-container { 
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .sidebar { 
    width: 100%; 
    min-width: 100%;
    min-height: auto; 
    position: static; 
    box-shadow: none; 
    margin: 0;
    border-radius: 0;
  }
  .main-content { padding: 1em 0.2em; }
  .metrics-grid, .charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sidebar-header { padding: 1em 0.5em; }
  .main-content { padding: 0.5em 0.1em; }
  .metrics-grid, .charts-grid { gap: 1em; }
  .form-grid-2col { grid-template-columns: 1fr; }
} 

/* Seções do dashboard */
.dashboard-section { display: none; }
.dashboard-section.active { display: block; animation: fadeIn 0.4s; }

/* Títulos de macro-seção */
.macro-title {
  font-size: 1.25em;
  font-weight: 800;
  margin: 2em 0 1em 0;
  color: var(--color-primary);
  letter-spacing: 0.01em;
}

/* Filtros de analytics */
.analytics-filters {
  display: flex;
  align-items: center;
  gap: 1em;
  background: var(--color-bg-alt);
  border-radius: 8px;
  padding: 1em 1.2em;
  margin-bottom: 1.5em;
  box-shadow: var(--shadow);
}

/* Botões utilitários */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border: none;
  border-radius: 6px;
  padding: 0.5em 1.2em;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-primary);
  color: #fff;
  transition: background 0.18s, color 0.18s;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background: var(--color-primary-dark); }
.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}
.btn-secondary:hover, .btn-secondary:focus { background: var(--color-primary); color: #fff; }
.btn-view { background: var(--color-success); color: #fff; }
.btn-edit { background: var(--color-link); color: #fff; }
.btn-danger, .btn[aria-label*="remover"], .btn[aria-label*="excluir"] {
  background: var(--color-danger);
  color: #fff;
}
.btn-danger:hover, .btn-danger:focus { background: var(--color-danger); }

/* Admin only (visível para admin) */
.admin-only { display: none; }
body.admin .admin-only { display: block; }

/* Upload preview */
.upload-preview-container img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

/* Acessibilidade: esconder visualmente mas manter para leitores */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
} 

/* Containers principais */
.container, .landing-container, .wizard-container, .pending-container, .register-container, .success-card, .login-card, .card {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5em 1em;
  box-sizing: border-box;
}

/* HEADER E LOGO */
.header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 0 18px 0;
  background: none;
  border-bottom: 1.5px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(118, 75, 162, 0.03);
}
.logo, .logo-img {
  height: 48px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(92,134,255,0.08));
}

/* TÍTULOS E SUBTÍTULOS */
.hero-title, .wizard-title, .success-title, .pending-title, .section-title, .cta-title {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 0.5em;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.hero-title { font-size: 3.5rem; color: var(--color-primary-dark); }
@media (max-width: 768px) { .hero-title { font-size: 2.5rem; } }
.subtitle, .hero-subtitle, .wizard-subtitle, .success-message, .pending-message, .cta-description {
  font-size: 1.18rem;
  color: var(--color-secondary);
  margin-bottom: 1.2em;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* BOTÕES E CTAs */
.hero-cta, .btn, .btn--edit, .btn--outline, .btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  border: none;
  border-radius: 50px;
  padding: 0.8em 2.2em;
  font-size: 1.13rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, var(--color-primary) 60%, var(--color-secondary) 100%);
  color: #fff;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s;
  box-shadow: 0 8px 32px rgba(118, 75, 162, 0.10);
  text-decoration: none;
  outline: none;
}
.hero-cta, .btn-primary {
  background: linear-gradient(90deg, var(--color-primary) 60%, var(--color-secondary) 100%);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .hero-cta:hover, .hero-cta:focus {
  background: linear-gradient(90deg, var(--color-primary-dark) 60%, var(--color-secondary-dark) 100%);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 40px rgba(118, 75, 162, 0.18);
}
.btn-secondary {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-primary);
  color: #fff;
}
.btn--edit {
  background: var(--color-success);
  color: #fff;
}
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
}
.btn--outline:hover, .btn--outline:focus {
  background: var(--color-secondary);
  color: #fff;
}
.button-disabled, .btn[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* CARDS E PAINÉIS */
.card, .feature-card, .pricing-card, .success-card, .pending-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2em 1.5em;
  margin-bottom: 2em;
  border: 1.5px solid var(--color-border);
  transition: box-shadow 0.18s, border 0.18s;
}
.card:hover, .feature-card:hover, .pricing-card:hover {
  box-shadow: 0 12px 40px rgba(92,134,255,0.10);
  border: 1.5px solid var(--color-primary);
}

/* GRIDS E LAYOUTS */
.features-grid, .benefits-grid, .wizard-fields, .wizard-steps, .metrics-grid, .charts-grid {
  display: grid;
  gap: 2em;
}
.features-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.benefits-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.wizard-fields { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.metrics-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.charts-grid { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
@media (max-width: 900px) {
  .features-grid, .benefits-grid, .wizard-fields, .metrics-grid, .charts-grid { grid-template-columns: 1fr; }
}

/* FORMULÁRIOS */
.form-group, .form-section {
  margin-bottom: 1.2em;
}
.input-text, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], textarea, select {
  width: 100%;
  padding: 0.8em 1.1em;
  border-radius: var(--radius);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 1.04em;
  margin-top: 0.3em;
  margin-bottom: 0.5em;
  box-sizing: border-box;
  transition: border 0.2s, box-shadow 0.2s;
}
.input-text:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary)22;
}
input[readonly], input[disabled], textarea[readonly], textarea[disabled] {
  background: #f3f3f3;
  color: #aaa;
  cursor: not-allowed;
}

/* MENSAGENS DE ERRO/SUCESSO */
.error-message, .success-message, .alert, .warning-text {
  padding: 0.7em 1em;
  border-radius: 8px;
  font-size: 1em;
  margin-bottom: 1em;
  box-shadow: var(--shadow);
}
.error-message, .alert.alert-danger, .warning-text {
  background: #fff0f0;
  color: var(--color-danger);
  border: 1.5px solid var(--color-danger);
}
.success-message, .alert.alert-success {
  background: #f0fff0;
  color: var(--color-success);
  border: 1.5px solid var(--color-success);
}
.alert.alert-info {
  background: #e6f0ff;
  color: var(--color-secondary);
  border: 1.5px solid var(--color-secondary);
}

/* ÍCONES E ELEMENTOS VISUAIS */
.feature-icon, .benefit-icon, .success-icon, .pending-icon {
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: 0.7em;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(92,134,255,0.10));
}
.success-icon { color: var(--color-success); }
.pending-icon { color: var(--color-accent); }

/* FOOTER */
.footer {
  text-align: center;
  padding: 40px 0 20px 0;
  color: var(--color-secondary);
  border-top: 1.5px solid var(--color-border);
  font-size: 1.08em;
  margin-top: 2em;
  background: var(--color-bg-alt);
  box-shadow: 0 -2px 12px rgba(92,134,255,0.03);
}

/* Utilitários adicionais */
.full-width { width: 100%; }
.max-width-400 { max-width: 400px; }
.text-muted { color: var(--color-text-muted); }
.text-bold { font-weight: 700; }
.text-lg { font-size: 1.2em; }
.text-xl { font-size: 1.5em; }
.text-xxl { font-size: 2em; }
.rounded { border-radius: 12px; }
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.07); }
.shadow-lg { box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.bg-primary { background: var(--color-primary); color: #fff; }
.bg-secondary { background: var(--color-secondary); color: var(--color-text); }
.bg-success { background: var(--color-success); color: #fff; }
.bg-danger { background: var(--color-danger); color: #fff; }
.bg-info { background: var(--color-bg-tertiary); color: var(--color-text-secondary) !important; }

/* Loader/spinner */
.spinner, .spinner-ring {
  border: 4px solid #eee;
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Overlay de loading */
.wizard-loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  transition: background 0.3s;
}
[data-theme="light"] .wizard-loading-overlay {
  background: rgba(255,255,255,0.92);
}
.wizard-loading-content {
  text-align: center;
  color: #fff;
}
[data-theme="light"] .wizard-loading-content {
  color: #222;
}
.wizard-loading-spinner .spinner-ring {
  border: 4px solid #fff;
  border-top: 4px solid var(--color-primary);
}
[data-theme="light"] .wizard-loading-spinner .spinner-ring {
  border: 4px solid var(--color-primary);
  border-top: 4px solid #fff;
}
.wizard-loading-text {
  margin-top: 18px;
  font-size: 1.1rem;
  color: #fff;
}
[data-theme="light"] .wizard-loading-text {
  color: #222;
}

/* Página de pagamento pendente */
.pending-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5em 1.5em;
  background: var(--color-bg-alt);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.pending-icon {
  font-size: 3.2rem;
  color: var(--color-accent);
  margin-bottom: 0.7em;
}
.pending-title {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 0.5em;
}
.pending-message {
  color: var(--color-secondary);
  font-size: 1.08rem;
  margin-bottom: 0.5em;
}
.warning-text {
  background: #fffbe6;
  color: #b7791f;
  border: 1px solid #b7791f;
  margin-bottom: 1em;
}
.page-info {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 14px 10px;
  color: var(--color-text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 8px;
  width: 100%;
  text-align: center;
}
.page-url {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 4px;
  word-break: break-all;
}

/* LINKS UTILITÁRIOS */
.links a {
  color: var(--color-link);
  text-decoration: underline;
  margin-right: 1em;
  font-weight: 500;
  transition: color 0.18s;
}
.links a:hover { color: var(--color-link-hover); } 

/* MICROINTERAÇÕES E ANIMAÇÕES SUAVES */
:root {
  --anim-fast: 0.18s cubic-bezier(.4,0,.2,1);
  --anim-medium: 0.32s cubic-bezier(.4,0,.2,1);
}

/* Foco visível refinado */
:focus-visible {
  outline: 2.5px solid var(--color-secondary);
  outline-offset: 2.5px;
  box-shadow: 0 0 0 4px var(--color-secondary)22;
  transition: outline var(--anim-fast), box-shadow var(--anim-fast);
}

/* Animação de hover em cards */
.card, .feature-card, .pricing-card, .success-card, .pending-card {
  transition: box-shadow var(--anim-medium), border var(--anim-fast), transform var(--anim-fast);
}
.card:hover, .feature-card:hover, .pricing-card:hover {
  box-shadow: 0 16px 48px rgba(92,134,255,0.13);
  border: 1.5px solid var(--color-secondary);
  transform: translateY(-4px) scale(1.012);
}

/* Inputs com animação de foco */
.input-text, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], textarea, select {
  transition: border var(--anim-fast), box-shadow var(--anim-fast), background var(--anim-fast);
}
.input-text:focus, textarea:focus, select:focus {
  background: var(--color-bg);
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px var(--color-secondary)22;
}

/* Botões com microinteração */
.hero-cta, .btn, .btn--edit, .btn--outline, .btn-primary, .btn-secondary {
  transition: background var(--anim-fast), color var(--anim-fast), box-shadow var(--anim-fast), transform var(--anim-fast), filter var(--anim-fast);
  will-change: transform, box-shadow, filter;
}
.hero-cta:active, .btn:active {
  filter: brightness(0.97) saturate(1.1);
  transform: scale(0.98);
}

/* Sombra de elevação em hover para botões principais */
.btn-primary:hover, .hero-cta:hover {
  box-shadow: 0 16px 48px rgba(92,134,255,0.18);
}

/* Placeholder refinado */
::placeholder {
  color: #b3b3c0;
  opacity: 1;
  font-style: italic;
  letter-spacing: 0.01em;
}


/* Feedback visual em links */
a, .links a {
  transition: color var(--anim-fast), text-decoration-color var(--anim-fast);
  text-underline-offset: 2.5px;
  text-decoration-thickness: 2px;
}
a:focus-visible, .links a:focus-visible {
  color: var(--color-secondary);
  text-decoration: underline wavy var(--color-secondary);
}

/* Responsividade refinada para cards e grids */
@media (max-width: 600px) {
  .card, .feature-card, .pricing-card, .success-card, .pending-card {
    padding: 1.1em 0.5em;
    border-radius: 10px;
  }
  .footer {
    font-size: 0.98em;
    padding: 24px 0 12px 0;
  }
}

/* Acessibilidade: foco visível em botões e inputs */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2.5px solid var(--color-secondary);
  outline-offset: 2.5px;
  box-shadow: 0 0 0 4px var(--color-secondary)22;
}

/* Animação de fade para alertas e mensagens */
.error-message, .success-message, .alert, .warning-text {
  animation: fadeIn 0.5s cubic-bezier(.4,0,.2,1);
}

/* Microinteração em ícones de ação */
.feature-icon, .benefit-icon, .success-icon, .pending-icon {
  transition: filter var(--anim-fast), transform var(--anim-fast);
}
.feature-card:hover .feature-icon, .success-card:hover .success-icon {
  filter: brightness(1.15) drop-shadow(0 4px 12px var(--color-secondary)33);
  transform: scale(1.08) rotate(-2deg);
}

/* Tooltip animado */
[data-tooltip]:hover::after, [data-tooltip]:focus::after {
  animation: fadeIn 0.22s cubic-bezier(.4,0,.2,1);
} 

/* DASHBOARD: VISUAL PREMIUM LIGHT/DARK */
.sidebar-header {max-height: 80px; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 2.2em; text-align: center; flex-shrink: 0;}
.sidebar .logo { width: 44px; height: 44px;}
[data-theme="dark"] .sidebar .logo { filter: brightness(0) invert(1); }
.sidebar-nav { flex: 1; width: 100%; }
.nav-group-title {
  display: flex; align-items: center; gap: 1.1em; font-size: 1.13em; font-weight: 600;
  color: var(--color-text-alt); padding: 0.85em 1.3em; border-radius: 14px; cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s; position: relative; margin-bottom: 0.1em;
}
.sidebar:not(.expanded) .nav-group-title .nav-label,
.sidebar:not(.expanded) .nav-group-title .fa-chevron-down,
.sidebar:not(.expanded) .nav-sublist,
.sidebar:not(.expanded) .nav-link .nav-label,
.sidebar:not(.expanded) #theme-toggle-root,
.sidebar:not(.expanded) .user-name,
.sidebar:not(.expanded) .user-role {
  display: none;
}
.sidebar.expanded .nav-group-title .nav-label,
.sidebar.expanded .nav-group-title .fa-chevron-down {
  display: inline;
}

.sidebar:not(.expanded) .nav-link span.nav-label { display: none; }
/* Avatar e user info */
.user-info {flex-shrink: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.5em;
  margin: 0;
}
.user-avatar {  
  width: 54px; height: 54px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 60%, var(--color-secondary) 100%); box-shadow: 0 2px 12px rgba(76,75,152,0.13); display: flex; align-items: center; justify-content: center; border: 3px solid #fff; transition: box-shadow 0.18s, border 0.18s; font-weight: 800; font-size: 1.3em;align-items: center; justify-content: center;

}
.user-avatar span:not(.expanded) {
  font-size: 1em;
}
.user-avatar img, .user-avatar span {
  width: 100%; height: 100%; object-fit: cover; font-size: 1.4em; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.user-avatar:hover { box-shadow: 0 4px 24px var(--color-primary)33; border: 3px solid var(--color-primary);}
.sidebar .logout-btn {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: none; color: var(--color-danger); border: none; font-size: 1.5em; cursor: pointer;
  border-radius: 50%; box-shadow: none; transition: background 0.18s, color 0.18s;
  position: sticky; left: 0; right: 0; bottom: 80px; z-index: 2;
}

.sidebar:not(.expanded) .user-info { flex-direction: column; align-items: center;}
.sidebar:not(.expanded) .user-avatar { margin-bottom: 0; width: 40px; height: 40px;}
/* Responsivo */
@media (max-width: 900px) and (min-width: 601px) {
  .sidebar { 
    width: 60px; 
    min-width: 60px; 
    padding: 1em 0.2em; 
    margin: 0.5em 0.2em 0.5em 0.2em; 
  }
  .sidebar.expanded { 
    width: 220px; 
    min-width: 220px; 
  }
}
@media (max-width: 600px) {
  .sidebar { 
    width: 100vw; 
    min-width: 100vw; 
    border-radius: 0; 
    margin: 0; 
    padding: 0.5em 0.1em; 
  }
  .sidebar.expanded { 
    width: 100vw; 
    min-width: 100vw; 
  }
  .sidebar-header { margin-bottom: 1em; }
  .user-info { padding-bottom: 0.5em; }
}

/* Sidebar links */
.sidebar .nav-link, .sidebar .nav-group-title {
  color: var(--sidebar-link, #764ba2);
  font-weight: 700;
  transition: color 0.2s, background 0.2s;
}
[data-theme="dark"] .sidebar .nav-link, [data-theme="dark"] .sidebar .nav-group-title {
  --sidebar-link: var(--color-text-secondary);
}
[data-theme="light"] .sidebar .nav-link, [data-theme="light"] .sidebar .nav-group-title {
  --sidebar-link: #764ba2;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover, .sidebar .nav-link:focus {
  background: var(--color-primary)22;
  color: var(--color-primary);
}

/* Sidebar ícones */
.sidebar .nav-link i, .sidebar .nav-group-title i {
  color: var(--color-primary);
  font-size: 1.1em;
}
[data-theme="dark"] .sidebar .nav-link i, [data-theme="dark"] .sidebar .nav-group-title i {
  color: var(--color-text-secondary);
}

/* Sidebar toggle/theme-switch refinado */
.theme-toggle {
  margin: 1.2em auto 1.2em auto;
  display: flex;
  justify-content: center;
}

/* Dashboard main: gradiente de fundo */
.main-content {
  min-height: 100vh;
  padding: 2.2em 2.5em 2.5em 2.5em;
  transition: background 0.4s;
}


/* Cards e tabelas translúcidas com borda branca sutil */
.card, .feature-card, .pricing-card, .success-card, .pending-card, .analytics-table, .dashboard-table {
  background: rgba(255,255,255,0.82);
  border: 1.5px solid var(--color-bg-alt);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  color: var(--color-text);
  transition: background 0.3s, color 0.3s, border 0.3s;
}
[data-theme="dark"] .card, [data-theme="dark"] .feature-card, [data-theme="dark"] .pricing-card, [data-theme="dark"] .success-card, [data-theme="dark"] .pending-card, [data-theme="dark"] .analytics-table, [data-theme="dark"] .dashboard-table {
  background: rgba(32,34,42,0.92);
  border: 1.5px solid var(--color-border);
  color: var(--color-text);
  box-shadow: 0 8px 32px rgba(92,134,255,0.13);
}

/* Títulos e ícones: brancos no dark, roxos/azuis no light */
.card h1, .card h2, .card h3, .dashboard-section h1, .dashboard-section h2, .dashboard-section h3 {
  color: var(--color-text-secondary);
  font-weight: 900;
  letter-spacing: -0.5px;
}
[data-theme="dark"] .card h1, [data-theme="dark"] .card h2, [data-theme="dark"] .card h3, [data-theme="dark"] .dashboard-section h1, [data-theme="dark"] .dashboard-section h2, [data-theme="dark"] .dashboard-section h3 {
  color: var(--color-text-secondary);
}
.card i, {
  color: var(--color-text-secondary);
}

i.fas.fa-sync-alt {
  color: var(--color-bg);
}

[data-theme="dark"] .card i, [data-theme="dark"] .dashboard-section i {
  color: var(--color-text-secondary);
}

/* Botões dashboard: contraste e sombra */
.btn, .btn-primary, .btn-secondary {
  border-radius: var(--radius);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  box-shadow: var(--shadow-light);
  padding: var(--space-md) var(--space-xl);
  background: var(--gradient-button);
  color: #ffffff;
  border: none;
  transition: all var(--transition);
  font-family: var(--font-main);
  letter-spacing: 0.025em;
  position: relative;
  overflow: hidden;
}
.btn:hover, .btn:focus {
  background: var(--gradient-button);
  color: #ffffff;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  filter: brightness(1.1);
}
[data-theme="dark"] .btn, [data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-secondary {
  background: #23223a;
  color: var(--color-text-secondary);
  border: 1.5px solid #35374a;
  box-shadow: 0 4px 24px rgba(92,134,255,0.13);
}
[data-theme="dark"] .btn:hover, [data-theme="dark"] .btn:focus {
  background: var(--color-primary);
  color: #fff;
  border: 1.5px solid var(--color-text-secondary);
}

/* Tabela: cabeçalho translúcido, linhas alternadas */
.analytics-table th, .dashboard-table th {
  background: rgba(255,255,255,0.18);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  border-bottom: 2px solid var(--color-bg-alt);
  padding: var(--space-md) var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
[data-theme="dark"] .analytics-table th, [data-theme="dark"] .dashboard-table th {
  background: rgba(32,34,42,0.85);
  color: var(--color-text-secondary);
  border-bottom: 2px solid #35374a;
}
.analytics-table tr:nth-child(even), .dashboard-table tr:nth-child(even) {
  background: rgba(255,255,255,0.10);
}
[data-theme="dark"] .analytics-table tr:nth-child(even), [data-theme="dark"] .dashboard-table tr:nth-child(even) {
  background: rgba(32,34,42,0.70);
}

/* Links de ação na tabela */
.dashboard-table a, .analytics-table a {
  color: var(--color-secondary);
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.18s;
}
.dashboard-table a:hover, .analytics-table a:hover {
  color: var(--color-text-secondary);
}
[data-theme="dark"] .dashboard-table a, [data-theme="dark"] .analytics-table a {
  color: var(--color-text-secondary);
  text-shadow: 0 1px 2px #23223a;
}
[data-theme="dark"] .dashboard-table a:hover, [data-theme="dark"] .analytics-table a:hover {
  color: #fff;
}

/* Ajuste de padding e borda para cards/tabelas no dashboard */
.card, .dashboard-table, .analytics-table {
  border-radius: 18px;
  padding: 1.5em 1.2em;
}

/* Gradiente nos cards principais do dashboard (light) */
[data-theme="light"] .dashboard-main-card, [data-theme="light"] .dashboard-summary-card {
  background: linear-gradient(120deg, var(--color-bg) 80%, var(--color-bg-tertiary) 100%);
  border: 1.5px solid var(--color-bg-alt);
}
[data-theme="dark"] .dashboard-main-card, [data-theme="dark"] .dashboard-summary-card {
  background: rgba(24,26,27,0.97);
  border: 1.5px solid #333;
}

/* Sombra e transição para cards/tabelas */
.card, .dashboard-table, .analytics-table {
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, background 0.3s, border 0.3s;
}
.card:hover, .dashboard-table:hover, .analytics-table:hover {
  box-shadow: var(--shadow);
} 

/* TÍTULOS DE SEÇÃO DO DASHBOARD */
.dashboard-section-title, .dashboard-section-header, .dashboard-title-bar {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-xl);
  border-radius: var(--radius);
  background: var(--gradient-primary);
  color: var(--color-bg-alt);
  box-shadow: var(--shadow);
  border: 2px solid var(--color-primary);
  letter-spacing: -0.025em;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .dashboard-section-title, [data-theme="light"] .dashboard-section-header, [data-theme="light"] .dashboard-title-bar {
  background: linear-gradient(90deg, var(--color-bg) 60%, var(--color-bg-tertiary) 100%);
  color: var(--color-text-secondary);
  border: 2.5px solid var(--color-bg-tertiary);
}
[data-theme="dark"] .dashboard-section-title, [data-theme="dark"] .dashboard-section-header, [data-theme="dark"] .dashboard-title-bar {
  background: linear-gradient(90deg, #23223a 60%, #23272f 100%);
  color: #fff;
  border: 2.5px solid #35374a;
}
.dashboard-section-title i, .dashboard-section-header i, .dashboard-title-bar i {
  font-size: 2.1rem;
  color: var(--color-bg-alt);
  margin-right: 0.7em;
  filter: drop-shadow(0 2px 8px var(--glow));
  transition: color 0.3s;
}
[data-theme="light"] .dashboard-section-title i, [data-theme="light"] .dashboard-section-header i, [data-theme="light"] .dashboard-title-bar i {
  color: var(--color-text-secondary);
  filter: drop-shadow(0 2px 8px var(--glow-light));
}
[data-theme="dark"] .dashboard-section-title i, [data-theme="dark"] .dashboard-section-header i, [data-theme="dark"] .dashboard-title-bar i {
  color: var(--color-text-secondary);
  filter: drop-shadow(0 2px 8px var(--color-primary));
}
@media (max-width: 900px) {
  .dashboard-section-title, .dashboard-section-header, .dashboard-title-bar {
    font-size: var(--font-size-lg);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius);
    margin-bottom: var(--space-lg);
  }
  .dashboard-section-title i, .dashboard-section-header i, .dashboard-title-bar i {
    font-size: var(--font-size-lg);
    margin-right: var(--space-sm);
  }
  
  .metric-card, .card, .chart-container {
    padding: var(--space-lg) var(--space-md);
    margin-bottom: var(--space-lg);
  }
  
  .metrics-grid, .charts-grid {
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
  }
} 




[data-theme="dark"] .sidebar {
  background: var(--color-bg-alt);
  color: #f1f1f1;
  box-shadow: 2px 0 24px 0 rgba(0,0,0,0.22);
  border-right: 1.5px solid #23223a;
}
[data-theme="dark"] .sidebar .nav-link, [data-theme="dark"] .sidebar .nav-group-title {
  color: var(--color-text-secondary);
}
[data-theme="dark"] .sidebar .nav-link.active, [data-theme="dark"] .sidebar .nav-link:hover, [data-theme="dark"] .sidebar .nav-link:focus {
  background: #23223a;
  color: #fff;
}
[data-theme="dark"] .sidebar .nav-link i, [data-theme="dark"] .sidebar .nav-group-title i {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .dashboard-section-title, [data-theme="dark"] .dashboard-section-header, [data-theme="dark"] .dashboard-title-bar {
  background: linear-gradient(90deg, #23223a 60%, #23272f 100%);
  color: #fff;
  border: 2.5px solid #35374a;
}
[data-theme="dark"] .dashboard-section-title i, [data-theme="dark"] .dashboard-section-header i, [data-theme="dark"] .dashboard-title-bar i {
  color: var(--color-text-secondary);
  filter: drop-shadow(0 2px 8px var(--color-primary));
}

[data-theme="dark"] .card, [data-theme="dark"] .feature-card, [data-theme="dark"] .pricing-card, [data-theme="dark"] .success-card, [data-theme="dark"] .pending-card, [data-theme="dark"] .analytics-table, [data-theme="dark"] .dashboard-table {
  background: rgba(32,34,42,0.92);
  border: 1.5px solid #35374a;
  color: #f1f1f1;
  box-shadow: 0 8px 32px rgba(92,134,255,0.13);
}
[data-theme="dark"] .card h1, [data-theme="dark"] .card h2, [data-theme="dark"] .card h3, [data-theme="dark"] .dashboard-section h1, [data-theme="dark"] .dashboard-section h2, [data-theme="dark"] .dashboard-section h3 {
  color: var(--color-text-secondary);
}


[data-theme="dark"] .analytics-table th, [data-theme="dark"] .dashboard-table th {
  background: rgba(32,34,42,0.85);
  color: var(--color-text-secondary);
  border-bottom: 2px solid #35374a;
}
[data-theme="dark"] .analytics-table tr, [data-theme="dark"] .dashboard-table tr {
  border-bottom: 1px solid #23223a;
}
[data-theme="dark"] .analytics-table tr:nth-child(even), [data-theme="dark"] .dashboard-table tr:nth-child(even) {
  background: rgba(32,34,42,0.70);
}
[data-theme="dark"] .dashboard-table a, [data-theme="dark"] .analytics-table a {
  color: var(--color-text-secondary);
  text-shadow: 0 1px 2px #23223a;
}
[data-theme="dark"] .dashboard-table a:hover, [data-theme="dark"] .analytics-table a:hover {
  color: #fff;
}

[data-theme="dark"] .btn, [data-theme="dark"] .btn-primary, [data-theme="dark"] .btn-secondary {
  background: #23223a;
  color: var(--color-text-secondary);
  border: 1.5px solid #35374a;
  box-shadow: 0 4px 24px rgba(92,134,255,0.13);
}
[data-theme="dark"] .btn:hover, [data-theme="dark"] .btn:focus {
  background: var(--color-primary);
  color: #fff;
  border: 1.5px solid var(--color-text-secondary);
}

[data-theme="dark"] .footer {
  background: #181a1b;
  color: var(--color-text-secondary);
  border-top: 1.5px solid #35374a;
}

[data-theme="dark"] .text-muted, [data-theme="dark"] .text-secondary {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .form-group label, [data-theme="dark"] label, [data-theme="dark"] .form-label {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .input-text, [data-theme="dark"] input[type="text"], [data-theme="dark"] input[type="email"], [data-theme="dark"] input[type="password"], [data-theme="dark"] input[type="url"], [data-theme="dark"] input[type="number"], [data-theme="dark"] textarea, [data-theme="dark"] select {
  background: #23223a;
  color: #f1f1f1;
  border: 1.5px solid #35374a;
}
[data-theme="dark"] .input-text:focus, [data-theme="dark"] textarea:focus, [data-theme="dark"] select:focus {
  border-color: var(--color-text-secondary);
  box-shadow: 0 0 0 3px var(--color-primary);
}
[data-theme="dark"] ::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.7;
} 

/* Corrige bug de altura infinita dos gráficos */
.chart-container canvas,
.charts-grid canvas,
.dashboard-section canvas {
  height: 280px;
  max-width: 100%;
  box-sizing: border-box;
} 

/* --- REFINAMENTO VISUAL PREMIUM MENU LATERAL --- */
.sidebar.expanded {
  width: 260px;
  background: linear-gradient(180deg, #fff 80%, #f7f6fd 100%);
  box-shadow: 0 12px 48px rgba(120, 80, 200, 0.10);
  border-radius: 24px;
  align-items: flex-start;
  transition: width 0.28s cubic-bezier(.4,0,.2,1), background 0.2s, box-shadow 0.2s;
}

.sidebar.expanded .nav-list {
  padding: 0.5em 0.2em 0.5em 0.2em;
}

.sidebar.expanded .nav-group {
  position: relative;
}


.sidebar.expanded .nav-group-title {
  background: #f7f6fd;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(120, 80, 200, 0.04);
  padding: 1em 1.5em 1em 1.2em;
  border-radius: 12px;
  font-size: 1em;
  font-weight: 800;
  margin-bottom: 0.2em;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  display: flex;
  align-items: center;
  gap: 0.7em;
  cursor: pointer;
  position: relative;
}

.sidebar.expanded .nav-group.open .nav-group-title {
  background: #ece9fa;
  color: var(--color-primary-dark, #764ba2);
  box-shadow: 0 4px 16px rgba(120, 80, 200, 0.10);
}

.sidebar.expanded .nav-group.open .nav-group-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 5px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--color-primary) 60%, #5c86ff 100%);
}

.sidebar.expanded .nav-group-title .chevron {
  margin-left: auto;
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
  font-size: 1.1em;
}
.sidebar.expanded .nav-group.open .nav-group-title .chevron {
  transform: rotate(180deg);
}

.sidebar.expanded .nav-group-title {
  position: relative;
  overflow: hidden;
}

.sidebar.expanded .nav-group-title:hover,
.sidebar.expanded .nav-group-title:focus {
  background: #ede7fa;
  color: var(--color-primary-dark, #764ba2);
}

/* Efeito Shimmer para Títulos dos Grupos */
.sidebar.expanded .nav-group-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.sidebar.expanded .nav-group-title:hover::before {
  left: 100%;
}

.sidebar.expanded .nav-link {
  padding: 0.7em 1.7em;
  border-radius: 10px;
  font-size: 1.08em;
  color: var(--color-text-alt);
  background: none;
  margin-bottom: 0.1em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.7em;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  position: relative;
}

.sidebar.expanded .nav-link.active,
.sidebar.expanded .nav-link:hover,
.sidebar.expanded .nav-link:focus {
  background: #f3f0fa;
  color: var(--color-primary);
  box-shadow: 0 1px 8px rgba(120, 80, 200, 0.08);
  font-weight: 800;
}

.sidebar.expanded .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--color-primary) 60%, #5c86ff 100%);
}

.sidebar.expanded .nav-sublist {
  background: #f8f7fc;
  border-radius: 10px;
  margin: 0.2em 0 0.7em 0.7em;
  padding: 0.5em 1.2em 0.5em 1.2em;
  box-shadow: 0 2px 8px rgba(120, 80, 200, 0.04);
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.28s cubic-bezier(.4,0,.2,1), opacity 0.18s;
  overflow: hidden;
}
.sidebar.expanded .nav-group:not(.open) .nav-sublist {
  max-height: 0;
  opacity: 0;
  padding: 0;
  box-shadow: none;
}

.sidebar.expanded .nav-sublist .nav-link {
  font-size: 0.99em;
  color: var(--color-primary-dark, #764ba2);
  padding: 0.5em 1.2em;
  border-radius: 8px;
  background: none;
  margin-bottom: 0.1em;
  font-weight: 600;
}

.sidebar.expanded .nav-sublist .nav-link {
  position: relative;
  overflow: hidden;
}

.sidebar.expanded .nav-sublist .nav-link:hover {
  background: #ece9fa;
  color: var(--color-primary);
}

/* Efeito Shimmer para Links do Submenu */
.sidebar.expanded .nav-sublist .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.sidebar.expanded .nav-sublist .nav-link:hover::before {
  left: 100%;
}





/* Card do usuário com hover */

.sidebar-footer:hover {
  box-shadow: 0 8px 48px rgba(120, 80, 200, 0.18);
  background: #f7f6fd;
}

/* Responsividade e acessibilidade */
@media (max-width: 900px) {
  .sidebar.expanded {
    width: 100vw;
    min-width: 0;
    border-radius: 0;
    box-shadow: 0 4px 32px rgba(120, 80, 200, 0.10);
  }
}
.sidebar .nav-link:focus-visible, .sidebar .nav-group-title:focus-visible {
  outline: 2.5px solid #764ba2;
  outline-offset: 2.5px;
  box-shadow: 0 0 0 4px #764ba222;
}
/* --- FIM REFINAMENTO VISUAL PREMIUM MENU LATERAL --- */ 
[data-theme="dark"] .sidebar.expanded {
  background: linear-gradient(180deg, var(--color-bg) 80%, var(--color-bg-alt) 100%);
  box-shadow: 0 12px 48px rgba(40, 30, 80, 0.18);
}
[data-theme="dark"] .sidebar.expanded .nav-group-title {
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  box-shadow: 0 2px 8px rgba(76, 75, 152, 0.10);
}
[data-theme="dark"] .sidebar.expanded .nav-group.open .nav-group-title {
  background: #23234a;
  color: #fff;
  box-shadow: 0 4px 16px rgba(76, 75, 152, 0.18);
}
[data-theme="dark"] .sidebar.expanded .nav-group.open .nav-group-title::before {
  background: linear-gradient(180deg, var(--color-text-secondary) 60%, #5c86ff 100%);
}
[data-theme="dark"] .sidebar.expanded .nav-group-title {
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .sidebar.expanded .nav-group-title:hover,
[data-theme="dark"] .sidebar.expanded .nav-group-title:focus {
  background: #23234a;
  color: #fff;
}

/* Efeito Shimmer para Títulos dos Grupos - Dark Mode */
[data-theme="dark"] .sidebar.expanded .nav-group-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

[data-theme="dark"] .sidebar.expanded .nav-group-title:hover::before {
  left: 100%;
}
[data-theme="dark"] .sidebar.expanded .nav-link {
  background: none;
  color: var(--color-text-secondary);
}
[data-theme="dark"] .sidebar.expanded .nav-link.active,
[data-theme="dark"] .sidebar.expanded .nav-link:hover,
[data-theme="dark"] .sidebar.expanded .nav-link:focus {
  background: #23234a;
  color: #fff;
  box-shadow: 0 1px 8px rgba(76, 75, 152, 0.18);
}
[data-theme="dark"] .sidebar.expanded .nav-link.active::before {
  background: linear-gradient(180deg, var(--color-text-secondary) 60%, #5c86ff 100%);
}
[data-theme="dark"] .sidebar.expanded .nav-sublist {
  background: var(--color-bg-alt);
  box-shadow: 0 2px 8px rgba(76, 75, 152, 0.10);
}
[data-theme="dark"] .sidebar.expanded .nav-sublist .nav-link {
  color: var(--color-text-secondary);
}
[data-theme="dark"] .sidebar.expanded .nav-sublist .nav-link {
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .sidebar.expanded .nav-sublist .nav-link:hover {
  background: #23234a;
  color: #fff;
}

/* Efeito Shimmer para Links do Submenu - Dark Mode */
[data-theme="dark"] .sidebar.expanded .nav-sublist .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

[data-theme="dark"] .sidebar.expanded .nav-sublist .nav-link:hover::before {
  left: 100%;
}
[data-theme="dark"] .sidebar-scrollable::-webkit-scrollbar {
  background: var(--color-bg-alt);
}
[data-theme="dark"] .sidebar-scrollable::-webkit-scrollbar-thumb {
  background: var(--color-bg);
}
[data-theme="dark"] .user-avatar {
  box-shadow: 0 2px 16px #5c86ff33, 0 0 0 4px var(--color-bg-alt);
  background: linear-gradient(135deg, #5c86ff 60%, var(--color-text-secondary) 100%);
  color: var(--color-bg-alt);
}
[data-theme="dark"] .sidebar-footer {
  background: var(--color-bg);
  box-shadow: 0 4px 32px rgba(40, 30, 80, 0.18);
}
[data-theme="dark"] .sidebar-footer:hover {
  background: var(--color-bg-alt);
}
[data-theme="dark"] .user-name, [data-theme="dark"] .user-role {
  color: var(--color-text-secondary);
} 

/* --- CARDS PRINCIPAIS PREMIUM (CLASSES REAIS) --- */
.metric-card {
  background: var(--gradient-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.metric-card:hover {
  box-shadow: var(--shadow-light);
  transform: translateY(-4px);
  border: 1px solid var(--color-primary);
  background: var(--gradient-card);
  filter: brightness(1.02);
}
.metric-card h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-main);
}
.metric-card .metric-value {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.05em;
  font-family: var(--font-mono);
  line-height: var(--line-height-tight);
}
.metric-card .metric-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-card .metric-change {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: 0.25em;
}

.metric-card .metric-change.positive {
  color: var(--color-success);
}

.metric-card .metric-change.negative {
  color: var(--color-danger);
}

.metric-card .metric-change.neutral {
  color: var(--color-text-muted);
}
@media (max-width: 900px) {
  .metric-card {
    padding: 1.2em 0.7em 1em 0.7em;
    border-radius: 14px;
  }
  .metric-card h3 {
    font-size: 1em;
  }
  .metric-card .metric-value {
    font-size: 1.3em;
  }
}
[data-theme="dark"] .metric-card {
  background: linear-gradient(120deg, var(--color-bg-alt) 80%, var(--color-bg) 100%);
  border: 1.5px solid var(--color-bg-alt);
  box-shadow: 0 8px 32px var(--color-bg), 0 1.5px 8px #5c86ff22;
}
[data-theme="dark"] .metric-card:hover {
  background: linear-gradient(120deg, #23234a 80%, var(--color-bg-alt) 100%);
  border: 1.5px solid #5c86ff;
  box-shadow: 0 16px 48px var(--color-bg), 0 2.5px 12px #5c86ff44;
}
[data-theme="dark"] .metric-card h3 {
  color: var(--color-text-secondary);
  text-shadow: 0 2px 8px #5c86ff33;
}
[data-theme="dark"] .metric-card .metric-value {
  color: #fff;
}
[data-theme="dark"] .metric-card .metric-label {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .metric-card .metric-change.positive {
  color: #4ade80;
}

[data-theme="dark"] .metric-card .metric-change.negative {
  color: #f87171;
}

[data-theme="dark"] .metric-card .metric-change.neutral {
  color: var(--color-text-secondary);
}

.card {
  background: var(--gradient-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.card:hover {
  box-shadow: var(--shadow-light);
  transform: translateY(-2px);
  border: 1px solid var(--color-primary);
  background: var(--gradient-card);
  filter: brightness(1.02);
}
[data-theme="dark"] .card {
  background: linear-gradient(120deg, var(--color-bg-alt) 80%, var(--color-bg) 100%);
  border: 1.2px solid var(--color-bg-alt);
  box-shadow: 0 4px 24px var(--color-bg), 0 1.5px 8px #5c86ff22;
}
[data-theme="dark"] .card:hover {
  background: linear-gradient(120deg, #23234a 80%, var(--color-bg-alt) 100%);
  border: 1.2px solid #5c86ff;
  box-shadow: 0 8px 32px var(--color-bg), 0 2.5px 12px #5c86ff44;
}

.chart-container {
  background: var(--gradient-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  padding: var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
  min-height: 360px;
}
.chart-container:hover {
  box-shadow: var(--shadow-light);
  transform: translateY(-2px);
  border: 1px solid var(--color-primary);
  background: var(--gradient-card);
  filter: brightness(1.02);
}
[data-theme="dark"] .chart-container {
  background: linear-gradient(120deg, var(--color-bg-alt) 80%, var(--color-bg) 100%);
  border: 1.2px solid var(--color-bg-alt);
  box-shadow: 0 4px 24px var(--color-bg), 0 1.5px 8px #5c86ff22;
}
[data-theme="dark"] .chart-container:hover {
  background: linear-gradient(120deg, #23234a 80%, var(--color-bg-alt) 100%);
  border: 1.2px solid #5c86ff;
  box-shadow: 0 8px 32px var(--color-bg), 0 2.5px 12px #5c86ff44;
}
/* --- FIM CARDS PRINCIPAIS PREMIUM (CLASSES REAIS) --- */ 

/* --- FIM CARDS PRINCIPAIS PREMIUM (CLASSES REAIS) --- */

/* =====================
   MELHORIAS FINAIS DE CONTRASTE E ACESSIBILIDADE
====================== */

/* Melhor contraste para textos importantes */
.metric-value, .metric-label, .card h1, .card h2, .card h3 {
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

[data-theme="dark"] .metric-value, [data-theme="dark"] .metric-label, 
[data-theme="dark"] .card h1, [data-theme="dark"] .card h2, [data-theme="dark"] .card h3 {
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Estados de foco melhorados */
.sidebar .nav-link:focus-visible,
.sidebar .nav-group-title:focus-visible,
.btn:focus-visible,
.metric-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(92, 134, 255, 0.2);
}

/* Tipografia refinada para links e badges */
a {
  text-decoration: none;
  color: var(--color-primary);
  transition: all var(--transition);
  font-weight: var(--font-weight-medium);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.badge {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Melhor contraste para placeholders */
::placeholder {
  color: var(--color-text-muted);
  opacity: 0.8;
}

/* Drop shadow para ícones */
.fas, .far, .fab {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Scrollbar refinada */
.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 10px;
  border: 2px solid var(--color-bg);
}

/* Estados hover melhorados */
.metric-card:hover,
.card:hover,
.chart-container:hover {
  filter: brightness(1.02) contrast(1.05);
}

/* Configurações de fonte para valores numéricos e labels */
.metric-value,
.chart-container canvas {
  font-feature-settings: "tnum" 1, "kern" 1;
}

.metric-label,
.dashboard-section-title {
  font-feature-settings: "liga" 1, "kern" 1;
}

/* =====================
   UX/UI MODERNA - LOADING STATES E FEEDBACK VISUAL
====================== */

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: loading-shimmer 1.5s infinite;
  z-index: 1;
}

@keyframes loading-shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s ease-in-out infinite;
}

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



/* Loading States para Cards */
.metric-card.loading .metric-value,
.card.loading .content {
  background: linear-gradient(90deg, var(--color-bg-alt) 25%, var(--color-bg-tertiary) 50%, var(--color-bg-alt) 75%);
  background-size: 200% 100%;
  animation: loading-pulse 2s infinite;
  border-radius: 4px;
  min-height: 20px;
}

@keyframes loading-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Feedback Visual para Interações */

/* Hover Effects Melhorados */
.btn {
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



/* Feedback para Cards */
.metric-card,
.card,
.chart-container {
  transition: all var(--transition);
  position: relative;
}

.metric-card::before,
.card::before,
.chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-primary) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.metric-card:hover::before,
.card:hover::before,
.chart-container:hover::before {
  opacity: 0.05;
}

/* Animações Sutis para Transições */

/* Fade In para Seções */
.dashboard-section {
  opacity: 0;
  transform: translateY(20px);
}

.dashboard-section.active {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger Animation para Cards */
.metric-card {
  opacity: 1;
  transform: translateY(0);
}

.metric-card.animate {
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: calc(var(--card-index, 0) * 0.1s);
}

/* Smooth Transitions para Sidebar */
.sidebar {
  transition: width var(--transition), box-shadow var(--transition);
}

.sidebar-nav {
  transition: opacity var(--transition);
}

.nav-sublist {
  transition: all var(--transition);
  transform-origin: top;
}

.nav-group.open .nav-sublist {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Micro-interações */

/* Pulse para Notificações */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.notification {
  animation: pulse 2s infinite;
}

/* Bounce para Ícones de Loading */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.loading-icon {
  animation: bounce 2s infinite;
}

/* Shake para Erros */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error {
  animation: shake 0.5s ease-in-out;
}

/* Success Checkmark */
@keyframes checkmark {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.success {
  animation: checkmark 0.5s ease-out;
}

/* Hover Effects para Tabelas */
.analytics-table tbody tr {
  transition: all var(--transition);
}

.analytics-table tbody tr:hover {
  background: var(--color-bg-alt);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tooltip Animations */
.tooltip {
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Progress Bar Animation */
.progress-bar {
  width: 0%;
  transition: width 1s ease-out;
}

.progress-bar.animate {
  animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
  to { width: 100%; }
}

/* Focus States Melhorados */
.btn:focus-visible,
.nav-link:focus-visible,
.metric-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(92, 134, 255, 0.2);
}

/* Loading States para Gráficos */
.chart-container.loading {
  position: relative;
  min-height: 200px;
}

.chart-container.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--color-border);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s linear infinite;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--color-bg-alt) 25%, var(--color-bg-tertiary) 50%, var(--color-bg-alt) 75%);
  background-size: 200% 100%;
  animation: loading-pulse 1.5s infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 60%;
}

/* Toast Notifications - Versão Corrigida */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  min-width: 300px;
  background: var(--color-bg-alt);
  color: var(--color-text);
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-left: 4px solid var(--color-primary);
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.4;
  font-family: inherit;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--color-bg-alt) 100%);
}

.toast.error {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, var(--color-bg-alt) 100%);
}

.toast.warning {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, var(--color-bg-alt) 100%);
}

.toast.info {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, var(--color-bg-alt) 100%);
}

/* Container para múltiplos toasts */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

#toast-container .toast {
  pointer-events: auto;
}

/* Responsivo para mobile */
@media (max-width: 600px) {
  .toast {
    max-width: calc(100vw - 40px);
    min-width: auto;
    right: 10px;
    left: 10px;
  }
  
  #toast-container {
    right: 10px;
    left: 10px;
    width: auto;
  }
}

/* Tema dark para toasts */
[data-theme="dark"] .toast {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-left-color: var(--color-primary);
}

[data-theme="dark"] .toast.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, var(--color-bg-alt) 100%);
}

[data-theme="dark"] .toast.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, var(--color-bg-alt) 100%);
}

[data-theme="dark"] .toast.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, var(--color-bg-alt) 100%);
}

[data-theme="dark"] .toast.info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, var(--color-bg-alt) 100%);
}

/* Toast Notifications - Corrigido para evitar corte */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-container > * {
  pointer-events: auto;
}

.toast {
  position: relative;
  background: var(--color-bg-alt, #ffffff);
  color: var(--color-text, #1f2937);
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-left: 4px solid var(--color-primary, #3b82f6);
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  max-width: 400px;
  min-width: 280px;
  backdrop-filter: blur(10px);
  margin-bottom: 8px;
  overflow: visible;
  box-sizing: border-box;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--color-bg-alt, #ffffff) 100%);
}

.toast.error {
  border-left-color: #ef4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, var(--color-bg-alt, #ffffff) 100%);
}

.toast.warning {
  border-left-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, var(--color-bg-alt, #ffffff) 100%);
}

.toast.info {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, var(--color-bg-alt, #ffffff) 100%);
}

/* =====================================================
   LAZY LOADING OPTIMIZATIONS
   ===================================================== */

/* Lazy loading for images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* Optimize logo loading */
.logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Performance optimizations for images */
img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   END OF BASE CSS
   ===================================================== */

/* Classes para card-subtext com variações */
.card-subtext.positive {
  color: var(--color-success);
}

.card-subtext.negative {
  color: var(--color-danger);
}

.card-subtext.neutral {
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .metric-card {
    padding: 1.2em 0.7em 1em 0.7em;
    border-radius: 14px;
  }
  .metric-card h3 {
    font-size: 1em;
  }
  .metric-card .metric-value {
    font-size: 1.3em;
  }
}

[data-theme="dark"] .metric-card .metric-change.neutral {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .card-subtext.positive {
  color: #4ade80;
}

[data-theme="dark"] .card-subtext.negative {
  color: #f87171;
}

[data-theme="dark"] .card-subtext.neutral {
  color: var(--color-text-secondary);
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.card-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.card-subtext {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

/* Estilos para tabelas de analytics */
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  background: var(--color-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.analytics-table thead {
  background: var(--color-primary);
  color: white;
}

.analytics-table th {
  padding: 1em;
  text-align: left;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
}

.analytics-table td {
  padding: 1em;
  border-bottom: 1px solid var(--color-border);
}

.analytics-table tbody tr:hover {
  background: var(--color-bg-hover);
}

.metric-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

/* Estilos para gráficos */
.chart-container {
  position: relative;
  height: 300px;
  margin: 1em 0;
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  margin-top: 1em;
}

@media (max-width: 768px) {
  .analytics-charts-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsividade para tabelas */
@media (max-width: 768px) {
  .analytics-table {
    font-size: var(--font-size-sm);
  }
  
  .analytics-table th,
  .analytics-table td {
    padding: 0.5em;
  }
}

/* =====================
   MELHORIAS DE APARÊNCIA MOBILE
====================== */

/* Animações suaves para cards e gráficos */
.metric-card, .chart-container, .card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.metric-card:hover, .chart-container:hover, .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(118, 75, 162, 0.15);
}

/* Loading states melhorados */
.metric-card.loading, .chart-container.loading {
  position: relative;
  overflow: hidden;
}

.metric-card.loading::before, .chart-container.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Feedback visual para botões */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

/* Tooltips melhorados */
[data-tooltip] {
  position: relative;
  cursor: help;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(5px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Ícones nos cards de métricas */
.metric-card h3::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
}

.metric-card[data-metric="visits"] h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23764ba2'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.metric-card[data-metric="clicks"] h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23764ba2'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");
}

.metric-card[data-metric="conversion"] h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23764ba2'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z'/%3E%3C/svg%3E");
}

.metric-card[data-metric="visitors"] h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23764ba2'%3E%3Cpath d='M16 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm4 18v-6h2.5l-2.54-7.63A1.5 1.5 0 0 0 18.54 8H17c-.8 0-1.54.37-2.01 1l-1.74 1.96A3.983 3.983 0 0 0 10 13c-2.21 0-4 1.79-4 4v3h2.5v-3c0-1.1.9-2 2-2s2 .9 2 2v3H16z'/%3E%3C/svg%3E");
}

/* Melhorias para mobile */
@media (max-width: 768px) {
  /* Cards mais compactos */
  .metric-card {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .metric-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .metric-card .metric-value {
    font-size: 24px;
    line-height: 1.2;
  }
  
  .metric-card .metric-change {
    font-size: 12px;
  }
  
  /* Gráficos responsivos */
  .chart-container {
    min-height: 200px;
    margin-bottom: 16px;
  }
  
  .chart-container canvas,
  .charts-grid canvas,
  .dashboard-section canvas {
    height: 160px;
    min-height: 160px;
  }
  
  /* Botões touch-friendly */
  .btn {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 16px;
  }
  
  /* Espaçamento otimizado */
  .metrics-grid, .charts-grid {
    gap: 12px;
  }
  
  /* Tabelas scrolláveis */
  .analytics-table {
    font-size: 12px;
  }
  
  .analytics-table th,
  .analytics-table td {
    padding: 8px 4px;
  }
}

/* Melhorias para telas muito pequenas */
@media (max-width: 480px) {
  .metric-card {
    padding: 12px;
  }
  
  .metric-card .metric-value {
    font-size: 20px;
  }
  
  .chart-container {
    min-height: 180px;
  }
  
  .chart-container canvas,
  .charts-grid canvas,
  .dashboard-section canvas {
    height: 140px;
    min-height: 140px;
  }
  
  /* Tooltips desabilitados em mobile */
  [data-tooltip]:hover::after {
    display: none;
  }
}

/* Animações de entrada para seções */
.dashboard-section.active {
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estados de hover melhorados para dark mode */
[data-theme="dark"] .metric-card:hover,
[data-theme="dark"] .chart-container:hover,
[data-theme="dark"] .card:hover {
  box-shadow: 0 8px 32px rgba(92, 134, 255, 0.2);
}

/* Feedback visual para filtros */
.analytics-filters select:focus,
.analytics-filters button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Loading spinner para gráficos */
.chart-container.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid var(--color-primary);
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Melhorias nos cards de métricas */
.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover::before {
  opacity: 1;
}

/* Estados de carregamento */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

[data-theme="dark"] .loading-overlay {
  background: rgba(0, 0, 0, 0.8);
}

/* Melhorias na responsividade do sidebar */
@media (max-width: 900px) {
  .sidebar {
    transition: width 0.3s ease;
  }
  
  .sidebar.expanded {
    width: 220px;
  }
  
  .sidebar:not(.expanded) {
    width: 60px;
  }
}

/* Otimizações para touch */
@media (hover: none) and (pointer: coarse) {
  .metric-card:hover,
  .chart-container:hover,
  .card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}

/* =====================
   OTIMIZAÇÕES ESPECÍFICAS PARA IPHONE 14
====================== */

/* Safe Area Support para iPhone 14 */
@supports (padding: max(0px)) {
  .dashboard-container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  
  .sidebar {
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
  }
  
  .main-content {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

/* Otimizações específicas para iPhone 14 (390px width) */
@media (max-width: 390px) {
  .metric-card {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .metric-card h3 {
    font-size: 13px;
    margin-bottom: 6px;
  }
  
  .metric-card .metric-value {
    font-size: 18px;
    line-height: 1.1;
  }
  
  .metric-card .metric-change {
    font-size: 11px;
  }
  
  .chart-container {
    min-height: 160px;
    margin-bottom: 12px;
  }
  
  .btn {
    min-height: 48px; /* Touch target mínimo para iOS */
    padding: 14px 16px;
    font-size: 16px;
  }
  
  .analytics-table {
    font-size: 11px;
  }
  
  .analytics-table th,
  .analytics-table td {
    padding: 6px 3px;
  }
  
  /* Cards mais compactos */
  .card {
    padding: 12px;
    margin-bottom: 8px;
  }
  
  .card-title {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .card-value {
    font-size: 16px;
  }
  
  /* Melhor espaçamento para grid */
  .metrics-grid, .charts-grid {
    gap: 8px;
  }
  
  /* Sidebar otimizado para iPhone */
  .sidebar {
    width: 100vw;
    min-width: 0;
    border-radius: 0;
    margin: 0;
    padding: 0.5rem 0.1rem;
  }
  
  .sidebar.expanded {
    width: 100vw;
    min-width: 0;
  }
  
  .sidebar-header {
    margin-bottom: 0.8rem;
  }
  
  .user-info {
    padding-bottom: 0.4rem;
  }
}

/* Melhorias para telas muito pequenas (iPhone SE, etc.) */
@media (max-width: 375px) {
  .metric-card {
    padding: 10px;
  }
  
  .metric-card .metric-value {
    font-size: 16px;
  }
  
  .chart-container {
    min-height: 140px;
  }
  
  .btn {
    min-height: 44px;
    padding: 12px 14px;
  }
}

/* Otimizações para orientação landscape no mobile */
@media (max-width: 900px) and (orientation: landscape) {
  .sidebar {
    width: 60px;
    min-width: 60px;
  }
  
  .sidebar.expanded {
    width: 200px;
    min-width: 200px;
  }
  
  .main-content {
    padding: 0.5rem;
  }
  
  .metric-card {
    padding: 10px;
  }
  
  .chart-container {
    min-height: 120px;
  }
}

/* Melhorias para touch interactions */
@media (hover: none) and (pointer: coarse) {
  /* Aumentar área de toque para botões */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Melhor feedback visual para toque */
  .btn:active,
  .metric-card:active,
  .chart-container:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
  
  /* Desabilitar hover em dispositivos touch */
  .btn:hover,
  .metric-card:hover,
  .chart-container:hover {
    transform: none;
  }
  
  /* Melhor scroll para tabelas */
  .analytics-table {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Otimizar scroll para containers */
  .chart-container,
  .card {
    -webkit-overflow-scrolling: touch;
  }
}

/* Melhorias para acessibilidade em mobile */
@media (max-width: 900px) {
  /* Aumentar contraste para melhor legibilidade */
  .metric-card .metric-value {
    font-weight: 600;
  }
  
  .card-title {
    font-weight: 600;
  }
  
  /* Melhor espaçamento para leitura */
  .card-subtext {
    line-height: 1.4;
  }
  
  /* Otimizar tamanho de fonte para leitura */
  body {
    font-size: 16px; /* Previne zoom automático no iOS */
  }
  
  input, select, textarea {
    font-size: 16px; /* Previne zoom automático no iOS */
  }
}

/* Melhorias para performance em mobile */
@media (max-width: 900px) {
  /* Reduzir animações complexas em mobile */
  .metric-card,
  .chart-container,
  .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  /* Otimizar animações para melhor performance */
  .dashboard-section.active {
    animation: slideInUp 0.3s ease-out;
  }
  
  /* Reduzir complexidade de sombras */
  .metric-card:hover,
  .chart-container:hover,
  .card:hover {
    box-shadow: 0 4px 16px rgba(118, 75, 162, 0.1);
  }
}

/* Melhorias para dark mode em mobile */
@media (max-width: 900px) {
  [data-theme="dark"] .metric-card {
    background: linear-gradient(135deg, #2a2a3a 0%, #1f1f2e 100%);
  }
  
  [data-theme="dark"] .chart-container {
    background: linear-gradient(135deg, #2a2a3a 0%, #1f1f2e 100%);
  }
  
  [data-theme="dark"] .card {
    background: linear-gradient(135deg, #2a2a3a 0%, #1f1f2e 100%);
  }
}

/* Container para 2 colunas */
.form-columns-container {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  align-items: flex-start; /* Alinha as colunas ao topo */
  flex-wrap: wrap;
  max-width: 100%;
}

/* Garante que apenas elementos .form-column sejam afetados pelo flex */
.form-columns-container > *:not(.form-column) {
  flex: none !important;
  width: 100% !important;
  max-width: none !important;
}

/* Garante que o botão apareça abaixo das colunas */
form > .form-actions {
  margin-top: 2rem !important;
  clear: both !important;
  display: block !important;
  width: 100% !important;
}

.form-column {
  flex: 0 0 calc(50% - 1rem); /* flex-grow: 0, flex-shrink: 0, flex-basis: calc(50% - 1rem) */
  min-width: 0; /* Permite que o flex item encolha */
  max-width: calc(50% - 1rem); /* Garante que cada coluna tenha no máximo 50% */
  width: calc(50% - 1rem); /* Força largura de 50% */
}

.form-column .form-section {
  margin-bottom: 2rem;
  height: fit-content; /* Ajusta a altura ao conteúdo */
}

.form-column .form-section:last-child {
  margin-bottom: 0;
}

/* Botão de ações ocupando 100% da largura */
.form-actions {
  width: 100% !important;
  clear: both;
  margin-top: 2rem;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: none !important;
  flex-basis: auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  max-width: none !important;
  min-width: auto !important;
  position: static !important;
  z-index: auto !important;
  background: var(--color-bg-alt, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-actions .btn-large {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: linear-gradient(135deg, var(--color-primary, #764ba2) 0%, var(--color-primary-alt, #667eea) 100%);
  color: var(--color-bg, #ffffff);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
  position: static !important;
  z-index: auto !important;
}

.form-actions .btn-large:hover {
  background: linear-gradient(135deg, var(--color-primary-alt, #667eea) 0%, var(--color-primary, #764ba2) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}


/* Responsividade para 2 colunas */
@media (max-width: 900px) {
  .form-columns-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .form-column {
    width: 100%;
  }
}

/* Botão Atualizar específico para melhor contraste */
.btn[id*="refresh"], .btn[id*="atualizar"] {
  background: linear-gradient(135deg, #764ba2 0%, #5c357d 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.btn[id*="refresh"]:hover, .btn[id*="atualizar"]:hover,
.btn[id*="refresh"]:focus, .btn[id*="atualizar"]:focus {
  background: linear-gradient(135deg, #5c357d 0%, #4a2d66 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
  transform: translateY(-2px);
}

[data-theme="dark"] .btn[id*="refresh"], [data-theme="dark"] .btn[id*="atualizar"] {
  background: linear-gradient(135deg, var(--color-primary) 0%, #a3bffa 100%);
  color: var(--color-text);
  box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
}

[data-theme="dark"] .btn[id*="refresh"]:hover, [data-theme="dark"] .btn[id*="atualizar"]:hover,
[data-theme="dark"] .btn[id*="refresh"]:focus, [data-theme="dark"] .btn[id*="atualizar"]:focus {
  background: linear-gradient(135deg, #a3bffa 0%, var(--color-primary) 100%);
  color: var(--color-text);
  box-shadow: 0 6px 20px rgba(118, 75, 162, 0.5);
  transform: translateY(-2px);
}

/* Estilos específicos para a seção de páginas */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
  color: var(--color-text);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-header h3 i {
  color: var(--color-primary);
  font-size: var(--font-size-lg);
}

.card-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.card-actions .btn {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  border-radius: var(--radius);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.card-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-light);
}

/* Melhorias na tabela de páginas */
#pages-table th {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-md);
  border-bottom: 2px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

#pages-table th i {
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  margin-right: var(--space-xs);
}

#pages-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

#pages-table tbody tr:hover {
  background: var(--color-primary)08;
  transition: background-color var(--transition);
}

/* Status das páginas */
.page-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.page-status.active {
  background: var(--color-success)15;
  color: var(--color-success);
  border: 1px solid var(--color-success)30;
}

.page-status.inactive {
  background: var(--color-danger)15;
  color: var(--color-danger);
  border: 1px solid var(--color-danger)30;
}

.page-status.pending {
  background: var(--color-accent)15;
  color: var(--color-accent);
  border: 1px solid var(--color-accent)30;
}

/* Paginação */
#pages-pagination {
  /* Usa os estilos da classe pagination-container */
  margin-top: var(--space-lg);
  width: 100%;
}

/* Controles de paginação - agora gerenciados pelo pagination.css */

/* Estilos de paginação agora gerenciados pelo pagination.css */

/* Estilos de paginação agora gerenciados pelo pagination.css */

/* Seletor de itens por página */
/* Estilos de paginação agora gerenciados pelo pagination.css */

/* Estilo para mensagens de estado vazio/loading */
.text-center {
  text-align: center;
}

/* Responsividade para a seção de páginas */
@media (max-width: 900px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  
  .card-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  #pages-table th,
  #pages-table td {
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
  }
  
  #pages-table th i {
    display: none;
  }
  
  /* Responsividade da paginação gerenciada pelo pagination.css */
}

@media (max-width: 600px) {
  .card-header h3 {
    font-size: var(--font-size-lg);
  }
  
  .card-actions .btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
  }
  
  /* Responsividade da paginação gerenciada pelo pagination.css */
}

/* Tema escuro para a seção de páginas */
[data-theme="dark"] .card-header {
  border-bottom-color: var(--color-border);
}

[data-theme="dark"] .card-header h3 {
  color: var(--color-text);
}

[data-theme="dark"] .card-header h3 i {
  color: var(--color-primary);
}

[data-theme="dark"] #pages-table th {
  background: var(--color-bg-tertiary);
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}

[data-theme="dark"] #pages-table th i {
  color: var(--color-primary);
}

[data-theme="dark"] #pages-table td {
  color: var(--color-text);
  border-bottom-color: var(--color-border);
}

[data-theme="dark"] #pages-table tbody tr:hover {
  background: var(--color-primary)12;
}

/* Tema escuro para paginação gerenciado pelo pagination.css */

.wizard-preview-sidebar {
  width: 380px; /* Definir largura fixa */
  height: 600px; /* Definir altura fixa */
  background-color: var(--color-background-soft);
  border-left: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  flex-shrink: 0;
  display: block !important; /* Sempre visível, o conteúdo interno alterna */
}

.wizard-preview-sidebar .preview-content {
  width: 100%;
  height: calc(100% - 60px); /* Altura do content menos a altura do header */
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-text-soft);
  font-size: 1.1rem;
  padding: 20px;
  width: 100%;
  height: 100%;
  background-color: var(--color-background-soft);
}

.preview-placeholder img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  margin-bottom: 20px;
}

[data-theme="dark"] .wizard-preview-sidebar {
  background-color: var(--color-dark-background-soft);
  border-left-color: var(--color-dark-border);
}

[data-theme="dark"] .preview-placeholder {
  color: var(--color-dark-text-soft);
  background-color: var(--color-dark-background-soft);
}