/* ── Tokens (paleta CuboTV: roxo Cubo Studio em fundo escuro) ──────────────
   Tema escuro: fundo preto em tudo, cards em cinza-chumbo, roxo como
   único acento (mesma marca da Cubo Studio). */
:root {
  --color-brand:       #000000;
  --color-brand-light: rgba(124,60,255,.14);
  --color-accent:      #7c3cff;

  --color-bg:          #0a0a0a;
  --color-fg:          #ffffff;

  --color-gray-50:  #161616;
  --color-gray-100: #1e1e1e;
  --color-gray-200: #2a2a2a;
  --color-gray-300: #3c3c3c;
  --color-gray-400: #6e6e6e;
  --color-gray-500: #9a9a9a;
  --color-gray-600: #b8b8b8;
  --color-gray-700: #d6d6d6;
  --color-gray-900: #ffffff;

  --color-red-50:  rgba(220,38,38,.12);
  --color-red-100: rgba(220,38,38,.2);
  --color-red-600: #ef4444;
  --color-red-700: #f87171;
  --color-red-800: #fca5a5;

  --color-green-100: rgba(34,197,94,.16);
  --color-green-800: #4ade80;

  --color-yellow-100: rgba(234,179,8,.16);
  --color-yellow-800: #facc15;

  --color-blue-100: rgba(59,130,246,.16);
  --color-blue-800: #60a5fa;

  --radius-xl:   0.625rem;
  --radius-2xl:  0.875rem;
  --radius-full: 9999px;

  --max-width: 28rem;
  --max-width-desktop: 84rem;

  --shadow-card:    0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-popover: 0 4px 12px rgba(0,0,0,0.4);
}

/* Tema claro (opcional, alternado via botão — ver app.js). Fica marcado
   com [data-theme="light"] no <html>; sem esse atributo, vale o :root
   escuro acima, que é o padrão do sistema. */
:root[data-theme="light"] {
  --color-brand-light: #f2e5e6;

  --color-bg: #f3f4f6;
  --color-fg: #111827;

  --color-gray-50:  #f9fafb;
  --color-gray-100: #ffffff;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-900: #111827;

  --color-red-50:  #fef2f2;
  --color-red-100: #fee2e2;
  --color-red-600: #dc2626;
  --color-red-700: #b91c1c;
  --color-red-800: #991b1b;

  --color-green-100: #dcfce7;
  --color-green-800: #166534;

  --color-yellow-100: #fef9c3;
  --color-yellow-800: #854d0e;

  --color-blue-100: #dbeafe;
  --color-blue-800: #1e40af;

  --shadow-card:    0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-popover: 0 4px 12px rgba(0,0,0,0.12);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
/* O atributo nativo [hidden] é CSS de user-agent — qualquer regra de autor
   com a mesma especificidade (ex.: .field { display: block }) o sobrescreve.
   Reforça aqui pra [hidden] sempre esconder, não importa a classe do elemento. */
[hidden] { display: none !important; }
html {
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}
body {
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}
img, video, iframe, svg { max-width: 100%; }
input, select, textarea { font-size: 1rem; font-family: inherit; width: 100%; max-width: 100%; }
button { font-size: 1rem; font-family: inherit; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; overflow-wrap: break-word; word-break: break-word; }
h1, h2, h3 { margin: 0; overflow-wrap: break-word; word-break: break-word; }

/* ── Shell ───────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; flex-direction: column; overflow-x: hidden; }
.app-main {
  margin: 0 auto;
  width: 100%;
  max-width: var(--max-width);
  min-width: 0;
  flex: 1;
  padding: 1rem;
  padding-bottom: 8rem;
  overflow-x: hidden;
}

/* ── Spacing helpers ─────────────────────────────────────── */
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }

/* ── Header ──────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--color-accent);
  background: var(--color-brand);
  color: #fff;
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  opacity: 0.85;
  text-decoration: none;
}

/* Bell/tema/config/olho no desktop: sidebar só tem navegação, esses
   ficam num único lugar (aqui) em vez de duplicados na sidebar. No
   mobile o mesmo grupo já mora no .app-header (.header-right). */
.content-topbar { display: none; }

/* ── Dropdown de avisos (sino) ───────────────────────────── */
/* position:fixed de propósito (não absolute) — .app-shell tem
   overflow-x:hidden pro layout mobile, que cortaria um dropdown
   posicionado relativo à sidebar. Coordenadas exatas vêm do JS
   (getBoundingClientRect do gatilho), não do CSS. */
/* inline-flex evita que o wrapper vire uma caixa de linha "inline"
   mais alta que o link/ícone lá dentro (métricas de line-height do
   contexto inline padrão) — sem isso o sino ficava alguns pixels
   desalinhado dos outros ícones do grupo (bell/tema/config). */
.avisos-trigger { position: relative; display: inline-flex; align-items: center; }
.avisos-dropdown {
  position: fixed;
  z-index: 220;
  width: 20rem;
  max-width: 88vw;
  max-height: 24rem;
  overflow-y: auto;
  background: var(--color-gray-100);
  border-radius: var(--radius-2xl);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding-bottom: 0.25rem;
}
.avisos-dropdown-title {
  padding: 0.875rem 1rem 0.625rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-gray-900);
}
.avisos-dropdown-item {
  display: block;
  padding: 0.625rem 1rem;
  text-decoration: none;
  border-top: 1px solid var(--color-gray-200);
}
.avisos-dropdown-item:hover { background: var(--color-gray-200); }
.avisos-dropdown-item-titulo { display: block; font-weight: 600; font-size: 0.875rem; color: var(--color-gray-900); }
.avisos-dropdown-item-sub { display: block; font-size: 0.75rem; color: var(--color-gray-500); margin-top: 0.125rem; }
.avisos-dropdown-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--color-gray-500);
  font-size: 0.875rem;
  border-top: 1px solid var(--color-gray-200);
}
.avisos-dropdown-footer {
  padding: 0.625rem 1rem 0.375rem;
  text-align: center;
  border-top: 1px solid var(--color-gray-200);
  margin-top: 0.25rem;
}
.avisos-dropdown-footer a { color: var(--color-accent); font-weight: 600; font-size: 0.8125rem; text-decoration: none; }
.header-icon-link:active { opacity: 0.6; }
button.header-icon-link {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.back-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 0 0.25rem 0 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}
.back-btn:active { opacity: 0.5; }
.logo {
  height: 32px;
  width: auto;
  border-radius: 0.25rem;
  object-fit: contain;
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}
.logout-btn {
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.15);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  color: #fff;
  cursor: pointer;
}
.logout-btn:active { background: rgba(255,255,255,0.25); }

/* ── Bottom nav ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  border-top: 1px solid var(--color-gray-200);
  background: var(--color-brand);
}
.nav-inner {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: var(--max-width);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-item {
  flex: 0 0 auto;
  min-width: 3.05rem;
  min-height: 6.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1.5rem 0.15rem;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--color-gray-500);
  white-space: nowrap;
}
.nav-item.active { color: var(--color-accent); }
.nav-item .icon { width: 1.3rem; height: 1.3rem; }
.nav-icon { display: inline-flex; position: relative; }
.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; vertical-align: middle; }
.icon-bell { transform: scale(1.15); }
.icon-sm { width: 1rem; height: 1rem; }

.nav-badge {
  position: absolute;
  top: -0.3rem;
  right: -0.55rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  border-radius: var(--radius-2xl);
  background: var(--color-gray-100);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}
.card-link { display: block; }

/* ── Status badge ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: var(--color-green-100);  color: var(--color-green-800); }
.badge-yellow { background: var(--color-yellow-100); color: var(--color-yellow-800); }
.badge-red    { background: var(--color-red-100);    color: var(--color-red-800); }
.badge-blue   { background: var(--color-blue-100);   color: var(--color-blue-800); }
.badge-gray   { background: var(--color-gray-200);    color: var(--color-gray-600); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-big {
  display: block;
  width: 100%;
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: pointer;
  font-weight: 600;
}
.btn-big:active { opacity: 0.8; }
.btn-big-primary  { background: var(--color-accent); color: #fff; }
.btn-big-secondary { background: var(--color-gray-100); color: var(--color-gray-900); border: 1px solid var(--color-gray-300); }
.btn-big-lg { padding: 1rem; font-size: 1.125rem; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-big-sm { padding: 0.75rem 0.5rem; font-size: 0.875rem; }

.btn-submit {
  width: 100%;
  border-radius: var(--radius-xl);
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn-submit:active   { opacity: 0.9; }
.btn-submit:disabled { opacity: 0.6; }
.btn-submit-secondary { background: transparent; color: var(--color-fg); border: 1px solid var(--color-gray-400); }

.btn-back {
  display: block;
  width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-300);
  background: var(--color-gray-100);
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-900);
  cursor: pointer;
}
.btn-back:active { opacity: 0.8; }

.btn-delete {
  width: 100%;
  border-radius: var(--radius-xl);
  background: var(--color-red-50);
  color: var(--color-red-600);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: none;
  cursor: pointer;
}
.btn-delete:active { background: var(--color-red-100); }

.btn-link {
  display: inline-block;
  border-radius: var(--radius-xl);
  background: var(--color-brand-light);
  color: var(--color-accent);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}
.btn-link-delete {
  background: none;
  border: none;
  color: var(--color-red-600);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0;
  cursor: pointer;
  text-decoration: underline;
}
.btn-link-edit {
  display: inline-block;
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0;
  margin-right: 0.75rem;
  text-decoration: underline;
}

/* ── Form fields ─────────────────────────────────────────── */
.field { display: block; }
.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gray-500);
  padding-top: 0.25rem;
}
.field-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
}
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-300);
  background: var(--color-gray-100);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--color-gray-900);
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus  { border-color: var(--color-accent); outline: none; }

/* ── Combobox (busca com autocomplete) ───────────────────── */
.combobox { position: relative; }
.combobox-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-popover);
  z-index: 50;
}
.combobox-option {
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.combobox-option:hover,
.combobox-option.active { background: var(--color-gray-200); }
.combobox-empty { padding: 0.65rem 1rem; color: var(--color-gray-500); font-size: 0.9rem; }
.combobox-option-novo { color: var(--color-accent); font-weight: 600; border-top: 1px solid var(--color-gray-300); }
.field-input[disabled] { background: var(--color-gray-50); color: var(--color-gray-500); cursor: not-allowed; }

/* ── Modal genérico (ex.: cadastro rápido de cliente) ────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-box {
  width: 100%;
  max-width: 26rem;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-box > * + * { margin-top: 1.125rem; }

/* ── Alternador de formato de placa (Mercosul/antiga) ────── */
.placa-mode-toggle { display: inline-flex; gap: 0.375rem; margin-bottom: 0.5rem; }
.placa-mode-btn {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-gray-300);
  background: var(--color-gray-100);
  color: var(--color-gray-500);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.placa-mode-btn.active { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-brand-light); }

/* ── Chips de "serviços mais usados" acima do checklist ────── */
.servico-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.servico-chip {
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-gray-300);
  background: var(--color-gray-100);
  color: var(--color-gray-500);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.servico-chip.selecionado { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-brand-light); }

/* ── Abas simples (ex.: Colaboradores / Usuários do sistema) ────── */
.tab-nav {
  display: flex;
  gap: 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
  overflow-x: auto;
}
.tab-link {
  padding: 0.625rem 0.125rem;
  border-radius: 0;
  background: none;
  color: var(--color-gray-500);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-link.active { background: none; color: var(--color-accent); border-bottom-color: var(--color-accent); }

/* ── Amostras de cor do veículo (clicáveis, em vez de só digitar) ── */
.cor-swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.cor-swatch {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-gray-300);
  cursor: pointer;
  padding: 0;
}
.cor-swatch.selecionado { border-color: var(--color-accent); box-shadow: 0 0 0 2px var(--color-brand-light); }

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-gray-700, #374151);
}
.field-checkbox input { width: 18px; height: 18px; }

/* ── Lista de serviços com checkbox + preço (agendamento) ─── */
.servico-checklist { display: flex; flex-direction: column; gap: 0.5rem; }
.servico-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xl);
  padding: 0.75rem 1rem;
}
/* ── Abas de página (ex.: Serviços/Planos) ──────────────────── */
.page-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--color-gray-50);
  border-radius: var(--radius-xl);
  padding: 0.25rem;
}
.page-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: calc(var(--radius-xl) - 0.25rem);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-gray-500);
}
.page-tab.active { background: var(--color-accent); color: #fff; }

.servico-check-item:has(input:checked) { border-color: var(--color-accent); background: var(--color-brand-light); }
.servico-check-item label { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; }
.servico-check-item input { width: 18px; height: 18px; flex-shrink: 0; }
.servico-check-preco { font-weight: 600; color: var(--color-gray-700); white-space: nowrap; }
.servico-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.125rem;
  padding-top: 0.5rem;
}

.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.foto-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-300);
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}
.foto-grid img:active { opacity: 0.75; }

/* ── Lightbox de foto (clique pra ampliar) ───────────────── */
.foto-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.foto-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-xl);
}
.foto-lightbox-fechar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ── Calendário mensal ───────────────────────────────────── */
.calendario-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendario-grid th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-gray-500);
  padding-bottom: 0.5rem;
  text-align: center;
}
.calendario-grid td { text-align: center; padding: 2px; }
.calendario-dia {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  min-height: 36px;
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-900);
}
.calendario-dia:hover { background: var(--color-gray-200); }
.calendario-dia-hoje { border: 2px solid var(--color-accent); font-weight: 700; }
.calendario-dia-bloqueado { background: var(--color-gray-200); color: var(--color-gray-400); }
.calendario-badge-bloqueado { background: var(--color-gray-500); font-size: 0.5rem; }
.calendario-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Blocos de horário (agenda do dia) ──────────────────── */
.agenda-bloco-ocupado { border-left: 4px solid var(--color-accent); }

/* ── Grade de horários clicáveis (entrada/entrega, sem digitar) ──── */
.agenda-hora-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr)); gap: 0.5rem; }
.agenda-hora-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-300);
  background: var(--color-gray-100);
  color: var(--color-gray-900);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: center;
}
.agenda-hora-count { font-size: 0.6875rem; font-weight: 500; color: var(--color-gray-500); line-height: 1; }
.agenda-hora-btn.selecionado .agenda-hora-count { color: var(--color-accent); }
.agenda-hora-btn.selecionado { border-color: var(--color-accent); background: var(--color-brand-light); color: var(--color-accent); }
.agenda-hora-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ── Listagem / linha de item ────────────────────────────── */
.item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.item-main { min-width: 0; overflow: hidden; }
.item-title { font-weight: 600; overflow-wrap: break-word; word-break: break-word; }
.item-sub  { font-size: 0.875rem; color: var(--color-gray-500); overflow-wrap: break-word; }
.item-detail { margin-top: 0.25rem; font-size: 0.875rem; color: var(--color-gray-600); overflow-wrap: break-word; }
.item-valor { white-space: nowrap; font-weight: 600; color: var(--color-gray-900); }

/* ── Alertas e erros ─────────────────────────────────────── */
.alert-banner {
  border-radius: var(--radius-xl);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.alert-banner.alert-red    { background: var(--color-red-100);    color: var(--color-red-800); }
.alert-banner.alert-yellow { background: var(--color-yellow-100); color: var(--color-yellow-800); }
.alert-banner.alert-green  { background: var(--color-green-100);  color: var(--color-green-800); }

.error-banner {
  border-radius: var(--radius-xl);
  background: var(--color-red-50);
  color: var(--color-red-700);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.dashed-empty {
  border: 2px dashed var(--color-accent);
  background: var(--color-brand-light);
  border-radius: var(--radius-xl);
  padding: 1rem;
  text-align: center;
}

/* ── Cards de total (dashboard) ──────────────────────────── */
.total-card {
  background: var(--color-brand);
  color: #fff;
}
.total-card.accent {
  background: var(--color-accent);
}
.total-card .total-label { font-size: 0.8125rem; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.04em; }
.total-card .total-valor { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; }

.totais-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

/* ── Resumo geral (dashboard rico) ───────────────────────── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.stat-card { border-radius: var(--radius-2xl); background: var(--color-gray-100); padding: 1rem; }
.stat-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; gap: 0.5rem; }
.stat-card-label { font-size: 0.8125rem; color: var(--color-gray-500); }
.stat-card-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 0.6rem; background: var(--color-brand-light); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
}
.stat-card-icon .icon { width: 1.1rem; height: 1.1rem; }
.stat-card-head-acoes { display: flex; align-items: center; gap: 0.375rem; }
.stat-card-olho {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0.25rem; cursor: pointer;
  color: var(--color-gray-500); border-radius: 999px;
}
.stat-card-olho:hover { color: var(--color-gray-700); background: var(--color-gray-200); }
.stat-card-olho .icon { width: 1.35rem; height: 1.35rem; }
.stat-card-valor { font-size: 1.5rem; font-weight: 700; }
.stat-card-delta { font-size: 0.8125rem; font-weight: 600; margin-top: 0.35rem; }
.stat-card-delta.up   { color: var(--color-green-800); }
.stat-card-delta.down { color: var(--color-red-600); }

.charts-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.chart-card { border-radius: var(--radius-2xl); background: var(--color-gray-100); padding: 1.1rem; }

.card-link:active .stat-card,
.card-link:active .chart-card { opacity: 0.85; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-axis {
  display: flex; justify-content: space-between; margin-top: 0.4rem;
  font-size: 0.6875rem; color: var(--color-gray-500);
}

.donut-wrap { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.donut-svg-wrap { position: relative; width: 160px; height: 160px; flex-shrink: 0; margin: 0 auto; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.donut-center-label { font-size: 0.75rem; color: var(--color-gray-500); }
.donut-center-valor { font-size: 1.5rem; font-weight: 700; }
.donut-legend { display: flex; flex-direction: column; gap: 0.6rem; flex: 1; min-width: 140px; }
.donut-legend-item { display: flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; }
.donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-texto { flex: 1; color: var(--color-gray-600); }
.donut-legend-valor { font-weight: 700; }

.agenda-resumo-row { display: flex; align-items: center; gap: 0.85rem; background: var(--color-gray-100); border-radius: var(--radius-xl); padding: 0.85rem; }
.agenda-resumo-hora { font-weight: 700; color: var(--color-accent); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.rank-list { display: flex; flex-direction: column; gap: 0.85rem; }
.rank-item-head { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.35rem; }
.rank-bar-track { height: 8px; border-radius: 4px; background: var(--color-gray-200); overflow: hidden; }
.rank-bar-fill { height: 100%; background: var(--color-accent); border-radius: 4px; }

@media (min-width: 700px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .charts-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Splash animado (app aberto pela tela de início) ─────── */
#pwa-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
#pwa-splash.escondendo { opacity: 0; pointer-events: none; }
#pwa-splash img {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  animation: pwaSplashLogo 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pwaSplashLogo {
  0%   { transform: scale(0.55); opacity: 0; }
  65%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Login ───────────────────────────────────────────────── */
.auth-body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-brand);
  padding: 1.5rem;
}
.auth-card  { width: 100%; max-width: 24rem; }
.auth-logo  { display: block; margin: 0 auto 0.25rem; max-width: 260px; border-radius: var(--radius-xl); }
.auth-logo-text { font-size: 1.75rem; font-weight: 800; color: #fff; }
.auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: 0.25rem;
}
.auth-subtitle { text-align: center; color: var(--color-gray-500); margin-bottom: 1rem; }
.auth-error    { color: var(--color-red-600); font-size: 0.875rem; font-weight: 500; }
.auth-card .field-label { color: rgba(255,255,255,0.85); }

/* ── Pesquisa NPS (avaliação pós-atendimento) ─────────────── */
.nps-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.nps-btn {
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-300);
  background: var(--color-gray-100);
  color: var(--color-gray-900);
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
}
.nps-btn:hover { border-color: var(--color-accent); }
.nps-btn.selecionado { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.nps-grid-erro .nps-btn { border-color: var(--color-red-600); }
.nps-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: rgba(255,255,255,0.5); margin-top: -0.5rem; }
@media (min-width: 420px) {
  .nps-grid { grid-template-columns: repeat(11, 1fr); }
}

/* ── Roleta de prêmios pós-avaliação ────────────────────────── */
#roleta { position: relative; display: inline-block; }
#roleta-canvas {
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-accent), 0 8px 24px rgba(0,0,0,0.35);
}
/* Ponteiro fixo no topo, apontando pra baixo — é aqui que a fatia sorteada
   precisa parar (ver cálculo de rotação em app.js). */
#roleta::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid var(--color-accent);
  z-index: 2;
}

.confete-container { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 999; }
.confete {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  animation: confete-cair 2.2s ease-in forwards;
}
@keyframes confete-cair {
  to { transform: translateY(110vh) rotate(var(--rot)); opacity: 0.2; }
}

.field-input-wrap { position: relative; }
.field-input-wrap .field-input { padding-right: 2.75rem; }
.field-toggle-senha {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--color-gray-500);
  display: flex;
}
.field-toggle-senha .icon { width: 1.25rem; height: 1.25rem; }
.field-toggle-senha:hover { color: var(--color-gray-700); }

.auth-helper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.auth-helper-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-xl);
  padding: 1rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-gray-900);
  line-height: 1.3;
  transition: border-color .15s ease, background .15s ease;
}
.auth-helper-card .icon { width: 1.375rem; height: 1.375rem; color: var(--color-accent); }
.auth-helper-card:hover { border-color: var(--color-accent); background: var(--color-gray-200); }

/* ── Utilitários ─────────────────────────────────────────── */
.text-xs  { font-size: 0.75rem; }
.text-sm  { font-size: 0.875rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }

.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-gray-700 { color: var(--color-gray-700); }
.text-accent   { color: var(--color-accent); }
.text-brand    { color: var(--color-brand); }

.flex             { display: flex; }
.items-center     { align-items: center; }
.items-start      { align-items: flex-start; }
.justify-between  { justify-content: space-between; }
.gap-2            { gap: 0.5rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.grid-2 > * { min-width: 0; }

input[type="date"],
input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 0.75rem 1rem;
  line-height: 1.5;
  box-sizing: border-box;
  min-height: 3rem;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }

/* ── Sidebar (desktop) ──────────────────────────────────── */
.sidebar { display: none; position: relative; transition: width 0.2s ease; }
.sidebar-collapse-toggle {
  position: absolute;
  top: 1.35rem;
  right: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-gray-200);
  border: 1px solid var(--color-gray-300);
  color: var(--color-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}
.sidebar-collapse-toggle:hover { background: var(--color-gray-300); }
.sidebar-collapse-toggle .icon { width: 14px; height: 14px; transition: transform 0.2s ease; }
html.sidebar-recolhida .sidebar-collapse-toggle .icon { transform: rotate(180deg); }
.sidebar-logo { width: 100%; max-width: 190px; margin: 0 auto 1.5rem; display: block; border-radius: var(--radius-xl); transition: opacity 0.15s ease; }
.sidebar-logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin: 0 0 2rem;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-xl);
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  font-size: 0.9375rem;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-link.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-left-color: var(--color-accent);
}
.sidebar-user {
  margin-top: auto;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-logout-form { margin-top: 0; }
.sidebar-logout-btn {
  width: 100%;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.1);
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.sidebar-logout-btn:active { background: rgba(255,255,255,0.2); }

/* ── Desktop / telas largas ──────────────────────────────── */
@media (min-width: 768px) {
  .app-shell {
    flex-direction: row;
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    width: 300px;
    flex-shrink: 0;
    background: var(--color-brand);
    border-right: 4px solid var(--color-accent);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }
  html.sidebar-recolhida .sidebar { width: 84px; padding-left: 0.5rem; padding-right: 0.5rem; }
  html.sidebar-recolhida .sidebar-logo,
  html.sidebar-recolhida .sidebar-link-label,
  html.sidebar-recolhida .sidebar-user-name { display: none; }
  html.sidebar-recolhida .sidebar-nav { margin-top: 2.5rem; }
  html.sidebar-recolhida .sidebar-link {
    justify-content: center;
    padding: 0.85rem 0;
    gap: 0;
  }
  html.sidebar-recolhida .sidebar-link .nav-icon .icon { width: 1.6rem; height: 1.6rem; }
  html.sidebar-recolhida .sidebar-user { padding-left: 0; padding-right: 0; }
  html.sidebar-recolhida .sidebar-user-link,
  html.sidebar-recolhida .sidebar-logout-btn { justify-content: center; }
  html.sidebar-recolhida .sidebar-user-link .icon,
  html.sidebar-recolhida .sidebar-logout-btn .icon { width: 1.2rem; height: 1.2rem; }
  .app-header,
  .bottom-nav {
    display: none;
  }
  .content-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.25rem;
    max-width: var(--max-width-desktop);
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
  }
  .app-content {
    flex: 1;
    min-width: 0;
  }
  .app-main {
    max-width: var(--max-width-desktop);
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 2rem;
  }
}

@media (min-width: 900px) {
  .list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .list-grid > * {
    margin-top: 0;
  }
}

.btn-icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-gray-500);
  border-radius: 999px;
}
.btn-icon-only:hover { color: var(--color-gray-700); background: var(--color-gray-100); }
.btn-icon-only .icon { width: 1.25rem; height: 1.25rem; display: block; }

/* Ocultar valores (painel): esconde só o texto do valor, sem mexer no layout ao redor. */
.valores-ocultos .valor-sigiloso {
  filter: blur(6px);
  user-select: none;
}

/* ── Banner "ativar notificações" ────────────────────────── */
.push-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  max-width: 26rem;
  margin: 0 auto;
  background: var(--color-gray-100);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 1rem;
}
.push-banner-texto {
  font-size: 0.875rem;
  color: var(--color-gray-700);
  margin: 0 0 0.75rem;
}
.push-banner-acoes {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.push-banner-acoes .btn-big {
  display: inline-block;
  width: auto;
  flex: 0 0 auto;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}
.push-banner-dispensar {
  background: none;
  border: none;
  color: var(--color-gray-500);
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.5rem;
}
@media (min-width: 900px) {
  .push-banner { bottom: 1.5rem; }
}

/* ── Suporte flutuante (WhatsApp) ────────────────────────── */
.suporte-flutuante {
  position: fixed;
  left: 1rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 130;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.suporte-flutuante:hover { filter: brightness(1.1); transform: translateY(-2px); }
.suporte-flutuante .icon { width: 1.5rem; height: 1.5rem; }
.suporte-flutuante { border: none; cursor: pointer; }
@media (min-width: 768px) {
  /* Sidebar (300px, ou 84px recolhida) mora nesse canto — o botão
     precisa ficar fora dela, senão cobre o "Sair" da sidebar. */
  .suporte-flutuante { bottom: 1.5rem; left: calc(300px + 1.5rem); }
  html.sidebar-recolhida .suporte-flutuante { left: calc(84px + 1.5rem); }
}

/* ── Atalho flutuante (menu de criação rápida) ───────────── */
/* Espelha .suporte-flutuante, mas no canto direito — não precisa
   desviar da sidebar (ela mora só do lado esquerdo). */
.atalho-agendamento {
  position: fixed;
  right: 1rem;
  bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 130;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.atalho-agendamento:hover { filter: brightness(1.1); transform: translateY(-2px); }
.atalho-agendamento .icon { width: 1.75rem; height: 1.75rem; }
@media (min-width: 768px) {
  .atalho-agendamento { bottom: 1.5rem; right: 1.5rem; }
}

/* Menu 2x2 que abre ao clicar no atalho de criação rápida — mesmo
   visual do .suporte-menu, só espelhado pro lado direito. */
.atalho-menu {
  position: fixed;
  right: 1rem;
  bottom: calc(9.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 131;
  width: 17rem;
  max-width: calc(100vw - 2rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: var(--color-gray-100);
  border-radius: var(--radius-2xl);
  padding: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
@media (min-width: 768px) {
  .atalho-menu { bottom: 5.5rem; right: 1.5rem; }
}

/* Menu 2x2 que abre ao clicar na bolinha de suporte */
.suporte-menu {
  position: fixed;
  left: 1rem;
  bottom: calc(9.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 131;
  width: 17rem;
  max-width: calc(100vw - 2rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: var(--color-gray-100);
  border-radius: var(--radius-2xl);
  padding: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.suporte-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: var(--color-gray-200);
  border: none;
  border-radius: var(--radius-xl);
  color: var(--color-gray-700);
  text-decoration: none;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.suporte-menu-item:hover { background: var(--color-gray-300); }
.suporte-menu-item .icon { width: 1.5rem; height: 1.5rem; }
.suporte-menu-item-destaque,
.suporte-menu-item-destaque .icon { color: var(--color-accent); }
@media (min-width: 768px) {
  .suporte-menu { bottom: 5.5rem; left: calc(300px + 1.5rem); }
  html.sidebar-recolhida .suporte-menu { left: calc(84px + 1.5rem); }
}

/* Modais do menu de suporte (mensagem + central de ajuda) */
.modal-box .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--color-gray-500);
  cursor: pointer;
  padding: 0.25rem;
}
.modal-box .modal-close .icon { width: 1.25rem; height: 1.25rem; }
.modal-box { position: relative; }
.modal-title { font-size: 1.125rem; font-weight: 700; margin: 0; padding-right: 2rem; }
.modal-subtitle { color: var(--color-gray-500); font-size: 0.875rem; margin: 0.25rem 0 0; }
.modal-feedback { font-size: 0.8125rem; margin: 0; }
.modal-feedback-erro { color: var(--color-red-600); }
.modal-feedback-sucesso { color: var(--color-green-800); }
.modal-box-lg { max-width: 32rem; }

.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }
.faq-item {
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: 0.875rem 1rem;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--color-gray-500); font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { color: var(--color-gray-500); font-size: 0.875rem; margin: 0.625rem 0 0; line-height: 1.5; }

/* ── Tutorial "Começando no LavaíApp" ─────────────────────── */
.tutorial-imagem {
  display: block;
  width: 100%;
  max-width: 32rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-200);
  margin-bottom: 0.875rem;
}
.tutorial-passos { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.tutorial-passos li { font-size: 0.875rem; color: var(--color-gray-700); line-height: 1.55; }

/* ── Grid de mídias (biblioteca de vídeo/imagem) ────── */
.midia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}
.midia-card { position: relative; padding: .5rem; }
.midia-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-xl);
  background: var(--color-gray-100);
  display: block;
}
.midia-thumb-vazia {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-400);
}
.midia-thumb-vazia .icon { width: 2rem; height: 2rem; }
.midia-badge-tipo {
  position: absolute;
  top: .75rem;
  left: .75rem;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
.midia-badge-tipo .icon { width: .875rem; height: .875rem; }

/* ── Item de playlist (arrastar-e-soltar) ────── */
.playlist-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem .75rem;
  border-radius: var(--radius-xl);
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  margin-bottom: .5rem;
  cursor: grab;
}
.playlist-item.arrastando { opacity: .4; }
.playlist-item-handle { color: var(--color-gray-400); display: flex; flex-shrink: 0; }
.playlist-item-handle .icon { width: 1.1rem; height: 1.1rem; }
.playlist-item-tipo-icon { color: var(--color-accent); display: flex; flex-shrink: 0; }
.playlist-item-tipo-icon .icon { width: 1.1rem; height: 1.1rem; }
.playlist-item-titulo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9375rem; }
.playlist-item-duracao { color: var(--color-gray-500); font-size: .8125rem; flex-shrink: 0; }
.playlist-item form { display: flex; flex-shrink: 0; }
