/* ============================================================
   Global CSS — Método Sob Controle
   Paleta corrigida — Gold vibrante + Neutral
   ============================================================ */

/* ============ Escala Tipográfica ============ */
:root {
  /* Fontes */
  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Tamanhos */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;        /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */

  /* Pesos */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Letter Spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
}

/* Headings — Manrope */
.page-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-on-surface, #1A1A1A);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-on-surface, #1A1A1A);
}

.subsection-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-on-surface, #1A1A1A);
}

.card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-on-surface, #1A1A1A);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--text-on-surface, #1A1A1A);
}

/* Body — Inter */
.body-text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-on-surface, #1A1A1A);
}

.body-text-sm {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-on-surface-variant, #5D5D5D);
}

.caption {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--text-on-surface-variant, #5D5D5D);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: var(--leading-normal);
  color: var(--text-on-surface, #1A1A1A);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  line-height: 1;
  color: #EBCC34;
}

.btn-text {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  letter-spacing: var(--tracking-wide);
}

/* Dark mode typography colors */
[data-theme="dark"] .page-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .subsection-title,
[data-theme="dark"] .card-title,
[data-theme="dark"] .widget-title,
[data-theme="dark"] .body-text,
[data-theme="dark"] .label {
  color: #E6E1E5;
}

[data-theme="dark"] .body-text-sm,
[data-theme="dark"] .caption {
  color: #ABA6B1;
}

/* Responsive headings */
@media (max-width: 768px) {
  .page-title { font-size: clamp(1.5rem, 5vw, var(--text-4xl)); }
  .section-title { font-size: clamp(1.25rem, 4vw, var(--text-3xl)); }
  .subsection-title { font-size: clamp(1.125rem, 3.5vw, var(--text-2xl)); }
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Typography */
body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-headline, .font-manrope {
  font-family: 'Manrope', sans-serif;
}

/* Cards */
.whiteboard-card {
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.whiteboard-card:hover {
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

/* Sidebar active state */
.sidebar-active {
  background-color: #F7F7F7;
  color: #EBCC34;
  font-weight: 700;
}

.sidebar-active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  color: #EBCC34;
}

/* Glass effect */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CCCCCC;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

/* Skeleton loading */
.skeleton {
  animation: skeleton-pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-pulse {
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============ Dark Mode ============ */
[data-theme="dark"] body,
[data-theme="dark"] {
  --bg-background: #121212;
  --bg-surface: #1E1E1E;
  --text-on-surface: #E6E1E5;
  color-scheme: dark;
}

[data-theme="dark"] body { background-color: #121212; color: #E6E1E5; }
[data-theme="dark"] .bg-background { background-color: #121212 !important; }
[data-theme="dark"] .bg-surface { background-color: #1E1E1E !important; }
[data-theme="dark"] .bg-white, [data-theme="dark"] .bg-surface-container-lowest { background-color: #1E1E1E !important; }
[data-theme="dark"] .bg-surface-container-low { background-color: #1A1A1A !important; }
[data-theme="dark"] .bg-surface-container { background-color: #232323 !important; }
[data-theme="dark"] .bg-surface-container-high { background-color: #2C2C2C !important; }
[data-theme="dark"] .bg-zinc-50, [data-theme="dark"] .bg-stone-50 { background-color: #1A1A1A !important; }
[data-theme="dark"] .bg-zinc-100, [data-theme="dark"] .bg-stone-100 { background-color: #232323 !important; }
[data-theme="dark"] .bg-white\/70 { background-color: rgba(30,30,30,0.7) !important; }
[data-theme="dark"] .bg-white\/80 { background-color: rgba(30,30,30,0.8) !important; }
[data-theme="dark"] .text-on-surface, [data-theme="dark"] .text-zinc-900, [data-theme="dark"] .text-stone-900, [data-theme="dark"] .text-slate-900, [data-theme="dark"] .text-on-background { color: #E6E1E5 !important; }
[data-theme="dark"] .text-zinc-800, [data-theme="dark"] .text-stone-800, [data-theme="dark"] .text-slate-800 { color: #D0CDD7 !important; }
[data-theme="dark"] .text-zinc-700, [data-theme="dark"] .text-stone-700, [data-theme="dark"] .text-slate-700 { color: #CAC4D0 !important; }
[data-theme="dark"] .text-zinc-600, [data-theme="dark"] .text-stone-600, [data-theme="dark"] .text-slate-600, [data-theme="dark"] .text-on-surface-variant { color: #ABA6B1 !important; }
[data-theme="dark"] .text-zinc-500, [data-theme="dark"] .text-stone-500, [data-theme="dark"] .text-slate-500 { color: #938F99 !important; }
[data-theme="dark"] .text-zinc-400, [data-theme="dark"] .text-stone-400, [data-theme="dark"] .text-slate-400 { color: #79747E !important; }
[data-theme="dark"] .border-zinc-100, [data-theme="dark"] .border-zinc-200, [data-theme="dark"] .border-stone-100, [data-theme="dark"] .border-stone-200, [data-theme="dark"] .border-slate-100 { border-color: #2C2C2C !important; }
[data-theme="dark"] .shadow-sm, [data-theme="dark"] .shadow-md, [data-theme="dark"] .shadow-lg, [data-theme="dark"] .shadow-xl, [data-theme="dark"] .shadow-2xl { --tw-shadow-color: rgba(0,0,0,0.3); }
[data-theme="dark"] .whiteboard-card { background: #1E1E1E; border-color: #2C2C2C; }
[data-theme="dark"] .sidebar-active { background-color: #2C2C2C; }
[data-theme="dark"] .glass-panel { background: rgba(30,30,30,0.7); }
[data-theme="dark"] .skeleton-pulse { background: linear-gradient(90deg, #2C2C2C 25%, #353535 50%, #2C2C2C 75%); background-size: 200% 100%; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #49454F; }
[data-theme="dark"] ::selection { background: rgba(235,204,52,0.3); color: #E6E1E5; }
[data-theme="dark"] img[src*="logo"] { background: transparent; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background-color: #232323 !important; color: #E6E1E5 !important; border-color: #49454F !important; }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #79747E !important; }

/* Selection */
::selection {
  background: rgba(235, 204, 52, 0.3);
  color: #1A1A1A;
}

/* Focus ring */
*:focus-visible {
  outline: 2px solid #EBCC34;
  outline-offset: 2px;
  border-radius: 0.25rem;
}
