/* ==========================================================================
   components.css — Componentes reutilizáveis
   Moreno Home Conciergeries
   ========================================================================== */

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;              /* Alvo de toque confortável */
  padding: 0 var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              opacity var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn .icon { width: 18px; height: 18px; }

.btn--primary {
  background: var(--black);
  color: var(--cream);
}
.btn--primary:hover { background: var(--black-3); }

.btn--gold {
  background: var(--gold);
  color: var(--black);
}
.btn--gold:hover { background: #D5B87E; }

.btn--outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--black); background: var(--surface); }

.btn--outline-gold {
  background: transparent;
  border-color: var(--gold-line);
  color: var(--gold);
}
.btn--outline-gold:hover { background: var(--gold-dim); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }

.btn--danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn--danger:hover { background: var(--danger-bg); }

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 38px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
.btn--lg { min-height: 54px; font-size: var(--fs-md); }

.btn.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  color: var(--cream);
  animation: spin 700ms linear infinite;
}
.btn--gold.is-loading::after,
.btn--outline.is-loading::after { color: var(--black); }

/* Barra de ação fixa no fundo (fluxos de pedido) */
.action-bar {
  position: sticky;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom));
  z-index: calc(var(--z-nav) - 1);
  margin: var(--sp-6) calc(var(--sp-4) * -1) 0;
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  background: linear-gradient(to top, var(--bg) 62%, rgba(247, 243, 234, 0));
  display: flex;
  gap: var(--sp-3);
}
.action-bar .btn { flex: 1 1 auto; }

/* --------------------------------------------------------------------------
   Cartões
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}

.card__body { padding: var(--sp-4); }
.card__head {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.card__foot {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.card--dark {
  background: var(--black);
  color: var(--text-on-dark);
  border-color: var(--border-dark);
}
.card--dark p { color: var(--text-on-dark-muted); }
.card--flat { box-shadow: none; }

/* --------------------------------------------------------------------------
   Hero da página inicial
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--black);
  color: var(--text-on-dark);
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(10,10,10,0.94) 12%, rgba(10,10,10,0.42) 100%);
}
.hero__body { padding: var(--sp-6) var(--sp-5); max-width: 34rem; }
.hero__title {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  margin: var(--sp-1) 0 var(--sp-2);
}
.hero p { color: var(--text-on-dark-muted); font-size: var(--fs-sm); }

/* Cabeçalho de estadia */
.stay-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-md);
  background: var(--gold-dim);
  color: var(--text-on-dark);
}
.stay-card__label {
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--gold-soft);
}
.stay-card__value { font-size: var(--fs-base); font-weight: 600; }

/* --------------------------------------------------------------------------
   Grelha de serviços
   -------------------------------------------------------------------------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-line);
}
.service-card:active { transform: translateY(0); }

.service-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--black-2);
  overflow: hidden;
}
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.service-card:hover .service-card__media img { transform: scale(1.04); }

.service-card__icon {
  position: absolute;
  left: var(--sp-3);
  bottom: var(--sp-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(6px);
  color: var(--gold);
}

.service-card__body { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.service-card__title {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: 2px;
}
.service-card__desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}
.service-card__chevron {
  position: absolute;
  right: var(--sp-3);
  bottom: var(--sp-4);
  color: var(--gray-400);
  transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.service-card:hover .service-card__chevron {
  color: var(--gold);
  transform: translateX(3px);
}

/* Variante compacta (menu de serviços em lista) */
.service-grid--compact { grid-template-columns: 1fr; gap: var(--sp-2); }

/* --------------------------------------------------------------------------
   Cabeçalho fotográfico das páginas de serviço
   -------------------------------------------------------------------------- */

.service-hero {
  position: relative;
  margin: calc(var(--sp-5) * -1) calc(var(--sp-4) * -1) var(--sp-5);
  aspect-ratio: 16 / 9;
  max-height: 260px;
  background: var(--black-2);
  overflow: hidden;
}
.service-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.78), rgba(10, 10, 10, 0) 62%);
}
.service-hero__caption {
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 1;
  color: var(--cream);
}
.service-hero__caption h1 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
}
.service-hero__caption p {
  color: rgba(247, 243, 234, 0.78);
  font-size: var(--fs-sm);
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Listas de opções (linhas clicáveis)
   -------------------------------------------------------------------------- */

.option-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.option-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.option-row:hover { border-color: var(--gold-line); background: var(--white); }
.option-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--gold);
}
/* `display: block` é obrigatório: estes elementos são <span> dentro de um
   item flex, e sem isto o título e a descrição ficariam na mesma linha. */
.option-row__title {
  display: block;
  font-weight: 600;
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}
.option-row__desc {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-snug);
}
.option-row__meta { margin-left: auto; text-align: right; flex: none; }
.option-row__price { font-weight: 600; font-size: var(--fs-sm); }
.option-row .icon-chevron { color: var(--gray-400); flex: none; }

/* Escolha única / múltipla em formato de cartão */
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.choice:hover { border-color: var(--border-strong); }
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--gray-600);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.choice__body { flex: 1 1 auto; min-width: 0; }
.choice__title { display: block; font-weight: 600; font-size: var(--fs-base); line-height: var(--lh-snug); }
.choice__desc { display: block; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.choice__mark {
  flex: none;
  align-self: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all var(--t-fast) var(--ease);
}
.choice__mark .icon { width: 14px; height: 14px; stroke-width: 3; }
.choice input:checked ~ .choice__mark {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}
.choice:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.choice:has(input:checked) .choice__icon {
  background: var(--gold);
  color: var(--black);
}
.choice input:focus-visible ~ .choice__mark {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* Fallback para navegadores sem :has() — classe aplicada por JS */
.choice.is-checked { border-color: var(--gold); background: var(--gold-dim); }
.choice.is-checked .choice__icon { background: var(--gold); color: var(--black); }
.choice.is-checked .choice__mark {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

/* --------------------------------------------------------------------------
   Formulários
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--sp-2); }

.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: var(--fs-xs); color: var(--text-faint); }

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  appearance: none;
}
.input::placeholder,
.textarea::placeholder { color: var(--gray-400); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.textarea {
  min-height: 132px;
  resize: vertical;
  line-height: var(--lh-base);
}
.textarea--tall { min-height: 180px; }

.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='%235F5F5F' stroke-width='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 var(--sp-4) center;
  padding-right: var(--sp-10);
}

.field.has-error .input,
.field.has-error .textarea,
.field.has-error .select { border-color: var(--danger); }

.field__error {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  color: var(--danger);
}
.field__error .icon { width: 15px; height: 15px; }

.field__counter {
  align-self: flex-end;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

/* Interruptor */
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  width: 46px;
  height: 27px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--gray-300);
  padding: 3px;
  transition: background var(--t-fast) var(--ease);
}
.switch__thumb {
  width: 21px;
  height: 21px;
  border-radius: var(--r-full);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease);
}
.switch input:checked + .switch__track { background: var(--gold); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(19px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Área de upload de fotografia */
.uploader {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 148px;
  padding: var(--sp-5);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.uploader:hover { border-color: var(--gold); background: var(--gold-dim); }
.uploader input[type="file"] { display: none; }
.uploader__icon { color: var(--gold); }
.uploader__title { font-weight: 600; color: var(--text); font-size: var(--fs-base); }
.uploader__hint { font-size: var(--fs-xs); }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--sp-2);
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  background: rgba(10, 10, 10, 0.7);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.thumb__remove .icon { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   Indicador de etapas
   -------------------------------------------------------------------------- */

.stepper {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.stepper__bar {
  flex: 1 1 auto;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--gray-200);
  overflow: hidden;
}
.stepper__fill {
  height: 100%;
  background: var(--gold);
  border-radius: var(--r-full);
  transition: width var(--t-slow) var(--ease);
}
.stepper__label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Distintivos de estado
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--text-muted);
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: currentColor;
}
.badge--new       { background: var(--info-bg);    color: var(--info); }
.badge--accepted  { background: var(--gold-dim);   color: #8A6E33; }
.badge--progress  { background: var(--warning-bg); color: var(--warning); }
.badge--done      { background: var(--success-bg); color: var(--success); }
.badge--cancelled { background: var(--danger-bg);  color: var(--danger); }
.badge--neutral   { background: var(--surface-2);  color: var(--text-muted); }
.badge--plain::before { display: none; }

/* --------------------------------------------------------------------------
   Chips e separadores
   -------------------------------------------------------------------------- */

.chip-bar {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chip-bar::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--border-strong); }
.chip.is-active {
  background: var(--black);
  border-color: var(--black);
  color: var(--cream);
}

/* --------------------------------------------------------------------------
   Cartão de pedido
   -------------------------------------------------------------------------- */

.order-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: var(--sp-4);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.order-card:hover { border-color: var(--gold-line); box-shadow: var(--shadow-sm); }

.order-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--black);
  color: var(--gold);
}
.order-card__body { flex: 1 1 auto; min-width: 0; }
.order-card__top {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: 2px;
}
.order-card__ref {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.order-card__title { display: block; font-weight: 600; font-size: var(--fs-base); line-height: var(--lh-snug); }
.order-card__meta {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.order-card__price {
  font-weight: 600;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Linha do tempo de estados
   -------------------------------------------------------------------------- */

.timeline { display: flex; flex-direction: column; }

.timeline__item {
  position: relative;
  display: flex;
  gap: var(--sp-4);
  padding-bottom: var(--sp-5);
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  border: 2px solid var(--border-strong);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.timeline__marker .icon { width: 15px; height: 15px; stroke-width: 3; }
.timeline__item:not(:last-child) .timeline__marker::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + var(--sp-5) - 26px);
  background: var(--border-strong);
}
.timeline__item.is-done .timeline__marker {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}
.timeline__item.is-done:not(:last-child) .timeline__marker::after { background: var(--success); }
.timeline__item.is-current .timeline__marker {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
  box-shadow: 0 0 0 5px var(--gold-dim);
}
.timeline__title { font-weight: 600; font-size: var(--fs-base); line-height: 1.35; }
.timeline__item.is-todo .timeline__title { color: var(--text-faint); font-weight: 500; }
.timeline__time {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.timeline__note { font-size: var(--fs-sm); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Resumo / linhas de detalhe
   -------------------------------------------------------------------------- */

.detail-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-base);
}
.detail-row__icon { color: var(--gold); flex: none; margin-top: 2px; }
.detail-row__label { font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--text-faint); }
.detail-row__value { font-weight: 500; word-break: break-word; }
.detail-row__value--pre { white-space: pre-wrap; font-weight: 400; }

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.total-row__label { font-weight: 600; }
.total-row__value {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.total-row__value--pending { font-size: var(--fs-base); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Avatar
   -------------------------------------------------------------------------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--black);
  color: var(--gold);
  font-weight: 600;
  font-size: var(--fs-base);
  overflow: hidden;
  letter-spacing: 0.02em;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 34px; height: 34px; font-size: var(--fs-sm); }
.avatar--lg { width: 66px; height: 66px; font-size: var(--fs-lg); }
.avatar--xl { width: 88px; height: 88px; font-size: var(--fs-xl); }

.presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.presence::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--gray-400);
}
.presence--online::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.presence--away::before { background: var(--warning); }

/* --------------------------------------------------------------------------
   Estados vazios / carregamento / erro
   -------------------------------------------------------------------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-12) var(--sp-5);
  text-align: center;
}
.empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--gray-400);
}
.empty__title { font-weight: 600; font-size: var(--fs-md); }
.empty__text { color: var(--text-muted); font-size: var(--fs-sm); max-width: 32ch; }
.empty--error .empty__icon { background: var(--danger-bg); color: var(--danger); }

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--gold);
  animation: spin 700ms linear infinite;
}
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-12) var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--gray-200);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: shimmer 1.4s infinite;
}
.skeleton--card { height: 84px; border-radius: var(--r-lg); }
.skeleton--tile { aspect-ratio: 16 / 10; border-radius: var(--r-lg); }
.skeleton--line { height: 12px; }
.skeleton--line.w-60 { width: 60%; }
.skeleton--line.w-40 { width: 40%; }

/* Aviso de ligação */
.offline-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + var(--sp-3));
  z-index: var(--z-toast);
  display: none;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--black);
  color: var(--cream);
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-lg);
}
body.is-offline .offline-bar { display: inline-flex; animation: slide-up var(--t-base) var(--ease); }

/* --------------------------------------------------------------------------
   Ecrã de sucesso
   -------------------------------------------------------------------------- */

.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-4) var(--sp-6);
}
.success-screen__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: var(--r-full);
  background: var(--success);
  color: var(--white);
  animation: pop 480ms var(--ease) both;
}
.success-screen__check .icon { width: 42px; height: 42px; stroke-width: 2.4; }
.success-screen h2 { font-family: var(--font-display); font-size: var(--fs-xl); }
.success-screen__ref {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-full);
  background: var(--gold-dim);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Modal / diálogo
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.6);
  animation: fade-in var(--t-base) var(--ease);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg);
  animation: slide-up var(--t-base) var(--ease);
  padding-bottom: var(--safe-bottom);
}
.modal__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  background: var(--surface);
}
.modal__head h3 { font-size: var(--fs-md); }
.modal__body { padding: 0 var(--sp-5) var(--sp-5); }
.modal__foot {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5) var(--sp-5);
}
.modal__foot .btn { flex: 1 1 auto; }
.modal__grabber {
  width: 40px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--gray-300);
  margin: var(--sp-3) auto 0;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-stack {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + var(--sp-4));
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: min(94vw, 440px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--black);
  color: var(--cream);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  animation: slide-up var(--t-base) var(--ease);
  pointer-events: auto;
}
.toast.is-leaving { animation: fade-in var(--t-base) var(--ease) reverse forwards; }
.toast__icon { flex: none; color: var(--gold); }
.toast--success .toast__icon { color: #6FD3A5; }
.toast--error .toast__icon { color: #F09489; }
.toast__body { flex: 1 1 auto; }
.toast__close { color: rgba(247,243,234,0.6); }

/* --------------------------------------------------------------------------
   Notificações
   -------------------------------------------------------------------------- */

.notif {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background var(--t-fast) var(--ease);
}
.notif:hover { background: var(--surface-2); }
.notif.is-unread { background: var(--gold-dim); }
.notif__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--black);
  color: var(--gold);
}
.notif__title { display: block; font-weight: 600; font-size: var(--fs-base); line-height: var(--lh-snug); }
.notif__text { display: block; font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-snug); }
.notif__time { display: block; font-size: var(--fs-xs); color: var(--text-faint); margin-top: 2px; }
.notif__dot {
  align-self: center;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--gold);
}

/* --------------------------------------------------------------------------
   Conversa (concierge)
   -------------------------------------------------------------------------- */

.chat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
}
.bubble {
  max-width: 78%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  word-break: break-word;
  animation: slide-up var(--t-base) var(--ease);
}
.bubble--in {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: var(--r-sm);
}
.bubble--out {
  align-self: flex-end;
  background: var(--gold-dim);
  border: 1px solid var(--gold-line);
  border-bottom-right-radius: var(--r-sm);
}
.bubble__time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-faint);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.composer {
  position: sticky;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-3) 0 var(--sp-4);
  background: var(--bg);
}
.composer .input { min-height: 46px; border-radius: var(--r-full); }
.composer .btn { min-height: 46px; width: 46px; padding: 0; border-radius: var(--r-full); flex: none; }

/* --------------------------------------------------------------------------
   Atividades
   -------------------------------------------------------------------------- */

.activity-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.activity-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.activity-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--black-2); }
.activity-card__media img { width: 100%; height: 100%; object-fit: cover; }
.activity-card__tag {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--gold);
  color: var(--black);
  font-size: var(--fs-xs);
  font-weight: 700;
}
.activity-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.activity-card__title { font-weight: 600; font-size: var(--fs-base); }
.activity-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.activity-card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.price__old {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--text-faint);
  text-decoration: line-through;
}
.activity-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gold);
  transition: gap var(--t-fast) var(--ease);
}
.activity-card:hover .activity-card__cta { gap: 8px; }

.stars { display: inline-flex; gap: 1px; color: var(--gold); }
.stars .icon { width: 13px; height: 13px; fill: currentColor; stroke: none; }

/* --------------------------------------------------------------------------
   Estatísticas
   -------------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
}
.stat {
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
}
.stat__label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-faint);
  margin-bottom: var(--sp-2);
}
.stat__label .icon { width: 15px; height: 15px; color: var(--gold); }
.stat__value {
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__value--sm { font-size: var(--fs-xl); }
.stat__foot { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }

/* Barras simples de relatório */
.bar-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.bar-item { display: flex; flex-direction: column; gap: 6px; }
.bar-item__head {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}
.bar-item__value { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-item__track {
  height: 8px;
  border-radius: var(--r-full);
  background: var(--gray-200);
  overflow: hidden;
}
.bar-item__fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--gold), #E0C68F);
  transition: width var(--t-slow) var(--ease);
}

/* --------------------------------------------------------------------------
   Rodapé de marca
   -------------------------------------------------------------------------- */

.brand-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4) var(--sp-3);
  margin-top: var(--sp-8);
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--black);
  color: var(--text-on-dark);
  text-align: center;
}
.brand-strip__item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.brand-strip__item .icon { color: var(--gold); }
.brand-strip__title { font-size: var(--fs-sm); font-weight: 600; }
.brand-strip__text { font-size: var(--fs-xs); color: var(--text-on-dark-muted); }
