/* ================================================================
   GoSession — Design System (Design.md v1.0)
   Fonte unica de tokens e componentes base.
   Mobile-first (375px). Tema padrao: LIGHT.
   ================================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

/* ================================================================
   TOKENS — Light (padrao) & Dark
   ================================================================ */
:root,
[data-theme="light"] {
  /* Superficies */
  --bg-page:      #f6faf9;
  --bg-surface:   #ffffff;
  --bg-elevated:  #edf6f4;
  --bg-input:     rgba(10,22,40,0.04);

  /* Bordas */
  --border:       rgba(29,184,160,0.15);
  --border-hover: rgba(29,184,160,0.40);

  /* Texto */
  --text-primary:   #0a1628;
  --text-secondary: #2e4a5a;
  --text-muted:     rgba(10,22,40,0.45);
  --text-inverse:   #ffffff;

  /* Marca — teal */
  --teal-brand:  #0ea88f;
  --teal-light:  #1db8a0;
  --teal-pale:   rgba(29,184,160,0.10);
  --teal-dark:   #0e5a5e;

  /* Navy (ancora, textos, icones) */
  --navy-deep: #0a1628;
  --navy-mid:  #0d1e3a;
  --navy-soft: #132243;

  /* Status */
  --success:    #3dda89;
  --success-bg: rgba(29,184,100,0.15);
  --alert:      #f5c842;
  --alert-bg:   rgba(255,180,50,0.12);
  --error:      #ff5252;
  --error-bg:   rgba(255,82,82,0.12);

  /* Sombras */
  --shadow-card: 0 2px 16px rgba(10,22,40,0.08);
  --shadow-btn:  0 4px 20px rgba(29,184,160,0.35);
  --shadow-btn-hover: 0 6px 28px rgba(29,184,160,0.5);

  /* Gradientes */
  --grad-hero:  linear-gradient(135deg, #0d2a3e 0%, #0e5a5e 50%, #12797e 100%);
  --grad-brand: linear-gradient(135deg, #1db8a0 0%, #0e8c7a 100%);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg-page:      #0a1628;
  --bg-surface:   #0d1e3a;
  --bg-elevated:  #132243;
  --bg-input:     rgba(255,255,255,0.04);

  --border:       rgba(29,184,160,0.10);
  --border-hover: rgba(29,184,160,0.28);

  --text-primary:   #f4faf9;
  --text-secondary: rgba(244,250,249,0.70);
  --text-muted:     rgba(244,250,249,0.45);
  --text-inverse:   #0a1628;

  --teal-brand:  #1db8a0;
  --teal-light:  #3dd4bb;
  --teal-pale:   rgba(29,184,160,0.15);
  --teal-dark:   #0e5a5e;

  --navy-deep: #0a1628;
  --navy-mid:  #0d1e3a;
  --navy-soft: #132243;

  --success:    #3dda89;
  --success-bg: rgba(29,184,100,0.15);
  --alert:      #f5c842;
  --alert-bg:   rgba(255,180,50,0.12);
  --error:      #ff5252;
  --error-bg:   rgba(255,82,82,0.12);

  --shadow-card: 0 4px 24px rgba(0,0,0,0.35);
  --shadow-btn:  0 4px 20px rgba(29,184,160,0.35);
  --shadow-btn-hover: 0 6px 28px rgba(29,184,160,0.5);

  --grad-hero:  linear-gradient(135deg, #0d2a3e 0%, #0e5a5e 50%, #12797e 100%);
  --grad-brand: linear-gradient(135deg, #1db8a0 0%, #0e8c7a 100%);

  color-scheme: dark;
}

/* Radius (Design.md §4) */
:root {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 40px;
}

/* Tipografia (Design.md §3) */
:root {
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ================================================================
   BASE
   ================================================================ */
body {
  font-family: var(--font-display);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  transition: background-color 0.3s, color 0.3s;
}

a { color: var(--teal-brand); }
a:hover { color: var(--teal-light); }

/* ================================================================
   TIPOGRAFIA — escala responsiva (Design.md §3.1)
   ================================================================ */
.display {
  font-size: clamp(32px, 8vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
}
.h1 {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.h2 {
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.h3 {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.subtitle {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}
.label-caps {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.mono { font-family: var(--font-mono); }
.text-teal { color: var(--teal-brand); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ================================================================
   LOGO / BRAND
   ================================================================ */
.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 22px;
}
.brand .go,
.logo-go { color: var(--text-primary); }
.brand .session,
.logo-session { color: var(--teal-brand); }

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ================================================================
   LAYOUT
   ================================================================ */
.container    { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.section      { padding: 60px 0; }
@media (min-width: 768px) { .section { padding: 80px 0; } }
@media (min-width: 1024px) { .section { padding: 100px 0; } }

/* ================================================================
   BOTOES (Design.md §6.1)
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  padding: 13px 28px;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  border: none;
  /* Default: primary gradient (backward compat with existing templates) */
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
  filter: brightness(1.05);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
}

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
  box-shadow: var(--shadow-btn-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--teal-brand);
  border: 1.5px solid var(--teal-brand);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--teal-pale);
  transform: translateY(-1px);
  box-shadow: none;
  filter: none;
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: none;
  filter: none;
}

/* Tamanhos */
.btn-sm { padding: 9px 18px; font-size: 13px; border-radius: var(--radius-sm); min-height: 36px; }
.btn-lg { padding: 16px 36px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }

/* Spinner dentro do botao */
.btn .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ================================================================
   FORMULARIO / INPUTS (Design.md §6.2)
   ================================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-input {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 16px;
  color: var(--text-primary);
  transition: all 0.2s;
  min-height: 48px;
  width: 100%;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal-brand);
  box-shadow: 0 0 0 3px rgba(29,184,160,0.12);
}
.form-input::placeholder { color: var(--text-muted); }
.form-hint { font-size: 13px; color: var(--text-muted); }
.form-error { font-size: 13px; color: var(--error); display: none; }
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232e4a5a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Legacy field styling (auth templates) */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 16px;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all 0.2s;
  min-height: 48px;
}
.field input:focus {
  outline: none;
  border-color: var(--teal-brand);
  box-shadow: 0 0 0 3px rgba(29,184,160,0.12);
}
.field .error-message {
  display: block;
  color: var(--error);
  font-size: 12px;
  margin-top: 4px;
}
.field input.form-error,
.field input.error {
  border-color: var(--error);
}
.field .hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Senha com olhinho */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 46px; }
.toggle-pw {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 9px;
  color: var(--text-secondary); display: flex; line-height: 0;
  border-radius: var(--radius-sm);
}
.toggle-pw:hover { color: var(--teal-brand); }
.toggle-pw:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 1px; }
.toggle-pw .icon-eye-off { display: none; }
.toggle-pw[aria-pressed="true"] .icon-eye { display: none; }
.toggle-pw[aria-pressed="true"] .icon-eye-off { display: inline; }

/* ================================================================
   CARDS (Design.md §6.4)
   ================================================================ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card-surface {
  background: var(--bg-surface);
}
.card-sm {
  border-radius: var(--radius-md);
  padding: 16px;
}
.card-interactive {
  cursor: pointer;
  transition: all 0.2s;
}
.card-interactive:hover {
  background: var(--teal-pale);
  transform: translateY(-2px);
}

/* ================================================================
   BADGES (Design.md §6.3)
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
}
.badge-brand   { background: var(--teal-pale); color: var(--teal-brand); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-alert   { background: var(--alert-bg); color: var(--alert); }
.badge-error   { background: var(--error-bg); color: var(--error); }
.badge-navy    { background: rgba(10,22,40,0.08); color: var(--navy-deep); }

/* ================================================================
   AUTH — login/cadastro (card centralizado)
   ================================================================ */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 20px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
}
.auth-card h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.auth-card p.sub { color: var(--text-secondary); margin: 0 0 20px; font-size: 14px; }
.auth-card .alt { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-secondary); }
.auth-card .btn { display: block; width: 100%; }

/* Flash messages */
.message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
  width: 100%;
  max-width: 400px;
}
.message.success { background: var(--success-bg); color: #117a4a; }
.message.error { background: var(--error-bg); color: #c0392b; }

/* ================================================================
   APP SHELL — dashboard do profissional
   ================================================================ */
.app-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 18px rgba(0,0,0,0.06);
}
.app-header .logout { font-size: 14px; font-weight: 600; }
.app-main { padding: 20px 16px; max-width: 960px; margin: 0 auto; }

/* Dashboard shell (sidebar + bottom-nav) */
.dash-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-surface);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 18px rgba(0,0,0,0.06);
}
.dash-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
}
.dash-main {
  padding: 20px;
  padding-bottom: 100px;
  max-width: 600px;
  margin: 0 auto;
}
@media (min-width: 768px) { .dash-main { max-width: 1200px; } }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 6px 8px;
  font-size: 10px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  min-width: 48px; min-height: 48px; justify-content: center;
  transition: color 0.2s;
}
.nav-item svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav-item.active { color: var(--teal-brand); }

/* Desktop sidebar */
@media (min-width: 768px) {
  .dash-shell { display: flex; min-height: 100dvh; }
  .dash-sidebar {
    width: 68px; background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 0; gap: 4px;
    position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  }
  .dash-sidebar .sidebar-logo { margin-bottom: 16px; }
  .dash-sidebar .nav-item { width: 52px; height: 52px; border-radius: var(--radius-md); padding: 0; }
  .dash-sidebar .nav-item.active { background: var(--teal-pale); }
  .dash-sidebar .nav-item span { display: none; }
  .dash-body { flex: 1; display: flex; flex-direction: column; }
  .bottom-nav { display: none; }
}
@media (min-width: 1024px) {
  .dash-sidebar { width: 220px; align-items: stretch; padding: 20px 12px; }
  .dash-sidebar .nav-item {
    flex-direction: row; justify-content: flex-start;
    gap: 12px; padding: 10px 16px;
    font-size: 14px; width: auto; height: auto;
    min-height: 44px; border-radius: var(--radius-md);
  }
  .dash-sidebar .nav-item span { display: inline; }
}

/* ================================================================
   HEADER PUBLICO (Design.md §6.5)
   ================================================================ */
.pub-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 20px; height: 64px;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(10,22,40,0.07);
  box-shadow: 0 1px 18px rgba(10,22,40,0.07);
  transition: background-color 0.3s, border-color 0.3s;
}
[data-theme="dark"] .pub-header {
  background: rgba(13,30,58,0.92);
  border-color: rgba(29,184,160,0.18);
  box-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.pub-header-inner {
  max-width: 1200px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.pub-nav { display: none; gap: 28px; align-items: center; }
.pub-nav a {
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.pub-nav a:hover { color: var(--teal-brand); }
.header-cta { display: none; }

.header-link-mobile-always {
  font-size: 14px; font-weight: 600;
  color: var(--teal-brand);
  margin-left: auto; margin-right: 8px;
  padding: 10px;
  transition: color 0.2s;
}
.header-link-mobile-always:hover {
  color: var(--teal-light);
}

.menu-btn {
  display: flex; flex-direction: column; gap: 5px;
  padding: 10px; cursor: pointer;
  min-width: 44px; min-height: 44px;
  justify-content: center; align-items: center;
}
.menu-btn span {
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}
@media (min-width: 768px) {
  .pub-nav { display: flex; }
  .header-cta { display: flex; gap: 12px; align-items: center; }
  .menu-btn { display: none; }
  .header-link-mobile-always { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg-page);
  padding: 80px 20px 20px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-size: 18px; font-weight: 600;
  padding: 16px; border-radius: var(--radius-md);
  color: var(--text-primary);
}
.mobile-menu a:hover { background: var(--bg-elevated); }
.mobile-menu .close-menu {
  position: absolute; top: 16px; right: 20px;
  font-size: 28px; cursor: pointer;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
}

/* ================================================================
   FOOTER PUBLICO
   ================================================================ */
.pub-footer {
  border-top: 1px solid var(--border);
  padding: 48px 20px 32px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 14px; color: var(--text-secondary); transition: color 0.2s; }
.footer-links a:hover { color: var(--teal-brand); }
.footer-bottom {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}

/* ================================================================
   MODAL
   ================================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  width: 100%; max-width: 500px; max-height: 85dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }
@media (min-width: 768px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: var(--radius-lg); transform: translateY(20px) scale(0.95); }
  .modal-backdrop.open .modal { transform: translateY(0) scale(1); }
}

/* ================================================================
   TOAST
   ================================================================ */
.toast-container {
  position: fixed; top: 16px; left: 16px; right: 16px; z-index: 400;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none;
}
.toast {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 20px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  pointer-events: auto; animation: toastIn 0.3s ease;
  max-width: 400px; text-align: center; color: var(--text-primary);
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--error); }
.toast.info    { border-left: 4px solid var(--teal-brand); }

/* ================================================================
   TABS & PILLS
   ================================================================ */
.tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border);
}
.tab {
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab.active { color: var(--teal-brand); border-bottom-color: var(--teal-brand); }

.pills {
  display: flex; gap: 8px;
  overflow-x: auto; padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}
.pill {
  padding: 8px 16px; border-radius: 100px;
  font-size: 13px; font-weight: 500;
  background: var(--bg-elevated); color: var(--text-secondary);
  white-space: nowrap; cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.pill.active {
  background: var(--teal-pale);
  color: var(--teal-brand);
  border-color: rgba(29,184,160,0.3);
}

/* ================================================================
   PROGRESS DOTS
   ================================================================ */
.progress-dots { display: flex; gap: 8px; align-items: center; }
.pdot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: all 0.3s;
}
.pdot.active { width: 24px; border-radius: 4px; background: var(--teal-brand); }
.pdot.done { background: var(--teal-brand); }

/* ================================================================
   FAB (Floating Action Button)
   ================================================================ */
.fab {
  position: fixed; bottom: 80px; right: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(29,184,160,0.4);
  font-size: 28px; transition: all 0.3s; cursor: pointer;
}
.fab:hover { transform: scale(1.05); }
.fab.open { transform: rotate(45deg); }
.fab-menu {
  position: fixed; bottom: 148px; right: 20px; z-index: 89;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: all 0.2s;
}
.fab-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fab-menu-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-card);
  white-space: nowrap; cursor: pointer;
  transition: all 0.2s; color: var(--text-primary);
}
.fab-menu-item:hover { background: var(--teal-pale); }
@media (min-width: 768px) {
  .fab { bottom: 32px; right: 32px; }
  .fab-menu { bottom: 100px; right: 32px; }
}

/* ================================================================
   ACCORDION
   ================================================================ */
.acc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; cursor: pointer;
  font-weight: 600; user-select: none;
}
.acc-header .chevron { transition: transform 0.3s; font-size: 18px; }
.acc-header.open .chevron { transform: rotate(180deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.acc-body.open { max-height: 2000px; }

/* Placeholder de imagem */
.img-placeholder {
  background: var(--bg-elevated);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  text-align: center; padding: 20px;
}

/* ================================================================
   GRIDS
   ================================================================ */
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ================================================================
   ANIMACOES (Design.md §9)
   ================================================================ */
@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes toastIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.fade-up { animation: fadeUp 0.7s cubic-bezier(0.22,1,0.36,1) both; }
.fd1 { animation-delay: 0.1s; }
.fd2 { animation-delay: 0.2s; }
.fd3 { animation-delay: 0.3s; }
.fd4 { animation-delay: 0.4s; }
.fd5 { animation-delay: 0.5s; }

/* ================================================================
   DASHBOARD — D1 Home
   ================================================================ */

/* Header greeting */
.greeting { font-size: 20px; font-weight: 700; }
.greeting-wave { font-size: 22px; }

/* Notification button */
.notif-btn {
  position: relative; width: 44px; height: 44px;
  border-radius: 12px; background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid var(--border);
}
.notif-btn svg {
  width: 20px; height: 20px;
  stroke: var(--text-secondary); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.notif-badge {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--error); font-size: 9px; font-weight: 700;
  color: #fff; display: flex; align-items: center; justify-content: center;
}

/* Finance card */
.finance-card {
  background: linear-gradient(135deg, var(--bg-elevated), rgba(29,184,160,0.06));
  border: 1px solid rgba(29,184,160,0.12);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px;
}
.finance-month { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.finance-val {
  font-family: var(--font-mono); font-size: 32px; font-weight: 500;
  color: var(--teal-brand);
}
.finance-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.progress-track {
  height: 8px; border-radius: 4px;
  background: var(--bg-input); overflow: hidden; margin-bottom: 8px;
}
.progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--teal-light), #3dd4bb);
  transition: width 0.6s ease;
}
.finance-forecast { font-size: 13px; color: var(--text-muted); }

/* Status cards */
.status-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 24px;
}
.status-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 16px; padding: 14px; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.status-card:hover { transform: translateY(-2px); background: var(--teal-pale); }
.status-icon { font-size: 16px; margin-bottom: 4px; }
.status-val { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.status-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.status-count { font-size: 11px; color: var(--text-muted); }

/* Chart */
.chart-section { margin-bottom: 24px; }
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.chart-bars {
  display: flex; align-items: flex-end; gap: 12px; height: 120px;
}
.chart-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 6px; height: 100%; justify-content: flex-end;
}
.chart-bar {
  width: 100%; border-radius: 6px 6px 0 0;
  background: rgba(29,184,160,0.25);
  transition: height 0.4s ease; min-height: 4px;
}
.chart-bar.current { background: var(--grad-brand); }
.chart-label { font-size: 11px; color: var(--text-muted); }
.chart-val { font-size: 11px; font-family: var(--font-mono); color: var(--text-secondary); }

/* Attention sections */
.attn-title {
  font-size: 16px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.attn-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.attn-info { flex: 1; min-width: 0; }
.attn-name { font-size: 14px; font-weight: 600; }
.attn-detail { font-size: 12px; color: var(--text-muted); }
.attn-btn {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  background: var(--teal-pale); color: var(--teal-brand);
  white-space: nowrap; cursor: pointer; border: none;
  transition: all 0.2s;
}
.attn-btn:hover { background: rgba(29,184,160,0.25); }
.attn-btn.secondary { background: var(--bg-input); color: var(--text-secondary); }
.attn-btn.secondary:hover { background: var(--bg-elevated); }
.attn-empty {
  text-align: center; padding: 24px;
  color: var(--text-muted); font-size: 14px;
}
.section-gap { margin-bottom: 28px; }
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; border-radius: 10px;
  font-size: 11px; font-weight: 700; padding: 0 6px;
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; opacity: 1; transform: none; }
  .fd1, .fd2, .fd3, .fd4, .fd5 { animation-delay: 0s; }
  .progress-fill { transition: none; }
  .chart-bar { transition: none; }
  .fab { transition: none; }
  .fab-menu { transition: none; }
  .modal { transition: none; }
  .modal-backdrop { transition: none; }
  .status-card { transition: none; }
  .attn-btn { transition: none; }
}

/* ================================================================
   HOME / LANDING (P1) — pixel-perfect do prototipo, tokenizado
   ================================================================ */
/* Hero */
.hero { position: relative; padding: 80px 20px 60px; text-align: center; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: 30%; left: 50%;
  width: 620px; height: 620px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(29,184,160,0.16) 0%, transparent 68%);
  pointer-events: none;
}
.hero-headline { max-width: 600px; margin: 0 auto 20px; position: relative; }
.hero-sub { max-width: 520px; margin: 0 auto 32px; font-size: 16px; color: var(--text-secondary); line-height: 1.7; position: relative; }
.hero-ctas { display: flex; flex-direction: column; gap: 16px; align-items: center; position: relative; }
.hero-ctas .link { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.hero-ctas .link:hover { color: var(--teal-brand); }
.hero-mockup { margin: 48px auto 0; max-width: 280px; position: relative; }
/* Phone mockup permanece escuro — mostra o dashboard real (dark) */
.phone-mock { background: #132243; border: 2px solid rgba(29,184,160,0.25); border-radius: 32px; padding: 12px; aspect-ratio: 9/16; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(10,22,40,0.25); }
.phone-mock-bar { height: 24px; background: #0D1E3A; border-radius: 8px 8px 0 0; display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.phone-mock-bar span { width: 4px; height: 4px; border-radius: 50%; background: rgba(244,250,249,0.3); }
.phone-mock-content { flex: 1; background: #0D1E3A; border-radius: 0 0 8px 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mock-card { background: #132243; border-radius: 10px; padding: 12px; }
.mock-line { height: 8px; border-radius: 4px; background: rgba(29,184,160,0.2); }
.mock-line.short { width: 60%; }
.mock-line.teal { background: rgba(29,184,160,0.5); }
.mock-val { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: #1db8a0; }
.mock-bar { height: 6px; border-radius: 3px; background: rgba(29,184,160,0.15); margin-top: 6px; }
.mock-bar-fill { height: 100%; width: 72%; border-radius: 3px; background: #1db8a0; }
.mock-dots { display: flex; gap: 8px; }
.mock-dot { flex: 1; height: 48px; border-radius: 8px; background: #132243; }

/* Barra de destaques */
.social-bar { background: var(--bg-surface); padding: 24px 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.social-inner { max-width: 700px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 40px; }
.social-item { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.social-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--teal-pale); display: flex; align-items: center; justify-content: center; color: var(--teal-brand); font-size: 16px; flex-shrink: 0; }

/* Steps */
.steps-section { background: var(--bg-surface); }
.step-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
.step-card { text-align: center; padding: 32px 20px; background: transparent; border: 1px solid var(--border); border-radius: 20px; }
.step-num { width: 48px; height: 48px; border-radius: 14px; background: var(--teal-pale); color: var(--teal-brand); font-family: var(--font-mono); font-weight: 500; font-size: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.step-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Pain points */
.pain-list { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 28px; }
.pain-item { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-muted); }
.pain-item .strike { text-decoration: line-through; text-decoration-color: var(--error); }
.pain-x { color: var(--error); font-weight: 700; font-size: 18px; flex-shrink: 0; }
.pain-counter { font-size: 17px; font-weight: 600; color: var(--teal-brand); margin-top: 8px; }

/* Trust (substitui prova social fictícia — sinais de confiança honestos) */
.trust-section { background: var(--bg-surface); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 16px; max-width: 960px; margin: 0 auto; }
.trust-card { background: var(--bg-page); border: 1px solid var(--border); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.trust-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--teal-pale); color: var(--teal-brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.trust-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust-title { font-size: 15px; font-weight: 700; }
.trust-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }

/* FAQ */
.faq-section { max-width: 640px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; font-weight: 600; font-size: 15px; text-align: left; width: 100%; color: var(--text-primary); }
.faq-q .chevron { transition: transform 0.3s; color: var(--text-muted); flex-shrink: 0; }
.faq-q[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-a.open { max-height: 400px; }
.faq-a p { padding: 0 0 18px; font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* Pricing — banda escura deliberada (sempre dark, independe do tema) */
.pricing-section { background: #0A1628; text-align: center; position: relative; overflow: hidden; }
.pricing-section::before { content: ''; position: absolute; top: 50%; left: 50%; width: 600px; height: 600px; transform: translate(-50%,-50%); background: radial-gradient(circle, rgba(29,184,160,0.14) 0%, transparent 70%); pointer-events: none; }
.pricing-section h2 { color: #f4faf9; position: relative; }
.price-card { background: linear-gradient(135deg, rgba(29,184,160,0.1), rgba(14,90,94,0.14)); border: 1px solid rgba(29,184,160,0.25); border-radius: 24px; padding: 40px 24px; max-width: 440px; margin: 28px auto 0; position: relative; }
.price-free { font-size: 14px; color: rgba(244,250,249,0.6); margin-bottom: 4px; }
.price-free-val { font-size: clamp(32px, 6vw, 48px); font-weight: 800; color: #3dd4bb; }
.price-free-sub { font-size: 13px; color: rgba(244,250,249,0.5); margin-bottom: 28px; }
.price-divider { height: 1px; background: rgba(29,184,160,0.2); margin: 0 -24px 28px; }
.price-after { font-size: 14px; color: rgba(244,250,249,0.6); margin-bottom: 4px; }
.price-pct { font-family: var(--font-mono); font-size: clamp(48px, 10vw, 72px); font-weight: 500; color: #3dd4bb; line-height: 1; }
.price-pct-label { font-size: 14px; color: rgba(244,250,249,0.5); margin-bottom: 8px; }
.price-note { font-size: 13px; color: rgba(244,250,249,0.45); line-height: 1.5; margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(29,184,160,0.12); }

@media (min-width: 768px) {
  .hero { padding: 110px 20px 80px; }
  .hero-ctas { flex-direction: row; justify-content: center; }
  .step-cards { grid-template-columns: repeat(3, 1fr); }
  .phone-mock { max-width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill, .faq-a, .faq-q .chevron, .mock-bar-fill { transition: none; }
}

/* ================================================================
   THEME TOGGLE (sol/lua)
   ================================================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--teal-brand);
  background: var(--teal-pale);
}
.theme-toggle svg { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"]  .theme-toggle .icon-sun  { display: none; }
[data-theme="dark"]  .theme-toggle .icon-moon { display: block; }

/* ================================================================
   UTILITARIOS
   ================================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.text-center { text-align: center; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
