:root {
  /* ACCESSTRADE Brand Ramps */
  --at-orange-50:  #fef6ee;
  --at-orange-100: #fdead7;
  --at-orange-200: #f9dbaf;
  --at-orange-300: #f7b27a;
  --at-orange-400: #f38744;
  --at-orange-500: #ef6820;  /* Core Brand Accent */
  --at-orange-600: #e04f16;  /* Primary Buttons, Solid Fills */
  --at-orange-700: #b93815;  /* Hover State */
  --at-orange-800: #932f19;  /* Deep Red Anchor */
  --at-orange-900: #772917;
  --at-orange-950: #511c10;

  --at-yellow: #fcb424;
  --at-red-deep: #942d1e;

  /* Gray — Untitled UI True Neutral */
  --at-gray-25:  #fcfcfd;
  --at-gray-50:  #fafafa;
  --at-gray-100: #f5f5f5;
  --at-gray-200: #e9eaeb;
  --at-gray-300: #d5d7da;
  --at-gray-400: #a4a7ae;
  --at-gray-500: #717680;
  --at-gray-600: #535862;
  --at-gray-700: #414651;
  --at-gray-800: #252b37;
  --at-gray-900: #181d27;
  --at-gray-950: #0a0d12;

  /* Semantic Feedback */
  --at-success-50:  #ecfdf3;
  --at-success-100: #dcfae6;
  --at-success-500: #17b26a;
  --at-success-600: #079455;
  --at-success-700: #067647;

  --at-warning-50:  #fffaeb;
  --at-warning-100: #fef0c7;
  --at-warning-500: #f79009;
  --at-warning-600: #dc6803;
  --at-warning-700: #b54708;

  --at-error-50:  #fef3f2;
  --at-error-100: #fee4e2;
  --at-error-500: #f04438;
  --at-error-600: #d92d20;
  --at-error-700: #b42318;

  --at-gradient-brand: linear-gradient(135deg, #942d1e 0%, #ee6723 48%, #fcb424 100%);
  --at-gradient-warm:  linear-gradient(180deg, #fef6ee 0%, #ffffff 100%);

  /* UI Aliases */
  --bg: #fcfcfd;
  --card: #ffffff;
  --border: #e9eaeb;
  --border-focus: #d5d7da;
  --text: #181d27;
  --muted: #535862;
  --primary: #e04f16;
  --primary-soft: #fef6ee;
  --primary-accent: #ef6820;
  --primary-dark: #b93815;
  --logo-blue: #e04f16;
  --destructive: #d92d20;
  --destructive-soft: #fef3f2;
  --ring: rgba(224, 79, 22, 0.24);
  --input-bg: #ffffff;
  --sidebar-w: 288px;
  --shadow-xs: 0 1px 2px 0 rgba(10,13,18,0.05);
  --shadow-sm: 0 1px 3px 0 rgba(10,13,18,0.10), 0 1px 2px -1px rgba(10,13,18,0.10);
  --shadow-md: 0 4px 6px -1px rgba(10,13,18,0.10), 0 2px 4px -2px rgba(10,13,18,0.06);
  --shadow-lg: 0 12px 16px -4px rgba(10,13,18,0.08), 0 4px 6px -2px rgba(10,13,18,0.03);
  --success-bg: #ecfdf3;
  --success-text: #079455;
  --warning-bg: #fffaeb;
  --warning-text: #b54708;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

svg {
  max-width: 100%;
  flex-shrink: 0;
}

/* Logo */
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
}

.logo-img {
  height: 38px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
}

.logo-img.auth {
  height: 48px;
}

.logo-img.sm {
  height: 32px;
}

/* Auth split */
.auth-split {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .auth-split {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-brand {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
  background: linear-gradient(135deg, #fef6ee 0%, #fdead7 45%, #fff 100%);
  border-right: 1px solid var(--border);
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-linear-gradient(
    -35deg,
    transparent,
    transparent 28px,
    rgba(239, 104, 32, 0.06) 28px,
    rgba(239, 104, 32, 0.06) 56px
  );
  opacity: 0.8;
}

@media (min-width: 1024px) {
  .auth-brand {
    display: flex;
  }
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: var(--card);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-mobile-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

@media (min-width: 1024px) {
  .auth-mobile-logo {
    display: none;
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h1 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-header p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.input,
.otp-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  font-size: 14px;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.input:focus,
.otp-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
  background: var(--card);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password svg {
  width: 16px;
  height: 16px;
}

.row-between {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.error-box {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: var(--destructive-soft);
  color: var(--destructive);
  font-size: 14px;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

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

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

.btn-sm {
  width: auto;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-outline {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  background: #f4f4f5;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-footer a {
  font-weight: 600;
}

.otp-input {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.4em;
}

.otp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 14px;
}

.otp-actions button {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}

.otp-actions .link-btn {
  color: var(--primary);
  font-weight: 500;
}

.otp-actions .muted-btn {
  color: var(--muted);
}

.otp-actions .link-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

/* ?? Register ?? */
.auth-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(244, 244, 245, 0.6);
}

.register-card {
  width: 100%;
  max-width: 640px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  padding: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.phone-row {
  display: flex;
}

.phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 36px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: #f4f4f5;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.phone-row .input {
  height: 36px;
  border-radius: 0 8px 8px 0;
}

.register-card .input {
  height: 36px;
  border-radius: 8px;
}

.policy-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(244, 244, 245, 0.5);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.policy-box input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ?? App layout ?? */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}

.logo-wrap {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.team-switcher {
  margin: 0 12px 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.shop-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.shop-avatar svg {
  width: 16px;
  height: 16px;
}

.team-switcher-text {
  flex: 1;
  min-width: 0;
}

.team-switcher-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.team-switcher-name span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--card);
}

.status-dot.active {
  background: #22c55e;
}

.package-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.chevron {
  color: var(--muted);
  flex-shrink: 0;
}

.nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
}

.nav-divider {
  margin: 12px 0;
  border-top: 1px solid rgba(228, 228, 231, 0.7);
}

.nav-label {
  padding: 0 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(113, 113, 122, 0.65);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(24, 24, 27, 0.82);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: #f4f4f5;
  text-decoration: none;
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.nav-item svg {
  width: 16px;
  height: 16px;
}

.nav-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.badge-new {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: #d1fae5;
  color: #047857;
  padding: 2px 8px;
  border-radius: 999px;
}

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

.navbar {
  height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb .sep {
  color: #d4d4d8;
}

.breadcrumb strong {
  color: var(--text);
  font-weight: 500;
}

.navbar-spacer {
  flex: 1;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn,
.user-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}

.notify-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
}

.user-btn:hover {
  background: #f4f4f5;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e7ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.user-meta {
  display: none;
  text-align: left;
}

@media (min-width: 1024px) {
  .user-meta {
    display: block;
  }
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-email {
  font-size: 12px;
  color: var(--muted);
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-scroll {
  flex: 1;
  overflow-y: auto;
}

.page-pad {
  padding: 24px;
}

/* ?? Shop list ?? */
.shops-card {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.shops-card-head {
  padding: 20px 24px 0;
}

.shops-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.shops-subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.shops-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stat-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 12px;
  color: #52525b;
}

.shops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.search-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 240px;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 360px;
}

.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}

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

.shop-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  font-size: 13px;
}

.shop-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(248, 248, 248, 0.9);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.shop-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #f4f4f5;
  vertical-align: middle;
}

.shop-table tr:hover td {
  background: #fafafa;
}

.shop-table tr.current td {
  background: var(--primary-soft);
}

.shop-table tr.current:hover td {
  background: rgba(37, 99, 235, 0.14);
}

.shop-name {
  font-weight: 500;
}

.shop-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.shop-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background: #f4f4f5;
  color: var(--text);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-badge.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

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

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.row-actions .btn,
.row-actions .btn-outline {
  width: auto;
  white-space: nowrap;
}

.row-actions .muted-label {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.pager {
  display: flex;
  gap: 4px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  font-size: 13px;
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

.gmv-cell {
  font-weight: 600;
  color: #059669;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .sidebar {
    display: none;
  }
}

/* ?? Advertising pages ?? */
.space-y-10 > * + * {
  margin-top: 40px;
}

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

.page-header-text {
  flex: 1;
  min-width: 240px;
}

.page-header-filters {
  flex-shrink: 0;
}

.page-header-filters .filter-row {
  justify-content: flex-end;
}

.page-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.filter-sticky {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 248, 248, 0.92);
  backdrop-filter: blur(8px);
  margin: 0 -24px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

.filter-box {
  height: 40px;
  min-width: 220px;
  max-width: 280px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  cursor: pointer;
}

.filter-box-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-date {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.icon-filter-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

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

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-grid-4 {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  border-color: rgba(224, 79, 22, 0.16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(113, 113, 122, 0.9);
}

.kpi-val {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.kpi-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.kpi-trend.up {
  background: #d1fae5;
  color: #047857;
}

.kpi-trend.down {
  background: #fee2e2;
  color: #b91c1c;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon.emerald { background: #d1fae5; color: #059669; }
.kpi-icon.blue { background: #fef6ee; color: #e04f16; }
.kpi-icon.orange { background: #ffedd5; color: #ea580c; }
.kpi-icon.purple { background: #ede9fe; color: #7c3aed; }
.kpi-icon.rose { background: #ffe4e6; color: #e11d48; }
.kpi-icon.violet { background: #f3e8ff; color: #9333ea; }

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.chart-card {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chart-card-head {
  padding: 16px 20px;
  border-bottom: 1px solid #f4f4f5;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: visible;
}

.chart-card-head svg {
  color: var(--muted);
  width: 18px;
  height: 18px;
}

.chart-card-title {
  font-size: 15px;
  font-weight: 600;
}

.chart-card-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.chart-card-body {
  padding: 8px 12px 12px;
  position: relative;
}

.chart-card .chart-card-body .apexcharts-toolbar {
  right: 8px !important;
  left: auto !important;
  top: 4px !important;
}

.chart-card .donut-split .apexcharts-toolbar {
  right: 8px !important;
  left: auto !important;
  top: 4px !important;
}

.apex-chart {
  min-height: 280px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.select-native {
  height: 40px;
  min-width: 180px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
}

.table-card {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 16px;
  overflow: hidden;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

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

.data-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(248, 248, 248, 0.9);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f4f4f5;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #fafafa;
}

.link-name {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

.link-name:hover {
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active { background: #d1fae5; color: #047857; }
.badge-paused { background: #fef3c7; color: #b45309; }
.badge-inactive { background: #f4f4f5; color: #52525b; }
.badge-roi-pos { background: #d1fae5; color: #047857; }
.badge-roi-target { background: #fef6ee; color: #b93815; }

.cell-cost { color: var(--text); }
.cell-revenue { font-weight: 600; color: #059669; }
.cell-orders { font-weight: 600; color: #e04f16; }

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

.page-btns {
  display: flex;
  gap: 4px;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.product-name {
  font-weight: 500;
  max-width: 520px;
}

.product-id {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.video-count-card {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-count-label {
  font-size: 14px;
  color: var(--muted);
}

.video-count-val {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-left: auto;
  text-align: right;
}

.chart-tabs {
  display: flex;
  gap: 4px;
  padding: 0 0 12px;
  flex-wrap: wrap;
}

.chart-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.chart-tab.on {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #fdead7;
}

.video-title-cell {
  max-width: 280px;
  font-weight: 500;
}

.video-ad-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-ad-text {
  min-width: 0;
  flex: 1;
}

.video-title-link {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

.video-title-link:hover {
  text-decoration: underline;
}

.video-ad-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fef6ee, #ede9fe);
  color: #e04f16;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.video-list-table {
  min-width: 1800px;
}

.product-list-table {
  width: 100%;
  min-width: 0;
}

.product-table-card {
  overflow: visible;
  overflow-x: visible;
}

.product-table-card .product-action-col {
  width: 150px;
  text-align: right;
  white-space: nowrap;
}

.product-table-card .product-name {
  max-width: none;
}

.video-table-wrap {
  overflow-x: auto;
}

.table-card.video-table-card {
  overflow: hidden;
  overflow-x: hidden;
}

.table-card.video-table-card .pagination {
  position: relative;
  z-index: 1;
  background: var(--card);
}

.live-campaign-table .cell-cost-live {
  color: #dc2626;
  font-weight: 500;
}

.live-campaign-table .cell-cpa {
  color: #ea580c;
  font-weight: 500;
}

.live-campaign-table .cell-live-views {
  color: #9333ea;
  font-weight: 600;
}

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

.advertiser-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f4f5;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.chart-grid-live-detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-card-wide {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.live-info-card {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.live-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.live-info-head .section-title {
  margin: 0;
}

.live-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 24px;
}

.live-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.live-info-label {
  font-size: 12px;
  color: var(--muted);
}

.live-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.live-info-value.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
}

.live-info-purple {
  color: #9333ea;
}

@media (max-width: 900px) {
  .live-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .live-info-grid {
    grid-template-columns: 1fr;
  }
}

.team-switcher-wrap {
  position: relative;
  margin: 0 12px 8px;
}

.team-switcher-wrap .team-switcher {
  margin: 0;
  width: 100%;
  text-align: left;
}

.shop-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 360px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 6px;
}

.shop-switcher-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.shop-switcher-item:hover,
.shop-switcher-item.active {
  background: var(--primary-soft);
}

.shop-switcher-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shop-switcher-item-text {
  flex: 1;
  min-width: 0;
}

.shop-switcher-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-switcher-item-package {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.shop-switcher-manage {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.shop-switcher-manage:hover {
  color: var(--primary);
}

.vp-video-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vp-video-table-wrap {
  overflow-x: auto;
}

.vp-video-table {
  min-width: 1100px;
}

.vp-video-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 280px;
}

.vp-video-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.vp-video-text {
  min-width: 0;
  flex: 1;
}

.vp-video-title {
  display: block;
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.vp-video-title:hover {
  text-decoration: underline;
}

.vp-video-id,
/* Ảnh cover lấy từ oEmbed thay cho emoji giữ chỗ — dùng chung kích thước với
   .vp-video-thumb nên chỉ cần cắt ảnh cho vừa khung. */
img.vp-video-thumb {
  object-fit: cover;
}

.vp-video-author {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.vp-author-link {
  color: var(--primary, #e4572e);
  text-decoration: none;
  font-weight: 600;
}

.vp-author-link:hover {
  text-decoration: underline;
}

.vp-empty-cell {
  color: var(--muted);
}

.vp-tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.vp-tag-staff {
  background: #fef6ee;
  color: #b93815;
  border: 1px solid #fdead7;
}

.vp-tag-content {
  background: #f4f4f5;
  color: #52525b;
  border: 1px solid var(--border);
}

.vp-add-video-card {
  width: min(760px, calc(100vw - 32px));
}

.vp-date-field {
  cursor: pointer;
  background: #fff;
}

.vp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vp-modal-head h3 {
  margin: 0;
}

.modal-close {
  font-size: 22px;
  line-height: 1;
}

.vp-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.vp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vp-field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.vp-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.req {
  color: #ef4444;
}

.vp-date-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vp-date-input .input {
  flex: 1;
}

.vp-link-count {
  font-size: 12px;
  color: var(--muted);
}

.vp-link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vp-link-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.vp-link-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2ff;
  color: #6366f1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vp-link-input-wrap {
  flex: 1;
  min-width: 0;
}

.vp-link-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.vp-add-link-btn {
  width: 100%;
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

.vp-combobox {
  position: relative;
}

.vp-combobox-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.vp-combobox-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.vp-combobox-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.vp-combobox-search {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
}

.vp-combobox-list {
  max-height: 220px;
  overflow-y: auto;
}

.vp-combobox-option {
  width: 100%;
  display: block;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.vp-combobox-option:hover,
.vp-combobox-option.active {
  background: var(--primary-soft);
}

.vp-combobox-option.create {
  color: var(--primary);
  font-weight: 600;
}

.vp-combobox-empty {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
}

.vp-staff-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.video-list-table .sticky-col {
  position: sticky;
  z-index: 2;
  background: var(--card);
}

.video-list-table thead .sticky-col {
  z-index: 3;
  background: rgba(248, 248, 248, 0.98);
}

.video-list-table .sticky-col-1 {
  left: 0;
  min-width: 300px;
  max-width: 300px;
}

.video-list-table .sticky-col-2 {
  left: 300px;
  min-width: 180px;
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.08);
}

.num-cell {
  text-align: right;
  white-space: nowrap;
}

.video-list-table th.num-cell,
.video-list-table td.num-cell {
  text-align: right;
}

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

.tiktok-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ede9fe;
  color: #7c3aed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.tiktok-name {
  font-size: 13px;
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-ad-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.icon-mini-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  flex-shrink: 0;
}

.icon-mini-btn:hover {
  color: var(--primary);
  border-color: #fdead7;
  background: var(--primary-soft);
}

.donut-split {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1.1fr);
  gap: 12px;
  align-items: center;
}

.budget-split {
  grid-template-columns: minmax(200px, 0.9fr) minmax(240px, 1.1fr);
}

.donut-chart,
.budget-chart {
  min-height: 260px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.budget-legend {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.donut-legend-row,
.budget-legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: start;
}

.budget-legend-row {
  grid-template-columns: 10px 1fr;
}

.donut-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

.donut-legend-label {
  font-size: 12px;
  color: #52525b;
  line-height: 1.4;
}

.donut-legend-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.budget-legend-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.budget-legend-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.date-picker-anchor {
  position: relative;
}

.date-picker-popover {
  position: fixed;
  z-index: 200;
  width: 680px;
  max-width: calc(100vw - 24px);
}

.date-picker-popover.hidden {
  display: none;
}

.date-picker-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.date-picker-body {
  display: grid;
  grid-template-columns: 148px 1fr;
  min-height: 320px;
}

.date-presets {
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  background: #fafafa;
}

.date-calendar-area {
  padding: 12px 16px 8px;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.calendar-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.calendar-month-title {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.calendar-weekdays span {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 0;
}

.calendar-days span,
.calendar-days button {
  font-size: 12px;
  padding: 6px 0;
  border-radius: 6px;
}

.calendar-days button {
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

.calendar-days button.muted {
  color: #d4d4d8;
}

.calendar-days .day.selected,
.calendar-days button.day.selected {
  background: var(--primary);
  color: #fff;
}

.calendar-days .muted {
  color: #d4d4d8;
}

.calendar-days .day.in-range {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
}

.calendar-days .day.range-start,
.calendar-days .day.range-end {
  background: var(--primary);
  color: #fff;
}

.date-picker-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .date-picker-body {
    grid-template-columns: 1fr;
  }

  .date-presets {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .calendar-dual {
    grid-template-columns: 1fr;
  }

  .donut-split {
    grid-template-columns: 1fr;
  }
}

.page-header-filters .filter-box {
  min-width: 180px;
  max-width: 220px;
}

@media (max-width: 900px) {
  .page-header-filters {
    width: 100%;
  }

  .page-header-filters .filter-row {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Modals */
.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.demo-modal.hidden {
  display: none;
}

.demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.demo-modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.demo-modal-card.demo-modal-date {
  max-width: 640px;
}

.demo-modal-card h3 {
  font-size: 18px;
  font-weight: 700;
}

.demo-modal-desc {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.advertiser-list {
  margin-top: 16px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.advertiser-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.advertiser-option.selected {
  background: var(--primary-soft);
  border-color: #fdead7;
}

.advertiser-name {
  font-weight: 600;
}

.advertiser-id {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

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

.video-preview-card {
  max-width: 560px;
}

.video-preview-player {
  margin-top: 16px;
}

.video-preview-screen {
  aspect-ratio: 9 / 16;
  max-height: 420px;
  margin: 0 auto;
  width: min(100%, 280px);
  border-radius: 12px;
  background: linear-gradient(160deg, #0f172a, #1e293b);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
}

.video-preview-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.video-preview-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.date-modal-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .date-modal-body {
    grid-template-columns: 1fr;
  }
}

.date-presets-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.date-preset {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 2px;
}

.date-preset:hover {
  background: #f4f4f5;
}

.date-preset.active {
  background: var(--primary);
  color: #fff;
}

/* legacy calendar styles kept for compatibility */
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 13px;
}

.calendar-grid .muted {
  color: var(--muted);
  font-size: 11px;
}

.calendar-grid .range {
  background: rgba(37, 99, 235, 0.12);
  border-radius: 6px;
}

.calendar-grid .range-end {
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
}

.link-btn {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 8px 12px;
}

.link-btn:hover {
  color: var(--text);
}

.vp-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vp-list-section .section-head {
  align-items: center;
}

.vp-list-search {
  min-width: 260px;
}

.vp-table-wrap {
  overflow-x: auto;
}

.vp-campaign-table {
  min-width: 1100px;
}

.vp-row-actions {
  display: flex;
  gap: 6px;
}

.icon-mini-btn.danger {
  color: #dc2626;
}

.icon-mini-btn.danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
}

.vp-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.vp-dashboard-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vp-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f4f4f5;
}

.vp-tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.vp-tab.on {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.vp-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.vp-dashboard-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vp-select {
  min-width: 180px;
}

.vp-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vp-group-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.vp-group-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef6ee;
  color: #b93815;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.vp-group-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.vp-group-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--primary);
}

.vp-progress-card {
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.vp-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vp-progress-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.vp-progress-pct {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.vp-progress-track {
  height: 12px;
  border-radius: 999px;
  background: #e4e4e7;
  overflow: hidden;
}

.vp-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e04f16, #6366f1);
}

.vp-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.vp-kpi-grid .kpi-val {
  font-size: 22px;
}

.vp-donut-grid,
.vp-bar-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vp-bar-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vp-bar-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vp-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vp-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.vp-bar-label {
  color: var(--text);
  font-weight: 500;
}

.vp-bar-value {
  color: var(--muted);
  font-weight: 600;
}

.vp-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #f4f4f5;
  overflow: hidden;
}

.vp-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

@media (max-width: 1200px) {
  .vp-bar-grid {
    grid-template-columns: 1fr;
  }

  .vp-donut-grid {
    grid-template-columns: 1fr;
  }
}

.vp-group-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.8);
  box-shadow: var(--shadow-sm);
}

.vp-dashboard-filter-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.vp-sync-note {
  margin: 0;
  max-width: 360px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}

.vp-progress-counts {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

.vp-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.vp-metric-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #fafafa;
  border: 1px solid rgba(228, 228, 231, 0.9);
}

.vp-metric-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.vp-metric-val {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.vp-metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}

.vp-metric-icon.blue {
  background: #fef6ee;
  color: #e04f16;
}

.vp-metric-icon.emerald {
  background: #d1fae5;
  color: #059669;
}

.vp-metric-icon.purple {
  background: #ede9fe;
  color: #7c3aed;
}

.vp-metric-icon.orange {
  background: #ffedd5;
  color: #ea580c;
}

.vp-metric-icon.rose {
  background: #ffe4e6;
  color: #e11d48;
}

.vp-legend-row .donut-legend-value {
  margin-left: auto;
  white-space: nowrap;
}

.vp-campaign-form-card {
  width: min(1100px, calc(100vw - 32px));
}

.vp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 8px;
}

.vp-field-full {
  grid-column: 1 / -1;
}

.vp-textarea {
  min-height: 96px;
  resize: vertical;
}

.vp-staff-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
}

.vp-staff-picker:focus-within {
  border-color: #c4b5fd;
  background: #faf5ff;
}

.vp-staff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.vp-staff-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 12px;
  font-weight: 600;
}

.vp-staff-tag button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.vp-staff-search-wrap {
  position: relative;
}

.vp-staff-search {
  width: 100%;
}

.vp-staff-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 220px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.vp-staff-dropdown.hidden {
  display: none;
}

.vp-staff-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.vp-staff-option:hover,
.vp-staff-option.selected {
  background: #f4f4f5;
}

.vp-staff-option-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.vp-staff-option-email {
  font-size: 12px;
  color: var(--muted);
}

.vp-staff-help {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.vp-delete-card {
  width: min(480px, calc(100vw - 32px));
}

.vp-delete-confirm {
  margin: 0 24px 8px;
  padding: 16px;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 14px;
  color: var(--muted);
}

.btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

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

  .vp-metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.vp-single-date-popover {
  z-index: 1200;
}

.vp-single-date-panel {
  width: 320px;
}

.calendar-single-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 0;
  font-weight: 700;
}

.vp-link-row.loaded {
  align-items: flex-start;
}

.vp-link-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eef2ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.vp-link-icon.loading {
  animation: vp-spin 1s linear infinite;
}

.vp-link-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.vp-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #fef6ee;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: vp-spin 0.8s linear infinite;
}

.vp-link-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text);
}

.vp-video-preview-box {
  padding: 14px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid var(--border);
}

.vp-video-preview-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.vp-video-preview-id {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.vp-video-preview-id span {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef6ee;
  color: #b93815;
  font-weight: 600;
}

@keyframes vp-spin {
  to {
    transform: rotate(360deg);
  }
}

.bk-kpi-grid .kpi-label {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.bk-campaign-form-card {
  width: 100%;
  max-width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.bk-modal-head-wrap {
  flex-shrink: 0;
  padding: 24px 24px 0;
}

.bk-modal-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 0;
  padding-bottom: 4px;
}

.bk-modal-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--foreground);
}

.bk-modal-tab.active {
  background: #e04f16;
  border-color: #e04f16;
  color: #fff;
}

.bk-modal-tab-panel {
  display: none;
}

.bk-modal-tab-panel.active {
  display: block;
}

.bk-target-section {
  padding: 0 24px 20px;
}

.bk-target-section + .bk-target-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.bk-target-section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}

.bk-kpi-table-wrap {
  margin-top: 4px;
}

.bk-kpi-table .bk-kpi-input {
  width: 100%;
  max-width: 120px;
  text-align: center;
}

.bk-kpi-table .bk-kpi-num-cell {
  text-align: center;
}

.bk-kpi-table th.num-cell {
  text-align: center;
}

.bk-num-input {
  text-align: right;
}

.bk-kpi-product-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
}

.bk-kpi-product-id {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.bk-kpi-empty {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.bk-form-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 8px 0;
}

.bk-modal-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  background: var(--card);
  border-radius: 0 0 16px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.bk-modal-actions .btn {
  width: auto;
  min-width: 96px;
}

.demo-modal:has(.bk-campaign-form-card) {
  align-items: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.bk-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 24px 8px;
}

.bk-field-hint {
  font-size: 12px;
  color: var(--muted);
}

.bk-progress-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.bk-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e4e4e7;
  overflow: hidden;
}

.bk-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e04f16, #ef6820);
}

.bk-progress-label {
  font-size: 12px;
  color: var(--muted);
}

.bk-staff-cell {
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bk-campaign-table th,
.bk-campaign-table td {
  vertical-align: middle;
}

.bk-empty-row {
  text-align: center;
  color: var(--muted);
  padding: 32px 16px !important;
}

.bk-product-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bk-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bk-product-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  background: #fef6ee;
  color: #b93815;
  font-size: 12px;
  font-weight: 600;
}

.bk-product-tag button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.bk-product-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.bk-product-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.bk-product-panel.hidden {
  display: none;
}

.bk-product-panel-head {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #f4f4f5;
}

.bk-product-search-wrap {
  min-width: 0;
}

.bk-product-list {
  max-height: 280px;
  overflow: auto;
}

.bk-product-option {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: none;
  border-bottom: 1px solid #f4f4f5;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.bk-product-option:hover,
.bk-product-option.selected {
  background: #f8fafc;
}

.bk-product-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.bk-product-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.bk-product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bk-product-id {
  font-size: 12px;
  color: var(--muted);
}

.bk-product-status {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.bk-status-active {
  color: #059669;
}

.bk-status-draft {
  color: #d97706;
}

.bk-status-stopped {
  color: #dc2626;
}

.bk-product-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

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

  .bk-product-panel-head {
    grid-template-columns: 1fr;
  }

  .bk-ring-grid,
  .bk-ring-grid-3,
  .bk-ops-grid {
    grid-template-columns: 1fr;
  }

  .vp-bar-grid-2,
  .vp-donut-grid-2,
  .vp-donut-grid-3 {
    grid-template-columns: 1fr;
  }

  .bk-detail-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bk-detail-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f4f4f5;
  overflow-x: visible;
  max-width: 100%;
  flex-wrap: wrap;
}

.bk-detail-header {
  display: flex;
  flex-direction: column;
  gap: 0;
}

  .bk-tab-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0 8px;
  margin-left: auto;
}

.bk-tab-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.bk-merge-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0 4px;
}

.bk-merge-source {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(228, 228, 231, 0.9);
  background: #fafafa;
  font-weight: 600;
}

.bk-product-merge-card {
  max-width: 560px;
}

.icon-mini-btn.disabled,
.icon-mini-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.bk-detail-tab {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.bk-detail-tab.on {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.bk-detail-tab.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.bk-ring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bk-ring-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bk-ov-group {
  border-radius: 12px;
  border: 1px solid #fdead7;
  background: rgba(239, 246, 255, 0.35);
  padding: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  margin-bottom: 20px;
}
.bk-ov-group.tone-blue {
  border-color: #f7b27a;
  background: rgba(239, 246, 255, 0.35);
}
.bk-ov-group.tone-cyan {
  border-color: #bae6fd;
  background: rgba(240, 249, 255, 0.4);
}
.bk-ov-group.tone-violet {
  border-color: #ddd6fe;
  background: rgba(245, 243, 255, 0.4);
}
.bk-ov-group.tone-emerald {
  border-color: #a7f3d0;
  background: rgba(236, 253, 245, 0.4);
}
.bk-ov-group-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bk-ov-badge {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: #b93815;
}
.bk-ov-group.tone-cyan .bk-ov-badge { background: #0369a1; }
.bk-ov-group.tone-violet .bk-ov-badge { background: #7c3aed; }
.bk-ov-group.tone-emerald .bk-ov-badge { background: #047857; }
.bk-ov-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.bk-ov-group.tone-blue .bk-ov-title { color: #172554; }
.bk-ov-group.tone-cyan .bk-ov-title { color: #0c4a6e; }
.bk-ov-group.tone-violet .bk-ov-title { color: #2e1065; }
.bk-ov-group.tone-emerald .bk-ov-title { color: #064e3b; }
.bk-ov-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: #b93815;
}
.bk-ov-group.tone-cyan .bk-ov-desc { color: #0369a1; }
.bk-ov-group.tone-violet .bk-ov-desc { color: #6d28d9; }
.bk-ov-group.tone-emerald .bk-ov-desc { color: #047857; }
.bk-ov-divider {
  margin: 16px 0;
  border-top: 1px solid #fdead7;
}
.bk-ov-group.tone-cyan .bk-ov-divider { border-color: #bae6fd; }
.bk-ov-group.tone-violet .bk-ov-divider { border-color: #ddd6fe; }
.bk-ov-group.tone-emerald .bk-ov-divider { border-color: #a7f3d0; }
.bk-ov-panel {
  background: #fff;
}
.bk-progress-panel-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.bk-progress-panel-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bk-progress-panel-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bk-progress-panel {
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bk-progress-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.bk-progress-panel-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  background: #e0f2fe;
  color: #0284c7;
}
.bk-progress-panel.tone-emerald .bk-progress-panel-icon {
  background: #d1fae5;
  color: #059669;
}
.bk-progress-panel.tone-amber .bk-progress-panel-icon {
  background: #fef3c7;
  color: #d97706;
}
.bk-progress-panel-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #334155;
}
.bk-progress-panel-pct {
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: #020617;
}
.bk-progress-panel-sub,
.bk-progress-panel-remain {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  color: #475569;
}
.bk-progress-panel-track {
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.bk-progress-panel-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #38bdf8;
}
.bk-progress-panel.tone-emerald .bk-progress-panel-track > span { background: #34d399; }
.bk-progress-panel.tone-amber .bk-progress-panel-track > span { background: #fbbf24; }
.bk-progress-panel-remain strong { color: #0f172a; }
.bk-overview-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.bk-ov-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bk-ov-metric-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 16px;
  background: #e0f2fe;
  color: #0369a1;
}
.bk-ov-metric-icon.sky { background: #e0f2fe; }
.bk-ov-metric-icon.emerald { background: #d1fae5; }
.bk-ov-metric-icon.indigo { background: #e0e7ff; }
.bk-ov-metric-icon.cyan { background: #cffafe; }
.bk-ov-metric-icon.amber { background: #fef3c7; }
.bk-ov-metric-icon.blue { background: #fef6ee; }
.bk-ov-metric-icon.violet { background: #ede9fe; }
.bk-ov-metric-icon.fuchsia { background: #fae8ff; }
.bk-ov-metric-icon.teal { background: #ccfbf1; }
.bk-ov-metric-icon.rose { background: #ffe4e6; }
.bk-ov-metric-icon.slate { background: #f1f5f9; }
.bk-ov-metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.bk-ov-metric-val-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.bk-ov-metric-val {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #020617;
}
.bk-ov-metric-suffix {
  padding-bottom: 2px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}
.bk-kpi-progress-list,
.bk-staff-effect-list,
.bk-koc-rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bk-kpi-progress-row,
.bk-staff-effect-row,
.bk-koc-rank-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
}
.bk-kpi-progress-row {
  grid-template-columns: minmax(0, 1fr) auto;
}
.bk-kpi-progress-row.has-thumb {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.bk-kpi-progress-row:not(:has(.bk-kpi-progress-thumb)) {
  grid-template-columns: minmax(0, 1fr) auto;
}
.bk-kpi-progress-thumb {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 14px;
}
.bk-kpi-progress-label,
.bk-staff-effect-name,
.bk-koc-rank-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: #334155;
}
.bk-kpi-progress-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.bk-kpi-progress-value strong { color: #0f172a; }
.bk-kpi-progress-value em {
  font-style: normal;
  color: #94a3b8;
  font-weight: 500;
}
.bk-kpi-progress-value span { color: #64748b; font-size: 12px; }
.bk-kpi-progress-value span.ok { color: #059669; font-weight: 600; }
.bk-staff-effect-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.bk-staff-effect-koc { font-weight: 600; color: #0f172a; }
.bk-staff-effect-gmv {
  min-width: 7rem;
  text-align: right;
  font-weight: 700;
  color: #047857;
}
.bk-koc-rank-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}
.bk-koc-rank-idx {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.bk-koc-rank-val { font-weight: 700; color: #0f172a; white-space: nowrap; }
.bk-contact-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 1280px) {
  .bk-contact-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.bk-contact-status-item {
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.8);
  padding: 12px;
  text-align: center;
}
.bk-contact-status-label {
  display: block;
  font-size: 12px;
  color: #64748b;
}
.bk-contact-status-count {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: #020617;
}
.bk-auto-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 10px;
  font-weight: 700;
}
.bk-order-delivery-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bk-order-carrier {
  font-size: 12px;
  color: #64748b;
}

/* Số liệu bán hàng lấy từ đơn affiliate thật. */
.bk-order-gmv {
  font-weight: 600;
  color: #16a34a;
}

/* Hoa hồng TikTok chưa quyết toán — đừng để nhìn giống số đã chốt. */
.bk-order-est-tag {
  font-size: 11px;
  color: #b45309;
  font-weight: 500;
}

/* "Chưa ai nhập", khác hẳn với "bằng 0". */
.bk-order-muted {
  color: #94a3b8;
}

.bk-order-total-row td {
  font-weight: 600;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}

.bk-video-product-text {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #334155;
}
@media (max-width: 1100px) {
  .bk-progress-panel-grid.cols-3,
  .bk-progress-panel-grid.cols-2,
  .bk-overview-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .bk-progress-panel-grid.cols-3,
  .bk-progress-panel-grid.cols-2,
  .bk-overview-metric-grid {
    grid-template-columns: 1fr;
  }
}

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

.vp-donut-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.vp-donut-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.bk-chart-full {
  margin-bottom: 16px;
}

.bk-daily-charts {
  margin-top: 0;
}

.bk-empty-state {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.bk-coop-done,
.bk-coop-rate {
  color: #16a34a;
}

.bk-sample-row.success strong {
  color: #16a34a;
}

.bk-ring-card {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(228, 228, 231, 0.9);
  background: #fafafa;
}

.bk-ring-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.bk-ring-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.bk-ring-pct {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.bk-ring-body {
  display: flex;
  align-items: center;
  gap: 20px;
}

.bk-ring-chart {
  --pct: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: conic-gradient(#e04f16 calc(var(--pct) * 1%), #e4e4e7 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bk-ring-inner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.bk-ring-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.bk-detail-kpi-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bk-detail-kpi {
  padding: 14px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid rgba(228, 228, 231, 0.9);
}

.bk-detail-kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.bk-detail-kpi-val {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.bk-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.bk-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bk-status-item {
  padding: 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid var(--border);
}

.bk-status-count {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.bk-status-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.bk-coop-summary {
  display: flex;
  gap: 24px;
  margin-bottom: 12px;
  font-size: 13px;
}

.bk-coop-summary-even {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bk-coop-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid var(--border);
}

.bk-coop-stat span {
  color: var(--muted);
}

.bk-coop-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.bk-coop-table {
  font-size: 13px;
}

.bk-coop-table-center th.num-cell,
.bk-coop-table-center td.num-cell {
  text-align: center;
}

.bk-top-koc-table {
  font-size: 13px;
}

.bk-top-koc-table th.num-cell,
.bk-top-koc-table td.num-cell {
  text-align: center;
}

.bk-top-koc-rank {
  font-weight: 700;
  color: var(--muted);
  width: 42px;
}

.bk-top-koc-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.bk-top-koc-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#chart-bk-staff-koc-gmv {
  min-height: 340px;
  overflow: visible;
}

#chart-bk-koc-day-staff {
  min-height: 320px;
  overflow: visible;
}

.chart-card.bk-chart-full {
  overflow: visible;
}

.chart-card.bk-chart-full .chart-card-body {
  overflow: visible;
}

.bk-sample-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bk-sample-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.bk-sample-row strong {
  color: var(--text);
  font-size: 15px;
}

.bk-sample-row.danger strong {
  color: #dc2626;
}

.bk-product-form-card {
  max-width: min(960px, calc(100vw - 32px));
}

.bk-product-form-grid {
  padding: 0 24px 16px;
}

.bk-products-card {
  padding: 24px;
}

.bk-products-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.bk-products-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.bk-products-table th {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bk-bp-product-cell,
.bk-bp-map-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bk-bp-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f4f4f5;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.bk-bp-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.bk-bp-source {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.bk-bp-map-name {
  font-size: 12px;
  color: #52525b;
  line-height: 1.35;
}

.bk-bp-unmapped {
  font-size: 12px;
  color: var(--muted);
}

.bk-launch-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}

.bk-launch-active {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.bk-launch-draft {
  color: #a16207;
  background: #fffbeb;
  border-color: #fde68a;
}

/* Mọi wrapper bọc .bk-tiktok-panel / .bk-product-panel đều phải là mốc định vị.
   Thiếu `position: relative`, panel (absolute) rơi về mốc gần nhất — trong hộp
   thoại là `.demo-modal-card` — nên `top: calc(100% + 6px)` có nghĩa "dưới đáy
   cả popup" chứ không phải "dưới ô vừa bấm". Đo được ở popup Thêm đơn gửi hàng
   mẫu: nút ID Kênh ở y=152, panel bật ra ở y=609. */
.bk-tiktok-select,
.bk-koc-channel-picker,
.bk-carrier-picker,
.bk-koc-tag-picker,
.bk-koc-status-picker,
.bk-koc-bp-picker {
  position: relative;
}

.bk-tiktok-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
}

.bk-tiktok-trigger-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--text);
}

.bk-tiktok-name,
.bk-tiktok-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-tiktok-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.bk-tiktok-search-wrap {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.bk-koc-channel-picker .bk-tiktok-option {
  padding: 6px 10px;
  gap: 8px;
  align-items: center;
}

.bk-koc-channel-picker .bk-koc-avatar {
  font-size: 18px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bk-koc-option-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  white-space: normal;
  line-height: 1.25;
}

.bk-koc-option-text strong {
  font-size: 13px;
}

.bk-koc-option-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.bk-tiktok-list {
  max-height: 240px;
  overflow-y: auto;
}

.bk-koc-channel-picker .bk-tiktok-list {
  max-height: 200px;
}

.bk-koc-channel-picker .bk-tiktok-search-wrap {
  padding: 8px;
}

.bk-tiktok-option {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}

.bk-tiktok-option:hover,
.bk-tiktok-option.selected {
  background: #f4f4ff;
}

.bk-tiktok-check {
  margin-left: auto;
  color: var(--primary);
  font-weight: 700;
}

.bk-tiktok-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f4f4f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bk-upload-box {
  border: 1px dashed #d4d4d8;
  border-radius: 12px;
  padding: 20px;
  background: #fafafa;
}

.bk-upload-box p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.bk-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vp-field-label .req {
  color: #dc2626;
}

@media (max-width: 900px) {
  .bk-products-head {
    flex-direction: column;
  }

  .bk-products-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .bk-koc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

.bk-koc-card {
  padding: 24px;
}

.bk-koc-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bk-koc-add-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.bk-koc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bk-koc-toolbar .bk-koc-search {
  flex: 1 1 220px;
  min-width: 200px;
}

.bk-koc-bulk-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.bk-koc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  min-width: 120px;
}

.bk-koc-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.bk-koc-breakdown strong {
  font-weight: 600;
}

.bk-koc-bio {
  display: block;
  max-width: 180px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.bk-koc-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 1 1 520px;
}

.bk-koc-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 1 auto;
}

.bk-koc-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bk-koc-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px;
}

.bk-koc-bulk-approve {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.bk-koc-bulk-approve:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.bk-koc-bulk-reject {
  color: #dc2626;
  border-color: #fecaca;
}

.bk-koc-table-wrap {
  overflow-x: auto;
}

.bk-koc-table {
  min-width: 1100px;
}

.bk-koc-sticky-check {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  min-width: 44px;
}

.bk-koc-sticky-creator {
  position: sticky;
  left: 44px;
  z-index: 2;
  background: #fff;
  box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.12);
  min-width: 260px;
  max-width: 300px;
}

.bk-koc-sticky-approval {
  position: sticky;
  left: 304px;
  z-index: 2;
  background: #fff;
  min-width: 84px;
  box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.08);
}

.bk-koc-sticky-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -4px 0 8px -4px rgba(15, 23, 42, 0.12);
  min-width: 148px;
}

.bk-koc-table thead .bk-koc-sticky-check,
.bk-koc-table thead .bk-koc-sticky-creator,
.bk-koc-table thead .bk-koc-sticky-approval,
.bk-koc-table thead .bk-koc-sticky-actions {
  background: #fafafa;
  z-index: 4;
}

.bk-koc-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.bk-koc-modal-actions .btn {
  width: auto;
  min-width: 96px;
}

.bk-koc-tag-picker .vp-staff-tags {
  margin-bottom: 8px;
}

.bk-koc-create-option {
  color: var(--primary);
  font-weight: 600;
}

.bk-koc-search {
  min-width: 220px;
  flex: 1 1 220px;
}

.bk-koc-table-wrap {
  overflow-x: auto;
}

.bk-koc-table th,
.bk-koc-table td {
  white-space: nowrap;
  font-size: 12px;
}

.bk-koc-creator-col {
  min-width: 260px;
  max-width: 300px;
  white-space: normal !important;
}

.bk-koc-tag-workstatus {
  background: #e0f2fe;
  color: #0369a1;
}

.bk-koc-approval-filter {
  min-width: 132px;
}

.bk-koc-filter-toggle {
  flex-shrink: 0;
  white-space: nowrap;
}

.bk-koc-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-mini-btn.success {
  color: #16a34a;
  border-color: #bbf7d0;
}

.icon-mini-btn.success:hover {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

.bk-koc-creator {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.bk-koc-creator-btn {
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.bk-koc-creator-btn:hover {
  background: #f4f4f5;
}

.bk-koc-creator-btn .bk-koc-link {
  display: block;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

.bk-koc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f4f4f5;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.bk-koc-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.bk-koc-channel {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.bk-koc-link {
  display: block;
  font-size: 11px;
  color: var(--primary);
  margin-top: 2px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-koc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.bk-koc-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: #f4f4f5;
  color: #52525b;
}

.bk-koc-tag-booking {
  background: #fef6ee;
  color: #b93815;
}

.bk-koc-tag-potential {
  background: #ede9fe;
  color: #6d28d9;
}

.bk-koc-tag-kol {
  background: #fef3c7;
  color: #b45309;
}

.bk-koc-approval {
  font-size: 12px;
  font-weight: 700;
}

.bk-koc-approval-approved {
  color: #15803d;
}

.bk-koc-approval-pending {
  color: #a16207;
}

.bk-koc-approval-rejected {
  color: #dc2626;
}

.bk-koc-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.bk-koc-page-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.bk-koc-page-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bk-koc-page-indicator {
  font-size: 13px;
  font-weight: 600;
}

.bk-koc-form-card {
  max-width: min(1040px, calc(100vw - 32px));
}

.bk-koc-form-grid {
  padding: 0 24px 16px;
  align-items: start;
}

.bk-koc-form-grid .vp-field {
  min-width: 0;
}

.bk-koc-form-grid .vp-field-label {
  display: block;
  min-height: 16px;
  line-height: 16px;
}

.bk-koc-form-grid .bk-koc-label-placeholder {
  visibility: hidden;
  user-select: none;
}

.bk-koc-form-grid .bk-koc-field-control {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
}

.bk-koc-form-grid .select-native {
  width: 100%;
  height: 44px;
  border-radius: 10px;
}

.bk-koc-form-grid .vp-date-input {
  min-height: 44px;
}

.bk-koc-form-grid .bk-koc-approval-readonly {
  padding: 0 2px;
}

.bk-koc-form-grid .bk-tiktok-trigger,
.bk-koc-form-grid .bk-product-trigger {
  min-height: 44px;
}

.bk-koc-form-grid .bk-koc-tag-picker .vp-staff-tags:empty,
.bk-koc-form-grid .bk-koc-bp-picker .bk-product-tags:empty {
  display: none;
}

.bk-koc-form-grid .bk-koc-tag-picker,
.bk-koc-form-grid .bk-koc-status-picker,
.bk-koc-form-grid .bk-koc-bp-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.bk-koc-form-grid .bk-koc-form-pair-field .bk-koc-tag-picker,
.bk-koc-form-grid .bk-koc-form-pair-field .bk-koc-status-picker {
  flex: 1;
  justify-content: flex-end;
}

.bk-koc-warehouse-msg.is-ok {
  color: #15803d;
}

.bk-koc-warehouse-msg.is-error {
  color: #dc2626;
}

.bk-koc-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.bk-koc-preview-stats {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.bk-koc-bp-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bk-koc-view-wrap {
  position: relative;
}

.bk-koc-view-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bk-koc-view-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.bk-koc-toast {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 100;
  background: #fff;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #22c55e;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-md);
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bk-koc-toast strong {
  font-size: 14px;
  color: var(--text);
}

.bk-koc-toast span {
  font-size: 12px;
  color: var(--muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.check-col {
  width: 36px;
}

.bk-product-create-btn {
  width: auto;
  white-space: nowrap;
}

.bk-koc-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bk-search-date-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}

.bk-sync-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.bk-sync-badge.syncing {
  background: #fef6ee;
  color: #b93815;
}

.bk-sync-badge.error {
  background: #fee2e2;
  color: #dc2626;
}

.notify-panel {
  width: 360px;
  max-height: 420px;
  background: #fff;
  border: 1px solid rgba(228, 228, 231, 0.9);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  overflow: hidden;
}

.notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f4f4f5;
}

.notify-panel-list {
  max-height: 340px;
  overflow-y: auto;
}

.notify-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f4f4f5;
}

.notify-item-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.notify-item-msg {
  font-size: 12px;
  color: var(--muted);
}

.notify-item-time {
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 6px;
}

.notify-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.bk-order-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.bk-order-filter-search {
  min-width: 200px;
  max-width: 240px;
}

.bk-order-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.bk-order-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bk-order-head-title {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
  font-size: 16px;
}

.bk-order-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bk-order-keyword-wrap {
  flex: 0 1 240px;
  min-width: 200px;
}

.bk-order-delivery-filter,
.bk-order-type-filter,
.bk-order-sample-filter,
.bk-order-payment-filter {
  flex: 0 0 auto;
  min-width: 150px;
}

.bk-order-head-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.bk-koc-note-col {
  min-width: 120px;
  max-width: 200px;
  font-size: 13px;
  color: var(--muted, #71717a);
}

.demo-modal-card.bk-koc-pick-card {
  max-width: min(1140px, 98vw);
  width: min(1140px, 98vw);
  max-height: min(90vh, 880px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bk-koc-pick-card .vp-modal-head {
  flex: 0 0 auto;
}

.bk-koc-pick-card #bk-koc-pick-step-warehouse:not(.hidden) {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.bk-koc-pick-card #bk-koc-pick-step-kocs:not(.hidden) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bk-koc-warehouse-list {
  display: grid;
  gap: 10px;
  padding: 4px 0 8px;
}

.bk-koc-warehouse-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.bk-koc-warehouse-item:hover {
  border-color: var(--primary, #6366f1);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.bk-koc-warehouse-item span {
  color: var(--muted, #71717a);
  font-size: 13px;
  font-weight: 500;
}

.bk-koc-pick-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.bk-koc-pick-search {
  flex: 1 1 auto;
  min-width: 0;
}

.bk-koc-pick-collection-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 220px;
  max-width: 320px;
  height: 40px;
  padding: 0 36px 0 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #fff;
  cursor: pointer;
}

.bk-koc-pick-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #f4f4f5;
  border-radius: 10px;
}

.bk-koc-pick-table {
  width: 100%;
  table-layout: fixed;
}

.bk-koc-pick-table .check-col {
  width: 48px;
}

.bk-koc-pick-table th:nth-child(2),
.bk-koc-pick-table td:nth-child(2) {
  width: 36%;
}

.bk-koc-pick-note-col {
  width: 28%;
  min-width: 0;
  max-width: none;
}

.bk-koc-pick-tag-col {
  width: 32%;
  min-width: 0;
  max-width: none;
}

.bk-koc-pick-table th,
.bk-koc-pick-table td {
  overflow: hidden;
  vertical-align: middle;
}

.bk-koc-pick-tag-col .bk-koc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bk-koc-pick-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  color: #52525b;
  line-height: 1.4;
}

.bk-koc-pick-tag-col .bk-koc-tag {
  font-size: 11px;
  padding: 2px 8px;
}

.bk-koc-pick-dup {
  opacity: 0.72;
}

.bk-koc-pick-dup-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
}

.bk-koc-pick-hint {
  margin: 0 0 10px;
  flex: 0 0 auto;
}

.demo-modal-card.bk-koc-pick-card .bk-koc-pick-actions {
  flex: 0 0 auto;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e4e4e7;
  background: var(--card, #fff);
}

.bk-order-table-wrap {
  overflow-x: auto;
}

.bk-order-table {
  min-width: 1600px;
}

.bk-order-koc-col {
  min-width: 220px;
}

.bk-order-sticky-actions {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -4px 0 8px -4px rgba(15, 23, 42, 0.12);
}

.bk-order-koc-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bk-order-koc-name {
  font-weight: 600;
}

.bk-order-code-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bk-order-pay-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.bk-order-pay-unpaid {
  background: #ffedd5;
  color: #c2410c;
}

.bk-order-pay-free {
  background: #fef6ee;
  color: #b93815;
}

.bk-order-pay-paid {
  background: #dcfce7;
  color: #15803d;
}

.bk-order-product-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.bk-order-product-name {
  font-size: 12px;
  font-weight: 600;
}

.bk-order-product-qty {
  font-size: 11px;
  color: var(--muted);
}

.bk-order-form-card {
  max-width: min(1040px, calc(100vw - 32px));
}

.bk-order-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bk-order-sample-cost-display {
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
  padding: 8px 0 4px;
}

.bk-carrier-picker .vp-staff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.bk-segmented {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bk-segment {
  border: 1px solid #d4d4d8;
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.bk-segment.on {
  border-color: var(--primary);
  color: var(--primary);
  background: #fef6ee;
}

.bk-order-tiktok-load {
  display: flex;
  gap: 10px;
}

.bk-order-tiktok-load .input {
  flex: 1;
}

.bk-order-products-empty {
  border: 1px dashed #d4d4d8;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: #fafafa;
}

.bk-order-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
}

.bk-order-product-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.bk-order-product-sub {
  font-size: 11px;
  color: var(--muted);
}

.bk-order-offplatform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.bk-order-bp-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.bk-order-bp-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  cursor: pointer;
}

.bk-order-bp-option.selected {
  border-color: var(--primary);
  background: #fef6ee;
}

.bk-order-video-card {
  max-width: 920px;
}

.bk-order-video-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.bk-order-video-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bk-video-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef6ee;
  color: #b93815;
  font-size: 12px;
  font-weight: 600;
}

.bk-video-id-pill {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 6px;
  background: #fef6ee;
  color: #b93815;
  font-size: 12px;
  font-weight: 600;
}

.bk-video-date-btn {
  padding: 6px 10px;
  font-size: 12px;
}

.bk-order-video-unsaved {
  margin-top: 10px;
  font-size: 12px;
  color: #c2410c;
}

.vp-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.bk-detail-header {
  width: 100%;
}

.bk-order-form-card .bk-modal-head-wrap,
.bk-order-form-card .bk-form-scroll,
.bk-order-form-card .bk-modal-actions {
  padding-left: 24px;
  padding-right: 24px;
}

.bk-order-form-card .bk-modal-actions {
  padding-bottom: 24px;
}

.bk-order-import-card .bk-order-import-body {
  padding: 0 24px 8px;
}

.bk-order-import-upload-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.bk-order-import-upload-row .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bk-order-import-template-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.bk-order-import-template-link:hover {
  opacity: 0.85;
}

.bk-order-import-file-name {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.bk-order-tiktok-load {
  align-items: stretch;
}

.bk-order-tiktok-load .input {
  flex: 1 1 auto;
  min-width: 0;
}

.bk-order-tiktok-load .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.bk-order-external-fees {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.bk-order-delivery-locked {
  opacity: 0.85;
  cursor: not-allowed;
  background: var(--bg-muted, #f4f4f5);
}

.bk-order-external-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bk-order-external-table .select-native,
.bk-order-external-table .input {
  min-width: 110px;
}

/* `<select>` gốc tự co giãn theo option DÀI NHẤT, và bảng `table-layout: auto`
   lấy đúng bề rộng đó làm bề rộng cột. Tên sản phẩm booking dài (ví dụ "Dịch
   Chiết Sâm Ngọc Linh Trường Nhân") đẩy cột Sản phẩm lên 377px, bảng thành
   1294px trong khung 977px — cột Thao tác bị đẩy ra ngoài, phải cuộn ngang mới
   bấm được Xóa. `max-width` ở đây chặn luôn phần đóng góp max-content của ô nên
   cột không nở nữa; `min-width: 0` cho phép select co lại bên trong.
   Tên đầy đủ không mất: đã gắn `title` cho ô chọn trong booking-order.js. */
.bk-order-external-product-select {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 260px;
}

.bk-order-external-product-select .select-native {
  flex: 1;
  min-width: 0;
  text-overflow: ellipsis;
}

.bk-order-external-total {
  margin-top: 12px;
  text-align: right;
  font-size: 13px;
}

.bk-order-pay-partial {
  background: #fef3c7;
  color: #b45309;
}

.bk-order-pay-none {
  background: #f4f4f5;
  color: #52525b;
}

.bk-video-card .vp-group-title {
  margin: 0;
}

.bk-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bk-video-head .vp-group-title {
  flex: 0 0 auto;
}

.bk-video-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 0;
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.bk-video-search {
  min-width: 200px;
  max-width: 260px;
  flex: 0 1 240px;
}

.bk-video-table-wrap {
  overflow-x: auto;
}

.bk-campaign-video-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 230px;
}

.bk-video-thumb-lg {
  font-size: 28px;
  line-height: 1;
}

.bk-video-link-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.bk-video-info {
  min-width: 0;
  flex: 1;
}

/* Link TikTok dài ~50 ký tự; để nó xuống dòng thì mỗi hàng cao gấp ba và các
   cột chỉ số bị đẩy ra ngoài màn hình. Cắt bằng ellipsis, href vẫn đầy đủ. */
.bk-video-link {
  color: var(--primary);
  font-size: 13px;
  flex: 1;
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-video-id-line {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* Ô không có số liệu — phải nhìn khác số 0 để không ai đọc nhầm "bằng không". */
.bk-video-nodata {
  color: var(--muted);
  cursor: help;
}

/* Cảnh báo bộ lọc đang giấu bớt video, để số ở đây khớp được với tiến độ ở
   trang tổng quan. */
.bk-video-hidden-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
}

.bk-video-date-note {
  font-size: 10px;
  font-weight: 700;
  color: #92400e;
  cursor: help;
}

.bk-video-unsynced {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
}

.bk-ads-code-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bk-sort-btn {
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  color: inherit;
}

.bk-video-edit-card {
  max-width: 520px;
}

.bk-video-edit-body {
  padding: 0 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bk-video-edit-card .bk-modal-actions {
  padding: 0 24px 24px;
}

/* Personnel list */
.ps-kpi-grid .kpi-label {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.page-subtitle {
  margin-top: 6px;
  color: #71717a;
  font-size: 14px;
}

.ps-table-head {
  flex-wrap: wrap;
  gap: 12px;
}

.ps-table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ps-table-filters .search-wrap {
  min-width: 260px;
}

.ps-employee-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ps-employee-cell strong {
  font-weight: 600;
  color: #18181b;
}

.ps-employee-cell span {
  font-size: 12px;
  color: #a1a1aa;
}

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

.ps-role-admin { background: #3f3f46; color: #fff; }
/* Quản trị tổ chức — đậm hơn Quản trị Shop một bậc, vì đây là vai trò duy nhất
   cấp được quyền cho người khác. */
.ps-role-org-admin { background: #7c2d12; color: #fff; }
.ps-role-ops { background: #fef6ee; color: #b93815; }
.ps-role-booking { background: #ffedd5; color: #c2410c; }
.ps-role-producer { background: #ede9fe; color: #6d28d9; }

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

/* Kết quả sau khi mời — hiện thay cho form trong cùng hộp thoại. */
.ps-invite-result {
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 12px;
  padding: 16px;
  margin-top: 4px;
}

.ps-invite-note {
  font-size: 13.5px;
  line-height: 1.6;
  color: #78350f;
  margin: 0 0 12px;
}

.ps-invite-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ps-invite-link-row .input {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  background: #fff;
}

.ps-invite-link-row .btn {
  flex-shrink: 0;
}

.ps-invite-result .ps-field-hint {
  margin-top: 10px;
}

.ps-status-active { background: #ecfdf5; color: #047857; }
/* Chờ chấp nhận lời mời — hổ phách, để không bị đọc nhầm thành "đã khoá" (xám). */
.ps-status-invited { background: #fffbeb; color: #b45309; }
.ps-status-inactive { background: #f4f4f5; color: #71717a; }

.ps-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.ps-modal-card {
  max-width: 560px;
  width: calc(100% - 32px);
  padding: 24px;
}

.ps-modal-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.ps-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fef6ee;
  color: #e04f16;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
}

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

.ps-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #a1a1aa;
}

.ps-password-wrap {
  position: relative;
}

.ps-password-wrap .input {
  padding-right: 40px;
}

.ps-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.ps-shop-picker {
  position: relative;
}

.ps-shop-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}

.ps-shop-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 240px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #fff;
  box-shadow: var(--shadow-md);
  padding: 8px;
}

.ps-shop-panel.hidden {
  display: none;
}

.ps-shop-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.ps-shop-option:hover {
  background: #f4f4f5;
}

.ps-shop-option-name {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
}

.ps-shop-option-pkg {
  font-size: 12px;
  color: #a1a1aa;
}

.ps-shop-help {
  margin-top: 8px;
  font-size: 12px;
  color: #a1a1aa;
}

.ps-shop-tags-view {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e9d5ff;
  background: #faf5ff;
}

.ps-shop-tag {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #f7b27a;
  background: #fef6ee;
  color: #b93815;
  font-size: 12px;
  font-weight: 600;
}

.ps-updated-at {
  font-size: 12px;
  color: #a1a1aa;
  margin-bottom: 8px;
}

.ps-warning-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
}

.ps-toggle-card {
  text-align: center;
}

.ps-toggle-warning {
  color: #dc2626;
  font-size: 13px;
  margin: 8px 0 16px;
}

.ps-reset-card .bk-modal-actions {
  margin-top: 16px;
}

@media (max-width: 640px) {
  .ps-form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* MeWork */
.mw-app {
  display: flex;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: #f8fafc;
}

.mw-sidebar {
  width: 240px;
  background: #fff;
  border-right: 1px solid #e4e4e7;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  flex-shrink: 0;
  transition: width 0.2s ease, padding 0.2s ease;
}

.mw-sidebar-collapsed {
  width: 72px;
  padding: 16px 10px;
  align-items: center;
}

.mw-sidebar-collapsed .mw-logo span {
  display: none;
}

.mw-sidebar-collapsed .mw-nav-label,
.mw-sidebar-collapsed .mw-badge-soon,
.mw-sidebar-collapsed .mw-user-name,
.mw-sidebar-collapsed .mw-user-role {
  display: none;
}

.mw-sidebar-collapsed .mw-nav-item {
  justify-content: center;
  position: relative;
  font-size: 0;
  gap: 0;
  padding: 10px;
}

.mw-sidebar-collapsed .mw-nav-item svg {
  width: 20px;
  height: 20px;
}

.mw-sidebar-collapsed .mw-nav-unread {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  font-size: 9px;
}

.mw-sidebar-collapsed .mw-user-card {
  justify-content: center;
  padding: 8px;
}

.mw-sidebar-collapsed .mw-user-card > div:last-child {
  display: none;
}

.mw-logo {
  font-size: 22px;
  font-weight: 800;
  color: #ea580c;
  letter-spacing: -0.02em;
}

.mw-logo span {
  color: #e04f16;
}

.mw-nav-label {
  margin: 24px 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #a1a1aa;
  letter-spacing: 0.06em;
}

.mw-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mw-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #52525b;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.mw-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mw-nav-item.active {
  background: #fef6ee;
  color: #e04f16;
}

.mw-nav-item.disabled {
  opacity: 0.65;
  pointer-events: none;
}

.mw-badge-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #a1a1aa;
  background: #f4f4f5;
  padding: 2px 8px;
  border-radius: 999px;
}

.mw-nav-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid #f4f4f5;
}

.mw-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  border-radius: 12px;
  background: #fafafa;
}

.mw-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e04f16;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.mw-user-name {
  font-size: 13px;
  font-weight: 600;
}

.mw-user-role {
  font-size: 12px;
  color: #a1a1aa;
}

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

.mw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #e4e4e7;
}

.mw-topbar-title {
  font-size: 18px;
  font-weight: 700;
}

.mw-topbar-sub {
  font-size: 13px;
  color: #71717a;
  margin-top: 2px;
}

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

.mw-search {
  min-width: 280px;
}

.mw-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mw-board-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

.mw-board-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mw-filter-host.hidden {
  display: none;
}

.mw-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #a1a1aa;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.mw-project-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mw-project-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e4e4e7;
}

.mw-project-pill-icon {
  font-size: 20px;
}

.mw-project-pill-label {
  font-size: 12px;
  color: #a1a1aa;
}

.mw-project-pill-name {
  font-weight: 700;
  font-size: 16px;
}

.mw-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.mw-pill.soft {
  background: #f4f4f5;
  color: #52525b;
}

.mw-pill.purple {
  background: #ede9fe;
  color: #6d28d9;
}

.mw-pill.green {
  background: #ecfdf5;
  color: #047857;
}

.mw-context-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mw-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mw-overview-head h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

.mw-overview-head p {
  color: #71717a;
  margin-top: 6px;
  font-size: 14px;
}

.mw-overview-actions {
  display: flex;
  gap: 10px;
}

.mw-kpi-grid .kpi-val {
  font-size: 28px;
}

.mw-board-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mw-board-search {
  min-width: 240px;
  flex: 1;
}

.mw-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #52525b;
}

.mw-view-toggle {
  display: inline-flex;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  overflow: hidden;
  margin-left: auto;
}

.mw-view-btn {
  border: none;
  background: #fff;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
}

.mw-view-btn.active {
  background: #fef6ee;
  color: #e04f16;
}

.mw-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 16px;
  overflow-x: auto;
  height: 100%;
  align-items: stretch;
}

.mw-kanban.hidden,
.mw-task-list-host.hidden {
  display: none;
}

.mw-task-list-host {
  height: 100%;
  overflow: auto;
}

.mw-kanban-col {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.mw-kanban-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #f4f4f5;
  font-size: 14px;
  flex-shrink: 0;
}

.mw-kanban-count {
  margin-left: auto;
  color: #a1a1aa;
  font-size: 13px;
}

.mw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mw-dot.blue { background: #e04f16; }
.mw-dot.cyan { background: #06b6d4; }
.mw-dot.green { background: #10b981; }
.mw-dot.gray { background: #a1a1aa; }

.mw-kanban-drop {
  flex: 1;
  margin: 12px;
  border: 2px dashed #e4e4e7;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a1a1aa;
  font-size: 13px;
  min-height: 120px;
}

.mw-icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #71717a;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 8px;
}

.mw-icon-btn:hover {
  background: #f4f4f5;
}

.mw-hub-card {
  max-width: 920px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.mw-hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.mw-hub-section-title {
  font-size: 13px;
  color: #71717a;
  margin-bottom: 12px;
}

.mw-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.mw-project-card {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 16px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.mw-project-card:hover {
  border-color: #c4b5fd;
  box-shadow: var(--shadow-sm);
}

.mw-project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mw-project-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mw-default-pill {
  font-size: 10px;
  font-weight: 700;
  color: #6d28d9;
  background: #ede9fe;
  padding: 2px 8px;
  border-radius: 999px;
}

.mw-project-menu-wrap {
  position: relative;
}

.mw-project-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 6px;
}

.mw-project-menu.hidden {
  display: none;
}

.mw-project-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.mw-project-menu button:hover {
  background: #f4f4f5;
}

.mw-project-menu button.danger {
  color: #dc2626;
}

.mw-project-menu button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mw-project-card-desc {
  font-size: 13px;
  color: #71717a;
  margin: 12px 0;
  line-height: 1.5;
}

.mw-project-card-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mw-create-inline {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  background: #fafafa;
}

.mw-create-inline.hidden {
  display: none;
}

.mw-create-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mw-create-inline-actions {
  display: flex;
  gap: 8px;
}

.mw-rename-card,
.mw-delete-card {
  max-width: 480px;
}

.mw-delete-card {
  text-align: center;
}

@media (max-width: 900px) {
  .mw-kanban {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 720px) {
  .mw-app {
    flex-direction: column;
  }

  .mw-sidebar {
    width: 100%;
  }
}

.mw-settings-card {
  max-width: 920px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.mw-settings-tabs {
  display: inline-flex;
  background: #f4f4f5;
  border-radius: 12px;
  padding: 4px;
  margin: 16px 0;
}

.mw-settings-tab {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
}

.mw-settings-tab.active {
  background: #fff;
  color: #18181b;
  box-shadow: var(--shadow-sm);
}

.mw-status-add-row,
.mw-tag-create-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border-radius: 14px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  margin-bottom: 16px;
}

.mw-tag-create-row {
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr auto;
}

.mw-mini-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #71717a;
  font-weight: 600;
}

.mw-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mw-status-row {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

.mw-status-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mw-status-row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mw-status-row-top .mw-status-row-actions {
  margin-left: auto;
  margin-top: 0;
}

.mw-status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.mw-status-color-neutral { background: #f4f4f5; color: #52525b; }
.mw-status-color-gray { background: #e4e4e7; color: #3f3f46; }
.mw-status-color-blue { background: #fef6ee; color: #b93815; }
.mw-status-color-green { background: #d1fae5; color: #047857; }
.mw-status-color-orange { background: #ffedd5; color: #c2410c; }
.mw-status-color-red { background: #fee2e2; color: #dc2626; }
.mw-status-color-purple { background: #ede9fe; color: #6d28d9; }

.mw-status-col-label {
  font-size: 12px;
  color: #a1a1aa;
}

.mw-status-row-fields {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
}

.mw-status-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

.mw-tag-create-box {
  border: 1px solid #fdead7;
  background: #fef6ee;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.mw-tag-create-head {
  font-weight: 700;
  margin-bottom: 6px;
}

.mw-tag-create-hint {
  font-size: 13px;
  color: #71717a;
  margin-bottom: 12px;
}

.mw-tag-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mw-tag-group-card {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.mw-tag-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.mw-tag-group-head-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.mw-tag-expand {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  width: 24px;
}

.mw-pill.warn {
  background: #fef3c7;
  color: #b45309;
}

.mw-tag-group-body {
  padding: 0 14px 14px;
  border-top: 1px solid #f4f4f5;
}

.mw-tag-group-meta-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.mw-tag-values-box {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}

.mw-tag-values-title {
  font-size: 12px;
  font-weight: 700;
  color: #71717a;
  margin-bottom: 10px;
}

.mw-tag-value-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 10px;
  margin-bottom: 8px;
  align-items: center;
}

.mw-tag-value-new {
  margin-top: 8px;
  grid-template-columns: 2fr 1fr auto;
}

.mw-create-task-card {
  max-width: 1040px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mw-create-task-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.mw-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.mw-modal-header-main {
  flex: 1;
  min-width: 0;
}

.mw-modal-header .modal-close {
  flex-shrink: 0;
  margin-left: auto;
}

.mw-hub-card .mw-hub-head {
  margin-bottom: 0;
}

.mw-filter-panel {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

.mw-filter-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mw-filter-panel-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.mw-filter-tag-section {
  margin-bottom: 12px;
}

.mw-filter-tag-label {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.mw-filter-tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mw-filter-tag-btn {
  border: 1px solid #f7b27a;
  background: #fff;
  color: #b93815;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mw-filter-tag-btn.on {
  background: #fef6ee;
}

.mw-filter-panel-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.mw-board-toolbar .btn.active {
  border-color: #e04f16;
  color: #e04f16;
  background: #fef6ee;
}

.mw-task-list {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  overflow: hidden;
}

.mw-task-list th,
.mw-task-list td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f4f4f5;
  font-size: 13px;
}

.mw-task-list th {
  background: #fafafa;
  font-size: 12px;
  color: #71717a;
  font-weight: 700;
}

.mw-priority-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.mw-priority-pill.mw-priority-medium { background: #fef6ee; color: #b93815; }
.mw-priority-pill.mw-priority-high { background: #ffedd5; color: #c2410c; }
.mw-priority-pill.mw-priority-low { background: #f4f4f5; color: #52525b; }
.mw-priority-pill.mw-priority-urgent { background: #fee2e2; color: #dc2626; }

.mw-list-progress,
.mw-list-comments {
  color: #71717a;
  font-size: 12px;
}

.mw-list-tags {
  color: #a1a1aa;
  font-size: 12px;
}

.mw-list-empty {
  padding: 24px;
  text-align: center;
}

.mw-create-task-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

.mw-create-task-side {
  padding: 16px;
  border-radius: 14px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mw-task-tags-section {
  margin-bottom: 16px;
}

.mw-section-mini-title {
  font-weight: 700;
  margin-bottom: 10px;
}

.mw-task-tag-group {
  margin-bottom: 12px;
}

.mw-task-tag-group-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #71717a;
  margin-bottom: 8px;
}

.mw-task-tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mw-task-tag-btn {
  border: 1px solid #f7b27a;
  background: #fff;
  color: #b93815;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mw-task-tag-btn.on {
  background: #fef6ee;
}

.mw-tag-color-blue { border-color: #f7b27a; color: #b93815; }
.mw-tag-color-green { border-color: #86efac; color: #047857; }
.mw-tag-color-orange { border-color: #fdba74; color: #c2410c; }
.mw-tag-color-red { border-color: #fca5a5; color: #dc2626; }
.mw-tag-color-purple { border-color: #c4b5fd; color: #6d28d9; }
.mw-tag-color-gray { border-color: #d4d4d8; color: #52525b; }
.mw-tag-color-neutral { border-color: #e4e4e7; color: #52525b; }

.mw-create-task-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mw-checklist-box,
.mw-links-box {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 14px;
  background: #fafafa;
}

.mw-checklist-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.mw-checklist-add {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.mw-checklist-item,
.mw-link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 8px;
  font-size: 13px;
}

.mw-link-meta {
  font-size: 12px;
  color: #a1a1aa;
}

.mw-link-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0;
}

.mw-link-form .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.mw-empty-hint {
  font-size: 12px;
  color: #a1a1aa;
  margin: 6px 0;
}

.mw-kanban-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.mw-kanban-body.mw-drop-hover {
  background: #faf5ff;
}

.mw-task-card.mw-dragging {
  opacity: 0.55;
}

.mw-task-card {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  cursor: grab;
}

.mw-task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.mw-task-priority {
  font-size: 11px;
  font-weight: 700;
}

.mw-task-code {
  font-size: 11px;
  color: #a1a1aa;
}

.mw-task-card-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #71717a;
  margin-bottom: 8px;
}

.mw-task-overdue {
  color: #dc2626;
  font-weight: 600;
}

.mw-task-progress-bar {
  height: 4px;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.mw-task-progress-bar span {
  display: block;
  height: 100%;
  background: #10b981;
  border-radius: 999px;
}

.mw-task-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.mw-task-pct {
  color: #71717a;
}

.mw-task-assignee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #52525b;
  font-weight: 600;
}

.mw-task-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fef6ee;
  color: #b93815;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
}

.mw-task-card-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.mw-task-card-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #71717a;
  flex-wrap: wrap;
}

.mw-priority-low { color: #71717a; }
.mw-priority-medium { color: #e04f16; }
.mw-priority-high { color: #ea580c; }
.mw-priority-urgent { color: #dc2626; font-weight: 700; }

.mw-dot.rose { background: #ef4444; }
.mw-dot.purple { background: #8b5cf6; }

@media (max-width: 900px) {
  .mw-create-task-grid,
  .mw-create-task-bottom,
  .mw-status-add-row,
  .mw-tag-create-row,
  .mw-status-row-fields,
  .mw-tag-group-meta-row {
    grid-template-columns: 1fr;
  }
}

/* MeWork compact overview KPIs */
.mw-overview {
  flex-shrink: 0;
}

.mw-overview-head {
  margin-bottom: 8px;
}

.mw-overview-head h1 {
  font-size: 20px;
  margin: 0;
}

.mw-overview-head p {
  display: none;
}

.mw-project-context {
  flex-shrink: 0;
}

.mw-kpi-grid {
  gap: 10px;
}

.mw-kpi-grid .kpi-card {
  padding: 10px 14px;
  border-radius: 10px;
}

.mw-kpi-grid .kpi-label {
  font-size: 11px;
}

.mw-kpi-grid .kpi-val {
  font-size: 22px;
  margin-top: 2px;
}

.mw-kpi-grid .kpi-icon {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.mw-board-toolbar {
  flex-shrink: 0;
}

.mw-list-row {
  cursor: pointer;
}

.mw-list-row:hover {
  background: #fafafa;
}

/* MeWork task detail drawer */
body.mw-detail-open {
  overflow: hidden;
}

.mw-task-detail {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
}

.mw-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}

.mw-detail-panel {
  position: relative;
  width: min(520px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.mw-detail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #f4f4f5;
}

.mw-detail-panel-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.mw-detail-panel-head p {
  margin: 0;
  font-size: 13px;
  color: #71717a;
}

.mw-detail-panel-body {
  flex: 1;
  overflow: auto;
  padding: 16px 20px 24px;
}

.mw-detail-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.mw-detail-title {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

.mw-detail-updated {
  margin: 0 0 14px;
  font-size: 12px;
  color: #a1a1aa;
}

.mw-detail-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.mw-detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  margin-bottom: 16px;
  font-size: 12px;
}

.mw-detail-meta-grid span {
  display: block;
  color: #71717a;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.mw-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
}

.mw-detail-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mw-detail-tag-group {
  margin: 12px 0;
}

.mw-detail-tag-label {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.mw-detail-tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mw-detail-tag-btn {
  border: 1px solid #f7b27a;
  background: #fff;
  color: #b93815;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mw-detail-tag-btn.on {
  background: #fef6ee;
}

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

.mw-detail-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}

.mw-detail-link-item:hover {
  background: #fafafa;
}

.mw-detail-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f4f4f5;
  border-radius: 12px;
  margin: 18px 0 12px;
}

.mw-detail-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
}

.mw-detail-tab.active {
  background: #fff;
  color: #18181b;
  box-shadow: var(--shadow-sm);
}

.mw-detail-checklist-head,
.mw-detail-comments-head,
.mw-detail-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 10px;
  color: #e04f16;
}

.mw-detail-progress {
  height: 6px;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.mw-detail-progress span {
  display: block;
  height: 100%;
  background: #e04f16;
}

.mw-detail-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f4f4f5;
  font-size: 13px;
}

.mw-detail-check-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.mw-detail-check-add,
.mw-detail-comment-compose {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mw-detail-comment {
  position: relative;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 40px 10px 12px;
  margin-bottom: 8px;
  background: #fff;
}

.mw-detail-comment-meta {
  font-size: 11px;
  color: #a1a1aa;
  margin-bottom: 6px;
}

.mw-detail-comment .mw-icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

.mw-detail-comment-text {
  font-size: 13px;
  line-height: 1.5;
}

.mw-detail-activity-item {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.mw-detail-activity-item span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #a1a1aa;
}

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

/* Creator analytics */
.kpi-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.cr-page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.cr-kpi-grid .kpi-card {
  padding: 18px 20px;
}

.cr-card {
  margin-top: 16px;
}

.cr-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cr-card-title {
  margin: 0 0 6px;
  font-size: 16px;
}

.cr-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.cr-card-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.cr-product-filter {
  min-width: 200px;
}

.cr-search {
  min-width: 240px;
}

.cr-table-wrap {
  overflow: auto;
}

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

.cr-table th,
.cr-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f4f4f5;
  text-align: center;
  white-space: nowrap;
}

.cr-table th {
  background: #fafafa;
  font-size: 12px;
  font-weight: 700;
}

.cr-creator-cell {
  text-align: left !important;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.cr-th-video { border-top: 3px solid #e04f16; color: #b93815; }
.cr-th-showcase { border-top: 3px solid #10b981; color: #047857; }
.cr-th-live { border-top: 3px solid #8b5cf6; color: #6d28d9; }
.cr-th-link { border-top: 3px solid #ef4444; color: #dc2626; }
.cr-th-std { border-top: 3px solid #e04f16; color: #b93815; }
.cr-th-ads { border-top: 3px solid #10b981; color: #047857; }

.cr-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.cr-page-meta {
  font-size: 13px;
  color: var(--muted);
}

.cr-page-btns {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.cr-page-btn {
  border: 1px solid #e4e4e7;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

.cr-page-btn.active {
  background: #e04f16;
  border-color: #e04f16;
  color: #fff;
}

.cr-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cr-page-ellipsis {
  color: #a1a1aa;
  padding: 0 4px;
}

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

  .mw-detail-quick,
  .mw-detail-row-2,
  .mw-detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .sa-chart-grid-2,
  .sa-metric-groups {
    grid-template-columns: 1fr;
  }
}

/* Shop analytics */
.kpi-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

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

.sa-filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.sa-filters-video {
  align-items: flex-end;
}

.sa-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.sa-date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-date-input {
  width: 110px;
}

.sa-kpi-grid .kpi-card {
  padding: 16px 18px;
}

.sa-trend {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
}

.sa-trend.up { color: #16a34a; }
.sa-trend.down { color: #dc2626; }

.sa-chart-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.sa-chart-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.sa-card {
  margin-bottom: 16px;
}

.sa-section-title {
  margin: 0 0 12px;
  font-size: 16px;
}

.sa-data-table,
.sa-video-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sa-data-table th,
.sa-data-table td,
.sa-video-table th,
.sa-video-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f4f4f5;
  text-align: left;
  vertical-align: middle;
}

.sa-data-table th,
.sa-video-table th {
  background: #fafafa;
  font-size: 12px;
  color: #71717a;
}

.sa-product-cell,
.sa-video-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.sa-product-cell span,
.sa-video-thumb {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f5;
  border-radius: 8px;
  font-size: 18px;
  flex-shrink: 0;
}

.sa-muted {
  font-size: 12px;
  color: #a1a1aa;
}

.sa-gmv {
  color: #16a34a;
  font-weight: 600;
  white-space: nowrap;
}

.sa-share-bar {
  height: 6px;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
  width: 80px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.sa-share-bar span {
  display: block;
  height: 100%;
  background: #ef6820;
}

.sa-up { color: #16a34a; font-weight: 600; }
.sa-down { color: #dc2626; font-weight: 600; }

.sa-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sa-pill.red { background: #fee2e2; color: #dc2626; }
.sa-pill.green { background: #dcfce7; color: #16a34a; }

.sa-video-tabs {
  display: inline-flex;
  gap: 4px;
  background: #f4f4f5;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.sa-video-tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
}

.sa-video-tab.active {
  background: #fff;
  color: #18181b;
  box-shadow: var(--shadow-sm);
}

.sa-info-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.sa-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sa-table-wrap {
  overflow: auto;
}

/* Dùng cho cả <button> lẫn <a>: ô thao tác giờ là link mở video trên TikTok. */
.sa-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #e04f16;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sa-play-btn:hover {
  background: #c2410c;
  color: #fff;
}

.sa-video-link {
  color: inherit;
  text-decoration: none;
}

.sa-video-link:hover strong {
  color: #e04f16;
  text-decoration: underline;
}

.sa-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fef6ee;
  color: #b93815;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.sa-creator-modal-card {
  max-width: 960px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.sa-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sa-modal-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sa-creator-table-wrap {
  max-height: 60vh;
  overflow: auto;
}

.sa-player-card {
  max-width: 720px;
}

.sa-player-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  margin-top: 12px;
}

.sa-metric-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.sa-metric-group {
  background: var(--card);
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 14px 16px;
}

.sa-metric-group h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.sa-metric-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sa-metric-items div span {
  display: block;
  font-size: 11px;
  color: #a1a1aa;
}

.sa-metric-items div strong {
  font-size: 15px;
}

.sa-live-table {
  font-size: 12px;
}

@media (max-width: 1100px) {
  .kpi-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Booking detail top bar */
.bk-detail-header-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.bk-detail-header-wrap .bk-detail-tabs {
  width: 100%;
  overflow: visible;
}

.bk-tab-filters-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.bk-tab-filters-row .bk-tab-filters {
  margin-left: 0;
  padding: 0;
}

.bk-detail-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bk-detail-kpi-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bk-detail-kpi-grid-second {
  margin-top: 12px;
}

.chart-card-title-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bk-ring-title,
.vp-metric-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.bk-metric-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  vertical-align: middle;
}

.bk-metric-help-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #e4e4e7;
  color: #52525b;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  line-height: 1;
  user-select: none;
}

.bk-metric-help:hover .bk-metric-help-icon,
.bk-metric-help:focus-visible .bk-metric-help-icon {
  background: #d4d4d8;
  color: #27272a;
}

.bk-help-portal {
  position: fixed;
  z-index: 10000;
  max-width: min(300px, calc(100vw - 16px));
  padding: 10px 12px;
  border-radius: 10px;
  background: #18181b;
  color: #fafafa;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 400;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  white-space: normal;
  text-align: left;
}

.bk-help-portal[hidden] {
  display: none !important;
}

.sla-engine-page {
  width: 100%;
  max-width: none;
}

.sla-groups-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sla-group-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sla-group-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e4e4e7;
}

.sla-group-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #18181b;
}

.sla-group-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #71717a;
}

.sla-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.sla-rule-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sla-rule-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sla-rule-label {
  font-size: 13px;
  font-weight: 600;
  color: #52525b;
  min-width: 72px;
}

.sla-rule-input {
  width: 96px;
}

.sla-rule-unit {
  font-size: 13px;
  color: #71717a;
  font-weight: 500;
}

.sla-rule-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #52525b;
}

.sla-engine-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.sla-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  background: #18181b;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.sla-toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

.vp-metric-icon.amber { background: #fef3c7; color: #d97706; }
.vp-metric-icon.sky { background: #e0f2fe; color: #0284c7; }
.vp-metric-icon.cyan { background: #cffafe; color: #0891b2; }
.vp-metric-icon.violet { background: #ede9fe; color: #7c3aed; }

.sa-video-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.sa-video-tabs-row {
  width: 100%;
}

.sa-video-filters-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.sa-video-filters-row .sa-filters {
  margin-left: 0;
}

.demo-table-bordered,
.cr-table-bordered,
.pc-table-bordered,
.fn-table-bordered {
  border: 1px solid #e4e4e7;
  border-collapse: collapse;
}

.demo-table-bordered th,
.demo-table-bordered td,
.cr-table-bordered th,
.cr-table-bordered td,
.pc-table-bordered th,
.pc-table-bordered td,
.fn-table-bordered th,
.fn-table-bordered td,
.sa-table-bordered th,
.sa-table-bordered td {
  border: 1px solid #e4e4e7;
}

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

/* legacy - replaced by bk-detail-header-wrap */
.bk-detail-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.bk-detail-top-bar .bk-detail-tabs {
  flex: 1;
  min-width: 280px;
}

.bk-detail-top-bar .bk-tab-filters {
  margin-left: auto;
  padding: 0;
}

.bk-kpi-warn {
  color: #dc2626;
  font-weight: 700;
}

/* Shop analytics filter layout */
.sa-page-head {
  align-items: flex-start;
}

.sa-page-head .sa-filters {
  margin-left: auto;
  justify-content: flex-end;
}

.sa-filter-date-field .filter-date,
.sa-filter-date-field .sa-filter-date {
  min-width: 240px;
  justify-content: flex-start;
}

.sa-filter-product-field .sa-product-select,
.sa-filter-product-field .select-native {
  max-width: 180px;
  min-width: 140px;
}

.sa-filter-date-wide {
  min-width: 280px;
}

.sa-table-bordered {
  border: 1px solid #e4e4e7;
  border-collapse: collapse;
}

.sa-table-bordered th,
.sa-table-bordered td {
  border: 1px solid #e4e4e7;
}

.sa-video-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sa-video-top .sa-video-tabs {
  margin-bottom: 0;
}

.sa-video-top .sa-filters {
  margin-left: auto;
}

/* Product config */
.pc-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #e4e4e7;
  margin-bottom: 16px;
}

.pc-tab {
  border: none;
  background: transparent;
  padding: 10px 4px;
  font-weight: 600;
  color: #71717a;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.pc-tab.active {
  color: #e04f16;
  border-bottom-color: #e04f16;
}

.pc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pc-card {
  padding: 0;
  overflow: hidden;
}

.pc-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pc-data-table th,
.pc-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f4f4f5;
  text-align: left;
  vertical-align: middle;
}

.pc-data-table th {
  background: #fafafa;
  font-size: 12px;
  color: #71717a;
}

.pc-muted {
  font-size: 12px;
  color: #a1a1aa;
}

.pc-config-inputs {
  display: flex;
  gap: 8px;
}

.pc-config-inputs .input {
  width: 72px;
}

.pc-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 13px;
  color: #71717a;
}

.pc-thumb {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f5;
  border-radius: 8px;
  font-size: 20px;
}

.pc-thumb-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: #f4f4f5;
}

.pc-notice-banner {
  padding: 10px 16px;
  margin-bottom: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
}

.pc-sku-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
}

.pc-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pc-status-active { background: #dcfce7; color: #16a34a; }
.pc-status-stopped { background: #fee2e2; color: #dc2626; }
.pc-status-draft { background: #f4f4f5; color: #71717a; }

.pc-sku-modal-card {
  max-width: 900px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.pc-bulk-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fef6ee;
  border: 1px solid #fdead7;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

.pc-sku-modal-table-wrap {
  max-height: 50vh;
  overflow: auto;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
}

/* Finance report */
.fn-page-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.fn-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.fn-kpi-grid .kpi-card {
  min-width: 0;
}

.fn-kpi-grid .kpi-val {
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  word-break: break-word;
}

.kpi-grid-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.fn-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fn-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.fn-balance-card {
  padding: 16px 18px;
  min-width: 0;
  overflow: hidden;
}

.fn-balance-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.fn-balance-links {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #71717a;
  flex-wrap: wrap;
  align-items: center;
}

.fn-balance-shop {
  margin: 4px 0 0;
  font-size: 12px;
  color: #71717a;
}

.fn-balance-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: #52525b;
}

.fn-balance-body {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  overflow: hidden;
}

.fn-section-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 10px 16px;
  border-bottom: 1px solid #f4f4f5;
  font-size: 13px;
}

.fn-section-label {
  min-width: 0;
  word-break: break-word;
}

.fn-section-value {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
  flex-shrink: 0;
}

.fn-section-emphasis .fn-section-label,
.fn-section-emphasis .fn-section-value {
  font-weight: 700;
}

.fn-section-muted {
  background: #fafafa;
}

.fn-section-muted .fn-section-label {
  padding-left: 20px;
  color: #71717a;
  font-size: 12px;
}

.fn-section-highlight {
  background: #f8fafc;
}

.fn-accounting-group {
  border-bottom: 1px solid #f4f4f5;
}

.fn-group-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.fn-group-toggle:hover {
  background: #f1f5f9;
}

.fn-group-toggle-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.fn-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  background: #fff;
  color: #52525b;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 2px;
}

.fn-group-text {
  min-width: 0;
}

.fn-group-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.fn-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #18181b;
}

.fn-group-ratio {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d4d4d8;
  background: #fff;
  font-size: 11px;
  color: #52525b;
}

.fn-group-hint {
  margin-top: 2px;
  font-size: 11px;
  color: #a1a1aa;
}

.fn-group-value {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fn-group-items.collapsed {
  display: none;
}

.fn-balance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fn-balance-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f4f4f5;
}

.fn-balance-table .fn-num {
  text-align: right;
  white-space: nowrap;
  font-weight: 600;
}

.fn-row-cogs td:first-child {
  font-size: 12px;
  color: #52525b;
}

.fn-row-highlight td {
  font-weight: 800;
  background: #fafafa;
}

.fn-positive { color: #16a34a; }
.fn-negative { color: #dc2626; }

.fn-fixed-panel {
  padding: 16px 18px;
  position: sticky;
  top: 16px;
}

.fn-info-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin: 10px 0;
}

/* Cảnh báo báo cáo còn thiếu nguồn chi phí — đỏ hơn .fn-info-box vì đây là
   thông tin ảnh hưởng tới việc đọc con số lợi nhuận. */
.fn-warn-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  color: #991b1b;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.fn-fixed-total {
  font-size: 13px;
  margin-bottom: 12px;
}

.fn-fixed-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.fn-amount-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fn-fixed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fn-fixed-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  font-size: 13px;
}

.fn-fixed-list li div:first-child {
  flex: 1;
}

.fn-fixed-list li span {
  display: block;
  color: #71717a;
  font-size: 12px;
}

.fn-fixed-actions {
  display: flex;
  gap: 4px;
}

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

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

  .fn-fixed-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .fn-kpi-grid,
  .kpi-grid-6 {
    grid-template-columns: 1fr;
  }
}

/* MeWork Chat */
.nav-unread-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mw-nav-unread {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mw-chat-main {
  min-height: 0;
}

.mw-chat-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 240px;
  gap: 0;
  overflow: hidden;
}

.mw-chat-list-panel,
.mw-chat-info {
  background: #fff;
  border-right: 1px solid #e4e4e7;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mw-chat-info {
  border-right: none;
  border-left: 1px solid #e4e4e7;
  min-height: 0;
  overflow: hidden;
}

.mw-chat-info-wide {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#mw-chat-info-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.mw-chat-list-head,
.mw-chat-info-head,
.mw-chat-thread-head {
  padding: 14px 16px;
  border-bottom: 1px solid #f4f4f5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mw-chat-thread-head {
  justify-content: space-between;
}

.mw-chat-thread-sub {
  font-size: 12px;
  color: #a1a1aa;
  margin-top: 2px;
}

.mw-chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.mw-chat-conv {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  flex: 1;
  min-width: 0;
}

.mw-chat-conv-wrap {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 12px;
  position: relative;
}

.mw-chat-conv-wrap:hover {
  background: #f8fafc;
}

.mw-chat-conv-wrap.active {
  background: #fef6ee;
}

.mw-chat-conv-wrap:hover .mw-chat-conv,
.mw-chat-conv-wrap.active .mw-chat-conv {
  background: transparent;
}

.mw-chat-conv-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
  padding-right: 4px;
}

.mw-chat-conv-more {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  opacity: 0;
  font-size: 16px;
  line-height: 1;
}

.mw-chat-conv-wrap:hover .mw-chat-conv-more,
.mw-chat-conv-wrap.active .mw-chat-conv-more {
  opacity: 1;
}

.mw-chat-conv-more:hover {
  background: #e4e4e7;
}

.mw-chat-conv-dropdown {
  right: 0;
  left: auto;
  min-width: 220px;
}

.mw-chat-conv-flags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.mw-chat-conv-flag {
  font-size: 11px;
  line-height: 1;
}

.mw-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fef6ee;
  color: #b93815;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mw-chat-avatar.group {
  font-size: 16px;
  background: #f3e8ff;
}

.mw-chat-conv-body {
  flex: 1;
  min-width: 0;
}

.mw-chat-conv-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.mw-chat-conv-top strong {
  font-size: 13px;
  color: #18181b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mw-chat-conv-time {
  font-size: 11px;
  color: #a1a1aa;
  flex-shrink: 0;
}

.mw-chat-conv-preview {
  display: block;
  font-size: 12px;
  color: #71717a;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mw-chat-unread {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 8px;
}

.mw-chat-thread {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fafafa;
  position: relative;
}

.mw-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mw-chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 100%;
  position: relative;
}

.mw-chat-msg.mine {
  flex-direction: row-reverse;
}

.mw-chat-msg.mine .mw-chat-msg-body {
  align-items: flex-end;
}

.mw-chat-msg.dm {
  max-width: 78%;
}

.mw-chat-msg.dm.mine {
  margin-left: auto;
}

.mw-chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e4e4e7;
  color: #52525b;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.mw-chat-msg-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mw-chat-msg-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
}

.mw-chat-msg-head-dm {
  justify-content: flex-start;
}

.mw-chat-msg.mine .mw-chat-msg-head-dm {
  justify-content: flex-end;
}

.mw-chat-msg-name {
  font-weight: 700;
  font-size: 13px;
}

.mw-chat-name-green { color: #16a34a; }
.mw-chat-name-orange { color: #ea580c; }
.mw-chat-name-blue { color: #e04f16; }
.mw-chat-name-purple { color: #7c3aed; }
.mw-chat-name-pink { color: #db2777; }

.mw-chat-msg-role {
  color: #a1a1aa;
  font-size: 12px;
}

.mw-chat-msg-dot {
  color: #d4d4d8;
}

.mw-chat-msg-time {
  font-size: 12px;
  color: #a1a1aa;
}

.mw-chat-msg-line {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.mw-chat-msg-text {
  font-size: 14px;
  line-height: 1.5;
  color: #18181b;
  word-break: break-word;
}

.mw-chat-msg-sent {
  font-size: 11px;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mw-chat-msg-flags {
  display: flex;
  gap: 8px;
}

.mw-chat-bubble {
  display: none;
}

.mw-chat-msg-author {
  display: none;
}

.mw-chat-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e4e4e7;
  background: #fff;
}

.mw-chat-compose-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.mw-chat-compose-input-wrap:focus-within {
  border-color: #f7b27a;
  box-shadow: 0 0 0 3px rgba(224, 79, 22, 0.08);
}

.mw-chat-compose-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  resize: none;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  min-height: 24px;
  max-height: 120px;
  background: transparent;
}

.mw-chat-compose-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #e04f16;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.mw-chat-compose-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mw-chat-compose-send svg {
  width: 18px;
  height: 18px;
}

.mw-chat-empty {
  padding: 24px 16px;
  text-align: center;
  color: #a1a1aa;
  font-size: 13px;
}

.mw-chat-members {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mw-chat-member {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mw-chat-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fef6ee;
  color: #b93815;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mw-chat-member strong {
  font-size: 13px;
  display: block;
}

.mw-chat-member-email {
  font-size: 11px;
  color: #a1a1aa;
}

@media (max-width: 1024px) {
  .mw-chat-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .mw-chat-info {
    display: none;
  }
}

@media (max-width: 768px) {
  .mw-chat-layout {
    grid-template-columns: 1fr;
  }

  .mw-chat-list-panel {
    display: none;
  }
}

/* MeWork Chat ? full feature UI */
.mw-chat-layout-full {
  grid-template-columns: 280px minmax(0, 1fr) 320px;
}

.mw-chat-layout-full.mw-chat-info-closed {
  grid-template-columns: 280px minmax(0, 1fr);
}

.mw-chat-list-panel .search-wrap {
  flex: none;
  min-width: 0;
  max-width: none;
  width: auto;
}

.mw-chat-head-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #52525b;
  flex-shrink: 0;
  padding: 0;
}

.mw-chat-head-btn svg {
  width: 18px;
  height: 18px;
}

.mw-chat-head-btn:hover {
  background: #f8fafc;
}

.mw-chat-head-btn.active {
  background: #fef6ee;
  color: #e04f16;
  border-color: #fdead7;
}

.mw-chat-head-btn-plus {
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.mw-chat-info-wide .mw-chat-info-head {
  font-size: 13px;
}

.mw-chat-list-head {
  justify-content: space-between;
}

.mw-chat-list-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mw-chat-filter-wrap {
  position: relative;
}

.mw-chat-filter-wrap .mw-chat-head-btn.active {
  background: #fef6ee;
  color: #e04f16;
  border-color: #fdead7;
}

.mw-chat-tag-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 6px;
}

.mw-chat-tag-filter-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.mw-chat-tag-filter-item:hover,
.mw-chat-tag-filter-item.on {
  background: #f4f4f5;
}

.mw-chat-list-search {
  margin: 0 12px 8px;
}

.mw-chat-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 8px;
  overflow: visible;
}

.mw-chat-filter-tab {
  border: 1px solid #e4e4e7;
  background: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  font: inherit;
}

.mw-chat-filter-tab.active {
  background: #e04f16;
  border-color: #e04f16;
  color: #fff;
}

.mw-chat-list-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #a1a1aa;
  letter-spacing: 0.04em;
  padding: 4px 8px 8px;
}

.mw-chat-conv-tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
  max-width: 100%;
}

.mw-chat-system-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3e8ff;
  color: #6b21a8;
  font-size: 12px;
  margin: 6px 0 8px;
  max-width: 100%;
}

.mw-chat-task-card {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  max-width: 520px;
}

.mw-chat-task-card-head {
  font-size: 12px;
  color: #71717a;
  margin-bottom: 6px;
}

.mw-chat-task-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
  margin-bottom: 8px;
  line-height: 1.4;
}

.mw-chat-task-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #71717a;
  margin-bottom: 10px;
}

.mw-chat-task-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
  font-size: 11px;
}

.mw-chat-task-badge.priority {
  background: #fef6ee;
  color: #b93815;
}

.mw-chat-task-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mw-chat-info-task-card {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fafafa;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.mw-chat-info-task-head {
  font-size: 11px;
  color: #a1a1aa;
  margin-bottom: 4px;
}

.mw-chat-info-task-title {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  line-height: 1.35;
}

.mw-chat-msg.task-msg .mw-chat-msg-body {
  max-width: 560px;
}

.mw-chat-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
}

.mw-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mw-tag-dot-gray { background: #a1a1aa; }
.mw-tag-dot-red { background: #ef4444; }
.mw-tag-dot-pink { background: #ec4899; }
.mw-tag-dot-purple { background: #8b5cf6; }
.mw-tag-dot-blue { background: #ef6820; }
.mw-tag-dot-orange { background: #f97316; }
.mw-tag-dot-green { background: #22c55e; }
.mw-tag-dot-cyan { background: #06b6d4; }

.mw-chat-thread-actions {
  display: flex;
  gap: 6px;
}

.mw-chat-msg-search-wrap {
  padding: 0 16px 8px;
  border-bottom: 1px solid #f4f4f5;
  background: #fff;
}

.mw-chat-msg-search.search-wrap {
  flex: none;
  min-width: 0;
  max-width: none;
  width: 100%;
  margin: 0;
}

.mw-chat-pinned-bar {
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: #713f12;
  margin-bottom: 8px;
}

.mw-chat-announcement {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

.mw-chat-announcement-card {
  border: 1px solid #fdba74;
  background: #fff7ed;
  border-radius: 12px;
  padding: 14px 20px;
  width: min(720px, 92%);
  text-align: center;
}

.mw-chat-announcement-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.mw-chat-announcement-text {
  font-size: 14px;
  color: #18181b;
}

.mw-chat-announcement-time {
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 6px;
}

.mw-chat-bubble-wrap {
  display: none;
}

.mw-chat-msg:hover .mw-chat-msg-toolbar,
.mw-chat-msg-toolbar.is-hovered,
.mw-chat-msg-toolbar.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mw-chat-msg-toolbar {
  position: relative;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  flex-shrink: 0;
}

.mw-chat-msg-quick {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
}

.mw-chat-react,
.mw-chat-msg-more {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
}

.mw-chat-react:hover,
.mw-chat-msg-more:hover {
  background: #f4f4f5;
}

.mw-chat-msg-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 20;
}

.mw-chat-msg-menu button {
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.mw-chat-msg-menu button:hover {
  background: #f4f4f5;
}

.mw-chat-msg-menu button.danger {
  color: #dc2626;
}

.mw-chat-msg-menu-divider {
  height: 1px;
  background: #f4f4f5;
  margin: 4px 0;
}

.mw-chat-msg-hidden {
  display: none !important;
}

.mw-chat-msg-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.mw-chat-msg-role {
  color: #a1a1aa;
}

.mw-chat-msg-flag {
  font-size: 10px;
  color: #71717a;
}

.mw-chat-msg-action {
  display: none;
}

.mw-chat-compose {
  flex-direction: column;
  gap: 8px;
}

.mw-chat-compose-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mw-chat-tool {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
}

.mw-chat-format {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #71717a;
  margin-left: 4px;
}

.mw-chat-compose-row {
  display: none;
}

.mw-chat-info-scroll {
  padding: 0 0 24px;
}

.mw-chat-reminder-create {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 10px 12px;
  border: 1px dashed #d4d4d8;
  border-radius: 10px;
  background: #fafafa;
  color: #52525b;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.mw-chat-reminder-create:hover {
  background: #f4f4f5;
}

.mw-chat-reminder-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
}

.mw-chat-reminder-date {
  font-size: 12px;
  font-weight: 700;
  color: #e04f16;
  margin-bottom: 4px;
}

.mw-chat-reminder-card {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.mw-chat-reminder-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mw-chat-reminder-bell {
  font-size: 14px;
}

.mw-chat-reminder-link {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mw-chat-reminder-del {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  padding: 2px;
}

.mw-chat-reminder-del:hover {
  opacity: 1;
}

.mw-chat-reminder-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: #a1a1aa;
  padding-left: 22px;
}

.mw-chat-reminder-repeat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mw-chat-avatar-edit {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
}

.mw-chat-avatar-edit-hint {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e4e4e7;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mw-chat-avatar-red { background: #fee2e2; color: #dc2626; }
.mw-chat-avatar-orange { background: #ffedd5; color: #ea580c; }
.mw-chat-avatar-green { background: #dcfce7; color: #16a34a; }
.mw-chat-avatar-blue { background: #fef6ee; color: #e04f16; }
.mw-chat-avatar-cyan { background: #cffafe; color: #0891b2; }
.mw-chat-avatar-purple { background: #f3e8ff; color: #7c3aed; }
.mw-chat-avatar-pink { background: #fce7f3; color: #db2777; }
.mw-chat-avatar-gray { background: #f4f4f5; color: #52525b; }

.mw-chat-avatar-preview {
  display: flex;
  justify-content: center;
  margin: 12px 0 16px;
}

.mw-color-swatch.on {
  border: 2px solid #18181b;
  box-shadow: 0 0 0 2px #fff inset;
}

.mw-chat-info-block-members {
  overflow: visible;
}

.mw-chat-member-more {
  width: 28px;
  height: 28px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #52525b;
  flex-shrink: 0;
}

.mw-chat-member-more:hover {
  background: #f4f4f5;
}

.mw-chat-member-dropdown {
  z-index: 30;
}

.mw-chat-member-note {
  display: block;
  padding: 10px 12px;
  font-size: 12px;
  color: #a1a1aa;
}

.mw-chat-info-block {
  border-bottom: 1px solid #f4f4f5;
}

.mw-chat-info-block summary {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #71717a;
  cursor: pointer;
  list-style: none;
}

.mw-chat-info-block summary::-webkit-details-marker {
  display: none;
}

.mw-chat-info-block > *:not(summary) {
  padding-left: 16px;
  padding-right: 16px;
}

.mw-chat-info-btn {
  margin: 0 16px 10px;
  width: calc(100% - 32px);
}

.mw-chat-info-list {
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mw-chat-info-item {
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mw-chat-info-meta {
  font-size: 11px;
  color: #a1a1aa;
}

.mw-chat-empty-sm {
  font-size: 12px;
  color: #a1a1aa;
  margin: 0 0 12px;
}

.mw-chat-info-profile {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 12px;
  position: relative;
}

.mw-chat-avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 14px;
}

.mw-chat-avatar.sm {
  width: 36px;
  height: 36px;
  font-size: 11px;
}

.mw-chat-info-menu-wrap {
  margin-left: auto;
  position: relative;
}

.mw-chat-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  padding: 6px;
}

.mw-chat-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.mw-chat-dropdown button:hover {
  background: #f4f4f5;
}

.mw-chat-dropdown button.danger {
  color: #dc2626;
}

.mw-chat-info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 12px;
}

.mw-chat-member-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 10px;
}

.mw-chat-member-search-row .input {
  flex: 1;
}

.mw-chat-leader-badge {
  display: inline-block;
  font-size: 10px;
  color: #b45309;
  margin-left: 4px;
}

.mw-chat-member {
  position: relative;
}

.mw-chat-member-body {
  flex: 1;
  min-width: 0;
}

.mw-chat-member-menu-wrap {
  position: relative;
}

.mw-chat-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
}

.mw-chat-member-avatar {
  position: relative;
}

.mw-chat-check {
  margin-left: auto;
  color: #e04f16;
  font-weight: 700;
}

.mw-chat-modal-card {
  width: min(480px, calc(100vw - 32px));
  max-height: 85vh;
  overflow-y: auto;
}

.mw-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.mw-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.mw-chat-modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mw-chat-modal-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.mw-chat-modal-tab.active {
  background: #e04f16;
  border-color: #e04f16;
  color: #fff;
}

.mw-chat-member-pick-list {
  max-height: 280px;
  overflow-y: auto;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mw-chat-member-pick {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mw-chat-member-pick:hover,
.mw-chat-member-pick.on {
  background: #fef6ee;
}

.mw-chat-member-pick span strong {
  display: block;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

/* ---- Màn hình nhận lời mời (/invite/<token>) ---- */
.invite-summary {
  border: 1px solid #e9eaeb;
  border-radius: 12px;
  padding: 4px 16px;
  margin: 20px 0;
  background: #fafafa;
}

.invite-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f1;
}

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

.invite-summary-row span {
  color: #717680;
}

.invite-summary-row strong {
  color: #181d27;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.mw-chat-tags-suggest-label {
  font-size: 12px;
  font-weight: 600;
  margin: 12px 0 8px;
}

.mw-chat-tags-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mw-chat-tag-suggest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.mw-chat-tag-suggest.on {
  background: #fef6ee;
  border-color: #f7b27a;
}

.mw-chat-tags-selected {
  min-height: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #71717a;
}

.mw-chat-color-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.mw-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
}

.mw-color-red { background: #ef4444; }
.mw-color-orange { background: #f97316; }
.mw-color-green { background: #22c55e; }
.mw-color-blue { background: #ef6820; }
.mw-color-cyan { background: #06b6d4; }
.mw-color-purple { background: #8b5cf6; }
.mw-color-pink { background: #ec4899; }
.mw-color-gray { background: #a1a1aa; }

.mw-chat-custom-tag-row {
  display: flex;
  gap: 8px;
}

.mw-chat-add-member-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}

.mw-chat-loading {
  text-align: center;
  padding: 24px;
  color: #a1a1aa;
}

.mw-chat-rem-hint {
  font-size: 12px;
  color: #71717a;
  margin: -4px 0 12px;
}

.mw-chat-task-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mw-chat-pinned-sticky {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 4px 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mw-chat-pinned-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.mw-chat-pinned-jump {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  padding: 4px 0;
  color: #713f12;
}

.mw-chat-pinned-jump:hover .mw-chat-pinned-text {
  text-decoration: underline;
}

.mw-chat-pinned-icon {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
}

.mw-chat-pinned-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.mw-chat-pinned-unpin {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 6px;
}

.mw-chat-reply-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #f8fafc;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
}

.mw-chat-reply-accent {
  width: 3px;
  border-radius: 4px;
  background: #e04f16;
  flex-shrink: 0;
}

.mw-chat-reply-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}

.mw-chat-reply-body strong {
  color: #e04f16;
  font-size: 12px;
}

.mw-chat-reply-body span {
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mw-chat-reply-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #a1a1aa;
  line-height: 1;
}

.mw-chat-reply-quote {
  border-left: 3px solid #d4d4d8;
  padding-left: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #71717a;
}

.mw-chat-reply-quote strong {
  display: block;
  color: #52525b;
}

.mw-chat-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.mw-chat-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ede9fe;
  font-size: 12px;
  color: #5b21b6;
}

.mw-chat-mention {
  color: #7c3aed;
  font-weight: 600;
}

.mw-chat-thread-link {
  border: none;
  background: transparent;
  color: #7c3aed;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
  text-align: left;
}

.mw-chat-thread-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 100%);
  height: 100%;
  background: #fff;
  border-left: 1px solid #e4e4e7;
  z-index: 20;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.08);
}

.mw-chat-thread-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f4f4f5;
}

.mw-chat-thread-root {
  padding: 12px 16px;
  border-bottom: 1px solid #f4f4f5;
  background: #fafafa;
}

.mw-chat-thread-root-label {
  font-size: 11px;
  font-weight: 700;
  color: #a1a1aa;
  margin-bottom: 4px;
}

.mw-chat-thread-root-author {
  font-size: 12px;
  color: #71717a;
  margin-bottom: 6px;
}

.mw-chat-thread-root-text {
  font-size: 14px;
  margin-bottom: 8px;
}

.mw-chat-thread-replies {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mw-chat-thread-reply {
  display: flex;
  gap: 8px;
  font-size: 13px;
}

.mw-chat-thread-compose {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e4e4e7;
}

.mw-chat-thread-compose .input {
  flex: 1;
}

.mw-chat-msg-reply {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  opacity: 0.7;
}

.mw-chat-format-divider {
  width: 1px;
  height: 18px;
  background: #e4e4e7;
  margin: 0 4px;
}

.mw-chat-tool svg {
  width: 18px;
  height: 18px;
  display: block;
}

.mw-chat-fmt b,
.mw-chat-fmt i,
.mw-chat-fmt u {
  font-size: 13px;
}

.mw-chat-compose-hint {
  font-size: 11px;
  color: #a1a1aa;
  text-align: right;
  margin-top: 4px;
}

.mw-chat-mention-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 16px;
  right: 16px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-height: 180px;
  overflow-y: auto;
  z-index: 25;
}

.mw-chat-compose {
  position: relative;
}

.mw-mention-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.mw-mention-item:hover {
  background: #f4f4f5;
}

.mw-chat-share-preview {
  background: #f8fafc;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.mw-chat-share-search {
  margin-bottom: 12px;
}

.mw-chat-info-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mw-chat-pin-item {
  border: 1px solid #f4f4f5;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fafafa;
  gap: 6px;
}

.mw-chat-info-jump {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  padding: 0;
  color: #3f3f46;
}

.mw-chat-info-jump:hover .mw-chat-info-jump-text {
  color: #e04f16;
  text-decoration: underline;
}

.mw-chat-info-jump-icon {
  flex-shrink: 0;
  line-height: 1.3;
}

.mw-chat-info-jump-text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mw-chat-pin-action {
  align-self: flex-start;
  font-size: 11px;
  padding: 0;
}

.bk-koc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bk-koc-metric-card {
  min-height: 72px;
  align-items: center;
}

.bk-koc-metric-body {
  min-width: 0;
}

.bk-koc-metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bk-koc-metric-total {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: #ddd6fe;
}

.bk-koc-metric-total .bk-koc-metric-icon {
  background: #ede9fe;
  color: #6d28d9;
}

.bk-koc-metric-total .vp-metric-val {
  color: #5b21b6;
}

.bk-koc-metric-approved {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #bbf7d0;
}

.bk-koc-metric-approved .bk-koc-metric-icon {
  background: #dcfce7;
  color: #16a34a;
}

.bk-koc-metric-approved .vp-metric-val {
  color: #15803d;
}

.bk-koc-metric-pending {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}

.bk-koc-metric-pending .bk-koc-metric-icon {
  background: #fef3c7;
  color: #d97706;
}

.bk-koc-metric-pending .vp-metric-val {
  color: #b45309;
}

.bk-koc-metric-rejected {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fecaca;
}

.bk-koc-metric-rejected .bk-koc-metric-icon {
  background: #fee2e2;
  color: #dc2626;
}

.bk-koc-metric-rejected .vp-metric-val {
  color: #b91c1c;
}

.bk-koc-metric-booked {
  background: linear-gradient(135deg, #fef6ee 0%, #fef6ee 100%);
  border-color: #fdead7;
}

.bk-koc-metric-booked .bk-koc-metric-icon {
  background: #fef6ee;
  color: #e04f16;
}

.bk-koc-metric-booked .vp-metric-val {
  color: #b93815;
}

/* Tên sản phẩm TikTok rất dài. Xếp mỗi pill một dòng và cắt bằng "…" để cột
   không nở ra chèn sang cột bên cạnh; tên đầy đủ xem ở tooltip. */
.bk-koc-product-pills {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 220px;
  max-width: 220px;
  overflow: hidden;
}

.bk-koc-product-pill {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.bk-koc-detail-card {
  width: min(640px, 92vw);
}

.bk-koc-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 4px 0 14px;
}

.bk-koc-detail-grid > div {
  min-width: 0;
}

.bk-koc-detail-grid dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6b7280;
}

.bk-koc-detail-grid dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: #111827;
  overflow-wrap: anywhere;
}

.bk-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.bk-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.bk-delivery-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.bk-order-delivery-sent {
  background: #fef6ee;
  color: #b93815;
}

.bk-order-delivery-delivering {
  background: #fef3c7;
  color: #b45309;
}

.bk-order-delivery-success {
  background: #dcfce7;
  color: #15803d;
}

.bk-order-delivery-failed {
  background: #fee2e2;
  color: #b91c1c;
}

.bk-order-delivery-cancelled {
  background: #f4f4f5;
  color: #52525b;
}

.bk-order-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.bk-koc-row-actions {
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
}

.bk-order-delivery-filter {
  min-width: 168px;
}

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

@media (max-width: 1024px) {
  .mw-chat-layout-full {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .mw-chat-layout-full.mw-chat-info-closed {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

/* Livestream module */
.ls-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ls-filter-row .vp-list-search {
  flex: 1 1 260px;
  min-width: 220px;
}

.ls-filter-row .select-native {
  min-width: 180px;
}

.ls-filter-row .date-picker-anchor {
  margin-left: auto;
}

.ls-filter-plain {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.ls-sessions-toolbar-row {
  margin-bottom: 4px;
}

.ls-sessions-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.ls-list-page {
  gap: 28px;
}

.ls-list-filter-row {
  margin-bottom: 8px;
}

.ls-list-kpi-grid {
  gap: 24px;
  margin-top: 8px;
}

.ls-list-kpi-card {
  border: 1px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.ls-list-kpi-body {
  flex: 1;
  text-align: left;
}

.ls-list-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  color: #334155;
  flex-shrink: 0;
}

.ls-list-kpi-run {
  background: #fef6ee;
  border-color: #fdead7;
}

.ls-list-kpi-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ls-list-kpi-gmv {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.ls-list-kpi-ready {
  background: #fff7ed;
  border-color: #fed7aa;
}

.ls-modal-half {
  width: min(960px, 50vw);
  max-width: 960px;
}

.ls-form-section-card {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: #fff;
}

.ls-form-section-card:last-child {
  margin-bottom: 0;
}

.ls-form-section-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
}

.ls-page-head-with-range {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ls-page-head-range {
  margin-left: auto;
}

.ls-kpi-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ls-kpi-dual-card {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 18px 20px;
  background: #fff;
}

.ls-kpi-dual-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
}

.ls-kpi-dual-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ls-kpi-dual-label {
  display: block;
  font-size: 12px;
  color: #71717a;
  margin-bottom: 4px;
}

.ls-kpi-dual-target,
.ls-kpi-dual-current,
.ls-kpi-dual-pct {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
  color: #18181b;
}

.ls-kpi-dual-pct {
  color: #15803d;
}

.ls-kpi-dual-track {
  height: 12px;
  border-radius: 999px;
  background: #e4e4e7;
  overflow: hidden;
}

.ls-kpi-dual-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.ls-sessions-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ls-sessions-filters {
  flex: 1 1 520px;
}

.ls-sessions-table-card {
  margin-top: 4px;
}

.ls-view-toggle-right {
  display: flex;
  gap: 0;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.ls-view-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #52525b;
  background: #fff;
  text-decoration: none;
  border-right: 1px solid #e4e4e7;
}

.ls-view-tab:last-child {
  border-right: 0;
}

.ls-view-tab.on {
  background: #15803d;
  color: #fff;
}

.ls-event-upcoming {
  background: #fef6ee;
  color: #b93815;
}

.ls-event-live {
  background: #fef3c7;
  color: #b45309;
}

.ls-event-completed {
  background: #f0fdf4;
  color: #15803d;
}

.ls-event-cancelled {
  background: #fef2f2;
  color: #dc2626;
}

.ls-readiness-pill.mid2 {
  background: #fef9c3;
  color: #a16207;
}

.bk-product-list {
  max-height: 280px;
  overflow-y: auto;
}

/* KPI cards ? shadcn-like spacing */
.kpi-grid.kpi-grid-4 {
  gap: 16px;
}

.ls-list-section {
  margin-top: 4px;
}

.ls-list-section .section-head {
  margin-bottom: 12px;
}

.ls-table-wrap {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.ls-campaign-table {
  border-collapse: separate;
  border-spacing: 0;
}

.ls-col-center {
  text-align: center !important;
}

.ls-campaign-table thead th {
  background: #fafafa;
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
  text-transform: none;
  padding: 14px 18px;
  border-bottom: 1px solid #e4e4e7;
  white-space: nowrap;
}

.ls-campaign-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid #f4f4f5;
  vertical-align: middle;
}

.ls-campaign-table tbody tr:last-child td {
  border-bottom: none;
}

.ls-campaign-table tbody tr:hover {
  background: #fafafa;
}

.ls-campaign-table .link-name {
  font-weight: 600;
}

.ls-cell-muted {
  color: #71717a;
  font-size: 13px;
  white-space: nowrap;
}

.ls-action-col {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}

.ls-campaign-table .vp-row-actions {
  justify-content: flex-end;
  gap: 6px;
}

.ls-staff-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 260px;
}

.ls-staff-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  font-size: 12px;
  font-weight: 500;
  color: #3f3f46;
}

.ls-staff-more {
  background: #eef2ff;
  border-color: #e0e7ff;
  color: #4338ca;
}

.ls-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.ls-leaderboard-card {
  padding: 16px;
}

.ls-leaderboard-table .ls-handle {
  color: var(--muted);
  font-size: 12px;
}

.ls-status-pill,
.ls-session-pill {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.ls-status-planning { background: #e4e4e7; color: #52525b; }
.ls-status-running { background: #fef6ee; color: #b93815; }
.ls-status-completed { background: #dcfce7; color: #15803d; }
.ls-status-cancelled { background: #fee2e2; color: #dc2626; }
.ls-status-archived { background: #f4f4f5; color: #71717a; }

.ls-cancelled-banner {
  padding: 12px 16px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
}

.ls-session-preparing { background: #fef3c7; color: #b45309; }
.ls-session-ready { background: #fef6ee; color: #b93815; }
.ls-session-live { background: #fee2e2; color: #dc2626; }
.ls-session-completed { background: #dcfce7; color: #15803d; }
.ls-session-archived { background: #f4f4f5; color: #71717a; }

.ls-readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.ls-ready-l0 { background: #fee2e2; color: #b91c1c; }
.ls-ready-l1 { background: #ffedd5; color: #c2410c; }
.ls-ready-l2 { background: #fef9c3; color: #a16207; }
.ls-ready-l3 { background: #dcfce7; color: #15803d; }

.ls-readiness-bar {
  height: 8px;
  border-radius: 999px;
  background: #e4e4e7;
  overflow: hidden;
  margin: 8px 0;
}

.ls-readiness-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.ls-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ls-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ls-panel {
  padding: 16px;
}

.ls-session-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f4f4f5;
  font-size: 13px;
}

.ls-session-row:last-child {
  border-bottom: none;
}

.ls-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ls-alert {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
}

.ls-kpi-note {
  font-size: 12px;
  color: var(--muted);
  margin: -8px 0 0;
}

.ls-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ls-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 12px;
  font-weight: 600;
}

.ls-empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

.ls-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.ls-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ls-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.ls-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ls-modal-card {
  max-width: 520px;
}

.ls-modal-card-wide {
  width: min(880px, calc(100vw - 32px));
  max-width: 880px;
  padding: 0;
}

.ls-modal-card-wide .vp-modal-head {
  padding: 20px 24px 12px;
}

.ls-form-scroll {
  max-height: min(66vh, 620px);
  overflow-y: auto;
  padding-top: 4px;
}

.ls-modal-card-wide .demo-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #f4f4f5;
}

.ls-view-toggle .btn.on {
  background: var(--primary);
  color: #fff;
}

.ls-calendar {
  padding: 16px;
}

.ls-calendar-head,
.ls-calendar-body {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.ls-cal-day-head {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--muted);
}

.ls-cal-cell {
  min-height: 80px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ls-cal-event {
  display: block;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.ls-cal-event.low { background: #fee2e2; }
.ls-cal-event.mid { background: #ffedd5; }
.ls-cal-event.mid2 { background: #fef9c3; }
.ls-cal-event.high { background: #dcfce7; }

.ls-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

.ls-cal-month-label {
  font-size: 15px;
  min-width: 120px;
  text-align: center;
}

.ls-cal-nav-btn[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

.ls-cal-day-num {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  margin-bottom: 4px;
}

.ls-cal-cell-empty {
  background: #fafafa;
  border-style: dashed;
}

.ls-session-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ls-missing-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}

.ls-koc-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 500;
}

.ls-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ls-kpi-source {
  font-size: 13px;
  color: var(--muted);
}

.ls-offer-skip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}

.ls-danger-zone {
  padding: 16px;
  border: 1px solid #fecaca;
  background: #fff1f2;
}

/* Campaign overview ? analytics merged */
.ls-overview-page {
  gap: 40px;
}

.ls-completed-banner {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 500;
}

.ls-overview-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 16px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fafafa;
  font-size: 13px;
  color: #52525b;
}

.ls-range-label {
  font-weight: 600;
  color: #18181b;
}

.ls-kpi-sync-note {
  margin: 4px 0 0;
  font-size: 12px;
  color: #0f766e;
}

.ls-analytics-metric-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ls-analytics-group-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #3f3f46;
}

.ls-table-footer {
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
}

.ls-sticky-head thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  box-shadow: inset 0 -1px 0 #e4e4e7;
}

.ls-tt-badge,
.ls-src-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ls-tt-unlinked {
  background: #f4f4f5;
  color: #52525b;
}

.ls-tt-suggested {
  background: #fef3c7;
  color: #92400e;
}

.ls-tt-linked {
  background: #d1fae5;
  color: #065f46;
}

.ls-tt-conflict {
  background: #fee2e2;
  color: #991b1b;
}

.ls-src-manual {
  background: #fef6ee;
  color: #b93815;
}

.ls-src-tiktok {
  background: #ecfdf5;
  color: #047857;
}

.ls-src-mixed {
  background: #faf5ff;
  color: #6b21a8;
}

.ls-tiktok-link-card {
  margin-bottom: 4px;
}

.ls-tt-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
}

.ls-tt-strip-linked {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.ls-tt-strip-suggest {
  background: #fffbeb;
  border-color: #fde68a;
}

.ls-tt-strip-unlinked {
  background: #fafafa;
}

.ls-tt-strip-text {
  color: #3f3f46;
  font-weight: 500;
}

.ls-tt-strip-hint {
  color: #71717a;
  font-size: 11px;
  margin-left: auto;
}

.ls-tt-strip-hint.ls-tt-readonly {
  color: #a1a1aa;
}

.ls-tt-strip-lock {
  font-size: 12px;
  opacity: 0.7;
}

.ls-tt-manage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
}

.ls-tt-manage-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 200px;
}

.ls-tt-manage-main strong {
  font-size: 13px;
}

.ls-tt-manage-suggest {
  flex: 1;
  font-size: 12px;
  color: #52525b;
}

.ls-tt-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.ls-tt-manage-deny {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid #e4e4e7;
  background: #f9fafb;
  font-size: 13px;
  color: #52525b;
}

.ls-tt-manage-deny p {
  margin: 0;
}

.ls-tt-manage-icon {
  flex-shrink: 0;
  font-size: 16px;
}

.ls-modal-card-wide {
  max-width: 560px;
}

.ls-modal-tiktok-slot {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #e4e4e7;
}

.ls-modal-tiktok-label {
  font-size: 12px;
  font-weight: 700;
  color: #3f3f46;
  margin-bottom: 8px;
}

.ls-modal-tiktok-slot .ls-tt-strip {
  margin-top: 0;
}

.ls-modal-tiktok-slot .ls-tt-manage {
  margin-bottom: 0;
}

.ls-tiktok-link-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ls-tiktok-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ls-tiktok-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0 0 14px;
  font-size: 13px;
}

.ls-tiktok-meta dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ls-tiktok-meta dd {
  margin: 4px 0 0;
  color: #18181b;
}

.ls-tiktok-meta code {
  font-size: 11px;
  word-break: break-all;
}

.ls-tiktok-suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 13px;
}

.ls-tiktok-suggest-label {
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
}

.ls-tiktok-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ls-match-score {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.ls-match-score.high {
  background: #d1fae5;
  color: #065f46;
}

.ls-match-score.mid {
  background: #fef3c7;
  color: #92400e;
}

.ls-match-score.low {
  background: #f4f4f5;
  color: #52525b;
}

.ls-tiktok-modal {
  max-width: 820px;
  width: calc(100vw - 32px);
}

.ls-tiktok-modal-intro {
  margin: 0 0 8px;
  font-size: 14px;
}

.ls-tt-id {
  color: #71717a;
}

.ls-kpi-source-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
}

@media (max-width: 720px) {
  .ls-tiktok-meta {
    grid-template-columns: 1fr;
  }
}

.ls-overview-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ls-campaign-detail-page .ls-overview-block + .ls-overview-block {
  margin-top: 4px;
}

.ls-campaign-detail-page .ls-metrics-block {
  margin-top: 20px;
  padding-top: 8px;
}

.ls-campaign-detail-page .ls-kpi-bar-surface + .ls-overview-block,
.ls-campaign-detail-page .ls-overview-block:has(.ls-kpi-bar-surface) + .ls-metrics-block {
  margin-top: 24px;
}

.ls-campaign-detail-page .ls-overview-block .ls-block-head {
  margin-top: 8px;
  padding-top: 8px;
}

.ls-rank-triple-section .ls-block-head {
  margin-top: 0;
  padding-top: 0;
}

.ls-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ls-block-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.ls-section-hint {
  font-size: 12px;
  color: #71717a;
}

.ls-section-head-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px 0;
}

.ls-analytics-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ls-analytics-metrics-headline {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.ls-overview-analytics-link {
  margin-top: 12px;
}

.ls-metric-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  cursor: help;
}

.ls-metric-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #e4e4e7;
  color: #52525b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.ls-metric-help-tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  bottom: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #18181b;
  color: #fafafa;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 80;
}

.ls-metric-help:hover .ls-metric-help-tip,
.ls-metric-help:focus .ls-metric-help-tip,
.ls-metric-help:focus-within .ls-metric-help-tip {
  opacity: 1;
  visibility: visible;
}

.ls-metric-help:hover::before,
.ls-metric-help:focus::before,
.ls-metric-help:focus-within::before {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #18181b;
  z-index: 81;
  pointer-events: none;
}

.ls-mockup-ops-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 16px;
  align-items: stretch;
}

.ls-mockup-ops-top .ls-surface-card {
  overflow: visible;
}

.ls-ops-alert-panel {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px 18px;
}

.ls-ops-alert-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #991b1b;
  text-transform: uppercase;
}

.ls-ops-alert-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ls-ops-alert-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ls-ops-alert-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #18181b;
  margin-bottom: 4px;
}

.ls-ops-alert-card-body {
  font-size: 12px;
  line-height: 1.45;
}

.ls-ops-alert-card-body.danger {
  color: #dc2626;
}

.ls-ops-alert-card-body.warn {
  color: #d97706;
}

.ls-ops-alert-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

.ls-ops-right-panel {
  padding: 0 !important;
  overflow: visible;
}

.ls-ops-right-inner {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) 1.4fr;
  gap: 0;
  min-height: 100%;
}

.ls-ops-readiness-col {
  padding: 18px 16px;
  border-right: 1px solid #f4f4f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  overflow: visible;
  position: relative;
}

.ls-ops-readiness-label {
  font-size: 12px;
  font-weight: 700;
  color: #3f3f46;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ls-ops-readiness-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ls-ops-readiness-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.ls-ops-readiness-big {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.ls-ops-readiness-big.low {
  color: #dc2626;
}

.ls-ops-readiness-big.mid {
  color: #d97706;
}

.ls-ops-readiness-big.high {
  color: #0f766e;
}

.ls-ops-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ls-ops-chip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f4f4f5;
  font-size: 11px;
  color: #52525b;
}

.ls-ops-upcoming-col {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ls-ops-upcoming-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.ls-ops-view-all {
  font-size: 12px;
  font-weight: 600;
  color: #e04f16;
  text-decoration: none;
}

.ls-ops-view-all:hover {
  text-decoration: underline;
}

.ls-upcoming-wire {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ls-upcoming-wire-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ls-upcoming-wire-label {
  font-size: 12px;
  font-weight: 600;
  color: #4338ca;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ls-readiness-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.ls-readiness-pill.low {
  background: #fee2e2;
  color: #dc2626;
}

.ls-readiness-pill.mid {
  background: #ffedd5;
  color: #c2410c;
}

.ls-readiness-pill.high {
  background: #d1fae5;
  color: #047857;
}

.ls-analytics-metric-group.ls-metric-tone-revenue {
  border: 1px solid #d1fae5;
  border-left: 4px solid #0f766e;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f6f7fb;
}

.ls-analytics-metric-group.ls-metric-tone-cost {
  border: 1px solid #ffedd5;
  border-left: 4px solid #d97706;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f6f7fb;
}

.ls-analytics-metric-group.ls-metric-tone-ops {
  border: 1px solid #fef6ee;
  border-left: 4px solid #e04f16;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f6f7fb;
}

.ls-analytics-metric-group.ls-metric-tone-funnel {
  border: 1px solid #ede9fe;
  border-left: 4px solid #7c3aed;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f6f7fb;
}

.ls-ops-alert-panel .ls-alert {
  font-size: 12px;
  line-height: 1.45;
}

.ls-readiness-gauge {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 4px;
}

.ls-readiness-ring {
  --ls-ready-pct: 0;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(#0f766e calc(var(--ls-ready-pct) * 1%), #e4e4e7 0);
  position: relative;
}

.ls-readiness-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: #fff;
}

.ls-readiness-pct {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 700;
  color: #0f766e;
}

.ls-readiness-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #71717a;
}

.ls-upcoming-compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ls-upcoming-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f4f4f5;
}

.ls-upcoming-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ls-upcoming-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ls-upcoming-date {
  font-size: 11px;
  color: #71717a;
}

.ls-upcoming-score {
  text-align: right;
  min-width: 72px;
}

.ls-upcoming-score strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.ls-upcoming-score span {
  font-size: 10px;
  font-weight: 600;
}

.ls-upcoming-score.low strong,
.ls-upcoming-score.low span {
  color: #dc2626;
}

.ls-upcoming-score.mid strong,
.ls-upcoming-score.mid span {
  color: #d97706;
}

.ls-upcoming-score.high strong,
.ls-upcoming-score.high span {
  color: #15803d;
}

.ls-campaign-progress-card {
  padding: 4px 0 0;
}

.ls-campaign-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #52525b;
}

.ls-campaign-progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e4e4e7;
  overflow: hidden;
}

.ls-campaign-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.ls-trend-chart-card {
  padding-bottom: 8px;
}

.ls-trend-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}

.ls-trend-chart-legend-inline {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #52525b;
  font-weight: 500;
}

.ls-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 4px;
}

.ls-legend-gmv {
  background: #38bdf8;
}

.ls-legend-ads,
.ls-legend-orders {
  background: #fb923c;
  border-radius: 999px;
  height: 3px;
  width: 14px;
  align-self: center;
}

.ls-surface-card {
  background: #f6f7fb;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  padding: 16px 18px;
}

.ls-surface-card.ls-table-wrap,
.ls-surface-card.ls-trend-chart-card {
  padding: 0;
  overflow: hidden;
}

.ls-surface-card.ls-trend-chart-card .chart-card-head,
.ls-surface-card.ls-trend-chart-card .chart-card-body {
  background: #fff;
  margin: 12px;
  border-radius: 12px;
}

.ls-surface-card.ls-table-wrap .ls-section-head-inline,
.ls-surface-card.ls-table-wrap .ls-table-scroll {
  background: #fff;
  margin: 12px;
  border-radius: 12px;
}

.ls-surface-card.ls-table-wrap .ls-section-head-inline {
  margin-bottom: 0;
  padding: 14px 16px 8px;
}

.ls-surface-card.ls-table-wrap .ls-table-scroll {
  margin-top: 8px;
  padding-bottom: 4px;
}

.ls-kpi-ring-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ls-kpi-bar-surface {
  overflow: visible;
  padding: 16px;
  background: #fef6ee;
  border: 1px solid #fdead7;
}

.ls-kpi-bar-surface .ls-v7-bar-card {
  background: #fff;
}

.ls-rank-triple-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ls-rank-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ls-rank-col-head {
  margin-bottom: 12px;
}

.ls-rank-col-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
  line-height: 1.45;
}

.ls-rank-col-hint {
  display: block;
  font-size: 11px;
  color: #71717a;
  line-height: 1.4;
}

.ls-gmv-leaderboard-compact {
  padding: 12px;
  gap: 8px;
}

.ls-gmv-leaderboard-compact .ls-gmv-leader-item {
  grid-template-columns: 28px 32px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 12px;
}

.ls-gmv-leaderboard-compact .ls-gmv-leader-avatar,
.ls-gmv-leaderboard-compact .ls-gmv-leader-thumb {
  width: 32px;
  height: 32px;
  font-size: 16px;
}

.ls-gmv-leaderboard-compact .ls-gmv-leader-name {
  font-size: 13px;
}

.ls-gmv-leaderboard-compact .ls-gmv-leader-meta {
  font-size: 11px;
}

.ls-gmv-leaderboard-compact .ls-gmv-leader-val {
  font-size: 13px;
}

.ls-gmv-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
}

.ls-gmv-leader-item {
  display: grid;
  grid-template-columns: 28px 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #eef0f4;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ls-gmv-leader-item:hover {
  border-color: #e2e5ec;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ls-gmv-leader-item.is-top-1 {
  border-left: 3px solid #f59e0b;
}

.ls-gmv-leader-item.is-top-2 {
  border-left: 3px solid #94a3b8;
}

.ls-gmv-leader-item.is-top-3 {
  border-left: 3px solid #d97706;
}

.ls-gmv-leader-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #71717a;
  background: #f4f4f5;
}

.ls-gmv-leader-item.is-top-1 .ls-gmv-leader-pos {
  color: #b45309;
  background: #fff7ed;
}

.ls-gmv-leader-item.is-top-2 .ls-gmv-leader-pos {
  color: #475569;
  background: #f8fafc;
}

.ls-gmv-leader-item.is-top-3 .ls-gmv-leader-pos {
  color: #c2410c;
  background: #fff7ed;
}

.ls-gmv-leader-avatar,
.ls-gmv-leader-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid #eef0f4;
}

.ls-gmv-leader-thumb {
  font-size: 18px;
  background: #fafafa;
}

.ls-gmv-leader-main {
  min-width: 0;
}

.ls-gmv-leader-name {
  display: block;
  font-size: 14px;
  color: #18181b;
}

.ls-gmv-leader-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #71717a;
}

.ls-gmv-leader-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #ececf4;
  overflow: hidden;
}

.ls-gmv-leader-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #e04f16);
}

.ls-gmv-leader-item.is-gold .ls-gmv-leader-bar i {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

.ls-gmv-leader-item.is-silver .ls-gmv-leader-bar i {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.ls-gmv-leader-item.is-bronze .ls-gmv-leader-bar i {
  background: linear-gradient(90deg, #fb923c, #ea580c);
}

.ls-gmv-leader-val {
  font-size: 15px;
  color: #18181b;
  white-space: nowrap;
}

.ls-gmv-leader-empty {
  padding: 8px 4px;
}

.ls-v7-readiness-table th:not(:first-child),
.ls-v7-readiness-table td:not(:first-child) {
  text-align: center;
}

.ls-ring-card {
  background: #fff;
  border-color: #e4e4e7;
}

.ls-page-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ls-readiness-badge-label {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.ls-session-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ls-session-rank-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 14px 16px;
}

.ls-session-rank-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
}

.ls-session-rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ls-session-rank-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #f4f4f5;
}

.ls-session-rank-item.is-top {
  background: linear-gradient(135deg, #fef6ee 0%, #fff 100%);
  border-color: #f7b27a;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.ls-session-rank-item.is-top .ls-session-rank-pos {
  background: #e04f16;
  color: #fff;
}

.ls-session-rank-item.is-top .ls-session-rank-val {
  color: #b93815;
  font-size: 16px;
}

.ls-session-rank-pos {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: #e4e4e7;
  color: #52525b;
}

.ls-session-rank-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ls-session-rank-val {
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
  white-space: nowrap;
}

.ls-metric-card {
  padding: 14px 16px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ls-metric-card-revenue {
  border-color: #6ee7b7;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.ls-metric-card-cost {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
}

.ls-metric-card-ops {
  border-color: #f7b27a;
  background: linear-gradient(180deg, #fef6ee 0%, #fff 100%);
}

.ls-metric-card-funnel {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%);
}

.ls-rank-table th.num-cell,
.ls-rank-table td.num-cell {
  text-align: center;
}

.ls-rank-table .ls-rank-col-pos {
  width: 48px;
}

.ls-rank-table .ls-rank-col-sessions {
  width: 120px;
}

.ls-rank-table .ls-rank-col-orders {
  width: 88px;
}

.ls-rank-table .ls-rank-col-gmv {
  width: 140px;
  min-width: 120px;
}

.ls-sort-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ls-sort-th:hover {
  color: #0f766e;
}

.ls-session-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ls-session-time-sub {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6366f1;
}

.ls-session-time-sub em {
  font-style: italic;
  color: #6366f1;
}

.ls-session-time-sub svg {
  flex-shrink: 0;
  color: #818cf8;
}

.ls-campaign-modal {
  width: min(720px, 92vw);
  max-width: 720px;
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.ls-campaign-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f4f4f5;
}

.ls-campaign-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
}

.ls-campaign-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
}

.ls-campaign-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ls-campaign-modal-section {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 18px 20px;
  background: #fff;
}

.ls-campaign-modal-section-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
  color: #18181b;
}

.ls-campaign-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.ls-campaign-form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ls-campaign-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ls-campaign-field-full {
  grid-column: 1 / -1;
}

.ls-campaign-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #52525b;
}

.ls-campaign-hint {
  font-size: 11px;
  color: #a1a1aa;
  line-height: 1.4;
}

.ls-campaign-textarea {
  min-height: 88px;
  resize: vertical;
}

.ls-campaign-textarea-sm {
  min-height: 64px;
}

.ls-campaign-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #f4f4f5;
  background: #fff;
}

.ls-campaign-modal .input,
.ls-campaign-modal .select-native,
.ls-campaign-modal .ls-campaign-textarea {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.ls-campaign-label {
  font-weight: 600;
}

.ls-campaign-btn-cancel {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 0;
  width: auto;
  line-height: 1.25;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #3f3f46;
}

.ls-campaign-btn-cancel:hover {
  background: #e4e4e7;
}

.ls-campaign-btn-submit {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 0;
  width: auto;
  line-height: 1.25;
}

.ls-session-modal {
  width: min(680px, 94vw);
  max-width: 680px;
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.ls-session-modal-head,
.ls-session-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
}

.ls-session-modal-head {
  border-bottom: 1px solid #f4f4f5;
}

.ls-session-modal-foot {
  justify-content: flex-end;
  border-top: 1px solid #f4f4f5;
}

.ls-session-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ls-session-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

.ls-session-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.ls-session-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ls-session-field-full {
  grid-column: 1 / -1;
}

.ls-session-label {
  font-size: 12px;
  font-weight: 600;
  color: #52525b;
}

.ls-session-readonly {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
  font-size: 13px;
  color: #3f3f46;
}

.ls-session-input-icon {
  position: relative;
}

.ls-session-input-icon .input {
  padding-right: 36px;
}

.ls-session-input-icon svg {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #a1a1aa;
  pointer-events: none;
}

.ls-session-time-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ls-session-time-range .ls-session-input-icon {
  flex: 1;
}

.ls-session-time-dash {
  color: #a1a1aa;
}

.ls-session-input-suffix {
  position: relative;
}

.ls-session-input-suffix span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #71717a;
}

.ls-session-input-suffix .input {
  padding-right: 48px;
}

.ls-session-textarea {
  min-height: 72px;
  resize: vertical;
}

.ls-session-time-input {
  font-size: 14px;
  padding-right: 36px;
}

.ls-session-btn-cancel {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  color: #3f3f46;
  white-space: nowrap;
  min-width: 0;
  width: auto;
  line-height: 1.25;
}

.ls-session-btn-cancel:hover {
  background: #e4e4e7;
  color: #27272a;
}

.ls-session-btn-submit {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 0;
  width: auto;
  line-height: 1.25;
}

.ls-session-tiktok-slot {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f4f4f5;
}

.ls-session-modal .bk-product-trigger {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.ls-support-staff-picker {
  position: relative;
}

.ls-support-staff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.ls-support-staff-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 12px;
}

.ls-support-staff-tag i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--tag-color, #ef6820);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.ls-support-staff-tag button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #71717a;
}

.ls-support-staff-dropdown {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  max-height: 180px;
  overflow-y: auto;
}

.ls-support-staff-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.ls-support-staff-option:hover,
.ls-support-staff-option.selected {
  background: #f4f4f5;
}

.ls-tt-modal-section {
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.ls-tt-modal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.ls-tt-modal-logo {
  font-size: 16px;
}

.ls-tt-modal-warn {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  margin-bottom: 12px;
}

.ls-tt-modal-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: #71717a;
}

.ls-tt-modal-dropdown {
  margin-top: 8px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.ls-tt-modal-dropdown-title {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e4e4e7;
}

.ls-tt-modal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #f4f4f5;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.ls-tt-modal-option:hover {
  background: #f8fafc;
}

.ls-tt-modal-option-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ls-tt-modal-option-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 11px;
  color: #52525b;
}

.ls-tt-modal-linked {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.ls-tt-modal-linked-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #18181b;
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ls-tt-modal-linked-main {
  flex: 1;
  min-width: 0;
}

.ls-tt-modal-linked-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ls-tt-modal-linked-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 600;
}

.ls-tt-modal-suggest-block {
  padding: 14px;
  border-radius: 10px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.ls-tt-modal-suggest-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 10px;
}

.ls-tt-modal-suggest-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 8px;
}

.ls-tt-modal-suggest-note {
  margin: 0 0 12px;
  font-size: 11px;
  color: #6366f1;
}

.ls-tt-modal-suggest-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ls-tt-modal-link-now {
  background: #6366f1;
  border-color: #6366f1;
}

@media (max-width: 720px) {
  .ls-campaign-form-grid,
  .ls-campaign-form-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ls-session-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Campaign detail ? tabs & page polish */
.ls-campaign-detail-page {
  max-width: 100%;
}

.ls-detail-page-head {
  margin-bottom: 4px;
}

.ls-detail-tabs-wrap {
  margin-bottom: 8px;
}

.ls-detail-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.ls-detail-tab {
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #71717a !important;
  background: transparent !important;
  white-space: nowrap;
}

.ls-detail-tab:hover {
  color: #3f3f46 !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

.ls-detail-tab.on {
  color: #18181b !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.ls-overview-page.ls-campaign-detail-page {
  gap: 28px;
}

.ls-campaign-detail-page .ls-overview-block {
  margin: 0;
}

.ls-campaign-detail-page .ls-block-title {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.ls-campaign-detail-page .ls-surface-card {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ls-sessions-page .ls-sessions-table-card,
.ls-sessions-page .ls-calendar {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.ls-sessions-view-toggle {
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 3px;
}

.ls-sessions-view-toggle .ls-view-tab {
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
  text-decoration: none;
}

.ls-sessions-view-toggle .ls-view-tab.on {
  background: #fff;
  color: #18181b;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.ls-analytics-page .ls-analytics-range-bar {
  background: #f6f7fb;
  border-color: #e4e4e7;
}

.ls-analytics-page .chart-card {
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.ls-product-rank-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.ls-product-rank-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f4f4f5;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
}

.ls-product-rank-id {
  font-size: 11px;
  margin-top: 2px;
  word-break: break-all;
}

.ls-product-rank-table .ls-rank-col-orders {
  width: 100px;
}

.ls-product-rank-table .ls-rank-col-gmv {
  width: 140px;
}

.ls-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ls-metric-src {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.ls-metric-card-tiktok {
  border-color: #99f6e4;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
}

.ls-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
  line-height: 1.2;
}

.ls-kpi-row .kpi-card {
  border: 1px solid #e4e4e7;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ls-chart-grid {
  gap: 16px;
}

.ls-chart-grid .chart-card {
  border: 1px solid #e4e4e7;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.ls-analytics-table-wrap {
  padding-bottom: 4px;
}

.ls-table-scroll {
  overflow-x: auto;
  padding: 0 4px 12px;
}

.ls-role-chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  font-size: 11px;
  font-weight: 600;
  color: #52525b;
}

.ls-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ls-ops-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.ls-ops-stats strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.ls-kpi-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.ls-kpi-tag.ok {
  background: #dcfce7;
  color: #15803d;
}

.ls-kpi-tag.bad {
  background: #fee2e2;
  color: #b91c1c;
}

@media (max-width: 1100px) {
  .ls-list-layout,
  .ls-two-col,
  .ls-kpi-grid,
  .ls-analytics-metrics,
  .ls-mockup-ops-grid {
    grid-template-columns: 1fr;
  }
  .ls-ops-right-inner {
    grid-template-columns: 1fr;
  }
  .ls-ops-readiness-col {
    border-right: 0;
    border-bottom: 1px solid #f4f4f5;
  }
  .ls-kpi-dual-grid {
    grid-template-columns: 1fr;
  }
  .ls-kpi-dual-stats {
    grid-template-columns: 1fr;
  }
  .ls-kpi-ring-grid,
  .ls-session-rank-grid,
  .ls-rank-triple-grid,
  .ls-rank-dual-grid {
    grid-template-columns: 1fr;
  }
  .ls-page-head-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .ls-ops-grid {
    grid-template-columns: 1fr;
  }

  .ls-analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- MeAffiliate demo --------------------------------------------------- */
.aff-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.aff-toolbar .search-wrap {
  flex: 1;
  min-width: 200px;
}

.aff-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.aff-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.aff-koc-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.aff-koc-cell button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.aff-koc-cell button:hover .aff-koc-name {
  text-decoration: underline;
}

.aff-koc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.aff-koc-meta {
  min-width: 0;
}

.aff-koc-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aff-koc-handle {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aff-table-scroll {
  overflow: auto;
  max-width: 100%;
}

.aff-table-scroll .data-table th,
.aff-table-scroll .data-table td {
  white-space: nowrap;
}

.aff-table-scroll .aff-bio-cell,
.aff-table-scroll .aff-dist-cell,
.aff-table-scroll .aff-note-cell {
  white-space: normal;
}

.aff-warehouse-scroll .aff-warehouse-table {
  min-width: 2280px;
}

.aff-warehouse-scroll .aff-bio-cell {
  min-width: 200px;
  max-width: 240px;
}

.aff-warehouse-scroll .aff-dist-cell {
  min-width: 148px;
  width: 148px;
  max-width: 168px;
}

.aff-warehouse-scroll .aff-dist-cell .aff-dist-line {
  min-width: 0;
}

.aff-table-scroll .aff-sticky-left {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 #f4f4f5;
}

.aff-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 64px 16px;
  text-align: center;
  color: var(--muted);
}

.aff-empty svg {
  opacity: 0.45;
}

.aff-collection-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
}

.aff-collection-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.aff-collection-card button.aff-collection-open {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.aff-collection-card h4 {
  margin: 0 0 2px;
  font-size: 15px;
}

.aff-collection-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.aff-source-pill {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #f4f4f5;
  color: #3f3f46;
}

.aff-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  justify-content: flex-end;
}

.aff-detail-overlay.hidden {
  display: none;
}

.aff-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}

.aff-detail-panel {
  position: relative;
  width: min(520px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.aff-detail-head {
  padding: 20px;
  border-bottom: 1px solid #f4f4f5;
  background: #fafafa;
}

.aff-detail-head-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.aff-detail-head .aff-koc-avatar {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.aff-detail-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.aff-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.aff-detail-bio {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.aff-detail-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.aff-detail-section {
  margin-bottom: 20px;
}

.aff-detail-section h4 {
  margin: 0 0 12px;
  font-size: 14px;
}

.aff-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
}

.aff-stat-grid label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.aff-stat-grid strong {
  font-size: 14px;
  font-weight: 600;
}

.aff-bar-row {
  margin-bottom: 8px;
}

.aff-bar-row-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 4px;
}

.aff-bar-track {
  height: 6px;
  border-radius: 999px;
  background: #f4f4f5;
  overflow: hidden;
}

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

.aff-filter-panel-wrap {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  justify-content: flex-end;
}

.aff-filter-panel-wrap.hidden {
  display: none;
}

.aff-filter-panel {
  position: relative;
  width: min(420px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.aff-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f4f4f5;
}

.aff-filter-body {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
}

.aff-filter-foot {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #f4f4f5;
}

.aff-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aff-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.aff-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
}

.aff-collection-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.aff-collection-pick:hover {
  background: #fafafa;
}

.aff-collection-pick input {
  flex-shrink: 0;
}

.aff-collection-pick span {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.aff-collection-pick em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.aff-campaign-card {
  max-width: 520px;
}

.aff-campaign-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0 16px;
}

.aff-campaign-products-field .bk-tiktok-panel {
  z-index: 5;
}

.aff-campaign-pick {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  margin-bottom: 8px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.aff-campaign-pick:hover {
  background: #fafafa;
}

.aff-campaign-pick.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
}

.aff-campaign-pick strong {
  display: block;
  font-size: 14px;
}

.aff-campaign-pick span {
  font-size: 12px;
  color: var(--muted);
}

body.aff-overlay-open {
  overflow: hidden;
}

/* ---- MeAffiliate managed creator list ---------------------------------- */
.aff-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border, #e4e4e7);
  margin-top: 4px;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.aff-shop-collection .aff-tabs {
  margin-top: 8px;
  margin-bottom: 24px;
}

.aff-shop-collection .aff-toolbar {
  margin-bottom: 24px;
}

.aff-shop-collection .aff-table-scroll,
.aff-shop-collection .aff-managed-scroll {
  margin-top: 4px;
}

.aff-shop-collection .aff-managed-table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.aff-address-cell {
  white-space: normal;
  min-width: 160px;
  max-width: 220px;
  font-size: 13px;
}

.aff-shop-pagination {
  margin-top: 20px;
}

.aff-tag-picker {
  position: relative;
}

.aff-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  white-space: nowrap;
}

.aff-back-link svg {
  flex-shrink: 0;
}

.aff-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  color: var(--muted, #71717a);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -1px;
}

.aff-tab:hover {
  color: var(--text, #18181b);
}

.aff-tab.active {
  color: var(--primary, #6366f1);
  border-bottom-color: var(--primary, #6366f1);
}

.aff-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f4f4f5;
  color: var(--muted, #71717a);
  font-size: 11px;
  font-weight: 700;
}

.aff-tab.active .aff-tab-count {
  background: var(--primary, #6366f1);
  color: #fff;
}

/* status pills */
.aff-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.aff-st-approved {
  background: #dcfce7;
  color: #15803d;
}
.aff-st-pending {
  background: #fef9c3;
  color: #a16207;
}
.aff-st-rejected {
  background: #fee2e2;
  color: #b91c1c;
}
.aff-st-blocked {
  background: #e4e4e7;
  color: #52525b;
}
.aff-st-sync-waiting {
  background: #fef6ee;
  color: #b93815;
}
.aff-st-sync-failed {
  background: #ffe4e6;
  color: #be123c;
}
.aff-sync-error {
  margin: 4px 0 0;
  max-width: 220px;
  font-size: 11px;
  line-height: 1.35;
  color: #e11d48;
}
.aff-sync-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid #fdead7;
  border-radius: 10px;
  background: #fef6ee;
  color: #1e3a8a;
  font-size: 13px;
}
.aff-sync-banner-spin {
  font-size: 16px;
  animation: aff-spin 1.2s linear infinite;
}
@keyframes aff-spin {
  to { transform: rotate(360deg); }
}
.aff-sync-locked {
  font-size: 12px;
  white-space: nowrap;
}

/* tag chips */
.aff-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  margin: 2px 4px 0 0;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary, #6366f1);
  font-size: 11px;
  font-weight: 600;
}

/* managed table */
.aff-managed-table {
  border-collapse: separate;
  border-spacing: 0;
}

.aff-managed-table td,
.aff-managed-table th {
  vertical-align: top;
}

.aff-managed-scroll .aff-col-check {
  left: 0;
  width: 44px;
  min-width: 44px;
  text-align: center;
}

.aff-managed-scroll .aff-col-creator {
  left: 44px;
  min-width: 240px;
  max-width: 260px;
}

.aff-managed-scroll .aff-col-creator.aff-col-creator-first {
  left: 0;
}

.aff-managed-scroll .aff-sticky-right {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -1px 0 0 #f4f4f5;
}

.aff-managed-scroll .aff-col-actions {
  min-width: 96px;
  text-align: center;
}

.aff-creator-cell {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  white-space: normal;
}

.aff-creator-meta {
  min-width: 0;
}

.aff-creator-name {
  border: none;
  background: none;
  padding: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #18181b);
  cursor: pointer;
  text-align: left;
}

.aff-creator-name:hover {
  color: var(--primary, #6366f1);
  text-decoration: underline;
}

.aff-creator-sub {
  font-size: 12px;
  color: var(--muted, #71717a);
}

.aff-creator-link {
  font-size: 12px;
  color: var(--primary, #6366f1);
}

.aff-creator-tags {
  margin-top: 2px;
}

.aff-note-cell {
  white-space: normal;
  max-width: 160px;
  font-size: 13px;
}

.aff-bio-cell {
  white-space: normal;
  max-width: 220px;
  font-size: 12px;
  color: var(--muted, #71717a);
}

.aff-dist-cell {
  white-space: normal;
  min-width: 130px;
}

.aff-dist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aff-dist-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.aff-dist-line b {
  font-weight: 600;
}

.aff-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fef6ee;
  color: #b93815;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.aff-sync-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef6820;
  animation: aff-pulse 1s infinite;
}

@keyframes aff-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

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

.aff-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e4e4e7);
  border-radius: 10px;
  background: #fafafa;
}

.aff-bulk-count {
  font-size: 13px;
  font-weight: 600;
}

.aff-addkoc-card {
  max-width: 560px;
  width: 100%;
}

.aff-edit-koc-card {
  max-width: 760px;
  width: calc(100vw - 48px);
}

.aff-edit-koc-head {
  margin-bottom: 4px;
}

.aff-edit-koc-head h3 {
  margin: 0 0 6px;
}

.aff-edit-form-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 8px 0 4px;
}

.aff-edit-koc-card .ps-form-row-2 {
  gap: 16px;
}

.aff-edit-koc-card .aff-tag-picker-field {
  margin: 0;
}

.aff-import-koc-card {
  max-width: 640px;
  width: calc(100vw - 48px);
}

.aff-import-textarea {
  min-height: 120px;
  resize: vertical;
}

.aff-import-result {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
}

.aff-confirm-card {
  max-width: 420px;
}

.aff-find-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.aff-find-toolbar .search-wrap {
  flex: 1;
  min-width: 280px;
}

.aff-find-actions {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.aff-btn-compact {
  white-space: nowrap;
  width: auto;
  flex-shrink: 0;
}

.aff-filter-panel {
  width: min(560px, 100%);
}

.aff-filter-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.aff-filter-section h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
}

.aff-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aff-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  user-select: none;
}

.aff-chip.active {
  border-color: var(--primary);
  background: #fef6ee;
  color: var(--primary);
}

.aff-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.aff-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.aff-collection-create {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.aff-collection-create .input {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.aff-collection-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.aff-add-koc-compact {
  width: auto;
  flex-shrink: 0;
}

.aff-detail-foot {
  padding: 16px 20px;
  border-top: 1px solid #f4f4f5;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Layout trang Tin nhắn Affiliate vừa khít màn hình */
body.aff-messages-page .page-scroll {
  overflow: hidden !important;
  height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
}

body.aff-messages-page .page-pad {
  padding: 16px 24px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aff-msg-page-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 12px;
}

.aff-msg-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.aff-msg-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  height: 100%;
  flex: 1;
  min-height: 0;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.aff-msg-list {
  border-right: 1px solid #e4e4e7;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
}

.aff-msg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid #f4f4f5;
  flex-shrink: 0;
}

.aff-msg-tabs button {
  border: 0;
  background: #f4f4f5;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.aff-msg-tabs button.active {
  background: #fef6ee;
  color: var(--primary);
  font-weight: 600;
}

.aff-msg-search-wrap {
  padding: 8px 12px;
  border-bottom: 1px solid #f4f4f5;
  flex-shrink: 0;
}

.aff-msg-search-wrap .input-sm {
  height: 34px;
  font-size: 12.5px;
  border-radius: 8px;
}

.aff-msg-threads-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.aff-msg-threads-scroll::-webkit-scrollbar,
.aff-msg-bubbles::-webkit-scrollbar {
  width: 6px;
}

.aff-msg-threads-scroll::-webkit-scrollbar-thumb,
.aff-msg-bubbles::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.aff-msg-threads-scroll::-webkit-scrollbar-track,
.aff-msg-bubbles::-webkit-scrollbar-track {
  background: transparent;
}

.aff-msg-thread {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #f8fafc;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.aff-msg-thread:hover,
.aff-msg-thread.active {
  background: #fef6ee;
}

.aff-msg-thread.active strong {
  color: var(--primary);
}

.aff-msg-thread-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aff-msg-thread-meta strong {
  font-size: 13px;
  color: #181d27;
}

.aff-msg-thread-meta em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aff-msg-unread {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.aff-msg-avatar {
  width: 34px;
  height: 34px;
  font-size: 11.5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.aff-msg-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
}

.aff-msg-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #f4f4f5;
  background: #fff;
  flex-shrink: 0;
}

.aff-msg-bubbles {
  flex: 1;
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  background: #f8fafc;
}

.aff-msg-row {
  display: flex;
  width: 100%;
}

.aff-msg-row-in {
  justify-content: flex-start;
}

.aff-msg-row-out {
  justify-content: flex-end;
}

.aff-msg-bubble-wrap {
  max-width: 72%;
  display: flex;
  flex-direction: column;
}

.aff-msg-row-in .aff-msg-bubble-wrap {
  align-items: flex-start;
}

.aff-msg-row-out .aff-msg-bubble-wrap {
  align-items: flex-end;
}

.aff-msg-bubble {
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

/* Tin nhắn từ Creator - căn trái */
.aff-msg-in {
  background: #ffffff;
  color: #181d27;
  border: 1px solid #e2e8f0;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Tin nhắn từ Shop/Nhân sự gửi đi - căn phải */
.aff-msg-out {
  background: linear-gradient(135deg, #ef6820 0%, #e04f16 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 2px 5px rgba(224, 79, 22, 0.2);
}

.aff-msg-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11px;
}

.aff-msg-meta-in {
  justify-content: flex-start;
  color: #64748b;
  padding-left: 2px;
}

.aff-msg-meta-out {
  justify-content: flex-end;
  color: #64748b;
  padding-right: 2px;
}

.aff-msg-staff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #b93815;
  background: #fef6ee;
  border: 1px solid #f9dbaf;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
}

.aff-msg-sender-tag {
  background: #e2e8f0;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
}

.aff-msg-dot {
  color: #cbd5e1;
  font-size: 10px;
}

.aff-msg-time {
  color: #64748b;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

@keyframes affMsgSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aff-msg-new {
  animation: affMsgSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.aff-msg-live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: default;
  user-select: none;
}

.aff-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: affPulse 2s infinite;
}

@keyframes affPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.aff-msg-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .aff-msg-layout {
    grid-template-columns: 1fr;
  }
}

.aff-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.bk-order-date-channel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .bk-order-date-channel-row {
    grid-template-columns: 1fr;
  }
}

/* ===== Livestream session detail V7 (mockup) ===== */
.ls-v7-session-page { max-width: none; width: 100%; }

/* Session header ? layout ?nh 2 */
.ls-v7-sh {
  background: #fff;
  border: 1px solid #e6e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.ls-v7-sh-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ls-v7-sh-main { min-width: 0; }
.ls-v7-sh-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ls-v7-sh-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 760;
  letter-spacing: -0.3px;
  color: #17192b;
}
.ls-v7-sh-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.ls-v7-sh-badge-ok { color: #167c3c; background: #edf9f1; }
.ls-v7-sh-badge-tt { color: #6546dc; background: #f2efff; }
.ls-v7-sh-badge-neutral { color: #6f7388; background: #f5f5f7; }
.ls-v7-sh-badge-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ls-v7-sh-badge-icon svg { width: 18px; height: 18px; }
.ls-v7-sh-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #6f7388;
  font-size: 13px;
}
.ls-v7-sh-meta strong { color: #17192b; font-weight: 700; }
.ls-v7-sh-dot { color: #9699a9; }

.ls-v7-sh-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef0f4;
}

.ls-v7-sh-fact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-width: min(100%, 280px);
  flex: 1 1 280px;
}

.ls-v7-sh-fact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b8ea0;
  flex-shrink: 0;
}

.ls-v7-sh-fact-val {
  font-size: 14px;
  font-weight: 600;
  color: #202235;
  line-height: 1.45;
}

.ls-v7-sh-fact-val strong {
  font-weight: 700;
  color: #17192b;
}

.ls-v7-sh-fact-muted {
  color: #8b8ea0;
  font-weight: 500;
}

.ls-v7-sh-fact-accent {
  color: #169447;
  font-weight: 700;
}
.ls-v7-sh-actions { display: flex; gap: 12px; flex: none; }
.ls-v7-sh-action {
  min-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #6f7388;
  font-size: 11px;
}
.ls-v7-sh-action-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e6e8f0;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #596078;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.ls-v7-sh-action-btn:hover {
  background: #fafaff;
  border-color: #cbc3ff;
  color: #6d4aff;
  transform: translateY(-1px);
}
.ls-v7-sh-action-btn svg { width: 18px; height: 18px; }

.ls-v7-sh-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(220px, 0.95fr) minmax(300px, 1.2fr);
  gap: 12px;
}
.ls-v7-sh-card {
  position: relative;
  min-height: 0;
  display: flex;
  padding: 14px 16px;
  border: 1px solid #e6e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(109, 74, 255, 0.025), rgba(255, 255, 255, 0.7));
  overflow: hidden;
}
.ls-v7-sh-card-actual {
  background: linear-gradient(135deg, rgba(22, 148, 71, 0.025), rgba(255, 255, 255, 0.7));
}
.ls-v7-sh-card-staff {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.025), rgba(255, 255, 255, 0.7));
}
.ls-v7-sh-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ls-v7-sh-card-icon svg { width: 20px; height: 20px; }
.ls-v7-sh-icon-purple { color: #6d4aff; background: #f2efff; }
.ls-v7-sh-icon-green { color: #169447; background: #edf9f1; }
.ls-v7-sh-icon-blue { color: #e04f16; background: #fef6ee; }
.ls-v7-sh-card-body {
  flex: 1;
  min-width: 0;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid #e6e8f0;
}
.ls-v7-sh-card-label {
  margin-bottom: 6px;
  color: #6f7388;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ls-v7-sh-sched-date { font-size: 14px; font-weight: 750; color: #17192b; }
.ls-v7-sh-sched-time {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.2px;
  color: #17192b;
}
.ls-v7-sh-duration-chip {
  width: fit-content;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f2efff;
  color: #6d4aff;
  font-size: 11px;
  font-weight: 700;
}
.ls-v7-sh-actual-range {
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.2px;
  color: #17192b;
}
.ls-v7-sh-actual-duration {
  margin-top: 4px;
  color: #169447;
  font-size: 16px;
  font-weight: 760;
}
.ls-v7-sh-actual-empty {
  margin-top: 4px;
  color: #6f7388;
  font-size: 13px;
  font-weight: 600;
}
.ls-v7-sh-delay-chip {
  width: fit-content;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #edf9f1;
  color: #168041;
  font-size: 11px;
  font-weight: 700;
}
.ls-v7-sh-delay-early { background: #fef6ee; color: #e04f16; }
.ls-v7-sh-staff-list { margin-top: 0; }
.ls-v7-sh-staff-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e6e8f0;
}
.ls-v7-sh-staff-row:last-child { border-bottom: 0; }
.ls-v7-sh-staff-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6d4aff;
}
.ls-v7-sh-staff-icon svg { width: 18px; height: 18px; }
.ls-v7-sh-staff-icon.is-blue { color: #e04f16; }
.ls-v7-sh-staff-icon.is-muted { color: #8a8ea0; }
.ls-v7-sh-staff-role { color: #6f7388; font-size: 14px; }
.ls-v7-sh-staff-name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #17192b;
  font-size: 14px;
  font-weight: 750;
}

/* legacy badge helpers still used in panels */
.ls-v7-badge { padding: 4px 10px; border-radius: 20px; font-weight: 700; font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.ls-v7-badge-ok { background: #eaf7ef; color: #18864b; }
.ls-v7-badge-link { background: #eef0fb; color: #4c4fbf; }
.ls-v7-badge-unlink { background: #f5f5f7; color: #72758a; }

.ls-v7-tabs { display: flex; gap: 6px; margin: 8px 0 16px; border-bottom: 1px solid #e8e9f1; overflow-x: auto; }
.ls-v7-tab { padding: 11px 14px; color: #72758a; font-weight: 650; white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; font-size: 14px; }
.ls-v7-tab:hover { color: #6d4aff; }
.ls-v7-tab.on { color: #6d4aff; border-bottom-color: #6d4aff; }

.ls-v7-panel { display: flex; flex-direction: column; gap: 16px; }
.ls-v7-group {
  background: #f7faff;
  border: 1px solid #edf3fa;
  border-radius: 16px;
  padding: 16px 18px 18px;
  overflow: visible;
}
.ls-v7-group .ls-v7-section-label { margin-top: 0; margin-bottom: 14px; }
.ls-v7-group .table-card,
.ls-v7-group .ls-v7-kpi,
.ls-v7-group .ls-ring-card,
.ls-v7-group .bk-ring-card,
.ls-v7-group .ls-v7-funnel-wrap,
.ls-v7-group .ls-v7-top-item,
.ls-v7-group .ls-v7-bar-card {
  background: #fff;
}
.ls-v7-group .table-card {
  overflow: visible;
}
.ls-v7-section-label { font-size: 12.5px; font-weight: 750; color: #6d4aff; letter-spacing: .03em; margin: 28px 2px 12px; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.ls-v7-section-label::before { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: #6d4aff; }
.ls-v7-panel > .ls-v7-section-label:first-child { margin-top: 0; }
.ls-v7-card-pad { padding: 18px 20px; }
.ls-v7-h2 { font-size: 15.5px; margin: 0 0 14px; }
.ls-v7-h3 { font-size: 14px; margin: 0 0 10px; display: flex; align-items: center; gap: 6px; }

.ls-v7-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ls-v7-kpi { padding: 16px; background: #fff; border: 1px solid #e8e9f1; border-radius: 10px; border-left: 4px solid #e8e9f1; }
.ls-v7-kpi-rev { border-left-color: #0284c7; }
.ls-v7-kpi-ops { border-left-color: #0284c7; }
.ls-v7-kpi-lbl { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #72758a; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .02em; }
.ls-v7-kpi-val { font-size: 22px; font-weight: 800; margin: 8px 0 2px; color: #202235; }
.ls-v7-kpi-sub { font-size: 12.5px; color: #72758a; min-height: 18px; }
.ls-v7-up { color: #18864b; font-weight: 650; }
.ls-v7-down { color: #d64545; font-weight: 650; }

.ls-v7-help { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; background: #eef0f5; color: #8b8ea3; font-size: 10px; border-radius: 50%; cursor: help; font-weight: 700; flex-shrink: 0; z-index: 2; }
.ls-v7-help:hover::after,
.ls-v7-help:focus::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  bottom: auto;
  right: auto;
  background: #202235;
  color: #fff;
  padding: 8px 10px;
  font-size: 11.5px;
  border-radius: 6px;
  width: 240px;
  text-align: left;
  z-index: 80;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  text-transform: none;
  letter-spacing: 0;
  pointer-events: none;
}
.ls-v7-help:hover::before,
.ls-v7-help:focus::before {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #202235;
  z-index: 81;
}

.ls-v7-funnel-wrap { display: flex; flex-direction: column; align-items: center; padding: 24px 20px; background: #fff; border-radius: 14px; border: 1px solid #e8e9f1; }
.ls-v7-funnel-inner { width: 100%; max-width: 920px; display: flex; flex-direction: column; align-items: center; }
.ls-v7-funnel-layer { display: flex; flex-direction: column; align-items: center; width: 100%; }
.ls-v7-funnel-shape {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 650;
  font-size: 13px;
  box-shadow: 0 2px 5px rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.04);
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.ls-v7-funnel-shape > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ls-v7-funnel-shape > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}
.ls-v7-funnel-sep { color: #72758a; font-size: 12px; font-weight: 700; margin: 6px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ls-v7-rate-tag { background: #f0f1f5; padding: 3px 10px; border-radius: 12px; color: #202235; font-weight: 700; border: 1px solid #e8e9f1; }
.ls-v7-fn-1 { background: #ede9fe; color: #4c1d95; }
.ls-v7-fn-2 { background: #ddd6fe; color: #4c1d95; }
.ls-v7-fn-3 { background: #c4b5fd; color: #4c1d95; }
.ls-v7-fn-4 { background: #a78bfa; color: #fff; }
.ls-v7-fn-5 { background: #8b5cf6; color: #fff; }
.ls-v7-fn-6 { background: #7c3aed; color: #fff; }
.ls-v7-fn-7 { background: #6d28d9; color: #fff; }

.ls-v7-subhead {
  margin: 14px 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #3f4254;
}
.ls-v7-ring-grid { margin-bottom: 8px; }
.ls-v7-bar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}
.ls-v7-bar-card {
  border: 1px solid #e8e9f1;
  border-radius: 14px;
  padding: 18px 20px 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.ls-v7-bar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ls-v7-bar-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ls-v7-bar-icon svg { width: 18px; height: 18px; }
.ls-v7-bar-icon.is-blue { background: #e8f0ff; color: #e04f16; }
.ls-v7-bar-icon.is-green { background: #e8f8ef; color: #169447; }
.ls-v7-bar-title {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3f4254;
}
.ls-v7-bar-body { text-align: center; }
.ls-v7-bar-pct {
  font-size: 34px;
  font-weight: 800;
  color: #17192b;
  line-height: 1.1;
  margin-bottom: 6px;
}
.ls-v7-bar-counts {
  font-size: 13px;
  color: #72758a;
  margin-bottom: 14px;
}
.ls-v7-bar-counts strong { color: #202235; }
.ls-v7-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e8e9f1;
  overflow: hidden;
}
.ls-v7-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e04f16, #4f7cff);
}
.ls-v7-bar-track i.is-green {
  background: linear-gradient(90deg, #169447, #22c55e);
}
.ls-v7-bar-remain {
  margin-top: 12px;
  font-size: 13px;
  color: #72758a;
}
.ls-v7-bar-remain strong { color: #202235; }
.ls-v7-ready-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.ls-v7-ready-block {
  background: #fafafe;
  border: 1px solid #e8e9f1;
  border-radius: 10px;
  padding: 14px 16px;
}
.ls-v7-ready-label {
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6f7388;
  margin-bottom: 8px;
}
.ls-v7-ready-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #9a9db0;
}
.ls-v7-ready-late {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #72758a;
  margin-bottom: 4px;
}
.ls-v7-ready-late b { color: #202235; }
.ls-v7-badge-late { background: #fff7e6; color: #d88a00; }
.ls-v7-prod-cell { display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.ls-v7-prod-name { font-size: 13.5px; font-weight: 700; color: #202235; line-height: 1.35; }
.ls-v7-prod-id { font-size: 11.5px; font-weight: 500; color: #9a9db0; }
.ls-v7-prod-scroll { position: relative; }
.ls-v7-prod-table { border-collapse: separate; border-spacing: 0; }
.ls-v7-sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  min-width: 220px;
  box-shadow: 4px 0 8px rgba(32, 34, 53, 0.04);
}
.ls-v7-prod-table thead .ls-v7-sticky-col {
  z-index: 3;
  background: #fafafe;
}
.ls-session-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f6fb;
  color: #6f7388;
  font-size: 13px;
  line-height: 1.45;
}

.ls-v7-statline { font-size: 14.5px; color: #72758a; margin-bottom: 12px; }
.ls-v7-statline b { color: #202235; font-size: 16px; }
.ls-v7-progress { height: 10px; background: #ececf4; border-radius: 10px; overflow: hidden; }
.ls-v7-progress i { display: block; height: 100%; background: #18864b; }
.ls-v7-table td, .ls-v7-table th { font-size: 13px; }

.ls-v7-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ls-v7-three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.ls-v7-top-list { display: flex; flex-direction: column; gap: 8px; }
.ls-v7-top-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fafafe; border-radius: 8px; border: 1px solid #e8e9f1; gap: 8px; }
.ls-v7-top-item.is-top { background: #fffcf0; border-color: #fde68a; box-shadow: 0 2px 6px rgba(245,158,11,.1); }
.ls-v7-top-item.is-top .ls-v7-rank { color: #f59e0b; font-size: 18px; }
.ls-v7-rank { font-weight: 800; color: #a7a9ba; font-size: 15px; width: 24px; flex-shrink: 0; }
.ls-v7-top-info { flex: 1; min-width: 0; }
.ls-v7-top-info b { display: block; font-size: 14px; color: #202235; }
.ls-v7-top-info small { color: #72758a; font-size: 11.5px; }
.ls-v7-top-val { font-weight: 800; font-size: 15px; color: #6d4aff; white-space: nowrap; }

.ls-v7-retention-body { text-align: center; padding: 20px 0; }
.ls-v7-retention-lbl { font-size: 13px; color: #72758a; text-transform: uppercase; font-weight: 650; }
.ls-v7-retention-val { font-size: 36px; font-weight: 800; margin: 10px 0; color: #202235; }
.ls-v7-engage { border-left: 4px solid #6d4aff; }

.ls-v7-table-ctrl { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 16px; flex-wrap: wrap; }
.ls-v7-search { width: min(280px, 100%); }

.ls-v7-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }
.ls-v7-filter { border: 1px solid #e8e9f1; background: #fff; border-radius: 18px; padding: 7px 16px; cursor: pointer; font-size: 13px; font-weight: 500; color: #202235; }
.ls-v7-filter.on { background: #efeaff; color: #6d4aff; border-color: #cfc4ff; font-weight: 650; }
.ls-v7-btn-add { background: none; border: 1px dashed #cfc4ff; color: #6d4aff; font-weight: 650; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.ls-v7-btn-add:hover { background: #fbfaff; }
.ls-v7-btn-add-group { border-style: solid; background: #fff; margin-top: 10px; }
.ls-v7-c-group { border: 1px solid #e8e9f1; border-radius: 12px; margin-bottom: 16px; background: #fff; overflow: hidden; }
.ls-v7-c-head { padding: 14px 18px; background: #fafafe; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e8e9f1; gap: 12px; flex-wrap: wrap; }
.ls-v7-c-head h3 { margin: 0; font-size: 14.5px; color: #202235; }
.ls-v7-c-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #e8e9f1; gap: 12px; flex-wrap: wrap; }
.ls-v7-c-item:last-child { border-bottom: none; }
.ls-v7-c-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ls-v7-c-check { width: 18px; height: 18px; cursor: pointer; accent-color: #18864b; }
.ls-v7-c-name { font-size: 14px; font-weight: 500; color: #202235; }
.ls-v7-c-name.is-done { text-decoration: line-through; color: #72758a; }
.ls-v7-c-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ls-v7-mw-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ls-v7-mw-link { background: #eef0fb; color: #4c4fbf; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; border: 1px solid #d9d0ff; }
.ls-v7-mw-create { background: #fff; color: #6d4aff; border: 1px solid #cfc4ff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.ls-v7-mw-create:hover { background: #efeaff; }
.ls-v7-mw-link-btn { background: #fff; color: #72758a; border: 1px dashed #d1d3e0; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.ls-v7-mw-link-btn:hover { color: #202235; border-color: #72758a; }
.ls-v7-icon-btn { background: none; border: none; color: #72758a; cursor: pointer; font-size: 14px; padding: 4px; border-radius: 4px; }
.ls-v7-icon-btn:hover { background: #eef0f5; color: #202235; }

@media (max-width: 1100px) {
  .ls-v7-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ls-v7-three { grid-template-columns: 1fr; }
  .ls-v7-sh-grid { grid-template-columns: 1fr 1fr; }
  .ls-v7-sh-card-staff { grid-column: 1 / -1; }
  .ls-v7-funnel-inner { max-width: 100%; }
}
@media (max-width: 760px) {
  .ls-v7-sh { padding: 16px 14px; }
  .ls-v7-sh-top { flex-direction: column; }
  .ls-v7-sh-actions { width: 100%; justify-content: flex-end; }
  .ls-v7-sh-grid { grid-template-columns: 1fr; }
  .ls-v7-sh-card-staff { grid-column: auto; }
  .ls-v7-sh-title { font-size: 20px; }
  .ls-v7-two { grid-template-columns: 1fr; }
  .ls-v7-grid-4 { grid-template-columns: 1fr; }
  .ls-v7-bar-grid,
  .ls-v7-ready-dual { grid-template-columns: 1fr; }
  .ls-v7-funnel-inner { max-width: 100%; min-width: 0; }
  .ls-v7-funnel-shape { font-size: 12px; padding: 0 12px; height: 40px; gap: 8px; flex-wrap: nowrap; }
  .ls-v7-group { padding: 12px 12px 14px; }
}

/* MeUp line tabs (icon + label, underline active) */
.meup-line-tabs-wrap {
  margin-bottom: 4px;
}

.meup-line-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  border-bottom: 1px solid #e8e9f1;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.meup-line-tabs::-webkit-scrollbar {
  display: none;
}

.meup-line-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #72758a;
  text-decoration: none;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  margin-bottom: -1px;
  flex-shrink: 0;
}

.meup-line-tab svg {
  flex-shrink: 0;
}

.meup-line-tab:hover {
  color: var(--primary);
}

.meup-line-tab.on {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Livestream report page */
.ls-report-page {
  display: flex;
  flex-direction: column;
  gap: 32px !important;
}

.ls-report-filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0;
}

.ls-report-kpi-grid {
  margin-top: 4px;
  margin-bottom: 12px;
}

.ls-report-table-card {
  overflow: hidden;
  margin-top: 8px;
}

.ls-report-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 20px 0;
  flex-wrap: wrap;
}

.ls-report-table-head-actions {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-left: auto;
}

.ls-report-object-tabs {
  border-bottom: none;
}

.ls-report-object-tabs .meup-line-tab {
  padding: 8px 14px;
  font-size: 13px;
}

.ls-report-table-body {
  padding: 16px 0 0;
}

.ls-report-table {
  min-width: 1100px;
}

.ls-report-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #71717a;
  white-space: nowrap;
}

.ls-report-table th.num-cell,
.ls-report-table td.num-cell {
  text-align: center;
}

.ls-report-table-card .section-title {
  margin-bottom: 0;
}

.ls-report-table td {
  font-size: 13px;
  white-space: nowrap;
}

.ls-report-table td:not(.num-cell):first-child {
  text-align: left;
}

.ls-report-name {
  color: #18181b;
  font-weight: 600;
}

.ls-report-handle,
.ls-report-role {
  display: block;
  font-size: 12px;
  color: #71717a;
  font-weight: 500;
}

.ls-report-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
  font-size: 12px;
  font-weight: 700;
}

.ls-report-rank-gold {
  background: #fef3c7;
  color: #b45309;
}

.ls-report-rank-silver {
  background: #e2e8f0;
  color: #475569;
}

.ls-report-rank-bronze {
  background: #ffedd5;
  color: #c2410c;
}

.ls-report-host-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.ls-report-host-link:hover .ls-report-name {
  color: #0284c7;
  text-decoration: underline;
}

.ls-report-host-modal-card {
  width: min(1280px, calc(100vw - 32px));
  max-width: 1280px;
  padding: 0;
}

.ls-report-host-modal-head {
  align-items: flex-start;
  padding: 20px 32px 12px;
}

.ls-report-host-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ls-report-host-modal-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: #71717a;
}

.ls-report-host-modal-body {
  padding: 8px 32px 28px;
  max-height: min(72vh, 680px);
  overflow: auto;
}

.ls-report-host-daily-table th,
.ls-report-host-daily-table td {
  white-space: nowrap;
  padding-left: 14px;
  padding-right: 14px;
}

.ls-report-host-daily-table th:first-child,
.ls-report-host-daily-table td:first-child {
  padding-left: 16px;
}

.ls-report-host-daily-table th:last-child,
.ls-report-host-daily-table td:last-child {
  padding-right: 16px;
}

@media (max-width: 1100px) {
  .ls-report-table-head-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}

/* ---- Permissions config (sales demo mirror) ---- */
.perm-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 320px 1fr;
  align-items: start;
}
.perm-users-card {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 96px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.perm-users-head {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 10px;
}
.perm-users-list {
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 4px;
}
.perm-user-item {
  display: grid;
  gap: 2px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
}
.perm-user-item:hover { background: #f4f4f5; }
.perm-user-item.active {
  background: var(--primary, #7c3aed);
  color: #fff;
}
.perm-user-name { font-weight: 600; font-size: 14px; }
.perm-user-email,
.perm-user-role { font-size: 12px; opacity: 0.8; }
.perm-empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.perm-selected-card { padding: 16px; }
.perm-selected-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.perm-selected-name {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.perm-selected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.perm-hint {
  border: 1px dashed var(--border);
  background: #fafafa;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.perm-hint .text-emerald { color: #059669; }
.perm-hint .text-rose { color: #e11d48; }
.perm-group { margin-bottom: 12px; }
.perm-group-body { border-top: 1px solid var(--border); }
.perm-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.perm-row:last-child { border-bottom: 0; }
.perm-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
}
.perm-row-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.perm-row-code {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #a1a1aa;
  word-break: break-all;
}
.perm-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.perm-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}
.perm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.perm-switch span {
  position: absolute;
  inset: 0;
  background: #d4d4d8;
  border-radius: 999px;
  transition: 0.15s;
  cursor: pointer;
}
.perm-switch span::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.15s;
}
.perm-switch input:checked + span { background: #7c3aed; }
.perm-switch input:checked + span::before { transform: translateX(18px); }
.perm-switch.disabled { opacity: 0.45; pointer-events: none; }
.perm-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: #18181b;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.perm-toast.ok { background: #166534; }
@media (max-width: 1100px) {
  .perm-layout { grid-template-columns: 1fr; }
  .perm-users-card { position: static; max-height: 320px; }
}

/* ---- Affiliate invitations / open-collab / samples ---- */
.aff-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.aff-status-tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
}
.aff-status-tab.active {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
}
.aff-progress-cell {
  min-width: 140px;
}
.aff-progress-track {
  height: 6px;
  background: #e4e4e7;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.aff-progress-fill {
  height: 100%;
  background: #7c3aed;
}

.cr-th-total { border-top: 3px solid #f97316; color: #ea580c; }

/* ---- Affiliate sales-demo polish (invitations / open collab / messages) ---- */
.aff-section-gap {
  margin-top: 16px;
}

.aff-toolbar-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.aff-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.aff-inv-toolbar,
.aff-oc-toolbar {
  align-items: center;
  gap: 12px;
}

.aff-meup-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  color: var(--text);
}

.aff-meup-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
  flex-shrink: 0;
}

.aff-meup-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.aff-meup-toggle-track {
  position: absolute;
  inset: 0;
  background: #d4d4d8;
  border-radius: 999px;
  transition: 0.15s;
  cursor: pointer;
}

.aff-meup-toggle-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.aff-meup-toggle input:checked + .aff-meup-toggle-track {
  background: #7c3aed;
}

.aff-meup-toggle input:checked + .aff-meup-toggle-track::before {
  transform: translateX(18px);
}

.aff-row-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.aff-row-menu-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.aff-row-menu-btn:hover {
  background: #f4f4f5;
  color: var(--text);
}

.aff-row-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 220px;
  padding: 4px;
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(24, 24, 27, 0.12);
}

.aff-row-menu.open .aff-row-menu-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.aff-row-menu-panel button:hover {
  background: #f4f4f5;
}

.aff-row-menu-panel button.danger {
  color: #dc2626;
}

.aff-row-menu-panel button.danger:hover {
  background: #fef2f2;
}

.aff-row-menu-panel button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.aff-oc-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.aff-oc-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #52525b;
  flex-shrink: 0;
}

.aff-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e4e4e7;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.aff-status-pill.open {
  border-color: #86efac;
  color: #15803d;
  background: #f0fdf4;
}

.aff-oc-create-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.aff-oc-create-search .input {
  flex: 1;
}

.aff-oc-prod-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow: auto;
  margin-bottom: 10px;
}

.aff-oc-prod-hit {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}

.aff-oc-prod-hit:hover {
  background: #f4f4f5;
}

.aff-oc-commission-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.aff-msg-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #f4f4f5;
  background: #fff;
}

.aff-msg-composer textarea.input {
  flex: 1;
  min-height: 40px;
  max-height: 96px;
  resize: none;
  padding-top: 10px;
}

.aff-msg-icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.aff-msg-icon-btn:hover {
  background: #f4f4f5;
  color: var(--text);
}

.aff-msg-card-bubble {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.aff-msg-card-bubble em {
  font-style: normal;
  font-size: 12px;
  opacity: 0.85;
}

.aff-card-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.aff-card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 27, 0.45);
}

.aff-card-modal-panel {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e4e4e7;
  box-shadow: 0 20px 50px rgba(24, 24, 27, 0.18);
  overflow: hidden;
}

.aff-card-modal-head {
  padding: 18px 20px 8px;
}

.aff-card-modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.aff-card-modal-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.aff-card-modal-body {
  padding: 8px 20px 12px;
}

.aff-card-modal-foot {
  padding: 12px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.aff-card-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
}


/* ---- Import KOC + Notifications (sales demo) ---- */
.aff-import-file-actions { display:flex; gap:8px; flex-wrap:wrap; margin: 8px 0 12px; }
.aff-import-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
}
.aff-import-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .aff-import-grid-2 { grid-template-columns: 1fr; }
}
.aff-import-format-box {
  background:#f4f4f5; border-radius:8px; padding:10px 12px; font-size:12px; color:var(--muted); margin-bottom:12px;
}
.aff-import-meta { font-size:12px; color:var(--muted); margin: 8px 0 0; }
.aff-toolbar-filters { flex-wrap: wrap; gap: 8px; align-items: center; }
.aff-toolbar-filters .search-wrap { min-width: 220px; flex: 1; }
.aff-toolbar-filters .input[type="date"] { max-width: 150px; }

.notify-panel { width: 400px; max-height: 560px; display:flex; flex-direction:column; }
.notify-unread-meta { font-size:12px; color:var(--muted); margin-top:2px; font-weight:400; }
.notify-panel-foot {
  border-top:1px solid #f4f4f5; padding:10px; text-align:center;
}
.ntf-tabs, .ntf-tabs-panel {
  display:flex; gap:6px; padding:10px 12px 0; flex-wrap:wrap;
}
.ntf-tab {
  border:0; background:transparent; border-radius:8px; padding:8px 12px;
  font-size:13px; font-weight:600; cursor:pointer; color:var(--muted);
}
.ntf-tab.active { background:#f0f0ff; color:#18181b; }
.ntf-subtabs, .ntf-subtabs-panel {
  display:flex; gap:6px; padding:8px 12px 10px;
}
.ntf-subtab {
  border:0; background:transparent; border-radius:8px; padding:6px 10px;
  font-size:12px; font-weight:600; cursor:pointer; color:var(--muted);
}
.ntf-subtab.active { background:#f0f0ff; color:#18181b; }
.ntf-item {
  display:flex; gap:10px; padding:12px 14px; border-bottom:1px solid #f4f4f5;
  align-items:flex-start; cursor:pointer;
}
.ntf-item.unread { background: #f8f8ff; }
.ntf-item-icon {
  width:22px; height:22px; border-radius:999px; background:#ef6820; color:#fff;
  display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex-shrink:0;
}
.ntf-item-body { flex:1; min-width:0; }
.ntf-item-title { font-size:13px; font-weight:700; }
.ntf-item-msg { font-size:12px; color:var(--muted); margin-top:2px; }
.ntf-item-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:6px; font-size:11px; color:#a1a1aa; }
.ntf-shop-pill {
  border:1px solid #e4e4e7; border-radius:6px; padding:1px 6px; background:#fafafa; color:#71717a;
}
.ntf-read-label { color:#a1a1aa; }
.ntf-item-actions { display:flex; flex-direction:column; align-items:center; gap:6px; }
.ntf-dot { width:8px; height:8px; border-radius:999px; background:#ef6820; }
.ntf-page-list { margin-top: 12px; overflow:hidden; }

/* ---- Open collab settings sheet + sample detail + msg image (sales demo polish) ---- */
.aff-sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
}
.aff-sheet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
}
.aff-sheet-modal-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aff-sheet-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid #f4f4f5;
}
.aff-sheet-modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.aff-sheet-modal-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.aff-sheet-modal-body {
  padding: 16px 20px 28px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.aff-oc-settings-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aff-oc-settings-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.aff-oc-settings-toggle-row .aff-meup-toggle-row span:last-child:empty {
  display: none;
}
.aff-oc-settings-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.aff-oc-settings-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.aff-oc-settings-rate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.aff-oc-settings-rate-row .input {
  width: 96px;
}
.aff-oc-settings-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.aff-oc-rules-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aff-oc-rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}
.aff-oc-rule-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.aff-oc-rule-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.aff-oc-rule-top span {
  color: var(--muted);
  white-space: nowrap;
}
.aff-oc-rule-card p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.aff-msg-image-bubble {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 240px;
}
.aff-msg-image-bubble img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
}
.aff-msg-image-name {
  font-size: 11px;
  opacity: 0.85;
}

.aff-sample-check-col {
  width: 36px;
}
.aff-sample-creator-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.aff-sample-creator-btn strong {
  display: block;
  font-size: 13px;
}
.aff-sample-creator-btn em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.aff-sample-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
  color: #3f3f46;
}
.aff-sample-badge.pending {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
}
.aff-sample-badge.rejected {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.aff-sample-badge.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.aff-sample-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.aff-sample-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid #f4f4f5;
}
.aff-sample-detail-head h3 {
  margin: 0;
  font-size: 18px;
}
.aff-sample-detail-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.aff-sample-detail-body {
  padding: 16px 20px 28px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aff-sample-creator-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.aff-sample-creator-meta {
  min-width: 0;
  flex: 1;
}
.aff-sample-creator-meta strong {
  display: block;
}
.aff-sample-creator-meta span {
  font-size: 13px;
  color: var(--muted);
}
.aff-sample-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.aff-sample-stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.aff-sample-stat em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.aff-sample-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.aff-sample-product-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.aff-sample-kv {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aff-sample-kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.aff-sample-kv span {
  color: var(--muted);
}
.aff-sample-kv em {
  font-style: normal;
  text-align: right;
  word-break: break-all;
}
.aff-sample-detail-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #f4f4f5;
}
.aff-sample-detail-actions .btn {
  flex: 1;
}

/* Booking campaign form ? production parity */
.bk-auto-fill-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
  padding: 12px 14px;
}
.bk-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.bk-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.bk-switch-track {
  position: absolute;
  inset: 0;
  background: #d4d4d8;
  border-radius: 999px;
  transition: background .15s;
}
.bk-switch-track::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.bk-switch input:checked + .bk-switch-track {
  background: #7c3aed;
}
.bk-switch input:checked + .bk-switch-track::before {
  transform: translateX(18px);
}
.bk-product-required-hint {
  color: #e11d48;
  display: none;
}
.bk-kpi-staff-name { font-weight: 600; }
.bk-kpi-staff-email { font-size: 12px; color: var(--muted); }
.aff-msg-image-bubble img { background: #f4f4f5; }
/* --- MeAI (sales demo stub, mirror production FAB + drawer) --- */
.meai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #7c3aed, #4f46e5, #e04f16);
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.35);
}
.meai-fab:disabled { opacity: 0.5; cursor: not-allowed; }
.meai-fab:hover:not(:disabled) { filter: brightness(1.06); }
.meai-fab-sheen {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  pointer-events: none;
}
.meai-fab:hover .meai-fab-sheen { animation: meai-sheen .7s ease; }
@keyframes meai-sheen { to { transform: translateX(100%); } }
.meai-fab-icon { font-size: 16px; }

.meai-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 70;
  width: min(30rem, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--bg, #fff);
  border-left: 1px solid var(--border, #e4e4e7);
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.12);
}
.meai-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #e4e4e7);
  background: linear-gradient(90deg, rgba(124,58,237,.08), rgba(79,70,229,.08));
}
.meai-panel-title-wrap { display: flex; align-items: center; gap: 10px; }
.meai-avatar {
  width: 32px; height: 32px; border-radius: 999px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  font-size: 14px;
}
.meai-panel-title { font-size: 14px; font-weight: 600; }
.meai-panel-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.meai-panel-actions { display: flex; gap: 4px; }
.meai-icon-btn {
  border: 0; background: transparent; color: var(--muted);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
}
.meai-icon-btn:hover { background: var(--muted-bg, #f4f4f5); }
.meai-icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.meai-panel-body { flex: 1; overflow: auto; padding: 16px 20px; }
.meai-panel-foot {
  border-top: 1px solid var(--border, #e4e4e7);
  padding: 8px 16px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.meai-tool { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.meai-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #ddd; border-top-color: #7c3aed;
  animation: meai-spin .7s linear infinite;
}
@keyframes meai-spin { to { transform: rotate(360deg); } }
.meai-h {
  margin: 20px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border, #e4e4e7);
  font-size: 14px;
  font-weight: 600;
  color: #7c3aed;
}
.meai-h:first-child { margin-top: 0; }
.meai-bullet { display: flex; gap: 8px; margin-bottom: 6px; font-size: 14px; line-height: 1.5; }
.meai-bullet > span:first-child { color: #7c3aed; }
.meai-p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.meai-caret {
  display: inline-block; width: 8px; height: 16px; margin-left: 2px;
  background: rgba(124,58,237,.55); animation: meai-blink 1s step-end infinite;
  vertical-align: middle;
}
@keyframes meai-blink { 50% { opacity: 0; } }
.meai-muted { color: var(--muted); }
.meai-panel-body code {
  background: var(--muted-bg, #f4f4f5);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12.5px;
}
.meai-turn-ai + .meai-turn-user { margin-top: 18px; }
/* Câu hỏi của người dùng: bong bóng lệch phải, để phân biệt ngay với phần AI
   viết. Không có nó thì cuộn lại đoạn cũ không rõ dòng nào do mình gõ. */
.meai-turn-user {
  margin: 0 0 14px auto;
  max-width: 85%;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 12px 12px 2px 12px;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(79,70,229,.12));
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.meai-error {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, .25);
  border-radius: 10px;
  background: rgba(254, 226, 226, .5);
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}
.meai-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border, #e4e4e7);
}
.meai-input {
  flex: 1;
  /* min-width:0 để ô nhập co được trong flex — thiếu nó thì chuỗi dài đẩy nút
     Gửi tràn ra ngoài mép bảng. */
  min-width: 0;
  resize: none;
  max-height: 140px;
  padding: 9px 12px;
  border: 1px solid var(--border, #e4e4e7);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  background: var(--bg, #fff);
  color: inherit;
}
.meai-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.meai-input:disabled { background: var(--muted-bg, #f4f4f5); cursor: not-allowed; }
.meai-send {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}
.meai-send:disabled { opacity: .45; cursor: not-allowed; }

@media (min-width: 1024px) {
  html.meai-open #page-content {
    margin-right: 30rem;
    transition: margin-right 220ms ease;
  }
}

/* Shop analytics — align to page-header / table-card */
.sa-page-header.page-header { margin-bottom: 8px; }
.sa-page-header .sa-filters { justify-content: flex-end; }
.page-desc { font-size: 14px; color: var(--muted); margin-top: 4px; }
.sa-section-block { margin-top: 24px; }
.sa-section-block .sa-section-title,
.table-card > .sa-section-title,
.table-card > .sa-card-toolbar .sa-section-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.table-card .sa-card-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.table-card .sa-data-table,
.table-card .sa-video-table {
  width: 100%;
}
.fn-page-header.page-header { margin-bottom: 16px; }
.fn-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Nhãn nguồn số liệu GMV — phân biệt số TikTok tự tổng hợp với số tự cộng từ
   kho đơn hàng. Hai cách cho kết quả khác nhau khi kho chưa đồng bộ đủ. */
.sa-src-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 7px;
  line-height: 1.5;
}

.sa-src-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* GMV tách theo kênh bán: Video / LIVE / Product Card */
.sa-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 8px 4px 4px;
}

.sa-channel-item {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fafafa;
}

.sa-channel-head {
  font-size: 13px;
  font-weight: 600;
  color: #52525b;
  margin-bottom: 6px;
}

.sa-channel-val {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.sa-channel-pct {
  font-size: 12px;
  color: #71717a;
  margin-top: 4px;
}

/* Thanh phân trang cho danh sách lấy trực tiếp từ TikTok: nói rõ đã tải bao
   nhiêu trên tổng bao nhiêu, kèm nút tải thêm. Thay cho việc âm thầm cắt cụt. */
.aff-load-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #e4e4e7;
}

.aff-load-info {
  font-size: 13px;
  color: #71717a;
}

.aff-load-info strong {
  color: #0f172a;
  font-weight: 700;
}

/* Kéo thả đổi độ rộng cột trong bảng dữ liệu.
   Tay kéo nằm đè lên cạnh phải của ô tiêu đề; vùng bắt rộng 8px cho dễ trúng. */
.col-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
}

.col-resize-handle::after {
  content: "";
  position: absolute;
  top: 25%;
  left: 3px;
  width: 2px;
  height: 50%;
  background: transparent;
  border-radius: 1px;
  transition: background 0.12s ease;
}

.col-resize-handle:hover::after,
body.col-resizing .col-resize-handle::after {
  background: #6366f1;
}

/* Trong lúc kéo, chặn bôi đen chữ để thao tác mượt. */
body.col-resizing {
  user-select: none;
  cursor: col-resize;
}

/* table-layout: fixed cắt cụt nội dung tràn. Cho ô xuống dòng để việc nới cột
   thực sự giúp đọc được tên sản phẩm dài, thay vì chỉ thêm khoảng trắng. */
.aff-table-scroll table[style*="fixed"] td {
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}

/* Khối chi tiết phiên livestream trên trang phân tích */
.sa-live-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.sa-live-detail-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 12px 0 4px;
}

.sa-live-detail-kpis > div {
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
}

.sa-live-detail-kpis span {
  display: block;
  font-size: 12px;
  color: #71717a;
  margin-bottom: 4px;
}

.sa-live-detail-kpis strong {
  font-size: 16px;
  color: #0f172a;
}

/* Khung xương lúc chờ API trả danh sách shop. Trước đây trang vẽ ngay dữ liệu
   cũ trong localStorage rồi mới ghi đè, gây nhấp nháy đổi số. */
.shop-skel {
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
  background-size: 400% 100%;
  animation: shop-skel-shine 1.2s ease-in-out infinite;
}

@keyframes shop-skel-shine {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ===== Chi tiết hiệu suất video (/performance/video-production/:id/videos/:videoId) ===== */
.vd-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vd-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.vd-thumb {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f4f4f5;
}

.vd-thumb-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.vd-header-text {
  flex: 1 1 320px;
  min-width: 0;
}

.vd-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.vd-header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Hàng chỉ số phụ: ít thẻ hơn nên để chúng tự co thay vì ép thành 5 cột đều,
   nếu không hai thẻ sẽ kéo dài hết chiều ngang trông rất trống. */
.vd-metrics-secondary {
  grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
}

/* TikTok từ chối, đang hiện bản lưu trong CSDL. Phải nổi bật: số cũ mà trông
   giống số realtime là kiểu sai khó phát hiện nhất. */
.vd-cache-banner {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

.vd-chart-title {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.vd-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  padding-bottom: 18px;
  overflow-x: auto;
}

.vd-chart-col {
  position: relative;
  flex: 1 1 0;
  min-width: 10px;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.vd-chart-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #f97316, #fb923c);
}

/* Nhãn ngày xoay nghiêng: chuỗi 30 ngày mà để ngang thì chữ chồng lên nhau. */
.vd-chart-x {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  transform-origin: center top;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.vd-dist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.vd-dist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.vd-dist-row {
  display: grid;
  grid-template-columns: 64px 1fr 48px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.vd-dist-label {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vd-dist-track {
  height: 8px;
  border-radius: 999px;
  background: #f4f4f5;
  overflow: hidden;
}

.vd-dist-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #f97316;
}

.vd-dist-val {
  text-align: right;
  font-weight: 600;
  color: var(--text);
}

.vd-product-name {
  font-weight: 600;
  color: var(--text);
}

.vp-empty-note {
  margin: 0;
  padding: 20px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px dashed rgba(228, 228, 231, 0.9);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1023px) {
  .vd-metrics-secondary {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

/* Nút "Tải lại" ở danh sách video chiến dịch */
.vp-refresh-icon {
  margin-right: 6px;
  vertical-align: -2px;
}

.vp-refresh-icon.spinning {
  animation: vp-refresh-spin 900ms linear infinite;
}

@keyframes vp-refresh-spin {
  to { transform: rotate(360deg); }
}

/* Kết quả tải lại. Mặc định là thông báo trung tính chứ không phải màu thành
   công: câu trả về thường có cả phần "x video không lấy được số". */
.vp-refresh-notice {
  margin: 0 0 4px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid rgba(228, 228, 231, 0.9);
  font-size: 13px;
  color: var(--muted);
}

.vp-refresh-notice.failed {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Kênh triển khai chiến dịch booking — thẻ cạnh tên trong bảng danh sách. */
.bk-channel-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f4f4f5;
  border: 1px solid rgba(228, 228, 231, 0.9);
  font-size: 11px;
  font-weight: 600;
  color: #52525b;
}

/* ===== Quản lý tổ chức (/system/organizations) ===== */
.org-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.org-tag.on {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.org-tag.off {
  background: #f4f4f5;
  color: #71717a;
  border: 1px solid rgba(228, 228, 231, 0.9);
}

.org-expand {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.org-expand-cell {
  background: #fafafa;
  padding: 12px 16px;
}

.org-shop-table {
  background: var(--card);
  border-radius: 10px;
}

.org-shop-name {
  font-weight: 600;
  color: var(--text);
}

.org-move-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.org-move-select {
  min-width: 180px;
}

/* ===== Bộ chuyển tổ chức trên thanh điều hướng ===== */
.org-switcher-wrap {
  position: relative;
}

.org-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(228, 228, 231, 0.9);
  background: var(--card);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  max-width: 220px;
}

.org-switcher-btn:hover {
  background: #fafafa;
}

.org-switcher-btn #org-switcher-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.org-switcher-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 260px;
  padding: 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(228, 228, 231, 0.9);
  box-shadow: var(--shadow-sm);
}

.org-switcher-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.org-switcher-item:hover {
  background: #fafafa;
}

.org-switcher-item.active {
  background: #fef6ee;
}

.org-switcher-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.org-switcher-item-role {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.org-members {
  margin-bottom: 16px;
}

.org-members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
