* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
  background: #f5f7fa;
  color: #18202c;
}

img {
  max-width: 100%;
}

a {
  color: #2563eb;
  text-decoration: none;
}

.container,
.container-fluid {
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  width: 100%;
}

.container {
  max-width: 1140px;
}

.container-fluid.py-4 {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.container-fluid.py-4 > .row {
  width: 100%;
}

.auth-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.auth-stack {
  display: grid;
  gap: 1rem;
  max-width: 520px;
  width: 100%;
}

.auth-stack .alert {
  margin-bottom: 0;
  width: 100%;
}

.auth-stack .row {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

.auth-stack .row > * {
  margin-bottom: 0;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

.auth-stack .card.mt-5 {
  margin-top: 0;
}

.py-4 { padding-bottom: 1.5rem; padding-top: 1.5rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-5 { margin-top: 3rem; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.ms-1 { margin-left: 0.25rem; }
.my-3 { margin-bottom: 1rem; margin-top: 1rem; }
.my-4 { margin-bottom: 1.5rem; margin-top: 1.5rem; }
.gap-2 { gap: 0.5rem; }
.g-2 { --gutter: 0.5rem; }
.g-3 { --gutter: 1rem; }
.g-4 { --gutter: 1.5rem; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.text-center { text-align: center; }
.text-muted { color: #667085; }
.text-danger { color: #b42318; }
.text-dark { color: #18202c; }
.text-white { color: #fff; }
.bg-light { background: #f8fafc; }
.bg-transparent { background: transparent; }
.border { border: 1px solid #e5e7eb; }
.border-0 { border: 0; }
.rounded { border-radius: 8px; }
.shadow-sm { box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08); }
.img-fluid { height: auto; max-width: 100%; }
.fs-1 { font-size: 2.4rem; }
.fs-6 { font-size: 1rem; }
.text-nowrap { white-space: nowrap; }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(var(--gutter, 1rem) / -2);
  margin-right: calc(var(--gutter, 1rem) / -2);
}

.row > * {
  padding-left: calc(var(--gutter, 1rem) / 2);
  padding-right: calc(var(--gutter, 1rem) / 2);
  width: 100%;
}

.col,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-8,
.col-lg-4,
.col-lg-5,
.col-lg-7,
.col-lg-8 {
  flex: 0 0 auto;
  margin-bottom: var(--gutter, 1rem);
}

.col { flex: 1 0 0%; }

@media (min-width: 768px) {
  .col-md-4 { width: 33.333333%; }
  .col-md-5 { width: 41.666667%; }
  .col-md-6 { width: 50%; }
  .col-md-8 { width: 66.666667%; }
}

@media (min-width: 992px) {
  .col-lg-4 { width: 33.333333%; }
  .col-lg-5 { width: 41.666667%; }
  .col-lg-7 { width: 58.333333%; }
  .col-lg-8 { width: 66.666667%; }
}


.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #18202c;
  display: block;
  font: inherit;
  padding: 0.58rem 0.72rem;
  width: 100%;
}

.form-control-sm {
  border-radius: 6px;
  font-size: 0.88rem;
  min-height: 2.15rem;
  padding: 0.38rem 0.55rem;
}

.form-control:focus,
.form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

textarea.form-control {
  resize: vertical;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: #667085;
  cursor: pointer;
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.35rem;
}

.password-toggle:hover,
.password-toggle.is-visible {
  color: #2563eb;
}

.form-select-sm {
  border-radius: 6px;
  font-size: 0.88rem;
  padding: 0.38rem 0.55rem;
}

.form-check {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.form-check-input {
  height: 1rem;
  margin: 0;
  width: 1rem;
}

.form-check-label {
  margin: 0;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 650;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.5rem 0.85rem;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-sm {
  border-radius: 6px;
  min-height: 2rem;
  padding: 0.32rem 0.62rem;
}

.btn-lg {
  min-height: 2.8rem;
  padding: 0.68rem 1rem;
}

.btn-primary,
.btn-success {
  background: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #f2f4f7;
  color: #344054;
}

.btn-outline-secondary {
  background: #fff;
  border-color: #d0d5dd;
  color: #344054;
}

.btn-outline-primary {
  background: #fff;
  border-color: #b2ccff;
  color: #2563eb;
}

.btn-outline-danger {
  background: #fff;
  border-color: #fecdca;
  color: #b42318;
}


.table-responsive {
  overflow-x: auto;
}

.list-card {
  max-height: none;
}

.list-card > .card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.list-scroll {
  min-height: 0;
  overflow: auto;
}

.broadcast-recipient-scroll,
.group-members-scroll {
  max-height: min(420px, calc(100vh - 360px));
  overflow: auto;
}


.list-scroll thead th {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table {
  border-collapse: collapse;
  width: 100%;
}

.table td,
.table th {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
}

.table-sm td,
.table-sm th {
  padding: 0.5rem;
}

.table-hover tbody tr:hover {
  background: #f8fafc;
}

.badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.28rem 0.5rem;
}

.bg-primary,
.text-bg-primary {
  background: #2563eb;
  color: #fff;
}

.bg-success,
.text-bg-success {
  background: #16a34a;
  color: #fff;
}

.bg-info,
.text-bg-info {
  background: #0891b2;
  color: #fff;
}

.bg-warning,
.text-bg-warning {
  background: #fef0c7;
  color: #7a2e0e;
}

.bg-secondary,
.text-bg-secondary {
  background: #667085;
  color: #fff;
}

.bg-danger,
.text-bg-danger {
  background: #b42318;
  color: #fff;
}

.text-bg-light {
  background: #f2f4f7;
  color: #344054;
}

.alert {
  align-items: center;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0.75rem 1rem;
}

.flash-stack {
  display: grid;
  gap: 0.65rem;
  max-width: min(520px, calc(100vw - 2rem));
  pointer-events: none;
  position: fixed;
  right: 1rem;
  top: 1rem;
  width: max-content;
  z-index: 2000;
}

.flash-stack .alert {
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.16);
  gap: 0.75rem;
  pointer-events: auto;
  width: 100%;
}

.flash-stack .alert > span {
  align-items: center;
  display: inline-flex;
  gap: 0.25rem;
  min-width: 0;
}

.flash-stack .alert i {
  flex-shrink: 0;
}

.flash-stack .btn-close {
  flex-shrink: 0;
}

.alert-success {
  background: #ecfdf3;
  color: #027a48;
}

.alert-danger {
  background: #fef3f2;
  color: #b42318;
}

.btn-close {
  background: transparent;
  border: 0;
  cursor: pointer;
  height: 1.5rem;
  position: relative;
  width: 1.5rem;
}

.btn-close::before {
  content: "x";
  font-weight: 700;
}

.modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-dialog {
  max-width: 560px;
  width: min(100%, 560px);
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal-header,
.modal-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
}

.modal-header {
  border-bottom: 1px solid #e5e7eb;
}

.modal-footer {
  border-top: 1px solid #e5e7eb;
  gap: 0.5rem;
}

.modal-body {
  padding: 1rem;
}

.modal-title {
  font-size: 1.05rem;
  margin: 0;
}

.modal-open {
  overflow: hidden;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  display: none;
  list-style: none;
  margin: 0.25rem 0 0;
  min-width: 160px;
  padding: 0.35rem;
  position: absolute;
  right: 0;
  z-index: 20;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #344054;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 0.55rem;
  line-height: 1.25;
  padding: 0.5rem 0.65rem;
  text-align: left;
  width: 100%;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: #f2f4f7;
  outline: 0;
}

.dropdown-item .bi {
  color: #667085;
  flex: 0 0 1.1rem;
  height: 1.1rem;
  width: 1.1rem;
}

.collapse:not(.show) {
  display: none;
}

.bi {
  align-items: center;
  display: inline-flex;
  font-style: normal;
  justify-content: center;
  line-height: 1;
  min-width: 1em;
  text-align: center;
}

.bi::before {
  background: currentColor;
  content: "";
  display: block;
  height: 1em;
  width: 1em;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.bi-chat-dots-fill { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h16v11H8l-4 4V4zm4 5h8v2H8V9zm0 3h5v2H8v-2z'/%3E%3C/svg%3E"); }
.bi-speedometer2 { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4a10 10 0 0 1 10 10h-3a7 7 0 0 0-14 0H2A10 10 0 0 1 12 4zm1 10.5a2 2 0 1 1-2-2l5-5 1.4 1.4-4.4 5.6zM5 17h14v2H5v-2z'/%3E%3C/svg%3E"); }
.bi-people::before,
.bi-people-fill::before,
.bi-person-lines-fill::before { }
.bi-people,
.bi-people-fill,
.bi-person-lines-fill { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0 2c4 0 7 2 7 5v1H2v-1c0-3 3-5 7-5zm8-1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 2c3 0 5 1.6 5 4v1h-4v-1c0-1.7-.7-3.1-1.9-4H17z'/%3E%3C/svg%3E"); }
.bi-collection::before,
.bi-collection-fill::before { }
.bi-collection,
.bi-collection-fill { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h7v7H4V4zm9 0h7v7h-7V4zM4 13h7v7H4v-7zm9 0h7v7h-7v-7z'/%3E%3C/svg%3E"); }
.bi-megaphone::before,
.bi-megaphone-fill::before { }
.bi-megaphone,
.bi-megaphone-fill { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 10v4h4l8 4V6l-8 4H3zm14-2.5v9a5 5 0 0 0 0-9zM7 15h3l1 5H8l-1-5z'/%3E%3C/svg%3E"); }
.bi-person-circle { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 4a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 14a8 8 0 0 1-5.3-2c.8-2 2.8-3 5.3-3s4.5 1 5.3 3a8 8 0 0 1-5.3 2z'/%3E%3C/svg%3E"); }
.bi-eye { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5c5 0 8.7 4.2 10 7-1.3 2.8-5 7-10 7s-8.7-4.2-10-7c1.3-2.8 5-7 10-7zm0 2c-3.8 0-6.7 3-7.7 5 1 2 3.9 5 7.7 5s6.7-3 7.7-5c-1-2-3.9-5-7.7-5zm0 2.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z'/%3E%3C/svg%3E"); }
.bi-person-gear { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0 2c3.3 0 6 1.4 6.8 3.6A5.7 5.7 0 0 0 14.2 20H2v-1c0-3.6 3.1-6 7-6zm9.5 1 1 1.7 1.9-.4.6 2-1.7 1 .1.7-.1.7 1.7 1-.6 2-1.9-.4-1 1.7-2-1 .2-1.9-.6-.4-.6-.4-1.6 1.1-1.4-1.5 1.2-1.5-.2-.7-.1-.7-1.7-.9.7-2 1.8.4 1-1.7h2.3zm-1.1 4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z'/%3E%3C/svg%3E"); }
.bi-building { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 21V3h11v18H4zm3-14h2v2H7V7zm4 0h2v2h-2V7zm-4 4h2v2H7v-2zm4 0h2v2h-2v-2zm-4 4h2v2H7v-2zm4 0h2v2h-2v-2zm6 6V9h3v12h-3zm1-9h1v2h-1v-2zm0 4h1v2h-1v-2z'/%3E%3C/svg%3E"); }
.bi-box-arrow-right { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h9v3h-2V6H6v12h5v-1h2v3H4V4zm11 4 5 4-5 4v-3H9v-2h6V8z'/%3E%3C/svg%3E"); }
.bi-log-out { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h9v2H6v12h7v2H4V4zm12.6 4.4L21.2 13l-4.6 4.6-1.4-1.4 2.2-2.2H10v-2h7.4l-2.2-2.2 1.4-1.4z'/%3E%3C/svg%3E"); }
.bi-shield-lock { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 20 5v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5l8-3zm0 2.2L6 6.4V11c0 3.8 2.4 7.3 6 8.8 3.6-1.5 6-5 6-8.8V6.4l-6-2.2zm-2 7.3v-1a2 2 0 1 1 4 0v1h1v4H9v-4h1zm1.5 0h1v-1a.5.5 0 0 0-1 0v1z'/%3E%3C/svg%3E"); }
.bi-arrow-right { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13 5l7 7-7 7-1.4-1.4 4.6-4.6H4v-2h12.2l-4.6-4.6L13 5z'/%3E%3C/svg%3E"); }
.bi-arrow-left { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 5 4 12l7 7 1.4-1.4L7.8 13H20v-2H7.8l4.6-4.6L11 5z'/%3E%3C/svg%3E"); }
.bi-plus-lg,
.bi-folder-plus,
.bi-person-plus { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7V4z'/%3E%3C/svg%3E"); }
.bi-save { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3h12l2 2v16H5V3zm2 2v5h9V5H7zm0 14h10v-6H7v6zm2-13h5v2H9V6z'/%3E%3C/svg%3E"); }
.bi-calendar-event,
.bi-calendar-check { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2h2v3h6V2h2v3h3v16H4V5h3V2zm-1 8v9h12v-9H6zm2 2h3v3H8v-3zm5.4 5.2L11 14.8l1.2-1.2 1.2 1.2 3-3 1.2 1.2-4.2 4.2z'/%3E%3C/svg%3E"); }
.bi-upload { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 16h2V8l3 3 1.4-1.4L12 4 6.6 9.6 8 11l3-3v8zm-6 2h14v2H5v-2z'/%3E%3C/svg%3E"); }
.bi-search { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0-2a8 8 0 0 1 6.3 12.9l4.4 4.4-1.4 1.4-4.4-4.4A8 8 0 1 1 10 2z'/%3E%3C/svg%3E"); }
.bi-pencil::before,
.bi-pencil-square::before { }
.bi-pencil,
.bi-pencil-square { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 17.5V20h2.5L17.8 8.7l-2.5-2.5L4 17.5zM19.7 6.8c.4-.4.4-1 0-1.4l-1.1-1.1a1 1 0 0 0-1.4 0l-.8.8 2.5 2.5.8-.8z'/%3E%3C/svg%3E"); }
.bi-trash { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 4h8l1 2h4v2H3V6h4l1-2zm-2 6h12l-1 10H7L6 10zm4 2v6h2v-6h-2zm4 0v6h2v-6h-2z'/%3E%3C/svg%3E"); }
.bi-check2::before,
.bi-check-lg::before,
.bi-check-circle::before,
.bi-check2-circle::before { }
.bi-check2,
.bi-check-lg,
.bi-check-circle,
.bi-check2-circle { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.2 16.6 4.9 12.3 3.5 13.7l5.7 5.7L21 7.6 19.6 6.2 9.2 16.6z'/%3E%3C/svg%3E"); }
.bi-exclamation-triangle { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3 1 21h22L12 3zm1 15h-2v-2h2v2zm0-4h-2V9h2v5z'/%3E%3C/svg%3E"); }
.bi-x-lg { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6.4 5 5.6 5.6L17.6 5 19 6.4 13.4 12l5.6 5.6-1.4 1.4-5.6-5.6L6.4 19 5 17.6l5.6-5.6L5 6.4 6.4 5z'/%3E%3C/svg%3E"); }
.bi-send { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 20 22 12 3 4v6l12 2-12 2v6z'/%3E%3C/svg%3E"); }
.bi-currency-dollar { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3h2v2.1c2.3.3 4 1.6 4.9 3.7l-2.3.9c-.6-1.4-1.8-2.2-3.6-2.2-1.9 0-3 .8-3 2 0 1.1.9 1.6 3.7 2.2 3.2.7 5.3 1.8 5.3 4.6 0 2.4-1.9 4.1-5 4.6V23h-2v-2.1c-2.8-.4-4.7-1.9-5.5-4.4l2.4-.8c.6 1.8 2 2.8 4.1 2.8 2.1 0 3.4-.8 3.4-2.1 0-1.2-.9-1.7-3.7-2.3-3.1-.7-5.2-1.8-5.2-4.5 0-2.3 1.8-4 4.5-4.5V3z'/%3E%3C/svg%3E"); }
.bi-paperclip { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.5 6.5 8.1 14.9a3 3 0 0 0 4.2 4.2l8.1-8.1 1.4 1.4-8.1 8.1a5 5 0 0 1-7.1-7.1L15 5a3.5 3.5 0 0 1 5 5l-8.3 8.3a2 2 0 0 1-2.8-2.8l7.6-7.6 1.4 1.4-7.6 7.6 8.3-8.3a1.5 1.5 0 0 0-2.1-2.1z'/%3E%3C/svg%3E"); }
.bi-file-earmark-music { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h9l5 5v15H6V2zm8 1.5V8h4.5L14 3.5zM10 11v6.1A2.5 2.5 0 1 0 12 19v-5h4v-3h-6z'/%3E%3C/svg%3E"); }
.bi-gear { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.4 13.5a7.8 7.8 0 0 0 0-3l2-1.5-2-3.4-2.4 1a8.7 8.7 0 0 0-2.6-1.5L14 2.5h-4l-.4 2.6A8.7 8.7 0 0 0 7 6.6l-2.4-1-2 3.4 2 1.5a7.8 7.8 0 0 0 0 3l-2 1.5 2 3.4 2.4-1a8.7 8.7 0 0 0 2.6 1.5l.4 2.6h4l.4-2.6a8.7 8.7 0 0 0 2.6-1.5l2.4 1 2-3.4-2-1.5zM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z'/%3E%3C/svg%3E"); }


.import-review-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.import-review-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.import-review-form > .card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.duplicate-review-list {
  display: grid;
  gap: 1rem;
}

.duplicate-review-group {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin: 0;
  padding: 0.75rem;
}

.duplicate-review-group legend {
  float: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  width: auto;
}

.duplicate-review-options {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.duplicate-review-option {
  align-items: flex-start;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem;
}

.duplicate-review-option:hover {
  background: #f9fafb;
}

.duplicate-review-option small {
  color: #667085;
  display: block;
  margin-top: 0.25rem;
}

.app-shell {
  background: linear-gradient(to right, #152033 0, #152033 248px, transparent 248px);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.app-sidebar {
  background: #152033;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100vh;
  left: 0;
  min-height: 0;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  top: 0;
  z-index: 40;
}

.sidebar-brand {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sidebar-brand a {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  gap: 0.65rem;
}

.brand-mark {
  align-items: center;
  background: #2563eb;
  border-radius: 8px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.sidebar-toggle {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  display: none;
  font: inherit;
}

.sidebar-nav {
  display: grid;
  gap: 0.25rem;
}

.tenant-switcher {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.2rem 0.85rem;
}

.tenant-switcher .form-label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  margin: 0;
}

.sidebar-section-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.72rem;
  font-weight: 750;
  margin: 0.9rem 0.8rem 0.2rem;
  text-transform: uppercase;
}

.sidebar-link {
  align-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  display: flex;
  gap: 0.75rem;
  padding: 0.72rem 0.8rem;
}

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

.sidebar-link .bi {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  height: 28px;
  width: 28px;
}

.sidebar-account {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: auto;
  padding: 0.75rem 0 0;
}

.sidebar-user-dropdown {
  position: relative;
}

.sidebar-user-trigger {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  text-align: left;
  transition: background 0.15s;
  width: 100%;
}

.sidebar-user-trigger:hover,
.sidebar-user-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar {
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-info strong,
.sidebar-user-info small {
  display: block;
}

.sidebar-user-info strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.sidebar-user-info small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-chevron {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.sidebar-user-trigger[aria-expanded="true"] .sidebar-user-chevron {
  transform: rotate(180deg);
}

.sidebar-user-menu {
  bottom: calc(100% + 0.5rem);
  left: 0;
  margin: 0;
  min-width: 100%;
  right: auto;
  top: auto;
}

.sidebar-user-menu form {
  margin: 0;
}

.dropdown-divider {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 0.35rem 0;
}

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

.app-canvas {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.app-canvas > .container.py-4 {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-width: 1140px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
  width: 100%;
}

.workspace-page {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-height: 0;
}

#chatWorkspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.workspace-frame > [id$="HtmxScope"],
#contactsHtmxScope {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.workspace-frame > [id$="HtmxScope"] > .card-body,
#contactsHtmxScope > .card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.workspace-frame > [id$="HtmxScope"] > .card-body > form,
#contactsHtmxScope > .card-body > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.workspace-frame > [id$="HtmxScope"] > .card-body > form > .list-scroll {
  flex: 1 1 auto;
}

.workspace-header {
  flex: 0 0 64px;
  margin-bottom: 0;
  min-height: 64px;
}

.workspace-title-block {
  display: grid;
  grid-template-rows: 1.55rem 20px;
  min-width: 0;
  row-gap: 0.08rem;
}

.workspace-header .workspace-title-block {
  flex: 1 1 auto;
}

.workspace-header p {
  max-width: none;
}

.workspace-frame {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.workspace-frame > .card-body,
.workspace-frame.card > .card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.workspace-frame .list-scroll {
  flex: 1 1 auto;
  height: 100%;
  max-height: none;
  min-height: 0;
}

.workspace-frame > .card-body > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.workspace-frame > .card-body > form[hidden] {
  display: none;
}

.platform-users-box form[hidden] {
  display: none;
}

.workspace-frame > .card-body > form > .list-scroll {
  flex: 1 1 auto;
}

.pagination-bar {
  align-items: center;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem 0 0;
}

.pagination-summary,
.pagination-page {
  color: #667085;
  font-size: 0.85rem;
  font-weight: 650;
}

.pagination-actions {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.btn.disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.chat-pane-list > .pagination-bar {
  padding: 0.65rem 0.9rem;
}

.chat-load-older {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0.25rem;
}

@media (max-width: 700px) {
  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-actions {
    flex-wrap: wrap;
  }
}

body.debug-panel-open .app-main {
  padding-right: var(--debug-panel-width, 420px);
  transition: padding-right 120ms ease;
}

body.debug-panel-open .app-main .container {
  max-width: min(100%, 1320px);
}

.mobile-nav-button {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.dashboard-header,
.dashboard-filter {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.dashboard-header {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dashboard-filter .form-control {
  min-width: 150px;
}

.dashboard-metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.dashboard-metric-card .card {
  border: 0;
  color: #fff;
}

.dashboard-metric-card--contacts .card { background: #2563eb; }
.dashboard-metric-card--groups .card { background: #16a34a; }
.dashboard-metric-card--broadcasts .card { background: #0891b2; }
.dashboard-metric-card--costs .card { background: #475467; }

.dashboard-metric-card .card-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.dashboard-metric-card a,
.dashboard-metric-card .card-footer span {
  color: #fff;
}

.dashboard-recent-card {
  min-height: 0;
}

.dashboard-recent-card__body {
  max-height: min(46vh, 520px);
  overflow: auto;
}

@media (max-width: 992px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.page-heading h1 {
  align-self: end;
  font-size: 1.3rem;
  font-weight: 750;
  line-height: 1.1;
  margin: 0;
}

.page-heading p {
  align-self: start;
  color: #667085;
  height: 20px;
  line-height: 20px;
  margin: 0;
  max-width: 70ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-status {
  color: #667085;
  display: inline;
  font-size: 0.88rem;
  line-height: 20px;
}

.page-actions {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.tenant-page-select {
  max-width: 360px;
}

.back-link {
  align-items: center;
  color: #667085;
  display: inline-flex;
  font-size: 0.9rem;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.card,
.app-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.card.text-bg-primary,
.card.text-bg-success,
.card.text-bg-info {
  border: 0;
  color: #fff;
}

.card.text-bg-primary { background: #2563eb; }
.card.text-bg-success { background: #16a34a; }
.card.text-bg-info { background: #0891b2; }

.card.text-bg-primary .card-footer,
.card.text-bg-success .card-footer,
.card.text-bg-info .card-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.card-body {
  padding: 1rem;
}

.card-footer {
  border-top: 1px solid #e5e7eb;
  padding: 0.85rem 1rem;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.9rem 1rem;
}

.card-header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.card h3,
.card h5 {
  margin-top: 0;
}

.text-primary {
  color: #2563eb;
}

.table th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #6c757d;
  border-top: none;
}

.app-table td {
  vertical-align: middle;
}

.table-toolbar {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.search-box {
  flex: 1;
  margin: 0;
  position: relative;
}

.search-box .bi {
  color: #98a2b3;
  left: 0.85rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.search-box .form-control {
  padding-left: 2.35rem;
  padding-right: 2.2rem;
}

.search-box input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
  -webkit-appearance: none;
}

.search-box input[type="search"]::-ms-clear {
  display: none;
}

.search-box .search-clear {
  color: #667085;
  font-weight: 700;
  position: absolute;
  right: 0.85rem;
  text-decoration: none;
  top: 50%;
  transform: translateY(-50%);
}


.bulk-actions {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  color: #344054;
  display: flex;
  gap: 0.5rem;
  padding: 0.45rem;
}

.bulk-actions-modern {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.bulk-selection-count {
  border-right: 1px solid #e5e7eb;
  color: #344054;
  font-size: 0.88rem;
  margin-right: 0.15rem;
  padding-right: 0.65rem;
  white-space: nowrap;
}

.bulk-actions .form-select {
  width: 190px;
}

.bulk-membership-form {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem;
}

.bulk-membership-form .form-select {
  width: 220px;
}

.inline-form {
  align-items: center;
  display: flex;
  gap: 0.4rem;
}

.inline-form .form-control,
.inline-form .form-select {
  min-width: 0;
}

.admin-action-stack,
.membership-stack {
  display: grid;
  gap: 0.45rem;
}

.membership-pill {
  align-items: center;
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  color: #3538cd;
  display: inline-flex;
  gap: 0.35rem;
  justify-content: space-between;
  max-width: 100%;
  padding: 0.2rem 0.35rem 0.2rem 0.65rem;
}

.membership-pill button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  height: 1.3rem;
  justify-content: center;
  padding: 0;
  width: 1.3rem;
}

.membership-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.membership-row .inline-form {
  flex: 1 1 260px;
}

.membership-org {
  color: #344054;
  font-weight: 650;
  min-width: 120px;
}

.platform-bulk-bar {
  align-items: center;
  background: #fff;
  border: 1px solid #c7d7fe;
  border-radius: 8px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(220px, 1fr) 220px 160px auto;
  margin-bottom: 1rem;
  padding: 0.85rem;
}

.platform-bulk-bar-compact {
  margin-bottom: 0;
  padding: 0.55rem 0.75rem;
}

.platform-bulk-bar strong,
.platform-bulk-bar small {
  display: block;
}

.platform-bulk-bar small {
  color: #667085;
  margin-top: 0.1rem;
}

.platform-section {
  margin-bottom: 0;
}

.platform-section--members {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.platform-users-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.platform-admins-table-wrap {
  max-height: 50vh;
  overflow: auto;
}

.compact-memberships {
  gap: 0.3rem;
}

.platform-section-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.platform-section-header h2 {
  font-size: 1.05rem;
  margin: 0;
}

.platform-section-header p {
  color: #667085;
  margin: 0.15rem 0 0;
}

.platform-users-workspace {
  --platform-users-gap: 0.75rem;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--platform-users-gap);
  min-height: 0;
  overflow: hidden;
}

.platform-users-box {
  flex: 0 0 auto;
  min-height: 0;
}

.platform-users-box--admins {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  max-height: calc((100% - var(--platform-users-gap)) / 2);
  min-height: 0;
  overflow: hidden;
}

.platform-users-box--admins .platform-users-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.platform-users-box--members {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.platform-users-members-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  overflow: hidden;
  padding: 0.35rem 1rem 1rem;
}

.platform-users-admin-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 0;
  overflow: hidden;
  padding: 0.35rem 1rem 1rem;
}

.platform-orgs-card-body .workspace-table-tools {
  margin-bottom: 0.35rem;
}

.platform-users-list-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow: hidden;
}

.platform-users-box--members .platform-users-members-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.platform-users-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.platform-users-box--admins .platform-users-table-scroll,
.platform-users-members-table-scroll {
  flex: 1 1 auto;
}

.platform-users-table-scroll thead th {
  background: #fff;
  font-size: 0.76rem;
  line-height: 1.1;
  padding-bottom: 0.38rem;
  padding-top: 0.38rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.platform-users-table-scroll thead .form-check-input {
  display: block;
}

.platform-users-layout {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.platform-users-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: visible;
}

.platform-users-box--admins .platform-users-list {
  overflow-y: auto;
  overflow-x: hidden;
}

.platform-users-header,
.platform-user-row {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(0, 1.35fr) minmax(190px, 0.65fr);
  min-height: 0;
}

.platform-admins-header,
.platform-admin-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.platform-users-header {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  padding: 0.75rem 1rem;
  text-transform: uppercase;
}

.platform-select-all {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
}

.platform-user-row {
  border-bottom: 1px solid #e5e7eb;
  min-width: 0;
}

.platform-user-row:last-child {
  border-bottom: 0;
}

.platform-user-main,
.platform-access-cell,
.platform-security-cell {
  min-width: 0;
  padding: 0.45rem 1rem;
}

.platform-admins-list .platform-user-main,
.platform-admins-list .platform-row-actions {
  padding-bottom: 0.45rem;
  padding-top: 0.45rem;
}

.platform-admins-list .platform-user-row {
  min-height: 0;
}

.platform-user-main {
  align-items: center;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: auto minmax(0, 1fr);
  overflow: hidden;
}

.platform-admin-main {
  grid-template-columns: auto minmax(0, 1fr);
}

.platform-users-box-header {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 170px minmax(220px, 360px) minmax(260px, 1fr);
}

.platform-users-box-title {
  align-items: center;
  display: flex;
  gap: 0.55rem;
  min-width: 0;
}

.platform-users-box-title h2 {
  margin: 0;
  white-space: nowrap;
}

.platform-users-header-tools {
  align-items: center;
  display: contents;
  flex: 1 1 auto;
  min-width: 0;
}

.platform-users-header-search {
  grid-column: 2;
  min-width: 180px;
}

.platform-users-header-search .form-control {
  min-height: 2rem;
}

.platform-users-header-bulk {
  grid-column: 3;
  justify-self: end;
}

.platform-users-header-bulk .bulk-selection-count {
  font-size: 0.82rem;
  padding-right: 0.45rem;
}

.platform-users-header-bulk .btn-sm {
  min-height: 2rem;
  padding-bottom: 0.32rem;
  padding-top: 0.32rem;
}

.platform-list-select-all {
  align-items: center;
  color: #667085;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 0.4rem;
  margin: 0;
}

.platform-user-main .platform-user-check {
  align-items: center;
  display: flex;
}

.platform-row-actions {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  padding: 0.45rem 1rem;
}

.platform-role-cell {
  grid-column: 2;
}

.platform-role-form,
.platform-password-form,
.platform-membership-role-form,
.platform-access-actions {
  align-items: center;
  display: flex;
  gap: 0.45rem;
}

.platform-access-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
}

.platform-access-actions form {
  min-width: 0;
}

.platform-membership-role-form {
  flex: 1 1 190px;
}

.platform-access-actions > form:not(.platform-membership-role-form) {
  flex: 0 0 auto;
}

.platform-membership-role-form .form-select {
  flex: 1 1 110px;
}

.platform-access-actions .btn {
  white-space: nowrap;
}

.platform-password-form {
  flex-wrap: wrap;
}

.platform-password-form .form-control {
  flex: 1 1 130px;
}

.platform-password-form .btn {
  flex: 0 0 auto;
}

.platform-role-form .form-select,
.platform-membership-role-form .form-select {
  min-width: 130px;
}

.platform-access-cell {
  border-left: 1px solid #f2f4f7;
  border-right: 1px solid #f2f4f7;
  overflow: visible;
}

.platform-access-list {
  display: grid;
  gap: 0.45rem;
}

.platform-access-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.45rem 0.55rem;
  position: relative;
}

.platform-access-item > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-access-item strong {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.platform-access-item strong,
.platform-access-summary strong,
.platform-access-empty strong {
  color: #18202c;
}

.platform-access-item .badge {
  margin-left: 0.45rem;
}

.platform-access-summary,
.platform-access-empty {
  display: grid;
  gap: 0.3rem;
}

.platform-access-summary small,
.platform-access-empty small {
  color: #667085;
}

.platform-security-cell {
  align-content: start;
  display: grid;
  overflow: hidden;
}

.platform-password-form .form-control {
  min-width: 0;
}

.entity-cell {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  min-width: 180px;
}

.entity-cell > div {
  min-width: 0;
}

.entity-cell strong,
.entity-cell small {
  overflow-wrap: anywhere;
}

.entity-cell small,
.assignment-option small {
  color: #667085;
  display: block;
}

.avatar {
  align-items: center;
  background: #e0f2fe;
  border-radius: 50%;
  color: #075985;
  display: inline-flex;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.badge {
  font-weight: 500;
}

.text-bg-soft {
  background: #eef4ff;
  color: #3538cd;
}

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

.empty-state {
  color: #667085;
  margin: 0 auto;
  max-width: 420px;
  padding: 2.5rem 1rem;
  text-align: center;
}

.empty-state.compact {
  padding: 1rem;
}

.empty-state .bi {
  color: #98a2b3;
  display: block;
  font-size: 2rem;
  margin-bottom: 0.7rem;
}

.empty-state h2 {
  color: #18202c;
  font-size: 1.1rem;
  font-weight: 700;
}

.group-card h2 {
  font-size: 1.1rem;
  font-weight: 750;
  margin: 0.7rem 0 0.35rem;
}

.group-card p {
  color: #667085;
  min-height: 3rem;
}

.group-card .card-footer {
  align-items: center;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
}

.group-icon {
  align-items: center;
  background: #ecfdf3;
  border-radius: 8px;
  color: #027a48;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.assignment-list {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 360px;
  overflow: auto;
}

.assignment-list.compact-list {
  max-height: 180px;
}

.assignment-option {
  align-items: flex-start;
  border-bottom: 1px solid #eef0f3;
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem;
}

.assignment-option:last-child {
  border-bottom: 0;
}

.assignment-option:hover {
  background: #f9fafb;
}

.member-picker {
  max-height: 420px;
}

.message-meter {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.55rem;
  overflow: hidden;
}

.message-meter > div {
  padding: 0.48rem 0.65rem;
}

.message-meter > div + div {
  border-left: 1px solid #e5e7eb;
}

.message-meter strong {
  color: #18202c;
  display: block;
  font-size: 0.9rem;
  line-height: 1.15;
}

.message-meter span {
  color: #667085;
  display: block;
  font-size: 0.74rem;
}

.broadcast-composer {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow: hidden;
}

.broadcast-composer__header {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.broadcast-composer__header h2 {
  font-size: 1.35rem;
  margin: 0;
}

.broadcast-composer__card .card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0.85rem;
}

.broadcast-composer__card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.broadcast-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  overflow: hidden;
}

.broadcast-form__grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
}

.broadcast-message-field {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.broadcast-message-input {
  flex: 1 1 auto;
  max-height: 100%;
  min-height: 88px;
  overflow-y: auto;
  resize: none;
}

.broadcast-submit-error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #b42318;
  padding: 0.65rem 0.75rem;
}

.broadcast-action-bar {
  align-items: center;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.85rem;
}

.broadcast-schedule-modal .modal-dialog {
  max-width: 420px;
}

.broadcast-view-modal .modal-dialog {
  max-width: calc(100vw - 2rem);
  width: min(var(--broadcast-view-modal-width, 820px), calc(100vw - 2rem));
}

.broadcast-view-modal .modal-content {
  position: relative;
}

.broadcast-view-modal .modal-body {
  max-height: calc(100vh - 150px);
  overflow: auto;
}

.broadcast-view-modal__resize {
  bottom: 0.25rem;
  cursor: ew-resize;
  position: absolute;
  right: 0.25rem;
  top: 0.25rem;
  width: 10px;
  z-index: 2;
}

.broadcast-view-modal__resize::after {
  background: #d0d5dd;
  border-radius: 999px;
  content: "";
  height: 48px;
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
}

body.broadcast-modal-resizing {
  cursor: ew-resize;
  user-select: none;
}

.broadcast-view-modal__header {
  gap: 0.75rem;
}

.broadcast-view-modal__header .modal-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.broadcast-view-modal__header-status,
.broadcast-view-modal__header-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
}

.broadcast-view-modal__header-status:empty,
.broadcast-view-modal__header-actions:empty {
  display: none;
}

.broadcast-view-modal__header-actions .broadcast-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

.broadcast-view-modal__header-actions .btn {
  min-height: 2rem;
  padding: 0.32rem 0.55rem;
}

[data-row-open-link] {
  cursor: pointer;
}

.file-picker {
  align-items: center;
  background: #fff;
  border: 1px dashed #b2ccff;
  border-radius: 8px;
  color: #344054;
  cursor: pointer;
  display: inline-grid;
  font-weight: 650;
  gap: 0.55rem;
  grid-template-columns: auto minmax(0, 1fr);
  max-width: min(100%, 520px);
  padding: 0.45rem 0.5rem;
}

.file-picker:hover {
  background: #eef4ff;
  border-style: solid;
}

.file-picker.is-hidden,
.file-picker[hidden] {
  display: none !important;
}

[aria-invalid="true"] {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

[aria-invalid="true"]:focus {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.18);
}

.template-help {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.template-help span {
  color: #667085;
  font-size: 0.85rem;
}

.template-token {
  background: #eef4ff;
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  color: #3538cd;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  padding: 0.22rem 0.5rem;
}

.response-chart {
  display: grid;
  gap: 0.55rem;
}

.response-bar {
  align-items: center;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(120px, 1fr) 2fr auto;
}

.response-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.response-bar div {
  background: #eef4ff;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.response-bar i {
  background: #2563eb;
  display: block;
  height: 100%;
}

.delivery-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.delivery-stats > div {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem;
}

.delivery-stats strong,
.delivery-stats span {
  display: block;
}

.delivery-stats strong {
  font-size: 1.2rem;
}

.delivery-stats span {
  color: #667085;
  font-size: 0.82rem;
  text-transform: capitalize;
}

.delivery-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.delivery-inline span {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #667085;
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
}

.delivery-inline strong {
  color: #18202c;
}

.broadcast-detail {
  display: grid;
  gap: 1rem;
  min-height: 0;
  overflow: auto;
  padding-bottom: 1rem;
}

.broadcast-hero {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.1rem;
}

.broadcast-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.broadcast-title-row h1 {
  font-size: 1.55rem;
  letter-spacing: 0;
  margin: 0;
}

.broadcast-meta-line {
  color: #667085;
  display: flex;
  flex-wrap: nowrap;
  font-size: 0.86rem;
  gap: 0.4rem 0.7rem;
  margin-top: 0.5rem;
  white-space: nowrap;
}

.broadcast-meta-line span {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
}

.broadcast-meta-line span + span::before {
  background: #d0d5dd;
  border-radius: 999px;
  content: "";
  height: 0.32rem;
  width: 0.32rem;
}

.broadcast-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.broadcast-actions form {
  margin: 0;
}

.broadcast-metrics {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.broadcast-metrics > div,
.broadcast-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.broadcast-metrics > div {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.65rem 0.75rem;
}

.broadcast-metrics span,
.broadcast-metrics small,
.broadcast-panel__header span {
  color: #667085;
  font-size: 0.82rem;
}

.broadcast-metrics strong {
  color: #18202c;
  font-size: 1.08rem;
  line-height: 1.2;
}

.broadcast-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.broadcast-panel {
  min-width: 0;
  overflow: hidden;
}

.broadcast-panel__header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.broadcast-panel__header h2 {
  font-size: 1rem;
  font-weight: 750;
  margin: 0;
}

.broadcast-message-preview {
  background: #fff;
  border-left: 4px solid #2563eb;
  margin: 1rem;
  padding: 0.75rem 0.9rem;
  white-space: pre-wrap;
}

.broadcast-recipients-panel > summary {
  cursor: pointer;
  list-style: none;
}

.broadcast-recipients-panel > summary::-webkit-details-marker {
  display: none;
}

.broadcast-recipients-panel > summary::after {
  color: #667085;
  content: "Open";
  font-size: 0.82rem;
  font-weight: 650;
}

.broadcast-recipients-panel[open] > summary::after {
  content: "Close";
}

.broadcast-media-preview {
  border-top: 1px solid #e5e7eb;
  padding: 1rem;
}

.broadcast-media-preview img {
  border-radius: 8px;
  display: block;
  max-height: 320px;
  max-width: 100%;
}

.broadcast-media-preview audio {
  max-width: 100%;
}

.delivery-progress {
  background: #eef2f6;
  border-radius: 999px;
  height: 0.55rem;
  margin: 1rem 1rem 0;
  overflow: hidden;
}

.delivery-progress span {
  background: #16a34a;
  display: block;
  height: 100%;
}

.broadcast-status-grid {
  padding: 1rem;
}

.broadcast-response-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  padding: 1rem;
}

.broadcast-table-compact th {
  color: #667085;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.broadcast-table-compact td,
.broadcast-table-compact th {
  vertical-align: middle;
}

.workspace-frame > .settings-workspace-scroll,
.workspace-frame.card > .settings-workspace-scroll,
.settings-workspace-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  padding: 1rem;
  scrollbar-color: #98a2b3 #f2f4f7;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.settings-workspace-scroll::-webkit-scrollbar {
  width: 10px;
}

.settings-workspace-scroll::-webkit-scrollbar-track {
  background: #f2f4f7;
}

.settings-workspace-scroll::-webkit-scrollbar-thumb {
  background: #98a2b3;
  border: 2px solid #f2f4f7;
  border-radius: 999px;
}

.settings-card-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  align-items: start;
}

.settings-card-column {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.settings-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.85rem;
}

.settings-card--wide {
  grid-column: 1 / -1;
}

.settings-card__header h2 {
  font-size: 1rem;
  margin: 0 0 0.65rem;
}

.settings-card .mb-3 {
  margin-bottom: 0.75rem !important;
}

.settings-card .form-label {
  margin-bottom: 0.25rem;
}

.settings-card .btn {
  padding-bottom: 0.4rem;
  padding-top: 0.4rem;
}

.settings-card small {
  line-height: 1.25;
}

.settings-webhooks {
  display: grid;
  gap: 0.75rem;
}

.settings-webhooks > div {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
}

.settings-webhooks span {
  color: #344054;
  font-weight: 650;
}

.settings-webhooks code {
  overflow-wrap: anywhere;
}

.settings-webhooks small {
  color: #667085;
}

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

.settings-radio-group {
  display: grid;
  gap: 0.6rem;
}

.settings-radio-group label {
  align-items: flex-start;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
}

.settings-radio-group label:has(input:checked) {
  background: #eef4ff;
  border-color: #b2ccff;
}

.settings-radio-group input {
  margin-top: 0.2rem;
}

.settings-radio-group strong,
.settings-radio-group small {
  display: block;
}

.settings-radio-group small {
  color: #667085;
}

.chat-list {
  align-content: start;
  display: grid;
}

.chat-frame {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 360px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat-pane-list {
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.chat-pane-list__header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.75rem 0.9rem;
}

.chat-pane-list__header span {
  color: #667085;
  font-size: 0.88rem;
}

.chat-pane-list .chat-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.chat-row {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  color: inherit;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 66px;
  padding: 0.75rem 0.85rem;
}

.chat-row:last-child {
  border-bottom: 0;
}

.chat-row:hover {
  background: #f8fafc;
}

.chat-row.active {
  background: #eef4ff;
}

.chat-row.unread .chat-row__main strong {
  color: #101828;
  font-weight: 800;
}

.chat-row.unread .chat-row__main small {
  color: #344054;
  font-weight: 650;
}

.chat-row__main,
.chat-row__meta {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.chat-row__main strong {
  color: #18202c;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row__main small {
  color: #667085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row__latest {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  min-width: 0;
}

.chat-row__latest .bi {
  color: #667085;
  flex: 0 0 auto;
  font-size: 0.8rem;
}

.chat-row__latest span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row__meta {
  justify-items: end;
  min-width: 48px;
}

.chat-row__meta small {
  color: #667085;
  font-size: 0.76rem;
  white-space: nowrap;
}

.chat-row__unread-count {
  align-items: center;
  background: #2563eb;
  color: #fff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  justify-content: center;
  min-height: 1.35rem;
  min-width: 1.35rem;
  padding: 0.2rem 0.42rem;
}

.chat-row .avatar {
  height: 40px;
  width: 40px;
}

.chat-thread {
  display: grid;
  gap: 0.85rem;
}

.chat-pane-thread {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

#chatThreadPanel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.chat-thread-header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.chat-thread-scroll {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.chat-bubble {
  border-radius: 8px;
  max-width: min(76%, 720px);
  padding: 0.75rem 0.9rem;
}

.chat-bubble--outbound {
  background: #eef4ff;
  justify-self: end;
}

.chat-bubble--inbound {
  background: #f2f4f7;
  justify-self: start;
}

.chat-bubble__body {
  white-space: pre-wrap;
}

.chat-bubble__media {
  margin-top: 0.5rem;
}

.chat-bubble__media img {
  border-radius: 6px;
  display: block;
  max-height: 240px;
  max-width: 100%;
}

.chat-bubble__media audio {
  max-width: 100%;
}

.chat-bubble__meta {
  align-items: center;
  color: #667085;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  gap: 0.25rem 0.45rem;
  line-height: 1.35;
  margin-top: 0.4rem;
}

.chat-bubble__meta-item {
  align-items: center;
  display: inline-flex;
  min-height: 1.55rem;
}

.chat-bubble__meta-item + .chat-bubble__meta-item::before {
  color: #98a2b3;
  content: "·";
  margin-right: 0.45rem;
}

.chat-bubble__inline-form {
  display: inline-flex;
  margin: 0;
}

.chat-composer {
  align-items: start;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  --chat-composer-action-size: 2.3rem;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr);
  padding: 0.55rem;
  row-gap: 0.18rem;
}

.chat-composer__main {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.chat-composer__message-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.chat-composer__attach,
.chat-composer__send {
  align-items: center;
  aspect-ratio: 1;
  flex: 0 0 var(--chat-composer-action-size);
  display: inline-flex;
  justify-content: center;
  height: var(--chat-composer-action-size);
  width: var(--chat-composer-action-size);
}

#chatComposerOptOutState {
  display: grid;
  gap: 0.5rem;
  grid-column: 1 / -1;
}

#chatComposerOptOutState:empty {
  display: none;
}

#chatComposerOptOutState .alert {
  margin-bottom: 0;
}

.chat-composer__message-meta {
  display: grid;
  gap: 0.15rem;
  margin-left: calc(var(--chat-composer-action-size) + 0.5rem);
  margin-right: calc(var(--chat-composer-action-size) + 0.5rem);
  min-width: 0;
}

.chat-composer__meter {
  display: block;
  line-height: 1.1;
  margin: 0;
}

.chat-composer__status,
.chat-composer__converter {
  grid-column: 1 / -1;
  margin-top: 0;
}

.chat-composer__status:empty {
  display: none;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.upload-status {
  color: #667085;
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.upload-status--ok {
  color: #027a48;
}

.upload-status--warn {
  color: #b54708;
}

.upload-status--error {
  color: #b42318;
}

.chat-composer__message {
  line-height: 1.35;
  max-height: 132px;
  min-height: 2.3rem;
  overflow-y: hidden;
  resize: none;
}

.attachment-chip {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #344054;
  display: inline-grid;
  gap: 0.55rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  max-width: min(100%, 520px);
  padding: 0.45rem 0.5rem;
}

.attachment-chip--existing {
  margin-bottom: 0.65rem;
}

.attachment-chip__icon {
  align-items: center;
  background: #eef4ff;
  border-radius: 6px;
  color: #2563eb;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
}

.attachment-chip__text {
  font-size: 0.88rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-converter {
  background: #fff8eb;
  border: 1px solid #fedf89;
  border-radius: 8px;
  margin-top: 0.85rem;
  padding: 1rem;
}

.audio-converter__header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.audio-converter__tools {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.audio-converter__controls {
  align-items: end;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(92px, 0.65fr) minmax(92px, 0.65fr) minmax(120px, 0.85fr) auto;
}

.audio-converter__controls .form-label {
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.audio-converter__controls .form-select {
  min-width: 0;
}

.audio-converter__mono {
  align-items: center;
  display: flex;
  min-height: 2rem;
}

.audio-converter__header strong,
.audio-converter__header span {
  display: block;
}

.audio-converter__header span:not(.badge),
.audio-converter__result {
  color: #667085;
  font-size: 0.88rem;
}

.actions-panel {
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1rem;
}

.btn-outline-danger:hover {
  color: #fff;
}

dl dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #6c757d;
  margin-top: 0.75rem;
}

dl dt:first-child {
  margin-top: 0;
}

dl dd {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .app-shell {
    background: transparent;
    display: block;
  }

  .app-sidebar {
    bottom: 0;
    box-shadow: 24px 0 60px rgba(15, 23, 42, 0.3);
    height: 100vh;
    max-width: 290px;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform 160ms ease;
    width: 82vw;
  }

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

  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar-open .sidebar-backdrop {
    background: rgba(15, 23, 42, 0.45);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 30;
  }

  .mobile-nav-button {
    align-items: center;
    background: #152033;
    border: 0;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    gap: 0.35rem;
    margin: 1rem 1rem 0;
    min-height: 2.35rem;
    padding: 0.55rem 0.8rem;
  }

  .page-heading,
  .table-toolbar,
  .actions-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions {
    flex-direction: column;
  }

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

  .bulk-actions .form-select {
    width: 100%;
  }

  .platform-bulk-bar,
  .platform-section-header,
  .platform-users-header,
  .platform-user-row {
    grid-template-columns: 1fr;
  }

  .platform-access-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .platform-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-users-header {
    display: none;
  }

  .platform-user-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .platform-role-cell {
    grid-column: 1 / -1;
  }

  .platform-access-cell {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid #f2f4f7;
  }

  .platform-membership-role-form,
  .platform-password-form {
    align-items: stretch;
    flex-direction: column;
  }

  .message-meter {
    grid-template-columns: 1fr;
  }

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

  .dashboard-header,
  .dashboard-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .message-meter > div + div {
    border-left: 0;
    border-top: 1px solid #e5e7eb;
  }

  .broadcast-composer__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .broadcast-form__grid {
    grid-template-columns: 1fr;
  }

  .broadcast-action-bar {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .chat-frame {
    grid-template-columns: 1fr;
    height: 100%;
    min-height: 0;
  }

  .chat-pane-list {
    border-bottom: 1px solid #e5e7eb;
    border-right: 0;
    max-height: 42vh;
  }

  .chat-pane-list__header {
    align-items: stretch;
  }

  .chat-pane-thread {
    min-height: 52vh;
  }

  .chat-bubble {
    max-width: 92%;
  }

  .broadcast-hero {
    display: grid;
  }

  .broadcast-actions {
    justify-content: flex-start;
  }

  .broadcast-metrics,
  .broadcast-layout,
  .broadcast-response-layout {
    grid-template-columns: 1fr;
  }

  body.debug-panel-open .app-main {
    padding-right: 0;
  }

  .debug-panel {
    width: min(100vw, var(--debug-panel-width, 420px));
  }

  .flash-stack {
    left: 1rem;
    max-width: calc(100vw - 2rem);
    right: 1rem;
    width: auto;
  }
}

/* --- Debug panel (right-side, dev-tools style) --- */
.debug-panel {
  background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 280px;
  position: fixed;
  right: 0;
  top: 0;
  width: var(--debug-panel-width, 420px);
  z-index: 1050;
}

.debug-panel[hidden] {
  display: none;
}

.debug-panel-resizer {
  bottom: 0;
  cursor: col-resize;
  left: -5px;
  position: absolute;
  top: 0;
  width: 10px;
}

.debug-panel-resizer::after {
  background: #d0d5dd;
  bottom: 0;
  content: "";
  left: 4px;
  position: absolute;
  top: 0;
  width: 1px;
}

body.debug-panel-resizing {
  cursor: col-resize;
  user-select: none;
}

.debug-panel-header {
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-shrink: 0;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
}

.debug-panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.debug-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.debug-panel-body .debug-log-entry + .debug-log-entry {
  margin-top: 1rem;
}

/* --- Debug log entries inside panel --- */
.debug-log-entry {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.debug-log-header {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.debug-log-section {
  margin-bottom: 0.5rem;
}

.debug-log-section strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.debug-log-section pre {
  background: #f8f9fa;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  max-height: 240px;
  max-width: 100%;
  overflow: auto;
  padding: 0.5rem 0.75rem;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.debug-btn {
  font-size: 0.6875rem;
  min-height: 1.55rem;
  padding: 0.125rem 0.5rem;
}

/* --- Chat status badge --- */
.chat-status {
  font-weight: 500;
}

/* --- Chat search --- */
.chat-pane-list__header .form-control-sm {
  font-size: 0.8125rem;
}

.chat-search-form {
  min-width: 0;
}

.chat-new-button {
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12);
  flex: 0 0 auto;
}

.chat-new-modal__dialog {
  max-width: 420px;
}

.chat-new-form .modal-body {
  display: grid;
  gap: 0.45rem;
}

.chat-composer__message-wrap {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.chat-composer__meter,
.chat-composer__sms-override {
  font-size: 0.78rem;
  line-height: 1.2;
}

.chat-composer__sms-override,
.auto-mms-hint {
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 0.65rem;
  color: #9a3412;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
}

.chat-composer__sms-override[hidden],
.auto-mms-hint[hidden] {
  display: none !important;
}

.chat-composer__sms-override.is-active,
.auto-mms-hint.is-active {
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.18);
}
