@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --sn-bg: #e9eef3;
  --sn-surface: #ffffff;
  --sn-ink: #12202d;
  --sn-muted: #5c6f82;
  --sn-line: #d5dee8;
  --sn-line-soft: #e8eef4;
  --sn-brand: #0b6e4f;
  --sn-brand-dark: #08553c;
  --sn-brand-soft: #e6f4ee;
  --sn-sidebar: #0c1f2e;
  --sn-sidebar-2: #143347;
  --sn-danger: #b42318;
  --sn-ok: #067647;
  --sn-radius: 16px;
  --sn-radius-sm: 10px;
  --sn-shadow: 0 1px 2px rgba(18, 32, 45, 0.04), 0 12px 32px rgba(18, 32, 45, 0.06);
  --sn-shadow-hover: 0 4px 16px rgba(18, 32, 45, 0.08);
  --font: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --nav-gap: 0.25rem;
  --stack-gap: 2rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--sn-ink);
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(11, 110, 79, 0.09), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(8, 61, 119, 0.07), transparent 50%),
    linear-gradient(165deg, #f3f6f9 0%, #eef2f6 40%, #e7f0eb 100%);
  background-attachment: fixed;
}

a { color: var(--sn-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(11, 110, 79, 0.18) 0%, transparent 28%),
    linear-gradient(165deg, var(--sn-sidebar) 0%, var(--sn-sidebar-2) 100%);
  color: #f0f4f8;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar-top {
  flex: 0 0 auto;
  padding: 1.35rem 1rem 0.85rem;
  z-index: 2;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* Sem fade no topo — cortava “Visão geral” / primeiros itens */
  padding: 0.35rem 0.55rem 1rem 1rem;
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 18px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 18px),
    transparent 100%
  );
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 178, 198, 0.42) transparent;
}
.sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  margin: 0.5rem 0;
  background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(158, 188, 208, 0.32), rgba(110, 150, 175, 0.55));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 42px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(190, 215, 230, 0.55), rgba(140, 185, 210, 0.78));
  border: 2px solid transparent;
  background-clip: padding-box;
}
.sidebar-scroll:hover {
  scrollbar-color: rgba(180, 205, 220, 0.7) rgba(255, 255, 255, 0.05);
}

.sidebar-foot {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.85rem 1.1rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(0deg, rgba(8, 18, 28, 0.9), rgba(12, 31, 46, 0.4));
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.2);
}

.sidebar .brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.15rem 0.35rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
}
.sidebar .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #12a070, #0b6e4f);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(11, 110, 79, 0.35);
  overflow: hidden;
  flex: 0 0 auto;
}
.sidebar .brand-mark.has-logo {
  background: #fff;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.sidebar .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 7px;
}
.sidebar .brand-text {
  line-height: 1.15;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .brand:hover { text-decoration: none; color: #fff; }

.panel-brand-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.panel-brand-preview-side,
.panel-brand-preview-login {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.pbp-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: linear-gradient(165deg, #0c1f2e, #143347);
  color: #fff;
  min-height: 64px;
}
.pbp-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #12a070, #0b6e4f);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex: 0 0 auto;
  overflow: hidden;
}
.pbp-mark.has-logo { background: #fff; padding: 3px; }
.pbp-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; }
.pbp-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.pbp-login-card {
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--sn-line);
  background: #fff;
  min-height: 64px;
}
.pbp-login-mark { margin-bottom: 0.35rem; }
.pbp-login-mark.has-logo img {
  max-height: 42px;
  max-width: 180px;
  object-fit: contain;
  display: block;
}
.pbp-login-mark strong,
.pbp-login-card .brand-mark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sn-brand);
}
.pbp-login-title {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--sn-ink);
  margin-bottom: 0.35rem;
}
.pbp-login-fake {
  font-size: 0.78rem;
  color: var(--sn-muted);
}
.pbp-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sn-muted);
}
.guest-brand {
  margin-bottom: 0.75rem;
}
.guest-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(145deg, #12a070, #0b6e4f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 0.65rem;
  box-shadow: 0 8px 20px rgba(11, 110, 79, 0.28);
}
.guest-brand-logo {
  max-height: 56px;
  max-width: 220px;
  object-fit: contain;
  display: block;
  margin-bottom: 0.35rem;
}
@media (max-width: 720px) {
  .panel-brand-preview { grid-template-columns: 1fr; }
}

.sidebar-site {
  margin: 0 0.15rem 0.25rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-site label {
  color: #9fb3c8;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}
.sidebar-site select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 0;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: var(--sn-ink);
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: var(--nav-gap);
  padding: 0 0.15rem 0.35rem 0;
}
.sidebar .nav-section {
  margin: 0.85rem 0.5rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7b93a8;
}
.sidebar .nav-section:first-child {
  margin-top: 0.25rem;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #c5d4e3;
  padding: 0.62rem 0.8rem;
  border-radius: 11px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.sidebar nav a .nav-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: 0.85;
  display: grid;
  place-items: center;
}
.sidebar nav a .nav-ico svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
}
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(11, 110, 79, 0.45), rgba(11, 110, 79, 0.18));
  color: #fff;
  box-shadow: inset 3px 0 0 #1ec98a;
}
.sidebar nav a.active .nav-ico { opacity: 1; }

.sidebar .nav-logout {
  margin: 0.35rem 0 0;
  padding: 0;
}
.sidebar .nav-logout .nav-link,
.sidebar nav button.nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  color: #c5d4e3;
  padding: 0.62rem 0.8rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-decoration: none;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar .nav-logout .nav-link:hover,
.sidebar nav button.nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.sidebar .nav-logout .nav-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  opacity: 0.85;
  display: grid;
  place-items: center;
}
.sidebar .nav-logout .nav-ico svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar .meta {
  font-size: 0.82rem;
  color: #9fb3c8;
  line-height: 1.45;
  padding: 0.15rem 0.15rem 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.sidebar .meta span { color: #bcccdc; }
.main {
  padding: 1.75rem 2.25rem 3.5rem;
  max-width: 1280px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.75rem;
  gap: 1rem;
}
.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.topbar-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--sn-line);
  background: #fff;
  color: var(--sn-ink);
  text-decoration: none;
  flex: 0 0 auto;
}
.topbar-bell:hover {
  border-color: #b7d8c8;
  background: var(--sn-brand-soft);
  color: var(--sn-brand-dark);
  text-decoration: none;
}
.topbar-bell .nav-ico {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}
.topbar-bell .nav-ico svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar-bell-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--sn-danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  border: 2px solid #fff;
}
.topbar-bell.has-unread {
  border-color: #f9c9c5;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}
.notif-list { display: grid; gap: 0.75rem; }
.notif-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--sn-line-soft);
  border-radius: var(--sn-radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--sn-shadow);
}
.notif-item.is-unread {
  border-color: #b7d8c8;
  box-shadow: inset 3px 0 0 var(--sn-brand), var(--sn-shadow);
}
.notif-item.sev-error.is-unread {
  border-color: #fecdca;
  box-shadow: inset 3px 0 0 var(--sn-danger), var(--sn-shadow);
}
.notif-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--sn-muted);
  margin-bottom: 0.35rem;
}
.notif-time { margin-left: auto; }
.notif-title {
  margin: 0;
  font-size: 1.02rem;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.notif-body {
  margin: 0.4rem 0 0;
  color: #486581;
  font-size: 0.92rem;
  line-height: 1.45;
}
.notif-actions {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
}

.card {
  background: var(--sn-surface);
  border: 1px solid var(--sn-line-soft);
  border-radius: var(--sn-radius);
  box-shadow: var(--sn-shadow);
  padding: 1.5rem 1.6rem;
  margin-bottom: var(--stack-gap);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  box-shadow: var(--sn-shadow-hover);
  border-color: var(--sn-line);
}
.card > strong:first-child,
.card .card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: var(--stack-gap);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: var(--stack-gap);
}
.grid-2 > .card,
.grid-3 > .card,
.grid-4 > .card {
  margin-bottom: 0;
}

.stat {
  background: var(--sn-surface);
  border: 1px solid var(--sn-line-soft);
  border-radius: var(--sn-radius);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--sn-shadow);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 110, 79, 0.12), transparent 70%);
  pointer-events: none;
}
.stat .label {
  color: var(--sn-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat .value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.4rem;
  letter-spacing: -0.03em;
}
.stat-hint {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--sn-muted);
}
.stat-warn {
  border-color: #fecdca;
}
.stat-warn .value { color: var(--sn-danger); }

.muted { color: var(--sn-muted); margin: 0; }

.dash-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.dash-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sn-brand);
}
.dash-welcome {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  letter-spacing: -0.02em;
}
.dash-sub {
  margin: 0.4rem 0 0;
  color: var(--sn-muted);
  font-size: 0.95rem;
}
.dash-sub .mono { margin-left: 0.35rem; color: #829ab1; }
.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}
.dash-split { margin-bottom: var(--stack-gap); align-items: start; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: var(--stack-gap);
}
.stat-card {
  background: var(--sn-surface);
  border: 1px solid var(--sn-line-soft);
  border-radius: var(--sn-radius);
  padding: 1.1rem 1.2rem 1rem;
  box-shadow: var(--sn-shadow);
  min-width: 0;
}
.stat-card.is-warn {
  border-color: #fecdca;
  background: linear-gradient(180deg, #fff 0%, #fef6f5 100%);
}
.stat-card.is-warn .value { color: var(--sn-danger); }
.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.stat-card .label {
  color: var(--sn-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-card .value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin-top: 0.25rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-card .stat-hint {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--sn-muted);
}
.stat-meter,
.stat-stack {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #eef2f6;
  margin-top: 0.75rem;
}
.stat-meter > span,
.stat-stack > span {
  display: block;
  height: 100%;
  background: var(--sn-brand);
}
.spark { display: block; flex: 0 0 auto; opacity: 0.95; }
.stat-ring { display: block; flex: 0 0 auto; }

.dash-charts {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin-bottom: var(--stack-gap);
  align-items: stretch;
}
.dash-charts > .card { margin-bottom: 0; }
.chart-card { min-height: 220px; }

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.45rem;
  align-items: end;
  height: 160px;
}
.bar-chart-sm { height: 72px; }
.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}
.bar-val {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--sn-muted);
  margin-bottom: 0.25rem;
  min-height: 0.9rem;
}
.bar-track {
  width: 100%;
  max-width: 36px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: #eef2f6;
  border-radius: 8px 8px 4px 4px;
  overflow: hidden;
  min-height: 0;
}
.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #18a87a, #0b6e4f);
  border-radius: 8px 8px 0 0;
  min-height: 0;
  transition: height 0.25s ease;
}
.bar-fill-danger {
  background: linear-gradient(180deg, #f97066, #b42318);
}
.bar-label {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--sn-muted);
  font-weight: 600;
}

.pipe-legend { display: grid; gap: 0.65rem; }
.pipe-row {
  display: grid;
  grid-template-columns: 10px 5.5rem 1fr 2rem;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.85rem;
}
.pipe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pipe-name { color: var(--sn-ink); font-weight: 600; }
.pipe-bar {
  height: 8px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}
.pipe-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.pipe-n {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.health-item {
  border: 1px solid var(--sn-line-soft);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  background: #f8fafb;
}
.health-item.is-ok { border-color: #abefc6; background: #f6fef9; }
.health-item.is-warn { border-color: #f9dbaf; background: #fffaf0; }
.health-item.is-bad { border-color: #fecdca; background: #fef3f2; }
.health-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sn-muted);
  margin-bottom: 0.35rem;
}
.health-value {
  font-weight: 650;
  font-size: 0.92rem;
}

.check-list {
  margin: 0.85rem 0 0;
  padding-left: 0;
  list-style: none;
  line-height: 1.7;
  color: #334e68;
}
.check-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--sn-line-soft);
}
.check-list li:last-child { border-bottom: 0; }
.check-list li.done { color: var(--sn-ok); }

.settings-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 1.35rem;
  padding: 0.35rem;
  -webkit-overflow-scrolling: touch;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--sn-line-soft);
  border-radius: 14px;
}
.settings-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #486581;
  font-weight: 650;
  font-size: 0.88rem;
  text-decoration: none;
}
.settings-tab .ui-ico {
  width: 15px;
  height: 15px;
  opacity: 0.85;
}
.settings-tab .ui-ico svg { width: 15px; height: 15px; }
.settings-tab:hover {
  text-decoration: none;
  background: var(--sn-brand-soft);
  color: var(--sn-brand-dark);
}
.settings-tab.is-active {
  background: var(--sn-brand);
  border-color: var(--sn-brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 110, 79, 0.22);
}
.settings-tab.is-active:hover { color: #fff; background: var(--sn-brand-dark); }

.settings-readonly {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.settings-readonly-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--sn-line-soft);
  font-size: 0.92rem;
}
.settings-readonly-row span { color: var(--sn-muted); font-weight: 650; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

.env-probe-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--sn-line);
  background: #fff;
}
.env-probe-banner.is-ok {
  border-color: #abefc6;
  background: linear-gradient(135deg, #f6fef9, #fff);
}
.env-probe-banner.is-local {
  border-color: #b2ddff;
  background: linear-gradient(135deg, #f0f9ff, #fff);
}
.env-probe-banner.is-bad {
  border-color: #fecdca;
  background: linear-gradient(135deg, #fef3f2, #fff);
}
.env-probe-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sn-muted);
  margin-bottom: 0.2rem;
}
.env-probe-banner-main strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.env-probe-banner-main p {
  margin: 0;
  color: var(--sn-muted);
  max-width: 36rem;
  line-height: 1.45;
}
.env-probe-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}
.env-probe-banner-meta > div {
  display: grid;
  gap: 0.15rem;
}
.env-probe-banner-meta span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sn-muted);
}
.env-probe-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.env-probe-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--sn-line);
  background: #f8fafb;
}
.env-probe-pill.is-ok { background: #ecfdf3; color: var(--sn-ok); border-color: #abefc6; }
.env-probe-pill.is-local { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }
.env-probe-pill.is-bad { background: #fef3f2; color: var(--sn-danger); border-color: #fecdca; }
.env-probe-summary {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--sn-line-soft);
  background: #f8fafb;
  line-height: 1.45;
}
.env-probe-summary.is-ok { background: #f6fef9; border-color: #abefc6; }
.env-probe-summary.is-local { background: #f0f9ff; border-color: #b2ddff; }
.env-probe-summary.is-bad { background: #fef3f2; border-color: #fecdca; }
.btn-sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.cli-block {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.55;
}

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.9rem 0.65rem;
  border-bottom: 1px solid var(--sn-line-soft);
  font-size: 0.94rem;
}
th {
  color: var(--sn-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
tbody tr:hover td { background: #f8fafb; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 11px;
  padding: 0.62rem 1.05rem;
  background: var(--sn-brand);
  color: #fff;
  font-weight: 650;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(11, 110, 79, 0.22);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  line-height: 1.2;
  white-space: nowrap;
}
.btn .ui-ico,
.btn .nav-ico {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 16px;
}
.btn .ui-ico svg,
.btn .nav-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn:hover {
  background: var(--sn-brand-dark);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
}
.btn-secondary {
  background: #243b53;
  box-shadow: 0 4px 12px rgba(36, 59, 83, 0.22);
}
.btn-secondary:hover { background: #102a43; color: #fff; }
.btn-danger {
  background: var(--sn-danger);
  box-shadow: 0 4px 12px rgba(180, 35, 24, 0.2);
}
.btn-ghost {
  background: #fff;
  color: var(--sn-ink);
  border: 1px solid var(--sn-line);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--sn-brand-soft);
  color: var(--sn-brand-dark);
  border-color: #b7d8c8;
}
.btn-sm {
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 9px;
}
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
}

.ui-ico {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.ui-ico svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ui-ico-lg { width: 22px; height: 22px; }
.ui-ico-lg svg { width: 22px; height: 22px; }

.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

select {
  border: 1px solid var(--sn-line);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  background: #fff;
  color: var(--sn-ink);
  font: inherit;
  font-size: 0.9rem;
  min-height: 2.55rem;
}
select:focus {
  outline: none;
  border-color: #7eb89e;
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.12);
}

.chip-bar,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.filter-bar .select-shell {
  min-width: 11rem;
}
.filter-bar .select-shell select {
  min-width: 11rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--sn-line);
  background: #fff;
  color: #334e68;
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  line-height: 1.2;
}
.chip .ui-ico {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}
.chip .ui-ico svg { width: 14px; height: 14px; }
.chip:hover {
  text-decoration: none;
  border-color: #b7d8c8;
  background: var(--sn-brand-soft);
  color: var(--sn-brand-dark);
}
.chip.is-active {
  background: var(--sn-brand);
  border-color: var(--sn-brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(11, 110, 79, 0.2);
}
.chip.is-active:hover { color: #fff; background: var(--sn-brand-dark); }
.chip-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
}
.chip.is-active .chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.card-head-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.card-head-title .card-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--sn-brand-soft);
  color: var(--sn-brand);
  flex: 0 0 auto;
}
.card-head-title .card-ico .ui-ico,
.card-head-title .card-ico .ui-ico svg {
  width: 18px;
  height: 18px;
}
.card-head-title strong,
.card-head-title .card-title {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.card-head-title small {
  display: block;
  margin-top: 0.15rem;
  color: var(--sn-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.35rem;
  border: 1px solid var(--sn-line-soft);
  border-radius: 12px;
}
.table-wrap table { margin: 0; }
.table-wrap th:first-child,
.table-wrap td:first-child { padding-left: 0.9rem; }
.table-wrap th:last-child,
.table-wrap td:last-child { padding-right: 0.9rem; }

.field-check {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.field-check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--sn-brand);
}

.user-sites-block {
  border-top: 1px solid var(--sn-line-soft);
  padding: 1.1rem 0;
}
.user-sites-block:first-of-type {
  border-top: 0;
  padding-top: 0.35rem;
}
.user-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.45rem 0.75rem;
  margin: 0.35rem 0 0;
}
.user-site-opt {
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--sn-line-soft);
  border-radius: 10px;
  background: #fff;
}
.user-site-opt:has(input:checked) {
  border-color: #b7d8c8;
  background: var(--sn-brand-soft);
}

.cat-form {
  display: grid;
  gap: 0.85rem;
}
.cat-form-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}
.cat-form-spacer { flex: 1 1 auto; min-width: 0.5rem; }
.cat-tree {
  display: grid;
  gap: 0.85rem;
}
.cat-node {
  border: 1px solid var(--sn-line-soft);
  border-radius: 14px;
  background: #fff;
  padding: 1rem 1.1rem 0.9rem;
  box-shadow: 0 1px 0 rgba(16, 42, 67, 0.03);
}
.cat-node.is-root {
  border-color: #cfe3d8;
  background:
    linear-gradient(135deg, rgba(11, 110, 79, 0.04), transparent 42%),
    #fff;
}
.cat-node.is-child {
  margin-left: 1.35rem;
  border-left: 3px solid #9fd4b8;
  background: #fbfcfd;
}
.cat-node.is-inactive {
  opacity: 0.72;
}
.cat-node-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--sn-line-soft);
}
.cat-node-title {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  min-width: 0;
}
.cat-node-title strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.2;
}
.cat-slug {
  display: block;
  margin-top: 0.2rem;
  color: var(--sn-muted);
  font-size: 0.78rem;
}
.cat-depth-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sn-brand-soft);
  color: var(--sn-brand-dark);
  flex: 0 0 auto;
}
.cat-depth-ico .ui-ico,
.cat-depth-ico .ui-ico svg {
  width: 16px;
  height: 16px;
}
.cat-node.is-child .cat-depth-ico {
  background: #eef2f6;
  color: #486581;
}
.cat-delete {
  margin-top: 0.65rem;
  display: flex;
  justify-content: flex-end;
}
.cat-ai-box {
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--sn-line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbf9 0%, #fff 55%);
}
.cat-ai-box > summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  color: var(--sn-brand-dark);
}
.cat-ai-box > summary::-webkit-details-marker { display: none; }
.cat-ai-box > summary .ui-ico { flex: 0 0 auto; }
.cat-ai-json {
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 8rem;
}
@media (max-width: 720px) {
  .cat-node.is-child { margin-left: 0.55rem; }
}

.sites-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
}
.site-preview-card {
  border: 1px solid var(--sn-line-soft);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.06);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.site-preview-chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(90deg, var(--sp-primary, #0B6E4F), var(--sp-secondary, #083D77));
  color: #fff;
}
.site-preview-dots {
  display: inline-flex;
  gap: 0.28rem;
}
.site-preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}
.site-preview-url {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.72rem;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.site-preview-open {
  color: #fff;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}
.site-preview-open:hover {
  background: rgba(255, 255, 255, 0.28);
  text-decoration: none;
  color: #fff;
}
.site-preview-open .ui-ico,
.site-preview-open .ui-ico svg {
  width: 14px;
  height: 14px;
}
.site-preview-viewport {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: var(--sp-bg, #f7f9fc);
  border-bottom: 1px solid var(--sn-line-soft);
}
.site-preview-iframe {
  width: 1280px;
  height: 800px;
  border: 0;
  transform: scale(0.235);
  transform-origin: top left;
  pointer-events: none;
  background: #fff;
}
.site-preview-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.site-preview-body {
  padding: 0.9rem 1rem 1rem;
  display: grid;
  gap: 0.55rem;
}
.site-preview-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.site-preview-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--sn-line-soft);
  flex: 0 0 auto;
}
.site-preview-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex: 0 0 auto;
}
.site-preview-titles {
  min-width: 0;
  flex: 1 1 auto;
}
.site-preview-titles strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.2;
}
.site-preview-titles .mono {
  display: block;
  color: var(--sn-muted);
  font-size: 0.75rem;
  margin-top: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-preview-tagline {
  margin: 0;
  color: #486581;
  font-size: 0.86rem;
  line-height: 1.4;
}
.site-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  color: var(--sn-muted);
  font-size: 0.8rem;
  font-weight: 650;
}
.site-preview-actions {
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.sites-hub-hero { margin-bottom: 1.1rem; }
.sites-hub-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0 1rem;
}
.sites-hub-kpi {
  border: 1px solid var(--sn-line-soft);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: linear-gradient(180deg, #fff, #f7faf8);
}
.sites-hub-kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.1;
  color: #102a43;
}
.sites-hub-kpi span {
  color: var(--sn-muted);
  font-size: 0.78rem;
  font-weight: 650;
}
.sites-hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.sites-hub-toolbar input[type="search"] {
  flex: 1 1 220px;
  min-width: 180px;
  margin: 0;
}
.sites-hub-view { display: inline-flex; gap: 0.35rem; }
.sites-hub-row-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.sites-hub-row-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--sn-line-soft);
  background: #fff;
}
.sites-hub-row-brand strong { display: block; line-height: 1.2; }
.sites-hub-row-brand .mono {
  display: block;
  color: var(--sn-muted);
  font-size: 0.74rem;
}
.sites-score {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
}
.sites-score-label {
  color: var(--sn-muted);
  font-weight: 650;
  white-space: nowrap;
}
.sites-score-bar {
  flex: 1 1 auto;
  height: 7px;
  border-radius: 999px;
  background: #e6eef5;
  overflow: hidden;
  min-width: 56px;
}
.sites-score-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #94a3b8;
}
.sites-score.is-good .sites-score-bar i { background: #12b76a; }
.sites-score.is-mid .sites-score-bar i { background: #f79009; }
.sites-score.is-low .sites-score-bar i { background: #f04438; }
.sites-score strong { font-variant-numeric: tabular-nums; min-width: 2.4rem; text-align: right; }
.sites-check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.sites-check-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--sn-line-soft);
  color: #627d98;
  background: #f8fafc;
}
.sites-check-list li.is-ok {
  color: #027a48;
  background: #ecfdf3;
  border-color: #abefc6;
}
.sites-check-list li.is-miss {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}
.sites-check-list li.is-soft {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}
.site-hub-card .site-preview-actions { gap: 0.35rem; }

.publish-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--sn-line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f7faf8);
}
.publish-bulk-form { display: inline; margin: 0; }
.publish-col-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
}

@media (max-width: 900px) {
  .sites-hub-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sites-hub-kpis { grid-template-columns: 1fr 1fr; }
}

.topics-site-block {
  scroll-margin-top: 1rem;
}
.topics-run-details {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--sn-muted);
  font-size: 0.9rem;
}
.topics-agenda-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}
.topics-agenda {
  border: 1px solid var(--sn-line-soft);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: #fff;
  scroll-margin-top: 1rem;
}
.topics-agenda-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.topics-agenda-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.topics-quick-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--sn-muted);
  margin-bottom: 0.35rem;
}
.topics-quick-form textarea {
  width: 100%;
  border: 1px solid var(--sn-line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  resize: vertical;
  min-height: 5.5rem;
}
.topics-suggestions {
  padding-top: 0.85rem;
  border-top: 1px solid var(--sn-line-soft);
}
.topics-suggestions-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.topics-angle {
  max-width: 280px;
  font-size: 0.85rem;
  color: var(--sn-muted);
}

.chip.field-check {
  padding: 0.42rem 0.8rem;
}
.chip.field-check input {
  width: 0.95rem;
  height: 0.95rem;
}
button.chip {
  font: inherit;
  cursor: pointer;
  appearance: none;
}

.select-shell {
  position: relative;
}
.select-shell select,
.sidebar-site select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #627d98 50%),
    linear-gradient(135deg, #627d98 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #eef2f6;
  color: #334e68;
  font-size: 0.75rem;
  font-weight: 700;
}
.source-pill.is-api { background: #e0f2fe; color: #075985; }
.source-pill.is-system { background: #ecfdf3; color: #067647; }
.source-pill.is-error { background: #fef3f2; color: #b42318; }

.form-row { margin-bottom: 1.1rem; }
.form-row label {
  display: block;
  font-weight: 650;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="url"],
.form-row input[type="number"],
.form-row input[type="time"],
.form-row input[type="datetime-local"],
.form-row input[type="search"],
.form-row input[type="tel"],
.form-row input[type="color"],
.form-row input[type="file"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--sn-line);
  border-radius: var(--sn-radius-sm);
  font: inherit;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #7bbfa5;
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.15);
}
.form-row textarea { min-height: 110px; resize: vertical; }
.form-help { color: var(--sn-muted); font-size: 0.8rem; margin-top: 0.3rem; }
.color-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.85rem; }

.site-colors-block { margin-bottom: 0.35rem; }
.site-color-preview {
  --scp-bg: #F7F9FC;
  --scp-text: #1A1A1A;
  --scp-primary: #0B6E4F;
  --scp-accent: #E4572E;
  --scp-grad: linear-gradient(135deg, #0B6E4F, #083D77);
  border: 1px solid var(--sn-line-soft);
  border-radius: 16px;
  overflow: hidden;
  margin: 0.75rem 0 1rem;
  background: var(--scp-bg);
  box-shadow: 0 10px 28px rgba(16, 42, 67, 0.06);
}
.scp-util {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.45rem 0.85rem;
  color: rgba(255,255,255,0.88);
  font-size: 0.78rem;
  font-weight: 650;
  background: var(--scp-grad);
}
.scp-util-right { margin-left: auto; opacity: 0.8; }
.scp-body { padding: 0.85rem 1rem 1rem; }
.scp-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(18,24,31,0.08);
}
.scp-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.scp-nav { color: #627d98; font-size: 0.78rem; }
.scp-chip {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.scp-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.25;
}
.scp-text { margin: 0 0 0.85rem; font-size: 0.9rem; line-height: 1.45; }
.scp-actions { display: flex; align-items: center; gap: 0.85rem; }
.scp-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--scp-grad);
  box-shadow: 0 4px 12px rgba(11,110,79,0.22);
}
.scp-link { font-size: 0.86rem; font-weight: 700; }
.scp-swatches {
  display: flex;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem 0.75rem;
  border-top: 1px solid rgba(18,24,31,0.06);
  background: rgba(255,255,255,0.55);
}
.scp-swatches i {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(18,24,31,0.12);
  display: block;
}
.site-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.site-color-card {
  border: 1px solid var(--sn-line-soft);
  border-radius: 14px;
  padding: 0.75rem;
  background: #fff;
  display: grid;
  gap: 0.55rem;
}
.site-color-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.site-color-card-top input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--sn-line-soft);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  flex: 0 0 auto;
}
.site-color-card-top label {
  display: block;
  font-weight: 700;
  margin: 0;
  font-size: 0.9rem;
}
.site-color-card-top small {
  display: block;
  color: var(--sn-muted);
  font-size: 0.74rem;
  margin-top: 0.12rem;
}
.site-color-hex {
  width: 100%;
  font-size: 0.86rem !important;
  letter-spacing: 0.04em;
}
.site-gradient-panel {
  margin-top: 1rem;
  border: 1px solid var(--sn-line-soft);
  border-radius: 16px;
  padding: 0.9rem 1rem 1rem;
  background: linear-gradient(180deg, #fff, #f7faf8);
}
.site-gradient-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.site-gradient-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  margin: 0;
  cursor: pointer;
}
.site-gradient-strip {
  flex: 1 1 160px;
  min-width: 140px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(18,24,31,0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.site-gradient-controls { margin-top: 0.9rem; display: grid; gap: 0.85rem; }
.site-gradient-controls[hidden],
.site-gradient-ends[hidden] { display: none !important; }
.site-gradient-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}
.site-grad-preset { min-width: 3.6rem; }
.site-gradient-ends { margin-top: 0.25rem; }
@media (max-width: 720px) {
  .scp-nav { display: none; }
}
.inline-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.alert {
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
  font-size: 0.94rem;
}
.alert-success { background: #ecfdf3; color: var(--sn-ok); border-color: #abefc6; }
.alert-error { background: #fef3f2; color: var(--sn-danger); border-color: #fecdca; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-active { background: #ecfdf3; color: var(--sn-ok); }
.badge-warn { background: #fff7ed; color: #c2410c; }
.badge-inactive { background: #f2f4f7; color: #667085; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}
.preview-logo { max-height: 48px; max-width: 160px; }
.preview-favicon { width: 32px; height: 32px; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.15rem;
  margin-top: 1.15rem;
}
.media-card {
  margin: 0;
  border: 1px solid var(--sn-line-soft);
  border-radius: 14px;
  overflow: hidden;
  background: #fafbfc;
  box-shadow: var(--sn-shadow);
}
.media-card img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: #eef2f6;
}
.media-card figcaption { padding: 0.65rem 0.75rem 0.8rem; }
.media-pick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.65rem;
  max-height: 220px;
  overflow: auto;
  padding: 0.35rem 0;
}
.media-pick label {
  display: block;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  margin: 0;
}
.media-pick label:has(input:checked) { border-color: var(--sn-brand); }
.media-pick button {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #eef2f6;
  cursor: pointer;
}
.media-pick button:hover { border-color: var(--sn-brand); }
.media-pick img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
}
.media-pick input { position: absolute; opacity: 0; pointer-events: none; }

.report-bars { display: grid; gap: 0.55rem; }
.report-bar-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2rem;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.85rem;
}
.report-bar-track {
  height: 10px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
}
.report-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0b6e4f, #18a87a);
  border-radius: 999px;
  min-width: 2px;
}

.portal-visits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.15rem;
}
.portal-visits-col {
  border: 1px solid var(--sn-line-soft);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: #fff;
}
.portal-visit-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.portal-visits .report-bar-row {
  grid-template-columns: minmax(7rem, 1fr) minmax(4rem, 0.9fr) auto;
}
@media (max-width: 900px) {
  .portal-visits-grid { grid-template-columns: 1fr; }
}

.site-dash-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.site-dash-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--sn-line-soft);
  background: var(--sn-surface);
  box-shadow: var(--sn-shadow);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.site-dash-chip:hover {
  text-decoration: none;
  border-color: rgba(11, 110, 79, 0.35);
  transform: translateY(-1px);
}
.site-dash-chip.is-active {
  border-color: var(--sn-brand);
  box-shadow: 0 0 0 1px rgba(11, 110, 79, 0.2), var(--sn-shadow);
  background: linear-gradient(180deg, #fff 0%, #f3faf6 100%);
}
.site-dash-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  flex: 0 0 auto;
}
.site-dash-chip-dot.is-on { background: #12b76a; box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.18); }
.site-dash-chip-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.site-dash-chip-text strong {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-dash-chip-text small {
  color: var(--sn-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-dash-period { margin-bottom: 1.1rem; }
.site-dash-stats { margin-bottom: 1.15rem; }
.site-dash-charts { margin-bottom: 1.15rem; }
.site-dash-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}
.site-dash-main > .card { margin-bottom: 0; }
.site-dash-bar {
  grid-template-columns: minmax(7rem, 1fr) minmax(4rem, 0.85fr) auto;
}
.site-dash-side {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 1.15rem;
  margin-bottom: 0.5rem;
}
.site-dash-side > .card { margin-bottom: 0; }
.site-dash-links {
  display: grid;
  gap: 0.35rem;
}
.site-dash-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
}
.site-dash-links a:hover {
  background: var(--sn-brand-soft);
  border-color: rgba(11, 110, 79, 0.12);
  text-decoration: none;
}
.site-dash-links a .ui-ico { margin-right: 0.35rem; }
.site-dash-links span {
  font-variant-numeric: tabular-nums;
  color: var(--sn-muted);
  font-size: 0.85rem;
  font-weight: 650;
}
.site-dash-rotation {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--sn-line-soft);
  font-size: 0.88rem;
  color: var(--sn-muted);
}
.site-dash-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.site-dash-posts a {
  display: grid;
  gap: 0.25rem;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--sn-line-soft);
  text-decoration: none;
  color: inherit;
}
.site-dash-posts li:last-child a { border-bottom: 0; }
.site-dash-posts a:hover { background: rgba(11, 110, 79, 0.04); }
.site-dash-posts strong {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-dash-posts span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--sn-muted);
}
.bar-fill-blue {
  background: linear-gradient(180deg, #3b82f6, #083d77);
}
@media (max-width: 1000px) {
  .site-dash-main,
  .site-dash-side { grid-template-columns: 1fr; }
}

.guest-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(11, 110, 79, 0.14), transparent 60%),
    linear-gradient(160deg, #eef3f7, #e8f2ee);
}
.guest-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--sn-line-soft);
  box-shadow: var(--sn-shadow);
  padding: 2.1rem;
}
.guest-card h1 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}
.guest-card .brand-mark {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sn-brand);
  margin-bottom: 0.5rem;
}

/* Tipografia — seletor no formulário de site */
.font-picker {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .font-picker { grid-template-columns: 1fr 1fr; }
}
.font-option {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--sn-line-soft, #d7e0e8);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.font-option input { position: absolute; opacity: 0; pointer-events: none; }
.font-option.is-selected,
.font-option:has(input:checked) {
  border-color: var(--sn-brand, #0B6E4F);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.12);
}
.font-option-preview {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f3f6f8;
  font-size: 1.35rem;
  font-weight: 700;
  color: #122;
}
.font-option-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.font-option-copy strong {
  font-size: 1rem;
  color: #122;
}
.font-option-copy em {
  font-size: 0.82rem;
  color: #486581;
}
.font-option-copy small {
  font-size: 0.75rem;
  color: #829ab1;
}

@media (max-width: 1100px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-charts { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .sidebar-top,
  .sidebar-foot {
    box-shadow: none;
    background: transparent;
    border-top: 0;
  }
  .sidebar-scroll {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
    padding: 0.35rem 1rem 0.85rem;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.35rem;
  }
  .sidebar .nav-section { grid-column: 1 / -1; }
  .grid-2, .grid-3, .grid-4, .color-grid { grid-template-columns: 1fr; }
  .main { padding: 1.15rem 1.1rem 2.5rem; }
  .dash-hero { align-items: flex-start; }
  .dash-actions { justify-content: flex-start; }
  .settings-readonly-row { grid-template-columns: 1fr; gap: 0.2rem; }
}
@media (max-width: 560px) {
  .dash-stats { grid-template-columns: 1fr; }
}
