@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;
}

.send-topbar-progress {
  width: min(30vw, 300px);
  min-width: 210px;
  max-width: 300px;
  flex: 0 1 300px;
}

.send-topbar-progress-track {
  position: relative;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(86, 113, 151, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, #edf3fb 0%, #dfe8f4 100%);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.send-topbar-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  min-width: 2.25rem;
  border-radius: inherit;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.24) 0 12%, transparent 12% 24%) 0 0 / 22px 22px,
    linear-gradient(90deg, #0ea5e9 0%, #22c55e 100%);
  transition: width 0.28s ease, background 0.2s ease;
}

.send-topbar-progress-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.72rem;
  color: #0f2537;
  font-size: 0.72rem;
  font-weight: 750;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.send-topbar-progress-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.send-topbar-progress-percent {
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.send-topbar-progress.is-running .send-topbar-progress-bar {
  animation: send-progress-stripes 1s linear infinite;
}

.send-topbar-progress.is-complete .send-topbar-progress-bar {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.send-topbar-progress.is-failed .send-topbar-progress-bar {
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

@keyframes send-progress-stripes {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 44px 0, 0 0;
  }
}

.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-subscription-trigger {
  cursor: pointer;
}

.user-topbar-subscription-details {
  padding: 0.52rem 0.72rem 0.58rem;
  display: grid;
  gap: 0.36rem;
  border-bottom: 1px solid #eaf1fc;
  background: #f9fbff;
}

.user-topbar-subscription-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.user-topbar-subscription-row span {
  font-size: 0.72rem;
  color: #58739d;
}

.user-topbar-subscription-row strong {
  font-size: 0.73rem;
  color: #1f3564;
  font-weight: 700;
  max-width: 66%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-topbar-subscription-link {
  font-size: 0.72rem;
  color: #2563eb;
  font-weight: 650;
  text-decoration: none;
}

.user-topbar-subscription-link:hover {
  text-decoration: underline;
}

.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;
}

.subscription-detail-modal {
  background: #ffffff;
  border-radius: 0.9rem;
  overflow: hidden;
}

.subscription-detail-current-plan {
  padding: 0.62rem 0.72rem;
  border: 1px solid #dce9fb;
  border-radius: 0.72rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  margin-bottom: 0.72rem;
}

.subscription-detail-current-plan span {
  font-size: 0.68rem;
  color: #56739f;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.16rem;
}

.subscription-detail-current-plan strong {
  font-size: 0.92rem;
  color: #1f3564;
}

.subscription-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.72rem;
}

.subscription-detail-item {
  border: 1px solid #e6eefb;
  border-radius: 0.62rem;
  background: #fbfdff;
  padding: 0.48rem 0.56rem;
}

.subscription-detail-item span {
  font-size: 0.69rem;
  color: #5c759f;
  display: block;
  margin-bottom: 0.12rem;
}

.subscription-detail-item strong {
  font-size: 0.75rem;
  color: #1f3564;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-detail-features-head {
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  color: #23406f;
  font-weight: 700;
}

.subscription-detail-features-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.72rem;
}

.subscription-detail-feature-item {
  border: 1px solid #e7effb;
  border-radius: 0.58rem;
  background: #fbfdff;
  padding: 0.38rem 0.5rem;
}

.subscription-detail-feature-label {
  font-size: 0.72rem;
  color: #1f3564;
  font-weight: 650;
}

.subscription-detail-feature-limit {
  margin-top: 0.12rem;
  font-size: 0.67rem;
  color: #5f79a2;
}

.subscription-detail-usage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.44rem;
}

.subscription-detail-usage-head span {
  font-size: 0.75rem;
  color: #23406f;
  font-weight: 700;
}

.subscription-detail-usage-head small {
  font-size: 0.68rem;
  color: #5d749c;
}

.subscription-detail-usage-list {
  display: grid;
  gap: 0.45rem;
}

.subscription-detail-usage-item {
  border: 1px solid #e8f0fc;
  border-radius: 0.6rem;
  background: #fbfdff;
  padding: 0.45rem 0.5rem;
}

.subscription-detail-usage-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
}

.subscription-detail-usage-row span {
  font-size: 0.72rem;
  color: #5c759e;
}

.subscription-detail-usage-row strong {
  font-size: 0.74rem;
  color: #1e3666;
}

.subscription-detail-usage-caption {
  margin-top: 0.2rem;
  font-size: 0.67rem;
  color: #6d82a6;
}

.subscription-detail-progress {
  height: 0.34rem;
  margin-top: 0.28rem;
  background-color: #e8eef8;
}

.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-table-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 0.6rem;
}

.contacts-table-filter {
  display: grid;
  gap: 0.2rem;
}

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

.contacts-consent-filter {
  min-width: 150px;
}

.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-custom-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.contacts-custom-field {
  min-width: 0;
}

.contacts-import-section {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.9rem;
}

.contacts-import-mapping-grid {
  display: grid;
  gap: 0.55rem;
}

.contacts-import-mapping-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(210px, 1fr) minmax(220px, 1fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem;
  border: 1px solid #dbe3ed;
  border-radius: 0.5rem;
  background: #fff;
}

.contacts-import-source {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.contacts-import-source strong,
.contacts-import-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-import-source span {
  color: #64748b;
  font-size: 0.78rem;
}

.contacts-import-custom-config {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, 0.7fr);
  gap: 0.45rem;
}

.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-table-filters {
    width: 100%;
    justify-content: flex-start;
  }

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

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

  .products-catalog-sidebar {
    width: 100vw;
  }

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

  .contacts-import-mapping-row {
    grid-template-columns: 1fr;
  }

  .contacts-custom-fields-grid {
    grid-template-columns: 1fr;
  }

  .catalog-public-hero {
    padding: 0.82rem;
  }

  .catalog-public-brand {
    width: 100%;
    flex-wrap: wrap;
  }

  .catalog-public-brand-logo {
    max-width: 180px;
    max-height: 52px;
  }

  .catalog-public-hero-meta {
    width: 100%;
    justify-content: flex-start;
  }

  #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;
}

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

.products-catalog-preview {
  border: 1px solid #dbe8f6;
  border-radius: 0.72rem;
  background: linear-gradient(180deg, #fcfeff 0%, #f3f8ff 100%);
  padding: 0.72rem;
}

.products-catalog-preview-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  border: 1px dashed #b8d0ea;
  border-radius: 0.62rem;
  background: #ffffff;
  margin-bottom: 0.62rem;
}

.products-catalog-preview-logo {
  max-width: 220px;
  width: auto;
  max-height: 64px;
  object-fit: contain;
}

.products-catalog-preview-logo-fallback {
  font-size: 0.86rem;
  color: #60728f;
  font-weight: 600;
}

#catalogPreviewPrimaryBtn,
#catalogPreviewSecondaryBtn {
  min-height: 34px;
  border-width: 1px;
}

.products-form-blocks-head {
  border-top: 1px solid rgba(187, 210, 238, 0.72);
  padding-top: 0.82rem;
}

.products-product-image-preview-wrap {
  border: 1px solid #dbe8f6;
  border-radius: 0.72rem;
  padding: 0.48rem;
  background: #f8fbff;
}

.products-product-image-preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 0.5rem;
  background: #ffffff;
}

.products-block-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.products-block-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid rgba(187, 210, 238, 0.74);
  border-radius: 0.72rem;
  padding: 0.42rem 0.6rem;
  background: #f9fcff;
}

.products-block-summary-order {
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(159, 195, 231, 0.78);
  background: #eaf4ff;
  color: #2f5f9b;
  font-weight: 600;
  font-size: 0.8rem;
}

.products-block-summary-type {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin-right: auto;
  font-weight: 600;
}

.products-blocks-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.products-block-empty {
  background: #fbfdff;
}

.products-block-card {
  border: 1px solid rgba(187, 210, 238, 0.74) !important;
}

.products-block-chip {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #eff7ff 0%, #dbeeff 100%);
  color: #2f5f9b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(159, 195, 231, 0.78);
}

.products-block-editor-grid {
  min-height: calc(100vh - 12rem);
}

#productBlockList .ar-block-item {
  cursor: pointer;
}

#productBlockEditorPanel .form-label {
  margin-bottom: 0.3rem;
}

.catalog-public-page {
  --catalog-primary: #1f4f99;
  --catalog-secondary: #14b8a6;
  min-height: 100dvh;
  background:
    radial-gradient(920px 420px at 8% -12%, rgba(20, 184, 166, 0.15), transparent 72%),
    radial-gradient(860px 460px at 100% 110%, rgba(31, 79, 153, 0.14), transparent 74%),
    linear-gradient(180deg, rgba(247, 251, 255, 0.96) 0%, rgba(238, 246, 255, 0.96) 100%),
    linear-gradient(140deg, var(--catalog-primary) 0%, var(--catalog-secondary) 100%);
}

.catalog-shell {
  max-width: 1180px;
}

.catalog-public-hero {
  border: 1px solid rgba(173, 200, 230, 0.78);
  border-radius: 1rem;
  padding: 1rem 1rem 0.9rem;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 250, 255, 0.94) 100%);
  box-shadow: 0 18px 38px rgba(24, 49, 92, 0.1);
}

.catalog-public-hero-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.catalog-public-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.catalog-public-eyebrow {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4f6f96;
  font-weight: 700;
}

.catalog-public-subtitle {
  color: #516987;
}

.catalog-public-brand-logo {
  max-width: 220px;
  max-height: 64px;
  width: auto;
  object-fit: contain;
}

.catalog-public-brand-fallback {
  min-width: 88px;
  min-height: 40px;
  border-radius: 0.55rem;
  border: 1px dashed #adc4de;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--catalog-primary);
  background: #ffffff;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.4rem 0.6rem;
}

.catalog-public-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.catalog-public-count-badge {
  font-size: 0.82rem;
  font-weight: 600;
}

.catalog-search-wrap {
  border-top: 1px solid rgba(188, 211, 236, 0.8);
  padding-top: 0.82rem;
}

.catalog-search-wrap .input-group-text {
  background: #f2f7ff;
  border-color: #c9dff4;
  color: #4d6f95;
}

.catalog-search-wrap .form-control {
  border-color: #c9dff4;
  background: #ffffff;
}

.catalog-search-wrap .form-control:focus {
  border-color: #8dc5ff;
  box-shadow: 0 0 0 0.2rem rgba(46, 126, 201, 0.12);
}

.catalog-product-card {
  border: 1px solid rgba(177, 203, 233, 0.68);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 255, 0.98) 100%);
  transition: transform 0.17s ease, box-shadow 0.17s ease;
}

.catalog-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px rgba(21, 44, 86, 0.14);
}

.catalog-product-media-link {
  display: block;
  text-decoration: none;
}

.catalog-product-media {
  width: 100%;
  aspect-ratio: 4 / 2.8;
  object-fit: cover;
  display: block;
}

.catalog-product-media-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #6a7f9e;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
}

.catalog-product-price {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--catalog-primary);
  background: #eef5ff;
  border: 1px solid #bfd5ec;
  white-space: nowrap;
}

.catalog-product-description {
  font-size: 0.93rem;
  line-height: 1.45;
  white-space: pre-line;
}

.catalog-product-btn {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: var(--catalog-primary);
  --bs-btn-border-color: var(--catalog-primary);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: var(--catalog-primary);
  --bs-btn-hover-border-color: var(--catalog-primary);
  --bs-btn-active-bg: var(--catalog-secondary);
  --bs-btn-active-border-color: var(--catalog-secondary);
  --bs-btn-focus-shadow-rgb: 34, 76, 141;
}

.catalog-product-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.catalog-product-hero-logo {
  max-width: 190px;
  max-height: 52px;
  object-fit: contain;
}

.catalog-product-detail {
  border: 1px solid rgba(177, 203, 233, 0.72);
  border-radius: 1rem;
  overflow: hidden;
}

.catalog-product-detail-grid {
  min-height: 480px;
}

.catalog-product-detail-media {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.catalog-product-detail-media-placeholder {
  width: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  color: #60728f;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
}

.catalog-product-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.98) 100%);
}

.catalog-product-actions .btn {
  min-height: 42px;
}

.catalog-product-detail-description {
  white-space: pre-line;
  line-height: 1.56;
  font-size: 0.96rem;
}

.catalog-product-description-rich {
  white-space: normal;
}

.catalog-product-description-rich h2,
.catalog-product-description-rich h3 {
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
  color: #1a2f61;
}

.catalog-product-description-rich h2:first-child,
.catalog-product-description-rich h3:first-child {
  margin-top: 0;
}

.catalog-product-description-rich p,
.catalog-product-description-rich li {
  margin-bottom: 0.45rem;
  line-height: 1.56;
}

.catalog-product-description-rich ul,
.catalog-product-description-rich ol {
  padding-left: 1.2rem;
}

.catalog-product-description-rich p:last-child,
.catalog-product-description-rich ul:last-child,
.catalog-product-description-rich ol:last-child {
  margin-bottom: 0;
}

.catalog-public-empty .card-body {
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
}

.catalog-public-empty-icon {
  width: 2.8rem;
  height: 2.8rem;
  margin: 0 auto;
  border-radius: 0.85rem;
  border: 1px solid #c9dcf0;
  background: #edf5ff;
  color: #4c6f97;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

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

  .catalog-public-hero {
    padding: 0.86rem;
    border-radius: 0.86rem;
  }

  .catalog-public-brand {
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .catalog-public-brand-logo {
    max-width: 176px;
    max-height: 52px;
  }

  .catalog-public-hero-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .catalog-product-detail-grid {
    min-height: auto;
  }

  .catalog-product-detail-media {
    min-height: 260px;
  }

  .catalog-product-detail-media-placeholder {
    min-height: 260px;
  }
}

@media (max-width: 575.98px) {
  .catalog-public-hero {
    padding: 0.78rem;
  }

  .catalog-public-brand-logo {
    max-width: 152px;
    max-height: 46px;
  }

  .catalog-product-media {
    aspect-ratio: 4 / 3;
  }

  .catalog-product-price {
    font-size: 0.8rem;
    padding: 0.24rem 0.62rem;
  }

  .catalog-product-btn {
    min-height: 38px;
  }
}

.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-inline-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.78rem;
  padding: 0.68rem 0.78rem;
  font-size: 0.86rem;
  line-height: 1.35;
}

.send-inline-notice > i {
  flex: 0 0 auto;
  margin-top: 0.12rem;
}

.send-inline-notice-block {
  display: block;
}

.send-inline-notice-info {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #e0f2fe 100%);
  color: #1e3a8a;
}

.send-inline-notice-warning {
  border-color: #fed7aa;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #7c2d12;
}

.send-inline-notice-danger {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2 0%, #fee2e2 100%);
  color: #7f1d1d;
}

.send-inline-notice-success {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  color: #14532d;
}

.send-notice-modal .modal-dialog {
  max-width: 560px;
}

.send-notice-modal-content {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
}

.send-notice-modal-content::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.38rem;
  background: var(--send-notice-accent, linear-gradient(90deg, #38bdf8 0%, #2563eb 100%));
}

.send-notice-modal-content .modal-body {
  padding: 1.45rem 1.45rem 0.95rem;
}

.send-notice-modal-content .modal-footer {
  border: 0;
  padding: 0.45rem 1.45rem 1.25rem;
}

.send-notice-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.95rem;
}

.send-notice-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 1rem;
  color: #ffffff;
  background: var(--send-notice-accent, linear-gradient(135deg, #38bdf8 0%, #2563eb 100%));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.send-notice-copy {
  min-width: 0;
}

.send-notice-eyebrow {
  margin-bottom: 0.22rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.send-notice-message {
  color: #334155;
}

.send-notice-details {
  display: grid;
  gap: 0.42rem;
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem 0.85rem 1.9rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.78);
  color: #334155;
  font-size: 0.88rem;
}

.send-notice-modal-info {
  --send-notice-accent: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
}

.send-notice-modal-warning {
  --send-notice-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.send-notice-modal-danger {
  --send-notice-accent: linear-gradient(135deg, #ef4444 0%, #be123c 100%);
}

.send-notice-modal-success {
  --send-notice-accent: linear-gradient(135deg, #22c55e 0%, #0f766e 100%);
}

.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;
}

#autoresponseSettingsForm .tagify {
  width: 100%;
  min-height: 34px;
  border-color: #d0d7e2;
  border-radius: 0.65rem;
  --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;
}

#autoresponseSettingsForm .tagify__input {
  margin: 0.3rem 0.35rem;
  font-size: 0.88rem;
}

#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.make_configured {
  background: #ecfdf5;
  color: #047857;
}

.status-pill.meta_configured {
  background: #e0f2fe;
  color: #075985;
}

.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;
}

.session-alert-stack {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.meta-connect-panel {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  margin: 1rem 0;
  padding: 1rem;
}

.meta-connect-panel.is-blocked {
  border-color: #fde68a;
  background: #fffbeb;
}

.meta-connect-panel-main {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.meta-connect-panel-main .btn {
  flex: 0 0 auto;
}

.meta-connect-missing {
  border-top: 1px solid rgba(148, 163, 184, 0.45);
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.meta-event-log-panel {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.meta-event-log-list {
  display: grid;
  gap: 0.65rem;
  max-height: 520px;
  overflow: auto;
  padding-right: 0.15rem;
}

.meta-event-log-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
}

.meta-event-log-meta {
  color: #475569;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.35rem 0.75rem;
  margin-top: 0.5rem;
}

.meta-event-log-details {
  margin-top: 0.55rem;
}

.meta-event-log-details summary {
  color: #334155;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.meta-event-log-details pre {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  color: #0f172a;
  font-size: 0.76rem;
  margin: 0.5rem 0 0;
  max-height: 260px;
  overflow: auto;
  padding: 0.65rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.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-wide {
  width: min(560px, 100vw);
}

.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;
}

.crud-details-long {
  white-space: pre-wrap;
  word-break: break-word;
}

.platform-settings-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1rem;
  align-items: flex-start;
}

.platform-settings-tabs {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.platform-settings-tab {
  width: 100%;
  border: 1px solid #d9e6f7;
  background: #ffffff;
  border-radius: 0.95rem;
  padding: 0.8rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 0.65rem;
  text-align: left;
  color: #263b68;
  box-shadow: 0 8px 20px rgba(24, 49, 92, 0.05);
}

.platform-settings-tab i {
  grid-row: span 2;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.75rem;
  display: inline-grid;
  place-items: center;
  background: #edf5ff;
  color: #24559c;
}

.platform-settings-tab span {
  font-weight: 800;
}

.platform-settings-tab small {
  color: #6b7c99;
}

.platform-settings-tab.active {
  border-color: #2a5fa8;
  background: linear-gradient(135deg, #173f8d 0%, #256b9f 100%);
  color: #ffffff;
}

.platform-settings-tab.active i {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.platform-settings-tab.active small {
  color: rgba(255, 255, 255, 0.82);
}

.platform-settings-content {
  display: grid;
  gap: 1rem;
}

.platform-settings-panel {
  display: none;
  border: 1px solid #dfe7f4;
  border-radius: 1rem;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.platform-settings-panel.active {
  display: block;
}

.platform-settings-panel-head,
.platform-settings-payment-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.platform-settings-payment-card {
  border: 1px solid #dfe7f4;
  border-radius: 0.95rem;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  margin-bottom: 1rem;
}

.platform-settings-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #dfe7f4;
}

.platform-settings-subtab {
  min-height: 2.5rem;
  border: 1px solid #cfdceb;
  border-radius: 0.5rem;
  background: #fff;
  color: #334155;
  padding: 0.55rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.platform-settings-subtab.active {
  border-color: #24559c;
  background: #24559c;
  color: #fff;
}

.platform-settings-actions,
.platform-settings-section-actions {
  display: flex;
  justify-content: flex-end;
  border: 1px solid #dfe7f4;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.85rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.platform-settings-section-actions {
  margin-top: 1rem;
}

.registration-local-payment-image-box {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

.registration-local-payment-image-preview {
  min-height: 120px;
  border: 1px solid #d8e7f7;
  border-radius: 0.9rem;
  background: #f8fbff;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #6b7c99;
  text-align: center;
  font-size: 0.84rem;
}

.registration-local-payment-image-preview.is-empty {
  padding: 0.75rem;
  gap: 0.35rem;
}

.registration-local-payment-image-preview i {
  display: block;
  font-size: 1.6rem;
  color: #8da6c9;
}

.registration-local-payment-image-preview img {
  width: 100%;
  height: 100%;
  max-height: 180px;
  object-fit: cover;
}

.registration-receipt-preview {
  min-height: min(70vh, 720px);
  border: 1px solid #d9e6f7;
  border-radius: 0.85rem;
  background: #f8fbff;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.registration-receipt-preview img {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
}

.registration-receipt-preview iframe {
  display: block;
  width: 100%;
  height: min(70vh, 720px);
  border: 0;
  background: #ffffff;
}

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;
  }

  .platform-settings-shell {
    grid-template-columns: 1fr;
  }

  .platform-settings-tabs {
    position: static;
  }

  .registration-local-payment-image-box {
    grid-template-columns: 1fr;
  }

  .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;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

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

.app-footer-inner a,
.auth-footer-inner a {
  color: #2a4b86;
  text-decoration: none;
  font-weight: 600;
}

.app-footer-inner a:hover,
.auth-footer-inner a:hover {
  text-decoration: underline;
}

@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%;
  }

  .meta-connect-panel-main {
    align-items: stretch;
    flex-direction: column;
  }

  .meta-connect-panel-main .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-rule-keywords {
  margin-top: 0.28rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.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-chip--sm {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0.14rem 0.4rem;
  line-height: 1.15;
}

.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;
}

.ar-settings-section {
  display: grid;
  gap: 0.85rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(150, 184, 217, 0.48);
}

.ar-settings-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.ar-settings-section-head {
  display: grid;
  gap: 0.15rem;
}

.ar-settings-section-head h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  color: #203c57;
  letter-spacing: 0;
}

.ar-settings-section-head p {
  margin: 0;
  font-size: 0.82rem;
  color: #637892;
}

.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;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: #444f61;
  border-right: 1px solid var(--shell-divider-color);
  box-shadow: none;
  overflow: hidden;
}

.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;
  flex: 0 0 auto;
  gap: 0.55rem;
  min-height: var(--shell-header-height);
  padding: 0.7rem 0.68rem 0.72rem;
  border-bottom: 1px solid var(--shell-divider-color);
  background: rgba(248, 250, 252, 0.92);
}

.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 {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.55rem 0.5rem 0.9rem;
  gap: 0.18rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(111, 120, 136, 0.48) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
  width: 0.45rem;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(111, 120, 136, 0.34);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(111, 120, 136, 0.58);
}

.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;
  min-height: 38px;
  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: #e2e8f2;
  color: #1f2631;
  box-shadow: inset 3px 0 0 #526dff;
}

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

.sidebar-session {
  flex: 0 0 auto;
  margin-top: 0;
  border-top: 1px solid var(--shell-divider-color);
  background: linear-gradient(180deg, #f4f6fa 0%, #edf1f6 100%);
  box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.06);
  padding: 0.8rem 0.55rem;
  position: relative;
  z-index: 1;
}

.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;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  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;
    height: 100dvh;
    max-height: 100dvh;
  }

  .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: repeat(4, minmax(0, 1fr));
  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;
  justify-content: space-between;
  gap: 0.4rem;
}

.ar-template-variable-btn {
  white-space: nowrap;
}

.ar-template-variable-menu {
  width: min(330px, calc(100vw - 2rem));
  max-height: 320px;
  overflow-y: auto;
  top: 100%;
  right: 0;
  left: auto;
  z-index: 1080;
}

.ar-template-variable-item {
  display: grid;
  gap: 0.08rem;
  white-space: normal;
}

.ar-template-variable-item code {
  color: #52657d;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

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

.ar-flow-phone-preview {
  overflow: hidden;
  border: 1px solid #cbd7e5;
  border-radius: 0.72rem;
  background: #edf4f2;
}

.ar-flow-phone-top {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.42rem 0.58rem;
  background: #0f6b57;
  color: #fff;
}

.ar-flow-phone-top span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.ar-flow-phone-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.ar-flow-phone-body {
  display: grid;
  gap: 0.62rem;
  min-height: 420px;
  max-height: calc(100vh - 230px);
  overflow: auto;
  padding: 0.7rem 0.58rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 25%, transparent 25%) 0 0 / 18px 18px,
    #e5f0ec;
}

.ar-flow-preview-empty {
  border: 1px dashed #bdd0c9;
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.82);
  color: #64748b;
  padding: 0.68rem;
  text-align: center;
  font-size: 0.78rem;
}

.ar-flow-preview-bubble {
  border: 1px solid transparent;
  border-radius: 0.58rem;
  background: #fff;
  color: #172033;
  padding: 0.54rem 0.54rem 0.34rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.ar-flow-preview-bubble.is-selected {
  border-color: #7eb8e6;
  box-shadow: 0 0 0 2px rgba(36, 134, 208, 0.12), 0 4px 14px rgba(15, 23, 42, 0.12);
}

.ar-flow-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  color: #64748b;
  font-size: 0.68rem;
}

.ar-flow-preview-meta strong {
  color: #40516b;
  font-weight: 720;
}

.ar-flow-preview-header {
  margin-bottom: 0.42rem;
  border-radius: 0.42rem;
  background: #e2e8f0;
  color: #334155;
  font-weight: 720;
  padding: 0.42rem;
  overflow-wrap: anywhere;
}

.ar-flow-preview-text {
  overflow-wrap: anywhere;
  font-size: 0.84rem;
  line-height: 1.34;
}

.ar-flow-preview-text .wa-preview-paragraph {
  margin-bottom: 0.32rem;
}

.ar-flow-preview-footer {
  margin-top: 0.42rem;
  color: #64748b;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.ar-flow-preview-media,
.ar-flow-preview-audio {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 34px;
  margin-bottom: 0.42rem;
  border: 1px solid #dbe4ee;
  border-radius: 0.48rem;
  background: #f8fafc;
  color: #475569;
  padding: 0.36rem 0.46rem;
  font-size: 0.78rem;
}

.ar-flow-preview-buttons {
  display: grid;
  gap: 1px;
  margin-top: 0.46rem;
  border-top: 1px solid #e2e8f0;
}

.ar-flow-preview-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 33px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: #1570a6;
  font-weight: 720;
  font-size: 0.8rem;
}

.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;
}

.wa-text-composer {
  position: relative;
}

.wa-selection-menu {
  position: fixed;
  left: 0;
  top: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid #d7dde7;
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  opacity: 0;
  pointer-events: none;
  z-index: 2147483000;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.wa-selection-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(-2px);
}

.wa-selection-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wa-selection-btn:hover,
.wa-selection-btn:focus-visible {
  background: #e2e8f0;
  color: #111827;
  outline: none;
}

.wa-selection-btn.is-disabled,
.wa-selection-btn:disabled {
  opacity: 0.42;
  color: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
  background: transparent;
}

.wa-preview-card {
  border: 1px solid #c9e7be;
  border-radius: 0.78rem;
  background: #dcf8c6;
  color: #1a1a1a;
  padding: 0.56rem 0.62rem;
  min-height: 68px;
  font-size: 0.87rem;
  line-height: 1.38;
}

.wa-preview-empty {
  color: #58706a;
  font-size: 0.79rem;
}

.wa-preview-paragraph {
  margin: 0 0 0.3rem;
}

.wa-preview-paragraph:last-child {
  margin-bottom: 0;
}

.wa-preview-paragraph-empty {
  min-height: 0.72rem;
}

.wa-preview-card code {
  background: rgba(17, 24, 39, 0.12);
  border-radius: 0.34rem;
  padding: 0.05rem 0.24rem;
  font-size: 0.78rem;
}

.wa-preview-code-block {
  margin: 0 0 0.3rem;
  padding: 0.46rem 0.58rem;
  border-radius: 0.56rem;
  background: rgba(15, 23, 42, 0.14);
  color: #0f172a;
  overflow-x: auto;
  white-space: pre-wrap;
}

.wa-preview-code-block:last-child {
  margin-bottom: 0;
}

.wa-preview-code-block code {
  background: transparent;
  border-radius: 0;
  padding: 0;
  font-size: 0.78rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.wa-preview-list {
  margin: 0 0 0.3rem;
  padding-left: 1.15rem;
}

.wa-preview-list:last-child {
  margin-bottom: 0;
}

.wa-preview-quote {
  margin: 0 0 0.3rem;
  padding: 0.04rem 0 0.04rem 0.6rem;
  border-left: 3px solid rgba(17, 24, 39, 0.34);
  color: #1f2937;
}

.wa-preview-quote:last-child {
  margin-bottom: 0;
}

.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-meta-flow-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.82fr);
  gap: 0.62rem;
  align-items: start;
}

.ar-meta-flow-fields {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.ar-meta-flow-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
}

.ar-meta-flow-data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ar-meta-flow-data-grid {
  display: grid;
  gap: 0.34rem;
}

.ar-meta-flow-data-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.9fr) minmax(112px, 1.2fr) 32px;
  gap: 0.34rem;
  align-items: center;
}

.ar-meta-flow-data-row .btn {
  width: 32px;
  height: 31px;
  padding: 0;
}

.ar-meta-flow-technical {
  border: 1px solid #d7dfeb;
  border-radius: 0.62rem;
  background: #f6f9fc;
  overflow: hidden;
}

.ar-meta-flow-technical summary {
  cursor: pointer;
  padding: 0.46rem 0.58rem;
  color: #40516b;
  font-size: 0.8rem;
  font-weight: 700;
}

.ar-meta-flow-technical pre {
  margin: 0;
  padding: 0.55rem 0.62rem;
  max-height: 220px;
  overflow: auto;
  border-top: 1px solid #d7dfeb;
  color: #203149;
  background: #eef3f8;
  font-size: 0.72rem;
  white-space: pre-wrap;
}

.ar-meta-flow-preview {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.ar-meta-flow-phone {
  overflow: hidden;
  border: 1px solid #cbd7e5;
  border-radius: 0.72rem;
  background: #edf4f2;
}

.ar-meta-flow-phone-top {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.42rem 0.58rem;
  background: #0f6b57;
  color: #fff;
}

.ar-meta-flow-phone-top span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.ar-meta-flow-phone-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.ar-meta-flow-phone-body {
  min-height: 390px;
  padding: 0.7rem 0.58rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 25%, transparent 25%) 0 0 / 18px 18px,
    #e5f0ec;
}

.ar-meta-flow-bubble {
  border-radius: 0.58rem;
  background: #fff;
  color: #172033;
  padding: 0.58rem 0.58rem 0.36rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.ar-meta-flow-preview-header {
  margin-bottom: 0.46rem;
  border-radius: 0.42rem;
  background: #e2e8f0;
  color: #334155;
  font-weight: 720;
  padding: 0.46rem;
  overflow-wrap: anywhere;
}

.ar-meta-flow-preview-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.86rem;
  line-height: 1.35;
}

.ar-meta-flow-preview-footer {
  margin-top: 0.42rem;
  color: #64748b;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

.ar-meta-flow-preview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: 100%;
  min-height: 34px;
  margin-top: 0.46rem;
  border: 0;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  color: #1570a6;
  font-weight: 720;
  font-size: 0.84rem;
}

.ar-meta-flow-preview-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-meta-flow-sheet {
  margin-top: 0.7rem;
  border-radius: 0.78rem 0.78rem 0.48rem 0.48rem;
  background: #fff;
  border: 1px solid #dbe4ee;
  padding: 0.54rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.ar-meta-flow-sheet-bar {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 0.52rem;
}

.ar-meta-flow-sheet-title {
  font-size: 0.84rem;
  font-weight: 760;
  color: #172033;
  overflow-wrap: anywhere;
  margin-bottom: 0.46rem;
}

.ar-meta-flow-sheet-fields {
  display: grid;
  gap: 0.42rem;
}

.ar-meta-flow-sheet-fields label {
  display: grid;
  gap: 0.18rem;
}

.ar-meta-flow-sheet-fields span {
  color: #50627a;
  font-size: 0.72rem;
  font-weight: 680;
}

.ar-meta-flow-sheet-fields input {
  width: 100%;
  min-height: 31px;
  border: 1px solid #d4dce8;
  border-radius: 0.48rem;
  padding: 0.28rem 0.42rem;
  background: #f8fafc;
  color: #213047;
  font-size: 0.78rem;
}

.ar-meta-flow-sheet-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 0.48rem;
  padding: 0.42rem;
  color: #64748b;
  font-size: 0.74rem;
  text-align: center;
}

.ar-meta-flow-sheet-submit {
  width: 100%;
  min-height: 32px;
  margin-top: 0.52rem;
  border: 0;
  border-radius: 0.48rem;
  background: #0f6b57;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 740;
}

.ar-meta-flow-checklist {
  display: grid;
  gap: 0.28rem;
  border: 1px solid #d7dfeb;
  border-radius: 0.62rem;
  background: #f6f9fc;
  padding: 0.48rem;
  color: #40516b;
  font-size: 0.75rem;
}

.ar-meta-flow-checklist div {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ar-meta-flow-checklist .is-ok i {
  color: #0f7a55;
}

.ar-meta-flow-checklist .is-warning i {
  color: #b7791f;
}

.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-interactive-option-row {
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
}

.ar-interactive-option-row.is-dragging {
  opacity: 0.56;
}

.ar-option-drag-btn {
  cursor: grab;
  height: 31px;
  padding: 0;
  width: 31px;
}

.ar-option-drag-btn:active {
  cursor: grabbing;
}

.ar-option-reorder-controls {
  display: inline-grid;
  gap: 0.12rem;
}

.ar-option-reorder-controls .btn {
  height: 14px;
  line-height: 1;
  padding: 0;
  width: 24px;
}

.ar-option-reorder-controls .btn i {
  display: block;
  font-size: 0.58rem;
  line-height: 1;
}

.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: repeat(4, minmax(0, 1fr));
  }
}

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

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

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

  .ar-meta-flow-editor {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  }
}

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

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

  .send-topbar-progress {
    width: min(34vw, 180px);
    min-width: 116px;
    max-width: 180px;
  }

  .send-topbar-progress-track {
    height: 32px;
  }

  .send-topbar-progress-label {
    display: none;
  }

  .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,
  .ar-editor-col-preview {
    grid-column: auto;
  }

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

  .ar-meta-flow-phone-body {
    min-height: 320px;
  }
}

.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);
}

@media (max-width: 575.98px) {
  .ar-meta-flow-two-col,
  .ar-meta-flow-data-row {
    grid-template-columns: 1fr;
  }

  .ar-meta-flow-data-row .btn {
    width: 100%;
  }

  .subscription-detail-grid {
    grid-template-columns: 1fr;
  }

  .subscription-detail-features-list {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .subscription-detail-features-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.legal-terms-main {
  max-width: 1080px;
}

.legal-terms-shell {
  display: grid;
  gap: 1rem;
}

.legal-terms-header {
  background: linear-gradient(135deg, #152f7a 0%, #27429a 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.legal-terms-header p {
  color: rgba(255, 255, 255, 0.92);
}

.legal-terms-card {
  background: #fff;
  border: 1px solid #dfe7f4;
  border-radius: 1rem;
  padding: 1.15rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.legal-terms-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.legal-terms-meta-item {
  border: 1px solid #dfe7f4;
  border-radius: 0.72rem;
  padding: 0.52rem 0.6rem;
  background: #f8fbff;
  display: grid;
  gap: 0.1rem;
}

.legal-terms-meta-item span {
  font-size: 0.77rem;
  color: #5b6c90;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.legal-terms-meta-item strong {
  font-size: 0.92rem;
  color: #1f2b55;
}

.legal-terms-summary {
  margin-bottom: 0.95rem;
  background: #f2f7ff;
  border: 1px solid #d7e4fb;
  border-radius: 0.72rem;
  padding: 0.7rem 0.8rem;
  color: #334976;
}

.legal-terms-content h2 {
  margin-top: 1.1rem;
  margin-bottom: 0.42rem;
  font-size: 1.08rem;
  color: #162a63;
}

.legal-terms-content h2:first-child {
  margin-top: 0;
}

.legal-terms-content p,
.legal-terms-content li {
  color: #334166;
  line-height: 1.56;
}

.legal-terms-content ul {
  padding-left: 1.2rem;
}

.legal-terms-actions {
  display: flex;
  justify-content: flex-end;
}

.legal-terms-actions-split {
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.claims-book-main {
  max-width: 1120px;
}

.claims-book-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  background:
    radial-gradient(circle at top right, rgba(106, 179, 255, 0.36) 0, rgba(106, 179, 255, 0) 32%),
    linear-gradient(135deg, #0f2b63 0%, #173f8d 52%, #26739f 100%);
}

.claims-book-kicker {
  display: inline-flex;
  margin-bottom: 0.3rem;
  color: #cfe7ff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.claims-book-hero-badge {
  min-width: 190px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  text-align: center;
  font-weight: 800;
}

.claims-book-hero-badge i {
  font-size: 1.65rem;
}

.claims-book-intro {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.claims-book-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  flex: 1;
}

.claims-book-provider-grid div {
  border: 1px solid #dfe7f4;
  border-radius: 0.8rem;
  padding: 0.6rem 0.7rem;
  background: #f8fbff;
}

.claims-book-provider-grid span {
  display: block;
  color: #5b6c90;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.claims-book-provider-grid strong {
  display: block;
  margin-top: 0.18rem;
  color: #172a63;
}

.claims-book-form {
  display: grid;
  gap: 1.1rem;
}

.claims-book-section {
  border: 1px solid #dfe7f4;
  border-radius: 0.95rem;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.claims-book-section-head {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 0.95rem;
}

.claims-book-section-head > span {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #173f8d;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.claims-book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.claims-book-grid .col-span-2 {
  grid-column: span 2;
}

.claims-book-minor-fields {
  margin-top: 0.85rem;
  border-radius: 0.85rem;
  padding: 0.85rem;
  background: #f3f8ff;
  border: 1px dashed #b8cae7;
}

.claims-book-subtitle {
  margin-bottom: 0.7rem;
  color: #20356f;
  font-weight: 800;
}

.claims-book-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.claims-book-type-card {
  border: 1px solid #d7e2f5;
  border-radius: 0.9rem;
  padding: 0.85rem;
  background: #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.6rem;
  cursor: pointer;
}

.claims-book-type-card input {
  margin-top: 0.2rem;
  grid-row: span 2;
}

.claims-book-type-card strong {
  color: #172a63;
}

.claims-book-type-card span {
  color: #5b6c90;
  line-height: 1.45;
}

.claims-book-consent {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.8rem;
  border-radius: 0.85rem;
  border: 1px solid #d7e2f5;
  background: #f8fbff;
  color: #334166;
}

.claims-book-consent input {
  margin-top: 0.2rem;
}

.claims-book-note {
  border-left: 4px solid #1d6f9f;
  background: #eef8ff;
  color: #23405f;
  border-radius: 0.7rem;
  padding: 0.7rem 0.85rem;
}

.claims-book-success {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
}

.claims-book-success .claims-book-kicker {
  color: #176b4f;
}

.claims-book-success-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}

.claims-book-success-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 991.98px) {
  .legal-terms-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claims-book-hero,
  .claims-book-intro,
  .claims-book-success {
    grid-template-columns: 1fr;
    display: grid;
  }

  .claims-book-provider-grid,
  .claims-book-grid,
  .claims-book-success-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claims-book-grid .col-span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 575.98px) {
  .legal-terms-meta-grid {
    grid-template-columns: 1fr;
  }

  .claims-book-provider-grid,
  .claims-book-grid,
  .claims-book-type-grid,
  .claims-book-success-grid {
    grid-template-columns: 1fr;
  }

  .claims-book-grid .col-span-2 {
    grid-column: span 1;
  }

  .claims-book-section {
    padding: 0.82rem;
  }
}

.terms-editor-wrap .ql-toolbar.ql-snow {
  border-color: #cfd9ea;
  border-top-left-radius: 0.7rem;
  border-top-right-radius: 0.7rem;
  background: #f7faff;
}

.terms-editor-wrap .ql-container.ql-snow {
  border-color: #cfd9ea;
  border-bottom-left-radius: 0.7rem;
  border-bottom-right-radius: 0.7rem;
  min-height: 420px;
  background: #fff;
}

.terms-editor-wrap .ql-editor {
  min-height: 390px;
  font-size: 0.96rem;
  color: #20335e;
  line-height: 1.58;
}

.terms-editor-wrap .ql-editor h2 {
  margin-top: 1rem;
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
  color: #13285b;
}

.terms-editor-wrap .ql-editor h2:first-child {
  margin-top: 0;
}

.terms-editor-wrap .ql-editor ul,
.terms-editor-wrap .ql-editor ol {
  padding-left: 1.3rem;
}

/* =============================
   Meta WhatsApp Templates
   ============================= */
.meta-page {
  color: #172033;
}

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

.meta-page-head h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 760;
  letter-spacing: 0;
}

.meta-kicker {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.meta-session-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: #64748b;
  font-size: 0.88rem;
}

.meta-session-line strong {
  color: #16825d;
}

.meta-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.meta-template-shell,
.meta-send-layout,
.meta-flow-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
}

.meta-template-workspace,
.meta-send-main,
.meta-flow-workspace {
  display: grid;
  gap: 16px;
}

.meta-panel {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  padding: 18px;
}

.meta-panel-head,
.meta-buttons-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.meta-panel-head h2,
.meta-buttons-editor-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 740;
  letter-spacing: 0;
}

.meta-panel-head span,
.meta-buttons-editor-head span {
  color: #64748b;
  font-size: 0.82rem;
}

.meta-template-body-input {
  min-height: 150px;
  resize: vertical;
}

.meta-template-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.meta-var-example {
  display: grid;
  grid-template-columns: auto minmax(120px, 180px);
  align-items: center;
  gap: 6px;
}

.meta-var-example span,
.meta-data-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 2px 8px;
}

.meta-buttons-list,
.meta-template-list,
.meta-flow-list,
.meta-send-history,
.meta-variable-map,
.meta-job-logs {
  display: grid;
  gap: 10px;
}

.meta-button-row {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) minmax(160px, 1.1fr) minmax(130px, 0.9fr) minmax(120px, 0.8fr) auto;
  gap: 8px;
  align-items: center;
}

.meta-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.meta-template-card,
.meta-flow-card,
.meta-history-row {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.meta-template-card-top,
.meta-template-card-foot,
.meta-flow-card-top,
.meta-flow-card-foot,
.meta-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-template-card h3,
.meta-flow-card h3,
.meta-history-row strong {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 740;
}

.meta-template-card span,
.meta-template-card-foot,
.meta-flow-card span,
.meta-flow-card-foot,
.meta-history-row span,
.meta-history-row small {
  color: #64748b;
  font-size: 0.8rem;
}

.meta-flow-card.is-active {
  border-color: #7eb8e6;
  background: #f1f8ff;
}

.meta-flow-card-foot > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.meta-flow-record-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px auto;
  gap: 12px;
  align-items: end;
}

.meta-flow-record-filter-actions,
.meta-flow-record-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-flow-record-summary {
  max-width: 520px;
  color: #475569;
}

.meta-flow-record-detail-row > td {
  padding: 0 !important;
  border-top: 0;
}

.meta-flow-record-detail {
  margin: 0 12px 14px;
  border: 1px solid #dce6f1;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.meta-flow-record-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.meta-flow-record-detail dl > div {
  min-width: 0;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.meta-flow-record-detail dt {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.meta-flow-record-detail dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.meta-flow-record-detail pre {
  max-height: 320px;
  overflow: auto;
  margin: 8px 0 0;
  border: 1px solid #dce6f1;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  font-size: 0.78rem;
}

.meta-flow-record-pagination {
  justify-content: flex-end;
  margin-top: 14px;
  color: #64748b;
  font-size: 0.85rem;
}

@media (max-width: 991.98px) {
  .meta-flow-record-filters {
    grid-template-columns: 1fr 1fr;
  }

  .meta-flow-record-detail dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .meta-flow-record-filters {
    grid-template-columns: 1fr;
  }
}

.meta-flow-screen-editor {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.meta-flow-screen-head,
.meta-flow-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-flow-screen-head {
  margin-bottom: 12px;
}

.meta-flow-screen-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 740;
}

.meta-flow-screen-head span {
  color: #64748b;
  font-size: 0.8rem;
}

.meta-flow-fields-list {
  display: grid;
  gap: 10px;
}

.meta-flow-field-row {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.meta-flow-field-top {
  display: grid;
  grid-template-columns: 150px minmax(120px, 0.85fr) minmax(150px, 1fr) auto 34px;
}

.meta-flow-field-top .btn {
  width: 34px;
  height: 31px;
  padding: 0;
}

.meta-flow-required {
  min-width: 70px;
  margin: 0;
  align-items: center;
}

.meta-flow-json-details {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.meta-flow-json-details summary {
  cursor: pointer;
  padding: 9px 12px;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
}

.meta-flow-json-details pre {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-top: 1px solid #d9e2ec;
  background: #eef4fb;
  color: #1e293b;
  font-size: 0.74rem;
  white-space: pre-wrap;
}

.meta-flow-form-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.meta-flow-preview-sheet {
  width: min(100%, 310px);
  margin-top: 14px;
  border: 1px solid #dbe4ee;
  border-radius: 14px 14px 8px 8px;
  background: #fff;
  padding: 11px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.meta-flow-preview-bar {
  width: 44px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #cbd5e1;
}

.meta-flow-preview-title {
  margin-bottom: 10px;
  color: #172033;
  font-size: 0.95rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.meta-flow-preview-fields {
  display: grid;
  gap: 9px;
}

.meta-flow-preview-fields h3 {
  margin: 0;
  color: #172033;
  font-size: 1rem;
  font-weight: 760;
}

.meta-flow-preview-fields p {
  margin: 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.meta-flow-preview-fields label,
.meta-flow-preview-checks {
  display: grid;
  gap: 4px;
}

.meta-flow-preview-fields span,
.meta-flow-preview-checks span {
  color: #50627a;
  font-size: 0.76rem;
  font-weight: 680;
}

.meta-flow-preview-fields input,
.meta-flow-preview-fields select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d4dce8;
  border-radius: 7px;
  background: #f8fafc;
}

.meta-flow-preview-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 0.8rem;
}

.meta-flow-preview-submit {
  width: 100%;
  min-height: 36px;
  margin-top: 12px;
  border: 0;
  border-radius: 7px;
  background: #0f6b57;
  color: #fff;
  font-weight: 740;
}

.meta-flow-status-card {
  display: grid;
  gap: 10px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.meta-flow-status-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-flow-status-card span {
  color: #64748b;
  font-size: 0.82rem;
}

.meta-flow-validation-list {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 0.8rem;
}

.meta-flow-validation-list div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.meta-flow-validation-list .is-ok i {
  color: #0f7a55;
}

.meta-flow-validation-list .is-warning i {
  color: #b7791f;
}

.meta-empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
  padding: 14px;
  font-size: 0.88rem;
}

.meta-preview-sticky {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
}

.meta-phone-preview {
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #edf4f2;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.meta-phone-top {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  background: #0f6b57;
  color: #fff;
  padding: 8px 12px;
}

.meta-phone-top span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.meta-phone-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.meta-phone-body {
  min-height: 380px;
  padding: 18px 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 25%, transparent 25%) 0 0 / 18px 18px,
    #e5f0ec;
}

.meta-phone-bubble {
  width: min(100%, 300px);
  border-radius: 8px;
  background: #fff;
  color: #172033;
  padding: 10px 10px 6px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.meta-preview-header {
  margin-bottom: 8px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  font-weight: 720;
  padding: 9px;
}

.meta-preview-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.38;
}

.meta-preview-footer {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.78rem;
}

.meta-preview-buttons {
  display: grid;
  gap: 1px;
  margin-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.meta-preview-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  color: #1570a6;
  font-weight: 700;
  font-size: 0.86rem;
}

.meta-rates-card,
.meta-cost-panel,
.meta-job-panel {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.meta-rates-card > div:first-child,
.meta-cost-row,
.meta-cost-total,
.meta-job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.meta-rates-card span,
.meta-cost-row span,
.meta-cost-total span {
  color: #64748b;
  font-size: 0.82rem;
}

.meta-rates-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  margin-top: 10px;
}

.meta-variable-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px minmax(150px, 0.8fr) minmax(150px, 0.8fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.meta-variable-row strong {
  display: block;
  font-size: 0.86rem;
}

.meta-variable-row span {
  color: #64748b;
  font-size: 0.78rem;
}

.meta-recipient-table-wrap {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.meta-cost-panel {
  display: grid;
  gap: 10px;
}

.meta-cost-total {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.meta-cost-total strong {
  color: #0f6b57;
  font-size: 1.15rem;
}

.meta-cost-warning {
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  padding: 8px;
  font-size: 0.82rem;
}

.meta-job-progress {
  height: 8px;
  margin: 10px 0;
}

.meta-job-logs {
  max-height: 180px;
  overflow: auto;
}

.meta-job-log {
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  padding: 7px 8px;
  font-size: 0.8rem;
}

.meta-job-log-success {
  color: #166534;
  background: #ecfdf5;
}

.meta-job-log-error {
  color: #991b1b;
  background: #fef2f2;
}

@media (max-width: 1180px) {
  .meta-template-shell,
  .meta-send-layout,
  .meta-flow-shell {
    grid-template-columns: 1fr;
  }

  .meta-preview-sticky {
    position: static;
  }
}

@media (max-width: 760px) {
  .meta-page-head,
  .meta-panel-head,
  .meta-buttons-editor-head,
  .meta-template-card-top,
  .meta-template-card-foot,
  .meta-history-row {
    align-items: stretch;
    flex-direction: column;
  }

  .meta-head-actions {
    justify-content: stretch;
  }

  .meta-head-actions .btn,
  .meta-form-actions .btn {
    width: 100%;
  }

  .meta-button-row,
  .meta-variable-row,
  .meta-flow-field-top {
    grid-template-columns: 1fr;
  }

  .meta-phone-body {
    min-height: 300px;
  }
}
