/* ==========================================================================
   VadeMestre — Ultra-Modern Dark & Gold Design System
   ========================================================================== */

:root {
  /* Paleta de Fundo de Alta Profundidade */
  --bg-root: #070d18;
  --bg-card: #0e1726;
  --bg-card-hover: #121e31;
  --bg-sidebar-top: #08101e;
  --bg-sidebar-bottom: #050a12;
  --bg-panel: #08101e;
  --bg-input: rgba(255, 255, 255, 0.03);
  --bg-input-focus: rgba(255, 255, 255, 0.06);

  /* Paleta de Texto */
  --text-primary: #f3f6fc;
  --text-heading: #ffffff;
  --text-secondary: #cdd8e6;
  --text-muted: #7e8c9f;
  --text-subtle: #637287;

  /* Dourado Marca (Accent) */
  --gold-primary: #c9a24c;
  --gold-light: #d8b968;
  --gold-dark: #b1862f;
  --gold-text-dark: #15243a;
  --gold-label-active: #f1e7d1;
  --gold-glow: rgba(201, 162, 76, 0.18);

  /* Bordas e Divisores Finos */
  --border-card: rgba(255, 255, 255, 0.07);
  --border-input: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.05);

  /* Cores Semânticas & Badges */
  --status-success: #56b487;
  --status-success-light: #7dd1a6;
  --status-error: #df7a7a;
  --status-error-light: #e89a9a;
  --status-error-bg: rgba(223, 122, 122, 0.14);
  --status-info: #c9a24c;

  /* Tipografia */
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-serif: 'Spectral', serif;

  /* Sombras e Raios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(201, 162, 76, 0.22);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Reset Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-sans);
  background-color: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* Animação de Pulso Dourado da Splash Screen */
@keyframes vmPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.75;
    filter: drop-shadow(0 0 12px rgba(201, 162, 76, 0.3));
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
    filter: drop-shadow(0 0 30px rgba(201, 162, 76, 0.7));
  }
  100% {
    transform: scale(0.96);
    opacity: 0.75;
    filter: drop-shadow(0 0 12px rgba(201, 162, 76, 0.3));
  }
}

/* Tela de Splash / Loading Overlay */
.vm-splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-root);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.vm-splash-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vm-splash-logo {
  animation: vmPulse 2s infinite ease-in-out;
  color: var(--gold-primary);
}

/* 1. Elevacao e Borda Dourada Brilhante nos Cards no Hover */
.vm-card, .vm-stat-card, .vm-goal-card, .vm-task-item {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.vm-card:hover, .vm-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 162, 76, 0.35) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(201, 162, 76, 0.16) !important;
}

/* 2. Glassmorphism & Vidro Fosco */
.vm-glass-header {
  background: rgba(8, 16, 30, 0.82) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
}

/* 3. Feixe de Luz nos Botoes Dourados (Shimmer Sweep Light) */
.vm-btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: var(--gold-text-dark);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14.5px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(177, 134, 47, 0.28);
  transition: transform var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
}

.vm-btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(25deg);
  transition: all 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

.vm-btn-primary:hover::after {
  left: 130%;
  opacity: 1;
}

.vm-btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: var(--shadow-glow);
}

.vm-btn-primary:active {
  transform: scale(0.985);
}

.vm-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.vm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-heading);
}

/* Campos de Formulário */
.vm-form-group {
  margin-bottom: 18px;
}

.vm-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.vm-input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.vm-input:focus {
  border-color: var(--gold-primary);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(201, 162, 76, 0.15);
}

.vm-input::placeholder {
  color: #52637a;
}

/* Wrapper do Campo de Senha */
.vm-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.vm-password-wrapper .vm-input {
  padding-right: 48px;
}

.vm-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.vm-password-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Componente Card */
.vm-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

/* Marca Gráfica (Marca com V Stylized) */
.vm-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(150deg, var(--gold-light), var(--gold-dark));
  color: var(--gold-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(177, 134, 47, 0.35);
  flex-shrink: 0;
}

.vm-brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 23px;
  color: var(--text-heading);
  letter-spacing: -0.3px;
}

/* Shell & Sidebar */
.vm-shell {
  display: flex;
  height: 100vh;
  width: 100%;
  background: var(--bg-root);
  overflow: hidden;
}

.vm-sidebar {
  width: 265px;
  background: linear-gradient(180deg, var(--bg-sidebar-top), var(--bg-sidebar-bottom));
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.vm-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.vm-nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-heading);
}

/* 4. Aura de Brilho no Menu Lateral (Active Glow) */
.vm-nav-btn.active {
  background: rgba(201, 162, 76, 0.14) !important;
  color: var(--gold-label-active) !important;
  font-weight: 700 !important;
  border-color: rgba(201, 162, 76, 0.35) !important;
  box-shadow: 0 0 16px rgba(201, 162, 76, 0.16) !important;
  position: relative;
}

.vm-nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3.5px;
  background: var(--gold-primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--gold-primary);
}

.vm-nav-badge {
  background: var(--gold-primary);
  color: var(--gold-text-dark);
  font-size: 11px;
  font-weight: 800;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  margin-left: auto;
}

.vm-pro-tip-box {
  background: linear-gradient(135deg, rgba(201, 162, 76, 0.10), rgba(201, 162, 76, 0.02));
  border: 1px solid rgba(201, 162, 76, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: auto;
}

/* Cards de Estatística (Estilo KPI da Referência) */
.vm-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.vm-stat-eyebrow {
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
}

.vm-stat-value {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--text-heading);
}

.vm-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(86, 180, 135, 0.14);
  color: var(--status-success-light);
}

.vm-goal-card {
  background: linear-gradient(150deg, rgba(201, 162, 76, 0.12), rgba(201, 162, 76, 0.03));
  border: 1px solid rgba(201, 162, 76, 0.32);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
}

/* Cronograma & Tabela de Tarefas */
.vm-task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}

.vm-task-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}

.vm-task-item.completed {
  background: rgba(86, 180, 135, 0.06);
  border-color: rgba(86, 180, 135, 0.18);
  opacity: 0.78;
}

.vm-task-checkbox {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid var(--border-input);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.vm-task-checkbox.checked {
  background: var(--status-success);
  border-color: var(--status-success);
  color: #0c2018;
}

/* 5. Transicao Suave ao Trocar de Aba (Smooth Fade & Slide) */
@keyframes vmContentFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vm-main-content {
  animation: vmContentFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
