/* PulseBot v22.0.12 — final layout-only cleanup.
   Scope:
   1) Community modules use the exact same page rhythm as Activity / Levels.
   2) Tool modules no longer render a second visual heading beneath the shared module header.
   No controls, logic or runtime behavior are changed here. */

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) {
  --pbcl-blue: #3b82f6;
  --pbcl-blue-soft: rgba(59,130,246,.075);
  --pbcl-blue-line: rgba(59,130,246,.28);
  --pbcl-surface: #0e1218;
  --pbcl-surface-head: #10151c;
  --pbcl-input: #090d12;
  --pbcl-line: rgba(255,255,255,.075);
  --pbcl-line-strong: rgba(255,255,255,.12);
  --pbcl-text: #edf1f7;
  --pbcl-text-2: #c8d0db;
  --pbcl-muted: #8d97a5;
  --pbcl-soft: #65707e;
}

/* Exact page width and vertical rhythm used by Activity / Levels. */
body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .content-stack {
  min-width: 0 !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  gap: 18px !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .server-top {
  min-height: 66px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 10px 4px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbcl-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .server-top-icon {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--pbcl-line) !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.025) !important;
  color: #aac8f8 !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .server-top h2 {
  margin: 0 !important;
  color: var(--pbcl-text) !important;
  font-size: .92rem !important;
  font-weight: 600 !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .server-top :is(p,small) {
  color: var(--pbcl-soft) !important;
  font-size: .68rem !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .server-top .btn {
  min-height: 36px !important;
  border-radius: 9px !important;
  border-color: var(--pbcl-line-strong) !important;
  background: transparent !important;
  color: var(--pbcl-text-2) !important;
  box-shadow: none !important;
  transform: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-panel {
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-headline {
  min-height: 82px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin: 0 0 16px !important;
  padding: 14px 2px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbcl-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-heading-copy {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-headline h2 {
  margin: 0 0 4px !important;
  color: var(--pbcl-text) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: -.015em !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-headline :is(p,.notice) {
  margin: 0 !important;
  color: var(--pbcl-muted) !important;
  font-size: .78rem !important;
  line-height: 1.5 !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-status {
  min-height: 28px !important;
  padding: 0 10px !important;
  border: 1px solid var(--pbcl-line-strong) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--pbcl-muted) !important;
  font-size: .69rem !important;
  font-weight: 550 !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-status.on {
  border-color: var(--pbcl-blue-line) !important;
  background: var(--pbcl-blue-soft) !important;
  color: #a9c9ff !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-form {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  gap: 16px !important;
  margin: 0 !important;
  padding-bottom: 96px !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-panel-special {
  margin: 0 !important;
  padding: 14px 16px !important;
  border: 0 !important;
  border-left: 2px solid var(--pbcl-blue) !important;
  border-radius: 0 9px 9px 0 !important;
  background: rgba(255,255,255,.018) !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-panel-special h2 {
  margin: 0 0 4px !important;
  color: var(--pbcl-text) !important;
  font-size: .9rem !important;
  font-weight: 600 !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-panel-special p {
  margin: 0 !important;
  color: var(--pbcl-muted) !important;
  font-size: .76rem !important;
  line-height: 1.5 !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) :is(.module-form > .form-section,.selfrole-section) {
  overflow: hidden !important;
  margin: 0 !important;
  border: 1px solid var(--pbcl-line) !important;
  border-radius: 12px !important;
  background: var(--pbcl-surface) !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .form-section-head {
  min-height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 13px 16px !important;
  border-bottom: 1px solid var(--pbcl-line) !important;
  background: var(--pbcl-surface-head) !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .form-section-body {
  padding: 17px !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .field {
  min-width: 0 !important;
  margin: 0 0 13px !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .field:last-child {
  margin-bottom: 0 !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .field > label {
  margin-bottom: 7px !important;
  color: var(--pbcl-text-2) !important;
  font-size: .76rem !important;
  font-weight: 550 !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .field > small {
  margin-top: 7px !important;
  color: var(--pbcl-soft) !important;
  font-size: .69rem !important;
  line-height: 1.45 !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea,.multi-picker-trigger) {
  min-height: 44px !important;
  border: 1px solid var(--pbcl-line-strong) !important;
  border-radius: 8px !important;
  background: var(--pbcl-input) !important;
  color: var(--pbcl-text) !important;
  box-shadow: none !important;
  outline: none !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) textarea {
  min-height: 130px !important;
  resize: vertical !important;
}

body#pulsebot-app:is(
  .dashboard-active-welcome,
  .dashboard-active-goodbye,
  .dashboard-active-selfrole,
  .dashboard-active-boosts,
  .dashboard-active-suggestions
) .module-grid {
  gap: 14px !important;
}

/* Clean up spacing left after removing duplicate inner headings in tool modules. */
body#pulsebot-app:is(
  .dashboard-active-identity,
  .dashboard-active-backups,
  .dashboard-active-sticky,
  .dashboard-active-other
) .tool-module > :first-child,
body#pulsebot-app:is(
  .dashboard-active-identity,
  .dashboard-active-backups
) .module-panel > :first-child {
  margin-top: 0 !important;
}

body#pulsebot-app:is(.dashboard-active-identity,.dashboard-active-backups) .tool-module {
  padding-top: 0 !important;
}

@media (max-width: 720px) {
  body#pulsebot-app:is(
    .dashboard-active-welcome,
    .dashboard-active-goodbye,
    .dashboard-active-selfrole,
    .dashboard-active-boosts,
    .dashboard-active-suggestions
  ) .content-stack {
    gap: 16px !important;
  }

  body#pulsebot-app:is(
    .dashboard-active-welcome,
    .dashboard-active-goodbye,
    .dashboard-active-selfrole,
    .dashboard-active-boosts,
    .dashboard-active-suggestions
  ) .module-headline {
    min-height: 0 !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
    padding: 14px 0 18px !important;
  }
}
