:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  
  /* Cores Solicitadas baseadas no PDF */
  --verde: #a9d18e;
  --verde-border: #000000;
  --verde-text: #000000;
  
  --laranja: #f4ceaa;
  --laranja-hover: #e3b88f;
  
  --branco: #ffffff;
  --branco-border: #000000;
  
  --cinza: #d0cece;
  --cinza-border: #000000;
  --cinza-text: #000000;
  
  --preto: #1a1a1a;
  --preto-hover: #000000;
  --preto-text: #ffffff;
  
  --border: #000000;
  --shadow-drop: 4px 4px 0px rgba(0, 0, 0, 0.2);
  --shadow-strong: 4px 4px 0px rgba(0, 0, 0, 0.8);
  --radius: 20px;
  --radius2: 12px;
  --font: "Arial", "Inter", ui-sans-serif, system-ui, sans-serif;
}

html, body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  /* Fundo leve com estilo médico/clean */
  background: radial-gradient(circle at 50% 50%, #ffffff, #e0e8f0);
  color: var(--text);
  overflow-x: hidden;
}

.app {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.brand__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.brand__subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar__actions {
  display: flex;
  gap: 10px;
}

.main {
  padding: 24px 16px 40px;
  display: flex;
  justify-content: center;
}

.screen {
  width: min(840px, 100%);
  display: grid;
  gap: 16px;
}

.screen--watermarked {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.screen--watermarked > *:not(.screen-watermark) {
  position: relative;
  z-index: 1;
}

.screen-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  align-content: space-evenly;
  justify-items: center;
  gap: 26px 12px;
  padding: 28px 10px;
}

.screen-watermark span {
  color: rgba(15, 23, 42, 0.09);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(-24deg);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* Estilos do Dashboard Profissional */
.dash-header {
  margin-bottom: 30px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 20px;
}

.dash-section {
  margin-bottom: 40px;
}

.dash-share-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-text {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius2);
  border: 2px solid var(--border);
  font-size: 16px;
  font-family: var(--font);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.dash-card {
  background: var(--branco);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-drop);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.dash-card:hover {
  transform: translateY(-2px);
}

.dash-card-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.dash-card-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 10px 0;
}

.dash-card-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px 0;
  line-height: 1.4;
  flex-grow: 1;
}

.dash-card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.dash-card--new {
  border: 2px dashed var(--muted);
  background: transparent;
  box-shadow: none;
  align-items: center;
  text-align: center;
}
.dash-card--new .dash-card-icon {
  color: var(--muted);
}
.dash-card--new:hover {
  border-color: var(--verde-border);
  background: var(--verde);
}

.modules-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.modules-stat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.modules-stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 100px;
  height: 100px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
}

.modules-stat-card--primary {
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  color: #fff;
}

.modules-stat-card--accent {
  background: linear-gradient(135deg, #166534 0%, #10b981 100%);
  color: #fff;
}

.modules-stat-card__label {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.modules-stat-card__value {
  position: relative;
  z-index: 1;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
}

.modules-stat-card__meta {
  position: relative;
  z-index: 1;
  font-size: 14px;
  line-height: 1.45;
  color: inherit;
  opacity: 0.88;
}

.module-card {
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.08);
  gap: 18px;
}

.module-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.module-card__icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.module-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.module-card__badge--published {
  background: #dcfce7;
  color: #166534;
}

.module-card__badge--draft {
  background: #fef3c7;
  color: #92400e;
}

.module-card__badge--archived {
  background: #e2e8f0;
  color: #334155;
}

.module-card__badge--local {
  background: #eff6ff;
  color: #1d4ed8;
}

.module-card__body {
  display: grid;
  gap: 8px;
}

.module-card .dash-card-title {
  font-size: 24px;
  line-height: 1.1;
  color: #0f172a;
  margin-bottom: 0;
}

.module-card .dash-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
  margin-bottom: 0;
}

.module-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-card__metric {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
  display: grid;
  gap: 6px;
}

.module-card__metric-label {
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.module-card__metric strong {
  font-size: 20px;
  color: #0f172a;
}

.module-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-card__date {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.module-card__actions {
  margin-top: auto;
}

#screenAdminModulos.viewer-screen-mode {
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.1), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(110, 231, 183, 0.12), transparent 22%),
    linear-gradient(180deg, #f7fafc 0%, #f4f8fb 100%);
  gap: 16px;
}

#modulesList.viewer-modules-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 0;
}

.viewer-empty-state {
  border-radius: 28px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(241,245,249,0.92) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.06);
}

.viewer-module-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f8fbff 52%, #f2f8f5 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.viewer-module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.12);
}

.viewer-home-header {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 18px 22px;
  border-radius: 24px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.viewer-home-header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -34px;
  width: 220px;
  height: 180px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.08) 42%, transparent 62%),
    radial-gradient(circle, rgba(134, 239, 172, 0.18), transparent 64%);
  pointer-events: none;
}

.viewer-home-header::before {
  content: "";
  position: absolute;
  right: 34px;
  bottom: 18px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px dashed rgba(59, 130, 246, 0.22);
  opacity: 0.8;
  pointer-events: none;
}

.viewer-home-header .h1 {
  position: relative;
  z-index: 1;
  font-size: 28px;
  line-height: 1.08;
}

.viewer-home-header .muted {
  position: relative;
  z-index: 1;
  margin-top: 4px;
  max-width: 620px;
  font-size: 13px;
  line-height: 1.55;
}

.viewer-header-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.viewer-topbar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.viewer-topbar__icon,
.viewer-topbar__profile {
  border: none;
  cursor: pointer;
}

.viewer-topbar__icon {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.viewer-topbar__emoji {
  font-size: 18px;
}

.viewer-topbar__badge-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.88);
}

.viewer-topbar__badge-dot.hidden {
  display: none;
}

.viewer-topbar__profile {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.viewer-topbar__avatar,
.viewer-profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  overflow: hidden;
}

.viewer-topbar__profile-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: #0f172a;
}

.viewer-topbar__profile-copy strong {
  font-size: 13px;
}

.viewer-topbar__profile-copy small {
  font-size: 11px;
  color: #64748b;
}

.viewer-mobile-header {
  display: none;
}

.login-mobile-brand,
.viewer-mobile-bottom-nav {
  display: none;
}

.login-mobile-brand {
  justify-content: center;
  margin-bottom: 22px;
}

.login-mobile-brand__logo {
  width: min(220px, 56vw);
  filter: drop-shadow(0 22px 34px rgba(15, 23, 42, 0.26));
}

.viewer-mobile-nav-backdrop {
  display: none;
}

.viewer-mobile-header__icon,
.viewer-mobile-header__profile,
.viewer-mobile-header__action {
  border: none;
  cursor: pointer;
}

.viewer-mobile-header__logo {
  display: block;
  width: 134px;
  max-width: 100%;
  justify-self: center;
}

.viewer-mobile-header__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.viewer-mobile-header__action,
.viewer-mobile-header__profile {
  position: relative;
}

.viewer-mobile-header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
}

.viewer-mobile-header__avatar.avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-mobile-bottom-nav__item {
  border: none;
  background: transparent;
  cursor: pointer;
}

.viewer-hero-panel {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(180px, 0.9fr);
  gap: 18px;
  padding: 22px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.84) 0%, rgba(236, 253, 245, 0.86) 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.viewer-hero-panel__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.viewer-hero-panel__pill {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-hero-panel__title {
  margin: 12px 0 8px;
  font-size: 32px;
  line-height: 1.08;
  color: #0f172a;
}

.viewer-hero-panel__text {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.7;
  color: #475569;
}

.viewer-hero-panel__art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.22), transparent 26%),
    radial-gradient(circle at left center, rgba(20, 184, 166, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(240, 249, 255, 0.96) 0%, rgba(236, 253, 245, 0.96) 100%);
}

.viewer-hero-panel__logo {
  width: min(250px, 80%);
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(15, 23, 42, 0.12));
}

.viewer-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.viewer-toolbar__search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.viewer-toolbar__hint {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.viewer-searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 12px 0 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 12px 24px rgba(15, 23, 42, 0.05);
}

.viewer-searchbox:focus-within {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.18), 0 14px 26px rgba(15, 23, 42, 0.08);
}

.viewer-searchbox__icon {
  font-size: 18px;
  opacity: 0.8;
}

.viewer-searchbox__input {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  min-height: 42px;
}

.viewer-searchbox__input:focus {
  box-shadow: none;
}

.viewer-searchbox__clear {
  padding: 9px 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.viewer-toolbar__summary {
  padding: 13px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}

.viewer-notification-popover {
  position: fixed;
  top: 118px;
  right: 44px;
  width: min(336px, calc(100vw - 28px));
  padding: 14px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(134, 239, 172, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
  z-index: 80;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.viewer-notification-popover--open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.viewer-notification-popover__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.viewer-notification-popover__eyebrow {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
}

.viewer-notification-popover__header strong {
  font-size: 16px;
  color: #0f172a;
  line-height: 1.2;
}

.viewer-notification-popover__close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(241, 245, 249, 0.9);
  color: #334155;
  cursor: pointer;
}

.viewer-notification-popover__text {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}

.viewer-notification-popover__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.viewer-notification-chip {
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.viewer-notification-chip__label {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.viewer-notification-chip strong {
  font-size: 15px;
  color: #0f172a;
}

.viewer-notification-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.viewer-notification-list.hidden {
  display: none;
}

.viewer-notification-popover__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #475569;
  font-size: 11px;
}

.viewer-notification-popover__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6 0%, #22c55e 100%);
  box-shadow: 0 0 0 5px rgba(20, 184, 166, 0.12);
}

.admin-security-alert {
  width: 100%;
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 11px 12px;
  border: 1px solid rgba(239, 68, 68, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(254,242,242,0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  cursor: pointer;
}

.admin-security-alert strong {
  font-size: 13px;
  color: #0f172a;
}

.admin-security-alert span {
  font-size: 11px;
  font-weight: 700;
  color: #991b1b;
}

.admin-security-alert small {
  font-size: 11px;
  color: #64748b;
}

.admin-topbar {
  display: flex;
  justify-content: flex-end;
  width: min(1240px, 100%);
  margin: 0 auto 10px;
}

.admin-topbar .viewer-topbar__icon {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.viewer-module-card__layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.viewer-module-card__content {
  flex: 1;
  min-width: 0;
}

.viewer-module-card__cover {
  width: 108px;
  min-width: 108px;
  height: 108px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
}

.viewer-module-card__cover--image {
  background: #e2e8f0;
}

.viewer-module-card__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-module-card__cover--fallback {
  flex-direction: column;
  gap: 8px;
  color: #0f172a;
}

.viewer-module-card__cover--emerald {
  background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
}

.viewer-module-card__cover--blue {
  background: linear-gradient(135deg, #dbeafe 0%, #dbeafe 100%);
}

.viewer-module-card__cover--violet {
  background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 100%);
}

.viewer-module-card__cover--cyan {
  background: linear-gradient(135deg, #cffafe 0%, #dbeafe 100%);
}

.viewer-module-card__cover--amber {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.viewer-module-card__cover-icon {
  font-size: 42px;
}

.viewer-module-card__cover-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.72);
}

.viewer-module-card__eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 8px;
}

.viewer-module-card__title {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.viewer-module-card__status {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.viewer-module-card__status--ready {
  background: rgba(220, 252, 231, 0.92);
  border: 1px solid rgba(34, 197, 94, 0.14);
  color: #166534;
}

.viewer-module-card__status--progress {
  background: rgba(254, 243, 199, 0.96);
  border: 1px solid rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.viewer-module-card__desc {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  max-width: 540px;
}

.viewer-module-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.viewer-module-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.viewer-module-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.viewer-module-card__hint {
  font-size: 13px;
  color: #475569;
}

.viewer-module-card__button {
  min-width: 152px;
  padding: 13px 20px;
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 16px;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 18px 30px rgba(21, 128, 61, 0.22);
}

.viewer-module-card__button:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .viewer-header-topline,
  .viewer-toolbar,
  .viewer-hero-panel,
  .viewer-module-card__layout,
  .viewer-module-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .viewer-hero-panel {
    grid-template-columns: 1fr;
  }

  .viewer-topbar {
    width: 100%;
    justify-content: space-between;
  }

  .viewer-module-card__status {
    position: static;
    margin-bottom: 14px;
  }

  .viewer-module-card__cover {
    width: 100%;
    height: 170px;
  }

  .viewer-module-card__button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app--admin.app--viewer-shell,
  .app--admin.app--viewer-shell .main--admin,
  .app--admin.app--viewer-shell #screenAdminModulos.viewer-screen-mode,
  .app--admin.app--viewer-shell #modulesList.viewer-modules-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app--login {
    flex-direction: column;
    justify-content: center;
    padding: 10px 12px;
    align-items: center;
    background:
      radial-gradient(circle at 18% 22%, rgba(96, 165, 250, 0.28), rgba(255,255,255,0) 28%),
      linear-gradient(180deg, rgba(2, 8, 23, 0.52) 0%, rgba(8, 34, 71, 0.6) 100%),
      url("https://raw.githubusercontent.com/TwinexTecnologia/fisioterapia/chore/github-supabase-setup/ChatGPT%20Image%2016%20de%20mai.%20de%202026%2C%2019_04_16.png") center/cover no-repeat;
  }

  .login-mobile-brand {
    display: none;
  }

  .login-card {
    margin-top: 0;
    width: min(100%, 228px);
    max-width: 228px;
    border-radius: 16px;
    padding: 8px 8px 7px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.88) 100%);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(8px);
  }

  .login-header {
    margin-bottom: 5px;
  }

  .login-header__logo {
    display: block;
    width: min(60px, 18vw);
    margin: 0 auto 4px;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.06));
  }

  .login-header__eyebrow {
    display: none;
  }

  .login-header p {
    display: none;
  }

  .login-form {
    gap: 6px;
  }

  .login-card .input-group {
    gap: 4px;
    margin-bottom: 6px;
  }

  .login-footer small {
    display: none !important;
  }

  .login-card .label {
    display: none;
  }

  .login-card .input-text {
    min-height: 34px;
    font-size: 11px;
    padding: 6px 8px;
    border-width: 1px;
    border-color: rgba(203, 213, 225, 0.9);
    box-shadow: none;
    border-radius: 10px;
  }

  .login-card .btn--start {
    min-height: 34px;
    margin-top: 2px !important;
    font-size: 10px;
    padding: 6px 8px;
    border-width: 1px;
    box-shadow: none;
  }

  .login-footer {
    margin-top: 4px;
  }

  .login-footer #loginError {
    font-size: 10px !important;
    margin-top: 4px !important;
  }

  #screenAdminModulos.viewer-screen-mode {
    gap: 14px;
  }

  #modulesList.viewer-modules-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .viewer-home-header {
    display: none;
  }

  .viewer-home-header::after,
  .viewer-home-header::before {
    display: none;
  }

  #viewerTopbar,
  #viewerProfileTopbar {
    display: none !important;
  }

  .viewer-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 10px;
    margin-top: 0;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(241,245,249,0.98) 0%, rgba(236,253,245,0.94) 100%);
    box-shadow: none;
    border: 1px solid rgba(226, 232, 240, 0.9);
  }

  .viewer-hero-panel__pill {
    padding: 5px 8px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .viewer-hero-panel__title {
    margin: 6px 0 4px;
    font-size: 17px;
    line-height: 1.12;
  }

  .viewer-hero-panel__text {
    font-size: 10px;
    line-height: 1.45;
  }

  .viewer-hero-panel__art {
    min-height: 88px;
    border-radius: 14px;
  }

  .viewer-hero-panel__logo {
    width: min(92px, 84%);
    filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.08));
  }

  .viewer-toolbar {
    margin-top: 0;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    background: rgba(255,255,255,0.94);
  }

  .viewer-toolbar__summary {
    order: -1;
    display: inline-flex;
    width: fit-content;
    padding: 6px 9px;
    font-size: 11px;
  }

  .viewer-toolbar__search span {
    display: none;
  }

  .viewer-toolbar__hint {
    display: block;
    font-size: 10px;
  }

  .viewer-searchbox {
    min-height: 48px;
    padding: 0 12px;
    border-radius: 14px;
  }

  .viewer-searchbox__input {
    font-size: 13px;
  }

  .viewer-searchbox__clear {
    font-size: 10px;
    padding: 6px 8px;
  }

  .viewer-module-card {
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
  }

  .viewer-module-card__status {
    position: static;
    margin-bottom: 8px;
    width: fit-content;
    font-size: 10px;
    padding: 6px 10px;
  }

  .viewer-module-card__layout {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .viewer-module-card__cover {
    width: 60px;
    min-width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .viewer-module-card__cover-icon {
    font-size: 24px;
  }

  .viewer-module-card__cover-label,
  .viewer-module-card__eyebrow,
  .viewer-module-card__pill {
    font-size: 11px;
  }

  .viewer-module-card__title {
    font-size: 15px;
    margin: 0 0 4px;
  }

  .viewer-module-card__desc {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 6px;
  }

  .viewer-module-card__meta {
    gap: 5px;
  }

  .viewer-module-card__pill {
    padding: 5px 7px;
  }

  .viewer-module-card__footer {
    grid-column: 1 / -1;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
    justify-items: center;
  }

  .viewer-module-card__hint {
    display: none;
  }

  .viewer-module-card__button {
    width: min(100%, 144px);
    min-height: 34px;
    font-size: 11px;
    padding: 6px 12px;
    margin: 0 auto;
  }

  .viewer-notification-popover {
    width: min(300px, calc(100vw - 20px));
    padding: 12px;
  }

  .viewer-profile-header {
    margin-bottom: 8px;
  }

  .viewer-profile-grid {
    gap: 10px;
  }

  .viewer-profile-card,
  .viewer-profile-form {
    border-radius: 16px;
  }

  .viewer-profile-card {
    padding: 14px 12px;
  }

  .viewer-profile-form {
    padding: 14px 12px;
  }

  .viewer-profile-avatar {
    width: 78px;
    height: 78px;
    font-size: 22px;
  }

  .viewer-profile-card__info strong {
    font-size: 16px;
  }

  .viewer-profile-card__info span {
    font-size: 11px;
  }

  .viewer-profile-card__avatar-wrap {
    gap: 10px;
  }

  .viewer-profile-card__actions {
    gap: 8px;
  }

  .viewer-profile-card__actions .btn {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 14px;
  }

  .viewer-profile-card__info {
    gap: 5px;
  }

  .viewer-profile-card__info .muted {
    font-size: 11px;
    line-height: 1.4;
  }

  .viewer-profile-header .h1 {
    font-size: 18px;
    line-height: 1.12;
  }

  .viewer-profile-header .muted {
    font-size: 11px;
    line-height: 1.45;
    max-width: 320px;
  }

  .viewer-profile-form .row-inputs {
    gap: 10px;
  }

  .viewer-profile-form .input-group {
    gap: 6px;
    margin-bottom: 10px;
  }

  .viewer-profile-form .label {
    font-size: 11px;
  }

  .viewer-profile-form .input-text,
  .viewer-profile-form .textarea {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 12px;
  }

  #viewerProfileBio {
    min-height: 92px !important;
  }

  #btnSaveViewerProfile {
    min-width: 0 !important;
    width: 100%;
    min-height: 42px;
    font-size: 12px;
  }
}

#screenAdminModulos .dash-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

#screenAdminModulos .dash-card--new {
  min-height: 220px;
  justify-content: center;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 24%),
    rgba(255,255,255,0.6);
  border-color: rgba(148, 163, 184, 0.34);
}

#screenAdminModulos .dash-card--new .dash-card-title {
  font-size: 24px;
  color: #0f172a;
}

#screenAdminModulos .dash-card--new .dash-card-desc {
  max-width: 420px;
}

.viewer-profile-header {
  margin-bottom: 18px;
}

.viewer-profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 20px;
}

.viewer-profile-card,
.viewer-profile-form {
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.96) 100%);
}

.viewer-profile-card--hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  gap: 22px;
}

.viewer-profile-card__avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.viewer-profile-avatar {
  width: 132px;
  height: 132px;
  font-size: 34px;
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.16);
}

.viewer-profile-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.viewer-profile-card__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.viewer-profile-card__info strong {
  font-size: 24px;
  color: #0f172a;
}

.viewer-profile-card__info span {
  color: #0f766e;
  font-weight: 800;
}

.viewer-profile-form {
  padding: 28px;
}

@media (max-width: 980px) {
  .viewer-profile-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   TELA DE LOGIN
   ========================================================================== */
.app--login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.24), transparent 34%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(2, 8, 23, 0.38) 0%, rgba(6, 20, 44, 0.62) 40%, rgba(8, 34, 71, 0.76) 100%),
    url("https://raw.githubusercontent.com/TwinexTecnologia/fisioterapia/chore/github-supabase-setup/ChatGPT%20Image%2016%20de%20mai.%20de%202026%2C%2019_04_16.png") center/cover no-repeat;
}

.login-card {
  background:
    linear-gradient(180deg, rgba(7, 24, 51, 0.84) 0%, rgba(8, 34, 71, 0.78) 100%);
  border: 1px solid rgba(148, 197, 255, 0.24);
  border-radius: 32px;
  padding: 36px;
  width: 100%;
  max-width: 460px;
  box-shadow:
    0 28px 70px rgba(2, 8, 23, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.login-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-header__logo {
  display: block;
  width: min(320px, 88%);
  margin: 0 auto 16px;
  filter: drop-shadow(0 20px 32px rgba(2, 8, 23, 0.52));
}

.login-header p {
  color: rgba(226, 232, 240, 0.9);
  margin: 0;
  line-height: 1.6;
  font-size: 15px;
  font-weight: 600;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-footer {
  text-align: center;
}

.login-recovery {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.login-recovery__title {
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  color: #f8fafc;
}

.app--login .label {
  color: rgba(191, 219, 254, 0.9);
}

.app--login .input-text {
  border: 1px solid rgba(96, 165, 250, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.app--login .input-text::placeholder {
  color: rgba(191, 219, 254, 0.56);
}

.app--login .input-text:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app--login .btn--start {
  background: linear-gradient(135deg, #0ea5e9 0%, #1d4ed8 100%);
  border: 1px solid rgba(191, 219, 254, 0.28);
  color: #eff6ff;
  box-shadow:
    0 20px 38px rgba(2, 8, 23, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.app--login .btn--start:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
}

.app--login .login-footer small,
.app--login .login-recovery .muted {
  color: rgba(191, 219, 254, 0.7);
}

@media (max-width: 640px) {
  #screenLogin.app--login {
    min-height: 100dvh;
    padding: 18px 20px;
    align-items: center;
    justify-content: center;
  }

  #screenLogin .login-mobile-brand {
    display: none !important;
  }

  #screenLogin .login-card {
    width: min(100%, 356px);
    max-width: 356px;
    padding: 20px 20px 18px;
    border-radius: 26px;
    box-sizing: border-box;
    box-shadow: 0 18px 34px rgba(2, 8, 23, 0.34);
  }

  #screenLogin .login-header {
    margin-bottom: 12px;
  }

  #screenLogin .login-header__logo {
    width: 112px;
    margin: 0 auto 10px;
    filter: drop-shadow(0 10px 18px rgba(2, 8, 23, 0.28));
  }

  #screenLogin .login-header p,
  #screenLogin .login-footer small,
  #screenLogin .login-card .label {
    display: none !important;
  }

  #screenLogin .login-form {
    gap: 12px;
  }

  #screenLogin .login-card .input-group {
    gap: 5px;
    margin-bottom: 12px;
  }

  #screenLogin .login-card .input-text {
    min-height: 54px;
    padding: 12px 15px;
    font-size: 14px;
    border-width: 1px;
    border-radius: 15px;
    box-sizing: border-box;
  }

  #screenLogin .login-card .btn--start {
    min-height: 54px;
    margin-top: 6px !important;
    padding: 12px 15px;
    font-size: 14px;
    border-width: 1px;
    box-shadow: none;
  }

  #screenLogin .login-footer {
    margin-top: 10px;
  }

  #screenLogin .login-footer #loginError {
    font-size: 11px !important;
    margin-top: 4px !important;
  }
}

@media (max-width: 430px) {
  #screenLogin .login-card {
    width: min(100%, 320px);
    max-width: 320px;
    padding: 16px 16px 14px;
  }

  #screenLogin .login-header__logo {
    width: 92px;
  }

  #screenLogin .login-card .input-text,
  #screenLogin .login-card .btn--start {
    min-height: 50px;
    font-size: 13px;
    padding: 11px 13px;
  }
}

/* ADMIN LAYOUT (SaaS) */
.app--admin {
  display: flex;
  grid-template-rows: none;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 26%),
    radial-gradient(circle at left center, rgba(16, 185, 129, 0.07), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
}

.sidebar {
  width: 260px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 56%, #f4f8f6 100%);
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0; /* Impede a sidebar de encolher */
  box-shadow: 14px 0 38px rgba(15, 23, 42, 0.05);
}

.sidebar__brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar__brand-logo {
  display: block;
  width: min(180px, 100%);
  filter: drop-shadow(0 16px 24px rgba(15, 23, 42, 0.08));
}

.sidebar__nav {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.sidebar__link {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 18px;
  text-align: left;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.12);
  transform: translateX(3px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}
.sidebar__link.active {
  background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.14);
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.12),
    0 12px 26px rgba(22, 101, 52, 0.08);
}

.sidebar__footer {
  margin: 14px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
}

.sidebar__user-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sidebar__user-copy small {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.18);
}

.avatar--image img,
.viewer-topbar__avatar.avatar--image img,
.viewer-profile-avatar.avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main--admin {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 36px 44px;
  max-width: none;
  margin: 0;
  width: 100%; /* Garante que ocupe o espaço restante */
  min-width: 0;
}

@media (max-width: 768px) {
  .app--admin.app--viewer-shell {
    display: block;
    min-height: 100vh;
  }

  .app--admin.app--viewer-shell .sidebar {
    display: none;
  }

  .app--admin.app--viewer-shell.app--viewer-mobile-nav-open .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    width: min(280px, 78vw);
    height: 100dvh;
    z-index: 120;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    border-top: none;
    box-shadow: 20px 0 44px rgba(15, 23, 42, 0.18);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(16px);
  }

  .app--admin.app--viewer-shell .viewer-mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(2px);
    z-index: 110;
  }

  .app--admin.app--viewer-shell.app--viewer-mobile-nav-open .viewer-mobile-nav-backdrop {
    display: block;
  }

  .app--admin.app--viewer-shell .sidebar__nav {
    padding: 18px 12px;
    gap: 8px;
  }

  .app--admin.app--viewer-shell .main--admin {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    padding: 10px 14px calc(92px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
  }

  .app--admin.app--viewer-shell .screen--admin-panel,
  .app--admin.app--viewer-shell #screenAdminModulos,
  .app--admin.app--viewer-shell #screenViewerProfile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .app--admin.app--viewer-shell .admin-topbar {
    display: none;
  }

  .app--admin.app--viewer-shell .viewer-mobile-header {
    position: sticky;
    top: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 62px;
    align-items: center;
    gap: 4px;
    padding: 8px 6px 10px 0;
    margin-bottom: 6px;
    background: linear-gradient(180deg, rgba(248,251,255,0.98) 0%, rgba(248,251,255,0.92) 78%, rgba(248,251,255,0) 100%);
    backdrop-filter: blur(10px);
  }

  .app--admin.app--viewer-shell .viewer-mobile-header__icon,
  .app--admin.app--viewer-shell .viewer-mobile-header__profile,
  .app--admin.app--viewer-shell .viewer-mobile-header__action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.94);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-size: 14px;
  }

  .app--admin.app--viewer-shell .viewer-mobile-header__logo {
    width: 128px;
    justify-self: center;
  }

  .app--admin.app--viewer-shell .viewer-mobile-header__actions {
    gap: 2px;
    justify-self: end;
    transform: translateX(-14px);
  }

  .app--admin.app--viewer-shell .viewer-mobile-header__avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .dash-header {
    padding: 10px 10px 9px;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  }

  .app--admin.app--viewer-shell #screenViewerProfile .dash-header__eyebrow {
    padding: 4px 8px;
    margin-bottom: 6px;
    font-size: 9px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-header .h1 {
    font-size: 14px;
    line-height: 1.08;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-header .muted {
    font-size: 9px;
    line-height: 1.3;
    max-width: 220px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-grid {
    gap: 6px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card,
  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-form {
    border-radius: 12px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card {
    padding: 10px 9px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-form {
    padding: 10px 9px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card--hero {
    gap: 8px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card__avatar-wrap {
    gap: 6px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-avatar {
    width: 56px;
    height: 56px;
    font-size: 16px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card__actions {
    gap: 5px;
    flex-direction: column;
    width: 100%;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card__actions .btn {
    width: 100%;
    min-height: 32px;
    padding: 6px 9px;
    font-size: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card__info {
    gap: 4px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card__info strong {
    font-size: 12px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card__info span,
  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-card__info .muted {
    font-size: 9px;
    line-height: 1.3;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-form .row-inputs {
    flex-direction: column;
    gap: 6px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-form .input-group {
    gap: 5px;
    margin-bottom: 6px;
    width: 100%;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-form .label {
    font-size: 9px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-form .input-text,
  .app--admin.app--viewer-shell #screenViewerProfile .viewer-profile-form .textarea {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 10px;
    border-radius: 10px;
  }

  .app--admin.app--viewer-shell #screenViewerProfile #viewerProfileBio {
    min-height: 60px !important;
  }

  .app--admin.app--viewer-shell #screenViewerProfile .row.row--right {
    width: 100%;
  }

  .app--admin.app--viewer-shell #screenViewerProfile #btnSaveViewerProfile {
    min-width: 0 !important;
    width: 100%;
    min-height: 34px;
    font-size: 10px;
  }

  .app--admin.app--viewer-shell .sidebar__footer {
    margin: 12px;
    padding: 14px;
  }

  .app--admin.app--viewer-shell .sidebar__link {
    justify-content: flex-start;
    text-align: left;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13px;
    box-shadow: none;
  }

  .app--admin.app--viewer-shell .viewer-mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 115;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
  }

  .app--admin.app--viewer-shell .viewer-mobile-bottom-nav__item {
    min-height: 46px;
    border-radius: 14px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 800;
  }

  .app--admin.app--viewer-shell .viewer-mobile-bottom-nav__item.active {
    background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
    color: #0f766e;
  }

  .app--admin.app--viewer-shell .viewer-mobile-bottom-nav__icon {
    font-size: 15px;
  }

  /* Reduz levemente a escala visual do shell do paciente no celular. */
  .app--admin.app--viewer-shell .main--admin {
    padding: 8px 12px calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .app--admin.app--viewer-shell .viewer-mobile-header {
    grid-template-columns: 30px minmax(0, 1fr) 58px;
    gap: 3px;
    padding: 6px 4px 8px 0;
    margin-bottom: 4px;
  }

  .app--admin.app--viewer-shell .viewer-mobile-header__icon,
  .app--admin.app--viewer-shell .viewer-mobile-header__profile,
  .app--admin.app--viewer-shell .viewer-mobile-header__action {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .app--admin.app--viewer-shell .viewer-mobile-header__logo {
    width: 118px;
  }

  .app--admin.app--viewer-shell .viewer-mobile-header__avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .app--admin.app--viewer-shell #screenAdminModulos .dash-header {
    padding: 10px 10px 9px;
    border-radius: 14px;
  }

  .app--admin.app--viewer-shell #screenAdminModulos .viewer-home-header .h1 {
    font-size: 16px;
    line-height: 1.08;
  }

  .app--admin.app--viewer-shell #screenAdminModulos .viewer-home-header .muted,
  .app--admin.app--viewer-shell #screenAdminModulos .dash-header__eyebrow,
  .app--admin.app--viewer-shell #screenAdminModulos .viewer-modules-summary {
    font-size: 10px;
    line-height: 1.35;
  }

  .app--admin.app--viewer-shell .viewer-hero-panel {
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .app--admin.app--viewer-shell .viewer-module-card {
    border-radius: 18px;
  }

  .app--admin.app--viewer-shell .viewer-module-card__layout {
    gap: 10px;
    padding: 12px;
  }

  .app--admin.app--viewer-shell .viewer-module-card__cover {
    height: 148px;
    border-radius: 14px;
  }

  .app--admin.app--viewer-shell .viewer-module-card__title {
    font-size: 16px;
  }

  .app--admin.app--viewer-shell .viewer-module-card__desc,
  .app--admin.app--viewer-shell .viewer-module-card__hint {
    font-size: 11px;
    line-height: 1.4;
  }

  .app--admin.app--viewer-shell .viewer-module-card__pill,
  .app--admin.app--viewer-shell .viewer-module-card__status {
    font-size: 10px;
  }

  .app--admin.app--viewer-shell .viewer-module-card__button {
    min-height: 40px;
    font-size: 12px;
  }

  .app--admin.app--viewer-shell .viewer-mobile-bottom-nav {
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 5px;
    padding: 7px 8px;
    border-radius: 16px;
  }

  .app--admin.app--viewer-shell .viewer-mobile-bottom-nav__item {
    min-height: 42px;
    gap: 2px;
    font-size: 10px;
  }

  .app--admin.app--viewer-shell .viewer-mobile-bottom-nav__icon {
    font-size: 14px;
  }

  .app--viewer-runtime .main--admin,
  .main--admin.main--viewer-runtime {
    padding: 8px 10px 18px;
  }

  .app--viewer-runtime .home-cover {
    padding: 8px 2px 14px;
  }

  .app--viewer-runtime .home-topline {
    font-size: 10px;
  }

  .app--viewer-runtime .home-welcome {
    font-size: 15px;
  }

  .app--viewer-runtime .home-title {
    font-size: clamp(24px, 7.2vw, 32px);
  }

  .app--viewer-runtime .home-apple {
    font-size: clamp(50px, 15vw, 68px);
    width: min(148px, 32vw);
    min-height: 98px;
  }

  .app--viewer-runtime .home-subtitle {
    font-size: 14px;
  }

  .app--viewer-runtime .legend-text,
  .app--viewer-runtime .home-tips {
    font-size: 12px;
  }

  .app--viewer-runtime .legend-color,
  .app--viewer-runtime .legend-icon {
    width: 64px;
  }

  .app--viewer-runtime .legend-color {
    font-size: 11px;
  }

  .app--viewer-runtime .legend-icon {
    font-size: 24px;
  }

  .app--viewer-runtime .home-greetings {
    font-size: 16px;
  }

  .app--viewer-runtime .btn--start {
    font-size: 16px;
    padding: 10px 16px;
  }

  .app--viewer-runtime .home-credits {
    font-size: 10px;
  }

  .app--viewer-runtime .node-box {
    padding: 16px 18px;
    margin-bottom: 18px;
  }

  .app--viewer-runtime .card--pergunta .pill,
  .app--viewer-runtime .card--orientacao .pill,
  .app--viewer-runtime .card--interpretacao .pill,
  .app--viewer-runtime .card--area .pill {
    font-size: 12px;
    padding: 4px 8px;
    margin-bottom: 3px;
  }

  .app--viewer-runtime .node-box .h1,
  .app--viewer-runtime .node-box .body {
    font-size: 17px;
  }

  .app--viewer-runtime .body {
    font-size: 17px;
    line-height: 1.3;
  }

  .app--viewer-runtime .node-box__image {
    max-height: 320px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 18px;
  }

  .app--viewer-runtime .areas-container {
    gap: 14px;
    margin-top: 18px;
  }

  .app--viewer-runtime .btn--area {
    width: 120px;
    height: 120px;
    border-radius: 18px;
    font-size: 12px;
    padding: 8px;
    gap: 8px;
  }

  .app--viewer-runtime .options {
    gap: 10px;
    margin-top: 16px;
  }

  .app--viewer-runtime .runtime-actions .btn,
  .app--viewer-runtime .options .btn,
  .app--viewer-runtime .btn--resposta {
    font-size: 13px;
    padding: 11px 14px;
  }

  .app--viewer-runtime .btn--resposta {
    min-width: 0;
    width: 100%;
    padding: 11px 18px;
  }
}

@media (max-width: 420px) {
  .login-card {
    width: min(100%, 206px);
    max-width: 206px;
    padding: 7px 7px 6px;
  }

  .login-header {
    margin-bottom: 4px;
  }

  .login-header__logo {
    width: 50px;
    margin-bottom: 3px;
  }

  .login-card .input-group {
    margin-bottom: 5px;
  }

  .login-card .input-text,
  .login-card .btn--start {
    min-height: 32px;
    font-size: 10px;
    padding: 5px 7px;
  }
}

.app--viewer-runtime .sidebar {
  display: none;
}

.app--viewer-runtime .main--admin,
.main--admin.main--viewer-runtime {
  padding: 18px 28px 30px;
}

.app--viewer-runtime #screenProtocolIntro,
.app--viewer-runtime #screenNode {
  width: min(1180px, 100%);
}

.app--viewer-runtime .breadcrumbWrap {
  display: none;
}

.app--viewer-runtime .breadcrumb {
  width: min(1040px, 100%);
}

.app--viewer-runtime .node-box,
.app--viewer-runtime .finalizer {
  width: min(1040px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.app--viewer-runtime .options,
.app--viewer-runtime .areas-container,
.app--viewer-runtime .runtime-actions {
  width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.app--viewer-runtime .runtime-actions {
  justify-content: center;
}

.app--viewer-runtime .runtime-actions .btn {
  flex: 0 1 320px;
}

.app--viewer-runtime .home-cover {
  width: min(1020px, 100%);
  padding: 16px 20px 22px;
}

.app--viewer-runtime .home-topline {
  font-size: 13px;
  margin-bottom: 6px;
}

.app--viewer-runtime .home-welcome {
  font-size: 24px;
  margin-bottom: 8px;
}

.app--viewer-runtime .home-hero {
  max-width: 920px;
  gap: 18px;
  margin-bottom: 14px;
}

.app--viewer-runtime .home-title {
  font-size: clamp(42px, 5.5vw, 64px);
  line-height: 1.02;
  letter-spacing: 1px;
}

.app--viewer-runtime .home-apple {
  font-size: clamp(82px, 9vw, 118px);
}

.app--viewer-runtime .home-subtitle {
  font-size: 24px;
  margin: 0 0 18px 0;
}

.app--viewer-runtime .legend-list {
  max-width: 920px;
  gap: 12px;
  margin-bottom: 18px;
}

.app--viewer-runtime .legend-item {
  gap: 14px;
}

.app--viewer-runtime .legend-color {
  width: 112px;
  padding: 10px 0;
  font-size: 17px;
}

.app--viewer-runtime .legend-icon {
  width: 112px;
  font-size: 52px;
}

.app--viewer-runtime .legend-text {
  font-size: 18px;
  line-height: 1.35;
}

.app--viewer-runtime .home-tips {
  max-width: 920px;
  font-size: 17px;
  margin-bottom: 20px;
}

.app--viewer-runtime .home-tips p {
  margin: 8px 0;
}

.app--viewer-runtime .home-footer {
  gap: 22px;
  margin-bottom: 10px;
}

.app--viewer-runtime .home-greetings {
  font-size: 26px;
}

.app--viewer-runtime .btn--start {
  font-size: 26px;
  padding: 14px 44px;
}

.app--viewer-runtime .home-credits {
  font-size: 14px;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .app--viewer-runtime .main--admin,
  .main--admin.main--viewer-runtime {
    padding: 10px 12px 24px;
  }

  .app--viewer-runtime #screenProtocolIntro,
  .app--viewer-runtime #screenNode,
  .app--viewer-runtime .breadcrumb,
  .app--viewer-runtime .node-box,
  .app--viewer-runtime .finalizer,
  .app--viewer-runtime .options,
  .app--viewer-runtime .areas-container,
  .app--viewer-runtime .runtime-actions {
    width: 100%;
  }

  .app--viewer-runtime .home-cover {
    padding: 10px 4px 18px;
  }

  .app--viewer-runtime .home-topline {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .app--viewer-runtime .home-welcome {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .app--viewer-runtime .home-hero {
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
  }

  .app--viewer-runtime .home-title {
    font-size: clamp(26px, 8vw, 36px);
    line-height: 1.06;
    letter-spacing: 0.4px;
    text-align: center;
  }

  .app--viewer-runtime .home-apple {
    font-size: clamp(58px, 18vw, 78px);
    width: min(160px, 34vw);
    min-height: 110px;
  }

  .app--viewer-runtime .home-subtitle {
    font-size: 16px;
    margin: 0 0 12px 0;
    text-align: center;
  }

  .app--viewer-runtime .legend-list {
    gap: 10px;
    margin-bottom: 14px;
  }

  .app--viewer-runtime .legend-item {
    align-items: stretch;
    gap: 8px;
  }

  .app--viewer-runtime .legend-color,
  .app--viewer-runtime .legend-icon {
    width: 70px;
  }

  .app--viewer-runtime .legend-color {
    font-size: 12px;
    padding: 8px 0;
  }

  .app--viewer-runtime .legend-icon {
    font-size: 28px;
  }

  .app--viewer-runtime .legend-text,
  .app--viewer-runtime .home-tips {
    font-size: 13px;
    line-height: 1.4;
  }

  .app--viewer-runtime .home-tips {
    margin-bottom: 14px;
  }

  .app--viewer-runtime .home-footer {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 6px;
  }

  .app--viewer-runtime .home-greetings {
    font-size: 18px;
    text-align: center;
  }

  .app--viewer-runtime .btn--start {
    width: 100%;
    font-size: 18px;
    padding: 12px 18px;
  }

  .app--viewer-runtime .home-credits {
    font-size: 11px;
    text-align: center;
  }

  .app--viewer-runtime .runtime-actions {
    gap: 10px;
  }

  .app--viewer-runtime .runtime-actions .btn {
    flex: 1 1 auto;
    width: 100%;
  }
}

@media (max-width: 540px) {
  .app--viewer-runtime .main--admin,
  .main--admin.main--viewer-runtime {
    padding: 8px 8px 18px;
  }

  .app--viewer-runtime #screenProtocolIntro,
  .app--viewer-runtime #screenNode,
  .app--viewer-runtime .node-box,
  .app--viewer-runtime .finalizer,
  .app--viewer-runtime .options,
  .app--viewer-runtime .areas-container,
  .app--viewer-runtime .runtime-actions {
    width: min(94vw, 420px);
  }

  .app--viewer-runtime .node-box {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-width: 1.5px;
    border-radius: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .app--viewer-runtime .card--pergunta .pill,
  .app--viewer-runtime .card--orientacao .pill,
  .app--viewer-runtime .card--interpretacao .pill,
  .app--viewer-runtime .card--area .pill {
    font-size: 10px;
    padding: 2px 6px;
    margin-bottom: 2px;
  }

  .app--viewer-runtime .node-box .h1,
  .app--viewer-runtime .node-box .body,
  .app--viewer-runtime .body {
    font-size: 15px;
    line-height: 1.2;
  }

  .app--viewer-runtime .node-box__image {
    max-height: 240px;
    margin-bottom: 8px;
    padding: 6px;
    border-radius: 14px;
  }

  .app--viewer-runtime .areas-container,
  .app--viewer-runtime .options,
  .app--viewer-runtime .runtime-actions {
    gap: 8px;
    margin-top: 12px;
  }

  .app--viewer-runtime .btn--area {
    width: 98px;
    height: 98px;
    border-radius: 14px;
    font-size: 11px;
    padding: 6px;
    gap: 6px;
  }

  .app--viewer-runtime .runtime-actions .btn,
  .app--viewer-runtime .options .btn,
  .app--viewer-runtime .btn--resposta {
    min-height: 0;
    font-size: 12px;
    padding: 9px 10px;
    border-width: 1.5px;
  }

  .app--viewer-runtime .btn--resposta {
    width: 100%;
    min-width: 0;
    padding: 9px 12px;
  }

  .app--viewer-runtime .finalizer {
    width: min(94vw, 420px);
    padding: 8px 8px 12px;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .app--viewer-runtime .finalizer__topbar {
    margin-bottom: 6px;
  }

  .app--viewer-runtime .finalizer__path {
    gap: 8px;
    margin: 6px 0 14px;
    padding: 0 1px;
  }

  .app--viewer-runtime .finalizer-step__question,
  .app--viewer-runtime .finalizer-step__answer {
    border-width: 1.5px;
    border-radius: 8px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
  }

  .app--viewer-runtime .finalizer-step__question {
    padding: 8px 6px 7px;
  }

  .app--viewer-runtime .finalizer-step__question strong {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .app--viewer-runtime .finalizer-step__question span {
    font-size: 10px;
    line-height: 1.15;
  }

  .app--viewer-runtime .finalizer-step__answer {
    margin-top: 4px;
    padding: 6px 7px;
  }

  .app--viewer-runtime .finalizer-step__answer strong,
  .app--viewer-runtime .finalizer-step__answer span {
    font-size: 10px;
    line-height: 1.15;
  }
}

.main--admin.main--editor {
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 28px 32px 40px;
}

.screen--admin-panel {
  width: 100%;
  max-width: 1240px;
  gap: 24px;
}

/* STAT CARDS */
.dash-stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dash-stat-card--hero {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.14), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
  color: #fff;
}

.dash-stat-card--hero h3,
.dash-stat-card--hero .dash-stat-card__meta,
.dash-stat-card--hero .stat-number {
  color: #fff;
}

.dash-stat-card__meta {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #64748b;
}
.dash-stat-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
}
.stat-number {
  font-size: 36px;
  font-weight: 900;
  color: var(--preto);
}

/* TABELA DE USUÁRIOS */
.table-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  box-shadow: 0 28px 55px rgba(15, 23, 42, 0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th, .admin-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  vertical-align: middle;
}
.admin-table th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.06em;
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.86);
}

.pill-sm {
  background: #e2e8f0;
  color: #334155;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 6px;
}

.status-badge {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-inactive {
  background: #fef2f2;
  color: #991b1b;
}

.btn--sm {
  min-height: 36px;
  padding: 8px 16px;
  font-size: 13px;
}

/* ABAS E FORMULÁRIOS */
.tabs {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 0;
  border: none;
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(241,245,249,0.95) 100%);
  width: fit-content;
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.16),
    0 18px 38px rgba(15, 23, 42, 0.08);
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  min-height: 54px;
  background: transparent;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  color: #64748b;
  border-radius: 16px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tab-btn.active {
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.1),
    inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-card {
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.95);
}

.managed-profile-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.managed-profile-preview__avatar {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #0f172a 100%);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
  overflow: hidden;
}

.managed-profile-preview__copy {
  display: grid;
  gap: 4px;
}

.managed-profile-preview__copy strong {
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.managed-profile-preview__copy small {
  font-size: 13px;
  color: #475569;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
  flex: 1;
}

.row-inputs {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  cursor: pointer;
}
.checkbox-label input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.form-status {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  font-weight: 700;
}

.form-status--success {
  background: #ecfdf5;
  color: #166534;
  border-color: #166534;
}

.form-status--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #991b1b;
}

.app-toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 1500;
  width: min(420px, calc(100vw - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast--open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-toast__copy {
  display: grid;
  gap: 4px;
}

.app-toast__eyebrow {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f766e;
}

.app-toast__title {
  font-size: 20px;
  color: #0f172a;
}

.app-toast__message {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.app-toast__close {
  flex: 0 0 auto;
  min-width: 72px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: rgba(255,255,255,0.88);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.app-toast--success {
  color: #0f766e;
}

.app-toast--warning {
  color: #b45309;
  background:
    radial-gradient(circle at top right, rgba(253, 186, 116, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255,251,235,0.98) 0%, rgba(255,247,237,0.98) 100%);
}

.app-toast--error {
  color: #b91c1c;
  background:
    radial-gradient(circle at top right, rgba(252, 165, 165, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(254,242,242,0.98) 0%, rgba(255,255,255,0.98) 100%);
}

.crefito-status {
  display: block;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.crefito-status--success {
  background: #ecfdf5;
  color: #166534;
  border-color: #166534;
}

.crefito-status--warning {
  background: #fff7ed;
  color: #9a3412;
  border-color: #c2410c;
}

.crefito-status--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #991b1b;
}

.crefito-status--info {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #60a5fa;
}

.table-empty {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  padding: 42px 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
}

.dashboard-panel {
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
}

.dashboard-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-panel__eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.dashboard-panel__title {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.dashboard-panel__tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-ratio {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: center;
}

.dashboard-donut-wrap {
  display: flex;
  justify-content: center;
}

.dashboard-donut {
  --dashboard-active: 0%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background:
    conic-gradient(#22c55e 0 var(--dashboard-active), #e2e8f0 var(--dashboard-active) 100%);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 12px rgba(255,255,255,0.2), 0 18px 36px rgba(15, 23, 42, 0.08);
}

.dashboard-donut__inner {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.dashboard-donut__inner strong {
  font-size: 28px;
  line-height: 1;
  color: #0f172a;
}

.dashboard-donut__inner span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.dashboard-breakdown {
  display: grid;
  gap: 12px;
}

.dashboard-breakdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-breakdown__item strong {
  display: block;
  font-size: 20px;
  color: #0f172a;
}

.dashboard-breakdown__item span:last-child {
  font-size: 13px;
  color: #64748b;
}

.dashboard-breakdown__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dashboard-breakdown__dot--active {
  background: #22c55e;
}

.dashboard-breakdown__dot--inactive {
  background: #ef4444;
}

.dashboard-breakdown__dot--modules {
  background: #2563eb;
}

.dashboard-bars {
  display: grid;
  gap: 14px;
}

.dashboard-bar {
  display: grid;
  gap: 8px;
}

.dashboard-bar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-bar__top strong {
  font-size: 14px;
  color: #0f172a;
}

.dashboard-bar__top span {
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
}

.dashboard-bar__track {
  height: 14px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dashboard-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #22c55e 100%);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.3);
}

.dashboard-highlights {
  display: grid;
  gap: 14px;
}

.dashboard-highlight {
  display: grid;
  gap: 6px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.dashboard-highlight--blue {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
}

.dashboard-highlight--green {
  background: linear-gradient(135deg, #166534 0%, #10b981 100%);
}

.dashboard-highlight--dark {
  background: linear-gradient(135deg, #111827 0%, #334155 100%);
}

.dashboard-highlight__label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
}

.dashboard-highlight strong {
  font-size: 30px;
  line-height: 1;
}

.dashboard-highlight small {
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.88;
}

.dashboard-recent-list {
  display: grid;
  gap: 12px;
}

.dashboard-recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.dashboard-recent-item__avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
  flex-shrink: 0;
}

.dashboard-recent-item__avatar--image {
  overflow: hidden;
  background: #ffffff;
}

.dashboard-recent-item__avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-recent-item__content {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.dashboard-recent-item__content strong {
  font-size: 15px;
  color: #0f172a;
}

.dashboard-recent-item__content span,
.dashboard-recent-item__content small {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-empty {
  padding: 20px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  color: #64748b;
  font-weight: 700;
  text-align: center;
}

.dash-header {
  margin-bottom: 0;
  border-bottom: none;
  padding: 30px 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 26%),
    radial-gradient(circle at 18% 30%, rgba(16, 185, 129, 0.16), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 45%, #eef6ff 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.1);
}

.dash-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.dash-header .h1 {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.dash-header .muted {
  margin-top: 8px;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.55;
  color: #64748b;
}

.fisios-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.fisios-stat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 22px 22px 20px;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.7), transparent 26%),
    linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.08);
}

.fisios-stat-card::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
}

.fisios-stat-card--primary {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
  color: #ffffff;
}

.fisios-stat-card--accent {
  background: linear-gradient(135deg, #166534 0%, #10b981 100%);
  color: #ffffff;
}

.fisios-stat-card__label {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.fisios-stat-card__value {
  position: relative;
  z-index: 1;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.fisios-stat-card__meta {
  position: relative;
  z-index: 1;
  font-size: 14px;
  line-height: 1.45;
  color: inherit;
  opacity: 0.86;
}

#screenAdminFisios .table-card,
#screenAdminFisiosForm .form-card,
#screenAdminModulos .dash-card,
#screenAdminDashboard .dash-stat-card {
  backdrop-filter: blur(8px);
}

#screenAdminFisios .btn--ghost.btn--sm,
#screenAdminFisios .btn--start-sm,
#screenAdminFisiosForm .btn--ghost.btn--sm,
#screenAdminFisiosForm .btn--start-sm {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

#screenAdminFisios .admin-table td strong {
  display: inline-block;
  font-size: 16px;
  line-height: 1.35;
  color: #0f172a;
}

#screenAdminFisios .admin-table td .muted {
  font-size: 12px;
  line-height: 1.45;
}

.admin-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-person__avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb 0%, #0f172a 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.24);
  flex-shrink: 0;
  overflow: hidden;
}

.admin-person__avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-person__content {
  display: grid;
  gap: 4px;
}

.admin-contact {
  display: grid;
  gap: 4px;
}

.admin-contact__email {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.admin-table__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-table__history-btn {
  min-width: 64px;
}

#screenAdminFisiosForm .h2 {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

#screenAdminFisiosForm .label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #475569;
}

#screenAdminFisiosForm .row-inputs {
  gap: 18px;
}

#screenAdminFisiosForm .input-text {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

#screenAdminFisiosForm .input-text:focus,
#screenAdminFisiosForm .textarea:focus,
#screenAdminFisiosForm select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
  background: #ffffff;
}

@media (max-width: 980px) {
  .dashboard-stats-grid,
  .fisios-stats-grid,
  .modules-stats-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-ratio {
    grid-template-columns: 1fr;
  }
  .dash-header {
    padding: 24px;
  }
  .dash-header .h1 {
    font-size: 34px;
  }
  .module-card__metrics {
    grid-template-columns: 1fr;
  }
}

.builder-card {
  display: grid;
  gap: 16px;
}

.flow-editor-card {
  display: grid;
  gap: 18px;
  position: relative;
}

.screen--editor.editor-mode-simple [data-builder-advanced] {
  display: none !important;
}

.flow-editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.flow-editor-stage {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.screen--editor {
  width: 100%;
  max-width: 1500px;
}

.screen--editor #editorSubtitle {
  max-width: 980px;
}

.flow-editor-canvas {
  min-height: 680px;
}

.flow-editor-insights {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: #f8fafc;
  border: 2px solid var(--border);
}

.flow-editor-insights__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.builder-validation {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.builder-validation__summary {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.builder-validation__item {
  width: 100%;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: inherit;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.builder-validation__item:hover {
  background: #ffffff;
  border-color: #f59e0b;
}

.builder-validation__item:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.28);
  outline-offset: 2px;
}

.builder-validation__item:active {
  transform: translateY(1px);
}

.builder-path-preview {
  display: grid;
  gap: 10px;
}

.builder-path-preview__item {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #dbe3ec;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}

.builder-path-preview__empty {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  background: #fff;
}

.flow-editor-sidebar {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: min(620px, calc(100vw - 24px));
  min-width: 420px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  border-radius: 28px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.flow-editor-sidebar__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,250,252,0.9) 100%);
}

.flow-editor-sidebar__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-editor-sidebar__subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

.flow-editor-sidebar__body {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.75) transparent;
}

.flow-editor-sidebar .row,
.flow-editor-sidebar .row-inputs {
  width: 100%;
}

.flow-editor-sidebar .row {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.flow-editor-sidebar .row-inputs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.flow-editor-sidebar .input-group {
  margin-bottom: 0;
  min-width: 0;
}

.flow-editor-sidebar .input-text,
.flow-editor-sidebar .textarea,
.flow-editor-sidebar select,
.flow-editor-sidebar button {
  max-width: 100%;
  box-sizing: border-box;
}

.flow-editor-sidebar #btnSetSelectedAsStart,
.flow-editor-sidebar #btnSidebarAddAnswer {
  width: 100%;
  justify-content: center;
}

.flow-editor-sidebar__body::-webkit-scrollbar {
  width: 10px;
}

.flow-editor-sidebar__body::-webkit-scrollbar-track {
  background: transparent;
}

.flow-editor-sidebar__body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.flow-editor-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.flow-editor-panel--empty {
  text-align: center;
  align-content: center;
  min-height: 220px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.82);
}

.flow-editor-panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.flow-editor-panel__eyebrow {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.flow-editor-panel__subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

.flow-editor-answers {
  display: grid;
  gap: 12px;
}

.flow-editor-answer-list {
  display: grid;
  gap: 12px;
}

.flow-editor-answer-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d5dce6;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.builder-image-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #d5dce6;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.builder-image-preview__img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  padding: 10px;
}

.flow-editor-panel--selected {
  gap: 18px;
}

.flow-editor-panel--selected .flow-editor-panel__title {
  font-size: 24px;
}

.flow-editor-selected-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.8);
}

.flow-editor-selected-top__copy {
  display: grid;
  gap: 6px;
}

.builder-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
}

.builder-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.builder-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.builder-modal__dialog--danger {
  background:
    radial-gradient(circle at top right, rgba(248, 113, 113, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(254,242,242,0.98) 100%);
}

.builder-modal__dialog--warning {
  background:
    radial-gradient(circle at top right, rgba(253, 186, 116, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(255,251,235,0.98) 0%, rgba(255,255,255,0.98) 100%);
}

.device-history-modal {
  width: min(760px, calc(100vw - 32px));
}

.device-history-modal__hero {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98) 0%, rgba(236, 253, 245, 0.98) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.device-history-modal__icon {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.14);
}

.device-history-modal__copy {
  display: grid;
  gap: 6px;
}

.device-history-modal__copy p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.device-history-list {
  display: grid;
  gap: 12px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.device-history-empty {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px dashed rgba(148, 163, 184, 0.34);
  color: #64748b;
  font-weight: 700;
}

.device-history-item {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.device-history-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.device-history-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

.device-history-item__desc {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.device-history-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.device-history-badge--success {
  background: #dcfce7;
  color: #166534;
}

.device-history-badge--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.device-history-badge--info {
  background: #dbeafe;
  color: #1d4ed8;
}

.device-history-badge--neutral {
  background: #e2e8f0;
  color: #334155;
}

.builder-modal__options {
  display: grid;
  gap: 10px;
}

.builder-modal__choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid #d6dde6;
  background: #f8fafc;
  font-weight: 700;
  cursor: pointer;
}

.builder-modal__choice input {
  margin: 0;
}

.builder-modal__fields {
  display: grid;
  gap: 14px;
}

.delete-module-modal__hero {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(248, 113, 113, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.delete-module-modal__icon {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.16);
}

.delete-module-modal__copy {
  display: grid;
  gap: 6px;
}

.delete-module-modal__copy strong {
  font-size: 24px;
  color: #7f1d1d;
}

.delete-module-modal__copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #7c2d12;
}

.builder-validation-modal__hero {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.builder-validation-modal__icon {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: linear-gradient(135deg, #fef3c7 0%, #fdba74 100%);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.16);
}

.builder-validation-modal__copy {
  display: grid;
  gap: 6px;
}

.builder-validation-modal__copy strong {
  font-size: 24px;
  color: #9a3412;
}

.builder-validation-modal__copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #7c2d12;
}

.builder-validation-modal__list {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.builder-validation-modal__item {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.builder-validation-modal__item strong {
  font-size: 14px;
  color: #92400e;
  line-height: 1.5;
}

.builder-validation-modal__item span {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.builder-validation-modal__extra {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  color: #92400e;
  font-weight: 700;
}

.editor-saving-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.editor-saving-overlay__card {
  width: min(440px, calc(100vw - 32px));
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  padding: 28px 24px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.editor-saving-overlay__card strong {
  font-size: 24px;
  color: #0f172a;
}

.editor-saving-overlay__card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.editor-saving-overlay__spinner {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 4px solid rgba(37, 99, 235, 0.14);
  border-top-color: #2563eb;
  animation: editor-saving-spin 0.8s linear infinite;
}

@keyframes editor-saving-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn--saving {
  position: relative;
  pointer-events: none;
  opacity: 0.9;
}

.timeline-builder {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 12px 0 20px 0;
}

.timeline-builder::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #bbf7d0 0%, #fed7aa 45%, #e5e7eb 100%);
}

.timeline-step {
  position: relative;
  margin-left: 70px;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 2px solid transparent;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: -56px;
  top: 26px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 5px solid #fff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.timeline-step:hover {
  transform: translateY(-1px);
}

.timeline-step--question {
  background: linear-gradient(180deg, #d9f99d 0%, #bbf7d0 100%);
  border-color: #65a30d;
}

.timeline-step--question::before {
  background: #16a34a;
}

.timeline-step--result {
  background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
  border-color: #9ca3af;
}

.timeline-step--result::before {
  background: #111827;
}

.timeline-step--selected {
  border-color: #0f172a;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.timeline-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-step__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
}

.timeline-step__subtitle {
  font-size: 13px;
  color: #334155;
  font-weight: 700;
}

.timeline-step__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  font-weight: 900;
  color: #0f172a;
}

.timeline-step__body {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.timeline-step__media {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.65);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.88);
  padding: 12px;
}

.timeline-step__answers {
  display: grid;
  gap: 10px;
}

.timeline-step__answer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 0;
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, #fdba74 0%, #fb923c 100%);
  color: #111827;
  box-shadow: 4px 4px 0 rgba(194, 65, 12, 0.18);
  cursor: pointer;
}

.timeline-step__answer:hover {
  transform: translateY(-1px);
}

.timeline-step__answer-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.timeline-step__answer-label {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.3;
}

.timeline-step__answer-target {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
}

.timeline-step__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.timeline-step__action {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.timeline-step__meta {
  font-size: 12px;
  color: #475569;
  font-weight: 700;
}

.timeline-step__result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline-step__result-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d1d5db;
  font-size: 12px;
  font-weight: 800;
  color: #111827;
}

.builder-options {
  display: grid;
  gap: 16px;
}

.builder-option {
  border: 2px solid var(--border);
  border-radius: var(--radius2);
  padding: 18px;
  background: #f8fafc;
  display: grid;
  gap: 12px;
}

.builder-option__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-option__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.builder-info {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius2);
  background: #f8fafc;
  border: 2px solid var(--border);
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.builder-nodes {
  display: grid;
  gap: 18px;
}

.visual-editor-card {
  display: grid;
  gap: 20px;
}

.visual-editor-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.visual-editor-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 24px;
  align-items: start;
}

.visual-editor-controls {
  display: grid;
  gap: 16px;
}

.visual-editor-guide {
  display: grid;
  gap: 12px;
}

.visual-editor-guide__item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.visual-editor-guide__item strong {
  font-size: 14px;
  color: #0f172a;
}

.visual-editor-guide__item span {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.visual-editor-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.visual-editor-section__header {
  display: grid;
  gap: 4px;
}

.visual-editor-section__title {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
}

.visual-editor-palette {
  display: grid;
  gap: 14px;
}

.visual-editor-palette__group {
  padding: 14px;
  border: 1px solid #d7d7d7;
  border-radius: 16px;
  background: #fafafa;
}

.visual-editor-palette__title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.visual-editor-preview-wrap {
  position: sticky;
  top: 20px;
}

.visual-color-input {
  min-height: 48px;
  padding: 6px;
}

.visual-preview {
  min-height: 760px;
  padding: 18px;
  border-radius: 26px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(244,244,244,0.92) 100%);
  background-size: cover;
  background-position: center;
  color: #0f172a;
  display: grid;
  gap: 18px;
  align-content: start;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.visual-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
}

.visual-editor-open {
  overflow: hidden;
}

.visual-editor-card--fullscreen {
  position: fixed;
  inset: 14px;
  z-index: 1000;
  margin: 0;
  max-width: none;
  width: auto;
  height: auto;
  overflow: auto;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.visual-editor-card--fullscreen .visual-editor-layout {
  grid-template-columns: minmax(340px, 420px) 1fr;
  min-height: calc(100vh - 120px);
}

.visual-editor-card--fullscreen .visual-editor-preview-wrap {
  position: sticky;
  top: 0;
}

.visual-editor-card--fullscreen .visual-preview {
  min-height: calc(100vh - 150px);
  cursor: default;
}

.visual-editor-card--fullscreen .visual-editor-controls {
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding-right: 8px;
}

.visual-preview__topline {
  font-size: 12px;
  font-weight: 800;
}

.visual-preview__homepage {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 2px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.visual-preview__homepage-badge {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.visual-preview__homepage-media {
  position: relative;
  min-height: 250px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-preview__homepage-image {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
}

.visual-preview__homepage-fallback {
  padding: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
}

.visual-preview__homepage-start {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  pointer-events: none;
  min-width: 160px;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.26);
}

.visual-preview__homepage-note {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.visual-preview__hero {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
}

.visual-preview__art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  position: relative;
  border-radius: 28px;
}

.visual-preview__art--cover {
  min-height: 128px;
  overflow: hidden;
  background: rgba(255,255,255,0.32);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.visual-preview__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
}

.visual-preview__icon {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  background: rgba(255,255,255,0.75);
}

.visual-preview__module-name {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
}

.visual-preview__subtitle {
  font-size: 14px;
  opacity: 0.9;
}

.visual-preview__question,
.visual-preview__diagnosis {
  padding: 22px 24px;
  border-radius: 28px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.16);
}

.visual-preview__media {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 22px;
  margin: 10px 0 14px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px;
}

.visual-preview__label {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.visual-preview__diagnosis-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.visual-preview__diagnosis-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.16));
}

.visual-preview__text,
.visual-preview__diagnosis-text {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
}

.visual-preview__answers {
  display: grid;
  gap: 12px;
}

.visual-preview__answer {
  padding: 16px 20px;
  border-radius: 18px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 1080px) {
  .flow-editor-sidebar {
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: auto;
    min-width: 0;
    border-radius: 22px;
  }
  .flow-editor-canvas {
    min-height: 560px;
  }
  .flow-editor-sidebar__header {
    padding: 18px 18px 16px;
  }
  .flow-editor-sidebar__body {
    padding: 14px;
  }
  .flow-editor-selected-top {
    flex-direction: column;
    align-items: stretch;
  }
  .timeline-step {
    margin-left: 48px;
    padding: 16px;
  }
  .timeline-step::before {
    left: -40px;
  }
  .timeline-step__title {
    font-size: 22px;
  }
  .timeline-builder::before {
    left: 18px;
  }
  .visual-editor-layout {
    grid-template-columns: 1fr;
  }
  .visual-preview__homepage {
    grid-template-columns: 1fr;
  }
  .visual-editor-preview-wrap {
    position: static;
  }
  .visual-editor-card--fullscreen {
    inset: 0;
    border-radius: 0;
  }
  .visual-editor-card--fullscreen .visual-editor-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .visual-editor-card--fullscreen .visual-editor-controls,
  .visual-editor-card--fullscreen .visual-preview {
    max-height: none;
    min-height: 640px;
  }
}

.builder-node {
  border: 2px solid var(--border);
  border-radius: var(--radius2);
  background: #f8fafc;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.builder-node--question {
  border-color: #22c55e;
  background: #ecfdf5;
}

.builder-node--result {
  border-color: #f59e0b;
  background: #fff7ed;
}

.builder-node__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.builder-node__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.builder-answer-list {
  display: grid;
  gap: 12px;
}

.builder-answer {
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.builder-answer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-answer__title {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.flow-diagram {
  display: block;
  margin-top: 8px;
}

.flowboard {
  position: relative;
  border-radius: var(--radius2);
  border: 2px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.22), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  overflow: auto;
  min-height: 360px;
}

.flowboard__svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.flowboard__content {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-width: max-content;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.flowboard__column {
  width: 250px;
  display: grid;
  gap: 16px;
}

.flowboard__column-title {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flow-node {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #334155;
  background: #1e293b;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
  color: #e2e8f0;
  position: relative;
  cursor: pointer;
}

.flow-node:hover {
  transform: translateY(-1px);
}

.flow-node--selected {
  outline: 3px solid #fde047;
  box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.25), 0 14px 36px rgba(15, 23, 42, 0.45);
}

.flow-node--connect-target {
  outline: 3px dashed #86efac;
}

.flow-node--root {
  border-color: #22c55e;
  background: linear-gradient(180deg, #14532d 0%, #166534 100%);
}

.flow-node--branch {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #172554 0%, #1d4ed8 100%);
}

.flow-node--support {
  border-color: #a78bfa;
  background: linear-gradient(180deg, #3b0764 0%, #6d28d9 100%);
}

.flow-node--question {
  border-color: #22c55e;
  background: linear-gradient(180deg, #0f3d2e 0%, #166534 100%);
}

.flow-node--result {
  border-color: #fb923c;
  background: linear-gradient(180deg, #7c2d12 0%, #c2410c 100%);
}

.flow-node--checkpoint {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #0c4a6e 0%, #0369a1 100%);
}

.flow-node--neutral {
  border-color: #64748b;
  background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
}

.flow-node--answer {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #78350f 0%, #b45309 100%);
}

.flow-node--action {
  border-color: #eab308;
  background: linear-gradient(180deg, #713f12 0%, #a16207 100%);
}

.flow-node__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-node__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #334155;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flow-node__title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: #f8fafc;
  line-height: 1.25;
}

.flow-node__title[contenteditable="true"],
.flow-node__body[contenteditable="true"],
.flow-node__port strong[contenteditable="true"] {
  outline: none;
  border-radius: 10px;
}

.flow-node__title[contenteditable="true"]:focus,
.flow-node__body[contenteditable="true"]:focus,
.flow-node__port strong[contenteditable="true"]:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.flow-node__body {
  font-size: 13px;
  color: #cbd5e1;
  white-space: pre-wrap;
}

.flow-node__body--placeholder {
  opacity: 0.72;
}

.flow-node__body[data-placeholder]:empty::before {
  content: attr(data-placeholder);
}

.flow-node__ports {
  display: grid;
  gap: 8px;
}

.flow-node__section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.flow-node__port {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid #334155;
}

.flow-node__port strong {
  color: #f8fafc;
  font-size: 12px;
}

.flow-node__port-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.flow-node__port span {
  color: #93c5fd;
  font-size: 12px;
}

.flow-node__port--response {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.45);
}

.flow-node__port--response span {
  color: #86efac;
}

.flow-node__port--action span {
  color: #fcd34d;
}

.flow-node__port--pending {
  border-color: #fde047;
  box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.2);
}

.flow-node__port-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flow-node__mini-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.46);
  color: #f8fafc;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.flow-node__mini-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.flow-node__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.flow-node__meta {
  font-size: 12px;
  color: #cbd5e1;
  opacity: 0.9;
}

.flow-node__start-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.flow-empty {
  padding: 18px;
  border-radius: var(--radius2);
  border: 2px dashed var(--muted);
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.textarea {
  width: 100%;
  border-radius: var(--radius2);
  border: 2px solid var(--border);
  padding: 14px 16px;
  font-size: 15px;
  font-family: Consolas, "Courier New", monospace;
  resize: vertical;
  box-sizing: border-box;
}

/* Botões Menores para Dashboard */
.btn--start-sm {
  background: #39b54a;
  color: white;
  border-radius: var(--radius2);
  font-size: 16px;
  padding: 10px 20px;
  border: 2px solid #1a1a1a;
  font-weight: 800;
  cursor: pointer;
  flex: 1;
  text-align: center;
}
.btn--start-sm:hover {
  background: #2d923a;
}

/* Estilos da Tela Inicial (Como Utilizar) */
.home-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 32px 40px;
  overflow: hidden;
}

.home-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 223, 128, 0.25), transparent 22%),
    radial-gradient(circle at 30% 40%, rgba(129, 199, 132, 0.18), transparent 30%),
    radial-gradient(circle at 50% 75%, rgba(144, 202, 249, 0.16), transparent 28%);
  pointer-events: none;
}

.home-cover--immersive {
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 26px 24px 34px;
}

.home-cover--immersive::before {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.24) 100%);
}

.home-topline,
.home-welcome,
.home-hero,
.home-subtitle,
.legend-list,
.home-tips,
.home-footer,
.home-credits {
  position: relative;
  z-index: 1;
}

.home-cover--immersive .home-topline,
.home-cover--immersive .home-welcome,
.home-cover--immersive .home-title,
.home-cover--immersive .home-subtitle,
.home-cover--immersive .legend-list,
.home-cover--immersive .home-tips,
.home-cover--immersive .home-greetings,
.home-cover--immersive .home-credits {
  display: none;
}

.home-cover--immersive .home-hero {
  justify-content: center;
  margin-bottom: 0;
}

.home-cover--immersive .home-apple {
  width: min(100%, 980px);
  min-height: 0;
}

.home-cover--immersive .home-hero__image {
  width: 100%;
  max-width: none;
  max-height: 68vh;
  border-radius: 32px;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
}

.home-cover--immersive .home-footer {
  justify-content: center;
  margin-top: 24px;
  margin-bottom: 0;
}

.home-topline {
  align-self: stretch;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  color: #303030;
  margin-bottom: 10px;
}

.home-welcome {
  align-self: flex-start;
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 12px;
}

.home-hero {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.home-title {
  font-size: clamp(56px, 7vw, 88px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.06;
  margin: 0;
  letter-spacing: 1.8px;
  text-align: left;
  white-space: pre-line;
}

.home-apple {
  flex-shrink: 0;
  font-size: clamp(110px, 12vw, 160px);
  line-height: 1;
  width: min(240px, 26vw);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-hero__image {
  width: 100%;
  max-width: 240px;
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.16));
}

.home-subtitle {
  font-size: 34px;
  font-weight: 800;
  margin: 0 0 34px 0;
}

.legend-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 980px;
  text-align: left;
  margin-bottom: 34px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 22px;
}

.legend-color {
  width: 132px;
  padding: 12px 0;
  text-align: center;
  border-radius: 14px;
  font-weight: 800;
  font-size: 20px;
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.legend-verde { background: var(--verde); color: var(--verde-text); }
.legend-laranja { background: var(--laranja); color: var(--text); }
.legend-branco { background: var(--branco); color: var(--text); }
.legend-cinza { background: var(--cinza); color: var(--cinza-text); }
.legend-preto { background: var(--preto); color: var(--preto-text); }

.legend-icon {
  width: 132px;
  text-align: center;
  font-size: 62px;
  flex-shrink: 0;
}

.legend-text {
  font-size: 22px;
  line-height: 1.5;
}

.home-tips {
  text-align: left;
  font-size: 21px;
  color: #555;
  width: 100%;
  max-width: 980px;
  margin-bottom: 36px;
}

.home-tips p {
  margin: 12px 0;
}

.home-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  width: 100%;
  margin-bottom: 18px;
}

.home-greetings {
  font-size: 34px;
  font-weight: 800;
  text-align: right;
  line-height: 1.2;
}

.btn--start {
  background: #39b54a; /* Verde forte do botão START */
  color: white;
  border-radius: 999px;
  font-size: 34px;
  padding: 18px 64px;
  border: 3px solid #1a1a1a;
  box-shadow: var(--shadow-drop);
}
.btn--start:hover {
  background: #2d923a;
}

.home-credits {
  font-size: 18px;
  font-weight: bold;
  color: #444;
  margin-top: 8px;
}

/* CARDS E CORES */
.card {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-drop);
  padding: 24px;
  transition: all 0.2s ease;
}

/* Novo estilo igual ao PDF para as perguntas/títulos */
.node-box {
  border: 2px solid var(--border);
  border-radius: 999px; /* Formato de pílula arredondada como no PDF */
  padding: 20px 30px;
  text-align: center;
  box-shadow: var(--shadow-strong);
  margin-bottom: 30px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* VERDE = PERGUNTA */
.card--pergunta {
  background: var(--verde);
  color: var(--verde-text);
}
.card--pergunta .pill {
  background: transparent;
  color: var(--verde-text);
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.card--pergunta .h1, .card--pergunta .body {
  color: var(--verde-text);
  text-transform: uppercase;
  font-size: 20px;
}

/* BRANCO = ORIENTAÇÃO */
.card--orientacao {
  background: var(--branco);
  color: var(--text);
}
.card--orientacao .pill {
  background: transparent;
  color: var(--text);
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.card--orientacao .h1, .card--orientacao .body {
  text-transform: uppercase;
  font-size: 20px;
}

/* CINZA = INTERPRETAÇÃO */
.card--interpretacao {
  background: var(--cinza);
  color: var(--cinza-text);
}
.card--interpretacao .pill {
  background: transparent;
  color: var(--cinza-text);
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.card--interpretacao .h1, .card--interpretacao .body {
  text-transform: uppercase;
  font-size: 20px;
}

.node-box__image {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 24px;
  margin-bottom: 18px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.94);
  padding: 12px;
}

.card--finalizer {
  display: none;
}

/* PRETO = ÁREAS (apenas caso tenha caixa de texto preta) */
.card--area {
  background: var(--preto);
  color: var(--preto-text);
}
.card--area .pill {
  background: transparent;
  color: var(--preto-text);
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.card--area .h1, .card--area .body, .card--area .muted {
  color: var(--preto-text);
  text-transform: uppercase;
  font-size: 20px;
}

.h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
}

.h2 {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}

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

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.row--between {
  justify-content: space-between;
}

.row--right {
  justify-content: flex-end;
}

/* BOTÕES GIGANTES PARA USO CLÍNICO */
.btn {
  appearance: none;
  border: 2px solid var(--border);
  background: var(--branco);
  color: var(--text);
  padding: 18px 20px;
  border-radius: var(--radius2);
  font-weight: 700;
  cursor: pointer;
  font-size: 18px;
  min-height: 60px;
  transition: all 0.2s;
  box-shadow: var(--shadow-drop);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

/* LARANJA = RESPOSTA (estilo pílula do PDF) */
.btn--resposta {
  background: var(--laranja);
  color: var(--text);
  border-radius: 999px;
  text-transform: uppercase;
  padding: 14px 40px;
  font-weight: 800;
  width: auto;
  min-width: 250px;
}
.btn--resposta:hover {
  background: var(--laranja-hover);
}

/* PRETO = NAVEGAÇÃO / ÁREAS (quadrados com ícones) */
.areas-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn--area {
  background: var(--preto);
  color: var(--preto-text);
  border-radius: 20px;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 800;
  padding: 10px;
  gap: 10px;
}
.btn--area:hover {
  background: var(--preto-hover);
}
.btn--area .icon {
  font-size: 40px;
  line-height: 1;
}

/* Botões Secundários/Ações de Interpretação */
.btn--ghost {
  background: var(--branco);
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--cinza);
}

.runtime-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.runtime-actions .btn {
  flex: 1 1 220px;
}

.btn--danger {
  background: #fee2e2;
  color: #dc2626;
}
.btn--danger:hover {
  background: #fca5a5;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 800;
  width: fit-content;
}

.body {
  margin-top: 5px;
  font-size: 20px; /* Texto maior para legibilidade clínica */
  line-height: 1.4;
  white-space: pre-wrap;
  font-weight: 800;
}

.options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

/* Breadcrumb */
.breadcrumbWrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.breadcrumb {
  width: min(840px, 100%);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-home {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid #2c6cff;
  background: linear-gradient(180deg, #7fb3ff 0%, #4f82ff 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-home:hover {
  transform: translateY(-1px);
}

.btn-home__icon {
  font-size: 28px;
  line-height: 1;
}

.btn-home--final {
  width: 52px;
  height: 52px;
}

.finalizer {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto 24px;
  padding: 14px 18px 18px;
  border-radius: 24px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 223, 128, 0.22), transparent 20%),
    radial-gradient(circle at 25% 35%, rgba(129, 199, 132, 0.18), transparent 24%),
    radial-gradient(circle at 50% 75%, rgba(144, 202, 249, 0.2), transparent 26%),
    #f5f4ee;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.finalizer__topbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.finalizer__path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 10px 0 28px;
  padding: 0 10px;
}

.finalizer__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.finalizer-step {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.finalizer-step__question,
.finalizer-step__answer {
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
  text-align: center;
}

.finalizer-step__question {
  background: #fff;
  padding: 14px 10px 12px;
}

.finalizer-step__question strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.finalizer-step__question span {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.finalizer-step__answer {
  margin-top: 8px;
  background: #f0c89c;
  padding: 8px 10px;
}

.finalizer-step__answer strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.finalizer-step__answer span {
  display: block;
  font-size: 13px;
}

.finalizer__hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 190px;
  padding: 10px 6px 0;
}

.finalizer__art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.finalizer__svg {
  width: 220px;
  height: auto;
}

.finalizer__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

.finalizer__badge {
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
  color: #ff6b00;
  text-shadow:
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff,
    5px 5px 0 #c30000;
}

.finalizer__subtitle {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  color: #ff4e00;
  text-shadow:
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff,
    5px 5px 0 #8d0018;
}

.diagnosis {
  width: min(720px, 100%);
  margin: 0 auto 24px;
  padding: 14px 18px 18px;
  border-radius: 24px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 223, 128, 0.18), transparent 20%),
    radial-gradient(circle at 25% 35%, rgba(129, 199, 132, 0.14), transparent 24%),
    radial-gradient(circle at 50% 75%, rgba(144, 202, 249, 0.16), transparent 26%),
    #f5f4ee;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.diagnosis__topbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.diagnosis__path {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin: 8px 0 26px;
  padding: 0 28px;
}

.diagnosis__card {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  grid-template-areas:
    "icon title"
    "body body"
    "media media";
  align-items: center;
  gap: 18px;
  padding: 26px 24px 34px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(223, 223, 223, 0.96) 0%, rgba(206, 206, 206, 0.96) 100%);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.diagnosis__image {
  grid-area: media;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 22px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.94);
  padding: 12px;
}

.diagnosis__card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: #f0c89c;
}

.diagnosis__icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagnosis__icon-image {
  width: 98px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(15, 23, 42, 0.18));
}

.diagnosis__svg {
  width: 98px;
  height: auto;
}

.diagnosis__title {
  grid-area: title;
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
  color: #111;
  text-shadow:
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff,
    5px 5px 0 #000;
}

.diagnosis__body {
  grid-area: body;
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  justify-self: center;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.diagnosis__card--with-media .diagnosis__image {
  max-height: 440px;
  border-radius: 18px;
  border: none;
  background: transparent;
  padding: 0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.diagnosis__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.btn--diagnosis-primary,
.btn--diagnosis-secondary {
  min-width: 220px;
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.14);
  line-height: 1.2;
}

.btn--diagnosis-primary {
  background: #fff;
  color: #111;
}

.btn--diagnosis-secondary {
  background: #f0c89c;
  color: #111;
}

.trigger-question {
  width: min(760px, 100%);
  margin: 14px auto 24px;
}

.trigger-question__columns {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 26px;
  align-items: start;
}

.trigger-question__heading {
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 12px;
}

.trigger-question__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trigger-question__item {
  background: rgba(243, 222, 199, 0.92);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 1.2;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
}

.trigger-question__buttons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.btn--trigger {
  background: #f0c89c;
  color: #111;
  border-radius: 18px;
  font-size: 20px;
  min-height: 68px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
}

@media (max-width: 720px) {
  .home-cover {
    padding: 18px 16px 28px;
  }
  .home-topline {
    font-size: 12px;
  }
  .home-welcome {
    font-size: 22px;
  }
  .home-hero {
    gap: 14px;
    margin-bottom: 16px;
  }
  .home-title {
    font-size: 42px;
    letter-spacing: 1px;
  }
  .home-apple {
    font-size: 82px;
  }
  .home-subtitle {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .legend-list {
    gap: 14px;
    margin-bottom: 24px;
  }
  .legend-item {
    gap: 12px;
  }
  .legend-color,
  .legend-icon {
    width: 88px;
  }
  .legend-color {
    font-size: 14px;
    padding: 10px 0;
  }
  .legend-icon {
    font-size: 40px;
  }
  .legend-text,
  .home-tips {
    font-size: 15px;
  }
  .home-greetings {
    font-size: 24px;
  }
  .btn--start {
    font-size: 24px;
    padding: 12px 34px;
  }
  .home-credits {
    font-size: 13px;
  }
  .runtime-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .finalizer__hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .finalizer__copy {
    align-items: center;
  }
  .finalizer__path {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 8px 0 18px;
    padding: 0 4px;
  }
  .finalizer {
    padding: 10px 10px 14px;
    border-radius: 18px;
  }
  .finalizer__topbar {
    margin-bottom: 8px;
  }
  .btn-home {
    width: 44px;
    height: 44px;
    border-width: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
  }
  .btn-home__icon {
    font-size: 20px;
  }
  .finalizer-step__question,
  .finalizer-step__answer {
    border-radius: 10px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  }
  .finalizer-step__question {
    padding: 10px 8px 9px;
  }
  .finalizer-step__question strong {
    font-size: 14px;
    margin-bottom: 5px;
  }
  .finalizer-step__question span {
    font-size: 11px;
    line-height: 1.22;
  }
  .finalizer-step__answer {
    margin-top: 6px;
    padding: 7px 8px;
  }
  .finalizer-step__answer strong {
    font-size: 11px;
    margin-bottom: 2px;
  }
  .finalizer-step__answer span {
    font-size: 11px;
    line-height: 1.2;
  }
  .diagnosis__path {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
  .diagnosis__card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .diagnosis__title {
    font-size: 28px;
  }
  .trigger-question__columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .diagnosis__topbar {
    margin-bottom: 8px;
  }

  .diagnosis__path {
    gap: 10px;
    margin: 6px 0 16px;
    padding: 0 4px;
  }

  .diagnosis__card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 12px 22px;
    border-radius: 14px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  }

  .diagnosis__card::after {
    height: 18px;
  }

  .diagnosis__icon-image,
  .diagnosis__svg {
    width: 62px;
  }

  .diagnosis__title {
    font-size: 20px;
    line-height: 1.05;
    text-shadow:
      -1px -1px 0 #fff,
      1px -1px 0 #fff,
      -1px 1px 0 #fff,
      1px 1px 0 #fff,
      2px 2px 0 #000;
  }

  .diagnosis__body {
    width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.3;
  }

  .diagnosis__image {
    max-height: 220px;
    border-radius: 14px;
    padding: 6px;
    margin-top: 2px;
  }

  .diagnosis__card--with-media .diagnosis__image {
    max-height: 210px;
    border-radius: 12px;
  }

  .diagnosis__actions {
    gap: 8px;
    margin-top: 14px;
  }

  .btn--diagnosis-primary,
  .btn--diagnosis-secondary {
    min-width: 0;
    width: 100%;
    border-radius: 12px;
    font-size: 14px;
    padding: 10px 12px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  }
}

@media (max-width: 430px) {
  .diagnosis__path {
    justify-items: center;
    gap: 8px;
    margin: 4px 0 14px;
    padding: 0 2px;
  }

  .diagnosis__card {
    width: min(82vw, 316px);
    gap: 7px;
    padding: 10px 9px 16px;
    border-radius: 12px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
  }

  .diagnosis__card::after {
    height: 14px;
  }

  .diagnosis__icon-image,
  .diagnosis__svg {
    width: 46px;
  }

  .diagnosis__title {
    font-size: 16px;
    line-height: 1.02;
    max-width: 232px;
    margin: 0 auto;
    text-shadow:
      -1px -1px 0 #fff,
      1px -1px 0 #fff,
      -1px 1px 0 #fff,
      1px 1px 0 #fff,
      1px 1px 0 #000;
  }

  .diagnosis__body {
    width: min(100%, 250px);
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 10.5px;
    line-height: 1.22;
  }

  .diagnosis__image {
    max-height: 156px;
    border-radius: 10px;
    padding: 3px;
  }

  .diagnosis__card--with-media .diagnosis__image {
    max-height: 148px;
    border-radius: 10px;
  }

  .diagnosis__actions {
    width: min(82vw, 316px);
    gap: 6px;
    margin-top: 10px;
  }

  .btn--diagnosis-primary,
  .btn--diagnosis-secondary {
    width: 100%;
    font-size: 12px;
    padding: 8px 9px;
    border-radius: 10px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
  }
}

@media (max-width: 390px) {
  .diagnosis__card {
    width: min(78vw, 296px);
    padding: 9px 8px 14px;
  }

  .diagnosis__title {
    font-size: 15px;
    max-width: 214px;
  }

  .diagnosis__body {
    width: min(100%, 232px);
    font-size: 10px;
    line-height: 1.18;
  }

  .diagnosis__image {
    max-height: 146px;
  }

  .diagnosis__card--with-media .diagnosis__image {
    max-height: 140px;
  }

  .diagnosis__actions {
    width: min(78vw, 296px);
  }

  .btn--diagnosis-primary,
  .btn--diagnosis-secondary {
    font-size: 11px;
    padding: 7px 8px;
  }
}

.crumb {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.crumb__btn {
  border: 1px solid var(--border);
  background: var(--branco);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.crumb__btn:hover {
  background: var(--cinza);
  color: var(--text);
}

/* Performance tuning for long lists, diagrams and mobile navigation */
#modulesList > *,
.timeline-step,
.flow-node,
.admin-table tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dash-card,
  .module-card,
  .viewer-module-card,
  .timeline-step,
  .timeline-step__answer,
  .flow-node,
  .tab-btn,
  .crumb__btn,
  .btn {
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .dash-card:hover,
  .timeline-step:hover,
  .timeline-step__answer:hover {
    transform: none !important;
  }

  .login-card,
  .viewer-hero-panel,
  .viewer-mobile-nav,
  .viewer-mobile-nav-backdrop,
  .builder-modal__dialog,
  #screenAdminModulos .dash-card,
  #screenAdminDashboard .dash-stat-card,
  .editor-saving-overlay {
    backdrop-filter: none !important;
  }
}

.crumb__sep {
  color: var(--muted);
  opacity: 0.5;
  font-weight: bold;
}

/* Checklist para Checkpoints */
.checklist {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius2);
  background: var(--cinza);
}

.checkrow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
}

.checkrow .btn {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14px;
}

/* Elementos de Formulário Base */
.select {
  border-radius: var(--radius2);
  border: 2px solid var(--border);
  background: var(--branco);
  color: var(--text);
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  min-width: 240px;
}
