/* ============================================================
   WEVOLUX — Briefing em etapas e área administrativa
   Usa os tokens definidos em styles.css
   ============================================================ */

/* ============================================================
   CASCA DAS PÁGINAS
   ============================================================ */

.app-page {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 56px) 0 96px;
  background: radial-gradient(120% 70% at 50% 0%, #FFFFFF 0%, var(--cream) 48%, #EDF3FF 100%);
  overflow: hidden;
}
.app-page > .container { position: relative; z-index: 2; }

.page-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.page-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 14px; }
.page-head p { color: var(--ink-soft); font-size: clamp(0.98rem, 1.1vw, 1.08rem); line-height: 1.6; }

/* ============================================================
   STEPPER
   ============================================================ */

.stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto 40px;
  padding: 0 6px;
}
.stepper__track {
  position: absolute;
  top: 17px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}
.stepper__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  transition: width 620ms var(--ease);
}
.stepper__item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  flex: 1;
  background: none;
  cursor: default;
}
.stepper__item[data-clickable="1"] { cursor: pointer; }
.stepper__dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  border: 2px solid var(--line);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--ink-faint);
  transition: all 420ms var(--ease);
}
.stepper__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: -0.01em;
  transition: color 320ms var(--ease);
  max-width: 92px;
  line-height: 1.3;
}
.stepper__item.is-active .stepper__dot {
  border-color: var(--blue);
  color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(18, 91, 255, 0.12);
  transform: scale(1.06);
}
.stepper__item.is-active .stepper__label { color: var(--ink); }
.stepper__item.is-done .stepper__dot {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.stepper__item.is-done .stepper__label { color: var(--ink-soft); }
@media (max-width: 720px) {
  .stepper__label { display: none; }
  .stepper__track { top: 17px; }
}

/* ============================================================
   CARTÃO DO FORMULÁRIO
   ============================================================ */

.form-card {
  max-width: 720px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.form-card__body { padding: 40px; }
@media (max-width: 640px) { .form-card__body { padding: 26px 22px; } }

.step-panel { display: none; }
.step-panel.is-active { display: block; animation: step-in 520ms var(--ease); }
@keyframes step-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.step-panel__head { margin-bottom: 28px; }
.step-panel__head h2 { font-size: 22px; letter-spacing: -0.03em; margin-bottom: 7px; }
.step-panel__head p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }

/* ============================================================
   CAMPOS
   ============================================================ */

.field-grid { display: grid; gap: 20px; }
.field-grid--2 { grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-grid--2 { grid-template-columns: 1fr 1fr; } }
.field-full { grid-column: 1 / -1; }
/* item de grid/flex não encolhe abaixo do conteúdo por padrão: sem isto um
   nome de arquivo comprido e sem espaços estica a coluna e estoura o cartão */
.field-grid > * { min-width: 0; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field .opt {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  background: var(--cream);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.field .hint { font-size: 12.5px; color: var(--ink-faint); line-height: 1.45; margin-top: -2px; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 15px;
  width: 100%;
  transition: border-color 260ms var(--ease), box-shadow 260ms var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.55; }
.field select {
  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='%237189AC' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}
.field input::placeholder,
.field textarea::placeholder { color: #A9BCD6; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18, 91, 255, 0.10);
}
.field .err { font-size: 12.5px; color: var(--error); display: none; align-items: center; gap: 5px; }
.field.has-error input,
.field.has-error textarea,
.field.has-error select { border-color: var(--error); }
.field.has-error .err { display: flex; }

.char-count { font-size: 11.5px; color: var(--ink-faint); text-align: right; margin-top: -2px; }

/* Cartões de escolha (radio bonito) */
.choice-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  cursor: pointer;
  transition: all 260ms var(--ease);
}
.choice:hover { border-color: var(--blue-light); transform: translateY(-2px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__mark {
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: all 260ms var(--ease);
}
.choice__mark::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 260ms var(--ease);
}
.choice__text strong { display: block; font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.choice__text span { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; line-height: 1.4; }
.choice input:checked ~ .choice__mark { border-color: var(--blue); background: var(--blue); }
.choice input:checked ~ .choice__mark::after { transform: scale(1); }
.choice:has(input:checked) {
  border-color: var(--blue);
  background: rgba(18, 91, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(18, 91, 255, 0.08);
}
.choice input:focus-visible ~ .choice__mark { box-shadow: 0 0 0 4px rgba(18, 91, 255, 0.16); }

/* Seletor de cores */
.color-row { display: flex; flex-wrap: wrap; gap: 10px; }
.color-chip {
  position: relative;
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
  padding: 0;
  background: var(--white);
}
.color-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.color-chip input[type="color"] {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
}
.color-chip__remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: rgba(7, 26, 51, 0.6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  z-index: 2;
}
.color-add {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--line);
  background: var(--cream);
  color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  transition: all 240ms var(--ease);
}
.color-add:hover { border-color: var(--blue); color: var(--blue); background: rgba(18,91,255,0.05); }
.color-values { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.color-values code {
  font-size: 11.5px;
  font-family: ui-monospace, monospace;
  color: var(--ink-soft);
  background: var(--cream);
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

/* Upload */
.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 30px 22px;
  text-align: center;
  cursor: pointer;
  background: var(--cream-2);
  transition: all 280ms var(--ease);
  display: block;
}
.dropzone:hover, .dropzone.is-over {
  border-color: var(--blue);
  background: rgba(18, 91, 255, 0.04);
}
.dropzone input { display: none; }
.dropzone__icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(18, 91, 255, 0.09);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 13px;
  transition: transform 280ms var(--ease);
}
.dropzone:hover .dropzone__icon { transform: translateY(-3px) scale(1.04); }
.dropzone__title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.dropzone__title b { color: var(--blue); }
.dropzone__sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; }

.file-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; min-width: 0; }
.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
}
.file-row__icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: rgba(18, 91, 255, 0.08); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.file-row__meta { flex: 1; min-width: 0; }
.file-row__meta strong {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-row__meta span { font-size: 11.5px; color: var(--ink-faint); }
.file-row__del {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  transition: all 240ms var(--ease);
}
.file-row__del:hover { background: rgba(240, 68, 56, 0.09); color: var(--error); }

/* Revisão */
.review-group { margin-bottom: 22px; }
.review-group__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 11px;
}
.review-group__title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.review-list { display: grid; gap: 9px; }
.review-item {
  display: grid; grid-template-columns: 1fr; gap: 2px;
  padding: 11px 14px;
  background: var(--cream-2);
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
}
@media (min-width: 560px) { .review-item { grid-template-columns: 180px 1fr; gap: 14px; align-items: baseline; } }
.review-item > * { min-width: 0; }
.review-item dt { font-size: 12px; font-weight: 600; color: var(--ink-faint); }
.review-item dd { font-size: 14px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.review-item dd.empty { color: var(--ink-faint); font-style: italic; }

.consent {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 16px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  margin-top: 18px;
  cursor: pointer;
}
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent__box {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: all 240ms var(--ease);
  margin-top: 1px;
}
.consent__box svg { opacity: 0; transform: scale(0.5); transition: all 240ms var(--ease); }
.consent input:checked ~ .consent__box { background: var(--blue); border-color: var(--blue); }
.consent input:checked ~ .consent__box svg { opacity: 1; transform: scale(1); }
.consent p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* Navegação do formulário */
.form-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 22px 40px;
  border-top: 1px solid var(--line-soft);
  background: rgba(250, 252, 255, 0.7);
}
@media (max-width: 640px) { .form-nav { padding: 18px 22px; } }
.form-nav__spacer { flex: 1; }
.btn-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  padding: 10px 4px;
  transition: color 240ms var(--ease);
}
.btn-back:hover { color: var(--blue); }
.btn-back:disabled { opacity: 0.35; cursor: not-allowed; }

.autosave {
  font-size: 12px; color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: 6px;
  opacity: 0; transition: opacity 400ms var(--ease);
}
.autosave.is-on { opacity: 1; }

/* Sucesso */
.success {
  text-align: center;
  padding: 26px 0 10px;
}
.success__icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(18, 183, 106, 0.1);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  position: relative;
}
.success__icon::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--success);
  /* keyframe proprio: o pulse-ring de styles.css escala 5.4x, feito para um
     ponto pequeno, e aqui invadia o titulo. */
  animation: success-ring 2.6s var(--ease-io) infinite;
}
@keyframes success-ring {
  0%   { transform: scale(1);    opacity: 0.85; }
  70%  { transform: scale(1.42); opacity: 0; }
  100% { transform: scale(1.42); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .success__icon::before { animation: none; opacity: 0.85; }
}
.success h2 { font-size: 24px; margin-bottom: 12px; }
.success p { color: var(--ink-soft); font-size: 15px; max-width: 440px; margin: 0 auto 8px; line-height: 1.6; }
.success__code {
  display: inline-block; margin-top: 18px;
  font-family: ui-monospace, monospace; font-size: 13px;
  background: var(--cream); color: var(--ink-soft);
  padding: 8px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-soft);
}

/* ============================================================
   LOGIN
   ============================================================ */

.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
  background: var(--grad-dark);
}
.login-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 400px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--r-xl);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.34);
  padding: 40px 34px;
}
.login-card__logo { height: 30px; width: auto; margin: 0 auto 26px; display: block; }
.login-card h1 { font-size: 21px; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--ink-faint); font-size: 13.5px; margin-bottom: 28px; }
.login-card .field { margin-bottom: 16px; }
.login-msg {
  font-size: 13px; margin-top: 14px; text-align: center;
  padding: 10px 12px; border-radius: var(--r-md); display: none;
}
.login-msg.is-error { display: block; color: var(--error); background: rgba(240, 68, 56, 0.08); }
.login-msg.is-ok { display: block; color: var(--success); background: rgba(18, 183, 106, 0.08); }
.login-foot { text-align: center; margin-top: 18px; font-size: 13px; }
.login-foot a { color: var(--blue); font-weight: 600; }

/* ============================================================
   PAINEL ADMIN
   ============================================================ */

.admin { min-height: 100vh; background: var(--cream); }

.admin-bar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
}
.admin-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-bar__logo { height: 26px; width: auto; }
.admin-bar__actions { display: flex; align-items: center; gap: 10px; }
.admin-user { font-size: 13px; color: var(--ink-faint); display: none; }
@media (min-width: 720px) { .admin-user { display: block; } }

.admin-main { padding: 34px 0 90px; }

.admin-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 18px; margin-bottom: 26px;
}
.admin-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 5px; }
.admin-head p { font-size: 14px; color: var(--ink-soft); }

.admin-tools {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 22px;
}
/* com filtros + mês + botão na mesma barra, 220px espremia o placeholder;
   um mínimo maior faz a barra quebrar em vez de cortar o texto */
.search-box { position: relative; flex: 1 1 300px; min-width: 280px; }
.search-box svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint); pointer-events: none;
}
.search-box input {
  width: 100%;
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 11px 16px 11px 40px;
  transition: border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}
.search-box input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18, 91, 255, 0.10);
}

.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter {
  font-size: 13px; font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  background: var(--white);
  transition: all 240ms var(--ease);
  display: inline-flex; align-items: center; gap: 7px;
}
.filter:hover { border-color: var(--blue-light); color: var(--ink); }
.filter.is-active { border-color: var(--blue); color: var(--blue); background: rgba(18, 91, 255, 0.06); }
.filter b {
  font-size: 11px; font-weight: 700;
  background: var(--cream); color: var(--ink-faint);
  padding: 1px 7px; border-radius: var(--r-pill);
}
.filter.is-active b { background: var(--blue); color: #fff; }

/* Resumo */
.admin-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 26px; }
@media (min-width: 760px) { .admin-stats { grid-template-columns: repeat(4, 1fr); } }
.admin-stat {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.admin-stat span { display: block; font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.admin-stat strong {
  display: block; margin-top: 5px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 26px; letter-spacing: -0.03em; color: var(--ink);
}

/* Lista */
.sub-list { display: flex; flex-direction: column; gap: 12px; }

.sub-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.sub-card:hover { border-color: var(--line); box-shadow: var(--shadow-sm); }
.sub-card.is-open { border-color: rgba(18, 91, 255, 0.3); box-shadow: var(--shadow-md); }

.sub-card__head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.sub-card__avatar {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
}
.sub-card__main { flex: 1; min-width: 0; }
.sub-card__main strong {
  display: block; font-size: 15px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.015em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sub-card__main span { font-size: 12.5px; color: var(--ink-faint); }
.sub-card__side { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sub-card__chev { color: var(--ink-faint); transition: transform 320ms var(--ease); }
.sub-card.is-open .sub-card__chev { transform: rotate(180deg); }

.tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.tag--novo { background: rgba(46, 144, 250, 0.13); color: #1668c4; }
.tag--em_andamento { background: rgba(247, 144, 9, 0.15); color: #B54708; }
.tag--concluido { background: rgba(18, 183, 106, 0.13); color: #067647; }

.sub-card__body { display: none; border-top: 1px solid var(--line-soft); }
.sub-card.is-open .sub-card__body { display: block; animation: step-in 380ms var(--ease); }
.sub-card__inner { padding: 22px 20px; }

.detail-section + .detail-section { margin-top: 22px; }
.detail-section__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 12px;
}
.detail-section__title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line-soft), transparent);
}
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 660px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail { }
.detail dt { font-size: 11.5px; font-weight: 600; color: var(--ink-faint); margin-bottom: 3px; }
.detail dd { font-size: 14px; color: var(--ink); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.detail dd.empty { color: var(--ink-faint); font-style: italic; }
.detail--full { grid-column: 1 / -1; }
/* pre-wrap preserva as quebras que o cliente digitou, mas nos dd que contêm
   markup ele transformava a indentação do HTML em linhas vazias. */
.detail dd:has(.swatches), .detail dd:has(.att-list) { white-space: normal; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 6px;
  background: var(--cream-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  font-size: 12px; font-family: ui-monospace, monospace; color: var(--ink-soft);
}
.swatch i { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,0.08); display: block; }

.att-list { display: flex; flex-wrap: wrap; gap: 8px; }
.att {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: rgba(18, 91, 255, 0.06);
  color: var(--blue);
  border-radius: var(--r-md);
  font-size: 13px; font-weight: 600;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: all 240ms var(--ease);
}
.att:hover { background: var(--blue); color: #fff; }

/* ============================================================
   ABAS DO PAINEL (briefings x solicitações)
   ============================================================ */
.admin-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.admin-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.admin-tab b {
  font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--cream); color: var(--ink-soft);
}
.admin-tab.is-active b { background: rgba(18,91,255,0.12); color: var(--blue); }

/* .btn tem display próprio, que venceria o [hidden] do UA */
.admin-tools [hidden] { display: none !important; }

/* seletor de mês e rodapé dos modais de cadastro */
.mes-input {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 9px 14px; cursor: pointer;
}
.mes-input:focus { outline: none; border-color: var(--blue); }

.modal__foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.dropzone--sm { padding: 18px 16px; }
.dropzone--sm .dropzone__title { font-size: 13.5px; }

/* linha de cliente / lançamento */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money--in { color: #067647; font-weight: 700; }
.money--out { color: #B42318; font-weight: 700; }

.fin-list { display: flex; flex-direction: column; gap: 8px; }
.fin-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.fin-row:hover { border-color: var(--line); box-shadow: var(--shadow-xs); }
.fin-row__mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fin-row__mark--in { background: rgba(6,118,71,0.10); color: #067647; }
.fin-row__mark--out { background: rgba(180,35,24,0.09); color: #B42318; }
.fin-row__main { flex: 1; min-width: 0; }
.fin-row__main strong {
  display: block; font-size: 14px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fin-row__main span { font-size: 12px; color: var(--ink-faint); }
.fin-row__side { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
@media (max-width: 620px) {
  .fin-row { flex-wrap: wrap; }
  .fin-row__side { width: 100%; justify-content: space-between; padding-left: 48px; }
}

.tag--pago { background: rgba(6,118,71,0.11); color: #067647; }
.tag--pendente { background: rgba(245,158,11,0.16); color: #B45309; }
.tag--atrasado { background: rgba(220,38,38,0.12); color: #B42318; }
.tag--ativo { background: rgba(6,118,71,0.11); color: #067647; }
.tag--pausado { background: rgba(245,158,11,0.16); color: #B45309; }
.tag--encerrado { background: rgba(100,116,139,0.13); color: #475569; }

.mini-btn {
  background: transparent; border: 1px solid var(--line); cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  padding: 6px 12px; border-radius: var(--r-pill);
  transition: all 200ms var(--ease);
}
.mini-btn:hover { border-color: var(--blue); color: var(--blue); }
.mini-btn--danger:hover { border-color: #B42318; color: #B42318; }

/* histórico dentro do card do cliente */
.hist-vazio { font-size: 13px; color: var(--ink-faint); font-style: italic; }

/* urgência da solicitação */
.pri {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.pri--baixa   { background: rgba(100,116,139,0.12); color: #475569; }
.pri--media   { background: rgba(18,91,255,0.10);   color: var(--blue-deep); }
.pri--alta    { background: rgba(245,158,11,0.16);  color: #B45309; }
.pri--urgente { background: rgba(220,38,38,0.12);   color: #B42318; }

/* ============================================================
   ESCOLHA DO CAMINHO (briefing novo x solicitação de cliente)
   ============================================================ */
/* .stepper e .form-card têm display próprio, que venceria o [hidden] */
.stepper[hidden], .form-card[hidden], .mode-grid[hidden],
.mode-switch[hidden] { display: none !important; }

.mode-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
  max-width: 860px; margin: 0 auto;
}
@media (min-width: 720px) { .mode-grid { grid-template-columns: 1fr 1fr; } }

.mode-card {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 10px; text-align: left;
  padding: 28px 26px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit; color: inherit;
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease), border-color 320ms var(--ease);
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
}
.mode-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.mode-card__icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
  margin-bottom: 4px;
}
.mode-card__icon--alt { background: var(--grad-dark); }

.mode-card strong {
  font-family: var(--font-display);
  font-size: 18px; letter-spacing: -0.02em; color: var(--ink);
}
.mode-card__desc { font-size: 14px; line-height: 1.55; color: var(--ink-soft); }

.mode-card__list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.mode-card__list li {
  position: relative; padding-left: 20px;
  font-size: 13px; color: var(--ink-faint);
}
.mode-card__list li::before {
  content: ""; position: absolute; left: 4px; top: 7px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--blue-light);
}

.mode-card__cta {
  margin-top: auto; padding-top: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--blue);
}
.mode-card__cta svg { transition: transform 300ms var(--ease); }
.mode-card:hover .mode-card__cta svg { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .mode-card, .mode-card__cta svg { transition: none; }
  .mode-card:hover { transform: none; }
}

/* link para trocar de caminho, no topo do formulário */
.mode-switch {
  display: flex; justify-content: center; margin-bottom: 18px;
}
.mode-switch button {
  background: transparent; border: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-faint);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  transition: all 220ms var(--ease);
}
.mode-switch button:hover { background: var(--cream); color: var(--ink); }

/* ============================================================
   MODAL DE EQUIPE
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(7, 26, 51, 0.45);
  backdrop-filter: blur(3px);
  animation: modal-fade 240ms var(--ease);
}
.modal__card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(720px, 88vh);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 32px 30px 26px;
  animation: modal-in 320ms var(--ease);
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal__backdrop, .modal__card { animation: none; }
}
.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); background: transparent; border: 0; cursor: pointer;
  transition: all 200ms var(--ease);
}
.modal__close:hover { background: var(--cream); color: var(--ink); }
.modal__card h2 { font-size: 21px; letter-spacing: -0.02em; }
.modal__sub { color: var(--ink-soft); font-size: 14px; margin: 4px 0 22px; }

.equipe-form__row { display: flex; gap: 10px; align-items: stretch; }
.equipe-form__row input { flex: 1; min-width: 0; }
.equipe-form__row .btn { flex-shrink: 0; }
.equipe-msg {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--r-md);
  font-size: 13.5px; line-height: 1.5;
}
.equipe-msg--ok { background: rgba(18, 183, 106, 0.1); color: #0B7A47; }
.equipe-msg--erro { background: rgba(220, 38, 38, 0.08); color: #B42318; }

.equipe-lista { margin-top: 26px; border-top: 1px solid var(--line-soft); padding-top: 20px; }
.equipe-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
}
.equipe-item + .equipe-item { border-top: 1px solid var(--line-soft); }
.equipe-item__av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
  font-size: 13px; font-weight: 700;
}
.equipe-item__main { flex: 1; min-width: 0; }
.equipe-item__main strong {
  display: block; font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.equipe-item__main span { font-size: 12px; color: var(--ink-faint); }
.equipe-item__rm {
  background: transparent; border: 0; cursor: pointer;
  color: var(--ink-faint); font-size: 12.5px; font-weight: 600;
  padding: 6px 10px; border-radius: var(--r-sm);
  transition: all 200ms var(--ease);
}
.equipe-item__rm:hover { background: rgba(220, 38, 38, 0.08); color: #B42318; }
.pill-aviso {
  display: inline-block; margin-left: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r-pill);
  background: rgba(245, 158, 11, 0.14); color: #B45309;
}

.sub-card__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.status-select {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 34px 9px 14px;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237189AC' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.status-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(18,91,255,0.10); }
.foot-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.admin-empty {
  text-align: center; padding: 70px 24px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.admin-empty__icon {
  width: 54px; height: 54px; border-radius: 15px;
  background: var(--cream); color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.admin-empty h3 { font-size: 17px; margin-bottom: 6px; }
.admin-empty p { font-size: 14px; color: var(--ink-faint); }

.admin-loading { text-align: center; padding: 70px 24px; color: var(--ink-faint); font-size: 14px; }
.spinner {
  width: 30px; height: 30px; margin: 0 auto 14px;
  border: 2.5px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

/* Aviso */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translate(-50%, 24px);
  background: var(--ink); color: #fff;
  padding: 13px 22px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: all 380ms var(--ease);
  z-index: 400;
  display: flex; align-items: center; gap: 9px;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--err { background: var(--error); }

@media print {
  .admin-bar, .admin-tools, .admin-stats, .sub-card__foot, .toast, .admin-head p { display: none !important; }
  .sub-card__body { display: block !important; }
  .sub-card { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
}
