/* PulseBot v21.8.7 — clean rebuild for Tickets, Automated Messages and Statistics.
   Visual layer only: no field names, endpoints or runtime behavior changed. */

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) {
  --pbs-blue: #3b82f6;
  --pbs-blue-hover: #4b8cf5;
  --pbs-blue-soft: rgba(59,130,246,.085);
  --pbs-blue-line: rgba(59,130,246,.28);
  --pbs-bg: #090c11;
  --pbs-surface: #0d1117;
  --pbs-surface-2: #10151c;
  --pbs-line: rgba(255,255,255,.07);
  --pbs-line-strong: rgba(255,255,255,.12);
  --pbs-text: #edf1f7;
  --pbs-text-2: #c6cdd7;
  --pbs-muted: #8993a1;
  --pbs-soft: #646f7d;
  --pbs-danger: #e36c7b;
}

/* Shared page structure */
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .content-stack {
  width: 100% !important;
  max-width: 1180px !important;
  min-width: 0 !important;
  margin-inline: auto !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top {
  min-height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 0 0 20px !important;
  padding: 8px 2px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top-copy {
  min-width: 0 !important;
  gap: 12px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top-icon {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--pbs-line) !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.025) !important;
  color: #9eb6d9 !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top-icon svg {
  width: 17px !important;
  height: 17px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top h2 {
  margin: 0 !important;
  color: var(--pbs-text) !important;
  font-size: .92rem !important;
  font-weight: 600 !important;
  letter-spacing: -.012em !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top p,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top small {
  color: var(--pbs-soft) !important;
  font-size: .68rem !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .server-top .btn {
  min-height: 36px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border-color: var(--pbs-line-strong) !important;
  color: var(--pbs-text-2) !important;
  font-size: .78rem !important;
  box-shadow: none !important;
  transform: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .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-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-headline {
  min-height: 94px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  margin: 0 0 18px !important;
  padding: 16px 2px 22px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  background: transparent !important;
  box-shadow: none !important;
}

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

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-heading-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--pbs-line) !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.025) !important;
  color: #a9c6ed !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-heading-icon svg {
  width: 18px !important;
  height: 18px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-headline h2 {
  margin: 0 !important;
  color: var(--pbs-text) !important;
  font-size: 1.28rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -.026em !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-headline p {
  max-width: 760px !important;
  margin: 5px 0 0 !important;
  color: var(--pbs-muted) !important;
  font-size: .84rem !important;
  line-height: 1.52 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--pbs-muted) !important;
  font-size: .72rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-status::before {
  content: "" !important;
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #596270 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-status.on::before {
  background: #56b887 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-form {
  width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  gap: 0 !important;
  padding-bottom: 96px !important;
}

/* Flat sections instead of stacked AI-style cards */
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-form > .form-section,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-form > .module-panel-special {
  margin: 0 !important;
  padding: 25px 2px 28px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .form-section-head {
  min-width: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin: 0 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .form-section-head > div {
  min-width: 0 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .form-section-head h3 {
  margin: 0 !important;
  color: var(--pbs-text) !important;
  font-size: .98rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: -.014em !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .form-section-head p {
  max-width: 720px !important;
  margin: 5px 0 0 !important;
  color: var(--pbs-muted) !important;
  font-size: .79rem !important;
  line-height: 1.55 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .form-section-body {
  min-width: 0 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-grid {
  gap: 14px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .field {
  min-width: 0 !important;
  gap: 7px !important;
  margin: 13px 0 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .field > label {
  color: var(--pbs-text-2) !important;
  font-size: .78rem !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .field > small {
  color: var(--pbs-soft) !important;
  font-size: .72rem !important;
  line-height: 1.45 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) :is(.field input,.field select,.field textarea,.multi-picker-trigger) {
  min-height: 44px !important;
  border: 1px solid var(--pbs-line-strong) !important;
  border-radius: 8px !important;
  background: #0b0f15 !important;
  color: var(--pbs-text) !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .field textarea {
  min-height: 118px !important;
  resize: vertical !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) :is(.field input,.field select,.field textarea,.multi-picker-trigger):focus,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker.open .multi-picker-trigger {
  border-color: var(--pbs-blue) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(59,130,246,.10) !important;
}

/* Buttons */
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .btn {
  min-height: 38px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  transform: none !important;
  font-size: .8rem !important;
  font-weight: 550 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .btn-primary {
  border: 1px solid rgba(132,180,255,.32) !important;
  background: var(--pbs-blue) !important;
  color: #fff !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .btn-primary:hover {
  border-color: rgba(165,202,255,.42) !important;
  background: var(--pbs-blue-hover) !important;
  transform: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .btn-ghost {
  border-color: var(--pbs-line-strong) !important;
  background: transparent !important;
  color: var(--pbs-text-2) !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .btn-ghost:hover {
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.035) !important;
  transform: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .danger {
  color: #e78995 !important;
}

/* Checkboxes: compact and blue only */
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check-grid {
  gap: 9px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check {
  position: relative !important;
  min-height: 44px !important;
  display: grid !important;
  grid-template-columns: 15px minmax(0,1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 10px 12px !important;
  border: 1px solid var(--pbs-line) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.018) !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check > input[type="checkbox"] {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check-box {
  position: relative !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  border: 1px solid #4a5665 !important;
  border-radius: 3px !important;
  background: #0a0e14 !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check input:checked + .check-box,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check.is-checked .check-box {
  border-color: var(--pbs-blue) !important;
  background: var(--pbs-blue) !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check input:checked + .check-box::after,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check.is-checked .check-box::after {
  content: "" !important;
  position: absolute !important;
  left: 4px !important;
  top: 1px !important;
  width: 4px !important;
  height: 8px !important;
  border: solid #fff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .check-text {
  color: var(--pbs-text-2) !important;
  font-size: .8rem !important;
  font-weight: 450 !important;
  line-height: 1.35 !important;
}

/* Multi-select picker */
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker {
  border-radius: 9px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-menu {
  padding: 10px !important;
  border: 1px solid var(--pbs-line-strong) !important;
  border-radius: 10px !important;
  background: #0b0f15 !important;
  box-shadow: 0 18px 42px rgba(0,0,0,.42) !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-search {
  min-height: 42px !important;
  border: 1px solid var(--pbs-line-strong) !important;
  border-radius: 7px !important;
  background: #090d12 !important;
  color: var(--pbs-text) !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-option {
  position: relative !important;
  min-height: 40px !important;
  display: grid !important;
  grid-template-columns: 15px minmax(0,1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  margin: 4px 0 !important;
  padding: 9px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-option:hover {
  background: rgba(255,255,255,.025) !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-option.selected {
  border-color: var(--pbs-blue-line) !important;
  background: var(--pbs-blue-soft) !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-option input[type="checkbox"] {
  position: static !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  margin: 0 !important;
  border: 1px solid #4a5665 !important;
  border-radius: 3px !important;
  background: #090d12 !important;
  box-shadow: none !important;
  appearance: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-option input[type="checkbox"]:checked {
  border-color: var(--pbs-blue) !important;
  background-color: var(--pbs-blue) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 8.4 2.7 2.7 6.2-6.2' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 12px 12px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .multi-picker-actions {
  padding-top: 9px !important;
  border-top: 1px solid var(--pbs-line) !important;
}

/* Neutral supporting components */
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) :is(.notice-card,.empty-state,.empty-rules,.premium-lock-card) {
  border: 1px solid var(--pbs-line) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,.018) !important;
  color: var(--pbs-muted) !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .notice-card {
  padding: 15px 16px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .notice-card strong,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .premium-lock-card strong {
  color: var(--pbs-text-2) !important;
  font-weight: 550 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .notice-card p,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .premium-lock-card p {
  color: var(--pbs-muted) !important;
  line-height: 1.55 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) :is(.premium-inline-badge,.counter-pill) {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  margin-left: 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #79aaff !important;
  font-size: .64rem !important;
  font-weight: 600 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .plan-limit-label,
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .premium-limit-note {
  border: 0 !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-help {
  margin-top: 15px !important;
  padding: 14px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-help-head strong {
  color: var(--pbs-text-2) !important;
  font-size: .78rem !important;
  font-weight: 550 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-help-head span {
  color: var(--pbs-soft) !important;
  font-size: .7rem !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-grid {
  gap: 7px !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-chip {
  min-height: 42px !important;
  padding: 8px 10px !important;
  border: 1px solid var(--pbs-line) !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--pbs-text-2) !important;
  box-shadow: none !important;
  transform: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-chip:hover {
  border-color: var(--pbs-line-strong) !important;
  background: rgba(255,255,255,.025) !important;
  transform: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-chip code {
  color: #b9d1f6 !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .variable-chip span {
  color: var(--pbs-soft) !important;
}

/* Tickets */
body#pulsebot-app.dashboard-active-tickets .module-form-tickets > .form-section:first-of-type .form-section-body {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  gap: 0 18px !important;
}

body#pulsebot-app.dashboard-active-tickets .module-form-tickets > .form-section:first-of-type .variable-help {
  grid-column: 1 / -1 !important;
}

body#pulsebot-app.dashboard-active-tickets :is(.ticket-panel-card,.ticket-question-card,.message-list > article) {
  min-height: 62px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 13px 4px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app.dashboard-active-tickets .ticket-panel-card-copy {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
}

body#pulsebot-app.dashboard-active-tickets .premium-panel-index {
  min-width: 25px !important;
  color: var(--pbs-blue) !important;
  font-size: .68rem !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
}

body#pulsebot-app.dashboard-active-tickets .ticket-panel-card strong,
body#pulsebot-app.dashboard-active-tickets .ticket-question-card strong {
  color: var(--pbs-text-2) !important;
  font-size: .83rem !important;
  font-weight: 550 !important;
}

body#pulsebot-app.dashboard-active-tickets .ticket-panel-card small,
body#pulsebot-app.dashboard-active-tickets .ticket-question-card span {
  color: var(--pbs-soft) !important;
  font-size: .72rem !important;
}

body#pulsebot-app.dashboard-active-tickets .ticket-metrics-grid {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--pbs-line) !important;
  border-radius: 8px !important;
  background: transparent !important;
}

body#pulsebot-app.dashboard-active-tickets .ticket-metric {
  padding: 16px !important;
  border: 0 !important;
  border-left: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app.dashboard-active-tickets .ticket-metric:first-child {
  border-left: 0 !important;
}

body#pulsebot-app.dashboard-active-tickets .premium-workflow-grid {
  gap: 10px !important;
}

body#pulsebot-app.dashboard-active-tickets .premium-lock-card {
  display: grid !important;
  grid-template-columns: 36px minmax(0,1fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
  padding: 16px !important;
}

body#pulsebot-app.dashboard-active-tickets .premium-lock-icon {
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--pbs-line) !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #91b9f3 !important;
}

/* Automated messages */
body#pulsebot-app.dashboard-active-messages .messages-section {
  padding-top: 26px !important;
}

body#pulsebot-app.dashboard-active-messages .message-rule-list {
  display: grid !important;
  gap: 0 !important;
  border-top: 1px solid var(--pbs-line) !important;
}

body#pulsebot-app.dashboard-active-messages .message-rule-card {
  min-height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 13px 2px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body#pulsebot-app.dashboard-active-messages .message-rule-card:hover {
  border-color: var(--pbs-line) !important;
  background: rgba(255,255,255,.012) !important;
  transform: none !important;
}

body#pulsebot-app.dashboard-active-messages .message-rule-card > div:first-child {
  min-width: 0 !important;
}

body#pulsebot-app.dashboard-active-messages .message-rule-card strong {
  display: block !important;
  color: var(--pbs-text-2) !important;
  font-size: .84rem !important;
  font-weight: 550 !important;
}

body#pulsebot-app.dashboard-active-messages .message-rule-card span {
  display: block !important;
  margin-top: 4px !important;
  color: var(--pbs-soft) !important;
  font-size: .72rem !important;
}

body#pulsebot-app.dashboard-active-messages .message-rule-actions {
  flex: 0 0 auto !important;
  gap: 7px !important;
}

body#pulsebot-app.dashboard-active-messages .empty-rules {
  margin-top: 10px !important;
  padding: 14px !important;
  text-align: left !important;
}

body#pulsebot-app.dashboard-active-messages .message-editor {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app.dashboard-active-messages .message-editor::backdrop {
  background: rgba(0,0,0,.72) !important;
  backdrop-filter: blur(2px) !important;
}

body#pulsebot-app.dashboard-active-messages .message-editor-card {
  width: min(900px, calc(100vw - 28px)) !important;
  max-height: min(88vh, 900px) !important;
  overflow: auto !important;
  padding: 22px !important;
  border: 1px solid var(--pbs-line-strong) !important;
  border-radius: 12px !important;
  background: #0b0f15 !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.55) !important;
}

body#pulsebot-app.dashboard-active-messages .modal-head {
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--pbs-line) !important;
}

body#pulsebot-app.dashboard-active-messages .modal-close {
  border: 0 !important;
  background: transparent !important;
  color: var(--pbs-muted) !important;
}

body#pulsebot-app.dashboard-active-messages .message-editor-card > .savebar {
  position: static !important;
  margin-top: 18px !important;
  padding-top: 15px !important;
  border: 0 !important;
  border-top: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body#pulsebot-app.dashboard-active-messages :is(.embed-preview,.embed-editor-preview) {
  border: 1px solid var(--pbs-line) !important;
  border-radius: 8px !important;
  background: #090d12 !important;
  box-shadow: none !important;
}

/* Statistics */
body#pulsebot-app.dashboard-active-statistics .statistics-control {
  min-height: 74px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  padding: 14px 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--pbs-line) !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-control-main {
  min-width: 0 !important;
  gap: 12px !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-control-icon {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid var(--pbs-line) !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #9bbbe8 !important;
  box-shadow: none !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-control-icon svg {
  width: 17px !important;
  height: 17px !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-control strong {
  color: var(--pbs-text-2) !important;
  font-size: .83rem !important;
  font-weight: 550 !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-control p,
body#pulsebot-app.dashboard-active-statistics .statistics-control small {
  color: var(--pbs-soft) !important;
  font-size: .72rem !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rules {
  display: grid !important;
  gap: 0 !important;
  border-top: 1px solid var(--pbs-line) !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule {
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--pbs-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule[open] {
  border-color: var(--pbs-line) !important;
  background: transparent !important;
  box-shadow: none !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule > summary {
  min-height: 70px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 2px !important;
  background: transparent !important;
  list-style: none !important;
  cursor: pointer !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule > summary::-webkit-details-marker {
  display: none !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule > summary strong {
  display: block !important;
  color: var(--pbs-text-2) !important;
  font-size: .84rem !important;
  font-weight: 550 !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule > summary small {
  display: block !important;
  margin-top: 4px !important;
  color: var(--pbs-soft) !important;
  font-size: .72rem !important;
  line-height: 1.4 !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule > summary > span {
  width: 28px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--pbs-muted) !important;
  font-size: .82rem !important;
  transition: transform .15s ease !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule[open] > summary > span {
  transform: rotate(180deg) !important;
  color: var(--pbs-text-2) !important;
}

body#pulsebot-app.dashboard-active-statistics .statistics-rule .rule-options {
  display: grid !important;
  grid-template-columns: minmax(180px,.7fr) minmax(220px,1fr) minmax(260px,1.3fr) !important;
  gap: 14px !important;
  padding: 4px 2px 20px 18px !important;
  border-left: 2px solid rgba(59,130,246,.28) !important;
  background: transparent !important;
}

body#pulsebot-app.dashboard-active-statistics .stat-variable-help {
  margin-top: 18px !important;
}

/* Save control stays fixed and clean on these modules */
body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-form > .module-savebar {
  position: fixed !important;
  inset: auto 22px 22px auto !important;
  z-index: 980 !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-form > .module-savebar > .notice {
  display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
  body#pulsebot-app.dashboard-active-tickets .module-form-tickets > .form-section:first-of-type .form-section-body {
    grid-template-columns: 1fr !important;
  }

  body#pulsebot-app.dashboard-active-statistics .statistics-rule .rule-options {
    grid-template-columns: 1fr !important;
  }

  body#pulsebot-app.dashboard-active-tickets .premium-lock-card {
    grid-template-columns: 34px minmax(0,1fr) !important;
  }

  body#pulsebot-app.dashboard-active-tickets .premium-lock-card .btn {
    grid-column: 1 / -1 !important;
    justify-self: start !important;
  }
}

@media (max-width: 680px) {
  body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-headline,
  body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .form-section-head,
  body#pulsebot-app.dashboard-active-statistics .statistics-control {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body#pulsebot-app.dashboard-active-messages .message-rule-card,
  body#pulsebot-app.dashboard-active-tickets :is(.ticket-panel-card,.ticket-question-card,.message-list > article) {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body#pulsebot-app.dashboard-active-messages .message-rule-actions,
  body#pulsebot-app.dashboard-active-tickets .ticket-panel-card-actions {
    width: 100% !important;
  }

  body#pulsebot-app.dashboard-active-messages .message-rule-actions .btn,
  body#pulsebot-app.dashboard-active-tickets .ticket-panel-card-actions .btn {
    flex: 1 1 auto !important;
  }

  body#pulsebot-app.dashboard-active-tickets .ticket-metrics-grid {
    grid-template-columns: 1fr !important;
  }

  body#pulsebot-app.dashboard-active-tickets .ticket-metric {
    border-left: 0 !important;
    border-top: 1px solid var(--pbs-line) !important;
  }

  body#pulsebot-app.dashboard-active-tickets .ticket-metric:first-child {
    border-top: 0 !important;
  }

  body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) .module-form > .module-savebar {
    inset: auto 12px 12px auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body#pulsebot-app:is(.dashboard-active-tickets,.dashboard-active-messages,.dashboard-active-statistics) * {
    transition: none !important;
  }
}
