/* ============================================================
   HUB de Onboarding Olist — CSS Global
   Design tokens extraídos de hub-onboarding-olist/app/src/theme.ts
   Font: Plus Jakarta Sans (Google Fonts, importado no base.html)
   ============================================================ */

:root {
  --bg: #f2f0e8;
  --white: #ffffff;
  --navy: #001647;
  --blue: #0a4ee4;
  --blue-disabled: #b9c6ee;
  --green: #779e3d;
  --green-soft: #e9f2df;
  --red: #e64e36;
  --orange: #f0a028;
  --teal: #8dd7d7;
  --pink: #df9fc7;
  --text-muted: #5c5f6b;
  --text-faint: #8a8d97;
  --border: #e4e1d6;
  --border-light: #f0eee5;
  --border-lighter: #f7f5ef;

  --shadow-card: 0 2px 10px rgba(0, 22, 71, 0.06);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.25);
  --shadow-popover: 0 16px 40px rgba(0, 22, 71, 0.18);
  --shadow-auth: 0 20px 60px rgba(0, 22, 71, 0.1);

  --font: "Plus Jakarta Sans", Arial, sans-serif;
  --radius-card: 18px;
  --radius-btn: 999px;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--navy);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* ── Auth shell ── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-auth);
  padding: 44px 40px;
}

.auth-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
}

.auth-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.auth-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.2;
}

.auth-title--sm {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 20px;
}

.auth-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 28px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: opacity 0.15s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn:hover:not(:disabled) {
  opacity: 0.88;
}

.btn--primary {
  background: var(--blue);
  color: var(--white);
}
.btn--navy {
  background: var(--navy);
  color: var(--white);
}
.btn--outline {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn--danger {
  background: var(--white);
  color: var(--red);
  border: 1.5px solid var(--border);
}
.btn--green {
  background: var(--green);
  color: var(--white);
  border: none;
}
.btn--teal {
  background: var(--teal);
  color: var(--navy);
  border: none;
}

.btn--full {
  width: 100%;
}
.btn--lg {
  padding: 14px 18px;
  font-size: 15px;
}
.btn--sm {
  padding: 8px 14px;
  font-size: 12.5px;
}

/* ── Forms ── */
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hub-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--navy);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
}

.hub-input:focus {
  border-color: var(--blue);
}

textarea.hub-input {
  resize: vertical;
  min-height: 80px;
}

.field-error {
  font-size: 12px;
  font-weight: 600;
  color: var(--red);
  margin-top: 4px;
}
.field-ok {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  margin-top: 4px;
}

/* ── Segment pill selector ── */
.segment-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  padding: 14px 16px;
  border-radius: 12px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 10px;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.segment-btn.active {
  border-color: var(--blue);
  background: #eef3ff;
}

.segment-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.segment-btn.active .segment-check {
  background: var(--blue);
  border-color: var(--blue);
}

/* ── Client shell ── */
.client-shell {
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.client-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.client-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.client-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.client-greeting {
  font-weight: 600;
  font-size: 16px;
  color: var(--navy);
}

/* Navbar pill */
.client-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
}

.client-nav a {
  position: relative;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--navy);
  background: transparent;
  transition:
    background 0.15s,
    color 0.15s;
}

.client-nav a.active,
.client-nav a[aria-current="page"] {
  background: var(--blue);
  color: var(--white);
}

.client-nav a .notif-dot {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 999px;
}

/* Header actions */
.client-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.icon-btn {
  position: relative;
  border: none;
  background: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.notif-badge {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 999px;
}

.avatar-btn {
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-popover);
  padding: 14px;
  z-index: 150;
  display: none;
}

.dropdown.open {
  display: block;
}

.notif-dropdown {
  width: min(340px, calc(100vw - 28px));
  padding: 8px;
}
.avatar-dropdown {
  width: 200px;
}

.notif-header {
  padding: 12px 14px 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
}

.notif-item {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.notif-item:hover {
  background: var(--bg);
}

.notif-item:first-of-type {
  background: var(--bg);
}

.support-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 14px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow-popover);
  z-index: 120;
}

/* ── Admin shell ── */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 230px;
  background: var(--navy);
  flex-shrink: 0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
}

.admin-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  margin-bottom: 32px;
  flex-shrink: 0;
}

.admin-sidebar-logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
}

.admin-sidebar-brand {
  font-weight: 600;
  font-size: 14px;
  color: var(--white);
  white-space: nowrap;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-sidebar-nav a {
  display: block;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #c9cedd;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
}

.admin-sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.admin-sidebar-nav a.active,
.admin-sidebar-nav a[aria-current="page"] {
  background: var(--blue);
  color: var(--white);
}

.admin-sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 8px;
}

.admin-sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-content {
  flex: 1;
  padding: 36px 40px;
  /* max-width: 1180px; */
  min-width: 0;
  background: var(--white);
  padding-left: 264px;
}

/* ── Cards / layout helpers ── */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 26px;
}

.card--navy {
  background: var(--navy);
  color: var(--white);
}
.card--blue {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 20px 48px rgba(10, 78, 228, 0.28);
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 24px;
}

.page-title--sm {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}

.page-section-title {
  font-size: 18px;
  color: var(--navy);
  margin: 0 0 6px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* ── Progress bar ── */
.progress-track {
  height: 8px;
  background: var(--border-light);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 5px;
  transition: width 0.4s;
}

.progress-fill--white {
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

/* ── Filter pills ── */
.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-pill {
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-card);
  transition:
    background 0.15s,
    color 0.15s;
}

.filter-pill.active {
  background: var(--blue);
  color: var(--white);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge--new {
  background: var(--red);
  color: var(--white);
}
.badge--hot {
  background: #f0a02826;
  color: var(--orange);
}
.badge--teal {
  background: var(--teal);
  color: var(--navy);
}
.badge--green {
  background: var(--green);
  color: var(--white);
}

/* ── Modal overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 22, 71, 0.45);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background: var(--white);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-modal);
}

/* ── Client communication modal ── */
.comm-modal {
  --comm-accent: var(--blue);
  --comm-accent-soft: #0a4ee40d;
  position: relative;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 0 32px 28px;
}
.comm-modal--acao { --comm-accent: var(--red); --comm-accent-soft: #e64e360f; }
.comm-modal--importante { --comm-accent: var(--orange); --comm-accent-soft: #f0a02814; }
.comm-modal--novidade { --comm-accent: var(--blue); --comm-accent-soft: #0a4ee40d; }
.comm-modal--pesquisa { --comm-accent: var(--pink); --comm-accent-soft: #df9fc71a; }

.comm-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -32px 20px;
  padding: 20px 32px 18px;
  background: var(--comm-accent-soft);
  border-top: 6px solid var(--comm-accent);
}
.comm-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.comm-modal__close {
  all: unset;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.comm-modal__close:hover,
.comm-modal__close:focus-visible {
  background: var(--white);
  color: var(--navy);
}

.comm-modal__date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.comm-modal__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin: 0 0 14px;
}
.comm-modal__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  padding-left: 14px;
  border-left: 3px solid var(--comm-accent);
}

.comm-modal__footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.comm-modal__prompt {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.comm-modal__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comm-modal__option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  transition: border-color 0.15s, background 0.15s;
}
.comm-modal__option:hover,
.comm-modal__option:focus-visible {
  border-color: var(--blue);
  background: #eef3ff;
  outline: none;
}
.comm-modal__radio {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.comm-modal__option:hover .comm-modal__radio,
.comm-modal__option:focus-visible .comm-modal__radio {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 9px var(--blue);
}
.comm-modal__done {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}
.comm-modal__done strong {
  color: var(--navy);
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 12px;
  }
  .comm-modal {
    padding: 0 20px 20px;
  }
  .comm-modal__header {
    margin: 0 -20px 16px;
    padding: 16px 20px 14px;
  }
  .comm-modal__title {
    font-size: 19px;
  }
  .comm-modal__body {
    font-size: 14px;
  }
}

/* ── Popup comm ── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 22, 71, 0.45);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.popup-overlay[hidden] {
  display: none;
}

/* ── Journey task cards ── */
.task-card {
  background: var(--white);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}

.task-card--current {
  border: 1.5px solid var(--blue);
}
.task-card--locked {
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}

.task-type-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.task-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.task-icon--done {
  background: var(--green);
  color: var(--white);
}
.task-icon--current {
  background: var(--blue);
  color: var(--white);
}
.task-icon--locked {
  background: var(--bg);
  color: var(--text-faint);
}

/* ── Journey track switcher ── */
.track-pill {
  border: none;
  cursor: pointer;
  padding: 9px 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
}
.track-pill.active {
  background: var(--blue);
  color: #fff;
}

/* ── Day stepper ── */
.day-stepper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 8px;
  overflow-x: auto;
}
.day-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: none;
}
.day-chip {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.day-connector {
  flex: none;
  width: 48px;
  height: 2px;
  background: var(--border);
  margin: 0 8px 20px;
}
.day-connector--done {
  background: var(--green);
}

/* ── Comm item ── */
.comm-item {
  background: var(--white);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  margin-bottom: 10px;
}

.comm-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.comm-icon--comunicado {
  background: var(--teal);
}
.comm-icon--enquete {
  background: var(--pink);
}

/* ── Admin: communications list ── */
.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-pill__count {
  display: inline-block;
  min-width: 20px;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--border-light);
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}
.filter-pill.active .filter-pill__count {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.badge--soft { background: var(--border-light); color: var(--text-muted); }
.badge--cat-acao { background: #e64e361f; color: var(--red); }
.badge--cat-importante { background: #f0a02826; color: #b26f0a; }
.badge--cat-novidade { background: #0a4ee41a; color: var(--blue); }
.badge--cat-pesquisa { background: #df9fc733; color: #9c4a7c; }
.badge--status-active { background: var(--green-soft); color: var(--green); }
.badge--status-archived { background: #f0a02826; color: #b26f0a; }
.badge--status-deleted { background: #e64e361f; color: var(--red); }

.comm-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comm-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 220px auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.comm-row:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}
.comm-row[hidden] {
  display: none;
}
.comm-row > .comm-icon {
  align-self: flex-start;
}

.comm-row__main {
  min-width: 0;
}
.comm-row__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.comm-row__title {
  all: unset;
  display: block;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}
.comm-row__title:hover,
.comm-row__title:focus-visible {
  color: var(--blue);
}
.comm-row__excerpt {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.comm-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

.comm-row__reach-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.comm-row__reach-label strong {
  color: var(--navy);
}
.comm-row__link {
  all: unset;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.comm-row__link:hover,
.comm-row__link:focus-visible {
  text-decoration: underline;
}

.comm-row__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.comm-list__empty {
  padding: 40px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  border: 1.5px dashed var(--border);
  border-radius: 16px;
}

.audience-modal {
  max-width: 520px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.audience-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  min-height: 120px;
  max-height: 50vh;
  border: 1px solid var(--border-light);
  border-radius: 12px;
}
.audience-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--navy);
  border-bottom: 1px solid var(--border-lighter);
}
.audience-list li:last-child {
  border-bottom: none;
}
.audience-list li[hidden] {
  display: none;
}
.audience-list li > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audience-list__empty {
  justify-content: center !important;
  color: var(--text-faint) !important;
}

@media (max-width: 1100px) {
  .comm-row {
    grid-template-columns: auto minmax(0, 1fr) 200px;
  }
  .comm-row__actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .comm-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }
  .comm-row__reach,
  .comm-row__actions {
    grid-column: 1 / -1;
  }
  .comm-row__actions {
    flex-wrap: wrap;
  }
  .comm-row__actions .btn {
    flex: 1;
  }
}

/* ── Community post ── */
.post-card {
  background: var(--white);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.post-card__response {
  overflow-wrap: anywhere;
}

.post-card__response a {
  color: var(--blue);
  text-decoration: underline;
}

.post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Admin table ── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1.5px solid var(--border);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-lighter);
  color: var(--navy);
  vertical-align: top;
}
.admin-table tr:hover td {
  background: var(--bg);
}
.admin-section {
  margin-bottom: 32px;
}
.admin-section + .admin-section {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.admin-section__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px;
}
.admin-section__subheading {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px;
}
.admin-table-action .btn{
  margin-left: 8px;
}

/* ── Stats tile ── */
.stat-tile {
  background: var(--bg);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-tile__value {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.stat-tile__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Tile grid ── */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

/* ── Alerts ── */
.alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.alert--error {
  background: #fde8e5;
  color: var(--red);
}
.alert--success {
  background: var(--green-soft);
  color: var(--green);
}
.alert--info {
  background: #e6ecfd;
  color: var(--blue);
}

/* ── Misc utilities ── */
.text-muted {
  color: var(--text-muted);
}
.text-faint {
  color: var(--text-faint);
}
.text-navy {
  color: var(--navy);
}
.text-blue {
  color: var(--blue);
}
.text-green {
  color: var(--green);
}
.text-red {
  color: var(--red);
}
.text-sm {
  font-size: 13px;
}
.text-xs {
  font-size: 11px;
}
.fw-600 {
  font-weight: 600;
}
.fw-700 {
  font-weight: 700;
}
.mb-0 {
  margin-bottom: 0;
}
.mt-auto {
  margin-top: auto;
}
.gap-8 {
  gap: 8px;
}
.d-flex {
  display: flex;
}
.align-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.flex-wrap {
  flex-wrap: wrap;
}

/* ── Guided tour ── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
}
.tour-spotlight {
  position: fixed;
  border-radius: 999px;
  box-shadow: 0 0 0 9999px rgba(0, 22, 71, 0.6);
  z-index: 9992;
  pointer-events: none;
  transition:
    top 0.25s ease,
    left 0.25s ease,
    width 0.25s ease,
    height 0.25s ease;
}
.tour-card {
  position: fixed;
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 22, 71, 0.22);
  z-index: 9996;
  pointer-events: auto;
}
.tour-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tour-counter {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}
.tour-skip {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-decoration: underline;
}
.tour-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.tour-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.tour-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.tour-highlight {
  z-index: 9994;
}
.tour-highlight:not(.support-btn) {
  position: relative;
}
.support-btn.tour-highlight {
  z-index: 9995;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.week-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  height: 100%;
}
.week-card__desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 2px 0 10px;
}
.week-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

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

/* ── Responsive ── */
@media (max-width: 640px) {
  .auth-card {
    padding: 32px 20px;
  }

  .client-nav {
    gap: 4px;
    justify-content: center;
    width: 100%;
  }
  .client-nav a {
    padding: 8px 12px;
    font-size: 12px;
  }

  .client-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    padding: 16px;
    position: static;
    height: auto;
  }

  .admin-sidebar-logo {
    margin-bottom: 12px;
  }

  .admin-sidebar-footer {
    margin-top: 8px;
    padding: 8px 8px 0;
  }

  .admin-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .admin-content {
    padding: 20px 16px;
  }

  .admin-sidebar-nav a {
    padding: 8px 12px;
    font-size: 13px;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    padding: 16px;
  }
}

/* ── Admin sidebar counter ── */
.admin-sidebar-nav__item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.admin-sidebar-nav__count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

/* ── Admin: tickets ── */
a.filter-pill {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.badge--ticket-aberto { background: #0a4ee41a; color: var(--blue); }
.badge--ticket-em_andamento { background: #f0a02826; color: #b26f0a; }
.badge--ticket-resolvido { background: var(--green-soft); color: var(--green); }
.badge--ticket-cancelado { background: var(--border-light); color: var(--text-muted); }

.ticket-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.ticket-filters > input[type="search"] {
  flex: 1 1 280px;
  width: auto;
}
.ticket-filters__date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.ticket-filters__date .hub-input {
  width: auto;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr) 270px;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ticket-row:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}
.ticket-row__store {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}
.ticket-row__store:hover {
  color: var(--blue);
}
.ticket-row__contact,
.ticket-row__dates {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
  overflow-wrap: anywhere;
}
.ticket-row__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.ticket-row__task-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}
.ticket-row__dates {
  margin-top: 8px;
}
.ticket-row__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ticket-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.ticket-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
  font-size: 13px;
}
.ticket-detail-grid dt {
  color: var(--text-faint);
}
.ticket-detail-grid dd {
  margin: 2px 0 0;
  font-weight: 600;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.ticket-detail-grid a {
  color: var(--blue);
}

.ticket-timeline {
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.ticket-timeline__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.ticket-timeline__item {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--navy);
}
.ticket-timeline__dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--blue);
}
.ticket-timeline__dot--em_andamento { background: var(--orange); }
.ticket-timeline__dot--resolvido { background: var(--green); }
.ticket-timeline__dot--cancelado { background: var(--text-faint); }
.ticket-timeline__note {
  margin-top: 2px;
  color: var(--text-muted);
}
.ticket-timeline__at {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-faint);
}

@media (max-width: 1100px) {
  .ticket-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .ticket-row__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .ticket-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  .ticket-row__actions {
    flex-wrap: wrap;
  }
  .ticket-row__actions .btn {
    flex: 1;
  }
  .ticket-filters > * {
    flex: 1 1 100%;
  }
  .ticket-filters__date .hub-input {
    flex: 1;
  }
  .ticket-filters__date span {
    min-width: 28px;
  }
}

.stat-tile--link {
  text-decoration: none;
  transition: box-shadow 0.15s;
}
.stat-tile--link:hover {
  box-shadow: inset 0 0 0 1.5px var(--blue);
}

.audience-list__email {
  display: block;
  font-size: 11px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
}
.audience-list__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.audience-list__meta small {
  font-size: 11px;
  color: var(--text-faint);
}

/* ── Admin: create communication form ── */
.create-comm {
  max-width: 620px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.create-comm__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.create-comm__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.create-comm__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 4px 0 0;
}
.create-comm__hint {
  font-weight: 400;
  color: var(--text-faint);
}
.create-comm fieldset {
  border: none;
  margin: 0 0 16px;
  padding: 0;
}
.create-comm legend {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding: 0;
}
.create-comm__types {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.create-comm__types legend {
  grid-column: 1 / -1;
}
.type-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.type-card strong,
.toggle-row strong {
  display: block;
  font-size: 14px;
  color: var(--navy);
}
.type-card small,
.toggle-row small {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 1px;
}
.type-card:has(input:checked) {
  border-color: var(--blue);
  background: #eef3ff;
}
.type-card:has(input:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.create-comm__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.create-comm__display {
  border: 1px solid var(--border-light) !important;
  border-radius: 12px;
  padding: 4px 14px !important;
}
.create-comm__display legend {
  padding: 0 4px;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-lighter);
}
.toggle-row:last-child {
  border-bottom: none;
}
.toggle {
  appearance: none;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 22, 71, 0.25);
  transition: transform 0.15s;
}
.toggle:checked {
  background: var(--blue);
}
.toggle:checked::after {
  transform: translateX(18px);
}
.toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.create-comm__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .create-comm__types,
  .create-comm__grid {
    grid-template-columns: 1fr;
  }
  .create-comm__actions .btn {
    flex: 1;
  }
}

/* ── Client list filters (hub-admin/clientes) ── */
.client-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  margin-top: 20px;
}

.client-filters__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.client-filters__count {
  align-self: end;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 34px;
}

.client-filters__field .hub-input {
  min-width: 150px;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* ── Empty states (home mural) ── */
.empty-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

/* Inside the scrolling mural row: takes the whole row, like the cards' box. */
.empty-card--inline {
  flex: 1 0 100%;
  margin-bottom: 0;
}

.empty-card[hidden] {
  display: none;
}

.empty-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}

.empty-card__text {
  font-size: 13px;
  color: var(--text-muted);
}
