/* Central de Configurações + Editor de Aparência e Identidade (BY Suporte Fitness) */

/* Aplicação global coerente de escala de texto, densidade e arredondamento (escolhidos em Aparência) */
html[data-by-text-scale="compact"] { font-size: 15px; }
html[data-by-text-scale="large"] { font-size: 17px; }
html[data-by-density="compact"] .card,
html[data-by-density="compact"] .settings-card { padding: 14px; }
html[data-by-density="compact"] table td,
html[data-by-density="compact"] table th { padding-top: 7px; padding-bottom: 7px; }
html[data-by-radius="sharp"] .card,
html[data-by-radius="sharp"] .settings-card,
html[data-by-radius="sharp"] button,
html[data-by-radius="sharp"] input,
html[data-by-radius="sharp"] select,
html[data-by-radius="sharp"] textarea { border-radius: var(--by-radius-field, 0px); }
html[data-by-radius="rounded"] .card,
html[data-by-radius="rounded"] .settings-card { border-radius: var(--by-radius-card, 24px); }

/* Variáveis semânticas locais do Hub (modo claro por padrão, refinado para escuro em [data-by-theme="dark"]) */
.sh-hub-page,
.sh-section-shell {
  --sh-bg: #f8fafc;
  --sh-card: #ffffff;
  --sh-card-2: #f1f5f9;
  --sh-border: rgba(15, 23, 42, .12);
  --sh-text: #0f172a;
  --sh-muted: #475569;
  --sh-nav-accent: var(--by-primary, #0b1e3f);
  --sh-cta: var(--by-accent, #facc15);
  --sh-cta-fg: var(--by-accent-fg, #0f172a);
  color: var(--sh-text);
  display: grid;
  gap: 16px;
}

html[data-by-theme="dark"] .sh-hub-page,
html[data-by-theme="dark"] .sh-section-shell {
  --sh-bg: #070f1f;
  --sh-card: #0c172b;
  --sh-card-2: #111f38;
  --sh-border: rgba(148, 163, 184, .18);
  --sh-text: #f1f5f9;
  --sh-muted: #94a3b8;
}

/* ---------- Central de Configurações (Hub 3x3) ---------- */
.sh-hub-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.sh-crumb {
  margin: 0 0 4px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--sh-muted);
}
.sh-hub-top h1 {
  margin: 0 0 4px 0;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -.02em;
}
.sh-hub-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.sh-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
  color: var(--sh-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sh-btn-outline:hover { border-color: var(--sh-nav-accent); }

.sh-scope-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
}
.sh-scope-select-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sh-scope-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--sh-card-2);
  color: var(--sh-nav-accent);
}
.sh-scope-ico .ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.sh-scope-select-wrap select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
  color: var(--sh-text);
  font-weight: 600;
  font-size: 13px;
}

/* Busca de configurações */
.sh-search-wrap { position: relative; }
.sh-search-wrap.compact { flex: 1; max-width: 380px; }
.sh-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
}
.sh-search-box.compact { padding: 7px 12px; border-radius: 10px; }
.sh-search-box:focus-within { border-color: var(--sh-nav-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sh-nav-accent) 22%, transparent); }
.sh-search-box .ico { width: 17px; height: 17px; fill: none; stroke: var(--sh-muted); stroke-width: 2; flex-shrink: 0; }
.sh-search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--sh-text);
  font-size: 14px;
  outline: none;
}
.sh-kbd {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
  color: var(--sh-muted);
}

.sh-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--sh-card);
  border: 1px solid var(--sh-border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, .36);
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}
.sh-sr-group { display: grid; gap: 4px; }
.sh-sr-group small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--sh-muted); padding: 2px 8px; }
.sh-sr-item {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sh-text);
  cursor: pointer;
}
.sh-sr-item:hover { background: var(--sh-card-2); border-color: var(--sh-border); }
.sh-sr-item strong { font-size: 13px; }
.sh-sr-item span { font-size: 12px; color: var(--sh-muted); }

.sh-filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.sh-filter-pills button {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
  color: var(--sh-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sh-filter-pills button[aria-pressed="true"] {
  background: var(--sh-nav-accent) !important;
  border-color: var(--sh-nav-accent) !important;
  color: #ffffff !important;
}

.sh-hub-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.sh-hub-head-row h2 { margin: 0; font-size: 18px; }

.sh-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sh-cat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
  color: var(--sh-text);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.sh-cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--sh-nav-accent);
  box-shadow: 0 12px 26px rgba(2, 6, 23, .16);
}
.sh-cat-card.featured {
  border-color: color-mix(in srgb, var(--sh-nav-accent) 65%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--sh-nav-accent) 35%, transparent);
}
.sh-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  color: #ffffff;
}
.sh-cat-icon .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.sh-cat-icon.tone-blue { background: #1d4fb8; }
.sh-cat-icon.tone-gold { background: #b45309; }
.sh-cat-icon.tone-purple { background: #5b21b6; }
.sh-cat-icon.tone-teal { background: #0f766e; }
.sh-cat-icon.tone-indigo { background: #3730a3; }
.sh-cat-icon.tone-amber { background: #92400e; }
.sh-cat-icon.tone-cyan { background: #0e7490; }
.sh-cat-icon.tone-violet { background: #6d28d9; }

.sh-cat-body { display: grid; gap: 5px; flex: 1; min-width: 0; }
.sh-cat-title-row { display: flex; align-items: center; gap: 8px; }
.sh-cat-title-row strong { font-size: 15px; }
.sh-cat-arrow { margin-left: auto; color: var(--sh-muted); font-size: 15px; }
.sh-cat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sh-nav-accent);
  color: #ffffff;
}
.sh-cat-desc { font-size: 12.8px; line-height: 1.45; color: var(--sh-muted); }
.sh-cat-palettes { display: flex; gap: 6px; margin-top: 4px; }
.sh-pal-chip {
  display: inline-flex;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
}
.sh-pal-chip i { width: 12px; height: 10px; border-radius: 3px; display: inline-block; }

.sh-home-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
}
.sh-home-cta-left { display: flex; align-items: center; gap: 14px; }
.sh-eyebrow-blue { font-size: 11px; font-weight: 800; letter-spacing: .07em; color: var(--by-link, var(--sh-nav-accent)); }
.sh-home-cta-banner h3 { margin: 2px 0; font-size: 16px; }
.sh-home-cta-banner p { margin: 0; font-size: 13px; }

/* ---------- Workspace Interno (Sidebar Vertical + Conteúdo) ---------- */
.sh-top-utility {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sh-workspace {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: 100%;
}
.sh-main { min-width: 0; width: 100%; }
.sh-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 16px;
  align-content: start;
  width: 100%;
}
.sh-side-tabs {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 4px !important;
  padding: 8px;
  margin: 0 !important;
  border-radius: 14px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
}
.sh-side-tabs button[role="tab"] {
  justify-content: flex-start;
  text-align: left;
  width: 100%;
  height: auto;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sh-text);
  font-weight: 600;
  font-size: 13.5px;
}
.sh-side-tabs button[role="tab"][aria-selected="true"] {
  background: var(--sh-nav-accent) !important;
  color: #ffffff !important;
}
.sh-side-extras {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
}
.sh-side-link {
  text-align: left;
  height: auto;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--sh-muted);
  font-size: 12.8px;
  font-weight: 600;
  cursor: pointer;
}
.sh-side-link:hover { background: var(--sh-card-2); color: var(--sh-text); }
.sh-side-link.active { background: var(--sh-nav-accent) !important; color: #ffffff !important; }
.sh-tp-shell { display: grid; gap: 14px; }
.sh-tp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sh-tp-checks { display: grid; gap: 6px; margin-top: 10px; }
.sh-tp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
#settings-totalpass-form fieldset,
#settings-messaging-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sh-int-subnav { margin-bottom: 12px; }
.sh-divider { border: 0; border-top: 1px solid var(--sh-border); margin: 16px 0; }
#crm-send-dialog { width: min(560px, 94vw); padding: 22px; border-radius: 16px; background: var(--by-surface, #0c172b); color: var(--by-text, #f1f5f9); border: 1px solid rgba(148, 163, 184, .28); }
#crm-send-dialog form { display: grid; gap: 12px; }
#crm-send-dialog textarea { min-height: 120px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .34); background: #071122; color: #f8fafc; font: inherit; resize: vertical; }
html[data-by-theme="light"] #crm-send-dialog { background: #ffffff; color: #0f172a; }
html[data-by-theme="light"] #crm-send-dialog textarea { background: #f8fafc; color: #0f172a; border-color: rgba(15, 23, 42, .18); }
.sh-dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sh-section-shell .section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.sh-section-shell .section-heading > button { flex-shrink: 0; width: auto !important; min-width: max-content; white-space: nowrap; padding: 8px 14px !important; }
html[data-by-theme="dark"] .sh-section-shell :is(input:not([type="color"]):not([type="checkbox"]):not([type="radio"]), select, textarea),
html[data-by-theme="dark"] .sh-hub-page :is(input:not([type="color"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background: #071122 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, .34) !important;
}
html[data-by-theme="dark"] .sh-section-shell :is(input, textarea)::placeholder,
html[data-by-theme="dark"] .sh-hub-page :is(input, textarea)::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}
html[data-by-theme="dark"] .sh-section-shell select option,
html[data-by-theme="dark"] .sh-hub-page select option {
  background: #0c172b;
  color: #f8fafc;
}
html[data-by-theme="dark"] .sh-section-shell button:disabled {
  color: #cbd5e1 !important;
  background: rgba(148, 163, 184, .14) !important;
  border: 1px solid rgba(148, 163, 184, .26) !important;
  opacity: .72;
}

/* ---------- Editor de Aparência + Prévia ao Vivo ---------- */
.sh-appearance-shell { display: grid; gap: 14px; }
.sh-section-top { display: grid; gap: 10px; }
.sh-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.sh-title-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-title-inline h2 { margin: 0; font-size: 21px; }
.sh-scope-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
  color: var(--sh-text);
}
.sh-scope-pill.company {
  background: color-mix(in srgb, var(--sh-nav-accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--sh-nav-accent) 50%, transparent);
}
.sh-inherit-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, .16);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, .35);
}
.sh-scope-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.sh-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
  gap: 3px;
}
.sh-seg button {
  padding: 5px 11px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--sh-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.sh-seg button[aria-pressed="true"] {
  background: var(--sh-nav-accent) !important;
  color: #ffffff !important;
}
.sh-link-btn {
  border: 0;
  background: transparent;
  color: var(--by-link, var(--sh-nav-accent));
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 6px;
}
.sh-link-btn:disabled { opacity: .45; cursor: not-allowed; }

.sh-mobile-switch { display: none; }

.sh-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  gap: 18px;
  align-items: start;
  width: 100%;
}
.sh-editor-col,
.sh-appearance-form { display: grid; gap: 14px; min-width: 0; }

/* Ativos de marca */
.sh-logo-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.sh-logo-box {
  border-radius: 12px;
  border: 1px solid var(--sh-border);
  overflow: hidden;
  display: grid;
  min-width: 0;
}
.sh-logo-box .settings-logo-preview {
  min-width: 0 !important;
  width: 100%;
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 0 !important;
  border-radius: 0 !important;
}
.sh-logo-box .settings-logo-preview.mini { min-height: 58px; }
.sh-logo-box.dark-bg .settings-logo-preview { background: #070e1c !important; color: #cbd5e1 !important; }
.sh-logo-box.dark-bg .settings-logo-preview .muted { color: #cbd5e1 !important; }
.sh-logo-box.light-bg .settings-logo-preview { background: #ffffff !important; color: #334155 !important; }
.sh-logo-box.light-bg .settings-logo-preview .muted { color: #475569 !important; }
.sh-logo-box .settings-logo-preview img { max-height: 44px; max-width: 100%; object-fit: contain; }
.sh-logo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--sh-card-2);
  border-top: 1px solid var(--sh-border);
}
.sh-logo-foot small { font-weight: 600; font-size: 12px; color: var(--sh-muted); }
.sh-logo-btns { display: flex; gap: 6px; align-items: center; }
.sh-btn-sm {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
  color: var(--sh-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.sh-btn-sm.primary { background: var(--sh-nav-accent); border-color: var(--sh-nav-accent); color: #ffffff; }
.sh-btn-ghost-sm {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--sh-border);
  background: transparent;
  color: var(--sh-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sh-collapsible {
  margin-top: 10px;
  border-top: 1px solid var(--sh-border);
  padding-top: 10px;
}
.sh-collapsible summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--by-link, var(--sh-nav-accent));
  list-style: none;
}
.sh-collapsible summary::-webkit-details-marker { display: none; }

/* Miniaturas de temas */
.sh-preset-thumbs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px;
  margin-bottom: 14px;
}
.sh-thumb-card.theme-preset-btn {
  display: grid !important;
  grid-template-columns: 1fr;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 9px !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--sh-border) !important;
  background: var(--sh-card-2) !important;
  color: var(--sh-text) !important;
  text-align: left;
  cursor: pointer;
  min-height: 0;
}
.sh-thumb-card.theme-preset-btn.active {
  border-color: var(--sh-nav-accent) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--sh-nav-accent) 28%, transparent);
}
.sh-thumb-canvas {
  display: grid;
  grid-template-columns: 24% 1fr;
  width: 100%;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  background: #0f172a;
}
.sh-thumb-canvas[data-thumb-mode="light"] { background: #f1f5f9; }
.sh-th-side { display: block; height: 100%; }
.sh-th-main { display: grid; grid-template-rows: 13px 1fr; gap: 5px; padding: 0 0 6px 0; position: relative; }
.sh-th-top { display: block; height: 13px; border-bottom: 1px solid rgba(148, 163, 184, .2); }
.sh-th-bar { display: block; height: 10px; width: 65%; margin-left: 6px; border-radius: 4px; }
.sh-th-cta { display: block; height: 8px; width: 34%; margin-left: 6px; border-radius: 4px; }
.sh-thumb-meta { display: grid; gap: 1px; }
.sh-thumb-meta strong { font-size: 12.5px; }
.sh-thumb-meta small { font-size: 11px; color: var(--sh-muted); }

.sh-mode-and-colors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: start;
}
.sh-mode-seg { border: 0; padding: 0; margin: 0; }
.sh-mode-seg legend { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--sh-text); }
.sh-mode-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
}
.sh-mode-opt {
  position: relative;
  display: grid;
  place-items: center;
  padding: 7px 6px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sh-muted);
  cursor: pointer;
}
.sh-mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.sh-mode-opt.active { background: var(--sh-nav-accent); color: #ffffff; }

.sh-essential-colors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.sh-adv-grid { margin-top: 10px; }

.sh-contrast-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.sh-contrast-btn {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
  color: var(--sh-text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.sh-audit-box {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
  display: grid;
  gap: 8px;
}
.sh-audit-box.good { border-color: rgba(34, 197, 94, .45); }
.sh-audit-box.warn { border-color: rgba(245, 158, 11, .55); }
.sh-audit-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sh-audit-list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--sh-card);
}
.sh-audit-list li span { display: grid; gap: 2px; }
.sh-audit-list li small { color: var(--sh-muted); }
.sh-audit-list li.ok b { color: #22c55e; white-space: nowrap; }
.sh-audit-list li.fail b { color: #f59e0b; white-space: nowrap; }

.sh-live-hint { margin: 10px 0 0 0; font-size: 12px; }

/* Barra fixa de salvamento */
.sh-save-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card);
  box-shadow: 0 14px 34px rgba(2, 6, 23, .28);
}
.sh-save-bar.is-dirty {
  border-color: color-mix(in srgb, var(--sh-cta) 65%, transparent);
}
.sh-save-status { display: flex; align-items: center; gap: 10px; }
.sh-save-status strong { display: block; font-size: 13.5px; }
.sh-save-status small { display: block; font-size: 12px; color: var(--sh-muted); }
.sh-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.sh-dot.dirty { background: var(--sh-cta); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sh-cta) 25%, transparent); }
.sh-save-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
html .sh-btn-accent,
html[data-by-theme] #content button.sh-btn-accent {
  padding: 9px 16px;
  border-radius: 10px;
  border: 0 !important;
  background: var(--by-accent, #facc15) !important;
  color: var(--by-accent-fg, #0f172a) !important;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
}
.sh-btn-accent:hover { filter: brightness(.95); }

/* ---------- Prévia ao Vivo Isolada ---------- */
.sh-preview-col { position: sticky; top: 16px; min-width: 0; width: 100%; }
.sh-preview-card { display: grid; gap: 12px; }
.sh-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sh-preview-title { display: flex; align-items: center; gap: 8px; }
.sh-preview-title h3 { margin: 0; font-size: 15.5px; }
.sh-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sh-nav-accent); }
.sh-preview-page-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sh-muted);
  margin: 0;
}
.sh-preview-page-pick select {
  flex: 1;
  margin: 0;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
  color: var(--sh-text);
  font-size: 13px;
  font-weight: 600;
}

html .sh-preview-stage.settings-preview {
  --pv-top: #0b1220;
  --pv-top-fg: #ffffff;
  --pv-side: #070d18;
  --pv-side-fg: #e2e8f0;
  --pv-primary: #2563eb;
  --pv-accent: #facc15;
  --pv-accent-fg: #0f172a;
  --pv-success: #16a34a;
  --pv-warning: #d97706;
  --pv-danger: #dc2626;
  --pv-surface: #0f192d;
  --pv-bg: #070e1d;
  --pv-fg: #f1f5f9;
  --pv-muted: #94a3b8;
  --pv-border: rgba(148, 163, 184, .2);
  --pv-radius: 10px;
  --pv-font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --pv-scale: 1;
  margin-top: 0 !important;
  font-family: var(--pv-font);
  font-size: calc(11.5px * var(--pv-scale));
  background: var(--pv-bg) !important;
  color: var(--pv-fg) !important;
  border-radius: 14px;
  border: 1px solid var(--pv-border);
  overflow: hidden;
  transition: max-width .2s ease;
  margin-inline: auto;
  width: 100%;
}
html .sh-preview-stage.settings-preview[data-mode="light"] {
  --pv-surface: #ffffff;
  --pv-bg: #f1f5f9;
  --pv-fg: #0f172a;
  --pv-muted: #475569;
  --pv-border: rgba(15, 23, 42, .12);
}
html .sh-preview-stage.settings-preview[data-device="mobile"] { max-width: 320px; }
html .sh-preview-stage.settings-preview[data-radius="sharp"] { --pv-radius: 4px; }
html .sh-preview-stage.settings-preview[data-radius="soft"] { --pv-radius: 10px; }
html .sh-preview-stage.settings-preview[data-radius="rounded"] { --pv-radius: 16px; }
html .sh-preview-stage.settings-preview[data-density="compact"] .pv-main { padding: 8px; gap: 6px; }
html .sh-preview-stage.settings-preview[data-density="compact"] .pv-sol-card { padding: 6px; }

html .sh-preview-stage.settings-preview .pv-top {
  display: flex;
  align-items: center;
  gap: 8px;
  height: auto !important;
  min-height: 36px;
  padding: 7px 10px;
  background: var(--pv-top);
  color: var(--pv-top-fg);
  border-bottom: 1px solid var(--pv-border);
}
html .sh-preview-stage.settings-preview .pv-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  opacity: 1 !important;
  color: var(--pv-top-fg);
  font-size: 11px;
  white-space: nowrap;
}
html .sh-preview-stage.settings-preview .pv-logo i { width: 10px; height: 10px; border-radius: 3px; background: var(--pv-primary); display: inline-block; }
html .sh-preview-stage.settings-preview .pv-logo img { max-height: 18px; max-width: 96px; object-fit: contain; }
html .sh-preview-stage.settings-preview .pv-search {
  flex: 1;
  max-width: none !important;
  height: auto !important;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, .18) !important;
  color: var(--pv-top-fg);
  opacity: .85 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html .sh-preview-stage.settings-preview .pv-chip {
  width: auto !important;
  height: auto !important;
  opacity: 1 !important;
  font-size: 9.5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .28) !important;
  background: rgba(148, 163, 184, .18);
  color: var(--pv-top-fg);
  white-space: nowrap;
}
html .sh-preview-stage.settings-preview[data-device="mobile"] .pv-search { display: none; }

html .sh-preview-stage.settings-preview .pv-body {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 240px;
}
html .sh-preview-stage.settings-preview[data-device="mobile"] .pv-body { grid-template-columns: 1fr; }
html .sh-preview-stage.settings-preview .pv-side {
  width: auto !important;
  background: var(--pv-side);
  color: var(--pv-side-fg);
  padding: 9px 7px;
  display: grid;
  align-content: start;
  gap: 4px;
  border-right: 1px solid var(--pv-border);
}
html .sh-preview-stage.settings-preview[data-device="mobile"] .pv-side {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-right: 0;
  border-bottom: 1px solid var(--pv-border);
  padding: 6px;
}
html .sh-preview-stage.settings-preview .pv-side span {
  height: auto !important;
  background: transparent !important;
  color: var(--pv-side-fg);
  font-size: 10.5px;
  padding: 5px 7px;
  border-radius: 6px;
  opacity: .82;
  white-space: nowrap;
}
html .sh-preview-stage.settings-preview .pv-side span.on {
  background: var(--pv-primary) !important;
  color: #ffffff !important;
  opacity: 1;
  font-weight: 700;
}
html .sh-preview-stage.settings-preview .pv-main {
  flex: initial;
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 9px;
  background: var(--pv-bg);
  color: var(--pv-fg);
}
html .sh-preview-stage.settings-preview .pv-main strong { font-size: inherit; }
html .sh-preview-stage.settings-preview .pv-main p { margin: 0; color: inherit; }
.pv-home-head, .pv-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pv-home-head small, .pv-page-head small { display: block; font-size: 9.5px; color: var(--pv-muted); }
.pv-chip-blue {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--pv-primary);
  color: #ffffff;
  font-weight: 700;
}
.pv-home-pills, .pv-filter-bar { display: flex; gap: 4px; flex-wrap: wrap; }
.pv-pill {
  font-size: 9.5px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--pv-border);
  background: var(--pv-surface);
  color: var(--pv-fg);
}
.pv-pill.active { background: var(--pv-primary); border-color: var(--pv-primary); color: #ffffff; font-weight: 700; }

.pv-hero {
  background: linear-gradient(135deg, var(--pv-side) 0%, color-mix(in srgb, var(--pv-primary) 55%, var(--pv-side)) 100%);
  color: #f8fafc;
  border-radius: var(--pv-radius);
  padding: 11px;
  display: grid;
  gap: 4px;
}
.pv-hero-tag { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; opacity: .85; }
.pv-hero h4 { margin: 0; font-size: 13px; line-height: 1.2; }
.pv-hero p { margin: 0; font-size: 10px; opacity: .85; }
.pv-hero-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

.pv-cards-title { font-size: 11px; font-weight: 800; }
.pv-cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sh-preview-stage[data-device="mobile"] .pv-cards-grid { grid-template-columns: 1fr; }
.pv-sol-card {
  background: var(--pv-surface);
  border: 1px solid var(--pv-border);
  border-radius: var(--pv-radius);
  padding: 8px;
  display: grid;
  gap: 4px;
}
.pv-sol-card strong { font-size: 10.5px; }
.pv-sol-card small { font-size: 9px; color: var(--pv-muted); line-height: 1.3; }
.pv-sol-tag {
  justify-self: start;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--pv-primary);
  color: #ffffff;
}
.pv-sol-tag.gold { background: var(--pv-accent); color: var(--pv-accent-fg); }

.pv-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sh-preview-stage[data-device="mobile"] .pv-form-grid { grid-template-columns: 1fr; }
.pv-f { display: grid; gap: 3px; }
.pv-f label { font-size: 9px; color: var(--pv-muted); font-weight: 600; }
.pv-form-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }

.pv-table { display: grid; border: 1px solid var(--pv-border); border-radius: var(--pv-radius); overflow: hidden; background: var(--pv-surface); }
.pv-tr { display: grid; grid-template-columns: 1.2fr 1fr .9fr .6fr; gap: 4px; padding: 5px 7px; font-size: 9.5px; border-bottom: 1px solid var(--pv-border); align-items: center; }
.pv-tr:last-child { border-bottom: 0; }
.pv-th { font-weight: 800; color: var(--pv-muted); background: color-mix(in srgb, var(--pv-primary) 8%, var(--pv-surface)); }

/* Kit de componentes na base da prévia */
.pv-kit {
  padding: 10px 11px;
  border-top: 1px solid var(--pv-border);
  background: var(--pv-surface);
  display: grid;
  gap: 7px;
}
.pv-kit-title { font-size: 10.5px; font-weight: 800; color: var(--pv-muted); }
.pv-kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pv-cta-btn {
  display: inline-block;
  padding: 4px 9px;
  border-radius: calc(var(--pv-radius) * 0.7);
  background: var(--pv-accent);
  color: var(--pv-accent-fg);
  font-weight: 800;
  font-size: 10px;
}
.pv-pri-btn {
  display: inline-block;
  padding: 4px 9px;
  border-radius: calc(var(--pv-radius) * 0.7);
  background: var(--pv-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
}
.pv-sec-btn {
  display: inline-block;
  padding: 4px 9px;
  border-radius: calc(var(--pv-radius) * 0.7);
  border: 1px solid var(--pv-border);
  background: var(--pv-surface);
  color: var(--pv-fg);
  font-weight: 600;
  font-size: 10px;
}
.pv-link { color: var(--pv-primary); font-weight: 700; font-size: 10px; text-decoration: underline; }
.sh-preview-stage[data-mode="dark"] .pv-link { color: #93c5fd; }
.pv-input {
  padding: 4px 8px;
  border-radius: calc(var(--pv-radius) * 0.65);
  border: 1px solid var(--pv-border);
  background: var(--pv-bg);
  color: var(--pv-fg);
  font-size: 10px;
}
.pv-check { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; }
.pv-check i { width: 13px; height: 13px; border-radius: 3px; background: var(--pv-primary); color: #ffffff; display: inline-grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 800; }
.pv-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
}
.pv-badge.good { background: color-mix(in srgb, var(--pv-success) 20%, transparent); color: var(--pv-success); }
.pv-badge.warn { background: color-mix(in srgb, var(--pv-warning) 20%, transparent); color: var(--pv-warning); }
.pv-badge.danger { background: color-mix(in srgb, var(--pv-danger) 20%, transparent); color: var(--pv-danger); }
.pv-disabled { font-size: 9.5px; padding: 3px 7px; border-radius: 6px; border: 1px dashed var(--pv-border); color: var(--pv-muted); opacity: .6; }
.sh-preview-note { margin: 0; text-align: center; font-size: 11.5px; color: var(--sh-muted); }

/* ---------- Drawer de Histórico ---------- */
.sh-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, .62);
  display: flex;
  justify-content: flex-end;
}
.sh-history-drawer {
  width: min(520px, 100vw);
  height: 100%;
  background: var(--sh-card);
  color: var(--sh-text);
  border-left: 1px solid var(--sh-border);
  display: grid;
  grid-template-rows: auto 1fr;
}
.sh-history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sh-border);
}
.sh-history-head h3 { margin: 0 0 4px 0; }
.sh-history-head p { margin: 0; font-size: 12.5px; }
.sh-history-body { padding: 16px 20px; overflow-y: auto; }
.sh-history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sh-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--sh-border);
  background: var(--sh-card-2);
}
.sh-history-meta { display: grid; gap: 4px; }
.sh-history-meta strong { font-size: 13.5px; }
.sh-history-meta small { font-size: 12px; color: var(--sh-muted); }
.sh-history-fields { font-size: 11.5px; color: var(--sh-muted); }
.sh-history-right { display: grid; justify-items: end; gap: 8px; }
.sh-mini-swatches { display: inline-flex; gap: 4px; }
.sh-mini-swatches i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--sh-border); display: inline-block; }

/* ---------- Responsivo (Tablet & Celular) ---------- */
@media (max-width: 1160px) {
  .sh-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-workspace { grid-template-columns: 1fr; }
  .sh-sidebar { position: static; }
  .sh-side-tabs { display: flex !important; flex-wrap: wrap; }
  .sh-side-tabs button[role="tab"] { width: auto; }
  .sh-side-extras { display: flex; flex-wrap: wrap; }
  .sh-editor-grid { grid-template-columns: 1fr; }
  .sh-preview-col { position: static; }
}

@media (max-width: 720px) {
  .sh-cat-grid { grid-template-columns: 1fr; }
  .sh-logo-slots,
  .sh-preset-thumbs,
  .sh-mode-and-colors,
  .sh-essential-colors { grid-template-columns: 1fr; }
  .sh-mobile-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--sh-border);
    background: var(--sh-card-2);
  }
  .sh-mobile-switch button {
    padding: 8px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--sh-muted);
    font-weight: 700;
    font-size: 13px;
  }
  .sh-mobile-switch button[aria-pressed="true"] {
    background: var(--sh-nav-accent);
    color: #ffffff;
  }
  .sh-appearance-shell[data-mobile-pane="edit"] .sh-preview-col { display: none; }
  .sh-appearance-shell[data-mobile-pane="preview"] .sh-editor-col { display: none; }
}

/* ---------- Central e Meu Perfil: hierarquia local ----------
   premium-ds.css permanece por último. O escopo #content mantém estas regras
   na jornada de configurações, sem alterar a prévia isolada de aparência. */
#content .settings-workspace {
  --sh-bg: var(--by-bg);
  --sh-card: var(--by-surface);
  --sh-card-2: var(--by-surface-muted);
  --sh-border: var(--by-border);
  --sh-text: var(--by-text);
  --sh-muted: var(--by-text-muted);
  --sh-nav-accent: var(--by-primary);
  --sh-cta: var(--by-accent);
  --sh-cta-fg: var(--by-accent-fg, var(--ds-on-gold));
  --sh-heading: var(--by-primary);
  width: 100%;
  min-width: 0;
  gap: 24px;
  color: var(--sh-text);
  line-height: 1.5;
}
html[data-by-theme="dark"] #content .settings-workspace { --sh-heading: var(--by-text); }
#content .settings-workspace [hidden] { display: none !important; }
#content .settings-workspace :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--by-focus);
  outline-offset: 3px;
}
#content .settings-workspace :is(.sh-hub-top, .sh-top-utility, .sh-scope-banner, .sh-profile-hero) > * { min-width: 0; }
#content .settings-workspace :is(.sh-hub-top, .sh-profile-hero) h1 {
  margin: 0;
  color: var(--sh-heading);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
#content .settings-workspace .sh-hub-top { display: flex; align-items: center; gap: 16px 24px; }
#content .settings-workspace .sh-hub-top p.muted { max-width: 680px; margin: 8px 0 0; font-size: 14px; }
#content .settings-workspace .sh-crumb { margin-bottom: 8px; font-size: 12px; }
#content .settings-workspace .sh-btn-outline { min-height: 40px; justify-content: center; border-radius: var(--by-radius-button); }
#content .settings-workspace .sh-scope-banner {
  align-items: flex-start;
  padding: 14px 16px;
  gap: 8px 20px;
  background: var(--sh-card-2);
  border-radius: var(--by-radius-card);
  font-size: 13px;
}
#content .settings-workspace .sh-scope-select-wrap { flex: 1 1 280px; gap: 8px; }
#content .settings-workspace .sh-scope-select-wrap > div { display: grid; gap: 2px; min-width: 0; }
#content .settings-workspace .sh-scope-select-wrap strong { overflow-wrap: anywhere; }
#content .settings-workspace .sh-scope-select-wrap small { font-size: 12px; color: var(--sh-muted); font-weight: 400; letter-spacing: normal; overflow-wrap: anywhere; }
#content .settings-workspace .sh-scope-banner > .muted { flex: 1 1 260px; max-width: 540px; margin: 0; }
#content .settings-workspace .sh-scope-ico { flex: 0 0 28px; background: var(--sh-card); color: var(--by-link); }

/* Situação recebida do servidor, sem indicadores ilustrativos. */
#content .settings-workspace .sh-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#content .settings-workspace .sh-overview-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--sh-border);
  border-radius: var(--by-radius-card);
  background: var(--sh-card);
  box-shadow: var(--ds-shadow-card);
  text-align: left;
}
#content .settings-workspace .sh-overview-label { margin: 0; color: var(--sh-muted); font-size: 12px; font-weight: 600; }
#content .settings-workspace .sh-overview-value { margin: 0; color: var(--sh-heading); font-size: 18px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
#content .settings-workspace .sh-overview-detail { margin: 0; color: var(--sh-muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#content .settings-workspace .sh-overview-card > button { margin-top: auto; min-height: 36px; }
#content .settings-workspace .sh-link-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: var(--by-radius-button); background: var(--sh-card-2); color: var(--by-link); font-size: 12px; font-weight: 600; }
#content .settings-workspace .sh-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid var(--sh-border);
  border-radius: 999px;
  background: var(--sh-card-2);
  color: var(--sh-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#content .settings-workspace .sh-status[data-tone="good"] { color: var(--by-success-text); background: var(--by-success-bg); border-color: color-mix(in srgb, var(--by-success-text) 20%, var(--by-success-bg)); }
#content .settings-workspace .sh-status[data-tone="warning"] { color: var(--by-warning-text); background: var(--by-warning-bg); border-color: color-mix(in srgb, var(--by-warning-text) 20%, var(--by-warning-bg)); }

/* Busca e grupos mantêm a navegação visível mesmo sem resultados. */
#content .settings-workspace .sh-search-wrap { min-width: 0; }
#content .settings-workspace .sh-search-box { min-height: 50px; padding: 4px 12px 4px 16px; border-color: var(--by-control-border); border-radius: var(--by-radius-field); }
#content .settings-workspace .sh-search-box input {
  min-height: 40px;
  padding: 7px 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--sh-text) !important;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
}
#content .settings-workspace .sh-search-box input:focus-visible { outline: none; }
#content .settings-workspace .sh-search-box:focus-within { border-color: var(--by-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--by-focus) 16%, transparent); }
#content .settings-workspace .sh-search-box [data-settings-clear-search] { flex: none; min-height: 34px; padding: 6px 10px; font-size: 12px; }
#content .settings-workspace :is(.sh-search-meta, .sh-search-suggestions) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--sh-muted); font-size: 12px; }
#content .settings-workspace .sh-search-meta { justify-content: space-between; margin-top: 10px; }
#content .settings-workspace .sh-search-meta p { margin: 0; }
#content .settings-workspace .sh-search-suggestions button { min-height: 32px; padding: 4px 10px; border-radius: 999px; background: var(--sh-card); color: var(--by-link); border-color: var(--sh-border); font-size: 12px; }
#content .settings-workspace .sh-search-results { padding: 8px; border-radius: var(--by-radius-card); box-shadow: 0 10px 24px color-mix(in srgb, var(--by-text) 12%, transparent); max-height: min(440px, 65dvh); overscroll-behavior: contain; }
#content .settings-workspace .sh-sr-item { min-height: 44px; padding: 10px 12px; white-space: normal; overflow-wrap: anywhere; }
#content .settings-workspace .sh-filter-pills { gap: 8px; }
#content .settings-workspace .sh-filter-pills button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 14px; border-radius: var(--by-radius-button); font-weight: 600; }
#content .settings-workspace .sh-filter-pills button[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--by-accent); }
#content .settings-workspace .sh-filter-count { min-width: 20px; padding: 1px 5px; border-radius: 999px; background: var(--by-primary-soft); color: var(--by-link); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
#content .settings-workspace .sh-filter-pills [aria-pressed="true"] .sh-filter-count { background: var(--sh-cta); color: var(--sh-cta-fg); }
#content .settings-workspace .sh-hub-head-row { flex-wrap: wrap; gap: 6px 16px; }
#content .settings-workspace .sh-hub-head-row h2 { color: var(--sh-heading); font-weight: 750; }
#content .settings-workspace .sh-category-group { display: grid; gap: 14px; min-width: 0; }
#content .settings-workspace .sh-category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }
#content .settings-workspace .sh-category-heading :is(h2, h3) { margin: 0; color: var(--sh-heading); font-size: 17px; line-height: 1.4; font-weight: 750; }
#content .settings-workspace .sh-category-heading p { margin: 4px 0 0; color: var(--sh-muted); font-size: 13px; }
#content .settings-workspace .sh-category-heading > :is(span, small) { color: var(--sh-muted); font-size: 12px; font-weight: 500; letter-spacing: normal; text-transform: none; }
#content .settings-workspace .sh-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
#content .settings-workspace .sh-cat-card {
  position: relative;
  min-width: 0;
  width: 100%;
  height: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border-radius: var(--by-radius-card);
  color: var(--sh-text);
  font: inherit;
  white-space: normal;
  box-shadow: var(--ds-shadow-card);
  transition: border-color var(--by-motion-fast), box-shadow var(--by-motion-fast);
}
#content .settings-workspace .sh-cat-card:hover { transform: none; border-color: var(--by-focus); box-shadow: 0 3px 10px color-mix(in srgb, var(--by-text) 7%, transparent); }
#content .settings-workspace .sh-cat-card.featured { border-color: var(--sh-border); box-shadow: var(--ds-shadow-card); }
#content .settings-workspace .sh-cat-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--by-primary-soft); color: var(--by-link); }
#content .settings-workspace .sh-cat-icon .ico { width: 19px; height: 19px; }
#content .settings-workspace .sh-cat-body { gap: 7px; }
#content .settings-workspace .sh-cat-title-row { align-items: flex-start; flex-wrap: wrap; gap: 6px; }
#content .settings-workspace .sh-cat-title-row strong { flex: 1 1 130px; color: var(--sh-heading); font-size: 14px; line-height: 1.45; font-weight: 700; overflow-wrap: anywhere; }
#content .settings-workspace .sh-cat-arrow { flex: none; margin-left: auto; color: var(--sh-muted); }
#content .settings-workspace .sh-cat-desc { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
#content .settings-workspace .sh-cat-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; color: var(--sh-muted); font-size: 11px; font-weight: 600; letter-spacing: normal; text-transform: none; }
#content .settings-workspace .sh-cat-badge { color: var(--by-link); background: var(--by-primary-soft); font-size: 10px; }
#content .settings-workspace .sh-home-cta-banner { padding: 18px 20px; border-radius: var(--by-radius-card); background: var(--sh-card-2); }
#content .settings-workspace .sh-home-cta-left { min-width: 0; flex: 1 1 360px; }
#content .settings-workspace .sh-home-cta-left > div { min-width: 0; }
#content .settings-workspace .sh-home-cta-banner h3 { color: var(--sh-heading); }

/* Navegação interna, sem um segundo conjunto de cartões aninhados. */
#content .settings-workspace .sh-workspace { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
#content .settings-workspace .sh-sidebar { top: calc(var(--nx-topbar-h, 64px) + 16px); gap: 12px; }
#content .settings-workspace :is(.sh-side-tabs, .sh-side-extras) { border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none; }
#content .settings-workspace .sh-side-tabs { gap: 4px !important; }
#content .settings-workspace .sh-side-tabs button[role="tab"] { min-height: 42px; padding: 10px 12px; border-radius: var(--by-radius-button); font-size: 13px; }
#content .settings-workspace .sh-side-tabs button[role="tab"][aria-selected="true"] { background: var(--by-primary) !important; color: var(--by-on-primary) !important; }
#content .settings-workspace .sh-side-extras { padding-top: 12px; border-top: 1px solid var(--sh-border); }
#content .settings-workspace .sh-side-label { width: 100%; margin: 12px 0 6px; padding: 0 12px; color: var(--sh-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
#content .settings-workspace .sh-side-link { min-height: 40px; padding: 9px 12px; border-radius: var(--by-radius-button); font-size: 12px; overflow-wrap: anywhere; }
#content .settings-workspace .sh-side-link.active { box-shadow: inset 3px 0 0 var(--by-accent); }
#content .settings-workspace .sh-main > [role="tabpanel"] { outline-offset: 6px; }

/* Identidade pessoal, segurança e preferências do navegador. */
#content .settings-workspace .sh-profile-hero {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--sh-border);
  border-radius: var(--by-radius-card);
  background: var(--sh-card);
}
#content .settings-workspace .sh-profile-avatar { display: grid; place-items: center; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background: var(--by-primary-soft); color: var(--by-link); font-size: 22px; font-weight: 750; letter-spacing: -.025em; }
#content .settings-workspace .sh-profile-identity { flex: 1 1 220px; min-width: 0; }
#content .settings-workspace .sh-profile-identity :is(h1, h2) { margin: 0; color: var(--sh-heading); font-size: 24px; line-height: 1.3; font-weight: 800; overflow-wrap: anywhere; }
#content .settings-workspace .sh-profile-identity p { margin: 6px 0 0; color: var(--sh-muted); font-size: 13px; overflow-wrap: anywhere; }
#content .settings-workspace .sh-profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: var(--sh-muted); }
#content .settings-workspace .sh-profile-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); align-items: start; gap: 20px; }
#content .settings-workspace :is(.sh-profile-main, .sh-profile-aside) { display: grid; align-content: start; gap: 20px; min-width: 0; }
#content .settings-workspace aside.sh-profile-aside { position: static; inset: auto; width: 100%; height: auto; min-height: 0; margin: 0; padding: 0; overflow: visible; border: 0; background: transparent; color: var(--sh-text); box-shadow: none; }
#content .settings-workspace :is(.sh-profile-card, .sh-profile-grid .card) { min-width: 0; max-width: none; margin: 0; padding: 20px; border: 1px solid var(--sh-border); border-radius: var(--by-radius-card); background: var(--sh-card); box-shadow: var(--ds-shadow-card); }
#content .settings-workspace .sh-security-section { display: grid; gap: 20px; min-width: 0; }
#content .settings-workspace :is(.sh-profile-card, .sh-security-section) { scroll-margin-top: calc(var(--nx-topbar-h, 64px) + 20px); }
#content .settings-workspace :is(.sh-profile-card, .sh-security-section):focus { outline: 2px solid var(--by-focus); outline-offset: 4px; }
#content .settings-workspace :is(.sh-profile-heading, .sh-profile-grid .section-heading) { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }
#content .settings-workspace :is(.sh-profile-grid, .sh-profile-card) :is(h2, h3) { margin: 0; font-size: 16px; line-height: 1.45; color: var(--sh-heading); font-weight: 750; }
#content .settings-workspace :is(.sh-profile-heading, .sh-profile-grid .section-heading) p { margin: 5px 0 0; font-size: 13px; line-height: 1.55; }
#content .settings-workspace .sh-profile-grid p { overflow-wrap: anywhere; }
#content .settings-workspace .sh-profile-grid .settings-dl { display: grid; grid-template-columns: minmax(80px, 110px) minmax(0, 1fr); gap: 0 16px; margin: 0; background: transparent !important; font-size: 13px; }
#content .settings-workspace .sh-profile-grid .settings-dl :is(dt, dd) { min-width: 0; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--sh-border); overflow-wrap: anywhere; }
#content .settings-workspace .sh-profile-grid .settings-dl :is(dt, dd):nth-last-child(-n+2) { border-bottom: 0; }
#content .settings-workspace .sh-profile-grid .settings-dl dt { font-weight: 500; color: var(--sh-muted); }
#content .settings-workspace .sh-profile-grid .settings-dl dd { font-weight: 600; }
#content .settings-workspace .sh-personal-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; }
#content .settings-workspace .sh-personal-modes button { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-content: start; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 12px; border: 1px solid var(--by-control-border); border-radius: var(--by-radius-button); background: var(--sh-card); color: var(--sh-text); font-size: 13px; font-weight: 600; white-space: normal; text-align: left; }
#content .settings-workspace .sh-personal-modes button .ico { width: 20px; height: 20px; }
#content .settings-workspace .sh-personal-modes button strong { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
#content .settings-workspace .sh-personal-modes button > span { grid-column: 1 / -1; font-size: 12px; line-height: 1.5; font-weight: 400; color: var(--sh-muted); overflow-wrap: anywhere; }
#content .settings-workspace .sh-personal-modes button[aria-pressed="true"] { border-color: var(--by-focus); box-shadow: inset 0 0 0 1px var(--by-focus); }
#content .settings-workspace #settings-panel-conta .sh-personal-modes button[aria-pressed="true"] { background: var(--by-primary-soft) !important; color: var(--by-link) !important; border-color: var(--by-focus) !important; }
#content .settings-workspace .account-password-fields { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
#content .settings-workspace .sh-password-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
#content .settings-workspace .sh-password-tools > p { flex: 1 1 200px; margin: 0; font-size: 12px; }
#content .settings-workspace .sh-password-tools button { min-height: 40px; padding: 8px 10px; font-size: 12px; }
#content .settings-workspace .sh-profile-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
#content .settings-workspace #settings-profile-form :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--by-control-border) !important;
  border-radius: var(--by-radius-field);
  background: var(--sh-card) !important;
  color: var(--sh-text) !important;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
}
#content .settings-workspace .sh-profile-grid input[aria-invalid="true"] { border-color: var(--by-danger-text) !important; }
#content .settings-workspace .sh-profile-grid :is(input, select, textarea):focus,
#content .settings-workspace #settings-profile-form :is(input, select, textarea):focus { border-color: var(--by-focus) !important; }
#content .settings-workspace .sh-profile-grid :is(#account-password-error, #account-password-progress):empty { display: none; }
#content .settings-workspace .sh-profile-grid .settings-actions { margin-top: 18px; padding-top: 16px; }
#content .settings-workspace .sh-profile-grid .mfa-card { font-size: 13px; }
#content .settings-workspace .sh-profile-grid .mfa-form { grid-template-columns: minmax(0, 1fr); gap: 12px; }
#content .settings-workspace .sh-profile-grid .mfa-form label { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
#content .settings-workspace .sh-profile-grid .mfa-form > button { justify-self: start; min-height: 40px; white-space: normal; }
#content .settings-workspace .sh-profile-grid .mfa-action { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--sh-border); }
#content .settings-workspace .sh-profile-grid .mfa-action summary { min-height: 32px; color: var(--by-link); font-weight: 600; cursor: pointer; }
#content .settings-workspace .sh-profile-grid .mfa-secret { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
#content .settings-workspace .sh-profile-grid .mfa-qr-wrap { width: fit-content; max-width: 100%; }
#content .settings-workspace .sh-profile-grid .mfa-qr-wrap svg { display: block; max-width: 100%; height: auto; }
#content .settings-workspace .sh-profile-grid .mfa-codes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
#content .settings-workspace .sh-profile-grid .mfa-codes li { color: var(--sh-text); background: var(--sh-card); font-size: 14px; overflow-wrap: anywhere; }
#content .settings-workspace .sh-profile-aside .sh-status { margin-top: 12px; }
#content .settings-workspace .sh-profile-aside details { padding: 12px 0; border-bottom: 1px solid var(--sh-border); }
#content .settings-workspace .sh-profile-aside summary { min-height: 32px; color: var(--by-link); font-size: 13px; font-weight: 600; cursor: pointer; }
#content .settings-workspace .sh-profile-aside details p { margin-bottom: 0; font-size: 12px; }
#content .settings-workspace .sh-quick-links { display: grid; gap: 6px; margin-top: 12px; }
#content .settings-workspace .sh-quick-links button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--sh-border); border-radius: var(--by-radius-button); background: var(--sh-card); color: var(--by-link); font-size: 13px; text-align: left; white-space: normal; }
#content .settings-workspace .sh-quick-links button:hover { border-color: var(--by-focus); }
#content .settings-workspace .sh-profile-hero .sh-quick-links { margin-top: 0; }

/* Cadastro da unidade: seções de formulário e uma ação de salvamento. */
#content .settings-workspace #settings-profile-form { margin: 0; padding: 24px; }
#content .settings-workspace #settings-profile-form > .section-heading { margin-bottom: 24px; }
#content .settings-workspace #settings-profile-form > .section-heading h2 { font-size: 20px; }
#content .settings-workspace #settings-profile-form > .section-heading p { max-width: 760px; margin: 6px 0 0; font-size: 13px; }
#content .settings-workspace .sh-form-section { min-width: 0; margin: 0; padding: 24px 0; border: 0; border-top: 1px solid var(--sh-border); border-radius: 0; background: transparent; }
#content .settings-workspace .sh-form-section > legend { margin: 0; padding: 0 8px 0 0; color: var(--sh-heading); font-size: 15px; font-weight: 700; }
#content .settings-workspace .sh-section-label { margin: 0 0 6px; padding: 0; color: var(--sh-heading); font-size: 14px; font-weight: 750; }
#content .settings-workspace .sh-profile-grid .sh-section-label,
#content .settings-workspace .sh-profile-identity .sh-section-label,
#content .settings-workspace #settings-profile-form > .section-heading .sh-section-label { margin: 0 0 6px; color: var(--sh-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
#content .settings-workspace .sh-form-section > p { margin: 4px 0 16px; color: var(--sh-muted); font-size: 13px; }
#content .settings-workspace #settings-profile-form .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-top: 16px; }
#content .settings-workspace #settings-profile-form :is(.settings-wide, .settings-field.wide) { grid-column: 1 / -1; }
#content .settings-workspace #settings-profile-form .check { align-items: flex-start; line-height: 1.6; font-size: 13px; }
#content .settings-workspace #settings-profile-form textarea { min-height: 100px; resize: vertical; }
#content .settings-workspace .sh-profile-savebar { position: sticky; bottom: 12px; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 0; padding: 14px 16px; border: 1px solid var(--sh-border); border-radius: var(--by-radius-card); background: var(--sh-card); box-shadow: 0 3px 14px color-mix(in srgb, var(--by-text) 8%, transparent); }
#content .settings-workspace .sh-profile-savebar > :is(p, span) { margin: 0; color: var(--sh-muted); font-size: 12px; }
#content .settings-workspace .sh-profile-savebar .settings-actions { margin: 0; padding: 0; border: 0; gap: 8px; }
#content .settings-workspace :is(.sh-profile-savebar, .account-password-card) button[type="submit"] { min-height: 44px; background: var(--sh-cta) !important; border-color: var(--sh-cta) !important; color: var(--sh-cta-fg) !important; font-weight: 700; }
#content .settings-workspace :is(.sh-profile-savebar, .account-password-card) button[type="submit"]:disabled { opacity: .6; cursor: wait; }

@media (max-width: 1240px) {
  #content .settings-workspace .sh-profile-grid { grid-template-columns: minmax(0, 1fr); }
  #content .settings-workspace .sh-profile-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content .settings-workspace .sh-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1160px) {
  #content .settings-workspace .sh-workspace { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  #content .settings-workspace .sh-sidebar { position: static; }
  #content .settings-workspace .sh-side-label { flex-basis: 100%; margin-top: 4px; padding-left: 0; }
  #content .settings-workspace .sh-side-extras { padding-top: 10px; }
}
@media (max-width: 760px) {
  #content .settings-workspace { gap: 20px; }
  #content .settings-workspace :is(.sh-overview-grid, .sh-cat-grid, .sh-profile-aside) { grid-template-columns: minmax(0, 1fr); }
  #content .settings-workspace .sh-overview-card { padding: 16px; gap: 6px; }
  #content .settings-workspace .sh-hub-top h1 { font-size: 24px; }
  #content .settings-workspace .sh-cat-card { padding: 16px; }
  #content .settings-workspace .sh-cat-title-row strong { font-size: 15px; }
  #content .settings-workspace .sh-cat-meta { font-size: 12px; }
  #content .settings-workspace .sh-category-heading { gap: 4px 12px; }
  #content .settings-workspace .sh-profile-hero { padding: 20px 16px; gap: 14px; }
  #content .settings-workspace .sh-profile-avatar { width: 52px; height: 52px; flex-basis: 52px; font-size: 19px; }
  #content .settings-workspace .sh-profile-identity { flex-basis: 180px; }
  #content .settings-workspace .sh-profile-identity :is(h1, h2) { font-size: 22px; }
  #content .settings-workspace :is(.sh-profile-card, .sh-profile-grid .card) { padding: 18px 16px; }
  #content .settings-workspace .sh-profile-grid { gap: 16px; }
  #content .settings-workspace :is(.sh-profile-main, .sh-profile-aside) { gap: 16px; }
  #content .settings-workspace .sh-security-section { gap: 16px; }
  #content .settings-workspace #settings-profile-form { padding: 20px 16px; }
  #content .settings-workspace #settings-profile-form .settings-grid { grid-template-columns: minmax(0, 1fr); }
  #content .settings-workspace .sh-top-utility { align-items: stretch; }
  #content .settings-workspace .sh-search-wrap.compact { max-width: none; flex-basis: 100%; }
  #content .settings-workspace .sh-kbd { display: none; }
  #content .settings-workspace .sh-search-box input { font-size: 16px; }
  #content .settings-workspace .sh-search-box [data-settings-clear-search] { min-height: 44px; }
  #content .settings-workspace :is(.sh-hub-actions, .sh-filter-pills) { width: 100%; }
  #content .settings-workspace .sh-hub-actions > button { flex: 1 1 140px; }
  #content .settings-workspace .sh-filter-pills button { flex: 1 1 auto; }
  #content .settings-workspace :is(.sh-hub-actions, .sh-top-utility, .sh-filter-pills, .sh-search-suggestions, .sh-side-tabs, .sh-side-extras, .sh-overview-card, .sh-home-cta-banner) button { min-height: 44px; }
  #content .settings-workspace .sh-profile-grid .mfa-action summary { display: list-item; min-height: 44px; padding: 10px 0; }
  #content .settings-workspace .sh-profile-aside summary { min-height: 44px; padding: 10px 0; }
  #content .settings-workspace .sh-profile-grid button { min-height: 44px; }
  #content .settings-workspace .sh-profile-grid :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
  #content .settings-workspace #settings-profile-form :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) { font-size: 16px; }
  #content .settings-workspace .sh-profile-hero .sh-quick-links { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content .settings-workspace .sh-profile-grid .mfa-form > button,
  #content .settings-workspace .sh-profile-grid .settings-actions > button { width: 100%; min-height: 44px; justify-content: center; }
  #content .settings-workspace .sh-home-cta-banner { padding: 16px; }
  #content .settings-workspace .sh-home-cta-left { flex-basis: 100%; align-items: flex-start; }
  #content .settings-workspace .sh-home-cta-banner > button { width: 100%; }
  #content .settings-workspace .sh-profile-savebar { position: static; margin-top: 4px; padding: 14px; }
  #content .settings-workspace .sh-profile-savebar > button { width: 100%; }
  #content .settings-workspace .sh-profile-savebar .settings-actions { width: 100%; }
  #content .settings-workspace .sh-profile-savebar .settings-actions > button { width: 100%; min-height: 44px; }
  #content .settings-workspace .sh-form-section { padding: 20px 0; }
}
@media (prefers-reduced-motion: reduce) {
  #content .settings-workspace .sh-cat-card { transition: none; }
}
