/* ============================================================
   App Shell
============================================================ */
.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.app-shell--presentation {
  grid-template-columns: 1fr;
  min-height: 100vh;
}
.lucky-wheel-presentation #shell,
.lucky-wheel-presentation .app-shell--presentation {
  min-height: 100vh;
  width: 100%;
}
.lucky-wheel-presentation {
  background: #0a1628;
}
.lucky-wheel-presentation .page-content {
  max-width: none;
  margin: 0;
  padding: 0;
}

.sidebar {
  background: var(--sidebar-grad);
  color: var(--white);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 16px;
}

.sidebar-brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.16);
  display: grid;
  place-items: center;
  color: var(--white);
}

.sidebar-brand .text {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.sidebar-brand .text small {
  display: block;
  font-weight: 400;
  font-size: 11.5px;
  opacity: 0.72;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  padding: 16px 8px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.86);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.sidebar-link.active {
  background: rgba(255,255,255,0.18);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,0.16);
}

.sidebar-link .icon {
  flex: 0 0 auto;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 11px;
  opacity: 0.7;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.main-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-100);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--neutral-600);
}

.topbar .breadcrumb .current {
  color: var(--neutral-900);
  font-weight: 500;
}

.topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--neutral-100);
  background: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--neutral-600);
}

.topbar .icon-btn:hover {
  background: var(--neutral-50);
}

.topbar .user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.topbar .user:hover {
  background: var(--neutral-50);
}

.topbar .user:focus { outline: none; }
.topbar .user:focus-visible {
  outline: 2px solid var(--primary-300);
  outline-offset: 2px;
}

.topbar .avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary-600);
  color: var(--white);
  font-weight: 600;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.topbar .user-info {
  font-size: 13px;
  line-height: 1.2;
}

.topbar .user-info small {
  display: block;
  color: var(--neutral-500);
  font-size: 11px;
  margin-top: 2px;
}

.timezone-tag {
  font-size: 11px;
  color: var(--neutral-500);
  padding: 4px 8px;
  background: var(--neutral-50);
  border-radius: 6px;
}

.page-content {
  padding: 24px 32px;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  line-height: 30px;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0 0 6px;
}

.page-header p {
  font-size: 13px;
  font-weight: 400;
  color: var(--neutral-500);
  margin: 0;
}

.page-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* ============================================================
   Buttons
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--primary-600);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-700);
}

.btn-secondary {
  background: var(--white);
  color: var(--neutral-800);
  border-color: var(--neutral-200);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--neutral-50);
}

.btn-outline {
  background: transparent;
  color: var(--primary-600);
  border-color: var(--primary-600);
}

.btn-outline:hover:not(:disabled) {
  background: var(--primary-50);
}

.btn-ghost {
  background: transparent;
  color: var(--neutral-700);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--neutral-100);
}

.btn-destructive {
  background: var(--danger-fg);
  color: var(--white);
}

.btn-destructive:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-destructive-soft {
  background: var(--danger-bg);
  color: var(--danger-fg);
}

.btn-destructive-soft:hover:not(:disabled) {
  background: #FECACA;
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.btn-lg {
  height: 40px;
  padding: 0 18px;
}

.btn-icon {
  width: 36px;
  padding: 0;
  display: grid;
  place-items: center;
}

/* ============================================================
   Form Controls
============================================================ */
.input, .select, .textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  font-size: 14px;
  color: var(--neutral-900);
  font-family: inherit;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23607097' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  border-color: #d9e3f5;
  box-shadow: 0 1px 2px rgba(36,107,239,.08);
}

.select-native-hidden {
  display: none !important;
}

.fake-select {
  position: relative;
  min-width: 168px;
}

.fake-select-trigger {
  width: 100%;
  height: 40px;
  border: 1px solid #d9e3f5;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(36,107,239,.08);
  padding: 0 36px 0 14px;
  display: flex;
  align-items: center;
  color: #0f172a;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  position: relative;
}

.fake-select.has-value .fake-select-trigger {
  font-weight: 500;
}

.fake-select-trigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23607097' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-size: 14px 14px;
}

.fake-select.open .fake-select-trigger {
  border-color: #93b6ff;
  box-shadow: 0 0 0 3px rgba(93,171,253,.18);
}

.fake-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 100%;
  max-height: 320px;
  overflow-y: auto;
  background: var(--white);
  border: 1px solid #d9e3f5;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(15,23,42,.13);
  padding: 6px;
}

.fake-select-option {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.fake-select-option:hover {
  background: #f6f9ff;
}

.fake-select-option.active {
  background: #e9f2ff;
  color: #175ad8;
}

.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid var(--primary-400);
  outline-offset: -1px;
  border-color: var(--primary-400);
}

.input::placeholder, .textarea::placeholder {
  color: var(--neutral-400);
}

.textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 6px;
}

.label.required::after {
  content: ' *';
  color: var(--danger-fg);
}

.helper-text {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 4px;
}

.form-row {
  display: grid;
  gap: 12px;
}

.form-row.cols-2 {
  grid-template-columns: 1fr 1fr;
  row-gap: 12px;
}

.form-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  row-gap: 12px;
}

.form-field {
  margin-bottom: 12px;
}

/* Search input with icon */
.search-input {
  position: relative;
}

.search-input .icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  pointer-events: none;
}

.search-input input {
  padding-left: 34px;
}

/* Đồng bộ cụm header/filter theo ảnh: 12px */
.page-header-actions .search-input input,
.page-header-actions .fake-select-trigger,
.tbl-toolbar .search-input input,
.tbl-toolbar .fake-select-trigger {
  font-size: 12px;
}

/* ============================================================
   Card
============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card-padded {
  padding: 12px 16px;
}

.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--neutral-900);
}

.card-body {
  padding: 12px 16px;
}

.form-section-card {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--neutral-25, #fcfcfd);
  padding: 12px;
}

.form-section-card + .form-section-card {
  margin-top: 12px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-700);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Side-rail card */
.rail-card {
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-card .label-uppercase {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--neutral-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rail-card .value-big {
  font-size: 20px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.2;
}

.rail-card .caption {
  font-size: 11.5px;
  color: var(--neutral-500);
}

.rail-card.tone-success {
  background: var(--success-soft);
  border-color: #BBF7D0;
}

.rail-card.tone-warning {
  background: var(--warning-soft);
  border-color: #FDE68A;
}

.rail-card.tone-info {
  background: var(--info-soft);
  border-color: #BFDBFE;
}

/* ============================================================
   Status Pill
============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.pill.tone-success {
  background: #e9faef;
  color: #238d52;
}

.pill.tone-warning {
  background: #fff4d9;
  color: #9d6a00;
}

.pill.tone-danger {
  background: #ffe6e6;
  color: #bd3232;
}

.pill.tone-info {
  background: #e7f0ff;
  color: #2d66d9;
}

.pill.tone-neutral {
  background: #eef2f8;
  color: #5a6b8d;
}

.pill.tone-primary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.pill.tone-scheduled {
  background: #f0ecff;
  color: #6b4fc8;
}

.tbl-cell-stack-accent {
  color: var(--primary-700);
  font-weight: 500;
}

.tbl-list-progress-track {
  height: 4px;
  background: var(--neutral-100);
  border-radius: 99px;
  margin-top: 5px;
  overflow: hidden;
  max-width: 120px;
}

.tbl-list-progress-fill {
  height: 100%;
  background: var(--primary-500);
  border-radius: 99px;
  transition: width 0.2s ease;
}

.tbl-list-progress-fill.is-done {
  background: var(--success-fg, #238d52);
}

.tbl-progress-cell {
  min-width: 120px;
}

/* Danh sách thông báo — scroll ngang, không cắt cột */
.tbl-notif-list .tbl-scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tbl-notif-list .tbl.tbl--wide {
  min-width: 1280px;
  width: max-content;
  max-width: none;
}

.tbl-notif-list .tbl-col-title {
  min-width: 200px;
  white-space: normal;
}

.tbl-notif-list .tbl-col-desc {
  min-width: 160px;
  max-width: 220px;
  white-space: normal;
}

.tbl-notif-list .tbl-col-send-type {
  min-width: 100px;
  white-space: normal;
}

.tbl-notif-list .tbl-col-channel {
  min-width: 96px;
  white-space: normal;
}

.tbl-notif-list .tbl-col-schedule {
  min-width: 200px;
  white-space: normal;
}

.tbl-notif-list .tbl-col-progress {
  min-width: 140px;
  white-space: normal;
}

.tbl-notif-list .tbl-col-meta {
  min-width: 108px;
}

.tbl-notif-list tbody td {
  vertical-align: top;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Cấp bậc nội dung trong ô */
.cell-tiered {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.35;
}

.cell-tiered__primary {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
}

.cell-tiered__primary--link {
  color: var(--neutral-900);
  text-decoration: none;
}

.cell-tiered__primary--link:hover {
  color: var(--primary-600);
}

.cell-tiered__sub {
  font-size: 11px;
  color: var(--neutral-400);
  font-weight: 400;
}

.cell-tiered__secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--neutral-500);
}

.cell-tiered__tz {
  font-weight: 500;
  color: var(--neutral-500);
  font-size: 12px;
}

/* —— Cột Lịch gửi —— */
.list-schedule-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.35;
}

.list-schedule-cell__orbit-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.list-schedule-cell__primary {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
}

.list-schedule-cell__sub {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--neutral-400);
  line-height: 1.4;
}

.list-schedule-cell__foot {
  margin-top: 1px;
}

.list-schedule-foot__tag {
  font-size: 10px;
  font-weight: 600;
  margin-right: 3px;
}

.list-schedule-foot__tag--accent { color: #5b8fd9; }
.list-schedule-foot__tag--warn { color: #c9924a; }
.list-schedule-foot__tag--hr { color: #9b84d4; }
.list-schedule-foot__tag--journey { color: #5aa67a; }
.list-schedule-foot__tag--now { color: var(--primary-600); }
.list-schedule-foot__tag--info,
.list-schedule-foot__tag--muted { color: var(--neutral-400); }

/* Vòng tròn: thứ trong tuần & khung giờ (cùng kích thước) */
.schedule-orbit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.schedule-orbit-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
  color: var(--neutral-450, #8b95a8);
  background: var(--white);
  border: 1px solid var(--neutral-200);
  flex-shrink: 0;
  cursor: default;
}

.schedule-orbit-chip.is-active {
  background: var(--primary-700, #1e4fad);
  border-color: var(--primary-700, #1e4fad);
  color: #fff;
}

/* Ngày trong tháng — icon + popover khi bấm */
.schedule-month-pop {
  position: relative;
  display: inline-block;
}

.schedule-month-pop__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
  color: var(--neutral-500);
  cursor: pointer;
  list-style: none;
}

.schedule-month-pop__trigger::-webkit-details-marker {
  display: none;
}

.schedule-month-pop__trigger:hover {
  border-color: var(--primary-300);
  color: var(--primary-600);
  background: var(--primary-50, #f0f6ff);
}

.schedule-month-pop[open] .schedule-month-pop__trigger {
  border-color: var(--primary-500);
  color: var(--primary-700);
  background: #e8f2ff;
}

.schedule-month-pop__panel {
  position: absolute;
  z-index: 20;
  left: 0;
  top: calc(100% + 6px);
  min-width: 168px;
  max-width: 240px;
  padding: 8px 10px;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--neutral-700);
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.schedule-duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--neutral-50);
  color: var(--neutral-450, #8b95a8);
  font-size: 10px;
  font-weight: 500;
  border: 1px solid var(--neutral-100);
}

.schedule-duration-badge i,
.schedule-duration-badge svg {
  width: 10px;
  height: 10px;
  opacity: 0.55;
}

/* —— Cột Tiến độ —— */
.list-progress-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-progress-cell__main {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.25;
}

.list-progress-cell__main--fail {
  color: var(--danger-fg);
}

.list-progress-cell__track {
  height: 4px;
  background: var(--neutral-100);
  border-radius: 99px;
  overflow: hidden;
  width: 100%;
  max-width: 140px;
}

.list-progress-cell__fill {
  height: 100%;
  background: var(--primary-500);
  border-radius: 99px;
  transition: width 0.2s ease;
}

.list-progress-cell__fill.is-done {
  background: var(--success-fg, #238d52);
}

.list-progress-cell__sub {
  font-size: 10.5px;
  color: var(--neutral-400);
  line-height: 1.4;
}

.list-progress-cell__label {
  color: var(--neutral-350, #a8b0bd);
  font-weight: 500;
  font-size: 10px;
  margin-right: 4px;
}


.send-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.send-type-badge--daily {
  background: #e8f2ff;
  color: #2d66d9;
}

.send-type-badge--hourly {
  background: #fff3e6;
  color: #c76a12;
}

.send-type-badge--weekly {
  background: #f0ecff;
  color: #6b4fc8;
}

.send-type-badge--default {
  background: var(--neutral-100);
  color: var(--neutral-700);
}
.send-type-badge--chain {
  background: #ede9fe;
  color: #5b21b6;
}
/* Phase 2 — HR filter multi-select (dùng fake-select, đồng bộ ảnh CMS) */
.fake-select.filter-multi-select {
  flex: 0 1 auto;
  min-width: 168px;
  max-width: 240px;
}
.fake-select.filter-multi-select .fake-select-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-header-filter .filter-panel-row .fake-select.filter-multi-select {
  min-width: 168px;
  max-width: 240px;
}
.audience-transfer-filters > .fake-select.filter-multi-select,
.fake-select.filter-multi-select--transfer {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 100%;
}
.manual-dropdown-filters > .fake-select.filter-multi-select {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 100%;
}
.list-header-filter .filter-panel-row .fake-select:not(.filter-multi-select) {
  min-width: 168px;
  max-width: 240px;
  flex: 0 1 auto;
}


.pill.pill--status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.tbl-section-row td {
  background: var(--neutral-50);
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--neutral-100);
  cursor: default;
}

.tbl-section-row:hover td {
  background: var(--neutral-50);
}

.tbl-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neutral-500);
}

/* Badge (no dot) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

.badge.tone-primary {
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge.tone-neutral {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.badge.tone-success {
  background: var(--success-soft);
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge.tone-warning {
  background: var(--warning-soft);
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge.tone-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge.tone-info {
  background: var(--info-soft, #eff6ff);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.chip .remove {
  cursor: pointer;
  opacity: 0.6;
}

.chip .remove:hover {
  opacity: 1;
}

/* ============================================================
   Table
============================================================ */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbl thead th {
  background: var(--neutral-50);
  color: var(--neutral-500);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--neutral-100);
  white-space: nowrap;
}

.tbl tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--neutral-100);
  color: var(--neutral-800);
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.35;
}

.tbl tbody tr:last-child td {
  border-bottom: 0;
}

.tbl tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.tbl tbody tr:hover {
  background: #f8fbff;
}

/* Cột bảng nhiều dòng (mốc thời gian, chỉ số) — font Inter */
.tbl-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 11.5rem;
  line-height: 1.35;
}

.tbl-notif-list .tbl-cell-stack {
  max-width: none;
}

.tbl-cell-stack-line {
  display: block;
}

.tbl-cell-stack-muted {
  color: var(--neutral-500);
  font-size: 11.5px;
}

.tbl .tbl-actions {
  display: inline-flex;
  gap: 4px;
}

.tbl-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-bottom: 1px solid var(--neutral-100);
  align-items: center;
}

.tbl-toolbar--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.tbl-toolbar-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.tbl-toolbar-row .search-input {
  flex: 1 1 280px;
  min-width: 220px;
}

.tbl-toolbar .filter-select.is-active {
  border-color: var(--primary-300);
  box-shadow: 0 0 0 2px rgba(36, 107, 239, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 4px 4px;
}

.tbl-th-upper {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--neutral-500);
}

.btn-filter-icon {
  min-width: 40px;
  padding-left: 10px;
  padding-right: 10px;
}

/* Header filter — Default → Active → Filled (Figma); đồng bộ mọi danh sách */
.tbl-toolbar.list-header-filter {
  padding: 12px;
  gap: 12px;
  border-bottom: 1px solid var(--neutral-100);
}

.list-header-filter .tbl-toolbar-row--primary {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.list-header-filter .tbl-toolbar-row--primary .search-input,
.list-header-filter .search-input {
  flex: 0 1 280px;
  width: 280px;
  max-width: 100%;
  min-width: 200px;
}

.btn-filter-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 500;
  font-size: 14px;
}

.btn-filter-toggle.is-active {
  border-color: var(--primary-400, #6ea8ff);
  background: var(--primary-50, #f0f6ff);
  color: var(--primary-700, #1a5fd4);
}

.btn-filter-toggle.has-filters:not(.is-active) {
  border-color: var(--primary-200, #b8d4ff);
}

.btn-filter-dot {
  position: absolute;
  top: 7px;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  box-shadow: 0 0 0 2px var(--white);
  pointer-events: none;
}

.list-header-filter .filter-panel-row {
  gap: 10px;
  padding: 0;
  align-items: center;
}

.list-header-filter .filter-panel-row .filter-select {
  min-width: 168px;
  max-width: 240px;
  flex: 0 1 auto;
}

.list-header-filter .filter-panel-row .btn-clear-filters {
  margin-left: auto;
  font-weight: 500;
  color: var(--neutral-600);
}

.list-header-filter .filter-panel-row .btn-clear-filters:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--neutral-700);
}

.tbl-toolbar .search-input {
  flex: 1 1 280px;
  min-width: 220px;
}

.tbl-footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--neutral-100);
  font-size: 13px;
  color: var(--neutral-600);
}

.pagination {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.pagination button {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  color: var(--neutral-700);
}

.pagination button:hover {
  background: var(--neutral-50);
}

.pagination button.active {
  background: var(--primary-600);
  color: var(--white);
  border-color: var(--primary-600);
}

/* Truyền thông nội bộ — bảng rộng, cuộn ngang dưới chân bảng */
.table-wrap.communications-list-wrap {
  overflow: visible;
}

.communications-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.communications-list-wrap .communications-table-scroll .tbl {
  min-width: 1360px;
}

.action-menu-wrap[open] .action-menu {
  z-index: 200;
}

.table-wrap.communications-list-wrap .comm-tbl-toolbar {
  min-height: auto;
}

.table-wrap.communications-list-wrap .comm-filter-row .filter-select {
  min-width: 108px;
  max-width: 200px;
}

.table-wrap.communications-list-wrap .comm-filter-row .filter-select--sort {
  min-width: 84px;
  max-width: 120px;
}

.table-wrap.communications-list-wrap .filter-date {
  width: auto;
  min-width: 130px;
  max-width: 150px;
  font-size: 13px;
  padding: 8px 10px;
}

.table-wrap.communications-list-wrap .filter-date.is-active {
  border-color: var(--primary-300);
  box-shadow: 0 0 0 2px rgba(36, 107, 239, 0.12);
}

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

.btn-filter-icon.is-active {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-700);
}

.table-wrap.communications-list-wrap .tbl-footer {
  padding: 12px 16px;
}

.comm-list-thumb {
  width: 56px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.comm-highlight-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e8a317;
}

.comm-highlight-star i,
.comm-highlight-star svg {
  width: 18px !important;
  height: 18px !important;
}

.col-comm-title {
  min-width: 200px;
  max-width: 280px;
}

.col-comm-meta {
  min-width: 200px;
  max-width: 320px;
}

.col-comm-actions {
  width: 56px;
  text-align: center;
  vertical-align: middle !important;
}

.communications-page {
  padding-left: clamp(16px, 2.5vw, 36px);
  padding-right: clamp(16px, 2.5vw, 36px);
  padding-bottom: 32px;
}

.tbl tr.comm-row-pending td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.comm-pending-subline {
  margin-top: 4px;
  font-size: 11px;
  color: #b45309;
}

/* ============================================================
   Tabs
============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--neutral-100);
  background: #f3f7ff;
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-item {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #4f66a3;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-item:hover {
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.58);
}

.tab-item.active {
  color: var(--neutral-900);
  border-color: #e7ecf6;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(16,24,40,.08);
  font-weight: 600;
}

.tab-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.tab-item .count {
  background: var(--neutral-100);
  color: #4f66a3;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
}

.toggle-switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #dbe4f4;
  border: 1px solid #d1dbef;
  position: relative;
  cursor: pointer;
  transition: background .15s ease;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.22);
  transition: transform .15s ease;
}

.toggle-switch.on {
  background: #1f7aff;
  border-color: #1f7aff;
}

.toggle-switch.on::after {
  transform: translateX(16px);
}

.tab-item.active .count {
  background: #edf2fb;
  color: var(--neutral-700);
}

.action-menu-wrap {
  position: relative;
  display: inline-flex;
}

.action-menu-wrap > summary {
  list-style: none;
}

.action-menu-wrap > summary::-webkit-details-marker {
  display: none;
}

.action-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--neutral-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.action-icon-btn:hover {
  background: var(--neutral-50);
  border-color: var(--neutral-100);
  color: var(--neutral-800);
}

.action-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 188px;
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 6px;
}

.action-menu button,
.action-menu a {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  color: var(--neutral-700);
  cursor: pointer;
  text-align: left;
}

.action-menu button:hover,
.action-menu a:hover {
  background: var(--neutral-50);
}

.action-menu .danger,
.action-menu button.danger,
.action-menu a.danger {
  color: var(--danger-fg);
}

.action-menu .danger:hover {
  background: #fef2f2;
  color: var(--danger-fg);
}

.action-menu .danger i {
  color: var(--danger-fg);
}

/* ============================================================
   Stepper (wizard)
============================================================ */
.stepper {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: 12px;
  padding: 14px 20px;
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  position: relative;
  color: var(--neutral-500);
  background: transparent;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  width: 24px;
  right: -24px;
  top: 16px;
  height: 1px;
  background: var(--neutral-200);
  border-radius: 1px;
}

.step.done:not(:last-child)::after {
  background: var(--primary-300);
}

.step .step-num {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  background: var(--neutral-100);
  color: var(--neutral-500);
  flex: 0 0 auto;
  border: 2px solid transparent;
  z-index: 1;
}

.step .step-label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: inherit;
}

.step .step-label small {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neutral-400);
  margin-bottom: 2px;
  font-family: inherit;
}

.step.active {
  color: var(--neutral-900);
  background: transparent;
}

.step.active .step-num {
  background: var(--primary-600);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(36,107,239,0.12);
}

.step.active .step-label {
  color: var(--neutral-900);
}

.step.active .step-label small {
  color: var(--primary-600);
}

.step.done .step-num {
  background: var(--white);
  color: var(--primary-600);
  border-color: var(--primary-300);
}

/* ============================================================
   Detail Layout (3-layer skeleton)
============================================================ */
.detail-page {
  background: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  width: min(1180px, calc(100vw - 220px));
  height: 100vh;
  max-height: 100vh;
  box-shadow: -16px 0 40px rgba(15, 23, 42, .25);
  z-index: 95;
  overflow: hidden;
  align-self: flex-start;
  animation: drawer-slide-in 220ms cubic-bezier(.2,.8,.2,1);
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 90;
}

.detail-page--route {
  position: static;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  box-shadow: none;
  animation: none;
  z-index: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Shell: cố định footer thao tác — chỉ body scroll phía trong */
.app-shell:has(.detail-page--route) {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.main-area:has(.detail-page--route) {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.main-area:has(.detail-page--route) > .topbar {
  flex-shrink: 0;
}

.main-area:has(.detail-page--route) > #detail-root {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-page--route .detail-header {
  flex-shrink: 0;
}

.detail-page--route .detail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.detail-page--route .detail-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

/* Event setup route (push / activities / survey) — shell riêng, tách khỏi header chi tiết SK */
body.event-setup-route-active .detail-header,
body.event-setup-route-active .detail-footer {
  display: none;
}

body.event-setup-route-active .detail-page--route {
  min-height: 0;
}

/* Setup route (Hoạt động / Survey / Push): full bề ngang main — không co theo container-max */
body.event-setup-route-active .detail-page--route .detail-body,
body.event-setup-route-active .detail-body.no-rail {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* Full width khi đang ở setup route — gắn .is-setup-route (Alpine), không chỉ dựa body class */
.detail-page--route .detail-body.no-rail:has(.detail-tabs-content.is-setup-route) {
  max-width: none !important;
  margin: 0 !important;
  width: 100%;
}

.detail-tabs-content.is-setup-route,
.detail-tabs-content.is-setup-route .event-setup-shell,
.detail-tabs-content.is-setup-route [data-doc="events-detail.setup-drawer-host"],
.detail-tabs-content.is-setup-route .event-setup-drawer.event-setup-drawer--route,
.detail-tabs-content.is-setup-route .event-setup-panel,
.detail-tabs-content.is-setup-route .event-setup-scroll,
.detail-tabs-content.is-setup-route .cw-activity-section,
.detail-tabs-content.is-setup-route .cw-activity-config {
  width: 100%;
  max-width: none;
}

.detail-tabs-content.is-setup-route .event-setup-drawer.event-setup-drawer--route.drawer {
  width: 100% !important;
  max-width: none !important;
}

body.event-setup-route-active .event-detail-side-rail {
  display: none;
}

body.event-setup-route-active .detail-body {
  grid-template-columns: 1fr;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.event-setup-route-active .detail-tabs-content.is-setup-route {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.event-setup-route-active .event-setup-shell {
  flex-shrink: 0;
  margin-bottom: 12px;
}

body.event-setup-route-active [data-doc="events-detail.setup-drawer-host"] {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.event-setup-route-active .event-setup-drawer--route {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.event-setup-route-active .event-setup-drawer__header {
  display: none;
}

body.event-setup-route-active .event-setup-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-setup-drawer.event-setup-drawer--route {
  position: static;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  max-height: none;
  box-shadow: none;
  animation: none;
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.event-setup-drawer.event-setup-drawer--route .event-setup-drawer__body {
  max-height: none;
  overflow: hidden;
}

/* Panel cấu hình: nội dung scroll · footer neo dưới */
.event-setup-panel {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.event-setup-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.event-setup-form-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 10px 0 4px;
  background: var(--white);
  border-top: 1px solid var(--neutral-200);
  z-index: 2;
}

.event-setup-form-actions__left,
.event-setup-form-actions__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.event-setup-form-actions__right {
  margin-left: auto;
}

.event-setup-route-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-detail-rail-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-detail-rail-card:hover {
  border-color: var(--primary-300, #93b4f6);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.tab-item__badge {
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 600;
}

.detail-tabs-content.is-setup-route .event-detail-main-view {
  display: none;
}

.event-setup-shell {
  margin-bottom: 20px;
}

.event-setup-shell__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 0;
  margin-bottom: 10px;
  color: var(--neutral-600);
}

.event-setup-shell__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.event-setup-shell__event-title {
  flex: 1 1 200px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-setup-shell__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-200);
}

.event-setup-shell__head-text {
  flex: 1;
  min-width: 0;
}

.event-setup-shell__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.event-setup-shell__subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--neutral-500);
}

.event-setup-shell__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@keyframes drawer-slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.event-setup-checklist {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--neutral-50);
}

.event-setup-checklist__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.event-setup-checklist__pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-700, #1d4ed8);
}

.event-setup-checklist__track {
  height: 6px;
  background: var(--neutral-200);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.event-setup-checklist__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500, #3b82f6), var(--primary-600, #2563eb));
  border-radius: 999px;
  transition: width 220ms ease;
}

.event-setup-checklist__steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-setup-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
}

.event-setup-step.is-done {
  border-color: var(--success-border, #bbf7d0);
  background: var(--success-bg, #f0fdf4);
}

.event-setup-step__body {
  flex: 1;
  min-width: 0;
}

.event-setup-step__label {
  font-size: 13px;
  font-weight: 600;
}

.event-setup-action-row {
  padding: 0 0 12px;
  margin-bottom: 12px;
}

.event-setup-action-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.event-setup-action-row__track {
  flex: 1;
  max-width: 200px;
  height: 4px;
  background: var(--neutral-200);
  border-radius: 999px;
  overflow: hidden;
}

.event-setup-action-row__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500, #3b82f6), var(--primary-600, #2563eb));
  border-radius: 999px;
  transition: width 220ms ease;
}

.event-setup-action-row__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.event-setup-action-row__tiles--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .event-setup-action-row__tiles--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .event-setup-action-row__tiles {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }
  .event-setup-action-tile {
    min-width: 160px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

.event-setup-action-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-top: 3px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  font-family: inherit;
  text-align: left;
  min-width: 0;
}

.event-setup-action-tile--classification {
  border-top-color: #60a5fa;
}

.event-setup-action-tile--push {
  border-top-color: #4ade80;
}

.event-setup-action-tile--activities {
  border-top-color: #a78bfa;
}

.event-setup-action-tile--survey {
  border-top-color: #fbbf24;
}

.event-setup-action-tile--ops {
  border-top-color: #4ade80;
}

.event-setup-action-tile__label {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
  white-space: nowrap;
}

.event-setup-action-tile__banner {
  font-size: 12px;
  font-weight: 400;
  color: var(--neutral-500);
  line-height: 1.35;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  width: 100%;
  margin: 2px 0 4px;
}

.event-setup-action-tile__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  margin-top: auto;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-600, #2563eb);
  cursor: pointer;
  line-height: 1.3;
  align-self: flex-start;
}

.event-setup-action-tile__action i,
.event-setup-action-tile__action svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.event-setup-action-tile__action:hover:not(:disabled) {
  text-decoration: underline;
}

.event-setup-action-tile__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: none;
}

.event-setup-drawer .drawer,
.event-setup-drawer.drawer {
  display: flex;
  flex-direction: column;
  top: 0;
  bottom: 0;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
}

.event-setup-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--neutral-200);
  flex-shrink: 0;
}

.event-setup-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 16px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.event-setup-drawer__body > [data-doc="events-detail.tab-classification"],
.event-setup-drawer__body > [data-doc="events-detail.tab-program"],
.event-setup-drawer__body > [data-doc="events-detail.tab-ops"],
.event-setup-drawer__body > .event-push-bundle-panel,
.event-setup-drawer__body > .event-setup-panel {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  align-self: stretch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body.drawer-open {
  overflow: hidden;
}

.tab-status-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tab-status-pill.tone-success {
  background: var(--success-bg, #ecfdf5);
  color: var(--success-fg, #047857);
}

.tab-status-pill.tone-warning {
  background: var(--warning-bg, #fffbeb);
  color: var(--warning-fg, #b45309);
}

.tab-status-pill.tone-neutral {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.detail-header {
  flex-shrink: 0;
  background: var(--white);
  border-bottom: 1px solid var(--neutral-100);
  padding: 12px 20px;
  z-index: 10;
}

.detail-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-header-row + .detail-header-row {
  margin-top: 10px;
}

.detail-header .id-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.detail-header .detail-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--primary-50, #eff6ff);
  color: var(--primary-700, #1d4ed8);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.detail-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0;
  flex: 1 1 auto;
}

.detail-header .meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--neutral-500);
}

.detail-header .meta-sep {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--neutral-300);
}

.detail-header .action-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 4px;
}

.detail-header .action-toolbar .spacer {
  flex: 1;
}

.detail-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 16px 20px;
  align-items: start;
}

.detail-body.no-rail {
  grid-template-columns: 1fr;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.detail-tabs-content {
  background: var(--white);
}

.detail-tab-panel[hidden] {
  display: none !important;
}

.detail-tab-panel.is-active {
  display: block;
}

.detail-content-block {
  margin-bottom: 20px;
}

.detail-content-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.35;
}

.detail-content-body {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 8px;
  padding: 14px 16px;
  line-height: 1.6;
  font-size: 14px;
  color: var(--neutral-800);
}

.detail-content-meta {
  margin-bottom: 24px;
}

.detail-preview-section {
  margin-top: 8px;
}

.detail-preview-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 640px;
}

.detail-preview-single {
  max-width: 300px;
}

.detail-preview-single .phone-frame {
  width: 100%;
}

.preview-phone-label {
  margin-bottom: 8px;
  display: block;
}

.delivery-banner-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.delivery-stat-card {
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  padding: 16px 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.delivery-stat-card:hover {
  border-color: var(--primary-300, #93b4f6);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.delivery-stat-card--success {
  border-color: rgba(22, 163, 74, 0.25);
}

.delivery-stat-card--danger {
  border-color: rgba(220, 38, 38, 0.25);
}

.delivery-stat-card .kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-500);
  margin-bottom: 4px;
}

.delivery-stat-card .kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.2;
}

.detail-content-split {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 300px);
  gap: 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .detail-content-split {
    grid-template-columns: 1fr;
  }
}

.detail-content-preview-aside {
  position: sticky;
  top: 16px;
}

.detail-content-preview-aside .preview-phone {
  margin: 0;
}

.app-preview-phone {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.detail-kpi-strip .kpi-item {
  min-width: 120px;
}

.recipient-list-modal .tbl-compact th,
.recipient-list-modal .tbl-compact td {
  padding: 10px 12px;
  font-size: 13px;
}

.comm-thumb-hero {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.delivery-stat-card .kpi-caption {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 6px;
}

.detail-side-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 16px;
  align-self: start;
  margin-top: 0;
}

/* Chi tiết TB: rail ngang hàng với cụm tab */
.detail-tabs-content--with-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-rows: auto auto;
  column-gap: 24px;
  row-gap: 20px;
  align-items: start;
  width: 100%;
  background: transparent;
}
.detail-tabs-content--with-rail > .tabs {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}
.detail-tabs-content--with-rail > .detail-side-rail {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  top: 0;
}
.detail-tabs-content--with-rail > .detail-tab-panel {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}
@media (max-width: 960px) {
  .detail-tabs-content--with-rail {
    grid-template-columns: 1fr;
  }
  .detail-tabs-content--with-rail > .detail-side-rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
  .detail-tabs-content--with-rail > .detail-tab-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

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

.detail-rail-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--neutral-800);
  letter-spacing: 0.02em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--neutral-100);
  margin-bottom: 4px;
}

.detail-footer {
  flex-shrink: 0;
  background: var(--white);
  border-top: 1px solid var(--neutral-100);
  box-shadow: var(--shadow-up);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 5;
}

.detail-footer .left-text {
  font-size: 12px;
  color: var(--neutral-500);
}

.detail-footer .right-actions {
  display: flex;
  gap: 8px;
}

/* Inline meta grid */
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
}

.kv-item {
  min-width: 0;
}

.kv-item .key {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--neutral-500);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kv-item .value {
  font-size: 14px;
  color: var(--neutral-900);
  font-weight: 500;
  word-break: break-word;
}

.kv-item .value.muted {
  color: var(--neutral-400);
  font-weight: 400;
}

.kv-item .value code {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  background: var(--neutral-50);
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--neutral-700);
}

/* ============================================================
   Alert / Banner
============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.5;
}

.alert .icon {
  flex: 0 0 auto;
  margin-top: 1px;
}

.alert.tone-info {
  background: var(--info-soft);
  border-color: #BFDBFE;
  color: var(--info-fg);
}

.alert.tone-success {
  background: var(--success-soft);
  border-color: #BBF7D0;
  color: var(--success-fg);
}

.alert.tone-warning {
  background: var(--warning-soft);
  border-color: #FDE68A;
  color: var(--warning-fg);
}

.alert.tone-danger {
  background: var(--danger-soft);
  border-color: #FECACA;
  color: var(--danger-fg);
}

.alert .title {
  font-weight: 600;
  margin-bottom: 2px;
}

.action-row {
  display: flex;
  gap: 8px;
}

.alert + .action-row {
  margin-top: 8px;
}

/* ============================================================
   Modal / Drawer
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(15,23,42,0.30);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal.modal-lg { max-width: 800px; }
.modal.modal-xl { max-width: 1040px; }

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--neutral-100);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}

.modal-header p {
  font-size: 13px;
  color: var(--neutral-500);
  margin: 0;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--neutral-100);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Xem trước giống màn app (Tạo tin / Thông báo) */
.modal--app-preview {
  max-width: 420px;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.modal--app-preview .modal-header {
  padding: 18px 22px 14px;
}

.modal--app-preview .modal-body {
  padding: 0 22px 18px;
}

.modal--app-preview .modal-footer {
  padding: 14px 22px 18px;
  border-top: none;
}

.app-preview-sheet {
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: 14px;
  padding: 18px 18px 16px;
  text-align: left;
}

.app-preview-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0 0 14px;
  line-height: 1.35;
}

.app-preview-dl {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--neutral-100);
  padding-top: 12px;
}

.app-preview-row {
  display: flex;
  gap: 8px 12px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 10px;
}

.app-preview-row:last-child {
  margin-bottom: 0;
}

.app-preview-row dt {
  margin: 0;
  font-weight: 600;
  color: var(--neutral-800);
  min-width: 5.5rem;
}

.app-preview-row dd {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--neutral-700);
}

.app-preview-bodytext {
  margin: 0;
  font-size: 13px;
  color: var(--neutral-600);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  border-top: 1px solid var(--neutral-100);
  padding-top: 12px;
  margin-top: 4px;
}

.app-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--neutral-100);
}

.app-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: default;
  text-align: center;
}

.app-preview-btn--ghost {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  z-index: 100;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1040px;
  max-width: 96vw;
  background: var(--white);
  z-index: 101;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(15,23,42,0.10);
  animation: slideInRight 0.2s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* ============================================================
   Empty / Loading state
============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--neutral-500);
}

.empty-state .icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--neutral-100);
  display: grid;
  place-items: center;
  color: var(--neutral-400);
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-700);
  margin: 0 0 6px;
}

.empty-state p {
  font-size: 13px;
  margin: 0 0 16px;
}

.skeleton {
  background: linear-gradient(90deg, var(--neutral-100) 0%, var(--neutral-50) 50%, var(--neutral-100) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 6px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   Utility
============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: var(--neutral-500); }
.text-strong { color: var(--neutral-900); font-weight: 500; }
.text-primary { color: var(--primary-600); }
.text-success { color: var(--success-fg); }
.text-danger { color: var(--danger-fg); }
.text-warning { color: var(--warning-fg); }
/* Giữ class name cũ; hiển thị bằng Inter + số tabular (không dùng font monospace hệ thống) */
.font-mono {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.uppercase-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--neutral-500);
}
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.divider {
  height: 1px;
  background: var(--neutral-100);
  margin: 14px 0;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  padding: 16px;
}

.kpi-item .kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--neutral-500);
  margin-bottom: 4px;
}

.kpi-item .kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.2;
}

.kpi-item .kpi-caption {
  font-size: 11px;
  color: var(--neutral-500);
  margin-top: 2px;
}

/* Đồng bộ nhân sự — thẻ tóm tắt (sync.html) */
.sync-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .sync-stat-grid {
    grid-template-columns: 1fr;
  }
}

.sync-stat-card {
  border-radius: var(--radius-md, 12px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.sync-stat-card--mint {
  border: 1px solid #d8f2e6;
  background: #f7fffb;
}

.sync-stat-card--cream {
  border: 1px solid #ffe7b0;
  background: #fffdf5;
}

.sync-stat-card--sky {
  border: 1px solid #e0e4f5;
  background: #fafaff;
}

.sync-stat-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sync-stat-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-stat-card__icon .icon,
.sync-stat-card__icon [data-lucide] {
  width: 20px;
  height: 20px;
}

.sync-stat-card--mint .sync-stat-card__icon {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.sync-stat-card--cream .sync-stat-card__icon {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.sync-stat-card--sky .sync-stat-card__icon {
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-600, #2563eb);
}

.sync-stat-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.35;
}

.sync-stat-card__metric {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 2px;
}

.sync-stat-card__value {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--neutral-900);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sync-stat-card__unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-500);
}

.sync-stat-card__sep {
  font-size: 22px;
  font-weight: 500;
  color: var(--neutral-400);
  margin: 0 2px;
}

.sync-stat-card__mono {
  font-size: 13px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--neutral-800);
  line-height: 1.4;
  word-break: break-all;
}

.sync-stat-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sync-stat-card__caption {
  font-size: 12px;
  color: var(--neutral-500);
  line-height: 1.45;
}

/* Bar chart inline (department distribution) */
.dept-bar {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.dept-bar .bar-track {
  background: var(--neutral-100);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

.dept-bar .bar-fill {
  background: var(--primary-500);
  height: 100%;
  border-radius: 999px;
}

.dept-bar .bar-value {
  text-align: right;
  color: var(--neutral-700);
  font-weight: 500;
}

/* Capacity / progress bar generic */
.progress-track {
  background: var(--neutral-100);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
}

.progress-fill {
  background: var(--primary-600);
  height: 100%;
  border-radius: 999px;
}

.progress-fill.tone-success { background: var(--success-fg); }
.progress-fill.tone-warning { background: var(--warning-fg); }
.progress-fill.tone-danger { background: var(--danger-fg); }

/* Multi-select tag area */
.tag-area {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  min-height: 38px;
  background: var(--white);
}

/* Two-pane layout (legacy) */
.two-pane {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .two-pane { grid-template-columns: 1fr; }
}

/* Tạo nhóm đối tượng — transfer list hai cột (token CMS) */
.audience-transfer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .audience-transfer-grid { grid-template-columns: 1fr; }
}

.audience-transfer-pane {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
  background: var(--white);
  min-height: 380px;
  overflow: hidden;
}

.audience-transfer-pane--selected {
  border-color: var(--primary-200, #b6d4fe);
  box-shadow: 0 0 0 1px var(--primary-50, #eaf3ff);
}

.audience-transfer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-100);
}

.audience-transfer-pane--selected .audience-transfer-head {
  background: var(--primary-25, #f5f9ff);
  border-bottom-color: var(--primary-100, #d6e8ff);
}

.audience-transfer-head .search-input {
  flex: 1 1 200px;
  max-width: 280px;
  min-width: 160px;
}

.audience-transfer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--neutral-100);
  background: var(--white);
}

.audience-transfer-filters > .select {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 100%;
}

.audience-transfer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--neutral-100);
  background: var(--neutral-25, #fcfcfd);
}

.audience-transfer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.audience-transfer-body > .table-wrap {
  flex: 1;
  border: 0;
  border-radius: 0;
  overflow: auto;
  max-height: 340px;
}

.audience-transfer-body .tbl {
  margin: 0;
}

.audience-transfer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--neutral-100);
  font-size: 13px;
  color: var(--neutral-600);
  background: var(--white);
}

.audience-transfer-footer .pagination {
  flex-shrink: 0;
}

.audience-transfer-footer .select {
  max-width: 110px;
  font-size: 13px;
}

/* Hashtag chip */
.hashtag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--primary-700);
  font-weight: 500;
  background: var(--primary-50);
  padding: 4px 10px;
  border-radius: 6px;
}

/* Featured cards (notification list top) */
.feat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  min-height: 110px;
}

.feat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-200);
}

.feat-card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.3;
}

.feat-card .ribbon {
  font-size: 11px;
  color: var(--primary-700);
  background: var(--primary-50);
  padding: 2px 6px;
  border-radius: 4px;
  align-self: flex-start;
}

.feat-card .id-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--neutral-500);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

.feat-card .counter-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  font-size: 12px;
}

.feat-card .counter-line strong {
  font-size: 14px;
  color: var(--neutral-900);
}

/* Avatar inline */
.avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--neutral-200);
  color: var(--neutral-700);
  font-size: 11px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
}

.avatar-md {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary-600);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quiet hours */
.warn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--warning-soft);
  border: 1px solid #FDE68A;
  font-size: 12px;
  color: var(--warning-fg);
}

/* Wizard footer fixed */
.wizard-footer {
  position: sticky;
  bottom: 0;
  background: var(--white);
  border-top: 1px solid var(--neutral-100);
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  z-index: 5;
}

.preview-phone {
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-frame {
  background: linear-gradient(160deg, #2e4eb8 0%, #1a2f7a 60%, #0f1f5e 100%);
  border-radius: 28px;
  padding: 32px 14px 14px;
  color: var(--white);
  position: relative;
  font-size: 12px;
  min-height: 240px;
  box-shadow: 0 12px 30px rgba(15,23,42,.18);
}

.phone-toggle {
  align-self: center;
  display: inline-flex;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  padding: 3px;
}

.phone-toggle-item {
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  padding: 5px 12px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.phone-toggle-item.active {
  background: var(--white);
  color: var(--neutral-900);
  box-shadow: 0 1px 2px rgba(16,24,40,.10);
}

.phone-frame .status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.phone-frame .notif-card {
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.4;
}

.phone-frame .notif-card strong {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

/* Wizard tạo thông báo — preview điện thoại nổi bật */
.nwizard-phone-frame.phone-frame {
  padding: 22px 12px 16px;
  min-height: 300px;
}

.nwizard-preview-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nwizard-preview-sheet.app-preview-sheet {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.nwizard-preview-foot {
  text-align: center;
  font-size: 11px;
  margin: 12px 0 0;
  opacity: 0.88;
  color: rgba(255, 255, 255, 0.92);
}

/* Deep link CTA — wizard thông báo (gọn, một ô link chính) */
.nw-deeplink-section .form-section-title {
  margin-bottom: 10px;
}

.nw-deeplink-link-block {
  padding: 0 2px;
}

.nw-deeplink-input {
  width: 100%;
  max-width: 100%;
}

.nw-deeplink-hint {
  margin: 6px 0 0 !important;
  font-size: 12px;
  line-height: 1.45;
  color: var(--neutral-500);
}

.nw-deeplink-details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--neutral-100);
}

.nw-deeplink-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary-600, #2563eb);
  list-style: none;
  user-select: none;
  margin-bottom: 0;
}

.nw-deeplink-details summary::-webkit-details-marker {
  display: none;
}

.nw-deeplink-details[open] summary {
  margin-bottom: 8px;
  color: var(--neutral-600);
}

.nw-deeplink-quickselect {
  width: 100%;
}

.nw-deeplink-cta-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  border-left: 3px solid var(--primary-500, #3b7cff);
  background: var(--white);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.nw-deeplink-cta-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
  margin: 0 0 2px;
}

.nw-deeplink-cta-sub {
  margin: 0 0 10px !important;
  font-size: 11px;
  color: var(--neutral-500);
  line-height: 1.4;
}

.nw-deeplink-cta-row {
  padding-bottom: 6px;
}

.nw-deeplink-cta-row--border {
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--neutral-100);
}

.nw-deeplink-cta-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.nw-deeplink-cta-idx {
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-500);
  letter-spacing: 0.02em;
}

.nw-deeplink-label-in {
  width: 100%;
  margin-bottom: 8px;
}

.nw-deeplink-color-row {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(112px, 1.35fr);
  gap: 8px 10px;
  align-items: end;
}

.nw-deeplink-mini-label {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--neutral-500);
}

.nw-deeplink-mini-label--grow {
  min-width: 0;
}

.nw-deeplink-swatch {
  height: 34px;
  padding: 2px;
  border-radius: 8px;
}

.nw-deeplink-mode {
  width: 100%;
  height: 34px;
  font-size: 12px;
}

.nw-deeplink-add {
  margin-top: 10px;
  width: 100%;
}

.nw-deeplink-push-note {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  padding: 8px 10px !important;
}

@media (max-width: 520px) {
  .nw-deeplink-color-row {
    grid-template-columns: 1fr 1fr;
  }
  .nw-deeplink-mini-label--grow {
    grid-column: 1 / -1;
  }
}

.input.input-sm {
  font-size: 13px;
  padding: 6px 10px;
  min-height: 36px;
}

/* Calendar (communications) */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-100);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.calendar-cell {
  background: var(--white);
  min-height: 100px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-cell.muted {
  background: var(--neutral-50);
}

.calendar-cell .date {
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-700);
}

.calendar-cell .date.today {
  color: var(--primary-600);
  font-weight: 600;
}

.calendar-event {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--info-soft);
  color: var(--info-fg);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-event.news {
  background: var(--neutral-100);
  color: var(--neutral-700);
}

/* Calendar chip: phân biệt Event vs News bằng icon + dải màu trái */
.cal-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: filter .15s ease;
}

.cal-chip:hover { filter: brightness(0.96); }

.cal-chip i,
.cal-chip svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.cal-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-chip--event {
  background: #EEF2FF;
  color: #3535C2;
  border-left-color: #5B5BD6;
}

.cal-chip--news {
  background: #ECFDF5;
  color: #0F766E;
  border-left-color: #14B8A6;
}

.cal-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--neutral-700);
}

.cal-legend .swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

.cal-legend .swatch i,
.cal-legend .swatch svg { width: 16px; height: 16px; }

.cal-legend .swatch--event {
  background: #EEF2FF;
  color: #3535C2;
  border-left: 3px solid #5B5BD6;
}

.cal-legend .swatch--news {
  background: #ECFDF5;
  color: #0F766E;
  border-left: 3px solid #14B8A6;
}

/* Type chip dùng trong cột Loại của list (nhỏ hơn cal-chip) */
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  border-left: 3px solid transparent;
}

.type-chip i,
.type-chip svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.type-chip--event {
  background: #EEF2FF;
  color: #3535C2;
  border-left-color: #5B5BD6;
}

.type-chip--news {
  background: #ECFDF5;
  color: #0F766E;
  border-left-color: #14B8A6;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--neutral-50);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  color: var(--neutral-500);
}

.calendar-header > div {
  padding: 8px 12px;
  text-align: center;
  background: var(--neutral-50);
}

/* ============================================================
   Toast notifications
============================================================ */
.toast-root {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-left: 4px solid var(--info-fg);
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
  animation: toast-in .18s ease-out;
  pointer-events: auto;
}

.toast--leaving {
  animation: toast-out .18s ease-in forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateX(20px); }
}

.toast--success { border-left-color: var(--success-fg); }
.toast--success .toast-icon { color: var(--success-fg); }
.toast--info { border-left-color: var(--info-fg); }
.toast--info .toast-icon { color: var(--info-fg); }
.toast--warning { border-left-color: var(--warning-fg); }
.toast--warning .toast-icon { color: var(--warning-fg); }
.toast--danger { border-left-color: var(--danger-fg); }
.toast--danger .toast-icon { color: var(--danger-fg); }

.toast-icon { flex: 0 0 auto; padding-top: 1px; }
.toast-body { flex: 1; min-width: 0; font-size: 13px; }
.toast-title { font-weight: 600; color: var(--neutral-900); }
.toast-text { color: var(--neutral-700); margin-top: 2px; line-height: 1.45; }
.toast-action {
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--neutral-200);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}
.toast-action:hover { background: var(--neutral-50); }

.toast-close {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--neutral-500);
  cursor: pointer;
}
.toast-close:hover { background: var(--neutral-50); color: var(--neutral-900); }

/* ============================================================
   Confirm modal
============================================================ */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade-in .14s ease-out;
}
.confirm-modal-overlay.leaving { animation: fade-out .14s ease-in forwards; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }

.confirm-modal {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.confirm-modal-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}
.confirm-modal-icon.tone-info { background: var(--info-soft); color: var(--info-fg); }
.confirm-modal-icon.tone-danger { background: var(--danger-soft); color: var(--danger-fg); }

.confirm-modal-body { flex: 1; min-width: 0; }
.confirm-modal-title { margin: 2px 0 6px; font-size: 17px; font-weight: 600; color: var(--neutral-900); }
.confirm-modal-text { color: var(--neutral-700); font-size: 13.5px; line-height: 1.5; margin: 0; }
.confirm-modal-actions--stack {
  flex-direction: column;
  align-items: stretch;
}
.confirm-modal-actions--stack .btn { width: 100%; justify-content: center; }

.number-stepper {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.number-stepper .input {
  flex: 1;
  text-align: center;
  border-radius: 0;
  min-width: 0;
}
.number-stepper .btn { border-radius: 0; min-width: 40px; }
.number-stepper .btn:first-child { border-radius: 8px 0 0 8px; }
.number-stepper .btn:last-child { border-radius: 0 8px 8px 0; }

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.confirm-reason {
  margin-top: 6px;
  width: 100%;
  resize: vertical;
}

input.is-invalid, textarea.is-invalid, select.is-invalid {
  border-color: var(--danger-fg) !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.18);
}

.helper-text.over { color: var(--danger-fg); font-weight: 500; }

/* ============================================================
   Topbar popover (bell, user dropdown)
============================================================ */
.topbar-popover-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.topbar-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  min-width: 280px;
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 800;
  overflow: hidden;
}

.topbar-popover.open { display: block; animation: fade-in .12s ease-out; }
.user-dropdown { min-width: 220px; padding: 6px; }

.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 13px;
}

.popover-body { max-height: 360px; overflow-y: auto; }

.popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--neutral-900);
  text-decoration: none;
}
.user-dropdown .popover-item { border-radius: 6px; padding: 8px 10px; }
.popover-item:hover { background: var(--neutral-50); }
.popover-item.unread { background: var(--info-soft); }
.popover-item.unread:hover { background: #DEEAFE; }
.popover-item.danger { color: var(--danger-fg); }
.popover-item-title { font-weight: 500; line-height: 1.3; }
.popover-item-meta { font-size: 11px; color: var(--neutral-500); margin-top: 2px; }
.popover-divider { height: 1px; background: var(--neutral-100); margin: 6px 0; }
.popover-empty { padding: 18px; color: var(--neutral-500); font-size: 13px; text-align: center; }

.icon-btn { position: relative; }
.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger-fg);
  color: var(--white);
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
}

/* ============================================================
   Sticky banner (sync degraded)
============================================================ */
.sticky-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  border-radius: 0;
  margin: -16px -24px 16px;
  padding: 12px 24px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sticky-banner.tone-warning { background: var(--warning-soft); color: var(--warning-fg); border-bottom: 1px solid #FCE9C5; }
.sticky-banner.tone-danger { background: var(--danger-soft); color: var(--danger-fg); border-bottom: 1px solid #F8C8C8; }

/* ============================================================
   Mirror placeholder (preview)
============================================================ */
.is-placeholder { color: var(--neutral-400) !important; opacity: .85; }

/* Btn-xs cho popover */
.btn-xs { padding: 2px 8px; font-size: 11.5px; line-height: 1.5; }

/* Wizard step.invalid label nhỏ */
.step.has-error .step-num { background: var(--danger-soft); color: var(--danger-fg); border-color: var(--danger-fg); }

/* Send-type card (notifications-new B2) */
.send-type-card {
  cursor: pointer;
  border: 2px solid var(--neutral-100);
  border-radius: 12px;
  padding: 16px;
  transition: border-color .15s ease, background .15s ease;
}
.send-type-card:hover { background: var(--neutral-50); }
.send-type-card.is-active {
  border-color: var(--primary-600);
  background: var(--primary-50);
}

/* Tag chip (multi-select) */
.tag-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  color: var(--neutral-700);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.tag-chip:hover { background: var(--neutral-50); }
.tag-chip.is-active {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-300);
  font-weight: 500;
}

/* IAM channel toggle */
.channel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 14px;
  font-size: 13px;
  border: 2px solid var(--neutral-100);
  background: var(--white);
  color: var(--neutral-700);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  gap: 4px;
}
.channel-card:hover { background: var(--neutral-50); }
.channel-card.is-active {
  border-color: var(--primary-600);
  background: var(--primary-50);
  color: var(--primary-700);
}

/* Layout chip B1 IAM */
.layout-chip {
  border: 1px solid var(--neutral-200);
  background: var(--white);
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  color: var(--neutral-700);
}
.layout-chip:hover { background: var(--neutral-50); }
.layout-chip.is-active {
  background: var(--primary-600);
  color: var(--white);
  border-color: var(--primary-600);
}

/* ============================================================
   Lovable-style wizard primitives
============================================================ */

/* Two-column wizard layout: form left, side rail right */
.wizard-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1180px) {
  .wizard-cols { grid-template-columns: 1fr; }
}

.wizard-cols.audience {
  grid-template-columns: minmax(0, 1fr) 320px;
}

/* Send-type grid (B2 notifications) */
.send-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 960px) {
  .send-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .send-type-grid { grid-template-columns: 1fr; }
}

.send-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.send-type-card:hover { background: var(--neutral-50); border-color: var(--neutral-300); }
.send-type-card.is-active {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary-300);
}
.send-type-card .icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--primary-600);
}
.send-type-card.is-active .icon-tile {
  background: var(--primary-100);
  color: var(--primary-700);
}
.send-type-card .label {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
}
.send-type-card .desc {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--neutral-400);
  line-height: 1.4;
  margin-top: 2px;
}
.send-type-card .check-tick {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  display: none;
  color: var(--primary-600);
}
.send-type-card.is-active .check-tick { display: inline-flex; }

/* Campaign picker (TTNB event create) */
.campaign-card .campaign-chip {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--neutral-100);
  color: var(--neutral-600);
}
.send-type-card.is-active .campaign-chip {
  background: var(--primary-50);
  color: var(--primary-700);
}

/* Campaign picker — scoped pastel cards (content-new only) */
#cw-campaign-picker .send-type-card {
  gap: 8px;
  padding: 12px 14px;
}
#cw-campaign-picker .send-type-card .icon-tile {
  width: 32px;
  height: 32px;
}
#cw-campaign-picker .campaign-card__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
#cw-campaign-picker .campaign-card__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
#cw-campaign-picker .send-type-card .label {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--neutral-900);
}
#cw-campaign-picker .send-type-card .desc {
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
  color: var(--neutral-500);
}
#cw-campaign-picker .campaign-chip {
  display: inline-flex;
  align-self: flex-start;
  width: auto;
  margin-top: 0;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  color: var(--neutral-600);
}
#cw-campaign-picker .campaign-card--yep {
  background: #eff7ff;
  border-color: #bfdbfe;
}
#cw-campaign-picker .campaign-card--yep .icon-tile {
  background: #dbeafe;
  color: #2563eb;
}
#cw-campaign-picker .campaign-card--yep.is-active {
  background: #dbeafe;
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px #93c5fd;
}
#cw-campaign-picker .campaign-card--yep.is-active .icon-tile {
  background: #bfdbfe;
  color: #2563eb;
}
#cw-campaign-picker .campaign-card--yep.is-active .check-tick {
  color: #2563eb;
}
#cw-campaign-picker .campaign-card--yep.is-active .campaign-chip {
  border-color: #93c5fd;
  background: #f5f9ff;
  color: #2563eb;
}
#cw-campaign-picker .campaign-card--workshop {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
#cw-campaign-picker .campaign-card--workshop .icon-tile {
  background: #dcfce7;
  color: #16a34a;
}
#cw-campaign-picker .campaign-card--workshop.is-active {
  background: #dcfce7;
  border-color: #86efac;
  box-shadow: 0 0 0 1px #86efac;
}
#cw-campaign-picker .campaign-card--workshop.is-active .icon-tile {
  background: #bbf7d0;
  color: #16a34a;
}
#cw-campaign-picker .campaign-card--workshop.is-active .check-tick {
  color: #16a34a;
}
#cw-campaign-picker .campaign-card--workshop.is-active .campaign-chip {
  border-color: #86efac;
  background: #f7fef9;
  color: #16a34a;
}
#cw-campaign-picker .campaign-card--internal {
  background: #f5f3ff;
  border-color: #ddd6fe;
}
#cw-campaign-picker .campaign-card--internal .icon-tile {
  background: #ede9fe;
  color: #7c3aed;
}
#cw-campaign-picker .campaign-card--internal.is-active {
  background: #ede9fe;
  border-color: #c4b5fd;
  box-shadow: 0 0 0 1px #c4b5fd;
}
#cw-campaign-picker .campaign-card--internal.is-active .icon-tile {
  background: #ddd6fe;
  color: #7c3aed;
}
#cw-campaign-picker .campaign-card--internal.is-active .check-tick {
  color: #7c3aed;
}
#cw-campaign-picker .campaign-card--internal.is-active .campaign-chip {
  border-color: #c4b5fd;
  background: #faf8ff;
  color: #7c3aed;
}
#cw-campaign-picker .campaign-card--yep:hover {
  border-color: #93c5fd;
}
#cw-campaign-picker .campaign-card--workshop:hover {
  border-color: #86efac;
}
#cw-campaign-picker .campaign-card--internal:hover {
  border-color: #c4b5fd;
}
.cw-campaign-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--primary-200);
  border-radius: 10px;
  background: var(--primary-50);
}
.cw-ops-expand {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--neutral-50);
}

/* QR vận hành + Hoạt động SK (content-new) */
.cw-qr-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.cw-qr-card-head .form-section-title {
  margin-bottom: 0;
}
.cw-qr-preset-line {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--neutral-600);
}
.cw-qr-section {
  margin-bottom: 14px;
}
.cw-qr-section__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin-bottom: 8px;
}
.cw-qr-option-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cw-option-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cw-option-row:hover {
  border-color: var(--primary-200);
  background: var(--neutral-25, #fcfcfd);
}
.cw-option-row.is-on {
  border-color: var(--primary-300);
  background: var(--primary-50);
}
.cw-option-row.is-disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.cw-option-row input[type="checkbox"],
.cw-option-row input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--primary-600, #2563eb);
}
.cw-option-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--neutral-100);
  color: var(--neutral-600);
  flex-shrink: 0;
}
.cw-option-row.is-on .cw-option-row__icon {
  background: var(--primary-100);
  color: var(--primary-700);
}
.cw-option-row__body {
  flex: 1;
  min-width: 0;
}
.cw-option-row__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.35;
}
.cw-option-row__title .pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 1px 6px;
}
.cw-option-row__hint {
  display: block;
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 2px;
  line-height: 1.35;
}
.cw-option-row--compact {
  padding: 6px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-800);
}
.cw-option-row--compact:hover {
  border: none;
  background: transparent;
}
.cw-option-row--compact.is-on {
  border: none;
  background: transparent;
}
.cw-ops-rules {
  margin-bottom: 14px;
}
.cw-ops-rules__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin-bottom: 8px;
}

.cw-ops-segmented {
  margin-bottom: 16px;
}
.cw-ops-monitor-header {
  margin-bottom: 4px;
}
.cw-ops-monitor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cw-ops-drawer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 6px;
}
.event-setup-drawer__header--ops {
  padding-bottom: 12px;
}
.event-setup-drawer__header--ops .event-setup-drawer__title {
  margin-top: 0;
}
.cw-ops-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--neutral-100);
}
.cw-ops-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.cw-ops-head__phase {
  line-height: 1.4;
}
.cw-ops-monitor__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.cw-ops-monitor__hint {
  line-height: 1.4;
}
.cw-ops-inline-link {
  padding: 0 !important;
  min-height: 0 !important;
  font-size: 12px !important;
  vertical-align: baseline;
  display: inline;
  height: auto;
}
.cw-ops-monitor__alert {
  margin: 0 !important;
}
.cw-ops-monitor__alert--info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px !important;
}
.cw-ops-monitor__alert--info .text-sm {
  line-height: 1.4;
}
.cw-ops-monitor__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cw-ops-snapshot {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--neutral-50);
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 2;
}
.cw-ops-snapshot__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  line-height: 1.35;
  border-bottom: 1px solid var(--neutral-200);
  background: var(--white);
}
.cw-ops-snapshot__hint i,
.cw-ops-snapshot__hint svg {
  flex-shrink: 0;
  color: var(--primary-600, #2563eb);
}
.cw-ops-snapshot__kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--neutral-200);
}
.cw-ops-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--white);
  min-width: 0;
}
.cw-ops-kpi__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw-ops-kpi__value {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--neutral-900);
}
.cw-ops-kpi__value--accent {
  color: var(--primary-700, #1d5bbf);
}
.cw-ops-snapshot__rules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 12px;
  border-top: 1px solid var(--neutral-200);
  background: var(--white);
}
.cw-ops-rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  cursor: default;
}
.cw-ops-rule-chip .badge {
  font-size: 10px;
  padding: 1px 6px;
}
.cw-ops-panel {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  padding: 10px 12px;
}
.cw-ops-panel--major {
  margin-top: 4px;
}
.cw-ops-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.cw-ops-panel__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-700);
}
.cw-ops-panel__empty {
  margin: 0;
}
.cw-ops-panel__foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--neutral-100);
  display: flex;
}
.cw-ops-panel__cta-full {
  width: 100%;
  justify-content: center;
}
.cw-ops-preview-hint {
  margin: 6px 0 0;
  line-height: 1.4;
}
.cw-ops-qr-footnote {
  margin: 6px 0 0;
  line-height: 1.35;
}
.cw-ops-qr-table {
  margin-top: 0;
}
.cw-ops-qr-table .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--white);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-600);
}
.cw-ops-qr-table .table tbody td {
  padding: 6px 8px;
  vertical-align: middle;
}
.cw-ops-qr-table .table tbody tr:hover {
  background: #f8fbff;
}
.cw-ops-qr-code {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-50, #eef4ff);
  color: var(--primary-700, #1d5bbf);
  border: none;
}
.cw-ops-qr-purpose {
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-800);
}
.cw-ops-qr-validity {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cw-ops-qr-validity {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cw-ops-qr-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
}
.cw-ops-qr-item__main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}
.cw-ops-qr-item__code {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-50, #eef4ff);
  color: var(--primary-700, #1d5bbf);
}
.cw-ops-qr-item__label {
  font-weight: 500;
  color: var(--neutral-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw-ops-qr-item__status {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neutral-300);
}
.cw-ops-qr-item__status.is-active {
  background: var(--success-fg, #16a34a);
}
.cw-ops-qr-item__meta {
  grid-column: 1;
  grid-row: 2;
  padding-left: 0;
}
.cw-ops-qr-item__sep {
  margin: 0 4px;
  opacity: 0.5;
}
.cw-ops-qr-item__copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}
.cw-ops-attendee-table {
  margin-top: 8px;
  max-height: min(280px, 40vh);
  overflow: auto;
}
.cw-ops-attendee-table__grid thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-600);
}
.cw-ops-demo-actions {
  white-space: nowrap;
  line-height: 1.6;
}
.cw-ops-demo-actions .btn {
  min-width: 4.5rem;
  font-size: 11px;
  padding-left: 6px;
  padding-right: 6px;
}
@media (max-width: 480px) {
  .cw-ops-snapshot__kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}
.cw-ops-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}
.cw-ops-action-bar.cw-ops-monitor__toolbar {
  margin: 0;
}
.cw-ops-filter-chips-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 4px;
  margin-bottom: 2px;
}
.cw-ops-filter-chips-wrap .cw-ops-filter-chips {
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
}
.cw-ops-section {
  margin-bottom: 18px;
}
.cw-ops-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.cw-ops-section__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 8px;
}
.cw-ops-rule-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
}
.cw-ops-rule-chips__link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.cw-ops-rule-chips__link:hover {
  color: var(--primary-700);
  text-decoration: underline;
}
.cw-ops-filter-chips {
  margin-top: 0;
}
.cw-ops-filter-chips .segmented-item {
  font-size: 12px;
  padding: 6px 10px;
}
.cw-gift-stations-inline {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--neutral-200);
  border-radius: 8px;
  background: var(--neutral-50);
}
.cw-gift-stations-inline .label {
  margin-bottom: 8px;
}
.cw-gift-station-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}
.cw-qr-preview {
  padding: 10px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--neutral-50);
}
.cw-qr-preview__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 8px;
}
.cw-qr-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Hoạt động trong ngày SK — banner ngoài + 1 khung config (giống Khảo sát) */
.cw-activity-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.cw-activity-section > .form-section-title,
.cw-activity-section > .helper-text,
.cw-activity-section > .cw-workshop-ops-note,
.cw-activity-section > .cw-survey-purpose-row,
.cw-activity-config {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cw-activity-config {
  display: block;
  margin-top: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.cw-activity-config .cw-activity-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0;
  margin-bottom: 0;
}

.cw-activity-config .cw-activity-panel + .cw-activity-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--neutral-200);
}

.cw-activity-config .cw-activity-panel__head {
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: none;
}

.cw-activity-config .cw-activity-panel__body {
  margin-top: 0;
}

.cw-activity-config .cw-mcq-question {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0 0 14px;
  margin: 0;
}

.cw-activity-config .cw-mcq-question + .cw-mcq-question {
  padding-top: 14px;
  border-top: 1px solid var(--neutral-100);
}

.cw-activity-config .input,
.cw-activity-config .select,
.cw-activity-config .textarea,
.cw-activity-config textarea.input {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.cw-activity-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 16px);
  width: 100%;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  .cw-activity-toolbar {
    flex-direction: column;
  }
}
.cw-activity-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  min-height: auto;
  box-sizing: border-box;
}
.cw-activity-banner:hover {
  border-color: var(--neutral-300);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.cw-activity-banner input[type="checkbox"] {
  flex-shrink: 0;
  align-self: flex-start;
  margin: 2px 0 0 auto;
}
.cw-activity-banner__icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
  padding-top: 1px;
  color: var(--neutral-600);
  line-height: 0;
}
.cw-activity-banner__icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.cw-activity-banner__content {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.cw-activity-banner__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1.3;
  margin-bottom: 4px;
}
.cw-activity-banner__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 11px;
  color: var(--neutral-500);
  line-height: 1.35;
}
/* Vòng quay — icon xanh */
.cw-activity-banner--luckyWheel .cw-activity-banner__icon {
  color: #2563eb;
}
.cw-activity-banner--luckyWheel.is-on {
  background: #eff7ff;
  border-color: #93c5fd;
}
.cw-activity-banner--luckyWheel.is-on:hover {
  border-color: #93c5fd;
}
/* Minigame — icon xanh lá */
.cw-activity-banner--minigame .cw-activity-banner__icon {
  color: #16a34a;
}
.cw-activity-banner--minigame.is-on {
  background: #f0fdf4;
  border-color: #86efac;
}
.cw-activity-banner--minigame.is-on:hover {
  border-color: #86efac;
}
/* Giải đố — icon cam */
.cw-activity-banner--quiz .cw-activity-banner__icon {
  color: #d97706;
}
.cw-activity-banner--quiz.is-on {
  background: #fffbeb;
  border-color: #fcd34d;
}
.cw-activity-banner--quiz.is-on:hover {
  border-color: #fcd34d;
}
.cw-activity-panel {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.cw-activity-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--neutral-200);
}
.cw-activity-panel__body {
  margin-top: 16px;
}
.cw-activity-panel__body .form-field + .form-field {
  margin-top: 0;
}
.cw-lucky-play-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.cw-lucky-play-mode__opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
}
.cw-lucky-play-mode__opt:has(input:checked) {
  border-color: var(--primary-400);
  background: var(--primary-50);
}
.cw-lucky-play-mode__opt input {
  margin-top: 2px;
  flex-shrink: 0;
}
.cw-lucky-play-mode__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cw-lucky-play-mode__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
}
.cw-lucky-play-mode__desc {
  font-size: 11px;
  line-height: 1.4;
  color: var(--neutral-500);
}
@media (max-width: 640px) {
  .cw-lucky-play-mode {
    grid-template-columns: 1fr;
  }
}
.cw-activity-panel__body .cw-lucky-round-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.cw-btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}
.cw-btn-add:hover {
  color: var(--primary-700);
}
.cw-btn-add:focus-visible {
  outline: 2px solid var(--primary-300);
  outline-offset: 2px;
  border-radius: 4px;
}

.cw-lucky-round {
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  margin-bottom: 0;
  overflow: hidden;
}
.cw-lucky-round__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: none;
  background: #edeff7;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #2d4a9c;
}
.cw-lucky-round__head:hover {
  background: #e4e8f4;
}
.cw-lucky-round.is-open .cw-lucky-round__head {
  border-bottom: 1px solid var(--neutral-200);
}
.cw-lucky-round__head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.cw-lucky-round__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: #2d4a9c;
  font-weight: 600;
}
.cw-lucky-round__summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5a6b9a;
}
.cw-lucky-round__chevron {
  width: 16px;
  height: 16px;
  color: #2d4a9c;
  transition: transform 0.2s ease;
}
.cw-lucky-round__chevron.is-open {
  transform: rotate(180deg);
}
.cw-lucky-round__body {
  padding: 12px 14px 14px;
  background: var(--white);
}
.cw-lucky-round__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f5f7fc;
  color: #2d4a9c;
}
.cw-lucky-round__image-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cw-lucky-round__image-row .input {
  flex: 1;
  min-width: 0;
}
.cw-lucky-round__preview {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}
.cw-lucky-remove-prize {
  color: var(--danger-fg, #dc2626) !important;
  font-weight: 600;
  padding-left: 0;
  padding-right: 0;
}
.cw-lucky-remove-prize:hover {
  color: var(--danger-700, #b91c1c) !important;
  background: transparent !important;
}

.cw-mcq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.cw-mcq-question {
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  padding: 12px 14px;
}
.cw-mcq-question__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cw-mcq-question__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-800);
}
.cw-mcq-question__remove {
  padding: 4px 6px;
  min-height: 0;
}
.cw-mcq-format {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.cw-mcq-format__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--neutral-700);
}
.cw-mcq-format__opt input {
  margin: 0;
}
.cw-mcq-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.cw-mcq-answers__head {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.cw-mcq-answers__correct-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-500);
  white-space: nowrap;
  text-align: center;
  min-width: 28px;
}
.cw-mcq-answer-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
}
.cw-mcq-answer-row__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-600);
  text-align: center;
}
.cw-mcq-answer-row__correct {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  cursor: pointer;
}
.cw-mcq-answer-row__correct input {
  margin: 0;
}
.cw-btn-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cw-activity-card {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cw-activity-card.is-on {
  border-color: var(--primary-200);
}
.cw-activity-card.is-open.is-on {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.cw-activity-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  user-select: none;
}
.cw-activity-card__enable {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.cw-activity-card__enable:hover {
  border: none;
  background: transparent;
}
.cw-activity-card__enable.is-on {
  border: none;
  background: transparent;
}
.cw-activity-card__expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--neutral-400);
  cursor: pointer;
  flex-shrink: 0;
}
.cw-activity-card__expand-btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-600);
}
.cw-activity-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--neutral-100);
  color: var(--neutral-600);
  flex-shrink: 0;
}
.cw-activity-card.is-on .cw-activity-card__icon {
  background: var(--primary-50);
  color: var(--primary-700);
}
.cw-activity-card__icon--quiz.is-on {
  background: #fff8eb;
  color: #b45309;
}
.cw-activity-card__main {
  flex: 1;
  min-width: 0;
}
.cw-activity-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
}
.cw-activity-card__summary {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw-activity-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cw-activity-card__chevron {
  color: var(--neutral-400);
  transition: transform 0.15s;
}
.cw-activity-card__chevron.is-open,
.cw-activity-card.is-open .cw-activity-card__chevron {
  transform: rotate(180deg);
}
.cw-activity-card__body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--neutral-100);
}
.cw-activity-card__body .cw-ops-expand {
  margin-top: 12px;
  background: var(--white);
}
.cw-workshop-ops-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  font-size: 13px;
  color: var(--neutral-600);
}

.cw-push-preview-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--neutral-700);
}
.cw-push-preview-list li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--neutral-200);
}
.cw-push-preview-list li:last-child { border-bottom: none; }
.cw-survey-template-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.cw-survey-tpl-q-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.cw-survey-tpl-q-label__sep {
  color: var(--neutral-400);
}
.cw-survey-tpl-q-label__stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}
.cw-survey-tpl-q-label__stars span {
  color: #f5a623;
  font-size: 13px;
}
.cw-survey-tpl-q-label__text-type {
  color: var(--neutral-500);
  font-weight: 500;
}
/* Tab Tự tạo: input câu hỏi + select loại — override .cw-survey-config .input/.select { width:100% } */
.cw-survey-custom-q-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11.5rem 28px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
}
.cw-survey-config .cw-survey-custom-q-row > .input.cw-survey-custom-q-row__q,
.cw-survey-custom-q-row__q {
  display: block;
  width: auto !important;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}
.cw-survey-config .cw-survey-custom-q-row > .select.cw-survey-custom-q-row__type,
.cw-survey-custom-q-row__type {
  display: block;
  width: 11.5rem !important;
  min-width: 11.5rem;
  max-width: 11.5rem;
  padding-left: 10px;
  padding-right: 28px;
  box-sizing: border-box;
}
.cw-survey-custom-q-row__remove {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--neutral-400);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.cw-survey-custom-q-row__remove:hover:not(:disabled) {
  background: var(--neutral-100);
  color: var(--danger-fg, #dc2626);
}
.cw-survey-custom-q-row__remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
/* Nút + Thêm câu hỏi — cùng ngôn ngữ với + Thêm mốc */
.cw-survey-config .cw-survey-add-q-btn,
.cw-survey-add-q-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  height: auto;
  min-height: 0;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-600, #2563eb);
  cursor: pointer;
  line-height: 1.4;
  box-shadow: none !important;
  font-family: inherit;
}
.cw-survey-config .cw-survey-add-q-btn:hover:not(:disabled),
.cw-survey-add-q-btn:hover:not(:disabled) {
  color: var(--primary-700, #1d4ed8);
  background: transparent !important;
  border: none !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cw-survey-add-q-btn__icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.cw-survey-opens-at {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.cw-survey-opens-at__opt {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  min-width: 0;
}
.cw-survey-opens-at__opt:has(input:checked) {
  border-color: var(--primary-400, #60a5fa);
  background: var(--primary-50, #eff6ff);
}
.cw-survey-opens-at__opt input {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary-600, #2563eb);
}
.cw-survey-opens-at__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cw-survey-opens-at__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-800);
  line-height: 1.3;
}
.cw-survey-opens-at__desc {
  font-size: 10px;
  line-height: 1.35;
  color: var(--neutral-500);
}
@media (max-width: 720px) {
  .cw-survey-opens-at {
    grid-template-columns: 1fr;
  }
}

.cw-survey-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.cw-survey-section > .form-section-title,
.cw-survey-purpose-row,
.cw-survey-config {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cw-survey-purpose-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 560px) {
  .cw-survey-purpose-row {
    grid-template-columns: 1fr;
  }
}

.cw-survey-config {
  display: block;
  margin-top: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.cw-survey-config .form-field,
.cw-survey-config .cw-survey-interest-form,
.cw-survey-config .cw-survey-interest-buttons,
.cw-survey-config .cw-survey-template-grid {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.cw-survey-config .input,
.cw-survey-config .select,
.cw-survey-config .textarea,
.cw-survey-config textarea.input {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
}

.cw-survey-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cw-survey-purpose-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cw-survey-purpose-card:hover {
  border-color: var(--primary-300, #93c5fd);
}

.cw-survey-purpose-card.is-active {
  border-color: var(--primary-500, #3b82f6);
  box-shadow: 0 0 0 1px var(--primary-100, #dbeafe);
}

.cw-survey-purpose-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.cw-survey-purpose-card--interest .cw-survey-purpose-card__icon {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

.cw-survey-purpose-card--feedback .cw-survey-purpose-card__icon {
  color: #ca8a04;
  background: rgba(202, 138, 4, 0.1);
}

.cw-survey-purpose-card--push-auto .cw-survey-purpose-card__icon {
  color: var(--primary-600, #2563eb);
  background: rgba(37, 99, 235, 0.1);
}

.cw-survey-purpose-card--push-custom .cw-survey-purpose-card__icon {
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
}

.cw-survey-purpose-card--luckyWheel .cw-survey-purpose-card__icon {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}

.cw-survey-purpose-card--minigame .cw-survey-purpose-card__icon {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}

.cw-survey-purpose-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
}

.cw-survey-purpose-card__hint {
  font-size: 11px;
  color: var(--neutral-500);
  line-height: 1.35;
}

.cw-survey-preview-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cw-survey-preview-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  font-size: 13px;
  color: var(--neutral-700);
  background: var(--white);
}

.cw-survey-preview-option input {
  margin: 0;
}

.cw-survey-preview-yesno {
  display: flex;
  gap: 8px;
}

.cw-survey-preview-yesno span {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  font-size: 13px;
  color: var(--neutral-700);
}

.cw-survey-interest-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
}

.cw-survey-interest-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .cw-survey-interest-buttons {
    grid-template-columns: 1fr;
  }
}

.cw-survey-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cw-survey-feedback-item {
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--white);
}

.cw-survey-feedback-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cw-survey-feedback-item__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-600);
}

.cw-survey-feedback-item__stars {
  display: flex;
  gap: 3px;
  margin-top: 8px;
  color: var(--warning-fg, #b45309);
  font-size: 16px;
}

.cw-survey-feedback-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cw-survey-app-preview-image {
  display: block;
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 12px;
  border: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}
.cw-survey-app-preview-q {
  margin-bottom: 14px;
}
.cw-survey-app-preview-q:last-child {
  margin-bottom: 0;
}
.cw-survey-app-preview-q__label {
  font-size: 13px;
  line-height: 1.45;
  color: var(--neutral-800);
  margin-bottom: 6px;
}
.cw-survey-app-preview-q__stars {
  display: flex;
  gap: 4px;
}
.cw-survey-app-preview-q__stars span {
  color: var(--warning-fg);
  font-size: 18px;
  line-height: 1;
}
.cw-survey-app-preview-q__textfield {
  height: 36px;
  border-radius: 8px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
}
.recurring-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 720px) {
  .recurring-row { grid-template-columns: 1fr; }
}
.recurring-row .form-field { margin-bottom: 0; }

/* Weekday chips */
.weekday-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.weekday-chip {
  width: 44px;
  height: 32px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-700);
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.weekday-chip:hover { background: var(--neutral-50); }
.weekday-chip.is-active {
  background: var(--primary-600);
  color: var(--white);
  border-color: var(--primary-600);
}

/* Day-of-month grid (1-31) */
.day-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}
@media (max-width: 720px) {
  .day-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
.day-cell {
  height: 32px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  color: var(--neutral-700);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .12s, background .12s, color .12s;
}
.day-cell:hover { background: var(--neutral-50); }
.day-cell.is-active {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: var(--white);
}

/* Segmented (Ngày cụ thể / Ngày cuối tháng) */
.segmented {
  display: inline-flex;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  padding: 4px;
  gap: 2px;
  width: fit-content;
}
.segmented-item {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--neutral-500);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.segmented-item:hover { color: var(--neutral-800); }
.segmented-item.is-active {
  background: var(--primary-600);
  color: var(--white);
  box-shadow: 0 1px 2px rgba(36,107,239,.18);
}

/* Layout chips with icon (Modal/Image only/Banner/Card) */
.layout-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 720px) {
  .layout-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.layout-chip-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  appearance: none;
  transition: border-color .12s, background .12s;
}
.layout-chip-card:hover { background: var(--neutral-50); }
.layout-chip-card.is-active {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary-300);
}
.layout-chip-card__icon.icon-tile {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary-50);
  color: var(--primary-600);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.layout-chip-card.is-active .layout-chip-card__icon.icon-tile {
  background: var(--white);
  color: var(--primary-700);
}
.layout-chip-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
}
.layout-chip-card__title {
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.25;
}
.layout-chip-card.is-active .layout-chip-card__title {
  color: var(--primary-800, var(--primary-700));
}
.layout-chip-card__desc {
  display: block;
  width: 100%;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--neutral-400);
  line-height: 1.35;
}

/* TTL IAM — wizard */
.iam-ttl-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.iam-ttl-field__badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--neutral-400);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--neutral-100);
}
.iam-ttl-field__hint {
  margin: 0 0 8px;
  font-size: 10.5px;
  color: var(--neutral-400);
  line-height: 1.4;
}
.iam-ttl-hint {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--primary-100, #d6e6ff);
  background: var(--primary-50, #f4f8ff);
}
.iam-ttl-hint__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-800, var(--primary-700));
  margin-bottom: 2px;
}
.iam-ttl-hint__desc {
  margin: 0;
  font-size: 10.5px;
  color: var(--neutral-500);
  line-height: 1.4;
}

/* Audience rail (B3 right column) */
.audience-rail {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audience-rail .rail-card {
  padding: 18px;
  gap: 10px;
}
.audience-rail h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.audience-rail .rail-bullets {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--neutral-700);
  line-height: 1.45;
}
.audience-rail .rail-bullets li::before {
  content: '•';
  color: var(--neutral-400);
  margin-right: 8px;
}
.audience-rail .rail-count-pill {
  align-self: flex-start;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Empty / informational callout (ALL audience, etc.) */
.empty-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid #BFDBFE;
  background: var(--info-soft);
  color: var(--info-fg);
  padding: 14px 16px;
  border-radius: 12px;
}
.empty-callout .icon { flex: 0 0 auto; margin-top: 1px; }
.empty-callout .title {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--neutral-900);
}
.empty-callout .desc {
  font-size: 12.5px;
  color: var(--neutral-600);
  line-height: 1.45;
}

/* Group list cards (B3 chọn nhóm) */
.audience-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.audience-group + .audience-group { margin-top: 8px; }
.audience-group:hover { background: var(--neutral-50); }
.audience-group.is-active {
  border-color: var(--primary-500);
  background: var(--primary-50);
  box-shadow: 0 0 0 1px var(--primary-300);
}
.audience-group .group-radio {
  width: 18px;
  height: 18px;
  border: 1px solid var(--neutral-300);
  border-radius: 999px;
  flex: 0 0 auto;
  margin-top: 2px;
  display: grid;
  place-items: center;
}
.audience-group.is-active .group-radio {
  border-color: var(--primary-600);
}
.audience-group.is-active .group-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary-600);
}
.audience-group .group-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--neutral-900);
}
.audience-group .group-meta {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 2px;
}

/* Manual employee picker list */
.emp-picker-list {
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--white);
}
.emp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--neutral-100);
  cursor: pointer;
  font-size: 13px;
}
.emp-row:last-child { border-bottom: 0; }
.emp-row:hover { background: var(--neutral-50); }
.emp-row .check {
  width: 16px;
  height: 16px;
  border: 1px solid var(--neutral-300);
  border-radius: 4px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.emp-row.is-checked .check {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: var(--white);
}
.emp-row .emp-name { font-weight: 600; color: var(--neutral-900); }
.emp-row .emp-meta { color: var(--neutral-500); font-size: 12px; }

.manual-picker {
  position: relative;
}

.manual-picker-trigger {
  margin-bottom: 8px;
}

.manual-picker-caret {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--neutral-500);
  cursor: pointer;
}

.manual-picker-caret:hover {
  background: var(--neutral-100);
}

.manual-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 10px;
}

.manual-dropdown-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.manual-selected-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Preview rail (news/event right column) */
.preview-rail {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preview-rail .preview-card {
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: 12px;
  padding: 16px;
}
.preview-rail .preview-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--neutral-700);
  font-weight: 600;
  margin-bottom: 12px;
}

/* Phone mock for content/event preview (different from notif preview-phone) */
.phone-mock {
  background: var(--neutral-900);
  border-radius: 28px;
  padding: 8px;
  margin: 0 auto;
  width: 280px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .25);
}
.phone-mock .phone-screen {
  background: var(--white);
  border-radius: 22px;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}
.phone-mock .thumb-frame {
  background: linear-gradient(135deg, #E5EAF7, #D9E0F2);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: var(--neutral-500);
  font-size: 11.5px;
  font-weight: 500;
}
.phone-mock .thumb-frame.tall { aspect-ratio: 4 / 5; }
.phone-mock .body {
  padding: 14px 14px 16px;
  font-size: 13px;
  color: var(--neutral-800);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.phone-mock .meta-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--neutral-500);
}
.phone-mock .meta-line svg { width: 12px; height: 12px; }

/* IAM card preview inside phone-frame (banner / modal / card / image only) */
.iam-card {
  background: var(--white);
  color: var(--neutral-900);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 12px;
  box-shadow: 0 6px 14px rgba(15,23,42,.18);
}
.iam-card .iam-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-700);
  text-transform: uppercase;
}
.iam-card .iam-title { font-weight: 600; margin-top: 4px; font-size: 13px; }
.iam-card .iam-body { margin-top: 2px; color: var(--neutral-600); }

.iam-card.iam-modal { border: 1px solid var(--primary-100); }
.iam-card.iam-image-only { padding: 0; overflow: hidden; }
.iam-card.iam-image-only .iam-img {
  height: 120px;
  background: linear-gradient(135deg, var(--primary-300), var(--primary-100));
  display: grid;
  place-items: center;
  color: var(--primary-700);
  font-size: 11px;
}
.iam-card.iam-banner {
  display: flex;
  flex-direction: column;
}

/* Wizard thông báo — xem trước bố cục bài (tin/sự kiện): thumbnail + mô tả */
.nw-preview-article {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nw-preview-article-textblock {
  padding-top: 2px;
}
.nw-preview-article-thumb {
  margin: -10px -12px 10px;
  border-radius: 10px 10px 0 0;
  aspect-ratio: 16 / 9;
  max-height: 112px;
  background: linear-gradient(135deg, #e8eef9 0%, #d4dff5 50%, #c9d9ef 100%);
  display: grid;
  place-items: center;
  color: var(--primary-700);
  font-size: 11px;
  font-weight: 600;
  border-bottom: 1px solid var(--neutral-100);
}
.nw-preview-article-thumb--empty {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: var(--neutral-500);
  font-weight: 500;
}
.nw-preview-article-sub {
  margin: 0 0 10px;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(120deg, #f8fafc 0%, #e8edf5 100%);
  display: grid;
  place-items: center;
  color: var(--neutral-600);
  font-size: 10px;
  font-weight: 600;
  border: 1px dashed var(--neutral-200);
}
.nw-preview-article--image-only .nw-preview-article-thumb {
  margin: 0;
  border-radius: 10px 10px 0 0;
  max-height: 128px;
}
.nw-preview-article--image-only .nw-preview-article-textblock {
  padding: 10px 12px 12px;
}
.nw-preview-article--image-only .nw-preview-article-sub {
  margin: 0 12px 10px;
}
.nw-preview-article-dl {
  margin: 6px 0 0;
  padding: 0;
}
.nw-preview-article-dl > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 11px;
  line-height: 1.45;
  margin: 0 0 4px;
}
.nw-preview-article-dl dt {
  margin: 0;
  font-weight: 600;
  color: var(--neutral-700);
  min-width: 4.75rem;
}
.nw-preview-article-dl dd {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--neutral-600);
}
.nw-preview-article-excerpt {
  margin-top: 4px !important;
  font-size: 11px;
  line-height: 1.45;
}

.nw-push-rich {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nw-push-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.nw-push-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}
.nw-push-text {
  flex: 1;
  min-width: 0;
}
.nw-push-sub {
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* Phone OS toggle in preview rail */
.preview-phone-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

/* Chi tiết Tin / Sự kiện — Figma */
.comm-detail-info {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
}
.comm-detail-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--neutral-100);
}
.comm-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comm-detail-field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin-bottom: 4px;
}
.comm-detail-field-value {
  font-size: 14px;
  color: var(--neutral-900);
  line-height: 1.45;
}
.comm-recipient-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.comm-recipient-metric {
  padding: 14px 16px;
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  background: var(--white);
}
.comm-recipient-metric .value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}
.thrm-var-panel {
  padding: 12px 14px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
}

.thrm-var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thrm-var-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-size: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.thrm-var-chip:hover {
  border-color: var(--primary-400);
  box-shadow: 0 1px 4px rgba(31, 122, 255, 0.12);
}

.thrm-var-chip code {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-700);
}

.thrm-var-chip-label {
  font-size: 11px;
  color: var(--neutral-500);
}

.nw-title-var-wrap {
  position: relative;
}

.nw-title-var-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.nw-title-var-wrap kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-family: inherit;
  border: 1px solid var(--neutral-200);
  border-radius: 4px;
  background: var(--neutral-50);
}

.comm-preview-tab-center {
  padding: 8px 0 24px;
}
.detail-header .btn-edit-primary {
  margin-left: auto;
}

/* Tạo Tin / Sự kiện — một màn (Figma) */
.content-create-page {
  padding-bottom: 88px;
  max-width: 840px;
  margin: 0 auto;
  padding-left: clamp(16px, 3vw, 28px);
  padding-right: clamp(16px, 3vw, 28px);
  --cw-editor-total-h: 72px;
  --cw-editor-toolbar-h: 28px;
}

.content-create-header {
  align-items: flex-start;
  margin-bottom: 16px;
}

.content-create-page .card.card-padded {
  padding: 22px 24px;
}

.content-create-page .form-section-card {
  padding: 16px 18px;
}

.content-create-page .card.card-padded > .form-section-card ~ .form-section-card {
  margin-top: 16px;
}

.content-create-page .alert {
  border-radius: 10px;
}

.content-create-page .cw-qr-ops-hint {
  margin-top: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  align-items: flex-start;
  gap: 12px;
}

.content-create-page .upload-drop {
  border: 2px dashed var(--neutral-200);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  min-height: 120px;
  background: var(--white);
  transition: border-color 0.15s, background 0.15s;
}

.content-create-page .upload-drop:hover {
  border-color: var(--primary-300);
  background: var(--neutral-25, #fcfcfd);
}

.content-create-page .upload-drop.is-invalid {
  border-color: var(--danger-fg);
}

.content-create-event-time-row {
  align-items: flex-start;
}

.content-create-page .rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.content-create-page .rte-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--neutral-500);
  cursor: default;
}

.content-create-page .rte-sep {
  width: 1px;
  height: 18px;
  background: var(--neutral-200);
  margin: 0 4px;
}

.content-create-page .rte-select {
  max-width: 100px;
  height: 30px;
  font-size: 12px;
  padding: 0 6px;
  opacity: 0.75;
}

.content-create-page .rte-body {
  border-radius: 0 0 8px 8px;
  margin-top: 0;
}

.content-create-page .cw-main-text-fields .textarea {
  min-height: 0;
}

.content-create-page .cw-main-text-fields .textarea--meta {
  min-height: 58px;
  height: 58px;
  max-height: 88px;
  padding: 8px 12px;
  line-height: 1.4;
  resize: vertical;
}

.content-create-page .cw-editor-block {
  width: 100%;
  height: var(--cw-editor-total-h);
  max-height: var(--cw-editor-total-h);
  min-height: var(--cw-editor-total-h);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  box-sizing: border-box;
}

.content-create-page .cw-editor-block .rte-toolbar {
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  min-height: var(--cw-editor-toolbar-h);
  padding: 4px 6px;
  border: none;
  border-bottom: 1px solid var(--neutral-200);
  border-radius: 0;
}

.content-create-page .cw-editor-block .rte-btn {
  padding: 2px 6px;
  font-size: 12px;
}

.content-create-page .cw-editor-block .rte-sep {
  height: 14px;
}

.content-create-page .cw-editor-block .textarea.rte-body {
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: auto;
  resize: none;
  padding: 4px 8px;
  border: none;
  border-radius: 0;
  line-height: 1.4;
  overflow-y: auto;
}

.main-area .content-create-footer {
  position: fixed;
  bottom: 0;
  left: 248px;
  right: 0;
  z-index: 50;
  background: var(--neutral-0);
  border-top: 1px solid var(--neutral-200);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.content-create-footer-inner {
  max-width: 840px;
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 28px);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.modal--app-preview .cwizard-preview-modal-body {
  padding-top: 4px;
}

.modal--app-preview .cwizard-preview-card {
  background: var(--white);
  border: 1px solid var(--neutral-100);
  border-radius: 12px;
  padding: 14px 14px 16px;
  box-shadow: none;
}

.modal--app-preview .cwizard-preview-card .preview-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--neutral-700);
  font-weight: 600;
  margin-bottom: 8px;
}

.modal--app-preview .cwizard-preview-dl .app-preview-row {
  font-size: 13px;
}

.modal--app-preview .cwizard-preview-dl .app-preview-row dt {
  min-width: 4.5rem;
}

.modal--app-preview .cwizard-preview-dl--event {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--neutral-100);
  padding-top: 12px;
  margin-top: 8px;
}

.modal--app-preview .cwizard-preview-dl--event .app-preview-row {
  margin-bottom: 0;
  margin-top: 0;
}

.modal--app-preview .cw-preview-article-card .nw-preview-article-thumb {
  margin: -10px -12px 10px;
}

.modal--app-preview .cw-preview-article-card .nw-preview-article-sub.nw-preview-article-sub--square {
  margin-left: 0;
  margin-right: 0;
  height: auto;
  min-height: 64px;
  width: 64px;
  max-width: 100%;
  aspect-ratio: 1;
  font-size: 9px;
}

@media (max-width: 900px) {
  .main-area .content-create-footer {
    left: 0;
  }
  .content-create-event-time-row.cols-3 {
    grid-template-columns: 1fr;
  }
}

/* Phase 2 — TTNB publish split + bridge bottom sheet */
.btn-split {
  display: inline-flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.btn-split .btn-primary {
  border-radius: 8px 0 0 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-split .btn-split-caret {
  border-radius: 0 8px 8px 0;
  padding: 0 10px;
  min-width: 36px;
  border: none;
  background: var(--primary-600);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-split .btn-split-caret:hover {
  background: var(--primary-700);
}
.btn-split .btn-split-caret:disabled,
.btn-split .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-split-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 30;
}
.btn-split-menu button {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-split-menu button:hover {
  background: var(--neutral-50);
}
.content-create-footer-inner {
  position: relative;
}
.bridge-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px 12px;
}
.bridge-sheet {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px 16px 12px 12px;
  padding: 12px 18px 18px;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
}
.bridge-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: var(--neutral-200);
  margin: 0 auto 12px;
}
.bridge-sheet-preview {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  margin: 12px 0 16px;
}
.bridge-sheet-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  flex-shrink: 0;
}
.bridge-sheet-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.wizard-bridge-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

/* Event push bundle — chuỗi TB theo sự kiện */
.event-push-bundle-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 12px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
}
.event-push-bundle-summary strong {
  color: var(--primary-700);
}
.event-push-slot {
  border: 1px solid var(--neutral-150, var(--neutral-200));
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
}
.event-push-slot.is-disabled {
  opacity: 0.55;
  background: var(--neutral-50);
}
.event-push-slot-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.event-push-slot-head .slot-label {
  font-weight: 600;
  font-size: 14px;
}
.event-push-slot-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.event-push-timeline-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.event-push-timeline-chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--primary-50, #eef4ff);
  color: var(--primary-800, #1e40af);
  border: 1px solid var(--primary-100, #dbeafe);
}
.event-push-status-sent { color: var(--success-fg); }
.event-push-status-scheduled { color: var(--warning-fg, #b45309); }
.event-push-status-pending { color: var(--neutral-500); }
.event-push-tools-panel details.event-push-tool-details {
  border: 1px solid var(--neutral-100);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.event-push-tools-panel details.event-push-tool-details summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.event-push-tools-panel details.event-push-tool-details summary::-webkit-details-marker {
  display: none;
}
.event-push-tools-panel code {
  font-size: 11px;
  background: var(--neutral-100);
  padding: 1px 4px;
  border-radius: 4px;
}
.event-push-api-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-50, #eff6ff);
  color: var(--primary-700, #1d4ed8);
}
.event-push-api-badge.tone-warn {
  background: #fef3c7;
  color: #b45309;
}
.event-push-validate-alert ul {
  margin-bottom: 0;
}
.event-push-phase-head {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--neutral-200);
}

/* Event wizard — loại SK, timeline Push, drawer */
.event-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.event-type-card {
  border: 2px solid var(--neutral-150, var(--neutral-200));
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: left;
}
.event-type-card:hover {
  border-color: var(--primary-300, #93c5fd);
}
.event-type-card.is-active {
  border-color: var(--primary-600, #2563eb);
  background: var(--primary-50, #eff6ff);
  box-shadow: 0 0 0 1px var(--primary-100, #dbeafe);
}
.event-type-card .event-type-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}
.event-type-card .event-type-desc {
  font-size: 11px;
  color: var(--neutral-500);
  line-height: 1.4;
}
.event-push-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 900px) {
  .event-push-timeline {
    grid-template-columns: 1fr;
  }
}
.event-push-timeline-col {
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  padding: 10px;
  background: var(--neutral-50);
  min-height: 120px;
}
.event-push-timeline-col-head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--neutral-600);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.event-push-card {
  border: 1px solid var(--neutral-150, var(--neutral-200));
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.event-push-card:hover {
  border-color: var(--primary-300, #93c5fd);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.event-push-card.is-disabled {
  opacity: 0.5;
  background: var(--neutral-50);
}
.event-push-card.is-error {
  border-color: var(--danger-fg, #dc2626);
  background: #fef2f2;
}
.event-push-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.event-push-card-head input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.event-push-card-title {
  font-weight: 600;
  font-size: 13px;
  flex: 1;
  line-height: 1.35;
}
.event-push-card-meta {
  font-size: 11px;
  color: var(--neutral-500);
  margin-left: 24px;
}
.event-push-card-actions {
  margin-left: 24px;
  margin-top: 6px;
}
.event-bundle-milestones {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.event-bundle-milestones--timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}
.event-bundle-timeline-item {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.event-bundle-timeline-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 28px;
  padding-top: 10px;
  align-self: stretch;
}
.event-bundle-timeline-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--primary-400, #60a5fa);
  color: var(--primary-700, #1e4fad);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}
.event-bundle-timeline-line {
  flex: 1 1 auto;
  width: 1.5px;
  min-height: 36px;
  margin: 6px 0 2px;
  background: var(--neutral-200);
  border-radius: 1px;
}
.event-bundle-timeline-item .event-bundle-milestone.is-readonly {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin-bottom: 6px;
}
.event-bundle-milestones--timeline .event-bundle-milestone--compact {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 10px;
  background: var(--white);
  border: 1px solid var(--neutral-300, #d1d5db);
  border-radius: 8px;
  box-shadow: none;
}
.event-bundle-milestones--timeline .event-bundle-milestone__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.event-bundle-milestone__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 0;
}
.event-bundle-milestones--timeline .event-bundle-milestone__type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1px solid transparent;
}
.event-bundle-milestone.is-phase-before .event-bundle-milestone__type-icon {
  background: #dbeafe;
  color: var(--primary-700, #1d4ed8);
  border-color: #bfdbfe;
}
.event-bundle-milestone.is-phase-during .event-bundle-milestone__type-icon {
  background: #d1fae5;
  color: #047857;
  border-color: #a7f3d0;
}
.event-bundle-milestone.is-phase-after .event-bundle-milestone__type-icon {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.event-bundle-milestone__phase {
  color: var(--neutral-500);
  font-size: 10px;
  margin-left: auto;
  white-space: nowrap;
}
.event-bundle-milestones--timeline .event-bundle-milestone__schedule {
  font-size: 9px;
  padding: 1px 6px;
}
.event-bundle-milestones--timeline .event-bundle-milestone__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-900, #111827);
  line-height: 1.3;
  padding-right: 0;
  margin-top: 1px;
}
.event-bundle-milestones--timeline .event-bundle-milestone__body {
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--neutral-500);
}
.event-setup-drawer__title {
  margin: 4px 0 0;
  font-size: 18px;
}
.event-setup-drawer__title--compact {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}
.event-setup-drawer__subtitle {
  margin: 2px 0 0;
}
.event-setup-drawer--ops .event-setup-drawer__body {
  padding: 12px 16px 20px;
}
.event-setup-drawer--push .event-setup-drawer__header {
  padding: 10px 14px;
  align-items: center;
}
.event-setup-drawer__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.event-setup-drawer--push .event-setup-drawer__body {
  padding: 10px 14px 14px;
}
.event-push-bundle-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.event-push-bundle-mode-hint {
  margin: 0;
  line-height: 1.35;
}
.event-push-bundle-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--neutral-100);
  min-height: 28px;
}
.event-push-bundle-head__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}
.event-push-bundle-head__toggle input {
  margin: 0;
  flex-shrink: 0;
}
.event-push-bundle-head__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.event-push-bundle-head__kind {
  display: none;
}
.event-push-bundle-head__stats {
  font-size: 13px;
  color: var(--neutral-500);
  white-space: nowrap;
  line-height: 1.2;
}
.event-push-bundle-head__stats strong {
  color: var(--primary-700);
  font-weight: 700;
  font-size: 14px;
}
.event-push-bundle-head .pill.tone-success {
  font-size: 11px;
  padding: 2px 8px;
  white-space: nowrap;
  line-height: 1.2;
}
.event-push-bundle-footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 10px 0 4px;
  background: var(--white);
  border-top: 1px solid var(--neutral-200);
  z-index: 2;
}
.event-setup-drawer--push .event-push-bundle-footer.event-setup-form-actions {
  margin: 0 -14px -2px;
  padding: 10px 14px 8px;
}
.event-push-bundle-panel .alert {
  margin-bottom: 8px !important;
  padding: 7px 10px !important;
}
.event-bundle-milestones--auto-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.event-bundle-milestones--auto-grid .event-bundle-milestone.is-readonly {
  flex: 1 1 200px;
  max-width: 240px;
  min-width: 180px;
  margin-bottom: 0;
  padding: 8px 10px;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--neutral-300, #d1d5db);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.event-bundle-milestones--auto-grid .event-bundle-milestone__title {
  font-size: 12px;
  line-height: 1.35;
  padding-right: 0;
}
.event-bundle-milestones--auto-grid .event-bundle-milestone__body {
  font-size: 11px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-bundle-milestones--auto-grid .badge {
  font-size: 10px;
  padding: 2px 6px;
}
.event-bundle-milestones--auto-grid .event-bundle-milestone__schedule {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--white);
  color: var(--primary-700, #1e4fad);
  border: 1px solid var(--primary-200, #beddff);
}
.event-push-bundle-mode {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event-push-bundle-mode--inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
.event-push-bundle-mode--cards {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-bottom: 8px;
}
.event-push-bundle-mode__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}
@media (max-width: 420px) {
  .event-push-bundle-mode__list {
    grid-template-columns: 1fr;
  }
}
.event-push-bundle-mode--cards .cw-option-row {
  background: var(--white);
  padding: 10px 10px;
  gap: 8px;
  min-height: 56px;
  align-items: center;
}
.event-push-bundle-mode--cards .cw-option-row:hover {
  background: var(--white);
  border-color: var(--primary-200);
}
.event-push-bundle-mode--cards .cw-option-row.is-on {
  background: var(--primary-50, #eff7ff);
  border-color: var(--primary-300);
}
.event-push-bundle-mode--cards .cw-option-row.is-on:hover {
  background: var(--primary-50, #eff7ff);
  border-color: var(--primary-300);
}
.event-push-bundle-mode--cards .cw-option-row__icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.event-push-bundle-mode--cards .cw-option-row__icon i,
.event-push-bundle-mode--cards .cw-option-row__icon svg {
  width: 14px !important;
  height: 14px !important;
}
.event-push-bundle-mode--cards .cw-option-row__title {
  font-size: 12px;
  gap: 4px;
  line-height: 1.3;
}
.event-push-bundle-mode--cards .cw-option-row__title .pill {
  font-size: 9px;
  padding: 1px 5px;
}
.event-push-bundle-mode--cards .cw-option-row__hint {
  font-size: 10px;
  margin-top: 1px;
  line-height: 1.3;
}
.event-push-bundle-mode--cards .cw-option-row--ctrl-right {
  align-items: center;
}
.event-push-bundle-mode--cards .cw-option-row--ctrl-right input[type="radio"] {
  order: 3;
  margin-left: auto;
  margin-top: 0;
  flex-shrink: 0;
}
.event-push-bundle-mode__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-600);
}
.event-push-bundle-mode__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px 28px;
  width: 100%;
}
.event-push-bundle-mode__choice {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  min-width: 0;
}
.event-push-bundle-mode__choice input[type="radio"] {
  margin: 2px 0 0;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--primary-600, #2563eb);
}
.event-push-bundle-mode__choice-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.event-push-bundle-mode__choice-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900, #111827);
  line-height: 1.3;
}
.event-push-bundle-mode__choice-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--neutral-500);
  line-height: 1.35;
}
.event-push-bundle-mode__choice span {
  line-height: 1.3;
}
.event-push-bundle-mode--segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
}
.event-push-bundle-mode--segmented > .text-xs,
.event-push-bundle-mode--segmented > .text-strong {
  grid-column: 1 / -1;
}
.event-push-bundle-mode__pill {
  position: relative;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  margin: 0;
}
.event-push-bundle-mode__pill.is-selected {
  border-color: var(--primary-500, #2563eb);
  box-shadow: 0 0 0 1px var(--primary-500, #2563eb);
}
.event-push-bundle-mode__pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.event-push-bundle-mode__pill-title {
  font-weight: 600;
  font-size: 13px;
  display: block;
  line-height: 1.3;
}
.event-push-bundle-mode__pill-meta {
  font-size: 11px;
  color: var(--neutral-500);
  display: block;
  margin-top: 2px;
  line-height: 1.3;
}
@media (max-width: 360px) {
  .event-push-bundle-mode--segmented {
    grid-template-columns: 1fr;
  }
}
.event-push-bundle-mode--row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: flex-start;
}
.event-push-bundle-mode__option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  cursor: pointer;
  margin: 0;
  flex: 1;
  min-width: 200px;
}
.event-push-bundle-mode__option input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.event-bundle-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  /* Thẳng cạnh trái input trong card mốc: rail 28 + gap 12 + padding card 10 */
  margin-left: calc(28px + 12px + 10px);
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-600, #2563eb);
  cursor: pointer;
  line-height: 1.4;
  box-shadow: none;
}
.event-bundle-add-btn:hover:not(:disabled) {
  color: var(--primary-700, #1d4ed8);
  background: transparent;
  border: none;
}
.event-bundle-add-btn:focus-visible {
  outline: 2px solid var(--primary-200, #bedbff);
  outline-offset: 2px;
  border-radius: 4px;
}
.event-bundle-add-btn__icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.event-bundle-milestone {
  position: relative;
  padding: 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.event-bundle-milestone--editable {
  padding: 8px 34px 10px 10px;
  gap: 6px;
  background: var(--neutral-50);
}
.event-bundle-milestone.is-readonly {
  background: var(--neutral-50);
}
.event-bundle-milestone.is-error {
  border-color: var(--neutral-200);
}
.event-bundle-milestone__title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  padding-right: 0;
}
.event-bundle-milestone__body {
  line-height: 1.4;
}
.event-bundle-milestone__body-input {
  min-height: 52px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.4;
  width: 100%;
}
.event-bundle-milestone__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--neutral-400);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.event-bundle-milestone__remove:hover:not(:disabled) {
  background: var(--neutral-100);
  color: var(--danger-fg, #dc2626);
}
.event-bundle-milestone__remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Lịch Push v2 — gợi ý universal, bulk delete, ideas modal */
.event-push-bundle-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.event-push-bundle-toolbar__spacer {
  flex: 1;
}
.event-push-ideas-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #FCD34D;
  background: linear-gradient(180deg, #FEF9C3 0%, #FDE047 100%);
  color: #92400E;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.event-push-ideas-btn:hover {
  background: linear-gradient(180deg, #FDE047 0%, #FACC15 100%);
  border-color: #FBBF24;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}
.event-push-ideas-btn:focus-visible {
  outline: 2px solid #F59E0B;
  outline-offset: 2px;
}
.event-push-ideas-btn--header {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  box-shadow: none;
  gap: 5px;
}
.event-push-ideas-btn--header .event-push-ideas-btn__label {
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
}
.event-push-ideas-btn--header i,
.event-push-ideas-btn--header svg {
  width: 14px !important;
  height: 14px !important;
}
.event-push-ideas-replace-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.event-push-bulk-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.event-push-bulk-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--danger-fg, #dc2626) !important;
}
.event-push-bulk-delete i,
.event-push-bulk-delete svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
}
.event-push-bulk-delete:hover {
  background: var(--danger-bg, #fef2f2) !important;
}
.event-bundle-milestones--timeline .event-bundle-milestone--editable {
  flex: 1;
  min-width: 0;
}
.event-push-ideas-overlay {
  z-index: 120;
}
.event-push-ideas-modal {
  max-width: 480px;
  width: calc(100vw - 32px);
}
.event-push-ideas-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--neutral-100);
}
.event-push-ideas-preview {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}
.event-bundle-milestone--ideas-full {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
}
.event-push-ideas-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.event-push-ideas-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-push-ideas-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
  margin-top: 0;
}
.event-push-ideas-card__label {
  font-weight: 600;
  font-size: 13px;
  color: var(--neutral-800, #1f2937);
  line-height: 1.3;
}
.event-push-ideas-push-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
  color: var(--neutral-900, #111827);
}
.event-push-ideas-push-body {
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  color: var(--neutral-600, #4b5563);
}
.event-push-ideas-highlights {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--neutral-100, #f3f4f6);
}
.event-push-ideas-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--neutral-700, #374151);
}
.event-push-ideas-highlight i {
  flex-shrink: 0;
}
.event-push-ideas-highlight--time i {
  color: var(--primary-600, #2563eb);
}
.event-push-ideas-highlight--place i {
  color: #b45309;
}
.event-push-ideas-materialized-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.event-slot-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 110;
  display: flex;
  justify-content: flex-end;
}
.event-slot-drawer {
  width: min(440px, 100vw);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.event-slot-drawer-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--neutral-100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.event-slot-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px;
}
.event-slot-drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--neutral-100);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.event-wizard-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .event-wizard-summary-grid {
    grid-template-columns: 1fr;
  }
}
.event-wizard-summary-item {
  padding: 12px 14px;
  border: 1px solid var(--neutral-100);
  border-radius: 8px;
  background: var(--neutral-50);
}
.event-wizard-summary-item .key {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin-bottom: 4px;
}
.event-wizard-summary-item .value {
  font-size: 14px;
  font-weight: 500;
}
.content-create-page .event-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.content-create-page .event-wizard-footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Phase 2 — Live QR + Participants */
.live-qr-page {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
  background: linear-gradient(180deg, var(--neutral-50) 0%, var(--white) 40%);
}
.live-qr-topbar {
  width: 100%;
  max-width: 420px;
  margin-bottom: 24px;
  text-align: center;
}
.live-qr-event-title {
  font-size: 18px;
  font-weight: 600;
  margin-top: 12px;
}
.live-qr-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 420px;
}
.live-qr-frame {
  padding: 20px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  border: 1px solid var(--neutral-100);
}
.live-qr-countdown {
  text-align: center;
}
.live-qr-countdown-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary-600) calc(var(--progress) * 1%), var(--neutral-100) 0);
  position: relative;
}
.live-qr-countdown-ring::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--white);
}
.live-qr-countdown-num {
  position: relative;
  z-index: 1;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-700);
}
.live-qr-token-hint {
  word-break: break-all;
  text-align: center;
  max-width: 360px;
}
.comm-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.comm-event-actions .btn {
  font-size: 11px;
  padding: 4px 8px;
  height: auto;
}
.participants-modal .modal,
.participants-modal__dialog {
  max-width: min(960px, 96vw);
  width: 100%;
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 760px);
  overflow: hidden;
}

.participants-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
}

.participants-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.participants-modal__head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--primary-600, #2563eb);
  background: rgba(37, 99, 235, 0.1);
}

.participants-modal__subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--neutral-500);
}

.participants-modal__count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--neutral-600);
  background: var(--neutral-100);
}

.participants-modal__body {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  flex: 1;
}

.participants-modal__tab-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.participants-modal__tab-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 14px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.participants-modal__tab-scroll .participants-toolbar {
  flex-shrink: 0;
}

.participants-modal__tab-scroll .participants-table-wrap {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: none;
}

.participants-modal__tab-scroll .participants-qr-table-wrap {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: none;
  border-radius: 10px;
}

.participants-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-100);
}

.participants-toolbar__search {
  min-width: 0;
}

.participants-toolbar__search input {
  height: 34px;
  font-size: 13px;
}

.participants-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.participants-filter {
  height: 34px;
  min-width: 0;
  max-width: 148px;
  font-size: 12px;
  padding-left: 10px;
  padding-right: 28px;
}

.participants-modal .fake-select:has(.participants-filter) {
  min-width: 0;
  max-width: 148px;
}

.participants-modal .fake-select:has(.participants-filter) .fake-select-trigger {
  height: 34px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.participants-toolbar__export {
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .participants-toolbar {
    grid-template-columns: 1fr;
  }
  .participants-toolbar__filters {
    justify-content: flex-start;
  }
  .participants-toolbar__export {
    justify-self: start;
  }
  .participants-filter {
    flex: 1 1 calc(50% - 4px);
    max-width: none;
  }
}

.participants-table-wrap {
  flex: 1 1 240px;
  min-height: 240px;
  overflow: auto;
  border-radius: 10px;
}

.participants-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.participants-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--neutral-50);
  color: var(--neutral-500);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--neutral-200);
  white-space: nowrap;
}

.participants-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

.participants-table tbody tr:last-child td {
  border-bottom: 0;
}

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

.participants-table .col-person {
  width: 26%;
  min-width: 160px;
}

.participants-table .col-confirm {
  width: 132px;
  vertical-align: middle;
}

.participants-table .col-seat {
  width: 104px;
  text-align: center;
  vertical-align: middle;
}

.participants-table thead .col-seat {
  text-align: center;
}

.participants-table .col-checkin {
  width: 156px;
  vertical-align: middle;
}

.participants-table .col-lucky {
  width: 68px;
  text-align: center;
  vertical-align: middle;
}

.participants-table .col-lucky-prize {
  width: 20%;
  min-width: 148px;
  max-width: 220px;
  vertical-align: middle;
}

.participants-table .col-confirm .participants-pill-select,
.participants-table .col-checkin .participants-pill-select {
  min-width: 100px;
}

.participants-person {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.participants-person__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.35;
}

.participants-person__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.participants-guest-badge.pill {
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.participants-guest-badge.pill::before {
  display: none;
}

.participants-dirty-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--warning-soft);
  border-bottom: 1px solid #fde68a;
  color: var(--warning-fg);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.participants-person__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--neutral-500);
  line-height: 1.3;
}

.participants-person__code {
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.participants-person__dot {
  color: var(--neutral-300);
}

.participants-seat-pair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  width: fit-content;
  max-width: 100%;
}

.participants-seat-field {
  display: block;
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.participants-table .participants-seat-input {
  width: 2.75rem;
  min-width: 36px;
  max-width: 52px;
  padding: 0 4px;
  text-align: center;
}

.participants-seat-input--seat {
  width: 2.75rem;
  max-width: 52px;
}

/* Pill select — compact wrapper + shared .pill.tone-* colors */
.participants-pill-select {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  padding: 0 2px 0 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  position: relative;
  box-shadow: 0 1px 2px rgba(36, 107, 239, 0.04);
}

.participants-pill-select__icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke-width: 2;
  opacity: 0.9;
}

.participants-table .participants-pill-select__native {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  height: 26px;
  min-height: 26px;
  padding: 0 18px 0 0;
  border: 0;
  border-radius: 4px;
  background-color: transparent;
  box-shadow: none;
  font-size: 11.5px;
  font-weight: 500;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 12px 12px;
  cursor: pointer;
}

.participants-pill-select.tone-success {
  background: #e9faef;
  border-color: #bbf7d0;
  color: #238d52;
}
.participants-pill-select.tone-success .participants-pill-select__native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23238d52' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.participants-pill-select.tone-danger {
  background: #ffe6e6;
  border-color: #fecaca;
  color: #bd3232;
}
.participants-pill-select.tone-danger .participants-pill-select__native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23bd3232' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.participants-pill-select.tone-warning {
  background: #fff4d9;
  border-color: #fde68a;
  color: #9d6a00;
}
.participants-pill-select.tone-warning .participants-pill-select__native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239d6a00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.participants-pill-select.tone-primary {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-700);
}
.participants-pill-select.tone-primary .participants-pill-select__native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231953DC' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.participants-pill-select.tone-neutral {
  background: #eef2f8;
  border-color: var(--neutral-200);
  color: #5a6b8d;
}
.participants-pill-select.tone-neutral .participants-pill-select__native {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6b8d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.participants-table .participants-pill-select:has(.participants-pill-select__native:disabled) {
  opacity: 0.65;
}

.participants-pill-select--enhanced {
  cursor: pointer;
}

.participants-pill-select--enhanced .participants-pill-select__native {
  pointer-events: none;
}

.participants-pill-select.open {
  box-shadow: 0 0 0 2px rgba(93, 171, 253, 0.22);
}

.participants-pill-select .fake-select-menu--pill {
  min-width: 140px;
}

.fake-select-menu--pill {
  padding: 4px;
  border-radius: 10px;
}

.fake-select-menu--pill .fake-select-option {
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
}

.participants-checkin-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

.participants-checkin-btn {
  flex-shrink: 0;
  color: var(--primary-600, #2563eb);
}

.participants-checkin-btn:hover {
  background: rgba(37, 99, 235, 0.08);
}

.participants-lucky.pill {
  min-width: 40px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  justify-content: center;
}

.participants-lucky.pill::before {
  display: none;
}

.participants-lucky.is-empty {
  background: transparent;
  color: var(--neutral-400);
  padding: 0;
  min-width: 0;
}

.participants-empty {
  padding: 28px 12px !important;
  text-align: center;
  color: var(--neutral-500);
  font-size: 13px;
}

.select--cell,
.participants-table .input--cell {
  width: 100%;
  height: 32px;
  min-height: 32px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

.participants-table .input--cell:disabled,
.participants-table .select--cell:disabled {
  opacity: 1;
}

.participants-table .input--cell:disabled {
  background: var(--neutral-50);
  opacity: 0.65;
}

.participants-table .participants-seat-input.input--cell {
  width: 2.75rem;
  min-width: 36px;
  max-width: 52px;
  height: 28px;
  min-height: 28px;
  padding: 0 4px;
  font-size: 12px;
}

.participants-table .participants-seat-input::placeholder {
  font-size: 11px;
  color: var(--neutral-400);
}

.participants-table .participants-seat-input--seat.input--cell {
  width: 2.75rem;
  max-width: 52px;
}

.participants-modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  flex-wrap: wrap;
}

.participants-modal__footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.participants-modal__hint {
  margin: 0;
  font-size: 11px;
  color: var(--neutral-500);
  line-height: 1.4;
  max-width: 360px;
}

.participants-modal__footer-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.participants-modal__dialog--wide {
  max-width: 960px;
  width: min(960px, calc(100vw - 32px));
}

.participants-hub-tabs {
  padding: 0 18px;
  border-bottom: 1px solid var(--neutral-100);
  margin: 0;
}

.participants-hub-tabs .tab-item {
  font-size: 13px;
  padding: 10px 14px;
}

.participants-qr-banner {
  margin: 0 18px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.participants-modal__body--qr,
.participants-modal__body--kpi {
  padding: 0;
}

.participants-kpi-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  line-height: 1.35;
}

.participants-kpi-hint i,
.participants-kpi-hint svg {
  flex-shrink: 0;
  color: var(--primary-600, #2563eb);
}

.participants-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.participants-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: var(--white);
  min-width: 0;
}

.participants-kpi-card__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-500);
  line-height: 1.3;
}

.participants-kpi-card__value {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--neutral-900);
}

.participants-kpi-card--success {
  border-color: rgba(22, 163, 74, 0.25);
}

.participants-kpi-card--success .participants-kpi-card__value {
  color: var(--success-600, #16a34a);
}

.participants-kpi-card--accent {
  border-color: rgba(37, 99, 235, 0.25);
}

.participants-kpi-card--accent .participants-kpi-card__value {
  color: var(--primary-700, #1d5bbf);
}

.participants-kpi-rules.cw-ops-panel {
  padding: 12px 14px;
}

.participants-kpi-rules .cw-ops-panel__head {
  margin-bottom: 10px;
}

.participants-kpi-rules__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.participants-kpi-rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--neutral-700);
  line-height: 1.35;
}

.participants-kpi-rule-chip .pill {
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .participants-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.participants-qr-hub-table {
  flex-shrink: 0;
}

.participants-qr-hub-table--flat.cw-ops-panel {
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.participants-qr-hub-table--flat .cw-ops-panel__head {
  margin-bottom: 4px;
}

.participants-qr-hub-table--flat .cw-ops-panel__title {
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--neutral-600);
}

.participants-qr-hub-table--flat .participants-qr-table-wrap {
  border-radius: 10px;
  overflow: hidden;
}

.participants-qr-table-wrap {
  max-height: none;
}

.participants-table--qr {
  table-layout: auto;
}

.participants-table--qr .col-qr-purpose {
  width: 28%;
  min-width: 140px;
}

.participants-table--qr .col-qr-code {
  width: 88px;
  text-align: left;
  vertical-align: middle;
}

.participants-table--qr .col-qr-status {
  width: 100px;
  vertical-align: middle;
}

.participants-table--qr .col-qr-outcome {
  min-width: 120px;
  font-size: 13px;
  color: var(--neutral-700);
  white-space: nowrap;
}

.participants-table--qr .col-qr-station {
  width: 56px;
  text-align: center;
  color: var(--neutral-400);
  font-size: 12px;
}

.participants-table--qr thead .col-qr-station {
  text-align: center;
}

.participants-table--qr .col-qr-action {
  width: 72px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.participants-table--qr .col-qr-action .btn {
  padding: 4px 8px;
}

.participants-table--qr .col-qr-purpose .pill.tone-warning {
  font-size: 10px;
  padding: 1px 6px;
  font-weight: 600;
  line-height: 1.4;
}

.participants-table--qr .col-qr-code .pill {
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.participants-qr-config-details {
  border: 1px solid var(--neutral-100);
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: var(--neutral-50);
}

.participants-qr-config-details__summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.participants-qr-config-details__summary::-webkit-details-marker {
  display: none;
}

.participants-qr-rules-section .cw-ops-snapshot__rules {
  margin-top: 8px;
}

.btn-icon--sm {
  width: 28px;
  height: 28px;
  padding: 0;
}

/* Content wizard — inline «Sự kiện khác» under preset select */
.cw-event-type-other {
  margin-top: 6px;
}
.cw-event-type-other__row {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 4px 4px 8px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
}
.cw-event-type-other__row.is-invalid {
  border-color: var(--danger-fg);
}
.cw-event-type-other__input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: none;
  background: transparent;
  padding: 0 4px 0 0;
  box-shadow: none;
}
.cw-event-type-other__input:focus {
  outline: none;
  box-shadow: none;
}
.cw-event-type-other__save {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: #2559CF;
  color: #fff;
  border: none;
  box-shadow: none;
  opacity: 1;
  cursor: pointer;
}
.cw-event-type-other__save:hover:not(:disabled) {
  background: #1e4bb0;
  color: #fff;
  opacity: 1;
}
.cw-event-type-other__save:disabled {
  opacity: 0.45;
  background: #2559CF;
  color: #fff;
  cursor: not-allowed;
}
.cw-event-type-other__save i,
.cw-event-type-other__save svg {
  color: #fff;
  stroke: #fff;
}
.cw-event-type-other__saved {
  margin-top: 6px;
}
.cw-event-type-other__catalog {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.cw-event-type-other__catalog-label {
  width: 100%;
  margin-bottom: 0;
}
.cw-event-type-other__catalog-chip {
  cursor: pointer;
}

.cw-event-tags__group {
  margin-bottom: 10px;
}
.cw-event-tags__group-label {
  display: block;
  margin-bottom: 6px;
}
.cw-event-tags__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cw-event-tags__chip {
  cursor: pointer;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cw-event-tags__chip.is-selected {
  border-color: var(--primary-400);
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 600;
}
.cw-event-tags__recent {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--neutral-200);
}

.event-ops-toolbar-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lucky-wheel-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}
.lucky-wheel-topbar {
  text-align: center;
  margin-bottom: 28px;
}
.lucky-wheel-title {
  font-size: 20px;
  font-weight: 700;
  margin: 12px 0 6px;
}
.lucky-wheel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lucky-wheel-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 560px;
}
.lucky-wheel-hint {
  margin: 0;
  text-align: center;
  line-height: 1.45;
}
.lucky-wheel-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 560px;
}
@keyframes lucky-slot-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}
.lucky-wheel-slot {
  border-radius: 14px;
  border: 2px solid var(--neutral-200);
  background: var(--white);
  min-height: 132px;
  display: grid;
  place-items: center;
  padding: 16px 12px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.25s, color 0.25s, transform 0.15s;
  cursor: default;
  font: inherit;
  width: 100%;
}
.lucky-wheel-slot.is-clickable {
  cursor: pointer;
  border-color: var(--primary-300);
  background: var(--neutral-25, #fcfcfd);
}
.lucky-wheel-slot.is-clickable:hover {
  border-color: var(--primary-500);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.lucky-wheel-slot.is-spinning .lucky-wheel-slot-inner {
  animation: lucky-slot-pulse 0.35s ease-in-out infinite alternate;
}
.lucky-wheel-slot-digit {
  font-size: 42px;
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lucky-wheel-slot:not(.is-locked) .lucky-wheel-slot-digit {
  color: var(--neutral-400);
}
.lucky-wheel-slot.is-winner {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  background: var(--sidebar-grad);
}
.lucky-wheel-slot.is-winner .lucky-wheel-slot-digit {
  color: var(--white);
}
.lucky-wheel-slot-inner {
  width: 100%;
}
.lucky-wheel-spin-btn {
  display: none;
}
.lucky-wheel-winner-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.participants-lucky-prize {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
}
.participants-lucky-prize.is-won {
  color: var(--success-fg);
}
.participants-lucky-prize.is-empty {
  color: var(--neutral-400);
  font-weight: 400;
}
.cw-lucky-digit-input {
  font-variant-numeric: tabular-nums;
  max-width: 120px;
}
.lucky-wheel-result-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}
.lucky-wheel-result-badge.is-win {
  background: var(--success-50, #ecfdf5);
  color: var(--success-700, #047857);
}
.lucky-wheel-result-badge.is-miss {
  background: var(--neutral-100);
  color: var(--neutral-600);
}
.lucky-wheel-result-badge.is-warn {
  background: #fff7ed;
  color: #c2410c;
}
.lucky-wheel-winner-list li {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--neutral-50);
}

/* ============================================================
   Lucky Wheel — Multiverse presentation (event-lucky-wheel.html)
============================================================ */
.lucky-wheel-multiverse {
  --lw-mv-navy: #0a1628;
  --lw-mv-blue: #1a3a6b;
  --lw-mv-gold: #f5c842;
  --lw-mv-gold-dark: #e8a020;
  --lw-mv-glass: rgba(20, 50, 100, 0.45);
  --lw-mv-glass-border: rgba(100, 180, 255, 0.35);
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(60, 120, 220, 0.25), transparent 70%),
    linear-gradient(180deg, var(--lw-mv-navy) 0%, var(--lw-mv-blue) 45%, #0d2240 100%);
}
.lucky-wheel-multiverse::before,
.lucky-wheel-multiverse::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  max-width: 140px;
  pointer-events: none;
  z-index: 0;
}
.lucky-wheel-multiverse::before {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
}
.lucky-wheel-multiverse::after {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
}
.lw-mv-back {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.lw-mv-back:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.lw-mv-admin {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lw-mv-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 720px;
}
.lw-mv-hero {
  text-align: center;
}
.lw-mv-logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
}
.lw-mv-event-name {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(180deg, #fff8e0 0%, var(--lw-mv-gold) 50%, var(--lw-mv-gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(245, 200, 66, 0.35));
}
.lw-mv-subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.7);
}
.lw-mv-slots {
  display: flex;
  gap: clamp(12px, 3vw, 24px);
  justify-content: center;
  width: 100%;
}
.lw-mv-slot {
  width: clamp(100px, 22vw, 140px);
  height: clamp(100px, 22vw, 140px);
  border-radius: 16px;
  border: 2px solid var(--lw-mv-glass-border);
  background: var(--lw-mv-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 24px rgba(80, 160, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  font: inherit;
  padding: 0;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.lw-mv-slot-digit {
  font-size: clamp(48px, 10vw, 64px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lw-mv-slot.is-clickable {
  cursor: pointer;
  border-color: rgba(245, 200, 66, 0.7);
  animation: lw-mv-slot-pulse 1.2s ease-in-out infinite;
}
.lw-mv-slot.is-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(245, 200, 66, 0.35);
}
@keyframes lw-mv-slot-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 200, 66, 0.2); }
  50% { box-shadow: 0 0 36px rgba(245, 200, 66, 0.45); }
}
.lw-mv-slot.is-spinning .lw-mv-slot-digit {
  animation: lw-mv-digit-flash 0.12s ease-in-out infinite alternate;
}
@keyframes lw-mv-digit-flash {
  from { opacity: 0.6; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1.05); }
}
.lw-mv-slot.is-locked .lw-mv-slot-digit,
.lw-mv-slot.is-revealed .lw-mv-slot-digit {
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}
.lw-mv-slot.is-revealed {
  border-color: rgba(245, 200, 66, 0.5);
  box-shadow: 0 0 28px rgba(245, 200, 66, 0.25);
}
.lw-mv-hint {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}
.lw-mv-hint--muted {
  color: rgba(255, 255, 255, 0.45);
}
.lw-mv-generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1a1200;
  cursor: pointer;
  background: linear-gradient(180deg, var(--lw-mv-gold) 0%, var(--lw-mv-gold-dark) 100%);
  box-shadow:
    0 4px 20px rgba(232, 160, 32, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.lw-mv-generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(232, 160, 32, 0.55);
}
.lw-mv-generate-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lw-mv-deny {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px;
}
.lw-mv-back-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}
.lw-mv-history {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin-top: 32px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lw-mv-history h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.lw-mv-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}
.lw-mv-history-round {
  font-weight: 600;
  margin-right: 8px;
}
.lw-mv-history-prize {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}
.lw-mv-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 12, 28, 0.88);
  padding: 24px;
}
.lw-mv-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.lw-mv-confetti-piece {
  position: absolute;
  top: -12px;
  left: calc((var(--i) * 4.2%) + 1%);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: hsl(calc(var(--i) * 15), 85%, 55%);
  opacity: 0.85;
  animation: lw-mv-confetti-fall calc(2.5s + (var(--i) * 0.08s)) linear infinite;
  animation-delay: calc(var(--i) * -0.15s);
}
@keyframes lw-mv-confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0.3; }
}
.lw-mv-popup {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  padding: 36px 28px 28px;
  text-align: center;
  border-radius: 20px;
  background: rgba(15, 35, 70, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 200, 66, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.lw-mv-popup-label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.85);
}
.lw-mv-popup-winner {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.35;
}
.lw-mv-popup-number {
  margin: 0 0 20px;
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff8e0 0%, var(--lw-mv-gold) 60%, var(--lw-mv-gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 16px rgba(245, 200, 66, 0.5));
}
.lw-mv-popup-reward {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lw-mv-popup-prize {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
}
.lw-mv-popup-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
}
.lw-mv-popup-image {
  max-width: 140px;
  max-height: 100px;
  border-radius: 8px;
  margin: 0 auto 20px;
  display: block;
  object-fit: contain;
}
.lw-mv-back-generate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1200;
  cursor: pointer;
  background: linear-gradient(180deg, var(--lw-mv-gold) 0%, var(--lw-mv-gold-dark) 100%);
  box-shadow: 0 4px 16px rgba(232, 160, 32, 0.4);
  transition: transform 0.15s;
}
.lw-mv-back-generate:hover {
  transform: translateY(-1px);
}

/* Notification wizard — compose & audience (production layout) */
.nw-compose-card__title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}
.nw-compose-card .form-section-card + .form-section-card {
  margin-top: 16px;
}
.nw-compose-card .nw-field-block {
  margin-top: 16px;
}
.nw-compose-card .form-section-card + .nw-field-block,
.nw-compose-card .nw-field-block + .nw-field-block {
  margin-top: 16px;
}
.nw-image-upload {
  width: 100%;
  box-sizing: border-box;
  border: 2px dashed var(--neutral-200);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  min-height: 80px;
  background: var(--white);
  transition: border-color .15s, background .15s;
  font: inherit;
  text-align: left;
  appearance: none;
}
button.nw-image-upload {
  margin: 0;
}
.nw-image-upload:hover {
  border-color: var(--primary-300);
  background: var(--neutral-25, #fcfcfd);
}
.nw-image-upload.is-selected {
  border-color: var(--primary-200, #b8d4ff);
  background: var(--neutral-25, #fcfcfd);
}
.nw-image-upload__icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f3ecff;
  display: grid;
  place-items: center;
  color: #1f7aff;
  flex-shrink: 0;
}
.nw-image-upload__icon svg {
  width: 22px;
  height: 22px;
  stroke: #1f7aff;
}
.nw-image-upload__text {
  flex: 1;
  min-width: 0;
}
.nw-image-upload__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.35;
}
.nw-image-upload__hint {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--neutral-500);
  line-height: 1.4;
}
.nw-image-upload__status {
  color: var(--primary-700, #1f5fbf);
  font-weight: 500;
}
.nw-deeplink-section .nw-deeplink-input {
  margin-top: 0;
}
.nw-audience-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nw-audience-stack > .card.card-padded,
.nw-audience-stack > .nw-audience-card {
  padding: 14px 16px;
  border-radius: 10px;
  border-color: var(--neutral-200);
}
.nw-audience-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nw-audience-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nw-audience-section-desc {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--neutral-500);
}
.nw-audience-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.35;
}
.nw-audience-all-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-800);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  margin: 0;
}
.nw-audience-all-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary-600);
}
.nw-audience-group-list-wrap {
  margin-top: 12px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  padding: 8px;
  background: var(--white);
}
.nw-audience-group-list-wrap.is-scrollable {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.nw-audience-group-list .audience-group + .audience-group {
  margin-top: 8px;
}
.nw-audience-group-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  margin: 0;
}
.nw-audience-group-list .nw-audience-group-row.is-active {
  border-color: var(--neutral-200);
  background: var(--white);
  box-shadow: none;
}
.nw-audience-group-cb {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--primary-600);
}
.nw-audience-group-body {
  flex: 1;
  min-width: 0;
}
.nw-audience-group-body .group-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.nw-audience-group-body .group-meta {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 2px;
  line-height: 1.35;
}
.nw-audience-group-count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--neutral-500);
  white-space: nowrap;
}
.nw-audience-selected-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-600);
  flex-shrink: 0;
  white-space: nowrap;
}
.nw-audience-manual-card .manual-picker-trigger {
  margin-top: 12px;
  margin-bottom: 0;
}
.nw-manual-search {
  position: relative;
}
.nw-manual-search .input {
  width: 100%;
  min-height: 44px;
  padding-left: 38px;
  padding-right: 42px;
  border-radius: 10px;
  font-size: 14px;
}
.nw-manual-search .icon {
  left: 12px;
  color: var(--neutral-400);
}
.nw-manual-search .manual-picker-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--neutral-500);
  cursor: pointer;
  padding: 0;
}
.nw-manual-search .manual-picker-caret:hover {
  background: var(--neutral-100);
  color: var(--neutral-700);
}


/* Audience scope list modal — fake-select filters */
.audience-scope-list-modal__body {
  overflow: visible;
}
.audience-scope-list-modal__filters {
  position: relative;
  z-index: 5;
  overflow: visible;
}
.audience-scope-list-modal__filters .fake-select {
  max-width: 170px;
  min-width: 140px;
}
.audience-scope-list-modal__filters .fake-select-menu {
  z-index: 220;
}
.audience-scope-list-modal__filters .fake-select-option.active {
  background: #e9f2ff;
  color: #175ad8;
}

.recipient-list-modal__body { overflow: visible; }
.recipient-list-modal__filters { position: relative; z-index: 5; overflow: visible; }
.recipient-list-modal__filters .fake-select { max-width: 170px; min-width: 140px; }
.recipient-list-modal__filters .fake-select-menu { z-index: 220; }
