.header-line {
  height: 4rem;
}

body {
  background: var(--cui-body-bg);
  color: var(--cui-body-color);
}

.sidebar {
  border-right: 1px solid rgba(var(--cui-primary-rgb), 0.18);
  box-shadow: 0 8px 30px rgba(var(--cui-primary-rgb), 0.12);
}

.sidebar .sidebar-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0.75rem;
  margin: 0.2rem 0.6rem;
  padding: 0.62rem 2.45rem 0.62rem 0.7rem;
  transition: all 0.2s ease;
}

.sidebar .sidebar-nav .nav-link .nav-icon {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  min-width: 1.1rem;
  margin: 0;
  color: var(--cui-secondary-color);
}

.sidebar .sidebar-nav .nav-group-items .nav-link {
  padding-left: 1.1rem;
}

.sidebar .sidebar-nav .nav-link:hover {
  background: rgba(var(--cui-primary-rgb), 0.12);
}

.sidebar .sidebar-nav .nav-link.active,
.sidebar .sidebar-nav .nav-link[aria-expanded=true] {
  background: rgba(var(--cui-primary-rgb), 0.2);
  color: var(--cui-emphasis-color);
}

.sidebar .sidebar-nav .nav-link.active .nav-icon,
.sidebar .sidebar-nav .nav-link[aria-expanded=true] .nav-icon {
  color: var(--cui-primary);
}

.cm-nav-label-wrap {
  display: inline-flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.cm-nav-label-title {
  line-height: 1.2;
}

.cm-nav-label-description {
  color: var(--cui-secondary-color);
  font-size: 0.69rem;
  line-height: 1.25;
  white-space: normal;
}

.nav-group-items .cm-nav-label-description {
  font-size: 0.66rem;
}

.cm-nav-upgrade-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  color: #f59f00;
  font-size: 0.9rem;
  pointer-events: none;
}

.sidebar .sidebar-nav .nav-link.active .cm-nav-upgrade-badge,
.sidebar .sidebar-nav .nav-link[aria-expanded=true] .cm-nav-upgrade-badge {
  color: #d48806;
}

.card {
  border-radius: 1rem;
  border: 1px solid var(--cui-border-color);
  box-shadow: var(--cui-box-shadow-sm);
}

.cm-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.cm-settings-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  min-height: 9rem;
  padding: 1rem;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.5rem;
  background: var(--cui-body-bg);
  color: var(--cui-body-color);
  box-shadow: var(--cui-box-shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.cm-settings-card--link:hover,
.cm-settings-card--link:focus-visible {
  border-color: rgba(var(--cui-primary-rgb), 0.45);
  color: var(--cui-body-color);
  box-shadow: var(--cui-box-shadow);
  transform: translateY(-1px);
}

.cm-settings-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--cui-tertiary-bg);
  color: var(--cui-primary);
  font-size: 1.1rem;
}

.cm-settings-card__body {
  min-width: 0;
}

.cm-settings-card__title {
  margin: 0;
  color: var(--cui-emphasis-color);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.cm-settings-card__description {
  margin: 0.35rem 0 0;
  color: var(--cui-secondary-color);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cm-settings-card__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.cm-settings-card__item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 0.22rem 0.48rem;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.45rem;
  background: var(--cui-tertiary-bg);
  color: var(--cui-secondary-color);
  font-size: 0.9rem;
  line-height: 1.2;
}

.cm-settings-card__item:hover,
.cm-settings-card__item:focus-visible {
  border-color: rgba(var(--cui-primary-rgb), 0.45);
  color: var(--cui-primary);
}

.cm-settings-card__upgrade {
  color: #f59f00;
  font-size: 0.9rem;
}

.cm-settings-card__arrow {
  align-self: center;
  color: var(--cui-secondary-color);
  font-size: 0.85rem;
}

.breadcrumb {
  --cui-breadcrumb-divider: "/";
  padding: 0.45rem 0.75rem;
  border-radius: 0.65rem;
  background: var(--cui-tertiary-bg);
}

.breadcrumb-item + .breadcrumb-item::before {
  color: var(--cui-secondary-color);
}

.alert {
  border-radius: 0.85rem;
}

.cm-global-notification-content :is(p, h1, h2, h3, h4, h5, h6) {
  margin: 0;
  padding: 0;
}

.cm-header-usage-item {
  display: flex;
  align-items: center;
  margin-right: 0.75rem;
}

.cm-header-usage {
  min-width: 9.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cm-header-usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}

.cm-header-usage-label {
  color: rgba(255, 255, 255, 0.78);
}

.cm-header-usage-value {
  font-weight: 700;
}

.cm-header-usage-track {
  height: 0.2rem;
  margin-top: 0.32rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.cm-header-usage-bar {
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.sidebar-logo-abs {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  height: 35px;
  width: auto;
}

.sidebar-brand-text {
  margin-left: 3rem;
  display: inline-block;
}

.select-auto {
  width: -moz-fit-content;
  width: fit-content;
  min-width: 50px;
}

@media (min-width: 992px) {
  .sidebar ~ .wrapper {
    margin-left: 256px !important;
    transition: margin-left 0.15s ease;
  }
  .sidebar.sidebar-narrow-unfoldable ~ .wrapper {
    margin-left: 4rem !important;
  }
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-brand,
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .cm-nav-label-wrap,
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .cm-nav-upgrade-badge,
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .nav-link > .badge {
    display: none;
  }
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .nav-link {
    justify-content: center;
    margin: 0.2rem 0.35rem;
    padding: 0.72rem 0.4rem;
    overflow: visible;
  }
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .sidebar-nav {
    padding-inline: 0;
  }
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .nav-link .nav-icon {
    flex: 0 0 1.35rem;
    width: 1.35rem;
    min-width: 1.35rem;
    height: 1.35rem;
    margin: 0 auto;
    color: var(--cui-body-color);
    font-size: 1.35rem;
  }
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .nav-link:is(:hover, .active) .nav-icon {
    color: var(--cui-primary);
  }
  .sidebar.sidebar-narrow-unfoldable:not(:hover) .sidebar-nav .nav-group-items .nav-link {
    padding-left: 0.35rem;
  }
}
@media (max-width: 767.98px) {
  .cm-header-usage {
    min-width: 5.5rem;
    padding-inline: 0.5rem;
  }
  .cm-header-usage-label {
    display: none;
  }
}
.cm-campaign-preview .swiper-slide {
  border-radius: 12px;
  overflow: hidden;
}

.cm-campaign-preview .swiper-slide img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.datagrid {
  padding: 0;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--cui-border-color);
  background: var(--cui-body-bg);
}

.datagrid .table,
.datagrid table {
  margin-bottom: 0;
}

.datagrid thead th {
  background: var(--cui-tertiary-bg);
  color: var(--cui-emphasis-color);
  font-weight: 700;
  border-bottom: 1px solid var(--cui-border-color);
}

.datagrid.datagrid-view-grid thead {
  display: none;
}

.datagrid .table-striped > tbody > tr:nth-of-type(odd) > * {
  --cui-table-accent-bg: var(--cui-tertiary-bg);
}

.datagrid .btn,
.datagrid .form-control,
.datagrid .form-select {
  border-radius: 0.6rem;
}

.datagrid .btn[data-bs-target*=row-filters] {
  margin: 0.5rem 0.5rem 0 0.75rem;
}

.datagrid [id*=row-filters] {
  padding: 0.75rem 1rem 0.25rem;
}

.datagrid [id*=row-filters] .row {
  margin-bottom: 0;
}

.datagrid [id*=row-filters] .datagrid-submit-filter {
  margin-top: 0.25rem;
}

.datagrid .cm-grid-card {
  position: relative;
  border-radius: 1rem;
  border: 1px solid var(--cui-border-color);
  overflow: hidden;
  box-shadow: var(--cui-box-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.datagrid .cm-grid-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cui-box-shadow);
}

.datagrid .cm-grid-media {
  position: relative;
}

.datagrid .cm-grid-image {
  height: 200px;
  -o-object-fit: cover;
     object-fit: cover;
  border-bottom: 1px solid var(--cui-border-color);
}

.datagrid .cm-grid-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cui-tertiary-bg);
}

.datagrid .cm-grid-card-body {
  padding: 1.1rem 1.2rem 0.75rem;
}

.datagrid .cm-grid-category {
  letter-spacing: 0.04em;
  font-weight: 600;
}

.datagrid .cm-grid-title {
  min-height: 4.5rem;
  line-height: 1.35;
}

.datagrid .cm-grid-link {
  text-decoration: none;
}

.datagrid .cm-grid-link:hover {
  text-decoration: underline;
}

.datagrid .cm-grid-card-actions .btn {
  padding-inline: 0.45rem;
}

.datagrid .cm-grid-card-footer {
  background: var(--cui-body-bg);
  border-top: 1px solid var(--cui-border-color);
  padding: 0.7rem 1rem;
  min-height: 2.5rem;
}

.datagrid .cm-social-grid-title {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.datagrid .cm-social-grid-title-link {
  display: inline-block;
  width: -moz-fit-content;
  width: fit-content;
  max-width: min(100%, 42rem);
  overflow-wrap: anywhere;
}

.datagrid .cm-social-grid-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.datagrid .cm-social-grid-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.1;
}

.datagrid .cm-social-grid-status--draft {
  color: var(--cui-secondary-color);
}

.datagrid .cm-social-grid-status--now {
  color: var(--cui-primary);
}

.datagrid .cm-social-grid-status--scheduled {
  color: var(--cui-warning);
}

.datagrid .cm-social-grid-status--processing {
  color: var(--cui-info);
}

.datagrid .cm-social-grid-status--posted {
  color: var(--cui-success);
}

.datagrid .cm-social-grid-status--error {
  color: var(--cui-danger);
}

.datagrid .cm-social-grid-status--deleted,
.datagrid .cm-social-grid-status--unknown {
  color: var(--cui-dark);
}

.datagrid .cm-grid-image-status {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.datagrid .cm-grid-image-status .cm-social-grid-status {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.datagrid .cm-grid-image-status .cm-social-grid-status--draft,
.datagrid .cm-grid-image-status .cm-social-grid-status--deleted,
.datagrid .cm-grid-image-status .cm-social-grid-status--unknown {
  color: #f1f5f9;
}

.datagrid .cm-grid-image-status .cm-social-grid-status--now {
  color: #d8c4ff;
}

.datagrid .cm-grid-image-status .cm-social-grid-status--scheduled {
  color: #ffd166;
}

.datagrid .cm-grid-image-status .cm-social-grid-status--processing {
  color: #7dd3fc;
}

.datagrid .cm-grid-image-status .cm-social-grid-status--posted {
  color: #74e39a;
}

.datagrid .cm-grid-image-status .cm-social-grid-status--error {
  color: #ff8a8a;
}

.datagrid .cm-grid-network-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.datagrid .cm-grid-network-chip svg {
  display: block;
  width: 58%;
  height: 58%;
}

.datagrid .cm-grid-network-chip i {
  font-size: 0.72rem;
}

.datagrid .cm-grid-network-chip--facebook {
  background: #1877f2;
  color: #fff;
}

.datagrid .cm-grid-network-chip--instagram {
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 71.429%);
  color: #fff;
}

.datagrid .cm-grid-network-chip--x {
  background: #1b1826;
  color: #fff;
}

.datagrid .cm-grid-network-chip--tiktok {
  background: #25f4ee;
  color: #1b1826;
}

.datagrid .cm-grid-network-chip--youtube {
  background: #ff0000;
  color: #fff;
}

.datagrid .cm-grid-network-chip--linkedin {
  background: #0a66c2;
  color: #fff;
}

.datagrid .cm-grid-network-chip--lnkbio {
  background: var(--cui-primary);
  color: #fff;
}

.datagrid .cm-grid-network-chip--unknown {
  background: var(--cui-tertiary-bg);
  color: var(--cui-secondary-color);
}

.datagrid .cm-grid-status-banner {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  border-radius: 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  pointer-events: none;
  box-shadow: var(--cui-box-shadow-sm);
}

.datagrid .cm-grid-status-banner.is-success {
  background: rgba(var(--cui-success-rgb), 0.95);
}

.datagrid .cm-grid-status-banner.is-warning {
  background: rgba(var(--cui-warning-rgb), 0.95);
  color: var(--cui-dark);
}

.datagrid .cm-grid-status-banner.is-processing {
  background: rgba(var(--cui-info-rgb), 0.95);
  color: var(--cui-dark);
}

.datagrid .cm-grid-status-banner.is-danger {
  background: rgba(var(--cui-danger-rgb), 0.95);
}

.datagrid .cm-grid-status-banner.is-primary {
  background: rgba(var(--cui-primary-rgb), 0.95);
}

.datagrid .cm-grid-status-banner.is-secondary {
  background: rgba(var(--cui-secondary-rgb), 0.95);
}

.datagrid .social-btn {
  cursor: default;
}

/* Smaller social icons inside datagrid (read-only status) */
.datagrid .social-icon {
  width: 32px;
  height: 32px;
  font-size: 15px;
}

/* Disable hover & focus visuals for social buttons inside datagrid */
.datagrid .social-btn,
.datagrid .social-btn:hover,
.datagrid .social-btn:focus,
.datagrid .social-btn:focus-visible,
.datagrid .social-btn:active {
  outline: none !important;
  box-shadow: none !important;
}

/* GRID: no hover styling at all */
.datagrid .social-btn:hover .social-icon {
  background: var(--cui-body-bg) !important;
}

/* GRID: keep active colors even on hover */
.datagrid .social-btn.active:hover .social-icon,
.datagrid .social-btn[aria-pressed=true]:hover .social-icon {
  background: inherit; /* fallback */
}

/* Stronger: explicitly keep your active rule */
.datagrid .social-btn.active:hover .social-icon,
.datagrid .social-btn[aria-pressed=true]:hover .social-icon {
  background: var(--cui-primary) !important;
  border-color: var(--cui-primary) !important;
}

.datagrid .social-btn.active[data-network-toggle=fb]:hover .social-icon,
.datagrid .social-btn[aria-pressed=true][data-network-toggle=fb]:hover .social-icon {
  background: #1877F2 !important;
  border-color: #1877F2 !important;
}

.datagrid .social-btn.active[data-network-toggle=ig]:hover .social-icon,
.datagrid .social-btn[aria-pressed=true][data-network-toggle=ig]:hover .social-icon {
  background: #E1306C !important;
  border-color: #E1306C !important;
}

.datagrid .social-btn.active[data-network-toggle=x]:hover .social-icon,
.datagrid .social-btn[aria-pressed=true][data-network-toggle=x]:hover .social-icon,
.datagrid .social-btn.active[data-network-toggle=tt]:hover .social-icon,
.datagrid .social-btn[aria-pressed=true][data-network-toggle=tt]:hover .social-icon {
  background: #000 !important;
  border-color: #000 !important;
}

.datagrid .social-btn.active[data-network-toggle=yt]:hover .social-icon,
.datagrid .social-btn[aria-pressed=true][data-network-toggle=yt]:hover .social-icon {
  background: #ff0000 !important;
  border-color: #ff0000 !important;
}

.datagrid .social-btn.active[data-network-toggle=in]:hover .social-icon,
.datagrid .social-btn[aria-pressed=true][data-network-toggle=in]:hover .social-icon {
  background: #0a66c2 !important;
  border-color: #0a66c2 !important;
}

.datagrid .row-grid-bottom {
  border: none;
}

@media (max-width: 991.98px) {
  .datagrid.table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 576px) {
  .datagrid .row-grid-bottom .col-pagination {
    width: 100%;
  }
}
.datagrid .cm-error-grid-message {
  max-width: min(95vw, 980px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  font-family: var(--cui-font-monospace);
  font-size: 0.875rem;
}

.datagrid select.selectpicker.form-select-sm,
.datagrid .bootstrap-select > .dropdown-toggle,
.datagrid .bootstrap-select > .dropdown-toggle.btn,
.datagrid .bootstrap-select > .dropdown-toggle.btn-light,
.datagrid .bootstrap-select > .dropdown-toggle.btn-outline-secondary {
  min-height: calc(1.5em + 0.5rem + 2px);
  height: calc(1.5em + 0.5rem + 2px);
  padding-top: 0.25rem;
  padding-left: 0.5rem;
  padding-bottom: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.25;
}
.datagrid select.selectpicker.form-select-sm {
  padding-right: 2rem;
  background-position: right 0.6rem center;
}
.datagrid .bootstrap-select > .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 2rem;
}
.datagrid .bootstrap-select > .dropdown-toggle .filter-option,
.datagrid .bootstrap-select > .dropdown-toggle .filter-option-inner,
.datagrid .bootstrap-select > .dropdown-toggle .filter-option-inner-inner {
  display: flex;
  align-items: center;
  height: 100%;
  line-height: 1.25;
}
.datagrid .bootstrap-select > .dropdown-toggle::after {
  margin-top: 0;
}

[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple,
[data-coreui-theme=dark] .select2-container--default .select2-selection--single {
  border-color: var(--cui-border-color);
  background-color: var(--cui-body-bg);
  color: var(--cui-body-color);
}
[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  border-color: var(--cui-border-color);
  background-color: var(--cui-tertiary-bg);
  color: var(--cui-body-color);
}
[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  border-right-color: var(--cui-border-color);
  color: var(--cui-secondary-color);
}
[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,
[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
  background-color: rgba(var(--cui-danger-rgb), 0.18);
  color: var(--cui-danger);
}
[data-coreui-theme=dark] .select2-container--default .select2-search--inline .select2-search__field,
[data-coreui-theme=dark] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--cui-body-color);
}
[data-coreui-theme=dark] .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--cui-secondary-color);
}
[data-coreui-theme=dark] .select2-dropdown {
  border-color: var(--cui-border-color);
  background-color: var(--cui-body-bg);
  color: var(--cui-body-color);
}
[data-coreui-theme=dark] .select2-search--dropdown .select2-search__field {
  border-color: var(--cui-border-color);
  background-color: var(--cui-body-bg);
  color: var(--cui-body-color);
}
[data-coreui-theme=dark] .select2-results__option {
  color: var(--cui-body-color);
}
[data-coreui-theme=dark] .select2-container--default .select2-results__option--selected {
  background-color: var(--cui-tertiary-bg);
}
[data-coreui-theme=dark] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: var(--cui-primary);
  color: #fff;
}

/* ==========================================================================
   Social picker component
   Relies on variables defined in _variables.scss
   Assumes Bootstrap/CoreUI button reset is already applied
   ========================================================================== */
/* Base circular icon */
.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--cui-border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--cui-body-bg);
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, transform 0.15s ease-in-out;
  /* Icon inherits color from parent */
}
.social-icon i {
  color: var(--cui-body-color);
  transition: color 0.15s ease-in-out;
}

/* Pointer cursor for picker buttons */
#socialPicker .social-btn {
  cursor: pointer;
}

/* Hover state (non-selected only) */
.social-btn:hover .social-icon {
  background: var(--cui-gray-100);
}

/* --------------------------------------------------------------------------
   Selected states
   - .active (fallback)
   - aria-pressed="true"
   - checkbox-driven (.btn-check:checked + label)
   -------------------------------------------------------------------------- */
.social-btn.active .social-icon,
.social-btn[aria-pressed=true] .social-icon,
.btn-check:checked + .social-btn .social-icon {
  background: var(--cui-primary);
  border-color: var(--cui-primary);
  transform: translateY(-1px);
}
.social-btn.active .social-icon i,
.social-btn[aria-pressed=true] .social-icon i,
.btn-check:checked + .social-btn .social-icon i {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Brand-specific overrides
   data-network-toggle is the single source of truth
   -------------------------------------------------------------------------- */
.social-btn.active[data-network-toggle=fb] .social-icon,
.social-btn[aria-pressed=true][data-network-toggle=fb] .social-icon,
.btn-check:checked + .social-btn[data-network-toggle=fb] .social-icon {
  background: #1877F2;
  border-color: #1877F2;
}

.social-btn.active[data-network-toggle=ig] .social-icon,
.social-btn[aria-pressed=true][data-network-toggle=ig] .social-icon,
.btn-check:checked + .social-btn[data-network-toggle=ig] .social-icon {
  background: #E1306C;
  border-color: #E1306C;
}

.social-btn.active[data-network-toggle=x] .social-icon,
.social-btn[aria-pressed=true][data-network-toggle=x] .social-icon,
.btn-check:checked + .social-btn[data-network-toggle=x] .social-icon {
  background: #000000;
  border-color: #000000;
}

.social-btn.active[data-network-toggle=tt] .social-icon,
.social-btn[aria-pressed=true][data-network-toggle=tt] .social-icon,
.btn-check:checked + .social-btn[data-network-toggle=tt] .social-icon {
  background: #000000;
  border-color: #000000;
}

.social-btn.active[data-network-toggle=yt] .social-icon,
.social-btn[aria-pressed=true][data-network-toggle=yt] .social-icon,
.btn-check:checked + .social-btn[data-network-toggle=yt] .social-icon {
  background: #ff0000;
  border-color: #ff0000;
}

.social-btn.active[data-network-toggle=in] .social-icon,
.social-btn[aria-pressed=true][data-network-toggle=in] .social-icon,
.btn-check:checked + .social-btn[data-network-toggle=in] .social-icon {
  background: #0a66c2;
  border-color: #0a66c2;
}

.image-thumb {
  position: relative;
}

.image-thumb img {
  position: relative;
  z-index: 1;
}

.image-action {
  position: absolute;
  z-index: 5;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.image-remove {
  top: 4px;
  left: 4px;
}

.image-edit {
  bottom: 4px;
  right: 4px;
}

.modal-dialog-scrollable .modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.modal-flash-container {
  position: fixed;
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(26rem, 100vw - 2rem);
  pointer-events: none;
}

.modal-flash {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.75rem;
  margin: 0;
  padding: 0.875rem 1rem;
  border: 1px solid var(--cui-border-color);
  border-inline-start-width: 0.25rem;
  border-radius: 0.5rem;
  background: var(--cui-body-bg);
  box-shadow: 0 0.75rem 2rem rgba(8, 10, 12, 0.16);
  color: var(--cui-body-color);
  pointer-events: auto;
}

.modal-flash.alert-success {
  border-color: var(--cui-success-border-subtle);
  border-inline-start-color: var(--cui-success);
}

.modal-flash.alert-danger {
  border-color: var(--cui-danger-border-subtle);
  border-inline-start-color: var(--cui-danger);
}

.modal-flash__icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--cui-success-bg-subtle);
  color: var(--cui-success);
}

.modal-flash.alert-danger .modal-flash__icon {
  background: var(--cui-danger-bg-subtle);
  color: var(--cui-danger);
}

.modal-flash__content {
  min-width: 0;
}

.modal-flash__title,
.modal-flash__message {
  display: block;
}

.modal-flash__title {
  margin-bottom: 0.125rem;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.modal-flash__message {
  color: var(--cui-secondary-color);
  font-size: 0.875rem;
  line-height: 1.35;
}

.modal-flash__close {
  margin: -0.25rem -0.375rem 0 0;
  padding: 0.5rem;
}

.modal-dialog-scrollable .modal-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto; /* take remaining space under header */
  min-height: 0; /* critical */
  overflow: hidden; /* prevents scrollbar on wrapper */
}

.modal-dialog-scrollable .modal-wrap > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0; /* critical */
}

.modal-dialog-scrollable .modal-wrap .modal-body {
  flex: 1 1 auto; /* take remaining height */
  min-height: 0; /* critical */
  overflow-y: auto; /* scrollbar ONLY here */
}

.modal-dialog:has([data-cm=composer]):not(.cm-composer-dialog-windowed),
.cm-composer-dialog {
  margin: 0;
  width: 100vw;
  max-width: none;
  height: 100%;
}
.modal-dialog:has([data-cm=composer]):not(.cm-composer-dialog-windowed) .modal-content,
.cm-composer-dialog .modal-content {
  height: 100vh;
  border: 0;
  border-radius: 0;
}
.modal-dialog:has([data-cm=composer]):not(.cm-composer-dialog-windowed) > .modal-content > .modal-header,
.cm-composer-dialog > .modal-content > .modal-header {
  display: none;
}

.cm-composer-dialog-windowed {
  width: calc(100% - 3rem);
  max-width: 1140px;
}
.cm-composer-dialog-windowed .modal-content {
  max-height: calc(100vh - 3.5rem);
}
.cm-composer-dialog-windowed > .modal-content > .modal-header {
  display: none;
}
.cm-composer-dialog-windowed .cm-composer-editor {
  width: 60%;
}
.cm-composer-dialog-windowed .cm-composer-preview {
  width: 40%;
  padding-inline: 1rem !important;
}
.cm-composer-dialog-windowed .cm-composer-preview .cm-preview-wrap {
  width: 100% !important;
  max-width: 430px;
}
.cm-composer-dialog-windowed .cm-composer-preview [data-cm-preview-text] {
  overflow-wrap: anywhere;
}

.cm-composer-size-toggle {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
}
.cm-composer-size-toggle:hover {
  background: var(--cui-tertiary-bg);
}

.cm-composer-topbar {
  display: flex;
  flex: 0 0 64px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 4rem 0 1.5rem;
  border-bottom: 1px solid var(--cui-border-color);
  background: var(--cui-body-bg);
}

.cm-composer-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.cm-composer-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 !important;
}

.cm-composer-body-inner {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.cm-composer-layout-row {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
}

.cm-composer-networks {
  padding: 0 0 1rem;
}
.cm-composer-networks [data-cm-social-picker] {
  margin-top: 0 !important;
}
.cm-composer-networks .social-picker-body > [data-cm-social-icons] {
  margin-bottom: 1rem !important;
}
.cm-composer-networks [data-cm-networks-accordion] {
  max-width: 920px;
  margin-top: 0.75rem;
}
.cm-composer-networks [data-cm-customize-networks] {
  max-height: 52vh;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.65rem;
  background: var(--cui-body-bg);
}

.cm-composer-editor {
  padding: 1rem 2rem 2rem;
}

.cm-composer-workspace {
  width: min(100%, 744px);
  margin: 0 auto;
}

.cm-shared-composer-input {
  min-height: 260px;
  padding: 0;
}

.cm-editor-wrap.cm-shared-editor-wrap {
  padding: 0.8rem 1rem 0.65rem;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.65rem;
  background: #faf8fc;
}

.cm-editor-wrap.cm-network-editor-wrap {
  background: #faf8fc;
}

.cm-network-editor-wrap .cm-ce-editor {
  background: transparent;
}

.cm-network-first-comment {
  background: #faf8fc;
}

.cm-network-first-comment:focus {
  background: #faf8fc;
}

.cm-shared-composer + [data-cm-template-root] {
  margin-bottom: 1rem !important;
}

.cm-composer-crop-stage {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.cm-composer-crop-stage #original-image {
  display: block;
  max-width: 100%;
  max-height: 58vh;
  margin-inline: auto;
}

.cm-composer-crop-stage .cropper-container {
  position: relative;
  overflow: hidden;
}

.cm-composer-dropzone .cm-dz-tile-edit {
  position: absolute;
  top: auto;
  right: 0.35rem;
  bottom: 0.35rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.4rem;
  background: rgba(20, 17, 27, 0.88);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.cm-composer-dropzone .cm-dz-tile:hover .cm-dz-tile-edit,
.cm-composer-dropzone .cm-dz-tile:focus-within .cm-dz-tile-edit {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cm-composer-dropzone .cm-dz-tile-edit:hover,
.cm-composer-dropzone .cm-dz-tile-edit:focus-visible {
  background: var(--cui-primary);
}

.cm-composer-preview {
  --cm-composer-preview-card-width: 430px;
  min-height: 100%;
  padding: 0 1.5rem 1.5rem !important;
  border-left: 1px solid var(--cui-border-color);
  background: var(--cui-tertiary-bg);
  overflow-x: hidden;
}

.cm-composer-dialog:not(.cm-composer-dialog-windowed) .cm-composer-editor {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
  min-width: 0;
}
.cm-composer-dialog:not(.cm-composer-dialog-windowed) .cm-composer-preview {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  min-width: 0;
}

.cm-composer-preview [data-cm-right-panel] {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent !important;
  background-color: transparent !important;
  --cui-card-bg: transparent;
  box-shadow: none;
}

.cm-composer-preview [data-cm-right-panel].card {
  background: transparent !important;
  background-color: transparent !important;
}

.cm-composer-preview [data-cm-preview-mode] {
  width: 100%;
  min-height: 0;
  min-width: 0;
  padding-right: 0 !important;
  padding-left: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  overflow-x: hidden;
}

.cm-composer-preview [data-cm-preview-empty-warning] {
  width: min(100%, var(--cm-composer-preview-card-width));
  margin-right: auto;
  margin-left: auto;
}

.cm-composer-preview [data-preview-card] {
  width: 100%;
  min-width: 0;
}

.cm-composer-preview .cm-preview-wrap {
  flex: 0 1 var(--cm-composer-preview-card-width);
  width: min(100%, var(--cm-composer-preview-card-width));
  max-width: var(--cm-composer-preview-card-width);
  min-width: 0;
  background: transparent !important;
}

.cm-composer-preview .cm-preview-wrap,
.cm-composer-preview .cm-preview-wrap * {
  min-width: 0;
}

.cm-composer-preview .cm-preview-wrap > .border {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: auto;
  margin-left: auto;
  box-sizing: border-box;
  background: #fff;
}

.cm-composer-preview .cm-preview-wrap [data-cm-preview-text],
.cm-composer-preview .cm-preview-wrap .text-body-secondary,
.cm-composer-preview .cm-preview-wrap .fw-semibold {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cm-composer-networks [data-cm-customize-networks] {
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.cm-composer-networks [data-cm-customize-networks] > .d-flex:first-child {
  min-height: 2.25rem;
}

.cm-network-header {
  display: flex;
  align-items: center;
  background: var(--cui-primary-bg-subtle, #e7dff5);
  cursor: pointer;
}

.cm-network-header .accordion-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding-right: 0.75rem;
  background: transparent;
  box-shadow: none;
}

.cm-network-header .accordion-button::after {
  display: none;
}

.cm-network-header-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-network-header-format {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  padding: 0.75rem 1rem 0.75rem 0;
  font-size: 0.95rem;
  font-weight: 400;
  cursor: default;
}

.cm-network-header-format .form-check {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  margin: 0;
}

.cm-network-header-format .form-check-input {
  width: 1rem;
  height: 1rem;
  margin-top: 0;
}

.cm-network-header-format .form-check-label {
  padding-left: 0.35rem;
  white-space: nowrap;
}

[data-cm=composer].is-customizing-networks .cm-composer-networks {
  padding-bottom: 0;
}

[data-cm=composer].is-customizing-networks .modal-footer {
  justify-content: flex-end !important;
}

[data-cm=composer].is-image-editor .modal-footer {
  justify-content: flex-start !important;
}

[data-cm=composer].is-customizing-networks [data-cm-social-icons] {
  margin-bottom: 1rem !important;
}

[data-cm=composer].is-customizing-networks [data-cm-networks-accordion] {
  margin-top: 0;
}

.cm-composer-dialog [data-cm-dropzone] {
  min-height: 120px;
}

.cm-composer-dialog .cm-dz-empty-inner {
  padding-block: 1rem;
}

.cm-composer-dialog .modal-footer {
  min-height: 70px;
  background: var(--cui-body-bg);
}

@media (max-width: 991.98px) {
  .cm-composer-dialog-windowed .cm-composer-editor,
  .cm-composer-dialog-windowed .cm-composer-preview {
    width: 100%;
  }
  .cm-composer-dialog:not(.cm-composer-dialog-windowed) .cm-composer-editor,
  .cm-composer-dialog:not(.cm-composer-dialog-windowed) .cm-composer-preview {
    flex-basis: 100%;
    max-width: 100%;
  }
  .cm-composer-preview {
    min-height: auto;
    border-top: 1px solid var(--cui-border-color);
    border-left: 0;
  }
  .cm-network-header {
    flex-wrap: wrap;
  }
  .cm-network-header .accordion-button {
    flex-basis: 100%;
  }
  .cm-network-header-format {
    width: 100%;
    padding: 0 1rem 0.85rem;
  }
}
.cm-tiktok-presets .cm-tiktok-account-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  background: #f4f5f7;
  border: 1px solid #eef0f3;
  border-radius: 0.45rem;
}
.cm-tiktok-presets .cm-tiktok-account-avatar {
  display: inline-flex;
  flex: 0 0 1.85rem;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  color: #111827;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}
.cm-tiktok-presets .cm-tiktok-account-body {
  flex: 1 1 auto;
  min-width: 0;
}
.cm-tiktok-presets .cm-tiktok-account-name {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-tiktok-presets .cm-tiktok-account-note {
  margin-top: 0.12rem;
  font-size: 0.78rem;
  line-height: 1.25;
  color: #6b7280;
}
.cm-tiktok-presets .cm-tiktok-account-chevron {
  flex: 0 0 auto;
  font-size: 0.72rem;
  color: #6b7280;
}
.cm-tiktok-presets .cm-ce-editor {
  min-height: 4rem;
  background: #f3f6f8;
  border-radius: 0.35rem;
}
.cm-tiktok-presets .cm-ce-editor[data-cm-empty="1"]::before {
  color: #a8b3c2;
}
.cm-tiktok-presets .cm-tiktok-preset-options {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.cm-tiktok-presets .cm-tiktok-interactions-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #111827;
}
.cm-tiktok-presets .cm-tiktok-interactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
}
.cm-tiktok-presets .cm-tiktok-interactions .form-check {
  display: inline-flex;
  align-items: center;
  min-width: 4.6rem;
}
.cm-tiktok-presets .form-check-input {
  margin-top: 0.2rem;
}
.cm-tiktok-presets .form-check-label {
  padding-left: 0.45rem;
}

.cm-media-picker-dialog {
  width: calc(100% - 2rem);
  max-width: 1040px;
}

@media (max-width: 575.98px) {
  .cm-media-picker-dialog.modal-fullscreen-sm-down {
    width: 100%;
    max-width: none;
  }
}
/* =========================================================
   CM Dropzone (combined + updated)
   - Taller dropzone (more vertical space)
   - Tiles wrap into new rows (no horizontal scroller)
   - Keeps full-area background + centered placeholder
   - Keeps your tile UI + drag hover styling
   ========================================================= */
/* Root (optional hook) */
.cm-dz {
  /* nothing required here */
}

/* Drop area (container) */
.cm-dz-droparea {
  position: relative; /* needed for absolute empty placeholder */
  border: 2px dashed var(--cui-border-color, #ced4da);
  border-radius: 0.75rem;
  padding: 0.9rem; /* smaller than 1.25rem */
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  /* background for whole drop zone */
  background: rgba(0, 0, 0, 0.02);
  /* more vertical space now that you have it */
  min-height: 260px;
  /* Make the droparea host both the empty message and the strip */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cm-dz-droparea:hover {
  border-color: var(--cui-primary, #0d6efd);
  background: rgba(var(--cui-primary-rgb, 13, 110, 253), 0.04);
}
.cm-dz-droparea.dz-drag-hover {
  border-color: var(--cui-primary, #0d6efd);
  background: rgba(var(--cui-primary-rgb, 13, 110, 253), 0.06);
  box-shadow: 0 0 0 0.2rem rgba(var(--cui-primary-rgb, 13, 110, 253), 0.15);
}
.cm-dz-droparea {
  /* We use custom UI inside droparea, so hide Dropzone default message + previews */
}
.cm-dz-droparea .dz-message,
.cm-dz-droparea .dz-preview {
  display: none !important;
}
.cm-dz-droparea {
  /* Hide empty state when strip has tiles (modern browsers) */
}
.cm-dz-droparea:has(.cm-dz-strip:not(:empty)) .cm-dz-empty {
  display: none;
}

/* Tiles container (inside droparea)
   CHANGED:
   - wrap into multiple rows
   - no horizontal scroll
   - behaves like a responsive grid using flex-wrap
*/
.cm-dz-strip {
  position: relative;
  z-index: 2; /* above empty placeholder */
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex-wrap: wrap; /* <-- key change */
  overflow: visible; /* <-- no scrollers */
  padding-bottom: 2px;
  /* optional: keep rows nicely aligned */
  align-content: flex-start;
  /* Hide strip when empty */
}
.cm-dz-strip:empty {
  display: none;
}

/* Empty state message (full droparea placeholder) */
.cm-dz-empty {
  position: absolute;
  inset: 0;
  z-index: 1; /* below strip tiles */
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  color: var(--cui-secondary-color, #6c757d);
  pointer-events: none; /* allow click anywhere to open file dialog */
}
.cm-dz-empty .cm-dz-empty-inner {
  text-align: center;
}
.cm-dz-empty .cm-dz-empty-icon {
  font-size: 34px;
  opacity: 0.55;
  margin-bottom: 0.35rem;
}
.cm-dz-empty .cm-dz-empty-title {
  font-weight: 700;
  color: var(--cui-body-color, #212529);
  opacity: 0.85;
}
.cm-dz-empty .cm-dz-empty-sub {
  font-size: 0.875rem;
  opacity: 0.75;
  margin-top: 0.15rem;
}

/* Fallback: Hide empty state when strip has tiles (older browsers without :has) */
.cm-dz-strip:not(:empty) ~ .cm-dz-empty {
  display: none;
}

/* Thumbnail tile */
.cm-dz-tile {
  position: relative;
  width: 110px; /* slightly larger now that we wrap */
  height: 82px;
  border: 1px solid var(--cui-border-color, #ced4da);
  border-radius: 0.75rem;
  background: var(--cui-body-bg, #fff);
  flex: 0 0 auto;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  overflow: hidden;
}
.cm-dz-tile.opacity-50 {
  opacity: 0.6;
}

.cm-dz-tile-shared-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--cui-border-color, #ced4da);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cui-secondary-color, #6c757d);
  font-size: 11px;
}

/* Optional: keep old size if you prefer */
.cm-dz-tile-img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 0.75rem;
  display: block;
  pointer-events: none; /* prevents drag/select issues */
}

.cm-dz-tile-upload-flow {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
}

.cm-dz-upload-circle {
  --cm-upload-progress: 0%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #bfe3b6;
  background: radial-gradient(closest-side, #fff 88%, transparent 89% 100%), conic-gradient(#bfe3b6 var(--cm-upload-progress), rgba(191, 227, 182, 0.2) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5e8b58;
  font-size: 12px;
  font-weight: 600;
}

.cm-dz-tile-upload-cancel {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--cui-danger, #dc3545);
  color: var(--cui-danger, #dc3545);
  background: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

/* Handle (top-left) */
.cm-dz-tile-handle {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  border-radius: 0.5rem;
  border: 1px solid var(--cui-border-color, #ced4da);
  background: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  z-index: 2;
}
.cm-dz-tile-handle:active {
  cursor: grabbing;
}

/* Remove (top-right) */
.cm-dz-tile-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 0.5rem;
  border: 1px solid var(--cui-danger, #dc3545);
  background: rgba(255, 255, 255, 0.92);
  color: var(--cui-danger, #dc3545);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Progress (bottom) */
.cm-dz-tile-progress {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
  z-index: 2;
}
.cm-dz-tile-progress .cm-dz-tile-progress-bar {
  height: 100%;
  background: var(--cui-primary, #0d6efd);
}

/* Error bubble */
.cm-dz-tile-error {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 6px 8px;
  border-radius: 0.5rem;
  background: rgba(220, 53, 69, 0.12);
  color: var(--cui-danger, #dc3545);
  font-size: 12px;
  z-index: 3;
}

/* Placeholder shown during reorder */
.cm-dz-placeholder {
  border: 2px dashed var(--cui-border-color, #ced4da);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
}

/* Floating tile during pointer reorder */
.cm-dz-dragging {
  opacity: 0.92;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  border-radius: 0.75rem;
}

/* Dragging visuals */
.cm-dz-sortable-chosen {
  opacity: 0.9;
}

.cm-dz-sortable-ghost {
  opacity: 0.35;
}

.cm-dz-sortable-drag {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

/* Optional: while dragging, avoid text selection */
.cm-dz-strip {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* Add-tile (plus button) */
.cm-dz-tile-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--cui-border-color, #ced4da);
  background: transparent;
  padding: 0;
}

.cm-dz-tile-add:hover {
  border-color: var(--cui-primary, #0d6efd);
}

.cm-dz-tile-add-inner {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--cui-body-color, #212529);
}

.cm-dz-tile-edit {
  position: absolute;
  top: 6px;
  right: 34px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cm-dz-tile-edit i {
  font-size: 12px;
}

/* Campaign items scope overrides (bigger tiles + stable layout) */
[data-cm-campaign-items-root] {
  /* Make the drop area not look "stretched" on empty state */
}
[data-cm-campaign-items-root] .cm-dz-droparea {
  min-height: 340px; /* adjust if you want more/less vertical space */
}
[data-cm-campaign-items-root] {
  /* Bigger tiles in this context */
}
[data-cm-campaign-items-root] .cm-dz-tile {
  width: 220px; /* your 2x size baseline */
  height: auto; /* IMPORTANT: override base fixed height */
  aspect-ratio: 4/5; /* consistent with Swiper mobile-friendly ratio */
}
[data-cm-campaign-items-root] {
  /* Ensure the thumbnail always fills the tile correctly */
}
[data-cm-campaign-items-root] .cm-dz-tile-img,
[data-cm-campaign-items-root] .cm-dz-thumb {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
[data-cm-campaign-items-root] {
  /* Optional: make controls scale with the bigger tile */
}
[data-cm-campaign-items-root] .cm-dz-tile-handle,
[data-cm-campaign-items-root] .cm-dz-tile-remove {
  width: 30px;
  height: 30px;
}
[data-cm-campaign-items-root] .cm-dz-tile-edit {
  right: 40px; /* keep spacing from remove button */
  width: 30px;
  height: 30px;
}
[data-cm-campaign-items-root] .cm-dz-tile-add {
  width: 220px;
  height: auto;
  aspect-ratio: 4/5;
}

.cm-font-option {
  padding: 6px 8px;
}

.cm-font-name {
  font-size: 12px;
  opacity: 0.75;
  display: flex;
  gap: 8px;
  align-items: center;
}

.cm-font-preview {
  font-size: 18px;
  line-height: 1.1;
}

.cm-font-selected {
  display: inline-block;
}

.theme-switcher-dropdown {
  --cui-dropdown-min-width: 9rem;
}
.theme-switcher-dropdown [data-theme-check] {
  min-width: 1rem;
  text-align: center;
}

.cm-connection-card {
  position: relative;
}

.cm-connection-card--connected {
  border-color: var(--cui-success) !important;
}

.cm-connection-card__status {
  position: absolute;
  top: 0;
  left: 50%;
  padding: 0 0.65rem;
  background: var(--cui-tertiary-bg);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.cm-connection-avatar {
  width: 3rem;
  height: 3rem;
  -o-object-fit: cover;
     object-fit: cover;
  background: var(--cui-body-bg);
  box-shadow: var(--cui-box-shadow-sm);
}

/* Page */
.cm-flex-minw-0 {
  min-width: 0;
}

/* Preview stage (optional if you already like bg-light) */
#previewMode {
  min-height: 520px;
}

/* The card width like X/Twitter preview */
.cm-preview-card {
  max-width: 440px;
}

/* If your platform templates have a media image, keep it nice */
.cm-preview-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* If you want the image area to behave like a fixed preview window */
.cm-preview-media img {
  max-height: 520px;
  -o-object-fit: cover;
     object-fit: cover;
}

.cm-preview-video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #3d3d3d;
  font-size: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  cursor: pointer;
}

[data-cm-preview-video]:fullscreen {
  width: 100%;
  height: 100%;
  -o-object-fit: contain !important;
     object-fit: contain !important;
  background: #000;
}

[data-cm-preview-video]:-webkit-full-screen {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  background: #000;
}

.cm-yt-preview-card.cm-yt-preview-card-short {
  max-width: 320px !important;
  background: #000 !important;
  border-color: #101010 !important;
}

.cm-yt-short-actions {
  position: absolute;
  right: 12px;
  bottom: 72px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #fff;
  z-index: 4;
}

.cm-yt-short-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.cm-yt-short-action i {
  font-size: 22px;
}

.cm-yt-short-footer {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 4;
}

.cm-yt-short-avatar {
  width: 30px;
  height: 30px;
}

/* Outer container acts as the input field */
.cm-editor-wrap {
  border: 1px solid var(--cui-border-color, #ced4da);
  border-radius: 0.375rem;
  background: var(--cui-body-bg, #fff);
  padding: 0.5rem 0.5rem 0.25rem;
}

/* Focus state for whole block */
.cm-editor-wrap:focus-within {
  border-color: var(--cui-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--cui-primary-rgb), 0.25);
}

/* =========================
   Editor Wrapper (acts like textarea)
   ========================= */
.cm-editor-wrap {
  position: relative;
  border: none;
  border-radius: 0.375rem;
  background: var(--cui-body-bg, #fff);
  padding: 0.5rem 0.75rem 0.35rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus state for whole block */
.cm-editor-wrap:focus-within {
  border-color: var(--cui-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--cui-primary-rgb), 0.25);
}

/* =========================
   Contenteditable editor
   ========================= */
.cm-ce-editor {
  position: relative;
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  min-height: 140px;
  padding: 0;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  font: inherit;
  color: inherit;
}

/* Keep long social copy inside the editor instead of growing the modal body. */
[data-cm=composer] [data-cm-right-root] .cm-ce-editor {
  max-height: clamp(140px, 40vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Remove default WebKit focus outline */
.cm-ce-editor:focus {
  outline: none;
}

/* =========================
   Placeholder (robust version)
   Uses data-cm-empty="1"
   ========================= */
.cm-ce-editor[data-cm-empty="1"]::before {
  content: attr(data-cm-placeholder);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--cui-secondary-color, #6c757d);
  opacity: 0.6;
  pointer-events: none;
  font-weight: 400;
}

/* =========================
   Toolbar section
   ========================= */
.cm-editor-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--cui-border-color, #e9ecef);
}

/* Optional: push counter to right */
.cm-editor-tools .cm-counter {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--cui-secondary-color, #6c757d);
}

/* =========================
   Icon buttons
   ========================= */
.cm-editor-btn {
  border: none;
  background: transparent;
  padding: 0.25rem 0.45rem;
  border-radius: 0.35rem;
  cursor: pointer;
  line-height: 1;
  font-size: 1.1rem;
  transition: background 0.15s ease, transform 0.05s ease;
}

.cm-editor-btn:hover {
  background: var(--cui-tertiary-bg, #f1f3f5);
}

.cm-editor-btn:active {
  transform: translateY(1px);
}

.cm-editor-btn:focus {
  outline: none;
}

.cm-editor-wrap.is-limit {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.2) !important;
}

[data-cm-template-swiper] .swiper-slide {
  width: 120px;
}

.cm-template-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.375rem;
  padding: 0;
}
.cm-template-card.btn {
  border-width: 1px;
  border-color: rgba(108, 117, 125, 0.45);
}
.cm-template-card.btn-primary {
  border-width: 2px;
  border-color: var(--cui-primary, #0d6efd);
  box-shadow: 0 0 0 3px rgba(var(--cui-primary-rgb, 13, 110, 253), 0.45);
}

.cm-template-card-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #e9ecef;
}
.cm-template-card-preview img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

.cm-template-card-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.16) 100%);
}

.cm-template-card-title-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 50%;
  padding: 0.45rem 0.55rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.cm-template-card-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

[data-cm-generated-swiper] .swiper-slide {
  width: 160px;
}

.cm-generated-image-slide {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 0.375rem;
  background: #e9ecef;
}
.cm-generated-image-slide img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}

.cm-generated-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.cm-generated-image-slide-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-campaign-preview .swiper {
  width: 100%;
}

.cm-campaign-preview .swiper-slide img {
  width: 100%;
  height: auto;
  display: block;
}

.cm-campaign-slide-caption {
  margin-top: 8px;
  font-size: 14px;
}

.swiper-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  -o-object-fit: cover;
     object-fit: cover;
}

@media (max-width: 767.98px) {
  #news-social-calendar {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  #news-social-calendar .fc {
    min-width: 720px;
  }
}
/* Stepper base */
.setup-stepper {
  gap: 12px;
}

.setup-step {
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--cui-body-bg, #fff);
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

/* Icon bubble */
.setup-step__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(13, 110, 253, 0.08);
  color: rgb(13, 110, 253);
  flex: 0 0 auto;
}

/* Active step */
.setup-step.is-active {
  border-color: rgba(13, 110, 253, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* Done step */
.setup-step.is-done .setup-step__icon {
  background: rgba(25, 135, 84, 0.1);
  color: rgb(25, 135, 84);
}

/* Hover */
.setup-step:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.ai-flow-stepper {
  gap: 12px;
}

.ai-flow-step {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--cui-body-bg, #fff);
  transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.ai-flow-step__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(13, 110, 253, 0.08);
  color: rgb(13, 110, 253);
  flex: 0 0 auto;
}

.ai-flow-step.is-active {
  border-color: rgba(13, 110, 253, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.ai-flow-step.is-done .ai-flow-step__icon {
  background: rgba(25, 135, 84, 0.1);
  color: rgb(25, 135, 84);
}

.ai-flow-step:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.ai-flow-step.is-disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.ai-flow-step.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.cm-subscription > .cm-subscription__shell > .row > :nth-child(2),
.cm-subscription > .cm-subscription__shell > .row > :nth-child(3) {
  display: none;
}
@media (min-width: 1200px) {
  .cm-subscription > .cm-subscription__shell > .row > .col-xl-3 {
    width: 50%;
  }
}
.cm-subscription__shell {
  border-radius: 22px;
  padding: 2rem;
  background: linear-gradient(170deg, #1d2b52 0%, #1a2748 100%);
  color: #fff;
}
.cm-subscription__header p {
  color: rgba(255, 255, 255, 0.82);
}
.cm-subscription__billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2rem;
}
.cm-subscription__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 54px;
  height: 30px;
}
.cm-subscription__switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.cm-subscription__switch span {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 4px;
  border-radius: 999px;
  background: rgba(var(--cui-primary-rgb), 0.9);
  transition: background 0.2s ease;
}
.cm-subscription__switch span::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.2s ease;
}
.cm-subscription__switch input:checked + span::before {
  transform: translateX(24px);
}
.cm-subscription__plan-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  border-radius: 18px;
  padding: 1.5rem;
  background: rgba(13, 27, 58, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}
.cm-subscription__plan-card.is-active {
  background: linear-gradient(180deg, rgba(21, 128, 61, 0.34) 0%, rgba(13, 27, 58, 0.72) 100%);
  border-color: rgba(134, 239, 172, 0.95);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.22), 0 18px 42px rgba(22, 163, 74, 0.28);
}
.cm-subscription__plan-top {
  display: grid;
  grid-template-rows: auto minmax(72px, auto) minmax(48px, auto) minmax(92px, auto) 1fr;
  row-gap: 0.9rem;
  height: 100%;
}
.cm-subscription__plan-title {
  font-size: 2.1rem;
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.cm-subscription__plan-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  margin: 0;
}
.cm-subscription__cta-wrap {
  display: flex;
  align-items: center;
  margin: 0;
}
.cm-subscription__cta {
  min-width: 170px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(var(--cui-primary-rgb), 0.9);
  background: rgba(var(--cui-primary-rgb), 0.24);
}
.cm-subscription__cta:hover, .cm-subscription__cta:focus {
  color: #fff;
  background: rgba(var(--cui-primary-rgb), 0.38);
}
.cm-subscription__active-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #052e16;
  background: #86efac;
  border: 1px solid #bbf7d0;
}
.cm-subscription__price-block {
  margin: 0;
}
.cm-subscription__price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.cm-subscription__price {
  font-size: 2.1rem;
  font-weight: 700;
}
.cm-subscription__price-meta {
  font-size: 1.25rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  padding-bottom: 0.6rem;
}
.cm-subscription__annual {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
}
.cm-subscription__stats {
  display: grid;
  gap: 0.7rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(188, 239, 133, 0.42);
}
.cm-subscription__stats li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  line-height: 1.4;
}
.cm-subscription__stats i {
  flex: 0 0 auto;
  margin-top: 0.18rem;
  color: #b9ec8d;
  font-size: 1.05rem;
}
.cm-subscription__breakdown {
  margin-top: 4rem;
}
.cm-subscription__breakdown-header {
  max-width: 560px;
  margin: 0 auto 2.75rem;
  text-align: center;
}
.cm-subscription__breakdown-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.12;
}
.cm-subscription__breakdown-header p {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
}
.cm-subscription__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(7, 15, 34, 0.42);
}
.cm-subscription__table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  color: #fff;
}
.cm-subscription__table tr > :nth-child(3),
.cm-subscription__table tr > :nth-child(4) {
  display: none;
}
.cm-subscription__table th,
.cm-subscription__table td {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  vertical-align: middle;
}
.cm-subscription__table th:first-child,
.cm-subscription__table td:first-child {
  border-left: 0;
}
.cm-subscription__table thead th {
  padding-block: 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.cm-subscription__table tbody th {
  width: 25%;
  color: rgba(209, 220, 255, 0.92);
  font-weight: 500;
  text-align: left;
}
.cm-subscription__table tbody td,
.cm-subscription__table tfoot td {
  width: 18.75%;
}
.cm-subscription__table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}
.cm-subscription__table tfoot th,
.cm-subscription__table tfoot td {
  padding-block: 1.25rem;
  border-bottom: 0;
}
.cm-subscription__table .cm-subscription__cta {
  width: 100%;
  max-width: 210px;
  min-width: 0;
  padding-inline: 0.75rem;
}
.cm-subscription__table .cm-subscription__active-pill {
  white-space: nowrap;
}
.cm-subscription__table .is-active {
  background: rgba(var(--cui-primary-rgb), 0.17);
  box-shadow: inset 1px 0 0 rgba(134, 239, 172, 0.14);
}
.cm-subscription__table thead .is-active {
  box-shadow: inset 0 3px 0 #b9ec8d, inset 1px 0 0 rgba(134, 239, 172, 0.14);
}
.cm-subscription__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: rgba(var(--cui-primary-rgb), 0.56);
  font-size: 0.75rem;
}
.cm-subscription__empty {
  color: rgba(255, 255, 255, 0.42);
}
@media (max-width: 1199.98px) {
  .cm-subscription__plan-top {
    grid-template-rows: auto auto auto auto auto;
  }
}
@media (max-width: 767.98px) {
  .cm-subscription__shell {
    padding: 1.25rem;
  }
  .cm-subscription__price {
    font-size: 2.1rem;
  }
  .cm-subscription__breakdown {
    margin-top: 3rem;
  }
  .cm-subscription__breakdown-header {
    margin-bottom: 1.75rem;
  }
}

.cm-subscription-manage__card {
  border-radius: 18px;
  background: var(--cui-body-bg);
  color: var(--cui-body-color);
  box-shadow: 0 18px 44px rgba(var(--cui-elevation-base-color), 0.12);
}
.cm-subscription-manage__notice {
  background-color: rgba(var(--cui-primary-rgb), 0.16);
  color: var(--cui-body-color);
  border: 1px solid rgba(var(--cui-primary-rgb), 0.2);
}
.cm-subscription-manage__plan-box {
  background: var(--cui-tertiary-bg);
  border: 1px solid var(--cui-border-color);
}
.cm-subscription-manage__plan-box hr {
  border-color: var(--cui-border-color);
  opacity: 1;
}

.cm-stripe-checkout {
  min-height: 38rem;
  background: var(--cui-body-bg);
  border-color: var(--cui-border-color);
}
.cm-stripe-checkout iframe {
  color-scheme: inherit;
}

[data-coreui-theme=dark] .cm-stripe-checkout {
  background: var(--cui-body-bg);
}

.doc-shell {
  --doc-sidebar: 296px;
  --doc-border: #d8dbe0;
  --doc-muted: #667085;
  --doc-link: #1f2937;
  --doc-accent: var(--cui-primary, #6f42c1);
  --doc-accent-rgb: var(--cui-primary-rgb, 111, 66, 193);
  --doc-accent-soft: #f0e8ff;
  display: grid;
  grid-template-columns: var(--doc-sidebar) minmax(0, 1fr);
  min-height: 100vh;
  background: #f7f8fa;
  color: #111827;
}

.doc-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--doc-border);
  background: #fff;
}

.doc-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 1rem;
  color: #111827;
  text-decoration: none;
}

.doc-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--doc-accent);
  color: #fff;
}

.doc-nav {
  padding: 0 1rem 1.5rem;
}

.doc-nav-section {
  margin-bottom: 1.35rem;
}

.doc-nav-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-weight: 700;
  color: #111827;
}

.doc-nav-link {
  display: block;
  padding: 0.38rem 0.5rem 0.38rem 1.95rem;
  border-radius: 6px;
  color: var(--doc-link);
  text-decoration: none;
  font-size: 0.94rem;
}
.doc-nav-link:hover, .doc-nav-link.is-active {
  background: var(--doc-accent-soft);
  color: var(--doc-accent);
}

.doc-main {
  min-width: 0;
  background: #fff;
}

.doc-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--doc-border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.doc-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 3.25rem 2rem 5rem;
}

.doc-eyebrow {
  color: var(--doc-accent);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.doc-hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 230px;
  margin: 2rem 0 1.5rem;
  padding: 2rem;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(var(--doc-accent-rgb), 0.96), rgba(88, 86, 214, 0.62)), url("/img/channeldesk-logo.png");
  background-size: cover, auto 150px;
  background-repeat: no-repeat;
  background-position: center, right 2rem center;
  color: #fff;
}

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

.doc-card {
  min-height: 122px;
  padding: 1.1rem;
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-decoration: none;
}
.doc-card:hover {
  border-color: var(--doc-accent);
  box-shadow: 0 10px 26px rgba(var(--doc-accent-rgb), 0.16);
}

.doc-prose {
  min-width: 0;
  font-size: 1.02rem;
  line-height: 1.75;
}
.doc-prose img {
  max-width: 100%;
  height: auto;
}
.doc-prose h2,
.doc-prose h3 {
  margin-top: 2rem;
}
.doc-prose pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
}

.doc-screenshot {
  margin: 1.5rem 0 2rem;
}

.doc-screenshot-frame {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08);
}

.doc-screenshot-image {
  display: block;
  width: 100%;
  min-width: 0;
}

.doc-screenshot figcaption {
  margin-top: 0.65rem;
  color: var(--doc-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (max-width: 991.98px) {
  .doc-shell {
    display: block;
  }
  .doc-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--doc-border);
  }
  .doc-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .doc-topbar {
    padding: 0.85rem 1rem;
  }
}
@media (max-width: 640px) {
  .doc-content {
    padding: 2rem 1rem 4rem;
  }
  .doc-grid,
  .doc-nav {
    grid-template-columns: 1fr;
  }
  .doc-hero {
    min-height: 190px;
  }
}
@media (min-width: 992px) {
  [data-template-editor-root] [data-template-properties] {
    align-self: start;
  }
  [data-template-editor-root] [data-template-properties] > .card {
    max-height: calc(100dvh - 16rem);
  }
  [data-template-editor-root] [data-template-properties] > .card > .card-body {
    max-height: inherit;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
body:has(.video-template-editor) {
  overflow-y: hidden;
}

.body .container-lg:has(.video-template-editor) {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.body .container-lg:has(.video-template-editor) [data-page="Cm:VideoTemplate:edit"] {
  margin-bottom: 0 !important;
}

.body .container-lg:has(.video-template-editor) > .mt-4 {
  display: none;
}

.tab-content:has(> .video-template-editor) {
  overflow: hidden;
}

.video-template-editor {
  --vte-border: #d9dee8;
  --vte-panel: #ffffff;
  --vte-muted: #6b7280;
  --vte-blue: #4f6df5;
  --vte-accent: #111827;
  height: calc(100dvh - 205px);
  min-height: 0;
  width: 100%;
  margin: -0.5rem 0 -1.5rem;
  background: #eef0f4;
  display: grid;
  grid-template-rows: 60px minmax(0, 1fr);
  color: #111827;
  overflow: hidden;
}

.video-template-editor * {
  box-sizing: border-box;
}

.vte-toolbar {
  background: #fff;
  border-bottom: 1px solid var(--vte-border);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
}

.vte-toolbar-left,
.vte-toolbar-center,
.vte-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vte-toolbar-right {
  justify-content: flex-end;
}

.vte-title-input {
  border: 0;
  background: transparent;
  font-weight: 700;
  min-width: 120px;
  width: 220px;
  outline: none;
}

.vte-status {
  color: var(--vte-muted);
  font-size: 12px;
  white-space: nowrap;
}

.vte-icon-button,
.vte-text-button {
  min-width: 36px;
  height: 36px;
  border: 1px solid transparent;
  background: transparent;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 13px;
  text-decoration: none;
}

.vte-icon-button:hover,
.vte-text-button:hover {
  background: #f3f4f6;
  color: #111827;
}

.vte-primary-button {
  height: 40px;
  border: 1px solid var(--vte-blue);
  border-radius: 8px;
  background: var(--vte-blue);
  color: #fff;
  padding: 0 16px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(79, 109, 245, 0.24);
}

.vte-secondary-button {
  height: 40px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 0 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.vte-toolbar-right .vte-secondary-button,
.vte-toolbar-right .vte-primary-button {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 0 0 1px rgba(15, 23, 42, 0.02);
}

.vte-zoom {
  width: 82px;
  height: 36px;
  border: 1px solid var(--vte-border);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
}

.vte-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 380px;
  overflow: hidden;
}

.vte-left-panel,
.vte-right-panel {
  background: var(--vte-panel);
  border-color: var(--vte-border);
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.vte-left-panel {
  border-right: 1px solid var(--vte-border);
}

.vte-right-panel {
  border-left: 1px solid var(--vte-border);
  padding-bottom: 96px;
  scroll-padding-bottom: 96px;
}

.vte-panel-section {
  border-bottom: 1px solid #edf0f5;
  padding: 14px 16px;
}

.vte-panel-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.vte-layer-list {
  display: grid;
  gap: 4px;
}

.vte-add-layer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vte-layer-item {
  width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #111827;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 0 8px;
  text-align: left;
  font-size: 13px;
}

.vte-layer-item[aria-selected=true] {
  background: #5571f4;
  color: #fff;
}

.vte-layer-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vte-layer-action {
  justify-self: end;
  opacity: 0.75;
}

.vte-stage-wrap {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 28px;
}

.vte-stage {
  position: relative;
  background: #6b7280;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.vte-stage-guide {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  opacity: 0.9;
}

.vte-stage-guide-vertical {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
  border-left: 1px dashed #1f7cff;
}

.vte-stage-guide-horizontal {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  border-top: 1px dashed #1f7cff;
}

.vte-stage-layer {
  display: grid;
  min-height: 32px;
  border: 1px solid transparent;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.vte-stage-line {
  display: block;
  white-space: nowrap;
}

.vte-stage-layer.is-selected {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(79, 109, 245, 0.9);
}

.vte-stage-layer.is-selected::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--vte-blue);
}

.vte-static-stage-layer {
  min-height: 0;
  overflow: hidden;
  cursor: move;
}

.vte-static-stage-image {
  place-items: center;
  background: transparent;
  color: #fff;
  font-size: 12px;
}

.vte-static-stage-image.is-empty {
  background: rgba(255, 255, 255, 0.08);
}

.vte-static-stage-text {
  align-items: start;
  justify-items: start;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0;
}

.vte-static-dropzone {
  min-height: 42px;
  border: 1px solid var(--vte-border);
  border-radius: 6px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  cursor: pointer;
}

.vte-static-dropzone.is-dragover {
  border-color: var(--vte-blue);
  background: rgba(79, 109, 245, 0.08);
}

.vte-stage-resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--vte-blue);
  background: #fff;
  z-index: 3;
}

.vte-stage-resize-handle-right {
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.vte-stage-resize-handle-bottom {
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.vte-stage-resize-handle-corner {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.vte-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vte-subtitle-presets {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
}

.vte-subtitle-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.vte-subtitle-edit-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vte-subtitle-edit-title button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #111827;
  display: grid;
  place-items: center;
}

.vte-subtitle-edit-title button:hover {
  background: #f3f4f6;
}

.vte-subtitle-edit-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.vte-subtitle-editor {
  display: grid;
  gap: 12px;
}

.vte-subtitle-editor-card {
  border: 1px solid var(--vte-border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.vte-subtitle-editor-card:first-child {
  border: 0;
  padding: 0;
}

.vte-subtitle-editor-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.vte-subtitle-editor-card p {
  margin: 2px 0 0;
  color: var(--vte-muted);
  font-size: 12px;
}

.vte-subtitle-editor-toggle-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  display: grid;
}

.vte-subtitle-editor-toggle-card button {
  position: relative;
  width: 36px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #d1d5db;
  padding: 0;
}

.vte-subtitle-editor-toggle-card button::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 120ms ease;
}

.vte-subtitle-editor-toggle-card button[aria-pressed=true] {
  background: var(--vte-blue);
}

.vte-subtitle-editor-toggle-card button[aria-pressed=true]::after {
  transform: translateX(14px);
}

.vte-animation-picker,
.vte-background-style-picker,
.vte-line-count-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.vte-animation-picker button,
.vte-background-style-picker button,
.vte-line-count-picker button {
  min-height: 52px;
  border: 1px solid var(--vte-border);
  border-radius: 8px;
  background: #fff;
  color: #111827;
}

.vte-animation-picker button {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
  font-size: 12px;
}

.vte-animation-picker button::before {
  content: "Aa";
  display: grid;
  place-items: center;
  min-width: 42px;
  min-height: 24px;
  border-radius: 6px;
  color: #6b7280;
  background: #f3f4f6;
  font-weight: 700;
}

.vte-animation-picker button[data-video-template-subtitle-animation=fade]::before {
  animation: vte-subtitle-fade 1.4s ease-in-out infinite;
}

.vte-animation-picker button[data-video-template-subtitle-animation=karaoke]::before,
.vte-animation-picker button[data-video-template-subtitle-animation=highlight]::before {
  animation: vte-subtitle-karaoke 1.4s linear infinite;
}

.vte-animation-picker button[data-video-template-subtitle-animation=pop]::before {
  animation: vte-subtitle-pop 1.4s ease-in-out infinite;
}

.vte-animation-picker button[data-video-template-subtitle-animation=float-in]::before {
  animation: vte-subtitle-float-in 1.4s ease-in-out infinite;
}

.vte-animation-picker button[data-video-template-subtitle-animation=impact]::before {
  animation: vte-subtitle-impact 1.4s ease-in-out infinite;
}

.vte-animation-picker button.is-selected,
.vte-background-style-picker button.is-selected,
.vte-line-count-picker button.is-selected {
  border-color: var(--vte-blue);
  background: var(--vte-blue);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(79, 109, 245, 0.18);
}

@keyframes vte-subtitle-fade {
  0%, 100% {
    opacity: 0.4;
  }
  20%, 80% {
    opacity: 1;
  }
}
.vte-stage-word {
  display: inline-block;
  position: relative;
  isolation: isolate;
  z-index: 0;
  color: var(--vte-base-color, #ffffff);
  font-family: var(--vte-base-font-family, inherit);
  font-weight: var(--vte-base-font-weight, inherit);
  animation: vte-subtitle-word-highlight calc(var(--vte-word-count, 1) * 0.65s) linear infinite;
  animation-delay: calc(var(--vte-word-index, 0) * 0.65s);
}

.vte-stage-word::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(var(--vte-highlight-background-padding-y, 8px) * -1) calc(var(--vte-highlight-background-padding-x, 18px) * -1);
  border-radius: var(--vte-highlight-background-radius, 4px);
  background-color: var(--vte-highlight-background-color, #111827);
  opacity: 0;
  animation: vte-subtitle-word-highlight-background calc(var(--vte-word-count, 1) * 0.65s) linear infinite;
  animation-delay: calc(var(--vte-word-index, 0) * 0.65s);
}

.vte-stage-word.is-karaoke::before {
  display: none;
}

.vte-stage-word.is-karaoke {
  animation-name: vte-subtitle-word-karaoke;
}

.vte-stage-word.is-active {
  color: var(--vte-highlight-color, #ffe45e);
  font-family: var(--vte-highlight-font-family, inherit);
  font-weight: var(--vte-highlight-font-weight, inherit);
  animation: none;
}

.vte-stage-word.is-active::before {
  opacity: 1;
  animation: none;
}

@keyframes vte-subtitle-word-highlight {
  0%, 100% {
    color: var(--vte-base-color, #ffffff);
    font-family: var(--vte-base-font-family, inherit);
    font-weight: var(--vte-base-font-weight, inherit);
  }
  0.01%, 12.5% {
    color: var(--vte-highlight-color, #ffe45e);
    font-family: var(--vte-highlight-font-family, inherit);
    font-weight: var(--vte-highlight-font-weight, inherit);
  }
  12.51% {
    color: var(--vte-base-color, #ffffff);
    font-family: var(--vte-base-font-family, inherit);
    font-weight: var(--vte-base-font-weight, inherit);
  }
}
@keyframes vte-subtitle-word-karaoke {
  0%, 100% {
    color: var(--vte-base-color, #ffffff);
    font-family: var(--vte-base-font-family, inherit);
    font-weight: var(--vte-base-font-weight, inherit);
  }
  0.01%, 99.99% {
    color: var(--vte-highlight-color, #ffe45e);
    font-family: var(--vte-highlight-font-family, inherit);
    font-weight: var(--vte-highlight-font-weight, inherit);
  }
}
@keyframes vte-subtitle-word-highlight-background {
  0%, 100% {
    opacity: 0;
  }
  0.01%, 12.5% {
    opacity: 1;
  }
  12.51% {
    opacity: 0;
  }
}
@keyframes vte-subtitle-pop {
  0%, 100% {
    transform: scale(0.9);
  }
  20%, 80% {
    transform: scale(1);
  }
}
@keyframes vte-subtitle-float-in {
  0%, 100% {
    opacity: 0.35;
    transform: translateY(-10px);
  }
  20%, 80% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes vte-subtitle-impact {
  0%, 100% {
    transform: scale(1.18);
  }
  20%, 80% {
    transform: scale(1);
  }
}
.vte-subtitle-preset-category {
  display: grid;
  gap: 8px;
}

.vte-subtitle-preset-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vte-subtitle-preset-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.vte-subtitle-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vte-subtitle-preset {
  position: relative;
  min-height: 62px;
  border: 1px solid var(--vte-border);
  border-radius: 6px;
  background: #b8bcc3;
  display: grid;
  place-items: center;
  padding: 6px;
  overflow: hidden;
}

.vte-subtitle-preset.is-selected {
  border-color: var(--vte-blue);
  box-shadow: 0 0 0 2px rgba(79, 109, 245, 0.18);
}

.vte-subtitle-preset-check {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--vte-blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
}

.vte-subtitle-preset-sample {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vte-subtitle-preset-sample.is-highlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  letter-spacing: 0;
}

.vte-subtitle-preset-sample.is-highlight span {
  display: inline-block;
  line-height: 1.15;
  -webkit-text-stroke: inherit;
}

.vte-subtitle-preset-edit {
  position: absolute;
  right: 6px;
  bottom: 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.vte-subtitle-preset:hover .vte-subtitle-preset-edit,
.vte-subtitle-preset:focus-visible .vte-subtitle-preset-edit {
  opacity: 1;
  transform: translateY(0);
}

.vte-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.vte-field.vte-span-2 {
  grid-column: 1/-1;
}

.vte-field label {
  color: var(--vte-muted);
  font-size: 12px;
  margin: 0;
}

.vte-field input,
.vte-field select,
.vte-field textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--vte-border);
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
  font-size: 13px;
}

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

.vte-field .input-group > input:not([type=color]) {
  flex: 1 1 auto;
  width: 1%;
}

.vte-field .input-group > .btn {
  flex: 0 0 auto;
  min-width: 42px;
}

.vte-field input[type=color] {
  min-height: 0;
  padding: 0;
  border-radius: inherit;
}

.vte-field input:disabled,
.vte-field select:disabled,
.vte-field textarea:disabled {
  background: #eef1f6;
  color: #6b7280;
  border-color: #d5dbe6;
  opacity: 1;
  cursor: not-allowed;
}

.vte-field textarea {
  resize: vertical;
  min-height: 88px;
}

@media (max-width: 1200px) {
  body:has(.video-template-editor) {
    overflow-y: auto;
  }
  .video-template-editor {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .vte-main {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .vte-right-panel {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--vte-border);
  }
}
[data-coreui-theme=dark] .video-template-editor {
  --vte-border: #3a4252;
  --vte-panel: #1f2530;
  --vte-muted: #a6afbf;
  --vte-blue: #6675ff;
  --vte-accent: #f3f6fb;
  background: #171c25;
  color: var(--vte-accent);
}

[data-coreui-theme=dark] .vte-toolbar,
[data-coreui-theme=dark] .vte-left-panel,
[data-coreui-theme=dark] .vte-right-panel,
[data-coreui-theme=dark] .vte-subtitle-editor-card {
  background: var(--vte-panel);
}

[data-coreui-theme=dark] .vte-toolbar {
  border-bottom-color: var(--vte-border);
}

[data-coreui-theme=dark] .vte-left-panel {
  border-right-color: var(--vte-border);
}

[data-coreui-theme=dark] .vte-right-panel {
  border-left-color: var(--vte-border);
}

[data-coreui-theme=dark] .vte-panel-section {
  border-bottom-color: #303747;
}

[data-coreui-theme=dark] .vte-stage-wrap {
  background: #171c25;
}

[data-coreui-theme=dark] .vte-stage {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
}

[data-coreui-theme=dark] .vte-title-input,
[data-coreui-theme=dark] .vte-icon-button,
[data-coreui-theme=dark] .vte-text-button,
[data-coreui-theme=dark] .vte-layer-item,
[data-coreui-theme=dark] .vte-subtitle-edit-title button,
[data-coreui-theme=dark] .vte-panel-title,
[data-coreui-theme=dark] .vte-subtitle-edit-header h2,
[data-coreui-theme=dark] .vte-subtitle-editor-card h3,
[data-coreui-theme=dark] .vte-subtitle-preset-heading h3 {
  color: var(--vte-accent);
}

[data-coreui-theme=dark] .vte-icon-button:hover,
[data-coreui-theme=dark] .vte-text-button:hover,
[data-coreui-theme=dark] .vte-subtitle-edit-title button:hover {
  background: #2b3342;
  color: #fff;
}

[data-coreui-theme=dark] .vte-secondary-button,
[data-coreui-theme=dark] .vte-zoom,
[data-coreui-theme=dark] .vte-field input,
[data-coreui-theme=dark] .vte-field select,
[data-coreui-theme=dark] .vte-field textarea,
[data-coreui-theme=dark] .vte-animation-picker button,
[data-coreui-theme=dark] .vte-background-style-picker button,
[data-coreui-theme=dark] .vte-line-count-picker button {
  border-color: var(--vte-border);
  background: #252c39;
  color: var(--vte-accent);
  box-shadow: none;
}

[data-coreui-theme=dark] .vte-field input::-moz-placeholder, [data-coreui-theme=dark] .vte-field textarea::-moz-placeholder {
  color: #7f8a9b;
}

[data-coreui-theme=dark] .vte-field input::placeholder,
[data-coreui-theme=dark] .vte-field textarea::placeholder {
  color: #7f8a9b;
}

[data-coreui-theme=dark] .vte-field input:disabled,
[data-coreui-theme=dark] .vte-field select:disabled,
[data-coreui-theme=dark] .vte-field textarea:disabled {
  border-color: #3a4252;
  background: #1b202b;
  color: #8f9aad;
}

[data-coreui-theme=dark] .vte-toolbar-right .vte-secondary-button,
[data-coreui-theme=dark] .vte-toolbar-right .vte-primary-button {
  box-shadow: none;
}

[data-coreui-theme=dark] .vte-animation-picker button::before {
  background: #303747;
  color: #b5bdcb;
}

[data-coreui-theme=dark] .vte-subtitle-editor-toggle-card button {
  background: #454e61;
}

[data-coreui-theme=dark] .vte-subtitle-editor-toggle-card button::after {
  background: #f8fafc;
}

[data-coreui-theme=dark] .vte-subtitle-preset {
  border-color: var(--vte-border);
  background: #4b5565;
}

[data-coreui-theme=dark] .vte-subtitle-preset-edit {
  background: rgba(31, 37, 48, 0.92);
  color: var(--vte-accent);
}

[data-coreui-theme=dark] .vte-field .input-group > .btn {
  border-color: var(--vte-border);
  background: #252c39;
  color: var(--vte-accent);
}

.cm-media-dropzone {
  position: relative;
  display: flex;
  min-height: 220px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--cui-border-color);
  border-radius: 8px;
  background: var(--cui-tertiary-bg);
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cm-media-dropzone input[type=file] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.cm-media-dropzone.is-dragover {
  border-color: var(--cui-primary);
  background: var(--cui-primary-bg-subtle);
}

.cm-media-dropzone-icon {
  margin-bottom: 12px;
  color: var(--cui-primary);
  font-size: 28px;
}

.cm-transcript-segments {
  display: grid;
  gap: 10px;
}

.cm-transcript-segment {
  width: 100%;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  padding: 8px 10px;
  color: inherit;
  text-align: left;
}

.cm-transcript-segment:hover,
.cm-transcript-segment.is-active {
  border-left-color: var(--cui-primary);
  background: var(--cui-tertiary-bg);
}

.cm-transcript-time {
  display: none;
  margin-right: 8px;
  color: var(--cui-secondary-color);
}

.cm-transcript-segments.show-timestamps .cm-transcript-time {
  display: inline;
}

.cm-subtitle-segments {
  display: grid;
  gap: 12px;
}

.cm-subtitle-segment {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px;
  border-left: 3px solid transparent;
}

.cm-subtitle-segment.is-active {
  border-left-color: var(--cui-primary);
  background: var(--cui-tertiary-bg);
}

.cm-subtitle-play {
  display: inline-flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--cui-border-color);
  border-radius: var(--cui-border-radius);
  background: var(--cui-tertiary-bg);
  color: inherit;
}

.cm-subtitle-time {
  display: none;
  color: var(--cui-secondary-color);
}

.cm-subtitle-segments.show-timestamps .cm-subtitle-time {
  display: inline;
}

@media (max-width: 767.98px) {
  .cm-subtitle-segment {
    grid-template-columns: 1fr;
  }
  .cm-subtitle-play {
    min-height: 40px;
    justify-content: flex-start;
    padding-inline: 12px;
  }
}
.cm-subtitle-stepper .setup-step.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: var(--cui-secondary-color);
  pointer-events: none;
}

.cm-subtitle-upload-grid {
  display: grid;
  width: min(100%, 660px);
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin: 0 auto;
}

.cm-subtitle-upload-panel {
  min-width: 0;
}

.cm-subtitle-video-shell__canvas {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 9/16;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(180deg, #eaf7f6 0%, #d8e6ee 46%, #282c35 47%, #171a20 100%);
}

.cm-subtitle-processing {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 640px;
  margin: 48px auto;
  padding: 24px;
  border: 1px solid var(--cui-border-color);
  border-radius: 8px;
  background: var(--cui-tertiary-bg);
}

.cm-subtitle-editor {
  --cm-subtitle-editor-preview-height: 764px;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  min-height: calc(100vh - 330px);
}

.cm-subtitle-editor__sidebar {
  display: flex;
  height: var(--cm-subtitle-editor-preview-height);
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--cui-border-color);
  padding-right: 18px;
}

.cm-subtitle-editor__sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.cm-subtitle-editor__title {
  font-size: 1.125rem;
  font-weight: 700;
}

.cm-subtitle-editor__tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cm-subtitle-icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cui-secondary-color);
}

.cm-subtitle-icon-button:hover,
.cm-subtitle-icon-button:focus-visible {
  background: var(--cui-tertiary-bg);
  color: var(--cui-body-color);
}

.cm-subtitle-editor .cm-subtitle-segments {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.cm-subtitle-editor .cm-subtitle-segment {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 0 10px 14px;
  border-left: 2px solid transparent;
}

.cm-subtitle-editor .cm-subtitle-segments.show-timestamps .cm-subtitle-segment {
  grid-template-columns: 58px minmax(0, 1fr) 28px;
  padding-left: 0;
}

.cm-subtitle-editor .cm-subtitle-time {
  display: none;
  align-items: center;
  justify-content: flex-end;
  min-height: 54px;
  color: var(--cui-secondary-color);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cm-subtitle-editor .cm-subtitle-segments.show-timestamps .cm-subtitle-time {
  display: inline-flex;
}

.cm-subtitle-editor textarea {
  min-height: 54px;
  resize: vertical;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.95rem;
  line-height: 1.45;
}

.cm-subtitle-editor textarea:focus {
  background: transparent;
  box-shadow: none;
}

.cm-subtitle-editor .cm-subtitle-segment.is-active {
  border-left-color: var(--cui-primary);
  background: color-mix(in srgb, var(--cui-primary) 7%, transparent);
}

.cm-subtitle-segment-menu {
  position: relative;
}

.cm-subtitle-segment-menu__button {
  display: inline-flex;
  width: 28px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cui-secondary-color);
}

.cm-subtitle-segment-menu__button:hover,
.cm-subtitle-segment-menu__button:focus-visible {
  background: var(--cui-tertiary-bg);
  color: var(--cui-danger);
}

.cm-subtitle-segment-menu__dropdown {
  position: absolute;
  z-index: 5;
  top: 48px;
  right: 0;
  display: none;
  min-width: 110px;
  padding: 6px;
  border: 1px solid var(--cui-border-color);
  border-radius: 8px;
  background: var(--cui-body-bg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.cm-subtitle-segment.is-menu-open .cm-subtitle-segment-menu__dropdown {
  display: block;
}

.cm-subtitle-segment-menu__dropdown button {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 7px 9px;
  color: var(--cui-danger);
  text-align: left;
}

.cm-subtitle-segment-menu__dropdown button:hover,
.cm-subtitle-segment-menu__dropdown button:focus-visible {
  background: var(--cui-danger-bg-subtle);
}

.cm-subtitle-editor__stage {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.cm-subtitle-video-shell {
  display: flex;
  width: 100%;
  height: var(--cm-subtitle-editor-preview-height);
  min-height: 0;
  align-items: center;
  justify-content: center;
  background: var(--cui-tertiary-bg);
}

.cm-subtitle-video-shell__canvas {
  width: auto;
  height: 100%;
  max-width: min(100%, 430px);
  max-height: 100%;
  background: #111;
}

.cm-subtitle-video-shell__canvas video {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.cm-subtitle-video-shell__canvas video:fullscreen,
.cm-subtitle-render__main video:fullscreen {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  background: #000;
}

.cm-subtitle-video-shell__canvas video:-webkit-full-screen,
.cm-subtitle-render__main video:-webkit-full-screen {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.cm-subtitle-video-shell .vte-stage-layer {
  z-index: 2;
  display: grid;
  min-height: 32px;
  border: 1px solid transparent;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  pointer-events: none;
}

.cm-subtitle-video-shell .vte-stage-line {
  display: block;
  white-space: nowrap;
}

.cm-subtitle-video-shell .vte-stage-word {
  display: inline-block;
  position: relative;
  isolation: isolate;
  z-index: 0;
  color: var(--vte-base-color, #ffffff);
  font-family: var(--vte-base-font-family, inherit);
  font-weight: var(--vte-base-font-weight, inherit);
  animation: vte-subtitle-word-highlight calc(var(--vte-word-count, 1) * 0.65s) linear infinite;
  animation-delay: calc(var(--vte-word-index, 0) * 0.65s);
}

.cm-subtitle-video-shell .vte-stage-word::before {
  position: absolute;
  z-index: -1;
  inset: calc(var(--vte-highlight-background-padding-y, 8px) * -1) calc(var(--vte-highlight-background-padding-x, 18px) * -1);
  border-radius: var(--vte-highlight-background-radius, 4px);
  background-color: var(--vte-highlight-background-color, #111827);
  content: "";
  opacity: 0;
  animation: vte-subtitle-word-highlight-background calc(var(--vte-word-count, 1) * 0.65s) linear infinite;
  animation-delay: calc(var(--vte-word-index, 0) * 0.65s);
}

.cm-subtitle-video-shell .vte-stage-word.is-karaoke::before {
  display: none;
}

.cm-subtitle-video-shell .vte-stage-word.is-karaoke {
  animation-name: vte-subtitle-word-karaoke;
}

.cm-subtitle-video-shell .vte-stage-word.is-active {
  color: var(--vte-highlight-color, #ffe45e);
  font-family: var(--vte-highlight-font-family, inherit);
  font-weight: var(--vte-highlight-font-weight, inherit);
  animation: none;
}

.cm-subtitle-video-shell .vte-stage-word.is-active::before {
  opacity: 1;
  animation: none;
}

@keyframes vte-subtitle-word-highlight {
  0%, 100% {
    color: var(--vte-base-color, #ffffff);
    font-family: var(--vte-base-font-family, inherit);
    font-weight: var(--vte-base-font-weight, inherit);
  }
  0.01%, 12.5% {
    color: var(--vte-highlight-color, #ffe45e);
    font-family: var(--vte-highlight-font-family, inherit);
    font-weight: var(--vte-highlight-font-weight, inherit);
  }
  12.51% {
    color: var(--vte-base-color, #ffffff);
    font-family: var(--vte-base-font-family, inherit);
    font-weight: var(--vte-base-font-weight, inherit);
  }
}
@keyframes vte-subtitle-word-karaoke {
  0%, 100% {
    color: var(--vte-base-color, #ffffff);
    font-family: var(--vte-base-font-family, inherit);
    font-weight: var(--vte-base-font-weight, inherit);
  }
  0.01%, 99.99% {
    color: var(--vte-highlight-color, #ffe45e);
    font-family: var(--vte-highlight-font-family, inherit);
    font-weight: var(--vte-highlight-font-weight, inherit);
  }
}
@keyframes vte-subtitle-word-highlight-background {
  0%, 100% {
    opacity: 0;
  }
  0.01%, 12.5% {
    opacity: 1;
  }
  12.51% {
    opacity: 0;
  }
}
@keyframes vte-subtitle-fade {
  0%, 100% {
    opacity: 0.4;
  }
  20%, 80% {
    opacity: 1;
  }
}
@keyframes vte-subtitle-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes vte-subtitle-pop {
  0%, 100% {
    transform: scale(0.9);
  }
  20%, 80% {
    transform: scale(1);
  }
}
@keyframes vte-subtitle-float-in {
  0%, 100% {
    opacity: 0.35;
    transform: translateY(-10px);
  }
  20%, 80% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes vte-subtitle-impact {
  0%, 100% {
    transform: scale(1.18);
  }
  20%, 80% {
    transform: scale(1);
  }
}
.cm-subtitle-timeline {
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border-top: 1px solid var(--cui-border-color);
  background: var(--cui-body-bg);
}

.cm-subtitle-timeline__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.cm-subtitle-timeline__time {
  min-width: 128px;
  color: var(--cui-secondary-color);
  font-size: 0.875rem;
}

.cm-subtitle-timeline__ruler {
  position: relative;
  height: 14px;
  margin-bottom: 4px;
  background-image: repeating-linear-gradient(to right, var(--cui-border-color) 0, var(--cui-border-color) 1px, transparent 1px, transparent 7.5%);
}

.cm-subtitle-timeline__ruler-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--cui-secondary-color);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cm-subtitle-timeline__ruler-label:first-child {
  transform: none;
}

.cm-subtitle-timeline__track {
  position: relative;
  height: 74px;
  overflow: hidden;
  border: 1px solid var(--cui-border-color);
  border-radius: 6px;
  background: linear-gradient(180deg, transparent 0 34px, rgba(51, 153, 255, 0.2) 35px 100%), repeating-linear-gradient(90deg, rgba(51, 153, 255, 0.45) 0 3px, rgba(51, 153, 255, 0.2) 3px 7px);
}

.cm-subtitle-timeline__track.is-scrubbing {
  cursor: ew-resize;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.cm-subtitle-timeline__segment {
  position: absolute;
  top: 8px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(100, 55, 220, 0.5);
  border-radius: 5px;
  background: #8d5cf6;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.05;
  text-align: center;
}

.cm-subtitle-timeline__segment.is-active {
  background: #673ab7;
  box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.24);
}

.cm-subtitle-timeline__playhead {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 0;
  width: 24px;
  transform: translateX(-12px);
  cursor: ew-resize;
  touch-action: none;
}

.cm-subtitle-timeline__playhead::before {
  position: absolute;
  top: -1px;
  left: 5px;
  width: 14px;
  height: 12px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: var(--cui-primary);
  content: "";
}

.cm-subtitle-timeline__playhead::after {
  position: absolute;
  top: 9px;
  bottom: 0;
  left: 11px;
  width: 2px;
  background: var(--cui-primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
  content: "";
}

.cm-subtitle-editor__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
}

.cm-subtitle-render {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 24px 0 8px;
}

.cm-subtitle-render__main {
  width: min(100%, 560px);
  text-align: center;
}

.cm-subtitle-render__main video {
  width: 100%;
  max-height: calc(100vh - 280px);
  border-radius: 8px;
  background: #000;
}

.cm-subtitle-render__pending {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--cui-border-color);
  border-radius: 8px;
  background: var(--cui-tertiary-bg);
}

.cm-subtitle-render__actions {
  display: flex;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .cm-subtitle-upload-grid,
  .cm-subtitle-editor {
    --cm-subtitle-editor-preview-height: 420px;
    grid-template-columns: 1fr;
  }
  .cm-subtitle-editor__sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--cui-border-color);
    padding-right: 0;
    padding-bottom: 18px;
  }
  .cm-subtitle-video-shell {
    min-height: 420px;
  }
}
.cm-render-preview {
  max-width: 720px;
}

.cm-render-preview video {
  display: block;
  max-height: 420px;
  background: #000;
}

.cm-render-pending {
  min-height: 320px;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  background: #f7f8fb;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: #111827;
}

.reports-page,
.reports-page .card-body,
.reports-post-grid,
.reports-post-grid .datagrid,
.reports-post-grid .datagrid > div,
.reports-post-grid .datagrid form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.reports-page,
.reports-post-grid,
.reports-post-grid .datagrid,
.reports-post-grid .datagrid > div,
.reports-post-grid .datagrid form {
  overflow: hidden;
}

.reports-post-grid .reports-col-wide {
  min-width: 110px;
  white-space: nowrap;
}

.reports-balance-cards {
  width: min(100%, 600px);
}

.reports-interaction-cards {
  width: min(100%, 960px);
}

.reports-range-menu {
  width: min(820px, 100vw - 2rem);
}

.reports-range-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
}

.reports-range-calendar {
  min-width: 0;
  overflow-x: auto;
}
.reports-range-calendar .flatpickr-calendar.inline {
  top: 0;
  width: 307.875px;
  max-width: 307.875px;
  box-shadow: none;
}
.reports-range-calendar .flatpickr-calendar.inline.multiMonth {
  width: 615.75px;
  max-width: 615.75px;
}

.reports-range-presets {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.reports-range-presets .dropdown-item {
  white-space: normal;
}

.reports-growth-chart,
.reports-balance-chart,
.reports-interactions-chart {
  height: 320px;
}

.bg-pink-subtle {
  background-color: rgba(214, 51, 132, 0.18) !important;
}

.bg-purple-subtle {
  background-color: rgba(111, 66, 193, 0.18) !important;
}

.reports-metric-card {
  position: relative;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}
.reports-metric-card:hover {
  transform: translateY(-1px);
}
.reports-metric-card:focus-visible {
  outline: 3px solid rgb(var(--cui-primary-rgb)/30%);
  outline-offset: 2px;
}
.reports-metric-card.is-disabled, .reports-metric-card[aria-pressed=false] {
  opacity: 0.28 !important;
  filter: saturate(0.3) !important;
}

.reports-comparison-tooltip {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  left: 50%;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: -moz-max-content;
  min-width: max-content;
  padding: 0.65rem 0.85rem;
  color: var(--cui-body-color);
  text-align: left;
  pointer-events: none;
  visibility: hidden;
  background: var(--cui-body-bg);
  border: 1px solid var(--cui-border-color);
  border-radius: var(--cui-border-radius);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateX(-50%) translateY(0.25rem);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}
.reports-comparison-tooltip::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0.75rem;
  height: 0.75rem;
  content: "";
  background: var(--cui-body-bg);
  border-right: 1px solid var(--cui-border-color);
  border-bottom: 1px solid var(--cui-border-color);
  transform: translate(-50%, -50%) rotate(45deg);
}

.reports-metric-card:hover .reports-comparison-tooltip,
.reports-metric-card:focus-visible .reports-comparison-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 991.98px) {
  .reports-range-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .reports-range-presets {
    border-left: 0 !important;
    border-top: 1px solid var(--cui-border-color);
  }
}
.reports-post-table-scroll {
  --reports-id-column-width: 72px;
  --reports-posts-column-width: 480px;
  --reports-type-column-width: 110px;
  --reports-published-column-width: 150px;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  container-type: inline-size;
}
.reports-post-table-scroll table {
  width: 100%;
  min-width: 1450px;
}
.reports-post-table-scroll .col-id,
.reports-post-table-scroll .col-message,
.reports-post-table-scroll .col-content_type,
.reports-post-table-scroll .col-published_at {
  position: sticky;
  background: var(--cui-body-bg);
}
.reports-post-table-scroll .col-id {
  left: 0;
  width: var(--reports-id-column-width);
  min-width: var(--reports-id-column-width);
  max-width: var(--reports-id-column-width);
  z-index: 3;
}
.reports-post-table-scroll .col-message {
  left: var(--reports-id-column-width);
  width: var(--reports-posts-column-width);
  min-width: var(--reports-posts-column-width);
  max-width: var(--reports-posts-column-width);
  z-index: 2;
}
.reports-post-table-scroll .col-content_type {
  left: calc(var(--reports-id-column-width) + var(--reports-posts-column-width));
  width: var(--reports-type-column-width);
  min-width: var(--reports-type-column-width);
  max-width: var(--reports-type-column-width);
  z-index: 2;
}
.reports-post-table-scroll .col-published_at {
  left: calc(var(--reports-id-column-width) + var(--reports-posts-column-width) + var(--reports-type-column-width));
  width: var(--reports-published-column-width);
  min-width: var(--reports-published-column-width);
  max-width: var(--reports-published-column-width);
  z-index: 2;
  box-shadow: 0.65rem 0 0.75rem -0.75rem rgba(0, 0, 0, 0.35);
}
.reports-post-table-scroll thead .col-id,
.reports-post-table-scroll thead .col-message,
.reports-post-table-scroll thead .col-content_type,
.reports-post-table-scroll thead .col-published_at {
  z-index: 5;
  background: var(--cui-tertiary-bg);
}
.reports-post-table-scroll .table-striped > tbody > tr:nth-of-type(odd) > .col-id,
.reports-post-table-scroll .table-striped > tbody > tr:nth-of-type(odd) > .col-message,
.reports-post-table-scroll .table-striped > tbody > tr:nth-of-type(odd) > .col-content_type,
.reports-post-table-scroll .table-striped > tbody > tr:nth-of-type(odd) > .col-published_at {
  background: var(--cui-tertiary-bg);
}
.reports-post-table-scroll .row-grid-bottom {
  padding: 0 !important;
}
.reports-post-table-scroll .row-grid-bottom > .d-flex {
  position: sticky;
  left: 0;
  width: 100cqi;
  min-width: 0;
  padding: 1rem;
  background: var(--cui-tertiary-bg);
}

.reports-demographics-list .reports-demographics-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.reports-demographics-list .reports-demographics-label {
  min-width: 11rem;
  font-size: 0.875rem;
}
.reports-demographics-list .reports-demographics-track {
  flex-grow: 1;
  height: 0.5rem;
}
.reports-demographics-list .reports-demographics-fill {
  width: var(--reports-demographics-width, 0%);
}
.reports-demographics-list .reports-demographics-value {
  min-width: 3.5rem;
  font-size: 0.875rem;
  color: var(--cui-secondary-color);
}

.reports-demo-color-0 {
  background-color: #4e63f1;
}

.reports-demo-color-1 {
  background-color: #198754;
}

.reports-demo-color-2 {
  background-color: #d63384;
}

.reports-demo-color-3 {
  background-color: #fd7e14;
}

.reports-demo-color-4 {
  background-color: #6f42c1;
}

.reports-demo-color-5 {
  background-color: #0dcaf0;
}

.reports-demo-color-6 {
  background-color: #e8590c;
}

.reports-demo-color-7 {
  background-color: #20c997;
}

.reports-demo-color-others {
  background-color: #adb5bd;
}

.data-flow-editor {
  min-height: calc(100vh - 150px);
  border: 1px solid var(--cui-border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--cui-body-bg);
}

.data-flow-editor__header {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cui-border-color);
}

.data-flow-editor__name {
  width: min(320px, 32vw);
  font-weight: 600;
}

.data-flow-editor__workspace {
  min-height: calc(100vh - 210px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.data-flow-canvas {
  position: relative;
  display: grid;
  place-items: center;
  padding: 3rem;
  overflow: auto;
  background-color: #faf9f7;
}

.data-flow-canvas__grid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(#c9c5bf 1px, transparent 1px);
  background-size: 16px 16px;
}

.data-flow-canvas__nodes {
  position: relative;
  z-index: 1;
  width: min(360px, 90%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.data-flow-node {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  text-align: left;
  color: var(--cui-body-color);
  background: var(--cui-body-bg);
  border: 1px solid var(--cui-border-color);
  border-radius: 0.6rem;
  box-shadow: 0 5px 18px rgba(30, 35, 45, 0.08);
}

.data-flow-node.is-selected {
  border: 2px solid var(--cui-primary);
  padding: calc(1rem - 1px);
}

.data-flow-node__status {
  color: var(--cui-success);
}

.data-flow-node__content {
  display: flex;
  flex-direction: column;
}

.data-flow-node__content small {
  color: var(--cui-secondary-color);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.data-flow-connector {
  position: relative;
  width: 2px;
  height: 42px;
  background: var(--cui-primary);
}

.data-flow-insert {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--cui-primary);
  border-radius: 50%;
  color: var(--cui-primary);
  background: var(--cui-body-bg);
  transform: translate(-50%, -50%);
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.data-flow-insert:hover {
  color: #fff;
  background: var(--cui-primary);
  transform: translate(-50%, -50%) scale(1.08);
}

.data-flow-insert i {
  font-size: 0.7rem;
}

.data-flow-add {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-top: 16px;
  border: 1px solid var(--cui-primary);
  border-radius: 50%;
  color: var(--cui-primary);
  background: var(--cui-body-bg);
}

.data-flow-node-picker {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.5rem;
  background: var(--cui-body-bg);
  box-shadow: 0 5px 18px rgba(30, 35, 45, 0.08);
}

.data-flow-node-picker button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 0;
  border-radius: 0.35rem;
  text-align: left;
  color: var(--cui-body-color);
  background: transparent;
}

.data-flow-node-picker button:hover {
  background: var(--cui-tertiary-bg);
}

.data-flow-node-picker span {
  display: flex;
  flex-direction: column;
}

.data-flow-node-picker small {
  color: var(--cui-secondary-color);
}

.data-flow-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--cui-border-color);
  background: var(--cui-body-bg);
}

.data-flow-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--cui-border-color);
}

.data-flow-panel__step {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 0.5rem;
  border-radius: 0.35rem;
  color: #fff;
  background: var(--cui-primary);
}

.data-flow-panel__tabs {
  display: flex;
  border-bottom: 1px solid var(--cui-border-color);
}

.data-flow-panel__tabs button {
  flex: 1;
  padding: 0.8rem 0.5rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--cui-secondary-color);
  background: transparent;
}

.data-flow-panel__tabs button.is-active {
  border-bottom-color: var(--cui-primary);
  color: var(--cui-primary);
}

.data-flow-panel__body {
  flex: 1;
  padding: 1.25rem;
  overflow: auto;
}

.data-flow-panel__footer {
  min-height: 56px;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--cui-border-color);
}

.data-flow-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.data-flow-mappings {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
}

.data-flow-mappings > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.35rem;
  background: var(--cui-tertiary-bg);
}

.data-flow-mappings span {
  overflow: hidden;
  color: var(--cui-secondary-color);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-flow-mappings button {
  border: 0;
  color: var(--cui-secondary-color);
  background: transparent;
}

.data-flow-input-group {
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.4rem;
  background: var(--cui-tertiary-bg);
}

.data-flow-advanced {
  margin-top: 1rem;
}

.data-flow-advanced > summary {
  cursor: pointer;
  color: var(--cui-secondary-color);
  font-weight: 600;
  list-style-position: inside;
}

.data-flow-advanced > .data-flow-input-group {
  margin-top: 0.75rem;
}

.data-flow-image-preview {
  width: 100%;
  height: auto;
  max-height: 360px;
  margin-top: 0.75rem;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.4rem;
  -o-object-fit: contain;
     object-fit: contain;
  background: var(--cui-tertiary-bg);
}

.data-flow-test-record {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  text-align: left;
  border: 1px solid var(--cui-border-color);
  border-radius: 0.4rem;
  color: var(--cui-body-color);
  background: var(--cui-body-bg);
}

.data-flow-test-record.is-selected {
  border-color: var(--cui-primary);
  background: rgba(var(--cui-primary-rgb), 0.05);
}

.data-flow-test-record small {
  color: var(--cui-secondary-color);
}

.data-flow-output {
  max-height: 340px;
  padding: 0.8rem;
  overflow: auto;
  border-radius: 0.4rem;
  font-size: 0.72rem;
  color: var(--cui-body-color);
  background: var(--cui-tertiary-bg);
}

.data-flow-execution-status {
  background: var(--cui-secondary-bg);
  color: var(--cui-secondary-color);
}

.data-flow-execution-status--success {
  background: var(--cui-success-bg-subtle);
  color: var(--cui-success-text-emphasis);
}

.data-flow-execution-status--failed {
  background: var(--cui-danger-bg-subtle);
  color: var(--cui-danger-text-emphasis);
}

.data-flow-execution-status--running,
.data-flow-execution-status--queued {
  background: var(--cui-warning-bg-subtle);
  color: var(--cui-warning-text-emphasis);
}

.data-flow-execution-error {
  max-width: 32rem;
  white-space: normal;
}

@media (max-width: 991.98px) {
  .data-flow-editor__workspace {
    grid-template-columns: 1fr;
  }
  .data-flow-panel {
    border-top: 1px solid var(--cui-border-color);
    border-left: 0;
  }
}
/* ChannelDesk 2026 visual refresh. Kept last so it can skin existing CoreUI markup. */
:root {
  --cd-accent: #8e52af;
  --cd-accent-soft: #f4eef7;
  --cd-text: #1b1826;
  --cd-text-secondary: #66617f;
  --cd-text-muted: #78738f;
  --cd-canvas: #f4f2f9;
  --cd-surface: #fff;
  --cd-surface-panel: #faf8fc;
  --cd-border: #e1ddec;
  --cd-border-strong: #d6cfe4;
  --cui-primary: var(--cd-accent);
  --cui-primary-rgb: 142, 82, 175;
  --cui-link-color: var(--cd-accent);
  --cui-link-hover-color: #72408f;
  --cui-border-color: var(--cd-border);
  --cui-body-color: var(--cd-text);
  --cui-body-bg: var(--cd-canvas);
  --cui-tertiary-bg: var(--cd-surface-panel);
  --cui-border-radius: .4375rem;
  --cui-border-radius-lg: .6875rem;
  --cui-box-shadow-sm: 0 1px 2px rgba(27, 24, 38, .04);
}

html[data-coreui-theme=dark] {
  --cd-canvas: #17141f;
  --cd-surface: #211d2b;
  --cd-surface-panel: #282332;
  --cd-border: #3d354a;
  --cd-border-strong: #50445f;
  --cd-text: #f7f3fa;
  --cd-text-secondary: #bdb5ca;
  --cd-text-muted: #a49bad;
}

body.cm-app-shell {
  background: var(--cd-canvas);
  color: var(--cd-text);
  font-family: "IBM Plex Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.cm-app-shell .sidebar {
  width: 15rem;
  border-right: 1px solid var(--cd-border);
  background: var(--cd-surface-panel);
  box-shadow: none;
}

.cm-app-shell .sidebar-header,
.cm-app-shell .header {
  background: var(--cd-surface) !important;
  border-color: var(--cd-border) !important;
}

.cm-app-shell .sidebar-header {
  padding-inline: 1rem;
  border-bottom: 1px solid var(--cd-border);
}

.cm-app-shell .sidebar-brand-full {
  color: var(--cd-text) !important;
}

.cm-app-shell .sidebar-logo-abs {
  width: 28px;
  height: 28px;
  left: 0.25rem;
  border-radius: 6px;
}

.cm-app-shell .sidebar-brand-text {
  margin-left: 2.25rem;
  letter-spacing: -0.02em;
}

.cm-app-shell .sidebar-toggler::before {
  filter: none;
  opacity: 0.6;
}

.cm-app-shell .sidebar-nav {
  padding-block: 0.55rem 1rem;
}

.cm-sidebar-brand-picker {
  flex: 0 0 auto;
  padding: 0.7rem 0.55rem 0;
}

.cm-sidebar-brand-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--cd-border);
  border-radius: 8px;
  background: var(--cd-surface);
  color: var(--cd-text);
  text-align: left;
}

.cm-sidebar-brand-card:hover {
  border-color: var(--cd-border-strong);
  background: var(--cd-accent-soft);
}

.cm-sidebar-brand-avatar {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--cd-accent-soft);
  color: var(--cd-accent);
  -o-object-fit: cover;
     object-fit: cover;
  font-size: 0.58rem;
  font-weight: 700;
}

.cm-sidebar-brand-avatar--small {
  flex-basis: 22px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.cm-sidebar-brand-copy,
.cm-sidebar-account-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.cm-sidebar-brand-copy strong,
.cm-sidebar-account-copy strong {
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-sidebar-brand-copy small,
.cm-sidebar-account-copy small {
  overflow: hidden;
  color: var(--cd-text-muted);
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-sidebar-brand-chevron {
  color: var(--cd-text-muted);
  font-size: 0.55rem;
}

.cm-sidebar-brand-menu {
  inset-inline: 0.55rem auto !important;
  width: calc(100% - 1.1rem);
  max-height: 22rem;
  overflow-y: auto;
  font-size: 0.75rem;
}

.cm-sidebar-footer {
  flex: 0 0 auto;
  padding: 0.6rem 0.55rem 0.7rem;
  background: var(--cd-surface);
}

.cm-sidebar-usage {
  display: block;
  margin-bottom: 0.55rem;
  padding: 0.7rem;
  border: 1px solid var(--cd-border);
  border-radius: 9px;
  background: var(--cd-surface-panel);
  color: var(--cd-text);
}

.cm-sidebar-usage:hover {
  border-color: var(--cd-border-strong);
  background: var(--cd-accent-soft);
  color: var(--cd-text);
}

.cm-sidebar-usage-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
}

.cm-sidebar-usage-row strong {
  font-size: 0.67rem;
}

.cm-sidebar-usage-track {
  display: block;
  height: 4px;
  margin: 0.45rem 0 0.35rem;
  overflow: hidden;
  border-radius: 99px;
  background: var(--cd-border);
}

.cm-sidebar-usage-track > span {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: #bd71dc;
}

.cm-sidebar-usage small {
  display: block;
  color: var(--cd-text-muted);
  font-size: 0.6rem;
}

html[data-coreui-theme=dark] .cm-sidebar-usage {
  border-color: #2c273b;
  background: #12101d;
  color: #f7f3fa;
}

html[data-coreui-theme=dark] .cm-sidebar-usage:hover {
  border-color: #433957;
  background: #171322;
  color: #fff;
}

html[data-coreui-theme=dark] .cm-sidebar-usage-track {
  background: #302a3e;
}

html[data-coreui-theme=dark] .cm-sidebar-usage small {
  color: #8d859d;
}

.cm-sidebar-theme {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 0 0 0.55rem;
}

.cm-sidebar-footer--has-usage .cm-sidebar-theme {
  padding-top: 0.55rem;
  border-top: 1px solid var(--cd-border);
}

.cm-sidebar-theme button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 30px;
  padding: 0.35rem 0.5rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--cd-text-muted);
  font-size: 0.68rem;
}

.cm-sidebar-theme button:hover {
  background: var(--cd-accent-soft);
  color: var(--cd-text);
}

.cm-sidebar-theme button.active {
  background: var(--cd-accent-soft);
  color: var(--cd-text);
}

.cm-sidebar-theme button i {
  width: 0.75rem;
  font-size: 0.62rem;
}

html[data-coreui-theme=dark] .cm-sidebar-theme button.active {
  background: #352d48;
  color: #f7f3fa;
}

.cm-sidebar-account {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.35rem 0.4rem;
  border: 0;
  background: transparent;
  color: var(--cd-text);
  text-align: left;
}

.cm-sidebar-account:hover {
  border-radius: 7px;
  background: var(--cd-accent-soft);
}

.cm-sidebar-account-avatar {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cd-accent-soft);
  color: var(--cd-accent);
  font-size: 0.72rem;
}

.cm-sidebar-account > .fa-ellipsis-h {
  color: var(--cd-text-muted);
  font-size: 0.7rem;
}

.cm-sidebar-account-menu {
  width: calc(100% - 1.1rem);
  font-size: 0.75rem;
}

.cm-app-shell .sidebar .sidebar-nav .nav-title {
  margin: 0.75rem 0.9rem 0.25rem;
  padding: 0;
  color: var(--cd-text-muted);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.cm-app-shell .sidebar .sidebar-nav .nav-link {
  min-height: 2.35rem;
  margin: 0.08rem 0.55rem;
  padding: 0.48rem 2rem 0.48rem 0.65rem;
  border-radius: 7px;
  color: var(--cd-text-secondary);
  font-size: 0.86rem;
}

.cm-app-shell .sidebar .sidebar-nav .nav-link:hover {
  background: #ede6f4;
  color: var(--cd-text);
}

.cm-app-shell .sidebar .sidebar-nav .nav-link.active,
.cm-app-shell .sidebar .sidebar-nav .nav-link[aria-expanded=true] {
  background: var(--cd-accent-soft);
  color: var(--cd-accent);
  font-weight: 600;
}

html[data-coreui-theme=dark] .cm-app-shell .sidebar .sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #eee9f3;
}

html[data-coreui-theme=dark] .cm-app-shell .sidebar .sidebar-nav .nav-link.active,
html[data-coreui-theme=dark] .cm-app-shell .sidebar .sidebar-nav .nav-link[aria-expanded=true] {
  background: #352d48;
  color: #d7a5ed;
}

html[data-coreui-theme=dark] .cm-app-shell .sidebar .sidebar-nav .nav-link.active .nav-icon,
html[data-coreui-theme=dark] .cm-app-shell .sidebar .sidebar-nav .nav-link[aria-expanded=true] .nav-icon {
  color: #c985e6;
}

.cm-app-shell .cm-nav-label-description {
  display: none;
}

.cm-app-shell .header {
  min-height: 4rem;
  box-shadow: none;
}

.cm-header-context {
  align-items: center;
  gap: 0.65rem;
  color: var(--cd-text-muted);
  font-size: 0.74rem;
}

.cm-header-context-separator {
  color: var(--cd-border-strong);
  font-size: 0.82rem;
}

.cm-header-context strong {
  color: var(--cd-text);
  font-weight: 600;
}

.cm-app-shell .header .nav-link,
.cm-app-shell .header .btn-link {
  color: var(--cd-text-secondary) !important;
}

.cm-app-shell .header .avatar {
  background: var(--cd-accent-soft) !important;
  color: var(--cd-accent) !important;
}

.cm-app-shell .cm-header-usage {
  border-color: var(--cd-border);
  background: var(--cd-surface-panel);
  color: var(--cd-text);
}

.cm-app-shell .cm-header-usage-label {
  color: var(--cd-text-muted);
}

.cm-app-shell .cm-header-usage-track {
  background: var(--cd-border);
}

.cm-app-shell .cm-header-usage-bar {
  background: var(--cd-accent);
}

.cm-app-shell .body {
  margin-top: 0 !important;
  padding-block: 1.5rem;
}

.cm-app-shell .body > .container-lg {
  width: 100%;
  max-width: none;
  padding-inline: 2rem !important;
}

.cm-app-shell .card {
  border-radius: 11px;
  background: var(--cd-surface);
  box-shadow: none;
}

.cm-app-shell .card-header {
  padding: 0.85rem 1rem;
  border-color: var(--cd-border);
  background: var(--cd-surface-panel);
}

.cm-app-shell .cm-dashboard-summary-card {
  position: relative;
  overflow: hidden;
  border-color: var(--cd-border);
  background: var(--cd-surface);
  color: var(--cd-text);
}

.cm-app-shell .cm-dashboard-summary-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cd-summary-accent, var(--cd-accent));
  content: "";
}

.cm-app-shell .cm-dashboard-summary-card--primary {
  --cd-summary-accent: var(--cd-accent);
}

.cm-app-shell .cm-dashboard-summary-card--info {
  --cd-summary-accent: #4385c6;
}

.cm-app-shell .cm-dashboard-summary-card--warning {
  --cd-summary-accent: #c88a27;
}

html[data-coreui-theme=dark] .cm-app-shell .cm-dashboard-summary-card {
  border-color: var(--cd-border);
  background: var(--cd-surface);
  color: var(--cd-text);
}

.cm-app-shell .btn {
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.cm-app-shell .btn-primary {
  border-color: var(--cd-accent);
  background: var(--cd-accent);
}

.cm-app-shell .form-control,
.cm-app-shell .form-select {
  border-color: var(--cd-border-strong);
  border-radius: 7px;
  background-color: var(--cd-surface-panel);
  font-size: 0.8rem;
}

.cm-app-shell .footer {
  border-color: var(--cd-border) !important;
  background: var(--cd-surface) !important;
  font-size: 0.75rem;
}

.cm-app-shell .datagrid {
  border-radius: 11px;
  border-color: var(--cd-border);
  background: var(--cd-surface);
}

.cm-app-shell .datagrid thead th {
  padding: 0.62rem 0.75rem;
  background: var(--cd-surface);
  color: var(--cd-text-muted);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cm-app-shell .datagrid tbody td {
  padding: 0.7rem 0.75rem;
  border-color: var(--cd-border);
  font-size: 0.86rem;
  vertical-align: middle;
}

.cm-app-shell .datagrid .table-striped > tbody > tr:nth-of-type(odd) > * {
  --cui-table-accent-bg: transparent;
}

.cm-app-shell .datagrid tbody tr:hover > * {
  background: var(--cd-accent-soft);
}

.cm-app-shell .datagrid .btn {
  padding: 0.25rem 0.55rem;
  font-size: 0.69rem;
}

html[data-coreui-theme=dark] .cm-app-shell .datagrid tbody td a:not(.btn) {
  color: #e8e3ee;
}

html[data-coreui-theme=dark] .cm-app-shell .datagrid tbody td a:not(.btn):hover {
  color: #fff;
}

html[data-coreui-theme=dark] .cm-app-shell .datagrid tbody tr:hover > * {
  background: rgba(255, 255, 255, 0.035);
}

.cm-app-shell .datagrid .row-grid-bottom {
  padding: 0.625rem 0.875rem !important;
  border-top: 1px solid var(--cd-border);
  background: var(--cd-surface) !important;
}

.cm-app-shell .datagrid .row-grid-bottom > .d-flex {
  gap: 0.625rem !important;
}

.cm-app-shell .datagrid .row-grid-bottom :is(.col-items, .col-pagination, .col-per-page) {
  width: auto;
}

.cm-app-shell .datagrid .row-grid-bottom .col-items {
  flex: 1 1 auto;
}

.cm-app-shell .datagrid .row-grid-bottom .col-pagination,
.cm-app-shell .datagrid .row-grid-bottom .col-per-page {
  flex: 0 0 auto;
}

.cm-app-shell .datagrid .row-grid-bottom .col-per-page .form-select {
  width: auto !important;
  min-width: 4.25rem;
  min-height: 1.875rem;
  padding: 0.25rem 1.75rem 0.25rem 0.625rem;
  border-color: var(--cd-border-strong);
  border-radius: 6px;
  background-color: var(--cd-surface);
  color: var(--cd-text);
  font-size: 0.75rem;
  line-height: 1.2;
}

html[data-coreui-theme=dark] .cm-app-shell .datagrid .row-grid-bottom .col-per-page .form-select:hover {
  border-color: #665777;
  background-color: rgba(255, 255, 255, 0.025);
}

/* Authentication shell mirrors the React/Figma split panel without changing forms. */
body.cm-auth-page {
  display: block !important;
  background: var(--cd-surface);
  color: var(--cd-text);
}

.cm-auth-shell {
  display: grid;
  grid-template-columns: 620px minmax(0, 1fr);
  min-height: 100vh;
}

.cm-auth-brand {
  display: flex;
  flex-direction: column;
  padding: 3rem 3.5rem;
  border-right: 1px solid var(--cd-border);
  background: var(--cd-surface-panel);
}

.cm-auth-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cm-auth-logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.cm-auth-story {
  margin-block: auto;
}

.cm-auth-story h1 {
  max-width: 29rem;
  margin: 0 0 0.875rem;
  font-size: 40px;
  font-weight: 500;
  line-height: 48px;
  letter-spacing: -0.8px;
}

.cm-auth-story p {
  max-width: 31.75rem;
  color: var(--cd-text-secondary);
  font-size: 14px;
  line-height: 24px;
}

.cm-auth-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.25rem;
}

.cm-auth-stat strong {
  display: block;
  color: var(--cd-accent);
  font-size: 1.35rem;
  font-weight: 500;
}

.cm-auth-stat span {
  color: var(--cd-text-muted);
  font-size: 11.5px;
}

.cm-auth-legal {
  color: var(--cd-text-muted);
  font-size: 11px;
}

.cm-auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.cm-auth-card {
  width: min(100%, 400px);
}

.cm-auth-card .card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
}

.cm-auth-card .card-body {
  padding: 0 !important;
  background: transparent;
}

.cm-auth-card .auth-mobile-logo {
  display: none;
}

.cm-auth-card h1 {
  margin-bottom: 0.35rem !important;
  text-align: left !important;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.cm-auth-card h1 + p {
  margin-bottom: 1.25rem !important;
  text-align: left !important;
  font-size: 0.8rem;
}

.cm-auth-card .nav-tabs {
  padding: 3px;
  border: 1px solid var(--cd-border);
  border-radius: 8px;
  background: transparent;
}

.cm-auth-card .nav-tabs .nav-link {
  border: 0;
  border-radius: 6px;
  color: var(--cd-text-muted);
  font-size: 0.75rem;
}

.cm-auth-card .nav-tabs .nav-link.active {
  background: #fff;
  color: var(--cd-text);
  box-shadow: 0 1px 3px rgba(27, 24, 38, 0.08);
}

.cm-auth-card .input-group-text {
  border-color: var(--cd-border-strong);
  background: var(--cd-surface-panel);
  color: var(--cd-text-muted);
}

.cm-auth-card .form-control {
  min-height: 44px;
  border-color: var(--cd-border-strong);
  background: var(--cd-surface-panel);
  font-size: 0.82rem;
}

.cm-auth-card .btn {
  min-height: 43px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
}

.cm-auth-card .btn-primary {
  border-color: var(--cd-accent);
  background: var(--cd-accent);
}

.cm-auth-card .btn-outline-danger {
  border-color: var(--cd-border-strong);
  color: var(--cd-text-secondary);
}

.cm-auth-card .btn-outline-danger:hover {
  background: var(--cd-surface-panel);
  color: var(--cd-text);
}

.cm-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--cd-text-muted);
  font-size: 11px;
}

.cm-auth-divider-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--cd-border);
}

@media (min-width: 992px) {
  .cm-app-shell .sidebar ~ .wrapper {
    margin-left: 15rem !important;
  }
  .cm-app-shell .sidebar.sidebar-narrow-unfoldable:not(:hover) {
    width: 4rem;
  }
  .cm-app-shell .sidebar.sidebar-narrow-unfoldable:not(:hover) ~ .wrapper {
    margin-left: 4rem !important;
  }
  .cm-app-shell .sidebar.sidebar-narrow-unfoldable:not(:hover) :is(.cm-sidebar-brand-picker, .cm-sidebar-footer) {
    display: none;
  }
}
@media (max-width: 991.98px) {
  .cm-auth-shell {
    display: block;
  }
  .cm-auth-brand {
    display: none;
  }
  .cm-auth-main {
    min-height: 100vh;
    padding: 2rem 1.25rem;
  }
  .cm-auth-card .auth-mobile-logo {
    display: block;
  }
}
@media (max-width: 575.98px) {
  .cm-app-shell .body {
    padding-block: 1.1rem;
  }
  .cm-app-shell .body > .container-lg {
    padding-inline: 1rem !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/*# sourceMappingURL=cm.bundle.css.map */
