/* Painel — visual alinhado à identidade da home (tons água / floresta) */

:root {
  --bg: #e8f0f6;
  --bg-mesh: radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(6, 31, 47, 0.08), transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, #062033) 100%);
  --surface: #ffffff;
  --surface-elevated: rgba(255, 255, 255, 0.92);
  --border: rgba(6, 31, 47, 0.1);
  --text: #0a1f2e;
  --text-muted: #5c6f80;
  --sidebar-bg: #041926;
  --sidebar-text: #c5d9e8;
  --sidebar-muted: #7a97ab;
  --accent: #28a745;
  --accent-bright: #3ecf5a;
  --accent-soft: color-mix(in srgb, var(--accent) 15%, transparent);
  --top-bg: #062033;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --primary: #2563eb;
  --primary-hover: color-mix(in srgb, var(--primary) 82%, #000);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --nav-pad-y: 10px;
  --nav-pad-x: 12px;
  --nav-font: 0.915rem;
  --nav-radius: 12px;
  --shadow-sm: 0 1px 2px rgba(6, 31, 47, 0.06);
  --shadow-md: 0 8px 24px rgba(6, 31, 47, 0.08), 0 2px 8px rgba(6, 31, 47, 0.04);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --font: "Figtree", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --transition: 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

body.dash-density-compact {
  --nav-pad-y: 7px;
  --nav-pad-x: 10px;
  --nav-font: 0.84rem;
}

body.dash-radius-sharp {
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --nav-radius: 4px;
}

body.dash-radius-round {
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --nav-radius: 999px;
}

body.dash-theme-claro {
  --border: rgba(15, 39, 64, 0.12);
}

body.dash-theme-noite {
  --surface: #1f2937;
  --surface-elevated: rgba(31, 41, 55, 0.95);
  --border: rgba(255, 255, 255, 0.1);
  --text-muted: #9ca3af;
}

* {
  box-sizing: border-box;
}

body.dashboard-app {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-mesh);
  background-color: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Cabeçalho */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 22px;
  background: color-mix(in srgb, var(--top-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--sidebar-text) 12%, transparent);
  box-shadow: var(--shadow-sm);
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
}

.top-brand:hover .top-logo {
  filter: brightness(1.12);
}

.top-brand:hover h1 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.top-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #1a6b3a 100%);
  box-shadow: 0 4px 14px rgba(40, 167, 69, 0.35);
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.top-logo.has-image {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.top-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sys-brand-logo-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sys-brand-logo-preview {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  border: 1px dashed var(--border, #c7d2dc);
  background: linear-gradient(135deg, var(--accent) 0%, #1a6b3a 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px;
  text-align: center;
}

.sys-brand-logo-preview.has-image {
  background: #fff;
  border-style: solid;
}

.sys-brand-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sys-brand-logo-fields {
  display: grid;
  gap: 10px;
}

.sys-brand-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sys-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.sys-theme-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.sys-theme-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.sys-theme-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.sys-theme-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  height: 28px;
}

.sys-theme-swatches span {
  border-radius: 4px;
}

.sys-theme-card strong {
  font-size: 0.92rem;
}

.sys-theme-card span.muted {
  font-size: 0.78rem;
}

.sys-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.sys-color-field {
  display: grid;
  gap: 6px;
}

.sys-color-field .sys-color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sys-color-field input[type="color"] {
  width: 42px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.sys-color-field input[type="text"] {
  flex: 1;
  min-width: 0;
}

@media (max-width: 640px) {
  .sys-brand-logo-row {
    grid-template-columns: 1fr;
  }
}

.top h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.top-sub {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: rgba(219, 234, 254, 0.75);
  font-weight: 500;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-link {
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.top-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.top-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Notificações no topo */
.top-notif {
  position: relative;
}

.top-notif-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition);
}

.top-notif-btn:hover,
.top-notif-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(62, 207, 90, 0.35);
}

.top-notif-btn .lucide {
  width: 18px;
  height: 18px;
}

.top-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #062033;
}

.top-notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 45;
  width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(6, 31, 47, 0.22);
  overflow: hidden;
}

.top-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.top-notif-head strong {
  font-size: 0.95rem;
  color: var(--text);
}

.top-notif-readall {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.top-notif-readall:hover {
  text-decoration: underline;
}

.top-notif-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px;
}

.top-notif-empty {
  margin: 18px 12px;
  text-align: center;
  font-size: 0.9rem;
}

.top-notif-item {
  display: flex;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background var(--transition);
}

.top-notif-item:hover {
  background: #f1f5f9;
}

.top-notif-item.is-unread {
  background: rgba(40, 167, 69, 0.08);
}

.top-notif-item .friend-avatar-wrap {
  width: 40px;
  height: 40px;
}

.top-notif-item-body {
  flex: 1;
  min-width: 0;
}

.top-notif-item-body strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.3;
  margin-bottom: 2px;
}

.top-notif-item-body p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-notif-item-body time {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: #94a3b8;
}

.top-notif-footer {
  border: 0;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  padding: 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.top-notif-footer:hover {
  background: #f1f5f9;
}

/* Menu de perfil no topo */
.top-profile {
  position: relative;
}

.top-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition);
}

.top-profile-btn:hover,
.top-profile-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(62, 207, 90, 0.35);
}

.top-profile-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.top-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, #0f2f45 0%, #1e4a66 100%);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #e0f2fe;
  letter-spacing: 0.02em;
}

.top-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.top-profile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 160px;
  line-height: 1.15;
}

.top-profile-name {
  font-size: 0.88rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.top-profile-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(219, 234, 254, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.top-profile-chevron {
  width: 16px;
  height: 16px;
  opacity: 0.75;
  transition: transform var(--transition);
}

.top-profile-btn[aria-expanded="true"] .top-profile-chevron {
  transform: rotate(180deg);
}

.top-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  min-width: 240px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(6, 31, 47, 0.22);
  display: grid;
  gap: 2px;
}

.top-profile-menu-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.top-profile-menu-email {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-profile-menu button,
.top-profile-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.top-profile-menu button:hover,
.top-profile-menu-link:hover {
  background: #f1f5f9;
}

.top-profile-menu .lucide {
  width: 16px;
  height: 16px;
  color: #5c6f80;
  flex-shrink: 0;
}

.top-profile-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

.top-profile-logout {
  color: #b91c1c !important;
}

.top-profile-logout .lucide {
  color: #b91c1c !important;
}

.top-profile-logout:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}

@media (max-width: 640px) {
  .top-profile-meta {
    display: none;
  }

  .top-profile-btn {
    padding: 5px;
  }

  .top-profile-chevron {
    display: none;
  }
}

.btn-logout {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  background: linear-gradient(180deg, #ef4444 0%, var(--danger) 100%);
  color: #fff;
  box-shadow: var(--shadow-inset), 0 4px 12px rgba(220, 38, 38, 0.25);
  transition: transform 0.12s ease, box-shadow var(--transition), filter var(--transition);
}

.btn-logout:hover {
  filter: brightness(1.06);
  box-shadow: var(--shadow-inset), 0 6px 16px rgba(220, 38, 38, 0.35);
}

.btn-logout:active {
  transform: translateY(1px);
}

.btn-logout:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Layout principal */
.layout {
  display: grid;
  grid-template-columns: minmax(240px, 272px) 1fr;
  min-height: calc(100vh - 72px);
  max-width: 1440px;
  margin: 0 auto;
}

/* Barra lateral */
.sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  z-index: 10;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 12px 16px;
  max-height: calc(100vh - 72px);
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--sidebar-bg) 92%, #fff) 0%, var(--sidebar-bg) 55%, color-mix(in srgb, var(--sidebar-bg) 88%, #000) 100%);
  color: var(--sidebar-text);
  border-right: 1px solid color-mix(in srgb, var(--sidebar-text) 10%, transparent);
  overflow: hidden;
}

.sidebar-glow {
  pointer-events: none;
  position: absolute;
  inset: auto -40% -20% -20%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(40, 167, 69, 0.18), transparent 68%);
  z-index: 0;
}

.sidebar-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  overflow-y: auto;
  padding: 0 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

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

.sidebar-group h3 {
  margin: 0 0 8px;
  padding: 0 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.sidebar-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: var(--nav-radius);
  padding: var(--nav-pad-y) var(--nav-pad-x);
  font-family: inherit;
  font-size: var(--nav-font);
  font-weight: 600;
  letter-spacing: -0.01em;
  background: transparent;
  color: color-mix(in srgb, var(--sidebar-text) 88%, transparent);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition),
    transform 0.15s ease,
    box-shadow var(--transition);
}

.sidebar-nav button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--accent-bright);
  transform: translateY(-50%);
  opacity: 0;
  transition: height var(--transition), opacity var(--transition);
}

.sidebar-nav button .lucide {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.75;
  opacity: 0.72;
  transition: opacity var(--transition), color var(--transition);
}

.sidebar-nav button span {
  min-width: 0;
  line-height: 1.25;
}

.sidebar-nav button:hover {
  background: color-mix(in srgb, var(--sidebar-text) 8%, transparent);
  color: var(--sidebar-text);
}

.sidebar-nav button:hover .lucide {
  opacity: 1;
  color: var(--accent-bright);
}

.sidebar-nav button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sidebar-nav button.nav-active {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--accent) 28%, transparent),
    color-mix(in srgb, var(--accent) 10%, transparent)
  );
  color: var(--sidebar-text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-bright) 22%, transparent);
}

.sidebar-nav button.nav-active::before {
  height: 58%;
  opacity: 1;
}

.sidebar-nav button.nav-active .lucide {
  opacity: 1;
  color: var(--accent-bright);
}

body.dash-nav-pill .sidebar-nav button::before {
  display: none;
}

body.dash-nav-pill .sidebar-nav button.nav-active {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-bright) 35%, transparent);
}

body.dash-theme-claro .sidebar-nav button:hover,
body.dash-theme-claro .sidebar-nav button.nav-active {
  color: var(--sidebar-text);
}

body.dash-theme-claro .top h1 {
  color: var(--text);
}

body.dash-theme-claro .top-sub {
  color: var(--text-muted);
}

body.dash-theme-claro .top-link {
  color: var(--text);
}

body.dash-theme-noite .content,
body.dash-theme-noite .tab {
  color: var(--text);
}

.sidebar-footnote {
  position: relative;
  z-index: 1;
  margin: 18px 4px 4px;
  padding: 12px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.02em;
  color: rgba(122, 151, 171, 0.9);
}

/* Conteúdo */
.content {
  padding: 22px 22px 32px;
}

#msg {
  min-height: 22px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

#msg.msg-success {
  color: #0d5c3d;
  background: var(--accent-soft);
  border: 1px solid rgba(40, 167, 69, 0.35);
}

#msg.msg-error {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.hidden {
  display: none !important;
}

.tab {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 26px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.tab h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Perfil — capa + avatar */
.profile-hero {
  margin: -6px -6px 22px;
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f7fb;
}

.profile-cover {
  position: relative;
  height: 148px;
  background-color: #0b3550;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-cover:not(.has-cover) {
  background-image: linear-gradient(120deg, #0b3550, #1a5c38);
}

.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 32, 51, 0.35), rgba(40, 167, 69, 0.12));
  pointer-events: none;
}

.profile-cover-upload {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(4, 25, 38, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background var(--transition);
}

.profile-cover-upload:hover {
  background: rgba(4, 25, 38, 0.9);
}

.profile-cover-upload .lucide {
  width: 15px;
  height: 15px;
}

.profile-hero-body {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 0 18px 18px;
  margin-top: -48px;
  position: relative;
}

.profile-avatar-block {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  box-shadow: 0 8px 24px rgba(6, 31, 47, 0.18);
  background: linear-gradient(145deg, #0f2f45 0%, #1e4a66 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-ph {
  color: #e0f2fe;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.profile-avatar-upload {
  position: absolute;
  right: -2px;
  bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
  border: 2px solid #fff;
}

.profile-avatar-upload .lucide {
  width: 13px;
  height: 13px;
}

.profile-hero-meta {
  padding-top: 56px;
  padding-bottom: 2px;
  min-width: 0;
  flex: 1;
}

.profile-hero-meta h2 {
  margin: 0 0 4px;
  color: var(--text, #0f2f44);
  line-height: 1.2;
}

.profile-form {
  display: grid;
  gap: 10px;
  max-width: 640px;
}

.profile-form label:not(.inline) {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-contacts {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
  background: #f8fafc;
}

.profile-contacts legend {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 6px;
}

.profile-password-form {
  margin-top: 18px;
}

.profile-password {
  background: #f4f7fa;
}

.profile-password .primary {
  justify-self: start;
  margin-top: 4px;
}

.profile-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

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

.profile-contact-row label.inline {
  margin-bottom: 8px;
  white-space: nowrap;
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .profile-form-row {
    grid-template-columns: 1fr;
  }

  .profile-cover {
    height: 120px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }
}

.tab h3,
.tab h4 {
  margin: 1rem 0 0.5rem;
  font-size: 1.05rem;
}

/* Admin — Usuários */
.users-admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.users-admin-sub {
  margin: 4px 0 0;
}

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

.users-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: min(280px, 100%);
}

.users-search .lucide {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.users-search input {
  width: 100%;
  padding-left: 38px;
  margin: 0;
}

.users-admin-tools > select {
  margin: 0;
  min-width: 140px;
}

.users-admin-list {
  display: grid;
  gap: 10px;
}

.user-admin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 20px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.user-admin-card:hover {
  border-color: rgba(40, 167, 69, 0.28);
  box-shadow: 0 6px 18px rgba(6, 31, 47, 0.07);
}

.user-admin-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.user-admin-card .friend-avatar-wrap {
  width: 48px;
  height: 48px;
}

.user-admin-info {
  min-width: 0;
}

.user-admin-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.user-admin-title strong {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.user-admin-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.user-admin-meta .dot {
  opacity: 0.5;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.user-status-active {
  color: #0d5c3d;
  background: rgba(40, 167, 69, 0.14);
}

.user-status-inactive {
  color: #64748b;
  background: rgba(100, 116, 139, 0.14);
}

.user-status-suspended {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.12);
}

.user-admin-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
}

.user-admin-controls label {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.user-admin-controls select {
  margin: 0;
  min-width: 128px;
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.user-admin-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  margin: 0;
  padding: 9px 14px;
}

.user-admin-save .lucide {
  width: 15px;
  height: 15px;
}

.user-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.user-admin-actions .btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.user-admin-actions .lucide {
  width: 14px;
  height: 14px;
}

.user-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.user-admin-modal.hidden {
  display: none;
}

.user-admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 32, 47, 0.45);
}

.user-admin-modal-box {
  position: relative;
  z-index: 1;
  width: min(820px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #d5e0e8;
  box-shadow: 0 24px 60px rgba(9, 32, 47, 0.2);
  padding: 18px 20px 22px;
}

.uam-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

/* ===== Modal de exportação de relatórios ===== */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(9, 32, 47, 0.45);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.dash-modal-overlay.is-open {
  display: grid;
  opacity: 1;
}

.dash-modal {
  width: min(680px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #d5e0e8;
  box-shadow: 0 24px 60px rgba(9, 32, 47, 0.2);
  padding: 18px 20px 20px;
}

.dash-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.dash-modal-head h3 {
  margin: 0;
}

.dash-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef2f5;
}

.link-btn {
  background: none;
  border: none;
  color: #0d5c3d;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.rep-export-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rep-export-summary {
  margin-left: auto;
  color: #4b6475;
  font-size: 0.85rem;
}

.rep-export-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rep-export-group {
  border: 1px solid #e3eaef;
  border-radius: 12px;
  padding: 10px 12px 12px;
}

.rep-export-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.rep-export-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 6px 14px;
}

.rep-export-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.rep-export-field:hover {
  background: #f4f8fa;
}

.rep-export-field input {
  width: auto;
  margin: 0;
}

.rep-export-field input:disabled + .rep-export-field-name {
  color: #9aacb7;
}

.rep-export-field-name {
  flex: 1;
}

.rep-export-field-count {
  color: #7f929e;
  font-size: 0.78rem;
  white-space: nowrap;
}

.uam-head-main {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.uam-head h3 {
  margin: 0 0 2px;
}

.uam-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.uam-tab {
  border: 1px solid #d9e2ea;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.uam-tab.is-active {
  background: var(--primary, #2563eb);
  color: #fff;
  border-color: transparent;
}

.uam-form {
  display: grid;
  gap: 12px;
}

.uam-form h4 {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: #0d3b56;
}

.uam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.uam-grid label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.uam-grid input,
.uam-grid select,
.uam-grid textarea,
.uam-form textarea,
.uam-form input {
  font: inherit;
  font-weight: 400;
  padding: 8px 10px;
  border: 1px solid #c9d6e0;
  border-radius: 8px;
}

.uam-span-2 {
  grid-column: 1 / -1;
}

.uam-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

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

.users-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 12px;
  margin: 0;
}

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

  .user-admin-controls {
    flex-wrap: wrap;
    width: 100%;
  }

  .user-admin-controls label {
    flex: 1 1 140px;
  }

  .user-admin-save {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* Formulários */
form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

input,
textarea,
select {
  border: 1px solid rgba(6, 31, 47, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
  background: #f8fafc;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(6, 31, 47, 0.22);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  background: #fff;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

button.primary {
  justify-self: start;
  background: linear-gradient(180deg, #3b82f6 0%, var(--primary) 100%);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-inset), 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: filter var(--transition), transform 0.12s ease;
}

button.primary:hover {
  filter: brightness(1.05);
}

button.primary:active {
  transform: translateY(1px);
}

button.primary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.list {
  display: grid;
  gap: 10px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: linear-gradient(180deg, #fdfefe 0%, #f5f9fc 100%);
  box-shadow: var(--shadow-sm);
}

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

.notif-opt {
  margin-bottom: 12px;
}

.notif-label {
  align-items: flex-start;
  gap: 8px;
}

.notif-label input {
  margin-top: 4px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.warn {
  color: #b45309;
  margin: 0;
}

.warn-box {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

/* ===== Projetos do usuário ===== */
.pj-page {
  display: grid;
  gap: 16px;
}

.pj-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pj-page-head h2 {
  margin: 0 0 4px;
}

.pj-page-head .primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pj-page-meta h3 {
  margin: 0;
  font-size: 1.05rem;
}

.pj-modal {
  width: min(720px, 100%);
}

.pj-modal-form {
  margin-top: 8px;
}

.pj-modal-form .dash-modal-actions {
  margin-top: 16px;
}

body.pj-modal-open {
  overflow: hidden;
}

.pj-code {
  background: #0b2f45;
  color: #e8f5ef;
  padding: 10px 14px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
}

.pj-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.pj-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #f8fafc;
}

.pj-empty-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.pj-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  align-items: start;
}

.pj-card-cover {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #e8eef2;
}

.pj-card-cover-ph {
  background: linear-gradient(135deg, #dbeafe, #e2e8f0);
}

.pj-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pj-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pj-cover-field {
  display: grid;
  gap: 8px;
}

.pj-cover-label {
  font-weight: 700;
  font-size: 0.9rem;
}

.pj-cover-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pj-cover-preview {
  width: 120px;
  height: 80px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: #f8fafc center / cover no-repeat;
  display: grid;
  place-items: center;
}

.pj-cover-preview.has-image {
  border-style: solid;
}

.pj-cover-controls {
  display: grid;
  gap: 8px;
}

.pj-cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pj-upload-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

@media (max-width: 700px) {
  .pj-card,
  .pj-cover-row {
    grid-template-columns: 1fr;
  }

  .pj-card-cover,
  .pj-cover-preview {
    width: 100%;
    height: 140px;
  }
}

/* Rede social — feed estilo redes conhecidas */
.tab.tab-feed {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}

.feed-shell {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.feed-top {
  padding: 4px 4px 0;
}

.feed-top h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.feed-top .muted {
  margin: 4px 0 0;
}

.feed-composer {
  display: grid;
  gap: 12px;
  padding: 14px 16px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.feed-composer-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feed-composer-top .friend-avatar-wrap {
  width: 44px;
  height: 44px;
  margin-top: 4px;
}

.feed-composer-top textarea {
  flex: 1;
  min-height: 52px;
  border: none;
  background: #f0f4f8;
  border-radius: 20px;
  padding: 12px 16px;
  resize: none;
  font-size: 1rem;
}

.feed-composer-top textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
  background: #fff;
}

.feed-composer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.feed-composer-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feed-composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.social-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.social-share-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 2px;
}

.social-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: #64748b;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.social-share-btn span {
  display: none;
}

.social-share-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.social-share-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 4px 10px rgba(6, 31, 47, 0.16);
}

.social-share-btn:focus-visible {
  outline: 2px solid var(--accent, #28a745);
  outline-offset: 2px;
}

.social-share-whatsapp { background: #25d366; }
.social-share-telegram { background: #2aabee; }
.social-share-facebook { background: #1877f2; }
.social-share-x { background: #111827; }
.social-share-linkedin { background: #0a66c2; }
.social-share-email { background: #0f766e; }
.social-share-copy { background: #475569; }
.social-share-native { background: #334155; }

.feed-share-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.feed-share-wrap > .feed-tool-btn {
  flex: 1;
}

.social-share-pop {
  position: absolute;
  z-index: 9;
  right: 0;
  bottom: calc(100% + 8px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  max-width: min(320px, 90vw);
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 28px rgba(6, 31, 47, 0.16);
}

.social-share-pop.hidden {
  display: none;
}

.social-share-pop .social-share-btn.social-share-compact {
  width: auto;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
}

.social-share-pop .social-share-btn.social-share-compact span {
  display: inline;
  font-size: 0.72rem;
  font-weight: 700;
}

.feed-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #0d5c3d;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.feed-tool-chip .lucide {
  width: 16px;
  height: 16px;
}

.feed-emoji-inline {
  gap: 4px;
}

.feed-emoji-inline .post-emoji-btn {
  padding: 4px 7px;
  font-size: 1rem;
  border: none;
  background: transparent;
}

.feed-composer-tools select {
  margin: 0;
  min-width: 0;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f8fafc;
}

.feed-stream {
  display: grid;
  gap: 14px;
}

.feed-empty {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(6, 31, 47, 0.18);
  background: linear-gradient(180deg, #fff 0%, #f3f8fb 100%);
}

.feed-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.feed-empty h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.feed-empty p {
  margin: 0 auto;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.45;
}

.feed-post {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 0;
}

.feed-post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  margin: 0;
}

.feed-post-head .friend-avatar-wrap {
  width: 44px;
  height: 44px;
}

.feed-post-who {
  min-width: 0;
}

.feed-post-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-post-name strong {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.feed-post-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feed-post-sub .dot {
  opacity: 0.45;
}

.feed-post-body {
  margin: 0;
  padding: 0 16px 12px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
  font-size: 0.98rem;
}

.feed-post-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.feed-post-body a:hover {
  opacity: 0.9;
}

.feed-post .post-media-grid {
  margin: 0 0 4px;
  border-radius: 0;
  gap: 2px;
}

.feed-post .post-media-grid.grid-1 .post-media-cell {
  aspect-ratio: auto;
  max-height: 520px;
  border-radius: 0;
}

.feed-post .post-media-grid.grid-1 .post-media-cell img {
  max-height: 520px;
  width: 100%;
  object-fit: cover;
}

.feed-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 6px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.feed-stats-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-stat-link {
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.feed-stat-link:hover {
  text-decoration: underline;
  color: var(--text);
}

.feed-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: #0d5c3d;
}

.feed-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 4px 8px 8px;
  border-top: 1px solid var(--border);
}

.feed-tool-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: #4b6274;
  transition: background var(--transition), color var(--transition);
}

.feed-tool-btn:hover {
  background: #f1f5f9;
  color: var(--text);
}

.feed-tool-btn.is-active,
.feed-tool-btn.feed-tool-like.is-active {
  background: rgba(40, 167, 69, 0.1);
  color: #0d5c3d;
}

.feed-like-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.feed-like-wrap .feed-tool-like {
  flex: 1;
}

.feed-tool-more {
  flex: 0 0 28px;
  padding: 10px 2px;
  font-size: 0.75rem;
  opacity: 0.75;
}

.feed-emotions-wrap {
  position: relative;
}

.feed-emotions-pop {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

.feed-emoji-btn {
  border: 1px solid transparent;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  transition: transform 0.12s ease, background var(--transition);
}

.feed-emoji-btn:hover {
  transform: scale(1.18);
  background: #f8fafc;
}

.feed-emoji-btn.is-active {
  background: var(--accent-soft);
}

.feed-comments {
  margin: 0;
  padding: 8px 16px 14px;
  border-top: 1px solid var(--border);
  background: #fafcfd;
}

.feed-comments-empty {
  margin: 8px 0;
  font-size: 0.9rem;
}

.feed-comment-form {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.feed-comment-form .friend-avatar-wrap {
  width: 32px;
  height: 32px;
}

.feed-comment-form input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  border-radius: 999px;
  background: #fff;
  padding: 9px 14px;
}

.feed-comment-form .primary {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.feed-comment-line {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.feed-comment-line .friend-avatar-wrap {
  width: 32px;
  height: 32px;
}

.feed-comment-bubble {
  flex: 1;
  min-width: 0;
  background: #eef3f7;
  border-radius: 14px;
  padding: 8px 12px;
}

.feed-comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 2px;
}

.feed-comment-meta strong {
  font-size: 0.86rem;
}

.feed-comment-meta span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.feed-comment-bubble p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}

@media (max-width: 640px) {
  .feed-toolbar {
    grid-template-columns: 1fr;
  }

  .feed-composer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .feed-composer-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .feed-composer-footer .primary {
    width: 100%;
  }

  .social-share-bar {
    justify-content: flex-start;
  }

  .social-share-pop {
    left: 0;
    right: auto;
  }
}

/* Mídia em grade (feed e minhas publicações) */
.post-media-grid {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  width: 100%;
}

.post-media-grid.grid-1 {
  grid-template-columns: 1fr;
}

.post-media-grid.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-media-grid.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-media-cell {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 1;
}

.post-media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
}

/* Compositor — Minhas publicações */
.post-composer {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-elevated, #fff);
}

.post-composer label {
  font-weight: 600;
  font-size: 0.9rem;
}

.post-composer textarea {
  min-height: 120px;
  resize: vertical;
}

.post-composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.post-emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-emoji-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  background: #f8fafc;
  font-family: inherit;
}

.post-emoji-btn:hover {
  background: #f1f5f9;
}

.post-composer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.post-file-label {
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.post-file-label input[type="file"] {
  display: block;
  margin-top: 6px;
  font: inherit;
}

.small-hint {
  font-size: 0.85rem;
}

.post-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.post-preview-grid.hidden {
  display: none;
}

.post-preview-cell {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: #0f172a;
}

.post-preview-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-post-card .my-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.my-post-head .tag {
  font-size: 0.75rem;
  text-transform: lowercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #0d5c3d;
  font-weight: 600;
}

.my-post-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.my-post-footer .my-post-actions {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.my-post-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.my-post-list .btn-danger {
  font-size: 0.85rem;
  padding: 6px 12px;
}

.feed-actions {
  margin-top: 4px;
}

.feed-react-secondary {
  border: 1px solid rgba(6, 31, 47, 0.18);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  background: #f1f5f9;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}

.feed-react-secondary:hover {
  background: #e2e8f0;
}

.conv-item-top {
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.conv-thread {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.conv-thread .msg-line {
  margin-bottom: 10px;
}

.conv-thread .msg-line p {
  margin: 4px 0 0;
}

/* Botões genéricos dentro das abas (ex.: secundários) */
.tab button:not(.primary):not(.btn-logout) {
  font-family: inherit;
}

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

  .sidebar {
    position: relative;
    top: auto;
    max-height: none;
    padding: 12px 10px 14px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
  }

  .sidebar-glow {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 8px;
    overflow: visible;
    padding: 0;
  }

  .sidebar-group {
    display: contents;
  }

  .sidebar-group h3 {
    flex: 1 0 100%;
    margin: 4px 0 0;
    padding: 0 4px;
  }

  .sidebar-group:first-child h3 {
    margin-top: 0;
  }

  .sidebar-nav button {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    justify-content: flex-start;
    font-size: 0.82rem;
    padding: 9px 10px;
  }

  .sidebar-nav button::before {
    display: none;
  }

  .sidebar-footnote {
    display: none;
  }

  .map-para {
    min-height: 320px;
  }
}

/* Mapa Leaflet — estado do Pará (visão geral admin) */
.map-para-section {
  margin-top: 28px;
}

.map-para-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.map-para-note {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.map-para-note a {
  color: var(--primary);
}

.map-para {
  width: 100%;
  min-height: 420px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.leaflet-container {
  font-family: var(--font);
}

/* Portfólio — gallery profissional */
.tab.tab-portfolio {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}

.pf-shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.pf-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px 4px;
}

.pf-kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.pf-hero h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.pf-hero .muted {
  margin: 6px 0 0;
}

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

.pf-hero-actions .primary,
.pf-hero-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pf-hero-actions .lucide {
  width: 16px;
  height: 16px;
}

.pf-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  padding: 16px 18px 18px;
}

.pf-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pf-panel-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.pf-panel-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.pf-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pf-dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 28px 16px;
  border: 2px dashed rgba(40, 167, 69, 0.35);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f7fbf8 0%, #eef7f1 100%);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}

.pf-dropzone:hover,
.pf-dropzone.is-drag {
  border-color: var(--accent);
  background: #e8f8ee;
}

.pf-dropzone .lucide {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.pf-drop-label {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.pf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.pf-chip span {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef3f7;
  color: #475569;
}

.pf-chip.is-active {
  background: #062033;
  border-color: #062033;
  color: #fff;
}

.pf-chip.is-active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.pf-albums-manage {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px 14px;
}

.pf-albums-manage summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.pf-albums-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.pf-album-edit {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.pf-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.pf-tile {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  outline: none;
}

.pf-tile:focus-visible .pf-tile-media-wrap {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.45);
}

.pf-tile-media-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #0b1f2c;
  overflow: hidden;
  border-radius: 14px;
}

.pf-tile-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-tile:hover .pf-tile-media {
  transform: scale(1.05);
}

.pf-tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(4, 25, 38, 0.75);
  color: #fff;
}

.pf-tile-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(180deg, transparent 40%, rgba(4, 25, 38, 0.88) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.pf-tile:hover .pf-tile-overlay,
.pf-tile:focus-within .pf-tile-overlay {
  opacity: 1;
}

.pf-tile-overlay h4 {
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-tile-actions {
  display: flex;
  gap: 6px;
}

.pf-icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background var(--transition);
}

.pf-icon-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.pf-icon-btn.danger:hover {
  background: rgba(220, 38, 38, 0.85);
}

.pf-icon-btn .lucide {
  width: 15px;
  height: 15px;
}

.pf-empty {
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(6, 31, 47, 0.16);
  background: linear-gradient(180deg, #fff 0%, #f3f8fb 100%);
}

.pf-empty-icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.pf-empty h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
}

.pf-empty p {
  margin: 0 auto 16px;
  max-width: 380px;
  color: var(--text-muted);
}

body.pf-lb-open {
  overflow: hidden;
}

.pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pf-lightbox.hidden {
  display: none;
}

.pf-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 20, 30, 0.72);
  backdrop-filter: blur(6px);
}

.pf-lb-panel {
  position: relative;
  z-index: 1;
  width: min(1060px, 100%);
  max-height: min(90vh, 820px);
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.pf-lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(4, 25, 38, 0.7);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.pf-lb-close .lucide {
  width: 16px;
  height: 16px;
}

.pf-lb-media-col {
  background: #061820;
  display: grid;
  place-items: center;
  min-height: 320px;
}

.pf-lb-media {
  max-width: 100%;
  max-height: min(90vh, 820px);
  object-fit: contain;
}

.pf-lb-side {
  padding: 22px 20px 20px;
  overflow: auto;
}

.pf-lb-side h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.pf-lb-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.pf-lb-form label {
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pf-lb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.btn-secondary {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover {
  background: #f1f5f9;
}

.btn-danger {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  background: linear-gradient(180deg, #f87171 0%, var(--danger) 100%);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-file {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.45);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.btn-file input.hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

@media (max-width: 860px) {
  .pf-lb-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .pf-lb-media-col {
    max-height: 42vh;
  }

  .pf-form-row {
    grid-template-columns: 1fr;
  }
}

/* Amizades — rede moderna */
.tab.tab-friends {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}

.friends-shell {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.friends-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.friends-top h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.friends-top .muted {
  margin: 4px 0 0;
}

.friends-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: min(280px, 100%);
}

.friends-search .lucide {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.friends-search input {
  width: 100%;
  margin: 0;
  padding-left: 38px;
  border-radius: 999px;
  background: #fff;
}

.friends-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.friends-section h3 .lucide {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.friends-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(40, 167, 69, 0.14);
  color: #0d5c3d;
}

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

.friends-list {
  display: grid;
  gap: 10px;
}

.friend-person,
.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.friend-person:hover,
.friend-card:hover {
  border-color: rgba(40, 167, 69, 0.28);
  box-shadow: 0 6px 18px rgba(6, 31, 47, 0.07);
}

.friend-person[data-open-wall],
.friend-card[data-open-wall] {
  cursor: pointer;
}

.feed-author-link {
  cursor: pointer;
}

.feed-author-link:hover {
  text-decoration: underline;
}

.tab-wall .wall-shell {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.wall-back {
  justify-self: start;
}

.wall-hero {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border, #d9e2ea);
  background: #fff;
}

.wall-cover {
  height: 160px;
  background: linear-gradient(135deg, #0b3550, #1a6b4a);
  background-size: cover;
  background-position: center;
}

.wall-cover.has-cover {
  background-color: #0b3550;
}

.wall-hero-body {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  padding: 0 18px 18px;
  margin-top: -36px;
  position: relative;
}

.wall-hero-body .friend-avatar-wrap {
  width: 88px;
  height: 88px;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.wall-hero-body .friend-avatar-img,
.wall-hero-body .friend-avatar-ph {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
}

.wall-hero-meta {
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
}

.wall-hero-meta h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.wall-bio {
  margin: 8px 0 0;
  color: #355065;
  line-height: 1.45;
}

.wall-posts h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

@media (max-width: 640px) {
  .wall-cover {
    height: 120px;
  }
  .wall-hero-body {
    flex-direction: column;
    align-items: flex-start;
    margin-top: -28px;
  }
  .wall-hero-body .friend-avatar-wrap {
    width: 72px;
    height: 72px;
  }
}

.friend-person .friend-avatar-wrap,
.friend-card .friend-avatar-wrap {
  width: 52px;
  height: 52px;
}

.friend-person-info,
.friend-card-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.friend-person-info strong,
.friend-card-info strong {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-person-info .muted,
.friend-card-info .muted {
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.friend-place {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-msg {
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: #334155;
  font-style: italic;
}

.friend-person-actions,
.friend-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.friend-card-actions.tight {
  flex-direction: column;
  align-items: stretch;
}

.friend-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.friend-chip.pending {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.friends-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed rgba(6, 31, 47, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff 0%, #f5f9fc 100%);
}

.friends-invite-extra {
  margin-top: 12px;
}

.friends-invite-extra input {
  margin: 0;
  border-radius: 12px;
}

.btn-ghost {
  border: 1px solid rgba(6, 31, 47, 0.14);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), border-color var(--transition);
}

.btn-ghost:hover {
  background: #f8fafc;
}

.btn-ghost.danger-text {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.22);
}

.btn-ghost.danger-text:hover {
  background: rgba(220, 38, 38, 0.06);
}

.btn-ghost .lucide {
  width: 15px;
  height: 15px;
}

.btn-sm {
  padding: 7px 11px;
  font-size: 0.8rem;
}

.friend-avatar-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, #0f2f45 0%, #1e4a66 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.friend-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.friend-avatar-ph {
  color: #e0f2fe;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .friend-person,
  .friend-card {
    flex-wrap: wrap;
  }

  .friend-person-actions,
  .friend-card-actions {
    width: 100%;
  }

  .friend-person-actions .btn-ghost,
  .friend-person-actions .primary,
  .friend-card-actions .btn-ghost,
  .friend-card-actions .primary {
    flex: 1;
    justify-content: center;
  }
}



/* Admin — Pontos de cultura (formulário + mapa) */
.admin-pontos-layout {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 24px;
  align-items: start;
}

.territorio-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.territorio-panel h2 {
  margin-top: 0;
}

.territorio-status {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.territorio-status .primary {
  display: inline-flex;
  width: fit-content;
  text-decoration: none;
  align-items: center;
}

.territorio-status.is-ok {
  border-color: rgba(40, 167, 69, 0.35);
  background: linear-gradient(180deg, #f0fdf4, #fff);
}

.ficha-dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.ficha-dash-head h2 {
  margin: 0 0 6px;
}

.ficha-dash-badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ficha-dash-badge.is-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.ficha-dash-badge.is-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

.ficha-dash-form {
  display: grid;
  gap: 14px;
  max-width: 720px;
}

.ficha-dash-form .ficha-field {
  display: grid;
  gap: 6px;
}

.ficha-dash-form .ficha-field input,
.ficha-dash-form .ficha-field select,
.ficha-dash-form .ficha-field textarea {
  width: 100%;
}

.ficha-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.ficha-section h2,
.ficha-section h3,
.ficha-section h4 {
  margin: 0;
  font-size: 1.05rem;
}

.ficha-dash-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.ficha-alert-modal {
  max-width: 440px;
}

.admin-ficha-head {
  margin-bottom: 16px;
}

.admin-ficha-add {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-ficha-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-ficha-list {
  display: grid;
  gap: 12px;
}

.admin-ficha-item {
  display: grid;
  gap: 12px;
}

.admin-ficha-item-head {
  display: grid;
  gap: 2px;
}

.admin-ficha-item-controls {
  display: grid;
  gap: 8px;
}

@media (max-width: 800px) {
  .territorio-dual {
    grid-template-columns: 1fr;
  }

  .admin-ficha-add-grid {
    grid-template-columns: 1fr;
  }

  .ficha-dash-head {
    flex-direction: column;
  }
}

@media (max-width: 1000px) {
  .admin-pontos-layout {
    grid-template-columns: 1fr;
  }
}

.form-ponto .form-grid-ponto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.form-ponto .form-span-2 {
  grid-column: span 2;
}

.form-ponto label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.form-ponto input,
.form-ponto textarea,
.form-ponto select {
  width: 100%;
  font: inherit;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.map-admin-pontos {
  min-height: 320px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 8px 0 12px;
  overflow: hidden;
}

.map-admin-hint {
  margin: 16px 0 4px;
  font-size: 0.9rem;
}

.form-latlng {
  max-width: 420px;
}

.form-ponto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-gallery-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.admin-gallery-wrap h3 {
  margin-top: 0;
}

.admin-gal-row {
  justify-content: space-between;
  align-items: center;
}

.admin-gal-add {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 600px) {
  .admin-gal-add {
    grid-template-columns: 1fr 1fr;
  }

  .admin-gal-add #galCaption {
    grid-column: span 2;
  }

  .admin-gal-add #galAddBtn {
    grid-column: span 2;
    justify-self: start;
  }
}

.admin-ponto-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.event-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.event-moderation-box {
  padding: 14px;
  border: 1px solid #d9e2ea;
  background: #f7fafc;
}

/* ===== Config página de agentes ===== */
.agents-page-config-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.agents-page-config-head h2 {
  margin: 0 0 4px;
}

.agents-page-form {
  max-width: 720px;
}

.agents-page-fieldset {
  border: 1px solid #d9e2ea;
  border-radius: 12px;
  padding: 14px 16px 16px;
  margin: 0 0 16px;
  background: #fff;
}

.agents-page-fieldset legend {
  font-weight: 700;
  padding: 0 6px;
  color: #0b2f45;
}

.agents-page-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.agents-page-check input {
  width: auto !important;
  margin: 0;
}

.agents-page-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f7fafc;
  border: 1px dashed #c5d4e0;
}

.lgpd-policy-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.45;
  min-height: 220px;
}

.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}

.page-back-primary {
  background: #0d5c3d;
  border-color: #0d5c3d;
  color: #fff;
}

.page-back-secondary {
  background: #fff;
  border-color: #0d5c3d;
  color: #0d5c3d;
}

.page-back-outline {
  background: transparent;
  border-color: rgba(6, 31, 47, 0.22);
  color: #0b2f45;
}

.event-pending-card {
  border-color: #e6b800;
  box-shadow: 0 0 0 1px rgba(230, 184, 0, 0.25);
}

.small {
  font-size: 0.85rem;
}

/* Form builder (admin) */
.fb-root h2 {
  margin-top: 0;
}

.fb-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 16px;
}

.fb-layout--editing {
  grid-template-columns: 1fr;
}

.fb-layout--list .fb-main {
  display: none;
}

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

.fb-aside {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface-elevated, #fff);
}

.fb-create {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.fb-create h4,
.fb-aside h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.fb-form-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 52vh;
  overflow-y: auto;
}

.fb-form-pick {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  background: #f8fafc;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fb-form-pick:hover {
  border-color: var(--primary);
}

.fb-form-pick.is-active {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.fb-form-pick-title {
  font-weight: 700;
}

.fb-main {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-elevated, #fff);
  min-height: 320px;
}

.fb-detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.fb-detail-head h3 {
  margin: 0;
}

.fb-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fb-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.fb-subtab {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #f1f5f9;
}

.fb-subtab.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.fb-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}

.fb-palette-btn {
  font: inherit;
  font-size: 0.82rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.fb-palette-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.fb-aside-actions {
  margin-bottom: 12px;
}

.fb-aside-actions .primary {
  width: 100%;
}

.fb-builder {
  display: grid;
  grid-template-columns: minmax(160px, 200px) 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 800px) {
  .fb-builder {
    grid-template-columns: 1fr;
  }
}

.fb-palette-col h4,
.fb-canvas-col h4 {
  margin: 0 0 6px;
}

.fb-palette {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.fb-palette-btn {
  width: 100%;
  text-align: left;
  cursor: grab;
}

.fb-palette-btn:active {
  cursor: grabbing;
}

.fb-canvas {
  min-height: 280px;
  padding: 12px;
  border: 2px dashed #c5d3de;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fb-canvas.fb-canvas-hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.fb-canvas-empty {
  padding: 40px 16px;
  text-align: center;
  color: #64748b;
  font-size: 0.95rem;
}

.fb-canvas-item {
  background: #fff;
  border: 1px solid #d9e2ea;
  border-radius: 10px;
  overflow: hidden;
}

.fb-canvas-item.is-dragging {
  opacity: 0.55;
}

.fb-canvas-item.fb-drop-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.fb-canvas-item-bar {
  display: flex;
  align-items: stretch;
  gap: 4px;
  background: #f1f5f9;
}

.fb-drag-handle {
  display: grid;
  place-items: center;
  width: 28px;
  color: #94a3b8;
  cursor: grab;
  user-select: none;
}

.fb-canvas-summary {
  flex: 1;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 8px;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.fb-canvas-quick {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
}

.fb-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 999px;
}

.fb-file-controls {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.fb-advanced {
  margin-top: 4px;
}

.fb-advanced summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: #64748b;
}

.fb-preview-frame {
  display: grid;
  gap: 14px;
  max-width: 560px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.fb-preview-field {
  display: grid;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.fb-preview-field input,
.fb-preview-field textarea,
.fb-preview-field select {
  font: inherit;
  font-weight: 400;
}

.fb-preview-section h2,
.fb-preview-section h3,
.fb-preview-section h4 {
  margin: 4px 0;
}

.fb-preview-image img {
  max-width: 100%;
  border-radius: 8px;
}

.fb-field-card summary {
  cursor: pointer;
  padding: 4px 0;
}

.fb-field-edit {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.fb-field-edit label {
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
}

.fb-field-edit input[type="text"],
.fb-field-edit textarea {
  font: inherit;
  font-weight: 400;
}

.fb-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fb-settings-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.fb-settings-form h4 {
  margin: 16px 0 4px;
  font-size: 0.95rem;
}

.fb-settings-form h4:first-child {
  margin-top: 0;
}

.fb-sub-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.fb-sub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.fb-sub-table th,
.fb-sub-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.fb-sub-toolbar {
  margin-bottom: 8px;
}

.fb-pick-hint {
  margin: 0;
}


.notif-section {
  margin-bottom: 28px;
}
.notif-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.notif-section h3 {
  margin: 0 0 10px;
}
.notif-inbox {
  display: grid;
  gap: 8px;
}
.notif-inbox-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}
.notif-inbox-item.is-unread {
  border-color: rgba(40, 167, 69, 0.35);
  background: rgba(40, 167, 69, 0.06);
}
.notif-inbox-item .friend-avatar-wrap {
  width: 44px;
  height: 44px;
}
.notif-inbox-item strong {
  display: block;
  font-size: 0.92rem;
}
.notif-inbox-item p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.notif-inbox-item time {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ===== Home builder ===== */
.hb-shell {
  display: grid;
  gap: 18px;
}

.hb-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hb-top h2 {
  margin: 0 0 4px;
}

.hb-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hb-home-mode {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #355065;
}

.hb-home-mode select {
  min-width: 160px;
  border: 1px solid #c7d2dc;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.hb-mode-banner {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #b8d4e8;
  background: #eef6fb;
  color: #0b3d56;
  font-size: 0.92rem;
  line-height: 1.4;
}

.hb-login-look {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.hb-login-look-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.hb-login-look-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.hb-login-allow-reg {
  margin: 0 0 4px !important;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f3f8f5;
  border: 1px solid #d5e8dc;
  font-weight: 600 !important;
  color: #1a4a36 !important;
}

.hb-login-themes {
  margin: 0;
  padding: 0;
  border: none;
}

.hb-login-themes legend {
  padding: 0;
  margin: 0 0 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #355065;
}

.hb-login-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.hb-login-theme-card {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid #d5dee6;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-weight: 500 !important;
  color: inherit !important;
}

.hb-login-theme-card:hover {
  border-color: #9bb8c9;
}

.hb-login-theme-card.is-active {
  border-color: #1f8f4e;
  box-shadow: 0 0 0 3px rgba(31, 143, 78, 0.15);
}

.hb-login-theme-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.hb-login-theme-preview {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.hb-lt-img,
.hb-lt-form {
  display: block;
  height: 100%;
}

.hb-login-theme-preview--galeria .hb-lt-img { background: linear-gradient(135deg, #1a6b8a, #0d3d52); }
.hb-login-theme-preview--galeria .hb-lt-form { background: #f5f7f4; }

.hb-login-theme-preview--tela {
  border-radius: 0;
}
.hb-login-theme-preview--tela .hb-lt-img { background: linear-gradient(160deg, #2a8f6a, #0a4d6e); }
.hb-login-theme-preview--tela .hb-lt-form { background: #faf9f6; }

.hb-login-theme-preview--atelier {
  grid-template-columns: 1.4fr 0.8fr;
}
.hb-login-theme-preview--atelier .hb-lt-img { background: linear-gradient(120deg, #3d6b52, #1c3d32); }
.hb-login-theme-preview--atelier .hb-lt-form { background: #eef1ec; }

.hb-login-theme-preview--mare .hb-lt-img { background: linear-gradient(150deg, #0d8a6a, #046c7a); }
.hb-login-theme-preview--mare .hb-lt-form { background: #e8f5f2; }

.hb-login-theme-preview--porto {
  grid-template-columns: 0.9fr 1.1fr;
}
.hb-login-theme-preview--porto .hb-lt-img { background: linear-gradient(135deg, #4a5560, #1a222c); }
.hb-login-theme-preview--porto .hb-lt-form { background: #101820; }

.hb-login-theme-preview--noite {
  grid-template-columns: 1.35fr 0.85fr;
}
.hb-login-theme-preview--noite .hb-lt-img { background: linear-gradient(140deg, #1a4a5c, #06141c); }
.hb-login-theme-preview--noite .hb-lt-form { background: #0a121a; }

.hb-login-theme-meta {
  display: grid;
  gap: 2px;
}

.hb-login-theme-meta strong {
  font-size: 0.88rem;
  color: #0d2a38;
}

.hb-login-theme-meta span {
  font-size: 0.75rem;
  font-weight: 500;
  color: #5a7384;
  line-height: 1.35;
}

.hb-login-look-form label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #355065;
}

.hb-login-look-form select {
  border: 1px solid #c7d2dc;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
  max-width: 360px;
}

.hb-color-row,
.hb-media-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hb-color-row input[type="color"] {
  width: 42px;
  height: 36px;
  padding: 0;
  border: 1px solid #c7d2dc;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.hb-color-row input[type="text"],
.hb-media-row input[type="url"] {
  flex: 1;
  min-width: 160px;
  border: 1px solid #c7d2dc;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

.hb-login-look-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hb-page-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef6f1;
  color: #0d5c3d;
  font-size: 0.82rem;
  font-weight: 700;
}

.hb-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(320px, 1fr) minmax(240px, 300px);
  gap: 14px;
  align-items: start;
}

.hb-aside,
.hb-inspector,
.hb-canvas {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(6, 31, 47, 0.06));
}

.hb-aside,
.hb-inspector {
  padding: 14px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.hb-canvas {
  padding: 14px;
  min-height: 480px;
}

.hb-canvas-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.hb-canvas-head h3 {
  margin: 0;
  font-size: 1rem;
}

.hb-catalog h3,
.hb-inspector h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.hb-catalog-sec-title {
  margin-top: 18px !important;
}

.hb-catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hb-catalog-item {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 10px 6px;
  border: 1px dashed rgba(6, 31, 47, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc, #fff);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: grab;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  user-select: none;
}

.hb-catalog-item:active {
  cursor: grabbing;
}

.hb-catalog-item:hover {
  border-color: #28a745;
  background: #f0fdf4;
  transform: translateY(-1px);
}

.hb-catalog-item.is-dragging {
  opacity: 0.45;
  transform: scale(0.96);
}

.hb-catalog-item .lucide {
  width: 18px;
  height: 18px;
  color: #0d5c3d;
  pointer-events: none;
}

.hb-preset-list {
  display: grid;
  gap: 8px;
}

.hb-preset {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.hb-preset:hover {
  border-color: #28a745;
  background: #f8fffa;
}

.hb-preset .lucide {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #0d5c3d;
}

.hb-preset strong {
  display: block;
  font-size: 0.86rem;
}

.hb-preset small {
  display: block;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.hb-sections {
  display: grid;
  gap: 10px;
}

.hb-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfdfd, #fff);
  overflow: hidden;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.hb-section.is-selected {
  border-color: rgba(40, 167, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.12);
}

.hb-section.is-drop-target {
  border-color: #0d5c3d;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.22);
}

.hb-drop-hint {
  display: none;
  margin: 0 10px 10px;
  padding: 12px;
  border: 2px dashed #28a745;
  border-radius: 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0d5c3d;
  background: rgba(240, 253, 244, 0.9);
}

.hb-dragging .hb-section .hb-drop-hint {
  display: block;
}

.hb-section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.hb-section-titles {
  min-width: 0;
}

.hb-section-titles strong,
.hb-section-titles .muted {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-section-order,
.hb-block-head .hb-section-order {
  display: grid;
  gap: 4px;
}

.hb-icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.hb-icon-btn:hover:not(:disabled) {
  background: #f0fdf4;
  border-color: #28a745;
}

.hb-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.hb-section-toggle,
.hb-block-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 4px;
}

.hb-section-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0d5c3d;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hb-section-titles {
  flex: 1;
  min-width: 0;
}

.hb-section-titles strong,
.hb-block-toggle strong {
  display: block;
  font-size: 0.92rem;
}

.hb-section-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hb-chevron {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hb-section-body {
  border-top: 1px solid var(--border);
  padding: 12px;
  background: #f8fafc;
}

.hb-blocks {
  display: grid;
  gap: 8px;
}

.hb-block {
  border: 1px solid rgba(6, 31, 47, 0.12);
  border-radius: 12px;
  background: #fff;
}

.hb-block-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
}

.hb-block-toggle .lucide {
  width: 18px;
  height: 18px;
  color: #0d5c3d;
}

.hb-block-body {
  border-top: 1px solid var(--border);
  padding: 12px;
}

.hb-config-form {
  display: grid;
  gap: 10px;
}

.hb-grid-fields {
  display: grid;
  gap: 10px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.hb-grid-fields h4 {
  margin: 0;
  font-size: 0.88rem;
  color: #0f2f44;
}

.hb-config-form label {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
}

.hb-config-form label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.hb-config-form input,
.hb-config-form textarea,
.hb-config-form select {
  width: 100%;
  font: inherit;
  font-weight: 400;
}

.hb-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hb-spacing-fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 10px;
  display: grid;
  gap: 10px;
  background: #f8fafc;
}

.hb-spacing-fieldset legend {
  font-weight: 700;
  padding: 0 6px;
  color: #0b2f45;
}

.hb-spacing-custom {
  display: grid;
  gap: 8px;
}

.hb-spacing-custom.hidden {
  display: none;
}

/* ===== Editor do hero slider ===== */
.hb-slides-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 8px;
}

.hb-slides-head h4 {
  margin: 0;
}

.hb-slides-list {
  display: grid;
  gap: 12px;
}

.hb-slide {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.hb-slide-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.hb-slide-head .muted {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-slide-tools {
  display: flex;
  gap: 4px;
}

.hb-icon-danger {
  color: #b42318;
}

.hb-slide-body {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.hb-slide-media {
  display: grid;
  gap: 8px;
  align-content: start;
}

.hb-slide-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: #f8fafc center / cover no-repeat;
  display: grid;
  place-items: center;
}

.hb-slide-thumb.has-image {
  border-style: solid;
}

.hb-slide-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hb-slide-fields {
  display: grid;
  gap: 8px;
}

.hb-slide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

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

/* ===== Biblioteca de mídia ===== */
.hb-media-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 24, 35, 0.6);
  display: grid;
  place-items: center;
  padding: 20px;
}

.hb-media-modal {
  width: min(940px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px 20px;
  box-shadow: 0 24px 60px rgba(6, 24, 38, 0.35);
}

.hb-media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hb-media-head h3 {
  margin: 0;
}

.hb-media-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin: 12px 0;
}

.hb-media-toolbar label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
}

.hb-media-drop {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hb-media-drop.is-over {
  border-color: #0b6e4f;
  background: #ecfdf5;
  color: #0b6e4f;
}

.hb-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.hb-media-item {
  position: relative;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #f8fafc;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.hb-media-item:hover,
.hb-media-item:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(9, 32, 47, 0.16);
}

.hb-media-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.hb-media-item figcaption {
  padding: 6px 8px;
  display: grid;
  gap: 2px;
  font-size: 0.75rem;
}

.hb-media-item figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-media-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(180, 35, 24, 0.9);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.hb-empty,
.hb-empty-canvas,
.hb-panel-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 1200px) {
  .hb-layout {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  }

  .hb-inspector {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

@media (max-width: 1200px) {
  .hb-layout {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  }

  .hb-inspector {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

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

  .hb-aside,
  .hb-inspector {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .hb-section-head,
  .hb-block-head {
    grid-template-columns: auto 1fr;
  }

  .hb-section-actions {
    grid-column: 1 / -1;
  }
}

/* ===== Relatórios admin ===== */
.reports-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.reports-head h2 {
  margin: 0 0 4px;
}

.reports-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.report-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 2px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(6, 31, 47, 0.06));
}

.report-kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f2f44;
  line-height: 1.1;
}

.report-kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.report-kpi-hint {
  font-size: 0.75rem;
  color: #64748b;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.report-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(6, 31, 47, 0.06));
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.report-panel-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.report-panel-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f2f44;
}

.report-panel-body {
  padding: 12px 14px 14px;
  flex: 1;
}

.report-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.report-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
}

.report-bar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
}

.report-bar-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f2f44;
  flex-shrink: 0;
}

.report-bar-count small {
  font-weight: 500;
  color: #64748b;
}

.report-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.report-bar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #025d92, #0b6e4f);
  min-width: 4px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.report-table th,
.report-table td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid #eef2f6;
}

.report-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.report-table td:nth-child(2),
.report-table td:nth-child(3),
.report-table th:nth-child(2),
.report-table th:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}

.report-tables {
  margin-top: 8px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  background: #fff;
}

.report-tables summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f2f44;
  padding: 4px 0;
}

.report-grid-tables {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .reports-head {
    flex-direction: column;
  }

  .report-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ===== Campanhas ===== */
.cb-shell { display: grid; gap: 16px; }
.cb-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}
.cb-top h2 { margin: 8px 0 4px; }
.cb-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-channel-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cb-chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.cb-chip.is-on { background: #e8f5ef; color: #0b6e4f; border-color: #b7e0cb; }
.cb-chip.is-off { color: #94a3b8; }
.cb-list { display: grid; gap: 10px; }
.cb-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.cb-card-main { display: grid; gap: 4px; }
.cb-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cb-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  width: fit-content;
}
.cb-status-draft { background: #e2e8f0; }
.cb-status-sent { background: #dcfce7; color: #166534; }
.cb-status-sending { background: #fef3c7; color: #92400e; }
.cb-status-cancelled { background: #fee2e2; color: #991b1b; }
.cb-empty, .cb-empty-blocks {
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #f8fafc;
}
.cb-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(240px, 300px);
  gap: 14px;
  align-items: start;
}
.cb-aside, .cb-preview-pane, .cb-canvas {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.cb-aside h3, .cb-preview-pane h3 {
  margin: 0 0 10px;
  font-size: 0.88rem;
}
.cb-aside h3 + .cb-channels,
.cb-aside h3 + .cb-audience { margin-bottom: 16px; }
.cb-catalog {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}
.cb-catalog-item {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
}
.cb-catalog-item:hover { border-color: #025d92; background: #eff6ff; }
.cb-channels, .cb-audience {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.cb-meta-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cb-meta-form label, .cb-block-body label, .cb-audience label:not(.inline) {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
}
.cb-blocks { display: grid; gap: 10px; }
.cb-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfc;
}
.cb-block.is-open { background: #fff; }
.cb-block-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
}
.cb-block-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.cb-block-body {
  padding: 0 12px 12px;
  display: grid;
  gap: 8px;
}
.cb-block-tools { display: flex; gap: 8px; }
.cb-move { display: flex; flex-direction: column; gap: 2px; }
.cb-preview-frame {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc, #fff);
  padding: 16px;
  min-height: 280px;
}
.cb-preview-brand {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #025d92;
  margin-bottom: 10px;
}
.cb-prev-h {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #0f2f44;
}
.cb-prev-p {
  margin: 0 0 10px;
  color: #334155;
  line-height: 1.55;
  font-size: 0.92rem;
}
.cb-prev-img img {
  width: 100%;
  border-radius: 10px;
  display: block;
  margin: 8px 0;
}
.cb-prev-btn {
  display: inline-block;
  margin: 8px 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: #025d92;
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
}
.cb-prev-link { color: #0b6e4f; font-weight: 600; }
.cb-prev-hr { border: none; border-top: 1px solid #e2e8f0; margin: 12px 0; }
.cb-stats, .cb-sends {
  margin-top: 14px;
  font-size: 0.82rem;
}
.cb-sends ul {
  margin: 8px 0 0;
  padding-left: 16px;
  max-height: 200px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .cb-layout { grid-template-columns: 1fr; }
}

.site-sticky-chrome {
  position: sticky;
  top: 0;
  z-index: 10050;
  isolation: isolate;
}

.site-sticky-chrome .top {
  position: relative;
  top: auto;
  z-index: auto;
}
