/**
 * TeiaLink — sistema de design (Fase 1.1)
 *
 * Identidade
 * - Base: verde, preto, branco (superfícies escuras + texto claro).
 * - Laranja: acento moderado (eyebrows, avisos não destrutivos, destaques secundários).
 * - Vermelho: APENAS semântica negativa (erro, alerta crítico, exclusão, estados destrutivos).
 * - Sem gradientes de marca; fundos e botões em cor sólida ou translucidez uniforme.
 *
 * Contraste (orientação)
 * - Texto principal (--text) sobre --page: legibilidade forte.
 * - Texto secundário: --muted; evitar abaixo de ~56% de opacidade em corpos longos.
 *
 * Espaçamento: escala --space-* (múltiplos de 4px) para padding/gap em novos componentes.
 *
 * Tipografia (1.2): .ui-title-page, .ui-eyebrow, .ui-subtitle, .ui-label, .ui-message-*.
 * Componentes (1.3): .ui-btn*, .ui-field, .ui-table*, .ui-modal*, .ui-dropdown*, .ui-pagination*, .ui-spinner, .ui-empty*.
 * Layout (1.4): .teialink-app, .ui-container, .ui-page, .ui-section, .ui-grid*, .ui-footer*.
 * Ícones (1.5): .ui-icon + sprite #tl-i-* em includes/ui/icon_sprite.html.
 */
:root {
  /* --- Paleta oficial --- */
  --color-white: #ffffff;
  --color-black-pure: #000000;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-950: #0b1220;
  --color-gray-900: #111827;

  --color-green-400: #4ade80;
  --color-green-500: #22c55e;
  --color-green-600: #16a34a;
  --color-green-700: #15803d;
  --color-green-950: #041008;

  /* Vermelho: só erro / alerta crítico / apagar / perigo */
  --color-danger-400: #f87171;
  --color-danger-500: #ef4444;
  --color-danger-600: #dc2626;
  --color-danger-700: #b91c1c;

  /* Acento laranja (uso pontual — não competir com o verde primário) */
  --color-orange-300: #fdba74;
  --color-orange-400: #fb923c;
  --color-orange-500: #f97316;
  --color-orange-600: #ea580c;

  /* --- Aliases legados (manter templates existentes) --- */
  --green: var(--color-green-500);
  --green-strong: var(--color-green-600);
  --green-hover: var(--color-green-700);
  --white: var(--color-white);
  --black: var(--color-gray-900);
  --gray: var(--color-gray-100);

  /* --- Superfícies & texto --- */
  --page: var(--color-gray-950);
  --page-2: var(--color-gray-900);
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --stroke: rgba(255, 255, 255, 0.12);
  --stroke-strong: rgba(255, 255, 255, 0.18);
  --text: rgba(255, 255, 255, 0.96);
  --muted: rgba(255, 255, 255, 0.72);

  --danger-muted: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.45);
  --danger-text: #fecaca;

  /* --- Escala de espaçamento (4px) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* --- Raios --- */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* --- Sombras (elevação sem gradiente) --- */
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 18px 60px rgba(0, 0, 0, 0.35);
  --shadow: var(--shadow-lg);

  /* --- Bordas --- */
  --border-width-thin: 1px;
  --border-subtle: var(--border-width-thin) solid var(--stroke);
  --border-strong: var(--border-width-thin) solid var(--stroke-strong);

  /* --- Tipografia --- */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --line-tight: 1.15;
  --line-snug: 1.35;
  --line-body: 1.55;
  --line-relaxed: 1.65;
  --title-page-size: clamp(1.625rem, 3vw, 2.25rem);

  /* Mensagens: sucesso (verde) | erro (vermelho) | aviso (laranja, não destrutivo) | info */
  --success-muted: rgba(34, 197, 94, 0.1);
  --success-border: rgba(34, 197, 94, 0.35);
  --success-text: #bbf7d0;

  --warning-muted: rgba(249, 115, 22, 0.1);
  --warning-border: rgba(249, 115, 22, 0.32);
  --warning-text: #fdba74;

  --info-muted: rgba(255, 255, 255, 0.06);
  --info-border: rgba(255, 255, 255, 0.12);
  --info-text: rgba(255, 255, 255, 0.9);

  --header-height: 76px;
  --container-max: 80rem;
  --control-height: 44px;
  --control-radius: 12px;
  --control-font-size: 0.875rem;
  --control-padding-y: 10px;
  --control-padding-x: 12px;

  /* Hero home — véu escuro sobre fotografia/SVG (sem verde na camada; sem gradiente) */
  --hero-overlay: rgba(0, 0, 0, 0.72);
  --hero-wash-dark: rgba(0, 0, 0, 0.28);
  --hero-photo-fallback: #030303;
}

html {
  scroll-behavior: smooth;
  /* Ancoras respeitam o cabeçalho sticky */
  scroll-padding-top: 5.75rem;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-body);
  color: var(--text);
  background: var(--page);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main,
footer,
.app-header-wrap,
.toast-stack {
  position: relative;
}

.glass-card {
  background: var(--panel-strong);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ui-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
}

.ui-card-strong {
  background: var(--panel-strong);
  border: 1px solid var(--stroke-strong);
}

.ui-muted {
  color: var(--muted);
}

/* ========== Tipografia e hierarquia (Fase 1.2) ========== */

/* Linha fina acima do título (contexto da página) */
.ui-eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: var(--line-tight);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(251, 146, 60, 0.9);
}

/* Título principal da página (um por ecrã, hierarquia máxima) */
.ui-title-page {
  margin: 0;
  margin-top: var(--space-2);
  font-size: var(--title-page-size);
  font-weight: 900;
  line-height: var(--line-tight);
  letter-spacing: -0.03em;
  color: var(--color-white);
}

/* Subtítulo / introdução curta sob o título */
.ui-subtitle {
  margin: 0;
  margin-top: var(--space-2);
  max-width: 42rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: var(--line-relaxed);
  color: rgba(255, 255, 255, 0.65);
}

/* Secção dentro de painel (uppercase discreto) */
.ui-overline {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: var(--line-snug);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* Título de secção em frase normal (H2 em conteúdo) */
.ui-title-section {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: var(--line-snug);
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.ui-title-sub {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: var(--line-snug);
  color: rgba(255, 255, 255, 0.92);
}

/* Labels de formulário / termos de lista (dt, legend) */
.ui-label {
  display: block;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: var(--line-snug);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.ui-label-optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.4);
}

/* Corpo, apoio e nota pequena */
.ui-body {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: var(--line-relaxed);
  color: rgba(255, 255, 255, 0.85);
}

.ui-help {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: var(--line-relaxed);
  color: var(--muted);
}

.ui-caption {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

/* Ênfase em linhas de detalhe (valores não-numéricos) */
.ui-strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.ui-mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* Valores em destaque (ex.: montantes em resumo) */
.ui-stat-value {
  margin: 0;
  margin-top: var(--space-1);
  font-size: 1.125rem;
  font-weight: 900;
  line-height: var(--line-tight);
  color: var(--color-white);
}

.ui-stat-value--accent {
  color: #86efac;
}

/* Listas de definição em cartões (remove indentação por omissão) */
.ui-deflist dd {
  margin: 0;
}

/* Estados semânticos — só cor (inline, links, ícones) */
.ui-text-success {
  color: #86efac;
}

.ui-text-error {
  color: var(--danger-text);
}

.ui-text-warning {
  color: var(--warning-text);
}

/* Mensagens de sistema (Django messages, alertas inline) */
.ui-message-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.ui-message {
  margin: 0;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: var(--line-relaxed);
}

.ui-message p {
  margin: 0;
}

.ui-message p + p {
  margin-top: var(--space-1);
}

.ui-message-title {
  margin: 0;
  margin-bottom: var(--space-1);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: var(--line-snug);
}

.ui-message--success {
  border: var(--border-width-thin) solid var(--success-border);
  background: var(--success-muted);
  color: var(--success-text);
}

.ui-message--error {
  border: var(--border-width-thin) solid var(--danger-border);
  background: var(--danger-muted);
  color: var(--danger-text);
}

/* Aviso não destrutivo (não usar vermelho de perigo) */
.ui-message--warning {
  border: var(--border-width-thin) solid var(--warning-border);
  background: var(--warning-muted);
  color: var(--warning-text);
}

.ui-message--info {
  border: var(--border-width-thin) solid var(--info-border);
  background: var(--info-muted);
  color: var(--info-text);
}

/* Painéis estáticos (mesma semântica que mensagens) */
.ui-surface-success {
  border: var(--border-width-thin) solid var(--success-border);
  background: var(--success-muted);
  color: var(--success-text);
}

.ui-surface-warning {
  border: var(--border-width-thin) solid var(--warning-border);
  background: var(--warning-muted);
  color: var(--warning-text);
}

/* Destaque de título (cor sólida; nome histórico — sem gradiente CSS) */
.text-gradient,
.text-accent-highlight {
  color: #ecfdf5;
}

/* --- Home: hero (verde / preto / branco + laranja pontual) --- */
@keyframes home-floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes home-spin-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.home-hero-min-h {
  min-height: calc(100vh - 88px);
}

@supports (height: 100dvh) {
  .home-hero-min-h {
    min-height: calc(100dvh - 88px);
  }
}

.home-floaty {
  animation: home-floaty 6s ease-in-out infinite;
}

.home-floaty-delay-sm {
  animation-delay: 0.35s;
}

.home-floaty-delay-lg {
  animation-delay: 0.7s;
}

.home-orbit::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  animation: home-spin-ring 20s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .home-floaty,
  .home-orbit::before {
    animation: none !important;
  }
}

.home-kicker {
  border-color: var(--stroke);
  background: var(--panel);
  color: var(--muted);
}

.home-kicker-dot {
  background: var(--color-green-400);
}

.home-line-orange {
  color: var(--color-orange-300);
}

.home-stat-card {
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  background: rgba(0, 0, 0, 0.22);
}

.home-stat-card--accent {
  border-color: rgba(249, 115, 22, 0.38);
  background: rgba(249, 115, 22, 0.07);
}

.home-stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text);
}

.home-stat-card--accent .home-stat-value {
  color: var(--color-orange-300);
}

.home-pill-steps {
  border: 1px solid rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.1);
  color: var(--color-orange-300);
}

.home-step-index {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.home-eyebrow-client {
  color: rgba(134, 239, 172, 0.88);
  letter-spacing: 0.2em;
}

.home-eyebrow-pro {
  color: rgba(253, 186, 116, 0.95);
  letter-spacing: 0.2em;
}

.home-badge-orange {
  border: 1px solid rgba(249, 115, 22, 0.28);
  background: rgba(249, 115, 22, 0.1);
  font-weight: 600;
  color: rgba(254, 215, 170, 0.96);
}

/* Home — blocos de valor e faixa de confiança (sólidos, sem gradiente) */
.home-value-tile {
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  padding: var(--space-5);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.home-value-tile:hover {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.home-trust-band {
  border: var(--border-subtle);
  background: rgba(34, 197, 94, 0.06);
  border-radius: var(--radius-lg);
}

@media (prefers-reduced-motion: reduce) {
  .home-value-tile:hover {
    transform: none;
  }
}

/* Home hero — linha editorial (título em blocos, sólido, sem gradiente) */
.home-hero-editorial h1 .home-hero-line {
  display: block;
  line-height: 1.05;
}

.home-hero-check li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.home-hero-check-icon {
  flex-shrink: 0;
  margin-top: 0.2rem;
  display: flex;
  height: 1.25rem;
  width: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  font-size: 0.65rem;
  font-weight: 900;
}

.home-hero-panel {
  border-radius: var(--radius-xl);
  border: var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-md);
}

.home-hero-panel-inner {
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  background: rgba(0, 0, 0, 0.35);
}

.home-hero-step-num {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 900;
}

.home-hero-step-num--green {
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.home-hero-step-num--orange {
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
  color: #fdba74;
}

.home-hero-step-num--light {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

/* Home hero — painel principal (sólido, sombra suave) */
.home-hero-shell {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow-md);
}

.home-hero-aside {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: var(--shadow-sm);
}

.home-hero-stat {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.home-hero-stat:hover {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(0, 0, 0, 0.34);
}

.home-hero-stat--accent {
  border-color: rgba(249, 115, 22, 0.22);
  background: rgba(249, 115, 22, 0.06);
}

.home-hero-stat--accent:hover {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.09);
}

.home-hero-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.home-hero-audience {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-left-width: 3px;
}

.home-hero-audience--client {
  border-left-color: rgba(34, 197, 94, 0.65);
}

.home-hero-audience--pro {
  border-left-color: rgba(249, 115, 22, 0.55);
}

.ui-btn {
  --ui-btn-px: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding-block: 0;
  padding-inline: var(--ui-btn-px);
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.ui-btn:hover {
  transform: translateY(-1px);
}

.ui-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

.ui-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.ui-btn-primary {
  background: var(--green-strong);
  color: #041008;
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(22, 163, 74, 0.22);
}

.ui-btn-primary:hover {
  background: var(--green-hover);
  border-color: rgba(34, 197, 94, 0.75);
}

.ui-btn-soft {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 20px rgba(0, 0, 0, 0.16);
}

.ui-btn-soft:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.ui-btn-dark {
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 22px rgba(0, 0, 0, 0.2);
}

.ui-btn-dark:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(34, 197, 94, 0.24);
}

/* Destrutivo: apagar conta, confirmar remoção, erro crítico confirmável */
.ui-btn-danger {
  background: var(--color-danger-600);
  color: #fff;
  border-color: var(--color-danger-700);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 22px rgba(220, 38, 38, 0.28);
}

.ui-btn-danger:hover {
  background: var(--color-danger-700);
  border-color: #991b1b;
}

.ui-btn-danger:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px var(--danger-muted),
    0 8px 22px rgba(0, 0, 0, 0.2);
}

/* Painéis de erro / alerta crítico (fundo + borda; texto claro) */
.ui-surface-danger {
  border: var(--border-width-thin) solid var(--danger-border);
  background: var(--danger-muted);
  color: var(--danger-text);
}

.ui-btn-sm {
  --ui-btn-px: 13px;
  min-height: 40px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.ui-btn-lg {
  --ui-btn-px: 20px;
  min-height: 52px;
  border-radius: 16px;
  font-size: 1rem;
}

.ui-btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.ui-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
}

.ui-btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

.ui-btn-icon {
  width: 46px;
  min-width: 46px;
  --ui-btn-px: 0;
}

.ui-btn-sm.ui-btn-icon {
  width: 40px;
  min-width: 40px;
}

button.ui-btn:disabled,
.ui-btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: var(--border-width-thin) solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 24, 39, 0.5);
  color: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-pill);
}

.ui-badge-sm {
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.ui-badge-neutral {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
}

.ui-badge-success {
  border-color: var(--success-border);
  background: var(--success-muted);
  color: var(--success-text);
}

.ui-badge-warning {
  border-color: var(--warning-border);
  background: var(--warning-muted);
  color: var(--warning-text);
}

.ui-badge-danger {
  border-color: var(--danger-border);
  background: var(--danger-muted);
  color: var(--danger-text);
}

.ui-badge-accent {
  border-color: rgba(249, 115, 22, 0.38);
  background: rgba(249, 115, 22, 0.12);
  color: var(--color-orange-300);
}

.ui-input,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
  width: 100%;
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  padding: var(--control-padding-y) var(--control-padding-x);
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  color: var(--text);
  font-size: var(--control-font-size);
  font-weight: 600;
  line-height: 1.25;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

textarea {
  width: 100%;
  min-height: 120px;
  border-radius: var(--control-radius);
  padding: var(--control-padding-y) var(--control-padding-x);
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  color: var(--text);
  font-size: var(--control-font-size);
  font-weight: 500;
  line-height: var(--line-relaxed);
  resize: vertical;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}


input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.ui-input:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
select:focus,
textarea:focus {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
  background: rgba(17, 24, 39, 0.96);
  transform: translateY(-1px);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.75)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
}

select option {
  color: #fff;
  background: #111827;
}

/* Filtros em barras de ferramentas (altura alinhada a .ui-btn-sm) */
select.ui-select-compact {
  min-height: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 12px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

select.ui-select-compact:focus {
  transform: none;
}

input[type="file"] {
  min-height: auto;
  padding: 12px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--green);
}

/* ========== Componentes globais (Fase 1.3) ========== */

/* Alertas — alias semântico de .ui-message (mesmos modificadores --success, etc.) */
.ui-alert {
  margin: 0;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: var(--line-relaxed);
}

.ui-alert--success {
  border: var(--border-width-thin) solid var(--success-border);
  background: var(--success-muted);
  color: var(--success-text);
}

.ui-alert--error {
  border: var(--border-width-thin) solid var(--danger-border);
  background: var(--danger-muted);
  color: var(--danger-text);
}

.ui-alert--warning {
  border: var(--border-width-thin) solid var(--warning-border);
  background: var(--warning-muted);
  color: var(--warning-text);
}

.ui-alert--info {
  border: var(--border-width-thin) solid var(--info-border);
  background: var(--info-muted);
  color: var(--info-text);
}

/* Campos de formulário (agrupar label + controlo + ajuda) */
.ui-field:not(input):not(select):not(textarea):not(button) {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
 
}

.ui-field:not(input):not(select):not(textarea):not(button):last-child {
  margin-bottom: 0;
}

/*
 * Em páginas antigas, .ui-field também é aplicado direto no <input>/<select>.
 * Essas regras evitam layout "quebrado" (display:flex/margin-bottom) e
 * permitem que classes utilitárias de altura (h-8/h-9) funcionem.
 */
input.ui-field,
select.ui-field,
textarea.ui-field {
  display: block;
  margin-bottom: 0;
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  font-size: var(--control-font-size);
  line-height: 1.25;
  padding: 10px;
}

.ui-field--toolbar {
  margin-bottom: 0;
}

.ui-field-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: var(--line-snug);
  color: rgba(255, 255, 255, 0.45);
}

.ui-field-error {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: var(--line-snug);
  color: var(--danger-text);
}

.ui-input-error,
.ui-input.is-invalid,
input.is-invalid:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea.is-invalid,
select.is-invalid {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 0 0 3px var(--danger-muted);
}

.ui-input-error:focus,
.ui-input.is-invalid:focus,
input.is-invalid:focus,
textarea.is-invalid:focus,
select.is-invalid:focus {
  border-color: var(--color-danger-500);
}

/* Cartões — regiões e interacção */
.ui-card-pad {
  padding: var(--space-5);
}

.ui-card-interactive {
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.ui-card-interactive:hover {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.ui-card-header {
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: var(--border-subtle);
}

.ui-card-footer {
  padding-top: var(--space-3);
  margin-top: var(--space-3);
  border-top: var(--border-subtle);
}

/* Modal (abrir/fechar com JS: remover .is-hidden ou usar hidden até toggle) */
.ui-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ui-modal-backdrop.is-hidden,
.ui-modal-backdrop[hidden] {
  display: none;
}

.ui-modal {
  width: 100%;
  max-width: min(520px, 100%);
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  border: var(--border-subtle);
  background: var(--page-2);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ui-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: var(--border-subtle);
}

.ui-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  -webkit-overflow-scrolling: touch;
}

.ui-modal-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  border-top: var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

@media (max-width: 639px) {
  .ui-modal-backdrop {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .ui-modal {
    max-width: 100%;
    max-height: min(92dvh, 640px);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .ui-modal-header,
  .ui-modal-body,
  .ui-modal-footer {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Dropdown / menu contextual */
.ui-dropdown {
  position: relative;
  display: inline-block;
}

.ui-dropdown-panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 80;
  min-width: 200px;
  max-width: min(320px, 92vw);
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  background: var(--page-2);
  box-shadow: var(--shadow-md);
}

@media (max-width: 380px) {
  .ui-dropdown-panel {
    min-width: 0;
    width: max-content;
    max-width: 92vw;
  }
}

.ui-dropdown-panel.is-hidden,
.ui-dropdown-panel[hidden] {
  display: none;
}

.ui-dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ui-dropdown-item:hover,
.ui-dropdown-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.ui-dropdown-item--danger {
  color: var(--danger-text);
}

.ui-dropdown-item--danger:hover {
  background: var(--danger-muted);
}

.ui-dropdown-divider {
  height: 1px;
  margin: var(--space-2) 0;
  background: var(--stroke);
  border: 0;
}

/* Tabelas responsivas */
.ui-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  -webkit-overflow-scrolling: touch;
}

.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ui-table th,
.ui-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: middle;
  border-bottom: var(--border-width-thin) solid rgba(255, 255, 255, 0.08);
}

.ui-table th {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.2);
}

.ui-table tbody tr:last-child td {
  border-bottom: none;
}

.ui-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.ui-table-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 639px) {
  .ui-table th,
  .ui-table td {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8125rem;
  }

  .ui-table th {
    font-size: 0.65rem;
  }
}

/* Paginação */
.ui-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.ui-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  border: var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.ui-page-btn:hover:not([aria-disabled="true"]):not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
}

.ui-page-btn.is-active,
.ui-page-btn[aria-current="page"] {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
  color: #ecfdf5;
}

.ui-page-btn:disabled,
.ui-page-btn[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

/* Loaders */
.ui-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--color-green-500);
  border-radius: 50%;
  animation: ui-spin 0.75s linear infinite;
}

.ui-spinner-sm {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

.ui-spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

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

.ui-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Estados vazios */
.ui-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-10) var(--space-4);
  border-radius: var(--radius-xl);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.ui-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.45);
  font-size: 1.5rem;
  font-weight: 800;
}

.ui-empty-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.02em;
}

.ui-empty-text {
  margin: var(--space-2) 0 0;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: var(--line-relaxed);
  color: var(--muted);
}

.ui-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-5);
}

/* ========== Layout base (Fase 1.4) ========== */

.teialink-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.teialink-app .app-content {
  flex: 1 0 auto;
  width: 100%;
}

.ui-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .ui-container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .ui-container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

.ui-page {
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
}

.ui-section {
  margin-bottom: var(--space-8);
}

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

.ui-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ui-grid {
  display: grid;
  gap: var(--space-4);
}

.ui-grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .ui-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ui-grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .ui-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ui-footer-title {
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.95);
}

/* ========== Ícones inline (Fase 1.5) ========== */

.ui-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: inherit;
  pointer-events: none;
}

.ui-icon--nav {
  opacity: 0.88;
}

.nav-link.is-active .ui-icon--nav,
.nav-link:hover .ui-icon--nav {
  opacity: 1;
}

.ui-icon--lg {
  width: 1.35rem;
  height: 1.35rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ui-ring:focus,
.ui-ring:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.question-scroll {
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.question-scroll::-webkit-scrollbar {
  width: 10px;
}

.question-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.question-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.question-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.45);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.updates-scroll {
  max-height: 620px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.updates-scroll::-webkit-scrollbar {
  width: 10px;
}

.updates-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.updates-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.updates-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.45);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.post-media {
  width: 100%;
  height: 220px;
}

.app-header-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header {
  background: var(--color-gray-900);
  border-bottom: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

/* Painéis suspensos e drawer — superfície sólida (sem blur) */
.app-floating-panel {
  border: var(--border-subtle);
  background: var(--color-gray-900);
  box-shadow: var(--shadow-md);
}

.app-floating-panel--sm {
  max-width: min(16rem, 92vw);
}

.app-drawer-panel {
  border-color: var(--stroke);
  background: var(--color-gray-900);
  box-shadow: var(--shadow-lg);
}

/* Gaveta móvel — layout em coluna, grupos e linhas claras */
.app-drawer-panel--modern {
  display: flex;
  flex-direction: column;
  width: min(22rem, calc(100vw - 1.75rem));
  max-width: 100%;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0e14;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.app-drawer-panel--modern .drawer-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.75rem 1rem;
}

.drawer-nav-section {
  margin-top: 1.15rem;
}

.drawer-nav-section:first-child {
  margin-top: 0.25rem;
}

.drawer-nav-label {
  margin: 0 0 0.4rem;
  padding: 0 0.65rem;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.25rem;
  padding: 0.85rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.drawer-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: white;
}

.drawer-nav-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  opacity: 0.72;
  color: rgba(74, 222, 128, 0.88);
}

.drawer-nav-item:hover svg {
  opacity: 1;
}

.drawer-nav-footer {
  flex-shrink: 0;
  padding: 1rem 0.85rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}

.drawer-nav-footer .drawer-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drawer-footer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.drawer-footer-btn--primary {
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(22, 163, 74, 0.22);
  color: #ecfdf5;
}

.drawer-footer-btn--primary:hover {
  background: rgba(22, 163, 74, 0.32);
  border-color: rgba(34, 197, 94, 0.6);
}

.drawer-footer-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
}

.drawer-footer-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.drawer-footer-note {
  margin-top: 0.65rem;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.45;
}

/* Entrar no header — visível em todas as larguras (ícone + texto quando couber) */
.header-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.header-login-btn:hover {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.12);
  color: white;
}

.header-login-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: rgba(134, 239, 172, 0.95);
}

.header-login-btn .header-login-text {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 379px) {
  .header-login-btn {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .header-login-btn .header-login-text {
    display: none;
  }
}

.app-launch-banner {
  border-color: rgba(34, 197, 94, 0.35);
  background: var(--color-gray-900);
  box-shadow: var(--shadow-md);
}

.brand-mark {
  box-shadow: var(--shadow-sm);
}

.brand-mark:hover {
  background: rgba(255, 255, 255, 0.07);
}

.app-header-inner {
  min-height: 64px;
  gap: 0.5rem;
}

.app-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.82rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.nav-link .nav-link-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.68;
  color: rgba(134, 239, 172, 0.88);
  transition: opacity 0.18s ease;
}

.nav-link:hover:not(.is-active) .nav-link-icon {
  opacity: 0.88;
}

.nav-link.is-active .nav-link-icon {
  opacity: 0.95;
  color: rgba(209, 250, 229, 0.95);
}

.nav-link.is-active {
  background: rgba(34, 197, 94, 0.2);
  color: #ecfdf5;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.28);
}

.nav-link:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.94);
}

.nav-link.is-active:hover {
  background: rgba(34, 197, 94, 0.26);
  color: white;
}

.app-header .desktop-nav.app-pill {
  gap: 3px;
  padding: 5px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Menu de perfil (dropdown) */
.profile-menu-trigger {
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.92);
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.profile-menu-trigger:focus {
  outline: none;
}

/* Foco teclado: neutro e discreto (sem halo verde), alinhado à seta do hero */
.profile-menu-trigger:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
}

.profile-menu-panel {
  width: min(18.5rem, calc(100vw - 1.5rem));
  max-width: 18.5rem;
}

.profile-menu-panel .profile-menu-header {
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.profile-menu-panel .profile-menu-body {
  padding: 0.4rem 0.45rem 0.55rem;
}

.profile-menu-panel .profile-menu-section-label {
  margin: 0.65rem 0.5rem 0.35rem;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

.profile-menu-panel .profile-menu-section-label:first-child {
  margin-top: 0.35rem;
}

.profile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2px 0;
  padding: 0.65rem 0.65rem;
  border-radius: 12px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.profile-menu-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.06);
  color: white;
}

.profile-menu-link svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.72;
  color: rgba(134, 239, 172, 0.95);
}

.profile-menu-link:hover svg {
  opacity: 1;
}

.profile-menu-notifications {
  margin: 0.35rem 0.45rem 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.profile-menu-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.45rem;
  background: rgba(0, 0, 0, 0.18);
}

.profile-menu-link--logout {
  color: rgba(252, 165, 165, 0.95);
}

.profile-menu-link--logout svg {
  color: rgba(248, 113, 113, 0.9);
}

.profile-menu-link--logout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

/* —— Rankings (leaderboard) —— */
.rankings-page {
  padding-bottom: var(--space-8, 2rem);
}

.rankings-live-search {
  width: 100%;
  max-width: 26rem;
}

.rankings-live-search-input-wrap {
  position: relative;
}

.rankings-live-search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.rankings-live-search-input {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.94rem;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.rankings-live-search-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.rankings-live-search-input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.42);
}

.rankings-live-search-input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.rankings-filter-meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.42);
}

.rankings-filter-empty {
  display: none;
  margin-top: 1rem;
  border-radius: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 1.25rem 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.rankings-filter-empty.is-visible {
  display: block;
}

.rankings-filter-target.is-filtered-out {
  display: none !important;
}

/* —— Lista de profissionais (explorar) —— */
.pro-list-page {
  padding-bottom: var(--space-8, 2rem);
}

.pro-list-toolbar {
  border-color: rgba(255, 255, 255, 0.1);
}

.pro-list-category-select {
  min-height: 48px;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

.pro-list-category-select:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background-color: rgba(0, 0, 0, 0.42);
}

.pro-list-category-select:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.pro-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .pro-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
  }
}

.pro-list-card {
  display: block;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.pro-list-card:hover {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.pro-list-card:focus-visible {
  outline: none;
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.pro-list-card:hover .pro-list-card-arrow {
  color: rgba(187, 247, 208, 0.9);
  transform: translateX(2px);
}

.pro-list-card-arrow {
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .pro-list-card:hover .pro-list-card-arrow {
    transform: none;
  }
}

.pro-list-filter-target.is-filtered-out {
  display: none !important;
}

.pro-list-pagination {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pro-list-pagination-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
}

.pro-list-page-btn--nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

a.pro-list-page-btn--nav:hover {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #ecfdf5;
}

.pro-list-page-btn--nav.is-disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.pro-list-page-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.pro-list-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.45rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

a.pro-list-page-num:hover {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
  color: #ecfdf5;
}

.pro-list-page-num.is-current {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(22, 163, 74, 0.2);
  color: #ecfdf5;
  cursor: default;
}

.pro-list-page-summary {
  margin: 0;
  padding: 0 0.5rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

.pro-list-page-summary strong {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.88);
}

/* —— Publicar pedido (cliente) —— */
.request-create-page {
  padding-bottom: var(--space-8, 2rem);
}

.request-create-rail {
  position: sticky;
  top: 4.5rem;
  z-index: 24;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 16, 22, 0.97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.request-create-rail::-webkit-scrollbar {
  display: none;
}

.request-create-rail__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.request-create-rail__link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.78;
  color: rgba(134, 239, 172, 0.9);
}

.request-create-rail__link:hover svg,
.request-create-rail__link.is-current svg {
  opacity: 1;
}

.request-create-rail__link:hover {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(22, 163, 74, 0.12);
  color: #ecfdf5;
}

.request-create-rail__link.is-current {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(22, 163, 74, 0.16);
  color: #ecfdf5;
}

.request-create-rail__link:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

@media (max-width: 1279px) {
  .request-create-rail {
    top: 3.75rem;
  }
}

.request-create-hero {
  border-color: rgba(255, 255, 255, 0.1);
}

.request-create-shell {
  border-color: rgba(255, 255, 255, 0.1);
}

.request-create-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.request-create-section--last {
  border-bottom: none;
}

.request-create-section__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 1.25rem 0.85rem;
}

@media (min-width: 640px) {
  .request-create-section__head {
    padding: 1.5rem 2rem 1rem;
  }
}

.request-create-section__body {
  padding: 0 1.25rem 1.35rem;
}

@media (min-width: 640px) {
  .request-create-section__body {
    padding: 0 2rem 1.5rem;
  }
}

.request-create-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(22, 163, 74, 0.18);
  font-size: 0.8rem;
  font-weight: 900;
  color: #bbf7d0;
}

.request-create-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.request-create-page input[type="text"]:not(.category-search-input),
.request-create-page input[type="number"],
.request-create-page input[type="email"],
.request-create-page input[type="file"],
.request-create-page select,
.request-create-page textarea {
  width: 100%;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.94rem;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.request-create-page input:focus,
.request-create-page select:focus,
.request-create-page textarea:focus {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
  background: rgba(0, 0, 0, 0.4);
}

.request-create-page textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.55;
}

.request-create-page select {
  min-height: 52px;
  padding-right: 2.75rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.45)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

.request-create-page select option {
  background: #111827;
  color: white;
}

.request-create-page .category-picker {
  position: relative;
  z-index: 5;
}

.request-create-page .category-search-input {
  width: 100%;
  border-radius: 14px;
  padding: 0.85rem 2.75rem 0.85rem 2.65rem;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.94rem;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.request-create-page .category-search-input:focus {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
}

.request-create-page .category-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.request-create-page .category-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.request-create-page .category-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.request-create-page .category-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 30;
  margin-top: 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0c1016;
  overflow: hidden;
  max-height: 240px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.request-create-page .category-results {
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.request-create-page .category-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  text-align: left;
  padding: 0.8rem 1rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.request-create-page .category-option:last-child {
  border-bottom: 0;
}

.request-create-page .category-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.request-create-page .category-option.is-active {
  background: rgba(22, 163, 74, 0.12);
  box-shadow: inset 3px 0 0 rgba(34, 197, 94, 0.65);
}

.request-create-page .category-option small {
  color: rgba(167, 243, 208, 0.85);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.request-create-page .category-empty {
  padding: 1rem 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
}

.request-create-photo-empty {
  transition: background 0.2s ease;
}

.request-create-photo-empty:hover {
  background: rgba(255, 255, 255, 0.03);
}

.request-create-actions .ui-btn-block {
  width: 100%;
  justify-content: center;
}

.rankings-podium.is-filtered-empty {
  display: none !important;
}

.rankings-podium {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rankings-podium-slot--1 {
  order: 1;
}

.rankings-podium-slot--2 {
  order: 2;
}

.rankings-podium-slot--3 {
  order: 3;
}

@media (min-width: 1024px) {
  .rankings-podium {
    display: grid;
    grid-template-columns: 1fr 1.12fr 1fr;
    gap: 1.1rem;
    align-items: end;
  }

  .rankings-podium-slot--2 {
    order: 1;
  }

  .rankings-podium-slot--1 {
    order: 2;
    margin-bottom: 0.85rem;
  }

  .rankings-podium-slot--3 {
    order: 3;
  }
}

.rankings-podium-card {
  display: block;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  padding: 1.15rem 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.rankings-podium-card:hover {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.rankings-podium-card--1 {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(22, 163, 74, 0.12);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.rankings-podium-card--1:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(22, 163, 74, 0.16);
}

.rankings-podium-card--accent {
  border-color: rgba(251, 146, 60, 0.28);
  background: rgba(234, 88, 12, 0.08);
}

.rankings-podium-card--accent:hover {
  border-color: rgba(251, 146, 60, 0.42);
}

.rankings-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.rankings-row:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.rankings-rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

.rankings-rank-badge--1 {
  background: rgba(22, 163, 74, 0.22);
  border-color: rgba(34, 197, 94, 0.4);
  color: #bbf7d0;
}

.rankings-rank-badge--2 {
  border-color: rgba(255, 255, 255, 0.16);
}

.rankings-rank-badge--3 {
  border-color: rgba(251, 146, 60, 0.35);
  color: #fed7aa;
}

.hero-grid {
  background-image: none;
}

/* Home: hero imagem em ecrã inteiro + véus pretos (sem verde no fundo) */
.home-hero {
  position: relative;
  isolation: isolate;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 100vh;
  min-height: 100dvh;
}

/* Compensa o padding-top do <main> (py-6) para o hero encostar ao cabeçalho */
main.app-content .factory-home > .home-hero {
  margin-top: calc(-1 * var(--space-6));
}

.home-hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--hero-photo-fallback);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.home-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--hero-overlay);
  pointer-events: none;
}

.home-hero__wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: var(--hero-wash-dark);
  pointer-events: none;
}

.home-hero .home-hero__grid {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.28;
  pointer-events: none;
}

.home-hero .ui-container {
  position: relative;
  z-index: 4;
}

/* Seta no rodapé do hero — movimento muito subtil (sem anel de foco) */
@keyframes home-hero-scroll-nudge {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.88;
  }
  50% {
    transform: translateY(5px);
    opacity: 1;
  }
}

.home-hero__scroll-cue {
  position: absolute;
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  border-radius: 999px;
  transition:
    color 0.22s ease,
    opacity 0.22s ease;
}

.home-hero__scroll-cue:hover {
  color: rgba(187, 247, 208, 0.95);
}

/* Sem halo verde ao clicar / focar (acessível via rótulo + contraste do ícone) */
.home-hero__scroll-cue:focus,
.home-hero__scroll-cue:focus-visible,
.home-hero__scroll-cue:active {
  outline: none;
  box-shadow: none;
}

.home-hero__scroll-cue-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.9;
}

.home-hero__scroll-cue-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.25);
  animation: home-hero-scroll-nudge 2.4s ease-in-out infinite;
}

.home-hero__scroll-cue-icon {
  width: 22px;
  height: 22px;
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__scroll-cue-inner {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__photo {
    background-attachment: scroll;
  }
}

/* Home: redes abstratas (canvas) — só .factory-home; canvas sempre atrás do conteúdo */
.factory-home .tl-section-ambient {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.factory-home .tl-abstract-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.38;
}

.factory-home .tl-section-ambient > .ui-container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .factory-home .tl-abstract-canvas {
    opacity: 0.55;
  }
}

.reveal-up {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pulse-soft {
  animation: pulseSoft 2.4s ease-in-out infinite;
}

@keyframes pulseSoft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.22);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

.float-card {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
  will-change: transform;
}

.float-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.toast-stack {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border-radius: 18px;
  overflow: hidden;
  border: var(--border-subtle);
  background: var(--color-gray-900);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

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

.toast--success .toast-bar,
.toast--success .toast-dot {
  background: var(--color-green-600);
}

.toast--error .toast-bar,
.toast--error .toast-dot {
  background: var(--color-danger-500);
}

.toast--info .toast-bar,
.toast--info .toast-dot {
  background: rgba(255, 255, 255, 0.88);
}

.toast-bar {
  height: 3px;
  width: 100%;
}

.toast-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
}

.toast-dot {
  margin-top: 6px;
  height: 10px;
  width: 10px;
  border-radius: 999px;
}

.toast-title {
  font-size: 13px;
  font-weight: 900;
}

.toast-text {
  margin-top: 2px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.toast-close {
  margin-left: auto;
  height: 36px;
  width: 36px;
  min-height: 36px;
  min-width: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Top leve + bottom do Tailwind (py-6 no <main>); em ≤1024px main.app-content define padding completo */
.app-content {
  padding-top: 12px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.68);
  transition:
    color 0.16s ease,
    transform 0.16s ease;
}

.footer-link:hover {
  color: white;
  transform: translateX(2px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  flex-shrink: 0;
}

.desktop-nav {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  white-space: nowrap;
}

.profile-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bottom navigation — único bloco, sem duplicação */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: none;
  transform: translateY(0);
  opacity: 1;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
  padding: 0;
}

.bottom-nav.is-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  width: 100%;
  background: rgba(17, 24, 39, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 0 calc(4px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.22);
}

.bottom-nav-item {
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(255, 255, 255, 0.66);
  text-decoration: none;
  transition:
    color 0.18s ease,
    opacity 0.18s ease;
  border-radius: 12px;
}

.bottom-nav-item svg {
  width: 19px;
  height: 19px;
}

.bottom-nav-item span {
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bottom-nav-item:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
}

.bottom-nav-item.is-active {
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.push-switch {
  background: rgba(255, 255, 255, 0.1);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.push-switch:hover {
  background: rgba(255, 255, 255, 0.14);
}

.push-switch.is-on {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.push-switch-knob {
  transition:
    transform 0.22s ease,
    background 0.22s ease;
}

.push-switch.is-on .push-switch-knob {
  transform: translateX(22px);
  background: #22c55e;
}

@media (min-width: 640px) {
  .post-media {
    height: 280px;
  }
}

@media (min-width: 1024px) {
  .post-media {
    height: 320px;
  }
}

@media (max-width: 1279px) {
  .app-header .nav-link {
    padding: 0.58rem 0.78rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none !important;
  }

  .brand-text {
    display: none !important;
  }

  .tablet-hide {
    display: none !important;
  }

  .profile-name {
    display: none !important;
  }

  .app-header-inner {
    min-height: 54px;
  }

  .header-icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  /* Toasts acima da barra inferior (utilizadores autenticados) */
  body:has(.bottom-nav:not(.is-hidden)) .toast-stack {
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px) + 12px);
    flex-direction: column-reverse;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  .toast-close {
    min-height: 44px;
    min-width: 44px;
    height: 44px;
    width: 44px;
  }

  #profileMenu {
    width: 260px;
    right: 0;
  }

  #notifPanel {
    width: min(340px, calc(100vw - 24px));
    right: 0;
  }

  main.app-content {
    padding-top: 10px;
    padding-bottom: 90px;
  }

  .bottom-nav {
    display: block;
  }
}

@media (max-width: 767px) {
  .question-scroll {
    max-height: 420px;
  }

  .updates-scroll {
    max-height: 480px;
  }

  .post-media {
    height: 200px;
  }

  .app-header-inner {
    min-height: 52px;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .header-icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }

  #notifPanel {
    position: fixed !important;
    top: 76px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
  }

  #profileMenu {
    position: fixed !important;
    top: 76px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
  }

  #mobileDrawerPanel.app-drawer-panel--modern {
    width: min(22rem, calc(100vw - 1.25rem));
    max-width: none;
  }

  body:has(#bottomNav) #mobileDrawerPanel.app-drawer-panel--modern .drawer-nav-scroll {
    padding-bottom: max(5.5rem, calc(4.75rem + env(safe-area-inset-bottom)));
  }

  main.app-content {
    padding-bottom: 96px;
  }

  .bottom-nav-inner {
    padding: 3px 0 calc(3px + env(safe-area-inset-bottom));
  }

  .bottom-nav-item {
    min-height: 50px;
    gap: 2px;
  }

  .bottom-nav-item svg {
    width: 18px;
    height: 18px;
  }

  .bottom-nav-item span {
    font-size: 9.5px;
  }
}

@media (max-width: 420px) {
  .header-actions {
    gap: 0.35rem;
  }
}

/* ========== Fase 2 — Responsividade & sensação de app ========== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Áreas horizontais (ações / filtros) sem overflow na página */
.ui-scroll-x {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  padding-bottom: var(--space-1);
  margin-left: calc(-1 * var(--space-1));
  margin-right: calc(-1 * var(--space-1));
  padding-left: var(--space-1);
  padding-right: var(--space-1);
  scrollbar-width: none;
}

.ui-scroll-x::-webkit-scrollbar {
  display: none;
}

.ui-scroll-x > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .ui-scroll-x--wrap-sm {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    scroll-snap-type: none;
    overscroll-behavior-x: auto;
  }

  .ui-scroll-x--wrap-sm > * {
    flex-shrink: 1;
    scroll-snap-align: unset;
  }
}

/* Drawer lateral — alvos de toque e feedback */
.mobile-drawer-panel {
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition:
    background 0.18s ease,
    transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-drawer-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-drawer-link:active {
  transform: scale(0.98);
}

.mobile-drawer-link--primary {
  justify-content: center;
  min-height: 50px;
  font-weight: 800;
}

/* Colapsáveis (filtros / secções longas) */
.ui-details {
  border-radius: var(--radius-lg);
  border: var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}

.ui-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}

.ui-details > summary::-webkit-details-marker {
  display: none;
}

.ui-details[open] > summary .ui-details-chevron {
  transform: rotate(180deg);
}

.ui-details-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ui-details-body {
  padding: 0 var(--space-4) var(--space-4);
}

/* --- Landing (service landings) — alinhado ao tema principal, sem gradientes --- */
.landing-shell {
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
  overflow-y: visible;
}

.landing-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 18, 32, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.landing-header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
}

.landing-shell a {
  text-decoration: none;
}

.landing-shell .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.landing-shell .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.landing-shell .brand-title {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.03em;
}

.landing-shell .brand-subtitle {
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.landing-nav a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}

.landing-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.landing-shell .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 0.96rem;
  border: 1px solid transparent;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.landing-shell .btn:hover {
  transform: translateY(-1px);
}

.landing-shell .btn-primary {
  color: #041008;
  background: var(--green-strong);
  border-color: rgba(34, 197, 94, 0.45);
}

.landing-shell .btn-primary:hover {
  background: var(--green-hover);
}

.landing-shell .btn-soft {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.landing-shell .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.landing-shell .text-gradient,
.landing-shell .text-accent-highlight {
  color: #d1fae5;
}

.landing-shell .panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.landing-shell .footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  padding: 28px 24px;
}

.landing-shell .footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body.teialink-landing {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (max-width: 1024px) {
  .landing-nav {
    display: none;
  }

  .landing-header-inner {
    padding: 14px 16px;
  }

  .landing-shell .brand-subtitle {
    display: none;
  }
}

@media (max-width: 640px) {
  .landing-actions .btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.88rem;
  }

  .landing-shell .brand-title {
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .ui-container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .ui-btn-sm {
    --ui-btn-px: 11px;
    min-height: 38px;
    font-size: 0.84rem;
  }
}
