/* ===== App shell: dashboard + wizard ===== */
.app-page {
  background-color: var(--gray200);
  min-height: 60vh;
  padding: 32px 80px 64px;
}

/* ----- Dashboard ----- */
.dash-actions { margin-bottom: 32px; }

.new-email-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 240px;
  height: 150px;
  background: var(--white);
  border: 2px dashed var(--gray400);
  border-radius: 12px;
  color: var(--gray800);
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.new-email-card:hover {
  border-color: var(--blue600);
  color: var(--blue600);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.new-email-card .plus { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.new-email-card .label { font-weight: 600; }

.dash-section-title { margin: 8px 0 16px; font-size: 16px; }

.email-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.email-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray300);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: 0.2s;
}
.email-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.10); transform: translateY(-2px); }
.email-card .tmpl-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: 20px;
  color: var(--white);
  margin-bottom: 12px;
}
.email-card .tmpl-badge.acuvue { background: var(--blue600); }
.email-card .tmpl-badge.professional { background: var(--red500); }
.email-card .subject { font-family: var(--jnj-display); font-size: 17px; margin: 0 0 6px; color: var(--black); }
.email-card .meta { font-size: 12px; color: var(--gray700); margin: 0; }
.email-card .meta .sep { margin: 0 6px; }
.email-card .delete-btn {
  position: absolute;
  top: 12px; right: 12px;
  border: 0; background: transparent;
  color: var(--gray600); cursor: pointer;
  padding: 4px 6px; border-radius: 6px;
}
.email-card .delete-btn:hover { color: var(--red500); background: var(--gray100); }

.dash-empty { text-align: center; color: var(--gray700); margin-top: 24px; }

/* ===== Stepper (compartilhado wizard + builder) ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 16px 20px;
  background: transparent;
}
.stepper .step { display: flex; align-items: center; color: var(--gray600); }
.stepper .step .dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--gray300);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; background: var(--white);
  color: var(--gray600);
  transition: 0.2s;
}
.stepper .step .step-label { margin-left: 10px; font-weight: 600; font-size: 14px; transition: 0.2s; }
.stepper .connector { width: 56px; height: 2px; background: var(--gray300); margin: 0 16px; border-radius: 2px; transition: 0.2s; }

/* Passo ativo — pill vermelho J&J com halo suave */
.stepper .step.active { color: var(--gray900); }
.stepper .step.active .dot {
  border-color: var(--red500); background: var(--red500); color: var(--white);
  box-shadow: 0 0 0 4px rgba(235, 23, 0, 0.15);
}

/* Passo concluído — pill vermelho com check */
.stepper .step.done { color: var(--gray700); }
.stepper .step.done .dot { border-color: var(--red500); background: var(--red500); color: var(--white); font-size: 0; }
.stepper .step.done .dot::before {
  font-family: var(--font-awsome); font-weight: 900; content: "\f00c"; font-size: 12px;
}

/* Conector logo após um passo concluído fica preenchido (vermelho) */
.stepper .step.done + .connector { background: var(--red500); }

.stepper a.step { text-decoration: none; }
.stepper a.step:hover .dot { border-color: var(--red500); }
.stepper a.step:hover .step-label { color: var(--gray900); }

/* ===== Wizard ===== */
.wizard-panel {
  max-width: 620px;
  margin: 32px auto;
  background: var(--white);
  border: 1px solid var(--gray200);
  border-radius: 16px;
  padding: 30px 32px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.05);
}
.wizard-panel h2.step-title { font-family: var(--jnj-display); font-weight: 700; font-size: 22px; color: var(--gray900); margin-bottom: 6px; }
.wizard-panel .step-sub { color: var(--gray600); font-size: 14px; margin-bottom: 26px; }
.wizard-panel .form-group { margin-bottom: 18px; }
.wizard-panel label { display: block; font-weight: 600; color: var(--gray800); font-size: 13px; margin-bottom: 7px; }
.wizard-panel label .text-danger { color: var(--red500); }
.wizard-panel .form-control {
  border-radius: 10px;
  border: 1px solid var(--gray300);
  padding: 11px 14px;
  height: auto;
  font-size: 14px;
  color: var(--gray900);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.wizard-panel .form-control:focus {
  border-color: var(--red500);
  box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.12);
}
.wizard-panel .form-text { font-size: 12px; color: var(--gray500); }

.wizard-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--gray200); }
.wizard-actions .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 11px;
  font-weight: 700; font-size: 14px; padding: 11px 22px; cursor: pointer;
  text-decoration: none; transition: background 0.18s, box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.wizard-actions .btn-primary { background: var(--red500); color: var(--white); box-shadow: 0 6px 16px rgba(235, 23, 0, 0.24); }
.wizard-actions .btn-primary:hover:not(:disabled) { background: var(--red600); color: var(--white); box-shadow: 0 10px 22px rgba(235, 23, 0, 0.30); transform: translateY(-1px); }
.wizard-actions .btn-primary:disabled { opacity: 0.5; box-shadow: none; cursor: not-allowed; }
.wizard-actions .btn-secondary { background: var(--white); color: var(--gray700); border-color: var(--gray300); }
.wizard-actions .btn-secondary:hover { background: var(--gray100); color: var(--gray900); border-color: var(--gray400); }

.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.template-option {
  border: 1px solid var(--gray200);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.template-option:hover { border-color: var(--gray400); box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06); transform: translateY(-1px); }
.template-option.selected { border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.14); }
.template-option .tmpl-name { font-family: var(--jnj-display); font-size: 20px; color: var(--gray900); margin: 12px 0 4px; }
.template-option .tmpl-logo {
  height: 60px; display: flex; align-items: center; justify-content: center;
  color: var(--gray600); font-weight: 700; font-size: 20px;
}
.template-option .radio-hint { font-size: 12px; color: var(--gray600); margin-top: 8px; }
.template-option.selected .radio-hint { color: var(--red600); font-weight: 700; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }

/* ===== Custom select (Sender Profile) ===== */
.emd-select { position: relative; }
.emd-select__trigger {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  min-height: 42px;
  background: var(--white);
  border: 1px solid var(--gray300);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--gray900);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.emd-select__trigger:focus { outline: none; }
.emd-select__trigger:focus,
.emd-select.is-open .emd-select__trigger {
  border-color: var(--red500);
  box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.12);
}
.emd-select__value { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.emd-select__vlabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emd-select__trigger.is-placeholder .emd-select__value { color: var(--gray500); }
.emd-select__caret { flex: none; color: var(--gray500); font-size: 12px; transition: transform 0.15s; }
.emd-select.is-open .emd-select__caret { transform: rotate(180deg); }

.emd-select__avatar {
  flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gray200); color: var(--gray800);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.emd-select__avatar.sm { width: 26px; height: 26px; font-size: 12px; }

.emd-select__panel {
  position: absolute; z-index: 200;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--gray200);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  padding: 6px;
}
/* Busca (listas longas) */
.emd-select__search { display: flex; align-items: center; gap: 8px; padding: 4px 8px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--gray100); }
.emd-select__search-ico { width: 15px; height: 15px; flex: none; color: var(--gray400); }
.emd-select__search-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 13.5px; color: var(--gray900); padding: 3px 0; }
.emd-select__search-input::placeholder { color: var(--gray400); }
.emd-select__list { max-height: 244px; overflow-y: auto; }
.emd-select__empty { padding: 16px 10px; text-align: center; color: var(--gray500); font-size: 13px; }
.emd-select__option {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.emd-select__option[hidden] { display: none; }
.emd-select__option:hover,
.emd-select__option.is-active { background: var(--gray100); }
.emd-select__option.is-selected .emd-select__avatar { background: var(--red500); color: var(--white); }
.emd-select__text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.emd-select__name { font-size: 14px; font-weight: 600; color: var(--gray900); }
.emd-select__email { font-size: 12px; color: var(--gray600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emd-select__check { flex: none; color: var(--red500); font-weight: 700; opacity: 0; }
.emd-select__option.is-selected .emd-select__check { opacity: 1; }

/* ============================================================
   Dashboard redesign — "J&J com mais vida"
   ============================================================ */
.dash-body-root { background: var(--gray200); min-height: 100vh; }
.dash-shell { display: flex; min-height: 100vh; }

/* Rail lateral */
.dash-rail {
  flex: none; width: 76px;
  background: var(--ink); border-right: 1px solid var(--ink-soft);
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 0 20px; gap: 10px;
  position: sticky; top: 0; height: 100vh;
}
.dash-rail__logo {
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--red500), var(--red700));
  color: var(--white); font-family: var(--jnj-display); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: 0 6px 16px rgba(235,23,0,0.30);
}
.dash-rail__logo:hover { color: var(--white); text-decoration: none; }
.dash-rail__nav { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dash-rail__item {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray600); text-decoration: none; transition: 0.18s;
}
.dash-rail__item svg { width: 22px; height: 22px; }
.dash-rail__item { color: rgba(255, 255, 255, 0.6); }
.dash-rail__item:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.dash-rail__item.is-active {
  background: linear-gradient(135deg, var(--red500), var(--red600)); color: var(--white);
  box-shadow: 0 6px 16px rgba(235,23,0,0.30);
}
.dash-rail__logout { color: rgba(255, 255, 255, 0.45); }
.dash-rail__logout:hover { background: rgba(235, 23, 0, 0.18); color: #ff7a67; }

/* Conteúdo */
.dash-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Topbar */
.dash-topbar { display: flex; align-items: center; justify-content: space-between; padding: 26px 40px 10px; gap: 24px; }
.dash-greet__title { font-size: 26px; font-weight: 700; color: var(--gray900); margin: 0; font-family: var(--jnj-display); }
.dash-greet__sub { margin: 4px 0 0; color: var(--gray600); font-size: 14px; }
.dash-topbar__actions { display: flex; align-items: center; gap: 16px; }
.dash-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border: 1px solid var(--gray300);
  border-radius: 12px; padding: 11px 15px; width: 400px; max-width: 44vw; transition: 0.15s;
}
.dash-search:focus-within { border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235,23,0,0.12); }
.dash-search > svg { width: 19px; height: 19px; color: var(--gray500); flex: none; }
.dash-search input { border: none; outline: none; background: transparent; font-size: 14.5px; width: 100%; color: var(--gray900); }
.dash-search__clear {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; border: none; background: transparent;
  color: var(--gray500); cursor: pointer; padding: 0;
}
.dash-search__clear:hover { background: var(--gray100); color: var(--gray800); }
.dash-search__clear svg { width: 14px; height: 14px; }
.dash-search__kbd {
  flex: none; font-size: 11px; font-weight: 700; color: var(--gray500);
  background: var(--gray100); border: 1px solid var(--gray200); border-radius: 6px;
  padding: 2px 7px; line-height: 1.5;
}
.dash-search:focus-within .dash-search__kbd { display: none; }

/* Botão de busca (só mobile) + modal de busca de tela cheia */
.dash-search-btn {
  display: none; flex: none; width: 40px; height: 40px; border-radius: 11px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--gray600); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dash-search-btn:hover { background: var(--gray100); color: var(--gray900); border-color: var(--gray200); }
.dash-search-btn svg { width: 20px; height: 20px; }

.search-modal { position: fixed; inset: 0; z-index: 300; background: rgba(16, 24, 40, 0.45); display: flex; flex-direction: column; }
.search-modal[hidden] { display: none; }
.search-modal__sheet { background: var(--white); display: flex; flex-direction: column; max-height: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.search-modal__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--gray200); }
.search-modal__ico { width: 20px; height: 20px; flex: none; color: var(--gray500); }
.search-modal__input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; color: var(--gray900); }
.search-modal__close { flex: none; width: 34px; height: 34px; border-radius: 9px; border: none; background: var(--gray100); color: var(--gray700); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.search-modal__close:hover { background: var(--gray200); color: var(--gray900); }
.search-modal__close svg { width: 16px; height: 16px; }
.search-modal__results { overflow-y: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
.search-modal__item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; background: transparent; border: none; border-radius: 10px; padding: 12px; cursor: pointer; }
.search-modal__item:hover, .search-modal__item:active { background: var(--gray100); }
.search-modal__item-title { font-size: 15px; font-weight: 600; color: var(--gray900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-modal__item-sub { font-size: 12.5px; color: var(--gray500); }
.search-modal__empty, .search-modal__hint { padding: 44px 16px; text-align: center; color: var(--gray500); font-size: 14px; }
.search-modal__hint { color: var(--gray400); }

/* Main */
.dash-main { padding: 14px 40px 48px; flex: 1; }

/* Hero + stats grid */
.dash-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; margin-bottom: 32px; }

/* Hero card */
.hero-card {
  position: relative; overflow: hidden; border-radius: 22px;
  background: linear-gradient(135deg, #2f2f2f 0%, var(--ink) 48%, #141414 100%);
  color: var(--white); padding: 30px 32px; min-height: 220px;
  display: flex; align-items: flex-end; text-decoration: none;
  box-shadow: 0 18px 40px rgba(0,0,0,0.28); transition: transform 0.2s, box-shadow 0.2s;
}
.hero-card:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(0,0,0,0.36); color: var(--white); text-decoration: none; }
.hero-card__blob { position: absolute; border-radius: 50%; }
/* Brilho vermelho de acento no canto */
.hero-card__blob--1 { width: 260px; height: 260px; top: -110px; right: -70px; background: radial-gradient(circle, rgba(235,23,0,0.55) 0%, rgba(235,23,0,0) 70%); }
.hero-card__blob--2 { width: 150px; height: 150px; bottom: -70px; right: 90px; background: rgba(255,255,255,0.05); }
.hero-card__art { position: absolute; top: 26px; right: 30px; width: 76px; height: 76px; color: rgba(255,255,255,0.28); }
.hero-card__content { position: relative; z-index: 1; }
.hero-card__eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: #ff6a56; margin-bottom: 8px; }
.hero-card__title { font-family: var(--jnj-display); font-size: 28px; font-weight: 700; margin: 0 0 6px; }
.hero-card__text { opacity: 0.7; margin: 0 0 20px; font-size: 14px; }
.hero-card__btn { display: inline-flex; align-items: center; gap: 8px; background: var(--red500); color: var(--white); font-weight: 700; font-size: 14px; padding: 11px 20px; border-radius: 12px; box-shadow: 0 6px 16px rgba(235,23,0,0.35); transition: background 0.18s, box-shadow 0.18s; }
.hero-card__btn svg { width: 16px; height: 16px; }
.hero-card:hover .hero-card__btn { background: var(--red600); box-shadow: 0 8px 20px rgba(235,23,0,0.45); }

/* Stats card */
/* Resumo em mini-cards com ícone (estilo "feature cards", ícones pequenos) */
.stats-panel { display: flex; flex-direction: column; justify-content: center; }
.stats-panel__head { font-size: 12px; font-weight: 700; color: var(--gray500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
/* Resumo — mini-cards compactos (ícone + número + sparkline + %) */
.stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--white); border: 1px solid var(--gray200); border-radius: 16px;
  padding: 15px 16px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.stat-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); transform: translateY(-2px); }
.stat-card--total { background: radial-gradient(130% 130% at 100% 0%, #f4f4f4 0%, var(--white) 48%); }
.stat-card--red   { background: radial-gradient(130% 130% at 100% 0%, #fef4f2 0%, var(--white) 48%); }
.stat-card--blue  { background: radial-gradient(130% 130% at 100% 0%, #f0f6fc 0%, var(--white) 48%); }
.stat-card--total:hover { border-color: var(--gray400); }
.stat-card--red:hover   { border-color: #f3c8c0; }
.stat-card--blue:hover  { border-color: #cfe1f4; }

.stat-card__row { display: flex; align-items: center; gap: 10px; }
.stat-card__ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.stat-card__ico svg { width: 17px; height: 17px; }
.stat-card__ico--total { background: #ececec; color: var(--ink); }
.stat-card__ico--red { background: #fde3de; color: var(--red500); }
.stat-card__ico--blue { background: #e1eefb; color: var(--blue500); }
.stat-card__num { font-family: var(--jnj-display); font-size: 26px; font-weight: 700; line-height: 1; color: var(--gray900); }
/* Sparkline decorativo (acento — não representa métrica de tendência) */
.stat-card__spark { flex: none; width: 66px; height: 26px; margin-left: auto; overflow: visible; }
.stat-card__spark-line { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.stat-card__spark-fill { fill: currentColor; opacity: 0.10; stroke: none; }
.stat-card--total .stat-card__spark { color: var(--gray500); }
.stat-card--red .stat-card__spark { color: var(--red500); }
.stat-card--blue .stat-card__spark { color: var(--blue500); }
.stat-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.stat-card__label { font-size: 13px; color: var(--gray600); }
.stat-card__pct { font-size: 13px; font-weight: 700; }
.stat-card--red .stat-card__pct { color: var(--red600); }
.stat-card--blue .stat-card__pct { color: var(--blue600); }

/* Emails section */
.dash-emails__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.dash-emails__head h2 { font-family: var(--jnj-display); font-size: 20px; font-weight: 700; color: var(--gray900); margin: 0; }
.dash-emails__count { color: var(--gray500); font-size: 14px; }
.email-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

/* Card de e-mail rico */
/* overflow visível para o menu ⋯ não ser cortado; a barra colorida ::before
   ganha cantos arredondados à esquerda para acompanhar o card. */
.email-card { position: relative; background: var(--white); border: 1px solid var(--gray200); border-radius: 18px; padding: 18px 18px 16px; cursor: pointer; transition: 0.18s; }
.email-card::before { content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--red500); opacity: 0.9; border-radius: 18px 0 0 18px; }
/* Card com menu aberto fica acima dos vizinhos para o dropdown não ser coberto. */
.email-card:has(.email-card__menu.is-open) { z-index: 5; }
.email-card.acuvue::before { background: var(--blue500); }
.email-card:hover { box-shadow: 0 14px 30px rgba(0,0,0,0.10); transform: translateY(-3px); border-color: var(--gray300); }
.email-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.email-card__badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; padding: 4px 11px; border-radius: 20px; color: var(--white); }
.email-card__badge.professional { background: var(--red500); }
.email-card__badge.acuvue { background: var(--blue500); }
.email-card__del { border: none; background: transparent; color: var(--gray500); width: 30px; height: 30px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; transition: 0.15s; }
.email-card__del svg { width: 16px; height: 16px; }
.email-card:hover .email-card__del { opacity: 1; }
.email-card__del:hover { background: #fdf0ee; color: var(--red500); }

/* Menu ⋯ do card (Renomear / Excluir) */
.email-card__menu { position: relative; }
.email-card__menu-btn {
  border: none; background: transparent; color: var(--gray500);
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: 0.15s;
}
.email-card__menu-btn svg { width: 18px; height: 18px; }
.email-card:hover .email-card__menu-btn,
.email-card__menu.is-open .email-card__menu-btn { opacity: 1; }
.email-card__menu-btn:hover { background: var(--gray100); color: var(--gray900); }
.email-card__menu-list {
  position: absolute; top: 36px; right: 0; z-index: 20;
  background: var(--white); border: 1px solid var(--gray200); border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
  padding: 6px; min-width: 156px;
}
.email-card__menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: transparent; padding: 8px 10px; border-radius: 8px;
  font-size: 14px; color: var(--gray800); cursor: pointer; text-align: left;
}
.email-card__menu-item svg { width: 16px; height: 16px; flex: none; }
.email-card__menu-item:hover { background: var(--gray100); }
.email-card__menu-item.js-delete { color: var(--red500); }
.email-card__menu-item.js-delete:hover { background: #fdf0ee; }

/* Modal renomear */
.rename-label { font-size: 13px; font-weight: 600; color: var(--gray800); margin-bottom: 6px; display: block; }
#renameInput { border-radius: 8px; }
#renameInput:focus { border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.12); }
.rename-hint { display: block; margin-top: 8px; font-size: 12px; color: var(--gray500); }
.email-card__subject { font-family: var(--jnj-display); font-size: 17px; font-weight: 700; color: var(--gray900); margin: 0 0 4px; line-height: 1.25; }
.email-card__pre { font-size: 13px; color: var(--gray600); margin: 0 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.email-card__sender { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--gray700); min-width: 0; }
.email-card__sender .avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gray200); color: var(--gray800); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.email-card__sender .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sem remetente definido: rótulo discreto com ícone, sem círculo "—" */
.email-card__sender--empty { color: var(--gray400); font-style: italic; gap: 6px; }
.email-card__sender--empty svg { width: 15px; height: 15px; flex: none; }
.email-card__foot-right { display: flex; align-items: center; gap: 4px; flex: none; }
.email-card__time { flex: none; font-size: 12px; color: var(--gray500); }
/* Indicador de "abrir" que aparece no hover */
.email-card__go { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--gray400); opacity: 0; transform: translateX(-4px); transition: 0.18s; }
.email-card__go svg { width: 15px; height: 15px; }
.email-card:hover .email-card__go { opacity: 1; transform: translateX(0); color: var(--red500); }
.email-card.acuvue:hover .email-card__go { color: var(--blue500); }

/* Empty state */
.dash-empty { grid-column: 1 / -1; text-align: center; padding: 48px 20px; background: var(--white); border: 1px dashed var(--gray400); border-radius: 18px; color: var(--gray600); }
.dash-empty__ico { width: 56px; height: 56px; border-radius: 16px; background: var(--gray100); color: var(--red500); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.dash-empty__ico svg { width: 26px; height: 26px; }
.dash-empty h3 { font-family: var(--jnj-display); font-size: 18px; color: var(--gray900); margin: 0 0 6px; }
.dash-empty p { margin: 0 0 18px; font-size: 14px; }
.dash-empty__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; background: var(--red500); color: var(--white); font-weight: 700; font-size: 14px; padding: 10px 20px; border-radius: 12px; text-decoration: none; transition: 0.15s; }
.dash-empty__btn svg { width: 18px; height: 18px; flex: none; }
.dash-empty__btn:hover { background: var(--red600); color: var(--white); text-decoration: none; box-shadow: 0 6px 16px rgba(235,23,0,0.24); }

/* Avatar do topbar */
.dash-topbar .user-profile .btn-group { float: none; }
.dash-topbar .user-profile .dropdown-toggle { display: flex; align-items: center; gap: 10px; }
.dash-topbar .user-profile .avatar { background: linear-gradient(135deg, var(--red500), var(--red700)); }
.dash-topbar .user-profile .cut { color: var(--gray900); font-weight: 600; font-size: 14px; }

@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

/* ===== Builder com o mesmo shell da home ===== */
.builder-topbar { align-items: flex-start; padding-bottom: 18px; }
.builder-topbar__right { display: flex; align-items: center; gap: 28px; padding-top: 4px; }

/* Stepper compacto no topbar */
.stepper.stepper--compact { padding: 0; }
.stepper--compact .step .dot { width: 26px; height: 26px; font-size: 12px; }
.stepper--compact .step .step-label { font-size: 13px; margin-left: 8px; }
.stepper--compact .connector { width: 30px; margin: 0 10px; }
.stepper--compact .step.active .dot { box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.15); }

/* Conteúdo do builder alinhado ao padding do shell (40px) */
.builder-main { flex: 1; }
.builder-body .email-config { margin-left: 40px; margin-right: 40px; }
.builder-main .container-fluid.box-tabs { padding-left: 40px; padding-right: 40px; }

/* Configuração compacta: botão-gatilho na barra de abas + popover */
.builder-body .email-config--compact {
  margin: 0; width: auto; display: inline-block; position: relative;
  background: none; border: none; box-shadow: none; border-radius: 0;
}
.builder-body .email-config--compact .email-config__summary {
  width: auto; gap: 9px; padding: 8px 14px;
  border: 1px solid var(--gray300); border-radius: 10px; background: var(--white);
}
.builder-body .email-config--compact.is-collapsed .email-config__summary { border-radius: 10px; }
.builder-body .email-config--compact .email-config__summary:hover { background: var(--gray100); }
.builder-body .email-config--compact .email-config__summary-ico {
  width: 24px; height: 24px; border-radius: 7px; font-size: 12px;
}
.builder-body .email-config--compact .email-config__summary-text {
  flex: 0 1 auto; min-width: 130px; max-width: 240px; font-size: 13px;
}
.builder-body .email-config--compact .email-config__summary-action { display: none; }
.builder-body .email-config--compact .email-config__body {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 440px; max-width: calc(100vw - 60px);
  max-height: calc(100vh - 150px); overflow-y: auto;
  background: var(--white); border: 1px solid var(--gray200); border-radius: 16px;
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.16);
  padding: 6px 22px 22px;
}
.builder-body .email-config--compact .email-config__body section { padding-top: 18px; }
/* Campos empilhados (um embaixo do outro) para dar espaço de escrita */
.builder-body .email-config--compact .email-config__grid { grid-template-columns: 1fr; gap: 16px; }
.builder-body .email-config--compact .email-config__batch { grid-column: auto; }

/* Recomendações de tamanho: verde no ideal, âmbar fora */
.email-config__hint { color: var(--gray500); }
.email-config__hint.is-good { color: #1f7a3d; }
.email-config__hint.is-warn { color: #b45309; }
.builder-main .box-tabs { background: transparent; border-bottom: 1px solid var(--gray300); margin: 0 0 4px; }
.builder-main #pageHistory { padding-left: 40px; padding-right: 40px; }

/* ===== Builder canvas — painéis Content Blocks / Email Mockup ===== */
.builder-main .content-blocks { padding: 8px 40px 48px; }
/* Permite os .col encolherem pra 50/50 (gotcha do flexbox min-width:auto) */
.builder-main .content-blocks .row > .col { min-width: 0; }
.builder-panel { min-width: 0; }
.builder-panel {
  background: var(--white);
  border: 1px solid var(--gray200);
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.builder-panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--gray200);
  border-radius: 18px 18px 0 0;
  background: var(--white);
}
.builder-panel__title { font-family: var(--jnj-display); font-size: 16px; font-weight: 700; color: var(--gray900); }
.builder-panel__hint { font-size: 12px; color: var(--gray500); }
.columnA-empty { padding: 28px 18px; text-align: center; font-size: 13px; color: var(--gray500); line-height: 1.5; background: var(--gray100); border: 1px dashed var(--gray300); border-radius: 12px; }
.builder-panel--preview .view-tabs { margin: 0; }

/* Preview: e-mail sobre um canvas com sombra */
.preview-canvas { background: var(--gray100); padding: 26px 10px; }
.preview-canvas .email-frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
}
.builder-panel__actions {
  padding: 14px 18px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border-top: 1px solid var(--gray200);
  border-radius: 0 0 18px 18px;
  background: var(--white);
}
.builder-panel__actions .btn { margin: 0 !important; }

/* Botões de ação do builder (Gerar PDF / Salvar e voltar) */
.builder-panel__actions .builder-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 11px;
  font-weight: 700; font-size: 14px; padding: 12px 22px;
  min-width: 260px; cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.builder-panel__actions .builder-btn i { font-size: 14px; }
.builder-btn--primary { background: var(--red500); color: var(--white); box-shadow: 0 6px 16px rgba(235, 23, 0, 0.24); }
.builder-btn--primary:hover,
.builder-btn--primary:focus { background: var(--red600); color: var(--white); box-shadow: 0 10px 22px rgba(235, 23, 0, 0.30); transform: translateY(-1px); }
.builder-btn--ghost { background: var(--white); color: var(--gray800); border-color: var(--gray300); }
.builder-btn--ghost:hover,
.builder-btn--ghost:focus { background: var(--gray100); color: var(--gray900); border-color: var(--gray400); }
/* Estado desabilitado (ex.: Gerar PDF sem conteúdo no e-mail) */
.builder-panel__actions .builder-btn:disabled,
.builder-panel__actions .builder-btn[disabled] {
  background: var(--gray200);
  color: var(--gray500);
  border-color: transparent;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* ===== Histórico de PDFs (aba History) ===== */
.history-section { padding: 24px 0 40px; max-width: 720px; }
.history-title { font-family: var(--jnj-display); font-size: 22px; font-weight: 700; color: var(--gray900); margin: 0 0 4px; }
.history-sub { color: var(--gray600); font-size: 14px; margin: 0 0 20px; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--gray200); border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.history-item__ico {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: #fdf0ee; color: var(--red500);
  display: flex; align-items: center; justify-content: center;
}
.history-item__ico svg { width: 20px; height: 20px; }
.history-item__body { min-width: 0; }
.history-item__name { font-weight: 700; font-size: 14px; color: var(--gray900); word-break: break-all; }
.history-item__meta { font-size: 12px; color: var(--gray600); margin-top: 2px; }

.history-empty {
  text-align: center; padding: 44px 20px;
  background: var(--white); border: 1px dashed var(--gray400); border-radius: 14px; color: var(--gray600);
}
.history-empty__ico {
  width: 54px; height: 54px; border-radius: 14px; background: var(--gray100); color: var(--red500);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.history-empty__ico svg { width: 26px; height: 26px; }
.history-empty h3 { font-family: var(--jnj-display); font-size: 17px; color: var(--gray900); margin: 0 0 6px; }
.history-empty p { margin: 0; font-size: 14px; }

/* ===== Modal: nome do PDF (prefixo/código editável) ===== */
.pdf-name__label { display: block; font-size: 13px; font-weight: 600; color: var(--gray800); margin-bottom: 8px; }
.pdf-name { display: flex; align-items: stretch; gap: 6px; }
.pdf-name__fix {
  display: flex; align-items: center; padding: 0 2px;
  font-weight: 700; color: var(--gray600); font-size: 15px; white-space: nowrap;
}
.pdf-name .form-control { border-radius: 8px; height: auto; padding: 9px 12px; }
.pdf-name__code { flex: 0 0 110px; text-align: center; }
.pdf-name__title { flex: 1 1 auto; min-width: 0; }
.pdf-name .form-control:focus { border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.12); }
.pdf-name__preview { display: block; margin-top: 12px; font-size: 12px; color: var(--gray500); word-break: break-all; }

/* Hover da paleta mais elegante (vermelho J&J no lugar do tracejado cinza) */
.content-blocks .list-group-item:hover::before {
  background-color: rgba(235, 23, 0, 0.05);
  border: 2px dashed var(--red500);
  border-radius: 6px;
  opacity: 1;
}

/* ===== Seletor de idioma (dropdown do avatar) ===== */
.lang-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14px; color: var(--gray800); cursor: default; }
.lang-switch:hover, .lang-switch:focus { background: transparent !important; color: var(--gray800) !important; }
.lang-opts { display: inline-flex; gap: 4px; }
.lang-opt { border: 1px solid var(--gray300); background: var(--white); color: var(--gray600); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; cursor: pointer; line-height: 1.2; transition: 0.15s; }
.lang-opt:hover { border-color: var(--gray500); color: var(--gray900); }
.lang-opt.is-active { background: var(--red500); border-color: var(--red500); color: var(--white); }

/* ===== Admin — editor de traduções ===== */
.admin-panel { background: var(--white); border: 1px solid var(--gray200); border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow: hidden; }
.admin-row { display: grid; grid-template-columns: 240px 1fr 1fr 1fr 44px; gap: 12px; align-items: start; padding: 12px 18px; border-bottom: 1px solid var(--gray200); }
.admin-row:last-child { border-bottom: none; }
.admin-row--head { background: var(--gray100); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--gray600); }
.admin-cell--key { min-width: 0; }
.admin-cell--key code { font-size: 12px; color: var(--gray700); word-break: break-all; background: var(--gray100); padding: 3px 6px; border-radius: 5px; }
.admin-row--head .admin-cell--key { color: var(--gray600); }
.admin-input { width: 100%; box-sizing: border-box; min-height: 38px; border: 1px solid var(--gray300); border-radius: 8px; padding: 8px 10px; font-size: 13px; resize: none; overflow: hidden; font-family: inherit; color: var(--gray900); line-height: 1.4; display: block; }
.admin-input:focus { outline: none; border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235,23,0,0.12); }
.admin-input.is-edited { border-color: var(--red500); background: #fffaf9; }
.admin-cell--actions { display: flex; align-items: center; justify-content: center; }
.admin-reset { border: none; background: transparent; color: var(--gray500); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.admin-reset svg { width: 16px; height: 16px; }
.admin-reset:hover { background: var(--gray100); color: var(--red500); }
.admin-empty { padding: 40px; text-align: center; color: var(--gray500); }

.login-lang { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }

/* ===== Admin — abas ===== */
.admin-tabs { display: flex; margin-bottom: 22px; border-bottom: 1px solid var(--gray300); }
.admin-tab { border: none; background: transparent; padding: 10px 2px; margin-right: 28px; font-size: 15px; font-weight: 600; color: var(--gray600); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab:hover { color: var(--gray900); }
.admin-tab.is-active { color: var(--red500); border-bottom-color: var(--red500); }

/* ===== Admin — idiomas ===== */
.admin-langs { padding: 22px 24px; }
.admin-langs__add { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; align-items: center; }
.admin-langs__add .form-control { border-radius: 8px; height: auto; padding: 9px 12px; max-width: 220px; }
.admin-langs__add .form-control:focus { border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235,23,0,0.12); }
.admin-langs__add .builder-btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 10px; font-weight: 700; font-size: 14px; padding: 11px 20px; cursor: pointer; }
.admin-langs__list { display: flex; flex-direction: column; gap: 10px; }
.admin-lang-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--gray200); border-radius: 12px; }
.admin-lang-item__code { flex: none; min-width: 44px; height: 32px; padding: 0 8px; border-radius: 8px; background: var(--gray100); color: var(--gray800); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.admin-lang-item__name { flex: 1; color: var(--gray900); font-weight: 600; }
.admin-lang-item__badge { font-size: 12px; color: var(--gray500); background: var(--gray100); padding: 4px 10px; border-radius: 20px; }
.admin-lang-item__remove { border: 1px solid var(--gray300); background: var(--white); color: var(--red500); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.admin-lang-item__remove:hover { background: #fdf0ee; border-color: var(--red500); }

/* ===== Admin — usuários ===== */
.admin-users { padding: 22px 24px; }
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border: 1px solid var(--gray200); border-radius: 12px; }
.user-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--red500), var(--red700)); color: var(--white); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.user-meta { min-width: 0; }
.user-name { font-weight: 700; color: var(--gray900); font-size: 14px; }
.user-sub { font-size: 12px; color: var(--gray600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.user-status { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }
.user-status--pending { background: #fff4e5; color: #b26a00; }
.user-status--approved { background: #e7f6ec; color: #1f7a3d; }
.user-status--rejected { background: #fdecec; color: #b42318; }
.user-btn { border: 1px solid var(--gray300); background: var(--white); font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.user-btn--approve { color: #1f7a3d; }
.user-btn--approve:hover { background: #e7f6ec; border-color: #1f7a3d; }
.user-btn--reject { color: var(--red500); }
.user-btn--reject:hover { background: #fdf0ee; border-color: var(--red500); }
.user-btn--reset { color: var(--gray700); }
.user-btn--reset:hover { background: var(--gray100); border-color: var(--gray500); }
.user-builtin-note { margin-top: 18px; font-size: 12px; color: var(--gray500); }

/* Origem do usuário (nativo / cadastrado) */
.user-source { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; }
.user-source--builtin { background: #eef1f6; color: #4a5568; }
.user-source--registered { background: #eaf2fb; color: var(--blue600); }

/* Modal de senha redefinida */
.reset-pw__for { font-size: 14px; color: var(--gray700); margin: 0 0 12px; }
.reset-pw__box { display: flex; align-items: center; gap: 10px; }
.reset-pw__value { flex: 1; font-family: monospace; font-size: 18px; font-weight: 700; letter-spacing: 1px; color: var(--gray900); background: var(--gray100); border: 1px solid var(--gray200); border-radius: 10px; padding: 12px 14px; text-align: center; }
.reset-pw__hint { display: block; margin-top: 12px; font-size: 12px; color: var(--gray500); line-height: 1.5; }

/* Login — cadastro */
.signup-message { font-size: 13px; margin-top: 8px; text-align: center; }
.signup-message.is-ok { color: #1f7a3d; }
.signup-message.is-error { color: var(--red500); }

/* ===== Coluna de navegação (sidebar de regiões/pastas) ===== */
.dash-nav {
  flex: none; width: 268px;
  background: var(--white); border-right: 1px solid var(--gray200);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 24px 14px;
}
.dash-nav__head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--gray500); padding: 0 10px; margin-bottom: 14px; }

/* ===== Dashboard — árvore de regiões/pastas ===== */
.dash-tree { padding: 0; }
.dash-tree__item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--gray800); }
.dash-tree__item:hover { background: var(--gray100); }
.dash-tree__item.is-active { background: #fdf0ee; color: var(--red600); font-weight: 600; }
.dash-tree__item--child { padding-left: 30px; font-size: 13px; }
.dash-tree__item--region { font-weight: 600; }
.dash-tree__caret { width: 12px; flex: none; color: var(--gray500); font-size: 10px; text-align: center; }
.dash-tree__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tree__count { flex: none; font-size: 12px; color: var(--gray500); background: var(--gray100); border-radius: 20px; padding: 1px 8px; }
.dash-tree__item.is-active .dash-tree__count { background: rgba(235,23,0,0.12); color: var(--red600); }
.dash-tree__del { flex: none; border: none; background: transparent; color: var(--gray400); cursor: pointer; font-size: 16px; line-height: 1; border-radius: 5px; opacity: 0; max-width: 0; padding: 0; overflow: hidden; transition: max-width 0.12s ease, opacity 0.12s ease; }
.dash-tree__item:hover .dash-tree__del { opacity: 1; max-width: 22px; padding: 0 4px; }
.dash-tree__del:hover { color: var(--red500); background: var(--white); }
.dash-tree__add { display: block; width: 100%; text-align: left; border: none; background: transparent; color: var(--red600); font-weight: 600; font-size: 12px; padding: 6px 10px 6px 30px; cursor: pointer; border-radius: 8px; }
.dash-tree__add:hover { background: var(--gray100); }
.dash-tree__add--region { padding-left: 12px; margin-top: 8px; border-top: 1px solid var(--gray100); border-radius: 0; padding-top: 12px; }
.dash-tree__add--region:hover { background: var(--gray100); border-radius: 8px; }

/* Subpastas: recuo, carets clicáveis, ícones e drag & drop */
.dash-tree__folder { font-size: 13px; }
.dash-tree__folder[draggable="true"] { cursor: grab; }
.dash-tree__folder[draggable="true"]:active { cursor: grabbing; }
.dash-tree__caret--btn { cursor: pointer; border-radius: 4px; }
.dash-tree__caret--btn:hover { background: var(--gray200); color: var(--gray700); }
.dash-tree__caret--empty { visibility: hidden; }
.dash-tree__ico { flex: none; border: none; background: transparent; color: var(--gray400); cursor: pointer; font-size: 14px; line-height: 1; border-radius: 5px; opacity: 0; max-width: 0; padding: 0; overflow: hidden; transition: max-width 0.12s ease, opacity 0.12s ease; }
.dash-tree__item:hover .dash-tree__ico { opacity: 1; max-width: 22px; padding: 0 4px; }
.dash-tree__ico:hover { color: var(--red500); background: var(--white); }
.dash-tree__addsub { font-weight: 700; }
.dash-tree__item--dropok { background: rgba(235,23,0,0.10); box-shadow: inset 0 0 0 1.5px var(--red500); }
.dash-tree__item--dropok * { pointer-events: none; }

/* Selo compartilhado no card */
.email-card__badge--shared { background: #eaf2fb; color: var(--blue600); margin-left: 8px; }

/* Builder — modo somente-leitura */
.builder-readonly-banner { display: flex; align-items: center; gap: 10px; margin: 0 40px 14px; padding: 12px 16px; background: #fff8e6; border: 1px solid #f0d98a; color: #8a6d00; border-radius: 12px; font-size: 14px; }
.builder-readonly-banner svg { width: 18px; height: 18px; flex: none; }
.builder-readonly .email-config { pointer-events: none; opacity: 0.85; }
.builder-readonly #saveAndBack { display: none; }
.builder-readonly .content-blocks .row > .col:first-child { display: none; }
.builder-readonly .content-blocks .row > .col:last-child { flex: 1 1 100%; max-width: 100%; }

/* ===== Galeria de Templates (dashboard) ===== */
.dash-templates { margin-bottom: 30px; }
.dash-templates__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.dash-templates__head h2 { font-family: var(--jnj-display); font-size: 20px; font-weight: 700; color: var(--gray900); margin: 0; }
.dash-templates__sub { font-size: 13px; color: var(--gray500); }
.dash-templates__link { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--red500); text-decoration: none; }
.dash-templates__link:hover { color: var(--red600); text-decoration: underline; }
.tpl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.tpl-empty { grid-column: 1 / -1; padding: 22px; text-align: center; color: var(--gray500); font-size: 14px; background: var(--white); border: 1px dashed var(--gray300); border-radius: 16px; }

.tpl-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--gray200); border-radius: 18px; overflow: hidden; transition: 0.18s; }
.tpl-card:hover { border-color: var(--gray300); box-shadow: 0 10px 24px rgba(0,0,0,0.07); transform: translateY(-2px); }
.tpl-card__thumb { height: 96px; display: flex; align-items: center; justify-content: center; position: relative; }
.tpl-card__thumb.professional { background: linear-gradient(135deg, #fff0ee, #ffe1dc); }
.tpl-card__thumb.acuvue { background: linear-gradient(135deg, #eaf2fb, #d8e8f7); }
.tpl-card__logo { font-family: var(--jnj-display); font-weight: 800; letter-spacing: 0.3px; font-size: 15px; padding: 4px 12px; border-radius: 20px; background: rgba(255,255,255,0.75); }
.tpl-card__thumb.professional .tpl-card__logo { color: var(--red600); }
.tpl-card__thumb.acuvue .tpl-card__logo { color: var(--blue600); }
.tpl-card__body { padding: 14px 16px 6px; flex: 1 1 auto; }
.tpl-card__name { font-size: 15px; font-weight: 700; color: var(--gray900); margin: 0 0 4px; line-height: 1.3; }
.tpl-card__desc { font-size: 12.5px; color: var(--gray500); margin: 0; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 18px; }
.tpl-card__foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px; }
.tpl-card__use { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; background: var(--red500); color: var(--white); font-weight: 700; font-size: 13px; padding: 9px 12px; border-radius: 11px; cursor: pointer; transition: 0.15s; }
.tpl-card__use svg { width: 15px; height: 15px; }
.tpl-card__use:hover { background: var(--red600); box-shadow: 0 6px 16px rgba(235,23,0,0.24); }
.tpl-card.acuvue .tpl-card__use { background: var(--blue500); }
.tpl-card.acuvue .tpl-card__use:hover { background: var(--blue600); box-shadow: 0 6px 16px rgba(15,104,178,0.24); }
.tpl-card__admin { display: flex; gap: 4px; flex: none; }
.tpl-card__ico { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray200); background: var(--white); color: var(--gray500); border-radius: 10px; cursor: pointer; transition: 0.15s; }
.tpl-card__ico svg { width: 15px; height: 15px; }
.tpl-card__ico:hover { background: var(--gray100); color: var(--gray800); }
.tpl-card__ico.js-tpl-del:hover { background: #fdf0ee; color: var(--red500); border-color: #f6cfc8; }

/* Banner "baseado no template" no wizard */
.wizard-tpl-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 11px 15px; background: #fff0ee; border: 1px solid #f6cfc8; color: var(--red700); border-radius: 12px; font-size: 13.5px; }
.wizard-tpl-banner svg { width: 18px; height: 18px; flex: none; color: var(--red500); }
.wizard-tpl-banner strong { color: var(--red700); }

/* ===== Templates: aprovação/solicitação ===== */
/* Selo de status no card do e-mail */
.email-card__badge--tpl { margin-left: 8px; }
.email-card__badge--tpl.is-pending  { background: #fff4e5; color: #b26a00; }
.email-card__badge--tpl.is-rejected { background: #fdecec; color: #b42318; }
.email-card__badge--tpl.is-approved { background: #e7f6ec; color: #1f7a3d; }

/* Status como ícones discretos (Compartilhado / Template) ao lado da base */
.email-card__flags { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; margin-right: auto; }
.email-card__flag { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; flex: none; }
.email-card__flag svg { width: 14px; height: 14px; }
.email-card__flag--shared { background: #eaf2fb; color: var(--blue600); }
.email-card__flag--tpl.is-pending  { background: #fff4e5; color: #b26a00; }
.email-card__flag--tpl.is-rejected { background: #fdecec; color: #b42318; }
.email-card__flag--tpl.is-approved { background: #e7f6ec; color: #1f7a3d; }

/* Item de menu desabilitado (solicitação pendente) */
.email-card__menu-item.is-disabled { opacity: 0.55; cursor: default; }
.email-card__menu-item.is-disabled:hover { background: transparent; }

/* Aviso de pendências no dashboard (admin) */
.tpl-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 13px 18px; background: #fff8e6; border: 1px solid #f0d98a; color: #8a6d00; border-radius: 14px; text-decoration: none; font-size: 14px; font-weight: 600; transition: 0.15s; }
.tpl-notice:hover { background: #fef3d6; color: #6f5700; text-decoration: none; box-shadow: 0 6px 16px rgba(180,140,0,0.12); }
.tpl-notice svg { width: 20px; height: 20px; flex: none; }
.tpl-notice__msg { flex: 1; }
.tpl-notice__cta { flex: none; color: var(--red600); font-weight: 700; }

/* Admin: lista de templates */
.user-btn--del { color: var(--gray500); font-size: 16px; line-height: 1; padding: 6px 10px; }
.user-btn--del:hover { background: #fdf0ee; border-color: var(--red500); color: var(--red500); }
.tpl-base-tag { font-size: 11px; font-weight: 700; color: var(--gray500); background: var(--gray100); border-radius: 6px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }

/* Linha "criado / editado por" no card do e-mail */
.email-card__people { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding-top: 10px; border-top: 1px solid var(--gray100); }
.email-card__person { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-card__person svg { width: 13px; height: 13px; flex: none; color: var(--gray400); }
.email-card__person b { color: var(--gray700); font-weight: 600; }

/* Menu ⋯ no topo do card de template (reusa o dropdown do email-card) */
.tpl-card__menu { position: absolute; top: 8px; right: 8px; }
.tpl-card__menu .email-card__menu-btn { opacity: 1; background: rgba(255,255,255,0.72); color: var(--gray700); }
.tpl-card__menu .email-card__menu-btn:hover { background: #fff; color: var(--gray900); }
.tpl-card__menu .email-card__menu-item { white-space: nowrap; }

/* ===== Galeria de templates (página dedicada) ===== */
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.gallery-filters { display: inline-flex; gap: 6px; background: var(--white); border: 1px solid var(--gray200); border-radius: 14px; padding: 5px; }
.gallery-pill { display: inline-flex; align-items: center; gap: 8px; border: none; background: transparent; color: var(--gray600); font-weight: 600; font-size: 13.5px; padding: 8px 16px; border-radius: 10px; cursor: pointer; transition: 0.15s; }
.gallery-pill:hover { background: var(--gray100); color: var(--gray900); }
.gallery-pill.is-active { background: var(--gray900); color: var(--white); }
.gallery-pill__count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11.5px; font-weight: 700; border-radius: 20px; background: var(--gray100); color: var(--gray600); }
.gallery-pill.is-active .gallery-pill__count { background: rgba(255,255,255,0.22); color: var(--white); }

.tpl-gallery--page { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* Miniatura com preview renderizado (iframe escalado) */
.tpl-card__thumb--preview { height: 190px; padding: 0; overflow: hidden; align-items: flex-start; justify-content: flex-start; background: var(--gray100); }
.tpl-card__thumb--preview::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 46px; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(255,255,255,0.92), rgba(255,255,255,0)); }
.tpl-thumb__scaler { width: 100%; height: 100%; overflow: hidden; position: relative; background: #fff; }
.tpl-thumb__frame { border: 0; transform-origin: top left; background: #fff; pointer-events: none; display: block; }

/* Badge de audiência (Consumer / Professional) */
.tpl-card__badge { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.tpl-card__badge--consumer { color: var(--blue600); }
.tpl-card__badge--professional { color: var(--red600); }

/* ===== Página de perfil ===== */
.profile-wrap { max-width: 640px; margin: 0 auto; }
.profile-card { background: var(--white); border: 1px solid var(--gray200); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.07); }
.profile-card__cover { position: relative; height: 132px; overflow: hidden; background: linear-gradient(135deg, #ff4127 0%, var(--red500) 46%, var(--red700) 100%); }
.profile-card__cover::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(150px 150px at 88% -30%, rgba(255,255,255,0.28), transparent 70%),
    radial-gradient(180px 180px at 6% 130%, rgba(0,0,0,0.20), transparent 70%);
}
.profile-card__head { display: flex; align-items: flex-end; gap: 24px; padding: 0 30px; margin-top: -52px; position: relative; }
.profile-card__avatar {
  position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%;
  border: 4px solid var(--white); cursor: pointer;
  background: linear-gradient(135deg, #3a3a3a, var(--ink));
  color: var(--white); font-family: var(--jnj-display); font-weight: 700; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18); overflow: visible; margin: 0;
}
.profile-card__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.profile-card__cam {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--red500); color: var(--white); border: 3px solid var(--white);
  display: flex; align-items: center; justify-content: center; transition: 0.15s;
}
.profile-card__cam svg { width: 14px; height: 14px; }
.profile-card__avatar:hover .profile-card__cam { background: var(--red600); transform: scale(1.06); }
.profile-card__id { padding-top: 40px; padding-bottom: 2px; min-width: 0; }
.profile-card__namerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 3px; }
.profile-card__id h2 { font-family: var(--jnj-display); font-size: 22px; font-weight: 700; color: var(--gray900); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card__id p { margin: 0; font-size: 14px; color: var(--gray600); }
.profile-role { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 9px; border-radius: 20px; background: #eef1f6; color: #4a5568; }
.profile-role--admin { background: #fdecec; color: var(--red600); }

.profile-card__body { padding: 24px 28px 28px; }
.profile-form { padding: 0; }
.profile-card__body form + form { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--gray200); }
.profile-section-title { font-family: var(--jnj-display); font-size: 17px; font-weight: 700; color: var(--gray900); margin: 0 0 18px; }
.pw-message { font-size: 13px; margin: 0 0 14px; }
.pw-message.is-ok { color: #1f7a3d; }
.pw-message.is-error { color: var(--red500); }
.profile-field { margin-bottom: 18px; }
.profile-field label { display: block; font-size: 13px; font-weight: 600; color: var(--gray800); margin-bottom: 7px; }
.profile-field label .req { color: var(--red500); }
.profile-form .form-control {
  height: auto; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--gray300);
  font-size: 14px; color: var(--gray900); transition: border-color 0.15s, box-shadow 0.15s;
}
.profile-form .form-control:focus { border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235,23,0,0.12); }
.profile-form__actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--gray200); }
.profile-form__actions .builder-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 11px;
  font-weight: 700; font-size: 14px; padding: 11px 22px; cursor: pointer;
  text-decoration: none; transition: background 0.18s, box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}
.profile-form__actions .builder-btn:focus { outline: none; }
.profile-form__actions .builder-btn:focus-visible { box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.25); }
.profile-form__actions .builder-btn--primary { background: var(--red500); color: var(--white); box-shadow: 0 6px 16px rgba(235, 23, 0, 0.24); }
.profile-form__actions .builder-btn--primary:hover { background: var(--red600); color: var(--white); box-shadow: 0 10px 22px rgba(235, 23, 0, 0.30); transform: translateY(-1px); }
.profile-form__actions .builder-btn--ghost { background: var(--white); color: var(--gray700); border-color: var(--gray300); }
.profile-form__actions .builder-btn--ghost:hover { background: var(--gray100); color: var(--gray900); border-color: var(--gray400); }

/* ===== Perfil — layout em duas colunas (estilo Gridlines) ===== */
.profile2 { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 20px; align-items: start; max-width: 1040px; margin: 0 auto; }
.profile2__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.profile2__rail { position: sticky; top: 20px; }

.pcard { background: var(--white); border: 1px solid var(--gray200); border-radius: 16px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.pcard__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pcard__title { font-family: var(--jnj-display); font-size: 16px; font-weight: 700; color: var(--gray900); margin: 0; }
.pcard__edit-btn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--gray700); background: var(--white); border: 1px solid var(--gray300); border-radius: 9px; padding: 7px 13px; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.pcard__edit-btn:hover { background: var(--gray100); color: var(--gray900); border-color: var(--gray400); }
.pcard__edit-btn svg { width: 15px; height: 15px; }

/* alternância leitura / edição */
.pcard__edit { display: none; }
.pcard.is-editing .pcard__read { display: none; }
.pcard.is-editing .pcard__edit { display: block; }
.pcard.is-editing .pcard__edit-btn { visibility: hidden; }

.pcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.pcard-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pcard-field__label { font-size: 11.5px; font-weight: 600; color: var(--gray500); text-transform: uppercase; letter-spacing: 0.4px; }
.pcard-field__val { font-size: 14.5px; font-weight: 500; color: var(--gray900); overflow: hidden; text-overflow: ellipsis; }

/* card de avatar */
.pcard--avatar { display: flex; align-items: center; gap: 20px; }
.pcard-avatar__pic { position: relative; width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; background: var(--gray900); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--jnj-display); font-size: 28px; font-weight: 700; cursor: pointer; margin: 0; }
.pcard-avatar__pic img { width: 100%; height: 100%; object-fit: cover; }
.pcard-avatar__info { min-width: 0; }
.pcard-avatar__btn { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--gray800); background: var(--white); border: 1px solid var(--gray300); border-radius: 10px; padding: 9px 16px; cursor: pointer; margin: 0; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.pcard-avatar__btn:hover { background: var(--gray100); color: var(--gray900); border-color: var(--gray400); }
.pcard-avatar__hint { margin: 9px 0 0; font-size: 12.5px; color: var(--gray500); line-height: 1.5; }

/* painel Conta */
.pcard--account .pcard__title { margin-bottom: 6px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--gray100); }
.acct-row__label { font-size: 13px; font-weight: 600; color: var(--gray500); }
.acct-row__val { font-size: 13.5px; font-weight: 600; color: var(--gray900); }
.acct-row__val--ellip { max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-links { margin-top: 14px; display: flex; flex-direction: column; gap: 3px; }
.acct-link { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--gray700); text-decoration: none; transition: background 0.15s, color 0.15s; }
.acct-link:hover { background: var(--gray100); color: var(--gray900); }
.acct-link svg { width: 16px; height: 16px; flex: none; }
.acct-link--danger { color: var(--red600); }
.acct-link--danger:hover { background: rgba(235, 23, 0, 0.07); color: var(--red600); }

@media (max-width: 900px) {
  .profile2 { grid-template-columns: 1fr; }
  .profile2__rail { position: static; }
}

/* ===== Notificações (sino + painel) ===== */
.notif { position: relative; display: inline-flex; }
.notif__bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: transparent; border: 1px solid transparent; color: var(--gray600);
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.notif__bell:hover { background: var(--gray100); color: var(--gray900); border-color: var(--gray200); }
.notif__bell.has-unread { color: var(--gray900); }
.notif__bell svg { width: 20px; height: 20px; }
.notif__badge {
  position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red500); color: var(--white); font-size: 10px; font-weight: 700;
  border-radius: 9px; border: 2px solid var(--white); line-height: 1;
}

.notif__panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 60;
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--white); border: 1px solid var(--gray200); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14); overflow: hidden;
}
.notif__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--gray100);
}
.notif__title { font-family: var(--jnj-display); font-size: 15px; font-weight: 700; color: var(--gray900); }
.notif__markall {
  font-size: 12px; font-weight: 600; color: var(--red500);
  background: none; border: none; cursor: pointer; padding: 2px; white-space: nowrap;
}
.notif__markall:hover { color: var(--red600); text-decoration: underline; }
.notif__list { max-height: 400px; overflow-y: auto; }
.notif__empty { padding: 32px 16px; text-align: center; color: var(--gray500); font-size: 13px; }
.notif__item {
  width: 100%; display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; background: transparent; border: none; border-bottom: 1px solid var(--gray100);
  text-align: left; cursor: pointer; transition: background 0.15s;
}
.notif__item:last-child { border-bottom: none; }
.notif__item:hover { background: var(--gray100); }
.notif__item.is-unread { background: rgba(235, 23, 0, 0.035); }
.notif__icon {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gray100); font-size: 16px;
}
.notif__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif__text { font-size: 13.5px; color: var(--gray900); line-height: 1.4; }
.notif__time { font-size: 11.5px; color: var(--gray500); }
.notif__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--red500); margin-top: 6px; }

/* ===== Ordenação + Carregar mais ===== */
.dash-sort { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dash-sort label { font-size: 13px; color: var(--gray500); font-weight: 500; }
.dash-sort__select {
  appearance: none; -webkit-appearance: none;
  background: var(--white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a39992' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 11px center;
  border: 1px solid var(--gray300); border-radius: 10px;
  padding: 8px 32px 8px 13px; font-size: 13px; font-weight: 600; color: var(--gray900); cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-sort__select:hover { border-color: var(--gray400); }
.dash-sort__select:focus { outline: none; border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235,23,0,0.12); }
.dash-loadmore { display: flex; justify-content: center; margin-top: 26px; }
.dash-loadmore:empty { display: none; }
.dash-loadmore__btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); color: var(--gray800); border: 1px solid var(--gray300);
  font-weight: 700; font-size: 14px; padding: 11px 26px; border-radius: 12px; cursor: pointer;
  transition: 0.15s;
}
.dash-loadmore__btn:hover { border-color: var(--red500); color: var(--red600); box-shadow: 0 6px 16px rgba(0,0,0,0.07); transform: translateY(-1px); }

/* Chips de região (filtro mobile) — escondidos no desktop */
.dash-chips { display: none; }

/* =====================================================================
   Mobile (páginas de navegação/gestão) — rail vira barra inferior fixa.
   O builder (mockup/wizard) segue desktop-only (ver emd-style.css).
   ===================================================================== */
@media (max-width: 768px) {
  .dash-body-root:not(.builder-body) .dash-shell { display: block; min-height: 100vh; }

  /* Rail lateral -> barra inferior fixa */
  .dash-body-root:not(.builder-body) .dash-rail {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; height: 62px;
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: 0 10px; gap: 6px;
    border-right: 0; border-top: 1px solid var(--ink-soft);
    z-index: 200;
  }
  .dash-body-root:not(.builder-body) .dash-rail__logo { display: none; }
  .dash-body-root:not(.builder-body) .dash-rail__nav {
    flex-direction: row; justify-content: space-around; align-items: center; flex: 1; gap: 4px;
  }
  .dash-body-root:not(.builder-body) .dash-rail__item { width: 46px; height: 42px; border-radius: 12px; }
  .dash-body-root:not(.builder-body) .dash-rail__logout { flex: none; width: 46px; height: 42px; }

  /* Árvore de organização (regiões) escondida no mobile */
  .dash-body-root:not(.builder-body) .dash-nav { display: none; }

  /* Conteúdo full width + espaço para a barra inferior */
  .dash-body-root:not(.builder-body) .dash-content { min-height: 100vh; }
  .dash-body-root:not(.builder-body) .dash-topbar {
    flex-direction: column; align-items: stretch; padding: 18px 18px 6px; gap: 12px;
  }
  .dash-body-root:not(.builder-body) .dash-topbar__actions { width: 100%; justify-content: space-between; gap: 12px; }
  /* No mobile a busca vira ícone -> modal (libera espaço no topbar) */
  .dash-body-root:not(.builder-body) .dash-search { display: none; }
  .dash-body-root:not(.builder-body) .dash-search-btn { display: inline-flex; }
  /* No mobile, só o avatar (esconde o nome) pra sobrar espaço pra busca */
  .dash-body-root:not(.builder-body) .dash-topbar__actions .user-profile .cut { display: none; }
  .dash-body-root:not(.builder-body) .dash-topbar__actions .user-profile .dropdown-toggle { padding-right: 0; }
  /* Menu do avatar: abre alinhado à direita pra não vazar da tela */
  .dash-body-root:not(.builder-body) .dash-topbar__actions .user-profile .dropdown-menu {
    right: 0; left: auto; max-width: calc(100vw - 24px);
  }
  .dash-search__kbd { display: none; }
  .dash-body-root:not(.builder-body) .dash-main { padding: 12px 18px 88px; }

  /* Seções e grids empilham */
  .dash-grid { grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
  .stats-cards { grid-template-columns: 1fr; }
  .email-grid, .tpl-gallery, .tpl-gallery--page { grid-template-columns: 1fr; }
  .dash-greet__title { font-size: 22px; }

  /* Cabeçalho "Seus e-mails": título + contagem numa linha, ordenar embaixo */
  .dash-emails__head { flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 10px; margin-bottom: 12px; }
  .dash-emails__head h2 { white-space: nowrap; font-size: 18px; }
  .dash-emails__count { white-space: nowrap; }
  .dash-sort { flex: 0 0 100%; margin-left: 0; gap: 0; }
  .dash-sort label { display: none; }
  .dash-sort__select { width: 100%; }

  /* Perfil e galeria: respiros menores */
  .profile-wrap { max-width: 100%; }
  .gallery-toolbar { gap: 12px; }
  .gallery-filters { width: 100%; justify-content: space-between; }

  /* Chips de região: faixa horizontal rolável com ícones */
  .dash-chips {
    display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 0 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  }
  .dash-chips::-webkit-scrollbar { display: none; }
  .dash-chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--gray200); background: var(--white); color: var(--gray700);
    padding: 8px 13px; border-radius: 22px; font-size: 13px; font-weight: 600; cursor: pointer;
    white-space: nowrap; transition: 0.15s; scroll-snap-align: start;
  }
  .dash-chip svg { width: 15px; height: 15px; flex: none; color: var(--gray500); }
  .dash-chip__count { font-size: 11px; font-weight: 700; color: var(--gray500); background: var(--gray100); border-radius: 20px; padding: 1px 7px; }
  .dash-chip.is-active { background: var(--gray900); color: var(--white); border-color: var(--gray900); }
  .dash-chip.is-active svg,
  .dash-chip.is-active .dash-chip__count { color: var(--white); }
  .dash-chip.is-active .dash-chip__count { background: rgba(255,255,255,0.22); }

  /* "Seus e-mails" vira carrossel: swipe horizontal com espiada no próximo */
  #emailGrid.email-grid {
    display: flex; grid-template-columns: none;
    overflow-x: auto; gap: 14px; padding: 4px 0 10px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  #emailGrid.email-grid::-webkit-scrollbar { display: none; }
  #emailGrid.email-grid > .email-card { flex: 0 0 86%; scroll-snap-align: start; }

  /* Templates da home: mesmo carrossel horizontal com espiada no próximo */
  #templateGallery.tpl-gallery {
    display: flex; grid-template-columns: none;
    overflow-x: auto; gap: 14px; padding: 4px 0 10px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  #templateGallery.tpl-gallery::-webkit-scrollbar { display: none; }
  #templateGallery.tpl-gallery > .tpl-card { flex: 0 0 86%; scroll-snap-align: start; }
}

/* ===== Toasts (notificações de ação) ===== */
.emd-toasts { position: fixed; top: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.emd-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 11px;
  min-width: 240px; max-width: 380px; padding: 12px 15px; border-radius: 12px;
  background: var(--white); border: 1px solid var(--gray200);
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
  font-size: 14px; color: var(--gray800); cursor: pointer;
  transform: translateX(120%); opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.emd-toast.is-in { transform: translateX(0); opacity: 1; }
.emd-toast.is-out { transform: translateX(120%); opacity: 0; }
.emd-toast__ico { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.emd-toast__ico svg { width: 14px; height: 14px; }
.emd-toast__msg { line-height: 1.35; }
.emd-toast--success .emd-toast__ico { background: #e7f6ec; color: #1f7a3d; }
.emd-toast--error .emd-toast__ico { background: #fdecec; color: var(--red600); }
.emd-toast--info .emd-toast__ico { background: #eef1f6; color: #4a5568; }

/* Mobile: toasts embaixo, acima da barra inferior fixa */
@media (max-width: 768px) {
  .emd-toasts { top: auto; bottom: 78px; left: 12px; right: 12px; }
  .emd-toast { min-width: 0; max-width: 100%; }
}

/* ===== Seletor de imagem (Biblioteca J&J + upload) ===== */
.imgpicker { position: fixed; inset: 0; z-index: 3500; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.45); padding: 20px; }
.imgpicker[hidden] { display: none; }
.imgpicker__panel { width: 100%; max-width: 560px; max-height: 84vh; display: flex; flex-direction: column; background: var(--white); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.28); }
.imgpicker__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--gray200); font-family: var(--jnj-display); font-weight: 700; font-size: 17px; color: var(--gray900); }
.imgpicker__close { border: none; background: transparent; font-size: 24px; line-height: 1; color: var(--gray500); cursor: pointer; border-radius: 8px; padding: 0 6px; }
.imgpicker__close:hover { background: var(--gray100); color: var(--gray900); }
.imgpicker__body { padding: 18px 20px; overflow-y: auto; }
.imgpicker__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray500); margin-bottom: 12px; }
.imgpicker__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.imgpicker__tile { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1px solid var(--gray200); background: var(--white); border-radius: 12px; padding: 12px 8px; cursor: pointer; transition: 0.15s; }
.imgpicker__tile:hover { border-color: var(--red500); box-shadow: 0 6px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.imgpicker__thumb { width: 100%; height: 60px; display: flex; align-items: center; justify-content: center; }
.imgpicker__thumb img { max-width: 100%; max-height: 60px; object-fit: contain; }
.imgpicker__name { font-size: 11.5px; color: var(--gray700); text-align: center; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.imgpicker__foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--gray200); }
.imgpicker__foot .builder-btn { margin: 0 !important; }

/* Wizard — campos de agendamento (Batch and Blast) */
.wizard-batch__row { display: flex; gap: 14px; }
.wizard-batch__col { flex: 1; min-width: 0; }

/* ===== Onboarding (boas-vindas + tour) ===== */
.onb-catcher { position: fixed; inset: 0; z-index: 4000; }
.onb-spot { position: fixed; z-index: 4001; border-radius: 12px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(15,17,20,0.55), 0 0 0 2px var(--red500) inset;
  transition: all 0.25s ease; }
.onb-tip { position: fixed; z-index: 4002; width: 300px; max-width: calc(100vw - 24px);
  background: var(--white); border-radius: 14px; box-shadow: 0 18px 46px rgba(0,0,0,0.28);
  padding: 16px 18px; }
.onb-tip__step { font-size: 11px; font-weight: 700; color: var(--red500); letter-spacing: 0.5px; margin-bottom: 6px; }
.onb-tip__title { font-family: var(--jnj-display); font-size: 16px; font-weight: 700; color: var(--gray900); margin-bottom: 6px; }
.onb-tip__text { font-size: 13.5px; color: var(--gray600); line-height: 1.5; margin-bottom: 14px; }
.onb-tip__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.onb-tip__nav { display: inline-flex; gap: 8px; }

.onb-btn { border: none; border-radius: 9px; font-size: 13px; font-weight: 600; padding: 8px 14px; cursor: pointer; transition: 0.15s; }
.onb-btn--primary { background: var(--red500); color: var(--white); }
.onb-btn--primary:hover { background: var(--red600); box-shadow: 0 6px 16px rgba(235,23,0,0.24); }
.onb-btn--ghost { background: transparent; color: var(--gray600); }
.onb-btn--ghost:hover { background: var(--gray100); color: var(--gray900); }

.onb-welcome { position: fixed; inset: 0; z-index: 4001; display: flex; align-items: center; justify-content: center; background: rgba(15,17,20,0.55); padding: 20px; }
.onb-welcome__card { width: 100%; max-width: 440px; background: var(--white); border-radius: 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.3); padding: 32px 30px; text-align: center; }
.onb-welcome__badge { width: 60px; height: 60px; border-radius: 17px; margin: 0 auto 20px; background: linear-gradient(135deg, var(--red500), var(--red700)); color: var(--white); font-family: var(--jnj-display); font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(235,23,0,0.3); }
.onb-welcome__title { font-family: var(--jnj-display); font-size: 22px; font-weight: 700; color: var(--gray900); margin: 0 0 10px; }
.onb-welcome__text { font-size: 14.5px; color: var(--gray600); line-height: 1.55; margin: 0 0 24px; }
.onb-welcome__actions { display: flex; justify-content: center; gap: 10px; }

/* Mobile: tooltip mais estreito */
@media (max-width: 768px) { .onb-tip { width: calc(100vw - 24px); } }

/* Botões de Desfazer/Refazer no builder */
.builder-history { display: inline-flex; gap: 6px; margin-left: 14px; margin-right: auto; }
.builder-history__btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--gray200); background: var(--white); color: var(--gray600); border-radius: 9px; cursor: pointer; transition: 0.15s; }
.builder-history__btn svg { width: 16px; height: 16px; }
.builder-history__btn:hover:not(:disabled) { background: var(--gray100); color: var(--gray900); border-color: var(--gray300); }
.builder-history__btn:disabled { opacity: 0.4; cursor: default; }

/* Campo de alt-text no seletor de imagem */
.imgpicker__alt { margin-bottom: 16px; }
.imgpicker__alt label { display: block; font-size: 12px; font-weight: 600; color: var(--gray800); margin-bottom: 6px; }
.imgpicker__alt .form-control { width: 100%; border-radius: 9px; border: 1px solid var(--gray300); font-size: 14px; padding: 9px 12px; height: auto; }
.imgpicker__alt .form-control:focus { outline: none; border-color: var(--red500); box-shadow: 0 0 0 3px rgba(235,23,0,0.12); }
