@font-face {
  font-family: Inter;
  src: url(/fonts/Inter-Variable.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sidebar-width: 280px;
  --brand-navy: #2a2f86;
  --brand-blue: #2486d0;
  --brand-cyan: #45c7db;
  --brand-surface: #edf6ff;
  --sidebar-bg: linear-gradient(160deg, #22296f 0%, #246fbc 62%, #35b4da 100%);
  --sidebar-fg: #d9f0ff;
  --sidebar-active-bg: rgba(255, 255, 255, 0.2);
  --sidebar-active-fg: #f8fafc;
  --content-bg: #f4f8ff;
  --bs-primary: #2a2f86;
  --bs-primary-rgb: 42, 47, 134;
  --bs-link-color: #267fca;
  --bs-link-hover-color: #1f5eb0;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", "Helvetica Neue", sans-serif;
}

html {
  font-size: 15px;
}

.btn-primary {
  --bs-btn-bg: var(--brand-navy);
  --bs-btn-border-color: var(--brand-navy);
  --bs-btn-hover-bg: #21266f;
  --bs-btn-hover-border-color: #21266f;
  --bs-btn-active-bg: #1a205c;
  --bs-btn-active-border-color: #1a205c;
  --bs-btn-focus-shadow-rgb: 42, 47, 134;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-navy);
  --bs-btn-border-color: var(--brand-blue);
  --bs-btn-hover-bg: var(--brand-navy);
  --bs-btn-hover-border-color: var(--brand-navy);
  --bs-btn-active-bg: #1a205c;
  --bs-btn-active-border-color: #1a205c;
  --bs-btn-focus-shadow-rgb: 36, 134, 208;
}

.form-control:focus,
.form-select:focus {
  border-color: #8fd5ff;
  box-shadow: 0 0 0 0.2rem rgba(36, 134, 208, 0.16);
}

.app-shell {
  height: 100vh;
  display: flex;
  background: var(--content-bg);
  overflow: hidden;
}

.app-sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-right: 1px solid rgba(153, 219, 255, 0.3);
  overflow-y: auto;
}

.sidebar-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 0.5rem;
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 100%;
  text-decoration: none;
}

.sidebar-brand-logo {
  width: 100%;
  max-width: 210px;
  height: auto;
  object-fit: contain;
}

.sidebar-user {
  font-size: 0.9rem;
  color: rgba(237, 247, 255, 0.92);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-session {
  border-top: 1px solid rgba(217, 240, 255, 0.35);
  padding: 0.85rem 0.5rem 0;
}

.sidebar-session-title {
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.sidebar-select {
  background: rgba(16, 34, 75, 0.56);
  color: #f8fafc;
  border-color: rgba(216, 240, 255, 0.6);
}

.sidebar-select:focus {
  border-color: #8ce8ff;
  box-shadow: 0 0 0 0.2rem rgba(69, 199, 219, 0.28);
}

.sidebar-session-label {
  color: rgba(216, 240, 255, 0.82);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.sidebar-session-phone {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.88rem;
}

.sidebar-session-empty {
  color: rgba(216, 240, 255, 0.82);
  font-size: 0.84rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--sidebar-fg);
  text-decoration: none;
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
  font-weight: 500;
}

.sidebar-link i {
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-fg);
}

.sidebar-link.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.app-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-topbar {
  height: 64px;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  border-bottom: 1px solid #d9eaff;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-left {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.topbar-title {
  font-weight: 700;
  color: #1f2f86;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-title-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
}

.topbar-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.topbar-right {
  margin-left: auto;
  min-width: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.usage-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.usage-topbar-btn-label {
  font-size: 0.76rem;
  font-weight: 600;
}

.usage-topbar-menu {
  width: min(360px, 92vw);
  padding: 0;
  border-radius: 0.85rem;
  overflow: hidden;
}

.usage-topbar-head {
  padding: 0.64rem 0.72rem 0.52rem;
  border-bottom: 1px solid #e4eefc;
  background: linear-gradient(180deg, #f7fbff 0%, #eff7ff 100%);
}

.usage-topbar-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2b4c85;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.usage-topbar-period {
  display: inline-flex;
  align-items: baseline;
  gap: 0.36rem;
  color: #203a70;
  font-size: 0.84rem;
  font-weight: 600;
}

.usage-topbar-period small {
  color: #4f678f;
  font-size: 0.67rem;
  font-weight: 700;
}

.usage-topbar-items {
  display: grid;
  gap: 0.5rem;
  padding: 0.6rem 0.72rem 0.54rem;
}

.usage-topbar-item {
  border: 1px solid #eaf1fc;
  border-radius: 0.62rem;
  padding: 0.44rem 0.5rem;
  background: #ffffff;
}

.usage-topbar-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #2f4d84;
}

.usage-topbar-item-row strong {
  color: #1f3564;
  font-size: 0.8rem;
}

.usage-topbar-caption {
  margin-top: 0.12rem;
  font-size: 0.68rem;
  color: #5a6f95;
}

.usage-topbar-progress {
  margin-top: 0.34rem;
  height: 0.3rem;
  background: #e8f0fc;
}

.usage-topbar-progress-bar-ok {
  background: linear-gradient(90deg, #2cc6b1 0%, #26a5d5 100%);
}

.usage-topbar-progress-bar-warning {
  background: linear-gradient(90deg, #f5b74f 0%, #f0844f 100%);
}

.usage-topbar-progress-bar-danger {
  background: linear-gradient(90deg, #f07067 0%, #d33f4f 100%);
}

.usage-topbar-foot {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.5rem 0.72rem 0.62rem;
  border-top: 1px solid #e6effc;
  background: #f9fcff;
  font-size: 0.72rem;
  color: #38588f;
}

.usage-topbar-foot strong {
  color: #1f3564;
}

.user-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.2rem 0.42rem 0.2rem 0.2rem;
  border-radius: 999px;
}

.user-topbar-avatar {
  width: 1.56rem;
  height: 1.56rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2e6bd9 0%, #36a5de 100%);
  color: #ffffff;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.user-topbar-avatar-lg {
  width: 1.95rem;
  height: 1.95rem;
  font-size: 0.74rem;
}

.user-topbar-name {
  max-width: min(170px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  color: #1f355f;
  font-weight: 620;
}

.user-topbar-chevron {
  font-size: 0.67rem;
  color: #5f6e89;
}

.user-topbar-menu {
  width: min(300px, 92vw);
  padding: 0;
  border-radius: 0.85rem;
  overflow: hidden;
}

.user-topbar-head {
  padding: 0.62rem 0.72rem 0.52rem;
  border-bottom: 1px solid #e4eefc;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.user-topbar-head-main {
  display: flex;
  align-items: center;
  gap: 0.56rem;
}

.user-topbar-fullname {
  font-size: 0.84rem;
  color: #1e335f;
  font-weight: 700;
  line-height: 1.2;
}

.user-topbar-email {
  font-size: 0.72rem;
  color: #587099;
  line-height: 1.2;
  max-width: 208px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-topbar-subscription {
  padding: 0.54rem 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.44rem;
  border-bottom: 1px solid #eaf1fc;
}

.user-topbar-subscription span {
  font-size: 0.69rem;
  color: #5673a0;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.user-topbar-subscription .badge {
  max-width: 66%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-topbar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.46rem;
  padding: 0.62rem 0.72rem 0.72rem;
}

.user-topbar-actions .btn,
.user-topbar-actions form,
.user-topbar-actions form .btn {
  width: 100%;
}

.user-topbar-actions form {
  margin: 0;
}

.topbar-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  border: 1px solid #c8e7ff;
  border-radius: 0.62rem;
  background: linear-gradient(135deg, #eef7ff 0%, #e8fbff 100%);
  padding: 0.3rem 0.52rem;
  min-height: 2.2rem;
  max-width: min(350px, 42vw);
}

.topbar-session-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #45c7db 0%, #2486d0 100%);
  color: #ffffff;
  font-size: 0.85rem;
  flex-shrink: 0;
  overflow: hidden;
}

.topbar-session-icon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topbar-session-meta {
  min-width: 0;
  display: grid;
  gap: 0.02rem;
  line-height: 1.1;
}

.topbar-session-label {
  font-size: 0.62rem;
  color: #2f5fa0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topbar-session-value {
  font-size: 0.79rem;
  color: #1f2f86;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-session-phone {
  font-size: 0.72rem;
  color: #2f5fa0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.page-header {
  margin-bottom: 1rem;
}

.page-header p {
  margin-bottom: 0;
  color: #5f6f8f;
}

.contacts-import-card .card-body,
.contacts-panel-card .card-body {
  padding: 0.9rem 1rem;
}

.contacts-import-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  justify-content: center;
}

.contacts-import-actions-inline {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.contacts-import-file-btn,
.contacts-import-actions .btn {
  min-height: 2.35rem;
  border-radius: 0.72rem;
}

.contacts-import-file-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contacts-import-file-name {
  min-height: 1.25rem;
  font-size: 0.82rem;
  color: #5f6f8f;
  padding: 0 0.12rem;
}

.contacts-search-input {
  max-width: 240px;
}

.contacts-identity-filter {
  min-width: 220px;
}

.contacts-status-badge-phone {
  background: #f97316;
  color: #fff;
}

.contacts-table-row {
  cursor: pointer;
}

.contacts-right-sidebar {
  width: min(520px, 100vw);
}

.contacts-sidebar-identities {
  display: grid;
  gap: 0.4rem;
}

.contacts-sidebar-identity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #f8fafc;
}

.contacts-sidebar-tags-counter {
  color: #4a5a73;
  font-size: 0.76rem;
  font-weight: 600;
}

.contacts-sidebar-tags-counter.contacts-sidebar-tags-counter-active {
  color: #125784;
  background: #eaf6ff !important;
  border-color: #b7dcfa !important;
}

.contacts-sidebar-tags-panel {
  border: 1px solid #dbe8f6;
  border-radius: 0.72rem;
  background: linear-gradient(180deg, #fcfeff 0%, #f3f8ff 100%);
  padding: 0.65rem;
}

.contacts-sidebar-tags-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.contacts-sidebar-tags-toolbar .input-group {
  flex: 1 1 180px;
  min-width: 0;
}

.contacts-sidebar-tags-toolbar .input-group-text {
  color: #64748b;
  border-color: #d2deec;
  background: #ffffff;
}

.contacts-sidebar-tags-toolbar .form-control {
  border-color: #d2deec;
}

.contacts-sidebar-tags-toolbar .btn {
  min-width: 88px;
  border-radius: 0.55rem;
}

.contacts-sidebar-tags-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
  max-height: 270px;
  overflow: auto;
  padding-right: 0.1rem;
}

.contacts-sidebar-tags-grid::-webkit-scrollbar {
  width: 7px;
}

.contacts-sidebar-tags-grid::-webkit-scrollbar-thumb {
  background: #c8d8ea;
  border-radius: 999px;
}

.contacts-tag-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.58rem 0.45rem 1.95rem;
  border: 1px solid #d2deed;
  border-radius: 0.62rem;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.contacts-tag-option:hover {
  border-color: #9bc4e7;
  background: #f8fbff;
}

.contacts-tag-option:focus-within {
  border-color: #70b4e8;
  box-shadow: 0 0 0 0.2rem rgba(36, 134, 208, 0.15);
}

.contacts-tag-option.is-selected {
  border-color: #2486d0;
  background: #eaf5ff;
  box-shadow: inset 0 0 0 1px rgba(36, 134, 208, 0.16);
}

.contacts-tag-option-input {
  position: absolute;
  left: 0.66rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  opacity: 0;
  margin: 0;
  transform: translateY(-50%);
}

.contacts-tag-option-check {
  position: absolute;
  left: 0.66rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  border: 1.4px solid #afc4da;
  border-radius: 999px;
  background: #ffffff;
  color: #ffffff;
  font-size: 0.54rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translateY(-50%);
}

.contacts-tag-option.is-selected .contacts-tag-option-check {
  border-color: #2486d0;
  background: #2486d0;
}

.contacts-tag-option-label {
  display: block;
  font-size: 0.84rem;
  line-height: 1.18rem;
  color: #1e293b;
  word-break: break-word;
}

.contacts-import-preview-table-wrap {
  max-height: 55vh;
}

.segments-existing-contact-select {
  width: 100%;
}

#segmentEditMembersWrap .dataTables_wrapper .dataTables_filter input {
  min-width: 220px;
}

@media (max-width: 991.98px) {
  .contacts-import-actions-inline {
    justify-content: flex-start;
  }

  .contacts-identity-filter {
    min-width: 180px;
  }

  .contacts-right-sidebar {
    width: 100vw;
  }

  .contacts-sidebar-tags-grid {
    grid-template-columns: 1fr;
  }

  #segmentEditMembersWrap .dataTables_wrapper .dataTables_filter input {
    min-width: 0;
    width: 100%;
  }
}

.contacts-color-group .input-group-text {
  min-width: 56px;
  justify-content: center;
}

.contacts-color-input.form-control-color {
  width: 100%;
  height: calc(1.5em + 0.5rem + 2px);
  max-width: none;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.2rem 0.3rem;
}

.session-form-card .card-body {
  display: flex;
  flex-direction: column;
}

.session-form-head {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.session-hero-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #45c7db 0%, #2486d0 100%);
  color: #ffffff;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.session-hero-isotype {
  width: 1.58rem;
  height: 1.58rem;
  object-fit: contain;
  display: block;
}

.session-hero-icon.small {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
}

.session-name-counter {
  color: #64748b;
  font-size: 0.78rem;
}

.session-preview {
  background: #f2f8ff;
  border: 1px dashed #b9daf9;
  border-radius: 0.65rem;
  padding: 0.45rem 0.6rem;
  color: #334155;
  font-size: 0.86rem;
}

.session-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.session-checklist {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.session-checklist li {
  margin-bottom: 0.45rem;
}

.app-content.app-content--send {
  padding: 0.48rem;
}

.send-page {
  display: grid;
  gap: 0.72rem;
}

.send-hero {
  margin-bottom: 0;
}

.send-hero-session {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.send-hero-session-name {
  color: #1c4667;
  font-weight: 700;
}

.send-main-layout {
  display: block;
}

.send-main-stack {
  min-width: 0;
  display: grid;
  gap: 0.72rem;
}

.send-panel-card .card-body {
  padding: 0.95rem;
}

.send-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
  margin-bottom: 0.85rem;
}

.send-section-head.send-section-head-inline {
  margin-bottom: 0;
}

.send-step-chip {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: #156186;
  background: linear-gradient(145deg, #dff3fb 0%, #ecf8ff 100%);
  border: 1px solid rgba(109, 175, 210, 0.82);
}

.send-target-switch .btn {
  min-width: 124px;
  border-radius: 0.75rem;
}

.send-right-sidebar {
  border-left: 1px solid rgba(124, 170, 210, 0.58);
  background: rgba(255, 255, 255, 0.96);
}

.send-right-sidebar.offcanvas {
  width: min(440px, 96vw);
}

.send-right-sidebar .offcanvas-header {
  border-bottom: 1px solid rgba(142, 178, 210, 0.6);
  padding: 0.82rem 0.9rem;
}

.send-right-sidebar .offcanvas-body {
  padding: 0.72rem;
}

.send-right-sidebar-body {
  display: grid;
  gap: 0.72rem;
}

.send-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.44rem;
}

.send-action-grid .btn {
  width: 100%;
  min-height: 2.32rem;
}

.send-action-grid .btn-success {
  margin-top: 0.1rem;
}

.send-right-sidebar .send-progress-logs {
  max-height: 168px;
}

.send-right-sidebar .send-schedules-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #d6e4f2;
  border-radius: 0.72rem;
  padding: 0.15rem 0.25rem;
  background: #fdfefe;
}

.send-right-sidebar .send-schedules-table-wrap table {
  min-width: 720px;
}

.send-right-sidebar .send-schedules-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbff;
}

.send-file-stats {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  padding: 0.38rem 0.62rem;
  font-size: 0.86rem;
}

.send-records-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.send-records-table-wrap .dt-container {
  width: 100%;
  max-width: 100%;
}

.send-records-table-wrap .dt-layout-row {
  margin: 0.35rem 0 0;
  gap: 0.5rem;
}

.send-records-table-wrap table.dataTable {
  width: 100% !important;
}

.column-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.column-token-btn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 0.78rem;
}

.send-message-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.8rem;
  margin-bottom: 0.75rem;
  background: #ffffff;
}

.autoresponse-message-inactive {
  opacity: 0.75;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.send-select-col {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}

#sendRecordsTable .send-row-checkbox,
#sendSelectAllCheckbox {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px;
  margin: 0 !important;
  border-color: #c7d1df;
  vertical-align: middle;
  cursor: pointer;
  display: inline-block;
  flex: 0 0 16px;
}

#sendRecordsTable thead .send-select-col .send-row-checkbox,
#sendRecordsTable tbody .send-select-col .send-row-checkbox,
#sendSelectAllCheckbox {
  margin-top: 0 !important;
}

#sendRecordsTable tbody tr.selected-row {
  background: #e7f5ff;
}

.send-message-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.autoresponse-message-type {
  width: 150px;
}

.autoresponse-poll-options {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.autoresponse-poll-option {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #f8fafc;
  padding: 0.55rem;
}

.send-progress-logs {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.84rem;
  max-height: 180px;
  overflow-y: auto;
}

.send-confirm-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.send-confirm-grid dt {
  font-size: 0.76rem;
  color: #64748b;
}

.send-confirm-grid dd {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.send-preview-list {
  display: grid;
  gap: 0.6rem;
}

.send-preview-item {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0.65rem;
  padding: 0.62rem;
}

.send-preview-item-head {
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 0.32rem;
}

.send-preview-item-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: #0f172a;
}

.send-preview-item-meta {
  margin-top: 0.32rem;
  font-size: 0.76rem;
  color: #475569;
}

.send-schedule-notifications {
  display: grid;
  gap: 0.5rem;
}

.send-schedule-notification {
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 0.55rem;
  padding: 0.45rem 0.55rem;
}

.send-schedule-notification .title {
  display: block;
  font-weight: 600;
  color: #92400e;
}

.send-schedule-notification .meta {
  display: block;
  font-size: 0.75rem;
  color: #b45309;
  margin-top: 0.15rem;
}

.send-schedules-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.schedule-modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
}

.schedule-modal-header-clock {
  justify-self: center;
}

#scheduleModalClockBadge {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1 !important;
  font-weight: 600;
  font-size: 0.78rem;
}

#sendSchedulesModal .send-schedules-table-wrap {
  max-height: 56vh;
  overflow: auto;
  border: 1px solid #d6e4f2;
  border-radius: 0.72rem;
  padding: 0.2rem 0.25rem;
  background: #fdfefe;
}

#sendSchedulesModal .send-schedules-table-wrap table {
  min-width: 760px;
}

#sendSchedulesModal .send-schedules-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7fbff;
}

@media (max-width: 575.98px) {
  .app-content.app-content--send {
    padding: 0.38rem;
  }

  .send-right-sidebar.offcanvas {
    width: 100vw;
  }

  .schedule-modal-header {
    grid-template-columns: 1fr auto;
  }

  .schedule-modal-header-clock {
    grid-column: 1 / span 2;
    justify-self: start;
  }
}

#sendMessagesModal .modal-content {
  height: 100vh;
}

#sendMessagesModal .modal-body {
  overflow: hidden;
}

.send-editor-grid-modal {
  min-height: calc(100vh - 230px);
}

.send-editor-grid-modal .ar-editor-body {
  min-height: 0;
  overflow-y: auto;
}

#autoresponseForm .tagify {
  border-color: #ced4da;
  border-radius: 0.5rem;
  --tags-border-color: #cbd5e1;
  --tags-hover-border-color: #94a3b8;
  --tags-focus-border-color: #2a2f86;
  --tag-bg: #e2e8f0;
  --tag-text-color: #0f172a;
  --tag-hover: #cbd5e1;
  --tag-remove-btn-bg--hover: #ef4444;
}

#autoresponseForm .tagify__input {
  margin: 0.35rem 0.35rem 0.35rem 0.4rem;
  font-size: 0.92rem;
}

.wa-status-text {
  color: #475569;
  font-size: 0.95rem;
}

.wa-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.wa-status-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.6rem;
}

.wa-status-item dt {
  color: #64748b;
  font-size: 0.76rem;
  margin-bottom: 0.2rem;
}

.wa-status-item dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
  word-break: break-all;
}

.wa-sync-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.wa-sync-step {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0.65rem;
  padding: 0.52rem 0.72rem;
  font-size: 0.88rem;
  color: #475569;
}

.wa-sync-step.is-active {
  border-color: #9ed8ff;
  background: #e7f6ff;
  color: #1f4f99;
  font-weight: 600;
}

.wa-sync-step.is-done {
  border-color: #8fe1eb;
  background: #e8fbff;
  color: #14638a;
  font-weight: 600;
}

.qr-panel {
  display: flex;
  flex-direction: column;
}

.qr-placeholder {
  margin-top: 0.7rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f8fafc;
}

.qr-placeholder i {
  font-size: 1.7rem;
  color: #2486d0;
}

.qr-frame {
  border: 1px solid #dbe2ea;
  border-radius: 0.75rem;
  max-width: 360px;
  width: 100%;
  padding: 0.75rem;
  background: #fff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.82rem;
}

.status-pill.connected {
  background: #e8fbff;
  color: #11659f;
}

.status-pill.qr_required {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.reconnecting,
.status-pill.connecting {
  background: #e7f6ff;
  color: #1f4f99;
}

.status-pill.disconnected,
.status-pill.logged_out {
  background: #fee2e2;
  color: #991b1b;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.crud-table tbody tr {
  cursor: pointer;
}

.crud-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1040;
}

.crud-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -14px 0 28px rgba(15, 23, 42, 0.12);
  padding: 1rem;
  transform: translateX(102%);
  transition: transform 0.24s ease;
  z-index: 1045;
  overflow-y: auto;
}

.crud-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.crud-details {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.crud-details dt {
  color: #64748b;
  font-size: 0.82rem;
}

.crud-details dd {
  margin: 0;
  font-weight: 600;
}

body.crud-drawer-open .crud-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.crud-drawer-open .crud-drawer {
  transform: translateX(0);
}

.dt-buttons .btn {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 991.98px) {
  .app-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1035;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 1030;
  }

  .app-content {
    padding: 0.85rem 0.85rem;
  }

  .crud-drawer {
    width: 100vw;
  }

  .wa-status-grid {
    grid-template-columns: 1fr;
  }

  .send-confirm-grid {
    grid-template-columns: 1fr;
  }

  .topbar-session-pill {
    max-width: 240px;
  }

  .topbar-session-label,
  .topbar-session-phone {
    display: none;
  }
}

/* Modern UI Refresh */
:root {
  --ui-bg-1: #f4f8ff;
  --ui-bg-2: #e8f2ff;
  --ui-surface: rgba(255, 255, 255, 0.9);
  --ui-border: rgba(187, 210, 238, 0.75);
  --ui-ink: #1a2558;
  --ui-muted: #5f6f8f;
  --ui-shadow-sm: 0 10px 24px rgba(25, 45, 98, 0.08);
  --ui-shadow-md: 0 20px 42px rgba(20, 41, 86, 0.14);
  --ui-radius-lg: 1rem;
  --ui-radius-md: 0.8rem;
}

body.app-body {
  background:
    radial-gradient(1200px 540px at 15% -10%, rgba(69, 199, 219, 0.14), transparent 70%),
    radial-gradient(900px 460px at 100% 100%, rgba(42, 47, 134, 0.12), transparent 72%),
    linear-gradient(180deg, var(--ui-bg-1) 0%, var(--ui-bg-2) 100%);
  color: var(--ui-ink);
}

.app-sidebar {
  position: sticky;
  isolation: isolate;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.16), 8px 0 24px rgba(23, 44, 91, 0.14);
}

.app-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(280px 200px at 12% 0%, rgba(255, 255, 255, 0.16), transparent 70%),
    radial-gradient(360px 260px at 90% 100%, rgba(255, 255, 255, 0.12), transparent 72%);
  pointer-events: none;
}

.sidebar-head {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(230, 245, 255, 0.32);
}

.sidebar-brand-logo {
  max-width: 200px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2));
}

.sidebar-link {
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.sidebar-link:hover {
  transform: translateX(2px);
  border-color: rgba(224, 244, 255, 0.35);
}

.sidebar-link.active {
  border-color: rgba(229, 246, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 14px rgba(14, 31, 67, 0.2);
}

.app-topbar {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 15;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(24, 44, 92, 0.07);
}

.topbar-title {
  font-size: 1.06rem;
  letter-spacing: 0.014em;
}

.app-content {
  padding: 1.15rem 1.3rem 1.35rem;
}

.page-header {
  margin-bottom: 1.1rem;
}

.page-header h1,
.page-header .h4 {
  color: #1f2f86;
  letter-spacing: 0.01em;
}

.card {
  border: 1px solid var(--ui-border) !important;
  background: var(--ui-surface);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-sm);
  backdrop-filter: blur(6px);
}

.card .card-header {
  border-bottom: 1px solid rgba(191, 214, 241, 0.6);
  background: rgba(245, 251, 255, 0.78);
}

.card .card-body {
  position: relative;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: #304a87;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom-color: rgba(173, 199, 231, 0.72);
}

.table tbody td {
  border-color: rgba(195, 217, 243, 0.58);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: rgba(221, 239, 255, 0.54);
}

.form-control,
.form-select,
.input-group-text,
.btn {
  border-radius: 0.72rem;
}

.input-group-lg > .form-control,
.input-group-lg > .input-group-text,
.input-group-lg > .btn {
  border-radius: 0.82rem;
}

.form-control,
.form-select {
  border-color: rgba(164, 192, 228, 0.72);
  background-color: rgba(255, 255, 255, 0.92);
}

.form-text,
.text-secondary,
.small {
  color: var(--ui-muted) !important;
}

.alert {
  border-radius: 0.85rem;
  border: 1px solid rgba(182, 209, 240, 0.68);
  box-shadow: 0 8px 20px rgba(31, 56, 109, 0.07);
}

.status-pill {
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.send-message-card,
.send-preview-item,
.autoresponse-poll-option,
.wa-status-item,
.wa-sync-step,
.qr-frame,
.send-schedule-notification {
  border-color: rgba(183, 208, 236, 0.74);
  background: rgba(247, 252, 255, 0.88);
}

.qr-placeholder {
  border-color: rgba(169, 199, 233, 0.74);
  background: rgba(244, 251, 255, 0.92);
}

.crud-drawer {
  background: rgba(255, 255, 255, 0.96);
  border-left-color: rgba(176, 204, 235, 0.68);
  box-shadow: -18px 0 44px rgba(20, 39, 81, 0.18);
}

.app-footer,
.auth-footer {
  border-top: 1px solid rgba(182, 205, 232, 0.64);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(244, 250, 255, 0.92) 100%);
  backdrop-filter: blur(6px);
  padding: 0.58rem 1rem;
}

.app-footer-inner,
.auth-footer-inner {
  font-size: 0.84rem;
  color: #5f6f8f;
  text-align: center;
  letter-spacing: 0.01em;
}

.app-footer-inner strong,
.auth-footer-inner strong {
  color: #1f2f86;
}

@media (max-width: 991.98px) {
  .app-topbar {
    height: 64px;
  }

  .app-content {
    padding: 0.95rem 0.9rem 1.1rem;
  }

  .app-footer,
  .auth-footer {
    padding: 0.52rem 0.8rem;
  }
}

/* Mobile First Usability Overrides */
@media (max-width: 1199.98px) {
  .topbar-session-pill {
    max-width: 290px;
  }

  .page-header .h4,
  .page-header h1 {
    font-size: 1.16rem;
  }
}

@media (max-width: 991.98px) {
  .app-sidebar {
    width: min(86vw, 320px);
    flex: 0 0 min(86vw, 320px);
    padding: 1rem 0.82rem;
  }

  .sidebar-brand-logo {
    max-width: 172px;
  }

  .app-topbar {
    height: 60px;
    padding: 0 0.62rem;
    gap: 0.55rem;
  }

  .topbar-left {
    gap: 0.42rem;
  }

  .topbar-right {
    gap: 0.42rem;
  }

  .usage-topbar-btn-label {
    display: none;
  }

  .user-topbar-name {
    max-width: 108px;
  }

  .topbar-title {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
  }

  .topbar-session-pill {
    max-width: 190px;
    padding: 0.2rem 0.34rem;
    min-height: 1.95rem;
    border-radius: 0.55rem;
  }

  .topbar-session-icon {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 0.4rem;
  }

  .topbar-session-value {
    font-size: 0.71rem;
  }

  .topbar-session-label,
  .topbar-session-phone {
    display: none;
  }

  .app-content {
    padding: 0.72rem 0.66rem 0.92rem;
  }

  .page-header {
    margin-bottom: 0.8rem;
  }

  .page-header p {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .card {
    border-radius: 0.86rem;
  }

  .card .card-body,
  .card .card-header {
    padding: 0.82rem;
  }

  .table {
    font-size: 0.88rem;
  }

  .table thead th {
    font-size: 0.69rem;
  }

  .table-responsive {
    margin-bottom: 0;
  }

  .send-records-table-wrap,
  .send-schedules-table-wrap {
    border-radius: 0.72rem;
  }

  .btn {
    min-height: 42px;
  }

  .btn-sm {
    min-height: 36px;
  }

  .form-control,
  .form-select,
  .input-group-text {
    min-height: 42px;
    font-size: 0.95rem;
  }

  textarea.form-control {
    min-height: 92px;
  }

  .input-group {
    flex-wrap: nowrap;
  }

  .table-actions,
  .session-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .table-actions > *,
  .session-form-actions > *,
  .table-actions form,
  .session-form-actions form {
    width: 100%;
  }

  .table-actions .btn,
  .session-form-actions .btn {
    width: 100%;
  }

  .modal-dialog {
    margin: 0.6rem;
  }

  .modal-content {
    border-radius: 0.9rem;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 0.78rem;
  }

  .modal-footer {
    gap: 0.45rem;
  }

  .modal-footer .btn {
    flex: 1 1 0;
  }

  .crud-drawer {
    width: 100vw;
    padding: 0.86rem;
  }

  .crud-drawer-head {
    margin-bottom: 0.78rem;
  }

  .app-footer,
  .auth-footer {
    padding: 0.48rem 0.7rem;
  }

  .app-footer-inner,
  .auth-footer-inner {
    font-size: 0.76rem;
  }
}

@media (max-width: 767.98px) {
  .app-shell {
    min-height: 100dvh;
  }

  .app-main {
    min-height: 100dvh;
    height: auto;
  }

  .app-topbar {
    height: 56px;
  }

  .topbar-session-pill {
    display: none;
  }

  .topbar-right .btn {
    min-height: 32px;
    padding: 0.2rem 0.5rem;
    font-size: 0.77rem;
  }

  .user-topbar-btn {
    padding-right: 0.32rem;
  }

  .user-topbar-name {
    display: none;
  }

  .page-header {
    gap: 0.5rem !important;
  }

  .page-header .btn,
  .page-header a.btn {
    min-height: 40px;
    padding-left: 0.72rem;
    padding-right: 0.72rem;
    font-size: 0.86rem;
  }

  .badge {
    font-size: 0.72rem;
  }

  .status-pill {
    font-size: 0.74rem;
    padding: 0.27rem 0.56rem;
  }

  .dt-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }

  .dt-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .app-sidebar {
    width: min(90vw, 320px);
    flex: 0 0 min(90vw, 320px);
  }
}

@media (max-width: 575.98px) {
  .app-content {
    padding: 0.6rem 0.52rem 0.8rem;
  }

  .page-header .h4,
  .page-header h1 {
    font-size: 1.02rem;
  }

  .card .card-body,
  .card .card-header {
    padding: 0.72rem;
  }

  .form-label {
    margin-bottom: 0.3rem;
    font-size: 0.86rem;
  }

  .form-text {
    font-size: 0.75rem;
  }

  .btn {
    min-height: 40px;
    font-size: 0.9rem;
  }

  .btn-sm {
    min-height: 34px;
    font-size: 0.8rem;
  }

  .table {
    font-size: 0.83rem;
  }
}

/* Mobile Sidebar Hotfix (dist publish) */
@media (max-width: 991.98px) {
  .app-shell {
    display: block;
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .app-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1035;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 1030;
  }

  .app-main {
    width: 100%;
    min-width: 0;
  }
}

/* Sidebar session select contrast fix */
.app-sidebar .sidebar-select {
  color: #f2fbff !important;
  background: rgba(16, 34, 75, 0.62) !important;
  border-color: rgba(216, 240, 255, 0.66) !important;
}

.app-sidebar .sidebar-select:focus {
  color: #ffffff !important;
  background: rgba(12, 31, 68, 0.78) !important;
  border-color: #8ce8ff !important;
  box-shadow: 0 0 0 0.2rem rgba(69, 199, 219, 0.28) !important;
}

.app-sidebar .sidebar-select option {
  color: #16346b;
  background: #ffffff;
}

@media (max-width: 991.98px) {
  .app-sidebar .sidebar-select {
    background: rgba(13, 29, 64, 0.84) !important;
  }
}

/* =============================
   Autoresponses Experience UI
   ============================= */
.ar-page {
  --ar-bg-start: #f3f8fb;
  --ar-bg-end: #ebf4ff;
  --ar-surface: rgba(255, 255, 255, 0.88);
  --ar-border: rgba(154, 188, 219, 0.55);
  --ar-border-strong: rgba(124, 170, 210, 0.82);
  --ar-text: #162a43;
  --ar-muted: #51647d;
  --ar-accent: #0f7ea8;
  --ar-accent-soft: #d9effa;
  --ar-success: #0f766e;
  --ar-danger: #b42318;
  --ar-shadow-sm: 0 8px 22px rgba(20, 52, 92, 0.08);
  --ar-shadow-md: 0 18px 40px rgba(16, 44, 85, 0.13);
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--ar-text);
}

.ar-page .card {
  border: 1px solid var(--ar-border) !important;
  background: var(--ar-surface);
  box-shadow: var(--ar-shadow-sm);
  backdrop-filter: blur(8px);
}

.ar-page .form-control,
.ar-page .form-select,
.ar-page .input-group-text,
.ar-page .btn,
.ar-page .alert {
  border-radius: 0.82rem;
}

.ar-page .form-control,
.ar-page .form-select {
  border-color: var(--ar-border-strong);
}

.ar-page .form-control:focus,
.ar-page .form-select:focus {
  border-color: #5ea9d6;
  box-shadow: 0 0 0 0.2rem rgba(39, 136, 186, 0.16);
}

.ar-page .text-secondary,
.ar-page .form-text,
.ar-page .small {
  color: var(--ar-muted) !important;
}

.ar-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem;
  margin-bottom: 0.9rem;
  border-radius: 1rem;
  border: 1px solid var(--ar-border);
  background:
    radial-gradient(500px 220px at 0% -40%, rgba(69, 199, 219, 0.24), transparent 70%),
    radial-gradient(380px 200px at 100% 100%, rgba(15, 126, 168, 0.22), transparent 72%),
    linear-gradient(160deg, var(--ar-bg-start) 0%, var(--ar-bg-end) 100%);
  box-shadow: var(--ar-shadow-sm);
}

.ar-hero-main h1,
.ar-hero-main .h3 {
  letter-spacing: 0.01em;
  color: #13415f;
}

.ar-hero-main p {
  max-width: 760px;
}

.ar-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.ar-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}

.ar-kpi-card {
  border: 1px solid var(--ar-border);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0.9rem;
  padding: 0.78rem 0.85rem;
  box-shadow: var(--ar-shadow-sm);
}

.ar-kpi-label {
  font-size: 0.77rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #486683;
}

.ar-kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #143958;
  line-height: 1.15;
}

.ar-index-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.ar-rules-card .card-body {
  padding: 0.9rem;
}

.ar-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.ar-list-summary {
  font-size: 0.86rem;
  color: #4a627a;
  margin-bottom: 0.55rem;
}

.ar-filtered-empty,
.ar-empty-state {
  border: 1px dashed rgba(130, 168, 204, 0.8);
  background: rgba(247, 252, 255, 0.92);
  border-radius: 0.95rem;
  padding: 1rem;
  text-align: center;
}

.ar-empty-icon {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.85rem;
  margin: 0 auto 0.65rem;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: #136f95;
  background: #e4f5fd;
  border: 1px solid rgba(105, 174, 213, 0.65);
}

.ar-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.62rem;
}

.ar-rule-card {
  border: 1px solid var(--ar-border);
  border-radius: 0.92rem;
  padding: 0.76rem;
  background: rgba(252, 254, 255, 0.94);
  cursor: default;
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 122px;
  display: flex;
  flex-direction: column;
}

.ar-rule-card.is-busy {
  opacity: 0.75;
  pointer-events: none;
}

.ar-rule-card:hover {
  transform: translateY(-1px);
  border-color: rgba(73, 152, 201, 0.9);
  box-shadow: 0 10px 24px rgba(32, 73, 120, 0.12);
}

.ar-rule-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.ar-rule-title {
  font-weight: 750;
  line-height: 1.22;
  color: #123a59;
}

.ar-rule-meta {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ar-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: #355372;
  background: #e7f1f9;
  border: 1px solid rgba(127, 170, 205, 0.68);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.ar-rule-body {
  margin-top: 0.55rem;
  display: grid;
  gap: 0.3rem;
}

.ar-rule-line {
  font-size: 0.82rem;
  color: #324e69;
  line-height: 1.3;
}

.ar-rule-status-control {
  display: flex;
  align-items: center;
  gap: 0.36rem;
}

.ar-rule-switch-wrap {
  display: inline-flex;
  align-items: center;
}

.ar-rule-active-switch.form-check-input {
  margin: 0;
  width: 2.15rem;
  height: 1.18rem;
  background-color: #dc2626;
  border-color: #b91c1c;
  cursor: pointer;
}

.ar-rule-active-switch.form-check-input:checked {
  background-color: #16a34a;
  border-color: #15803d;
}

.ar-rule-active-switch.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.24);
}

.ar-rule-active-switch.form-check-input:not(:checked) {
  background-color: #dc2626;
  border-color: #b91c1c;
}

.ar-rule-active-switch.form-check-input:checked:focus {
  box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.22);
}

.ar-rule-foot {
  margin-top: auto;
  padding-top: 0.56rem;
  border-top: 1px dashed rgba(141, 177, 210, 0.72);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #4a647f;
}

.ar-rule-foot-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
}

.ar-rule-foot-meta i {
  color: #637892;
}

.ar-rule-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.ar-inline-delete-form {
  margin: 0;
}

.ar-icon-btn {
  width: 2.05rem;
  height: 2.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.95rem;
}

.ar-icon-btn i {
  pointer-events: none;
}

.ar-settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 26, 45, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1040;
}

.ar-settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(500px, 100vw);
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid var(--ar-border-strong);
  box-shadow: -22px 0 40px rgba(7, 31, 57, 0.22);
  transform: translateX(105%);
  transition: transform 0.22s ease;
  z-index: 1045;
  display: flex;
  flex-direction: column;
}

body.ar-settings-open .ar-settings-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.ar-settings-open .ar-settings-panel {
  transform: translateX(0);
}

.ar-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.95rem;
  border-bottom: 1px solid rgba(150, 184, 217, 0.54);
}

.ar-settings-form {
  flex: 1;
  overflow-y: auto;
  padding: 0.95rem;
  display: grid;
  gap: 0.95rem;
}

.ar-settings-group {
  display: grid;
  gap: 0.35rem;
}

.ar-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.ar-settings-footer {
  border-top: 1px solid rgba(150, 184, 217, 0.54);
  padding: 0.85rem 0.95rem;
  display: flex;
  justify-content: flex-end;
}

.ar-form-hero {
  margin-bottom: 0.7rem;
}

.ar-wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.ar-step-pill {
  appearance: none;
  border: 1px solid var(--ar-border-strong);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 0.8rem;
  min-height: 54px;
  padding: 0.4rem 0.55rem;
  display: flex;
  gap: 0.48rem;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  color: #264765;
  font-weight: 700;
  transition: all 0.16s ease;
}

.ar-step-pill:hover {
  border-color: #4b98c8;
  background: #f3fbff;
}

.ar-step-pill.is-active {
  border-color: #208dbc;
  background: linear-gradient(145deg, #e9f8ff 0%, #f7fcff 100%);
  box-shadow: 0 10px 22px rgba(22, 87, 134, 0.12);
}

.ar-step-pill.is-complete {
  border-color: #1c9e8a;
  background: #e8faf7;
  color: #11675b;
}

.ar-step-number {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  background: #dff1fb;
  color: #16688e;
}

.ar-step-pill.is-complete .ar-step-number {
  background: #d2f4ee;
  color: #0f6d5f;
}

.ar-step-text {
  font-size: 0.9rem;
}

.ar-wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr);
  gap: 0.78rem;
}

.ar-wizard-main {
  min-width: 0;
}

.ar-step-panel .card-body {
  padding: 0.9rem;
}

.ar-panel-title-wrap h2,
.ar-panel-title-wrap .h5 {
  color: #123b5b;
}

.ar-message-builder {
  border: 1px dashed rgba(136, 176, 211, 0.84);
  border-radius: 0.9rem;
  padding: 0.72rem;
  background: rgba(247, 252, 255, 0.88);
}

.ar-message-builder .send-message-card {
  border: 1px solid rgba(145, 182, 214, 0.82);
  border-radius: 0.84rem;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(23, 66, 108, 0.08);
}

.ar-message-builder .send-message-head {
  padding-bottom: 0.52rem;
  border-bottom: 1px dashed rgba(141, 179, 209, 0.6);
}

.ar-message-builder .autoresponse-poll-option {
  border-color: rgba(132, 172, 206, 0.75);
  background: rgba(246, 252, 255, 0.95);
}

.ar-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.ar-review-item {
  border: 1px solid rgba(143, 180, 212, 0.76);
  border-radius: 0.78rem;
  padding: 0.66rem 0.72rem;
  background: rgba(248, 253, 255, 0.95);
}

.ar-review-item h3,
.ar-review-item .h6 {
  margin-bottom: 0.34rem;
  color: #3a5876;
}

.ar-review-item p {
  color: #183754;
  font-weight: 640;
  word-break: break-word;
}

.ar-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ar-wizard-nav {
  margin-top: 0.66rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.ar-builder-sidebar {
  position: sticky;
  top: 82px;
  align-self: start;
}

.ar-builder-sidebar .card-body {
  padding: 0.9rem;
}

.ar-live-summary {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.ar-live-summary dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #637a92;
  margin-bottom: 0.08rem;
}

.ar-live-summary dd {
  margin: 0;
  font-weight: 720;
  color: #143653;
  word-break: break-word;
}

.ar-checklist {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  color: #3f5a75;
  font-size: 0.86rem;
}

@media (max-width: 1399.98px) {
  .ar-rule-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 1199.98px) {
  .ar-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ar-wizard-layout {
    grid-template-columns: 1fr;
  }

  .ar-builder-sidebar {
    position: static;
    top: auto;
  }

  .ar-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 991.98px) {
  .ar-hero {
    padding: 0.85rem;
    border-radius: 0.86rem;
    flex-direction: column;
  }

  .ar-kpi-card {
    padding: 0.65rem 0.7rem;
  }

  .ar-kpi-value {
    font-size: 1.25rem;
  }

  .ar-settings-panel {
    width: 100vw;
  }

  .ar-settings-head,
  .ar-settings-form,
  .ar-settings-footer {
    padding: 0.78rem;
  }

  .ar-settings-grid,
  .ar-review-grid {
    grid-template-columns: 1fr;
  }

  .ar-wizard-progress {
    grid-template-columns: 1fr;
  }

  .ar-step-pill {
    min-height: 50px;
  }
}

@media (max-width: 767.98px) {
  .ar-filters {
    grid-template-columns: 1fr;
  }

  .ar-wizard-nav,
  .ar-save-actions {
    flex-direction: column;
  }

  .ar-wizard-nav .btn,
  .ar-save-actions .btn,
  .ar-save-actions a.btn {
    width: 100%;
  }

  .ar-rule-card {
    padding: 0.66rem;
  }

  .ar-rule-foot {
    flex-direction: row;
    align-items: center;
  }

  .ar-rule-actions {
    margin-left: auto;
  }
}

/* Sidebar Refresh */
:root {
  --sidebar-width: 248px;
  --shell-header-height: 56px;
  --shell-divider-color: #dcdfe6;
}

.app-sidebar {
  gap: 0;
  padding: 0;
  background: #f4f5f7;
  color: #444f61;
  border-right: 1px solid var(--shell-divider-color);
  box-shadow: none;
}

.app-sidebar::before {
  display: none;
}

.app-topbar {
  height: var(--shell-header-height);
  min-height: var(--shell-header-height);
  border-bottom: 1px solid var(--shell-divider-color);
  background: #f4f5f7;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0 0.9rem;
}

.sidebar-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: var(--shell-header-height);
  padding: 0.7rem 0.68rem 0.72rem;
  border-bottom: 1px solid var(--shell-divider-color);
}

.sidebar-brand {
  width: auto;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.sidebar-brand-logo {
  max-width: 126px;
  width: 100%;
  filter: none;
}

.sidebar-brand-logo-isotype {
  display: none;
  max-width: 30px;
}

.sidebar-collapse-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid #cfd6e1;
  border-radius: 0.5rem;
  background: #f7f9fc;
  color: #687488;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.sidebar-collapse-toggle:hover {
  background: #eceff4;
  color: #2d3645;
  border-color: #ccd3dd;
}

.sidebar-collapse-toggle i {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.sidebar-user {
  display: none;
}

.sidebar-nav {
  padding: 0.45rem 0.5rem 0.9rem;
  gap: 0.18rem;
}

.sidebar-nav-section {
  margin: 0.52rem 0.22rem 0.18rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: #778295;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-link {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.6rem 0.62rem;
  color: #5f6877;
  font-weight: 520;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.sidebar-link i {
  width: 1.02rem;
  color: #6f7888;
  font-size: 0.9rem;
}

.sidebar-link:hover {
  transform: none;
  border: 0;
  background: #e9edf2;
  color: #2d3645;
}

.sidebar-link.active {
  border: 0;
  background: #e1e6ed;
  color: #1f2631;
  box-shadow: none;
}

.sidebar-link.active i {
  color: #1f2631;
}

.sidebar-session {
  margin-top: auto;
  border-top: 1px solid var(--shell-divider-color);
  background: #eff2f6;
  padding: 0.8rem 0.55rem;
}

.sidebar-session-form {
  margin: 0;
}

.sidebar-session-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid #d3d9e2;
  border-radius: 999px;
  background: #ffffff;
  padding: 0.32rem 0.5rem 0.32rem 0.35rem;
}

.sidebar-session-avatar {
  width: 29px;
  height: 29px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.82rem;
  color: #ffffff;
  background: linear-gradient(145deg, #7a39c4 0%, #5f2ea8 100%);
}

.sidebar-session-main {
  position: relative;
  min-width: 0;
  flex: 1;
}

.sidebar-session-main::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.7rem;
  color: #6f7888;
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.app-sidebar .sidebar-select {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1f2631 !important;
  padding: 0 1.05rem 0 0 !important;
  min-height: auto;
  height: auto;
  line-height: 1.2;
  font-size: 0.88rem;
  font-weight: 640;
}

.app-sidebar .sidebar-select:focus {
  border: 0 !important;
  box-shadow: none !important;
}

.app-sidebar .sidebar-select option {
  color: #1f2631;
  background: #ffffff;
}

.sidebar-session-empty {
  color: #637084;
  font-size: 0.84rem;
}

body.sidebar-collapsed .app-sidebar {
  width: 76px;
  flex: 0 0 76px;
}

body.sidebar-collapsed .sidebar-head {
  justify-content: center;
  padding-left: 0.32rem;
  padding-right: 0.32rem;
  gap: 0.2rem;
}

body.sidebar-collapsed .sidebar-brand {
  width: 100%;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-brand-logo-full {
  display: none;
}

body.sidebar-collapsed .sidebar-brand-logo-isotype {
  display: block;
  max-width: 22px;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
  display: none !important;
}

body.sidebar-collapsed .sidebar-collapse-toggle i {
  transform: none;
}

body.sidebar-collapsed .sidebar-nav {
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

body.sidebar-collapsed .sidebar-nav-section {
  display: none;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0.62rem 0.35rem;
}

body.sidebar-collapsed .sidebar-link span {
  display: none;
}

body.sidebar-collapsed .sidebar-link i {
  width: auto;
  font-size: 1rem;
}

body.sidebar-collapsed .sidebar-session {
  padding: 0.65rem 0.35rem;
}

body.sidebar-collapsed .sidebar-session-card {
  justify-content: center;
  border-radius: 999px;
  padding: 0.22rem;
}

body.sidebar-collapsed .sidebar-session-main,
body.sidebar-collapsed .sidebar-session-main::after {
  display: none;
}

body.sidebar-collapsed .sidebar-session-avatar {
  width: 31px;
  height: 31px;
}

body.sidebar-collapsed .sidebar-session-empty {
  display: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    width: min(86vw, 248px) !important;
    flex: 0 0 min(86vw, 248px) !important;
  }

  .sidebar-collapse-toggle {
    display: none !important;
  }

  body.sidebar-collapsed .sidebar-brand-logo-full {
    display: block;
  }

  body.sidebar-collapsed .sidebar-brand-logo-isotype {
    display: none;
  }

  body.sidebar-collapsed .sidebar-nav-section {
    display: block;
  }

  body.sidebar-collapsed .sidebar-link {
    justify-content: flex-start;
    padding: 0.6rem 0.62rem;
  }

  body.sidebar-collapsed .sidebar-link span {
    display: inline;
  }

  body.sidebar-collapsed .sidebar-session {
    padding: 0.8rem 0.55rem;
  }

  body.sidebar-collapsed .sidebar-session-card {
    justify-content: flex-start;
    border-radius: 999px;
    padding: 0.32rem 0.5rem 0.32rem 0.35rem;
  }

  body.sidebar-collapsed .sidebar-session-main {
    display: block;
  }

  body.sidebar-collapsed .sidebar-session-main::after {
    display: block;
  }

  body.sidebar-collapsed .sidebar-session-empty {
    display: block;
  }
}

/* Autoresponse Editor Layout */
.topbar-editor-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: min(760px, 100%);
  min-height: 32px;
}

.topbar-back-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
}

.topbar-rule-name-input {
  min-width: 240px;
  flex: 1;
  max-width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 0.7rem;
  line-height: 1.15;
  border-radius: 0.6rem;
  border-color: #ccd4e0;
  font-weight: 600;
  color: #233047;
}

.topbar-editor-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.topbar-icon-action {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
}

.app-content.app-content--autoresponse-editor {
  padding: 0.42rem;
}

.ar-form-page {
  margin: 0;
  padding: 0;
}

.ar-compact-alert {
  margin: 0 0 0.48rem;
  padding: 0.48rem 0.62rem;
}

.ar-editor-grid {
  display: grid;
  grid-template-columns: 20% 40% 40%;
  gap: 0.52rem;
  width: 100%;
  min-height: calc(100vh - 154px);
}

.ar-editor-col {
  min-width: 0;
}

.ar-editor-card {
  border-radius: 0.88rem;
  border: 1px solid #d8dfeb !important;
  background: #f8fafd;
  box-shadow: none;
}

.ar-editor-header {
  background: #f2f5fa;
  border-bottom: 1px solid #d8dfeb;
  min-height: 41px;
  display: flex;
  align-items: center;
}

.ar-editor-body {
  padding: 0.5rem;
  display: grid;
  gap: 0.5rem;
  align-content: flex-start;
}

.ar-event-tools-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
}

.ar-gear-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ar-keywords-wrap {
  display: grid;
  gap: 0.42rem;
}

.ar-keywords-wrap .tagify {
  border-color: #d0d7e2;
  border-radius: 0.65rem;
  min-height: 34px;
}

.ar-exact-wrap .form-check-label {
  font-size: 0.86rem;
  color: #3f4f67;
}

.ar-tools-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6a7688;
  font-weight: 700;
  margin-top: 0.1rem;
}

.ar-tools-list {
  display: grid;
  gap: 0.42rem;
}

.ar-tool-item {
  border: 1px solid #d4dce7 !important;
  border-radius: 0.8rem !important;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #2f3b4f;
  background: #f3f5f8;
}

.ar-tool-item:hover,
.ar-tool-item:focus {
  background: #e9edf3;
  color: #1e2738;
}

.ar-tool-item i {
  width: 1rem;
  text-align: center;
  color: #4c596d;
}

.ar-block-list {
  display: grid;
  gap: 0.42rem;
}

.ar-block-item {
  border: 1px solid #d4dce7 !important;
  border-radius: 0.8rem !important;
  background: #f3f5f8;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 0.48rem;
  min-height: 42px;
  padding: 0.4rem 0.52rem;
  text-align: left;
}

.ar-block-item.is-active {
  border-color: #8cb6d8 !important;
  background: #e9f3fb;
}

.ar-block-item.is-dragging {
  opacity: 0.65;
}

.ar-block-drag {
  color: #65758b;
  cursor: grab;
}

.ar-block-icon i {
  width: 0.95rem;
  text-align: center;
  color: #475a73;
}

.ar-block-meta {
  min-width: 0;
  display: grid;
  line-height: 1.05;
}

.ar-block-title {
  color: #29384e;
  font-weight: 650;
}

.ar-block-subtitle {
  color: #708097;
  font-size: 0.74rem;
}

.ar-block-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
}

.ar-block-delay {
  font-size: 0.72rem;
  color: #708097;
}

.ar-block-delete {
  color: #7a889c;
  cursor: pointer;
}

.ar-block-move {
  color: #6d7f96;
  cursor: pointer;
}

.ar-block-move:hover {
  color: #1f6fb3;
}

.ar-block-move.is-disabled {
  color: #b4becc;
  cursor: not-allowed;
}

.ar-block-delete:hover {
  color: #b42318;
}

.ar-editor-empty {
  border: 1px dashed #c5d0df;
  border-radius: 0.72rem;
  padding: 0.7rem;
  text-align: center;
  color: #62748e;
  font-size: 0.88rem;
  background: #f5f8fc;
}

.ar-editor-group {
  display: grid;
  gap: 0.28rem;
}

.ar-select-refresh-row {
  display: flex;
  align-items: stretch;
  gap: 0.34rem;
  min-width: 0;
}

.ar-select-refresh-row > .form-select {
  flex: 1 1 auto;
  min-width: 0;
}

.ar-select-refresh-row > .select2-container {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
}

.ar-label-refresh-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ar-editor-group .form-label {
  margin: 0;
  font-size: 0.79rem;
  color: #4d5f77;
}

.ar-editor-separator {
  border-color: rgba(195, 208, 225, 0.9);
  border-top-width: 1px;
  opacity: 1;
  width: calc(100% + 1rem);
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  margin-bottom: 0 !important;
}

.ar-file-chip-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
  border: 1px solid #d7deea;
  border-radius: 0.65rem;
  background: #f3f6fb;
  color: #2c3b51;
  max-width: 100%;
}

.ar-file-chip-icon {
  color: #4e6079;
}

.ar-file-chip-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.1;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-file-remove-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.ar-poll-options-wrap {
  display: grid;
  gap: 0.34rem;
}

.ar-poll-option-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.34rem;
}

.ar-form-actions {
  margin-top: 0.48rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

@media (max-width: 1399.98px) {
  .ar-editor-grid {
    grid-template-columns: 24% 38% 38%;
  }
}

@media (max-width: 1199.98px) {
  .app-content.app-content--autoresponse-editor {
    padding: 0.38rem;
  }

  .ar-editor-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ar-editor-col-right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991.98px) {
  .topbar-editor-shell {
    width: 100%;
  }

  .topbar-title-shell {
    width: 100%;
  }

  .topbar-rule-name-input {
    min-width: 0;
    width: 100%;
  }

  .topbar-editor-actions {
    gap: 0.25rem;
  }

  .app-content.app-content--autoresponse-editor {
    padding: 0.35rem;
  }

  .ar-editor-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ar-editor-col-right,
  .ar-editor-col-left,
  .ar-editor-col-middle {
    grid-column: auto;
  }
}

.ar-poll-option-config-btn.is-configured {
  border-color: #63a5d8;
  color: #1f5f95;
  background: #e8f3fc;
}

.ar-option-editor-dialog {
  width: calc(100vw - 1rem);
  max-width: calc(100vw - 1rem);
  margin: 0.5rem auto;
}

.ar-option-editor-content {
  min-height: calc(100vh - 1rem);
}

.ar-option-editor-modal .modal-body {
  overflow: hidden;
}

.ar-option-editor-modal-fullscreen .modal-content {
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.ar-option-editor-modal-fullscreen .modal-body {
  overflow: hidden;
}

.ar-option-route-row {
  margin-bottom: 0.48rem;
  padding: 0.44rem;
  border: 1px solid #d8dfeb;
  border-radius: 0.72rem;
  background: #f4f7fb;
}

.ar-editor-grid-option {
  min-height: calc(100vh - 9.6rem);
}

.ar-option-editor-modal-fullscreen .ar-editor-grid-option {
  min-height: calc(100vh - 13.4rem);
}

@media (max-width: 991.98px) {
  .ar-option-editor-dialog {
    width: calc(100vw - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    margin: 0.25rem auto;
  }

  .ar-option-editor-content {
    min-height: calc(100vh - 0.5rem);
  }

  .ar-editor-grid-option {
    min-height: auto;
  }
}

#toast-container > .toast {
  opacity: 1;
  box-shadow: 0 10px 28px rgba(15, 22, 38, 0.2);
}
