/* base.css */

/* Reset simples */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%; /* importante para 100vh */
}

/* Corrige 100vh em mobile (iOS/Android) */
body {
  min-height: 100vh;
  min-height: 100dvh; /* unidades modernas */
}

/* Variáveis de tema base */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;

  --bg: #f5f5fb;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;

  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.08);

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-pill: 999px;

  --gradient-header: linear-gradient(135deg, #6366f1, #a855f7);

  --calendar-bg: #f9fafb;
  --calendar-border: #e5e7eb;
  --calendar-day-bg: #ffffff;
  --calendar-day-bg-muted: #f3f4f6;
  --calendar-day-text-muted: #9ca3af;
}

/* Tema escuro global */
body.dark {
  --bg: #020617;
  --bg-elevated: #020617;
  --surface: #020617;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #1f2937;

  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.6);

  --calendar-bg: #020617;
  --calendar-border: #111827;
  --calendar-day-bg: #020617;
  --calendar-day-bg-muted: #020617;
  --calendar-day-text-muted: #6b7280;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.15), transparent 55%),
              var(--bg);
  color: var(--text);
}

/* Contêiner raiz do app preenche toda a viewport, evita faixa branca */
#app-root {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Classes utilitárias globais */
.hidden {
  display: none !important;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

/* Botões genéricos reutilizáveis */
.primary-btn,
.secondary-btn {
  border-radius: var(--radius-pill);
  border: none;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease,
    color 0.1s ease, border-color 0.2s ease;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
}

.secondary-btn {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-muted);
}

.secondary-btn:hover {
  background: rgba(148, 163, 184, 0.25);
  transform: translateY(-1px);
}

/* Inputs genéricos */
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}