/* GOPUSH — stylesheet ứng dụng, dựng theo design system GoMax Console.
   Phẳng, gọn, nhiều thông tin: top bar tối, sidebar trắng cố định, nền canvas
   xám nhạt, card trắng viền hairline 1px, không bóng; đen làm màu chủ đạo.
   Chữ font hệ thống, chỉ hai độ đậm 400 và 500. Mọi giá trị lấy từ tokens.css.
   Phần 1: component gm-*. Phần 2: khung, drawer, wizard và trang công khai. */

/* ============================================================ base */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 22px;
  background: var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
b, strong { font-weight: 500; }

.gm-num { font-variant-numeric: tabular-nums; }
.gm-muted { color: var(--text-tertiary); }
.ig-creator-detail-status { margin: 0 0 10px; font-size: 12px; line-height: 18px; }
.ig-creator-detail-status-error { color: var(--danger-text); }
.gm-secondary { color: var(--text-secondary); }
.gm-icon.solid { fill: currentColor; stroke: none; }
.gm-icon {
  width: var(--size-icon);
  height: var(--size-icon);
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================ button */
/* mặc định là nút outline trung tính; rất ít nút màu */
.gm-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--size-control);
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.gm-btn:hover { background: var(--bg-canvas); }
.gm-btn:focus-visible,
.gm-input:focus-visible,
.gm-tab:focus-visible,
.gm-nav-item:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
/* nút cỡ nhỏ: nền xám, không viền (Xem chi tiết, Lịch sử) */
.gm-btn-sm {
  height: var(--size-control-sm);
  padding: 0 var(--space-2);
  border-color: transparent;
  background: var(--bg-subtle);
  font-size: 12px;
  gap: var(--space-1);
}
.gm-btn-sm:hover { background: var(--bg-muted); }
.gm-btn-sm .gm-icon { width: 14px; height: 14px; }
/* primary: nền đen — màu chủ đạo, như nút "Thêm tài khoản nhà quảng cáo"
   của Trung tâm doanh nghiệp; tối đa một nút mỗi vùng */
.gm-btn-primary { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); font-weight: 500; }
.gm-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.gm-btn-primary .gm-icon { color: inherit; }
/* accent: hành động gắn với thương hiệu */
.gm-btn-accent { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); font-weight: 500; }
.gm-btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.gm-btn-ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.gm-btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.gm-btn-link { background: transparent; border-color: transparent; color: var(--accent-dark); padding: 0 var(--space-1); }
.gm-btn-link:hover { background: transparent; text-decoration: underline; }
.gm-btn-danger { color: var(--danger-text); }
.gm-btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-dark); font-weight: 500; }
.gm-btn-soft:hover { background: var(--accent-soft); border-color: var(--accent-border); }
.gm-btn-icon { width: 28px; height: 28px; padding: 0; border-radius: var(--radius-sm); }
.gm-btn-icon .gm-icon { width: 16px; height: 16px; }
.gm-btn[disabled] { color: var(--text-disabled); background: var(--bg-subtle); border-color: transparent; cursor: not-allowed; }

/* ============================================================ input */
.gm-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.gm-label { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.gm-label .req { color: var(--danger); margin-right: 2px; }
.gm-help { font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.gm-input {
  font: inherit;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--size-control);
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  min-width: 0;
  transition: border-color .12s;
}
.gm-input input,
.gm-input textarea {
  font: inherit;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  flex: 1;
  min-width: 0;
  padding: 0;
  resize: none;
}
.gm-input input::placeholder,
.gm-input textarea::placeholder { color: var(--text-tertiary); }
.gm-input:hover { border-color: var(--text-tertiary); }
.gm-input:focus-within { border-color: var(--line-active); box-shadow: 0 0 0 3px var(--ring); }
.gm-input .gm-icon { color: var(--text-secondary); }
.gm-input-password { padding-right: 5px; }
.gm-input-toggle { width: 32px; height: 32px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); cursor: pointer; }
.gm-input-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }
.gm-input-toggle:focus-visible { outline: 2px solid var(--line-active); outline-offset: 1px; }
.gm-input-toggle .gm-icon { width: 17px; height: 17px; }
.gm-input-area { height: auto; min-height: 80px; padding: var(--space-2) var(--space-3); align-items: flex-start; }
.gm-select { justify-content: space-between; cursor: pointer; }
.gm-select .val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.gm-select .ph { color: var(--text-tertiary); }
.gm-count { font-size: 12px; color: var(--text-tertiary); }

/* ============================================================ checkbox / switch */
.gm-check {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  display: inline-grid;
  place-items: center;
  flex: none;
}
.gm-check.on { background: var(--accent-dark); border-color: var(--accent-dark); }
.gm-check.on::after {
  content: "";
  width: 8px;
  height: 4px;
  border: 2px solid var(--on-accent);
  border-top: 0;
  border-right: 0;
  transform: translateY(-1px) rotate(-45deg);
}
.gm-switch { display: inline-block; vertical-align: -3px; width: 28px; height: 16px; border-radius: var(--radius-pill); background: var(--border); position: relative; flex: none; }
.gm-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  transition: left .12s;
}
.gm-switch.on { background: var(--accent-dark); }
.gm-switch.on::after { left: 14px; }

/* ============================================================ tag / badge */
/* tag 22px bo 4px: nền nhạt + chữ đậm cùng tông; luôn có chữ */
.gm-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 22px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}
.gm-tag .gm-icon { width: 12px; height: 12px; }
.gm-pill { border-radius: var(--radius-pill); }
.gm-tag-ink { background: var(--accent-soft); color: var(--accent-dark); }
.gm-tag-green { background: var(--success-bg); color: var(--success-text); }
.gm-tag-orange { background: var(--warning-soft); color: var(--warning-text); }
.gm-tag-red { background: var(--danger-soft); color: var(--danger-text); }
.gm-tag-outline { background: var(--bg-surface); border: 1px solid var(--border-light); color: var(--text-primary); border-radius: var(--radius-pill); font-weight: 400; }
.gm-tag-new { background: var(--new-bg); color: var(--new-text); }
/* trong bảng: trạng thái là chấm màu + chữ thường, không nền — như cột
   Trạng thái của trang Tài khoản TikTok; bảng thoáng hơn, màu chỉ ở chấm */
.gm-table .gm-tag.gm-pill { background: transparent; padding: 0; height: auto; gap: 6px; font-size: 13px; font-weight: 400; color: var(--text-primary); }
.gm-table .gm-tag.gm-pill .gm-dot { width: 7px; height: 7px; background: var(--text-tertiary); }
.gm-table .gm-tag.gm-pill.gm-tag-green .gm-dot { background: var(--success); }
.gm-table .gm-tag.gm-pill.gm-tag-orange .gm-dot { background: var(--warning); }
.gm-table .gm-tag.gm-pill.gm-tag-red { color: var(--danger-text); }
.gm-table .gm-tag.gm-pill.gm-tag-red .gm-dot { background: var(--danger); }
.gm-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.gm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}
/* chip giá trị đã chọn trong bộ lọc */
.gm-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 22px;
  padding: 0 var(--space-1) 0 var(--space-2);
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 400;
}
.gm-chip button {
  all: unset;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}
.gm-chip button .gm-icon { width: 12px; height: 12px; }
.gm-chip button:hover { background: var(--bg-muted); color: var(--text-primary); }

/* ============================================================ tabs */
/* tab gạch chân: chữ phụ, tab đang chọn chữ chính 500 và vạch 2px */
.gm-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  min-height: 48px;
  border-bottom: 1px solid var(--border-light);
  padding: 0 var(--space-6);
  overflow-x: auto;
  overflow-y: hidden;
}
.gm-tab {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  height: 47px;
  color: var(--text-secondary);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.gm-tab:hover { color: var(--text-primary); }
.gm-tab.on { color: var(--text-primary); font-weight: 500; border-bottom-color: var(--text-primary); }
.gm-tab.on .gm-badge { background: var(--accent-soft); color: var(--accent-dark); }
/* tab cấp hai / nút chuyển: mục đang chọn chữ đen */
.gm-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.gm-seg button {
  all: unset;
  cursor: pointer;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 12px;
}
.gm-seg button:hover { color: var(--text-primary); }
.gm-seg button.on { background: var(--bg-surface); color: var(--accent-dark); font-weight: 500; }

/* ============================================================ card / stat */
.gm-card {
  --card-px: var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--card-px);
  min-width: 0;
}
/* card lồng trong card trang: đệm ngang 20px cho cân với khối ngoài */
.ig-sheet .gm-card { --card-px: var(--space-5); }
.gm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 26px;
  margin-bottom: var(--space-3);
}
.gm-card-title { font-size: 16px; line-height: 24px; font-weight: 500; margin: 0; }
.gm-kv { display: grid; grid-template-columns: 124px 1fr; gap: var(--space-2) var(--space-3); font-size: 14px; margin: 0; }
.gm-kv dt { color: var(--text-secondary); }
.gm-kv dd { margin: 0; color: var(--text-primary); overflow-wrap: anywhere; }
.gm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3); }
/* stat tile: số lớn trên, nhãn nhỏ dưới, nền canvas khi nằm trong card trắng */
.gm-stat {
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px var(--space-1);
  background: var(--bg-canvas);
}
.gm-stat .v { font-size: 20px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.gm-stat .l { grid-column: 1 / -1; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.gm-stat .gm-icon { color: var(--text-secondary); }
.gm-delta-up { color: var(--success-text); font-weight: 500; }
.gm-delta-down { color: var(--danger-text); font-weight: 500; }

/* ============================================================ table */
.gm-table-wrap { overflow-x: auto; }
.gm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.gm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 13px;
  text-align: left;
  padding: 12px var(--space-4);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.gm-table th .sw { width: 13px; height: 13px; color: var(--text-tertiary); margin-left: 4px; vertical-align: -2px; }
.gm-table td { padding: 12px var(--space-4); border-bottom: 1px solid var(--border-light); vertical-align: middle; background: var(--bg-surface); }
.gm-table tr:hover td { background: var(--bg-canvas); }
.gm-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.gm-table .col-check { width: 16px; padding-right: 0; }
.gm-table .col-actions { text-align: right; white-space: nowrap; position: sticky; right: 0; }
.gm-table .ig-creator-category-cell { width: 190px; max-width: 190px; }
.ig-creator-category { display: block; width: 180px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-table td.col-actions { background: var(--bg-surface); box-shadow: -1px 0 0 var(--border-light); }
.gm-table th.col-actions { background: var(--bg-canvas); box-shadow: -1px 0 0 var(--border-light); z-index: 2; }
.gm-table tr:hover td.col-actions { background: var(--bg-canvas); }
.gm-table tr.is-sel td.col-actions { background: var(--accent-soft); }
.gm-entity { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.gm-entity .name { font-weight: 400; }
.gm-entity .meta { font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.gm-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  flex: none;
}
.gm-avatar-sq { border-radius: var(--radius-sm); }
.gm-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; display: block; }
.gm-avatar > [data-avatar-fallback="true"] { display: grid; width: 100%; height: 100%; place-items: center; }
.gm-avatar.is-bear { background: #f6ece0; padding: 0; overflow: hidden; }
.gm-avatar.is-bear svg { width: 100%; height: 100%; display: block; }
/* link: chữ đen đậm, gạch chân khi rê chuột */
.gm-link {
  color: var(--accent-dark);
  cursor: pointer;
  text-decoration: none;
}
.gm-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Bảng Creator có nhiều chỉ số: giữ vừa khung desktop, tiêu đề đứng yên khi cuộn. */
.ig-creator-table {
  max-height: min(62vh, 680px);
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  padding: 0 8px;
  border-bottom: 1px solid var(--border-light);
}
.ig-creator-table .gm-table { table-layout: auto; min-width: 0; font-size: 12.5px; }
.ig-creator-table .gm-table th { padding: 10px 8px; font-size: 12px; line-height: 16px; white-space: nowrap; }
.ig-creator-table .gm-table td { min-width: 0; padding: 10px 8px; overflow: hidden; }
.ig-creator-table .gm-table .col-check { width: 2.5%; padding-right: 4px; }
.ig-creator-table .gm-table .ig-creator-identity { width: 24%; }
.ig-creator-table .gm-table th.ig-creator-identity,
.ig-creator-table .gm-table td.ig-creator-identity { padding-left: 14px; }
.ig-creator-table .gm-table .ig-creator-compact-num { width: 7%; white-space: nowrap; }
.ig-creator-table .gm-table .ig-creator-secondary { width: 6%; }
.ig-creator-table .gm-table .col-relation-status { width: 10%; min-width: 128px; white-space: nowrap; }
.ig-creator-table .gm-table .col-actions { width: 10%; padding-left: 6px; padding-right: 8px; }
.ig-creator-search-table .gm-table { min-width: 1260px; }
.ig-creator-warehouse-table .gm-table { min-width: 1480px; }
.ig-creator-warehouse-table .gm-table th,
.ig-creator-warehouse-table .gm-table td { white-space: nowrap; }
.ig-creator-table .gm-entity { min-width: 0; gap: 8px; }
.ig-creator-table .gm-entity > div { min-width: 0; overflow: hidden; }
.ig-creator-table .ig-creator-card { align-items: flex-start; }
.ig-creator-table .ig-creator-card .gm-avatar { width: 36px; height: 36px; margin-top: 2px; }
.ig-creator-table .ig-creator-card-body { display: grid; gap: 1px; min-width: 0; overflow: hidden; }
.ig-creator-table .ig-creator-card-head { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ig-creator-table .ig-creator-card-head .gm-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ig-creator-table .ig-creator-card-head .ig-tt { flex: none; }
.ig-creator-level { flex: none; padding: 1px 6px; border-radius: 8px; color: var(--text-secondary); background: var(--bg-subtle); font-size: 10px; line-height: 16px; white-space: nowrap; }
.ig-creator-table .ig-creator-card .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-creator-card-line { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--text-primary); font-size: 12px; line-height: 18px; }
.ig-creator-card-line > .gm-icon { width: 13px; height: 13px; flex: none; color: var(--text-tertiary); }
.ig-creator-table .ig-creator-category { width: auto; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-creator-category { cursor: help; border-radius: 3px; outline: none; }
.ig-creator-category:focus-visible { box-shadow: 0 0 0 2px var(--accent-border); }
.ig-creator-audience { width: fit-content; max-width: 100%; cursor: help; border-radius: 3px; outline: none; }
.ig-creator-audience:focus-visible { box-shadow: 0 0 0 2px var(--accent-border); }
.ig-creator-audience-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-creator-table .gm-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ig-creator-floating-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: min(320px, calc(100vw - 16px));
  padding: 8px 11px;
  border-radius: 8px;
  background: #3d3d3d;
  color: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 24%);
  font-size: 12px;
  font-weight: 500;
  line-height: 19px;
  white-space: pre-line;
  pointer-events: none;
}

.gm-card > .gm-table-wrap { margin: 0 calc(-1 * var(--card-px)) calc(-1 * var(--space-4)); border-top: 1px solid var(--border-light); border-radius: 0 0 var(--radius-md) var(--radius-md); }
/* card chỉ chứa bảng: không padding nên bảng không cần kéo âm ra ngoài */
.gm-card-table { padding: 0; overflow: hidden; }
.gm-card-table > .gm-table-wrap { margin: 0; border-top: 0; border-radius: var(--radius-md); }
.gm-card .gm-table th,
.gm-card .gm-table td { padding-left: var(--space-4); padding-right: var(--space-4); }
.gm-card .gm-table tr:last-child td { border-bottom: 0; }

/* ============================================================ banner / empty / stepper */
/* thông báo trong trang: nền trung tính, icon đen, không viền */
.gm-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 10px var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 22px;
}
.gm-banner > .gm-icon { color: var(--accent-dark); margin-top: 3px; }
.gm-banner .body { flex: 1; }
.gm-banner .body b { font-weight: 500; }
.gm-banner-warning { background: var(--warning-soft); }
.gm-banner-warning > .gm-icon { color: var(--warning); }
.gm-banner-danger { background: var(--danger-soft); }
.gm-banner-danger > .gm-icon { color: var(--danger); }

.gm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--text-secondary);
}
.gm-empty > .gm-icon { width: 28px; height: 28px; color: var(--text-tertiary); }

.gm-steps { display: flex; align-items: center; gap: var(--space-2); overflow-x: auto; }
.gm-step {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  background: var(--bg-surface);
}
.gm-step .n {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
.gm-step.on { border-color: var(--line-active); background: var(--accent-soft); color: var(--accent-dark); font-weight: 500; }
.gm-step.on .n { background: var(--accent-dark); color: var(--on-accent); }
.gm-step.done { color: var(--text-primary); }
.gm-step.done .n { background: var(--success-bg); color: var(--success-text); }
.gm-step-line { flex: 1; min-width: 16px; height: 1px; background: var(--border); }

/* ============================================================ pager / funnel */
/* phân trang: ô vuông xám, trang hiện tại viền đen */
.gm-pager {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: var(--space-3) var(--space-6);
  font-size: 14px;
  color: var(--text-primary);
}
.gm-pager button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  background: var(--bg-subtle);
  display: inline-grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}
.gm-pager button:hover { background: var(--bg-muted); }
.gm-pager-more { min-width: 18px; text-align: center; color: var(--text-secondary); }
.gm-pager button:disabled { opacity: .45; cursor: default; pointer-events: none; }
.gm-pager-summary { white-space: nowrap; }
.gm-pager button.on { background: var(--bg-surface); border-color: var(--line-active); color: var(--accent-dark); }
.gm-pager button .gm-icon { width: 14px; height: 14px; }

.gm-funnel { display: flex; flex-direction: column; gap: 6px; }
.gm-funnel .step { display: grid; grid-template-columns: 1fr 52px; align-items: center; gap: var(--space-2); }
.gm-funnel .bar {
  height: 28px;
  border-radius: var(--radius-xs);
  /* nhạt dần theo từng bước phễu, cùng tông đen với biểu đồ */
  background: var(--chart-1);
  background: color-mix(in srgb, var(--chart-1) calc(100% - var(--fn, 0) * 45%), var(--bg-muted));
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-3);
  font-size: 13px;
  font-weight: 500;
  min-width: 132px;
  gap: var(--space-3);
  white-space: nowrap;
  overflow: hidden;
}
.gm-funnel .rate { font-size: 12px; color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================ khung ứng dụng */
/* top bar tối 56px · sidebar trắng 240px · nội dung trên nền canvas */
.ig-app { display: grid; grid-template-rows: var(--size-topbar) 1fr; height: 100vh; }

/* ---------------------------------------------------------- top bar */
.gm-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--size-topbar);
  padding: 0 var(--space-4);
  background: var(--bg-topbar);
  color: var(--text-inverse);
  min-width: 0;
}
.gm-topbar__brand { display: flex; align-items: center; text-decoration: none; flex: none; padding: 0 var(--space-1); }
.gm-topbar .sep { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.18); flex: none; }
.gm-topbar__right { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); min-width: 0; }

.ig-logo { display: block; width: auto; flex: none; }
.gm-topbar .ig-logo { height: 34px; }
.ig-pub-nav .ig-logo { height: 38px; }
/* logo trắng đặt trên nền sáng: đảo độ sáng để logo hợp nền sáng */
.ig-logo--ink { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .ig-logo--ink { filter: none; }

/* pill trên top bar: nền trắng trong 12% */
.ig-pill {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 32px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--bg-topbar-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-inverse);
  white-space: nowrap;
  transition: background .12s;
}
.ig-pill:hover { background: var(--bg-topbar-pill-hover); }
.ig-pill .gm-icon { color: var(--text-on-topbar-muted); width: 14px; height: 14px; }
.ig-pill:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* bộ chọn cửa hàng: đứng cạnh logo, có nhãn nhỏ và mũi tên hai chiều */
.ig-shop {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  max-width: 268px;
  flex: none;
  color: var(--text-inverse);
  transition: background .12s;
}
.ig-shop:hover { background: var(--bg-topbar-pill); }
.ig-shop:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.ig-shop .flag { font-size: 16px; line-height: 1; flex: none; }
.ig-shop .txt { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ig-shop .cap { font-size: 11px; line-height: 13px; color: var(--text-on-topbar-muted); }
.ig-shop .nm {
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ig-shop .gm-dot { width: 7px; height: 7px; flex: none; }
.ig-shop .sw { width: 14px; height: 14px; color: var(--text-on-topbar-muted); flex: none; }

.ig-search { width: 220px; cursor: text; font-weight: 400; }
.ig-search input { font: inherit; font-size: 13px; border: 0; outline: 0; background: transparent; color: inherit; flex: 1; min-width: 0; }
.ig-search input::placeholder { color: var(--text-on-topbar-muted); }
.ig-search:focus-within { background: var(--bg-topbar-pill-hover); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }

/* pill hạn mức gửi */
.ig-quota { gap: 6px; cursor: default; }
.ig-quota:hover { background: var(--bg-topbar-pill); }
.ig-quota b { font-weight: 500; font-variant-numeric: tabular-nums; }
.ig-quota .sl { color: var(--text-on-topbar-muted); font-variant-numeric: tabular-nums; }
.ig-quota .track { width: 34px; height: 3px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.ig-quota .track i { display: block; height: 100%; background: var(--accent-bright); }

.ig-lang { gap: 6px; padding: 0 10px; }
.ig-lang .flag { font-size: 14px; }

.ig-icons { display: flex; align-items: center; gap: var(--space-1); margin: 0 var(--space-1); }
.gm-topbar__icon {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--text-inverse);
}
.gm-topbar__icon:hover { background: var(--bg-topbar-pill); }
.gm-topbar__icon:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.gm-topbar__icon .gm-icon { width: 18px; height: 18px; }
.gm-topbar__dot {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--danger);
  color: var(--text-inverse);
  font-size: 10px;
  line-height: 16px;
  font-weight: 500;
  text-align: center;
}

/* nút tài khoản dạng pill */
.gm-switcher {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-3) 0 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-topbar-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-inverse);
  cursor: pointer;
  flex: none;
}
.gm-switcher:hover { background: var(--bg-topbar-pill-hover); }
.gm-switcher:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.gm-switcher .gm-icon { color: var(--text-on-topbar-muted); width: 14px; height: 14px; }
.ig-user .nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-user .gm-avatar { width: 28px; height: 28px; }

/* ---------------------------------------------------------- sidebar */
.ig-body { position: relative; display: grid; grid-template-columns: var(--size-sidebar) 1fr; min-height: 0; }
.gm-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-width: 0;
}
.gm-nav-label {
  font-size: 12px;
  line-height: 18px;
  color: var(--text-tertiary);
  padding: var(--space-3) var(--space-2) var(--space-1);
  white-space: nowrap;
}
.gm-nav-label:first-child { padding-top: var(--space-1); }
.gm-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--size-nav-item);
  padding: 0 var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  flex: none;
}
.gm-nav-item:hover { background: var(--bg-muted); }
.gm-nav-item .tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-nav-item.is-current { font-weight: 500; }
.gm-nav-item.is-active { background: var(--accent-soft); font-weight: 500; }
.gm-nav-item .gm-chev { width: 14px; height: 14px; color: var(--text-secondary); }
.gm-nav-sub { padding-left: 32px; font-weight: 400; }
.gm-nav-item .gm-badge { background: var(--bg-subtle); }
.gm-nav-item.is-active .gm-badge { background: var(--bg-surface); color: var(--accent-dark); }

/* nút thu gọn: thẻ nhỏ nằm trên vách sidebar, canh giữa theo chiều dọc */
.ig-collapse {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  z-index: 6;
  top: 50%;
  left: calc(var(--size-sidebar) - 11px);
  transform: translateY(-50%);
  width: 22px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: left .14s, background .12s, color .12s;
}
.ig-collapse:hover { background: var(--bg-muted); color: var(--text-primary); }
.ig-collapse:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.ig-collapse .gm-icon { width: 14px; height: 14px; transition: transform .14s; }
/* thu gọn: còn cột icon 64px */
.ig-app.sub-collapsed .ig-body { grid-template-columns: var(--size-sidebar-collapsed) 1fr; }
.ig-app.sub-collapsed .ig-collapse { left: calc(var(--size-sidebar-collapsed) - 11px); }
.ig-app.sub-collapsed .ig-collapse .gm-icon { transform: rotate(180deg); }
.ig-app.sub-collapsed .gm-nav-label { font-size: 0; padding: var(--space-2) 0; }
.ig-app.sub-collapsed .gm-nav-label::after { content: ""; display: block; height: 1px; margin: 0 var(--space-2); background: var(--border-light); }
.ig-app.sub-collapsed .gm-nav-label:first-child { display: none; }
.ig-app.sub-collapsed .gm-nav-item { justify-content: center; padding: 0; }
.ig-app.sub-collapsed .gm-nav-item .tx,
.ig-app.sub-collapsed .gm-nav-item .gm-chev,
.ig-app.sub-collapsed .gm-nav-sub,
.ig-app.sub-collapsed .ig-navsub,
.ig-app.sub-collapsed .ig-navdot { display: none; }
.ig-app.sub-collapsed .gm-nav-item.is-current { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------------------------------------------------------- vùng nội dung */
.ig-content {
  overflow-y: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
  padding: 0 var(--space-4) var(--space-6);
}
/* flex column có chiều cao cố định: khóa co lại để khối cao
   (bảng dài, report) không bị ép về 0 khi trang dài hơn khung nhìn */
.ig-content > * { flex: 0 0 auto; }
/* Booking wizard lấp đầy phần viewport còn lại ở các bước ngắn; bước dài vẫn
   tăng tự nhiên và cuộn theo .ig-content. */
.ig-content > .ig-sheet:has(.ig-wzfoot) { flex: 1 0 auto; }
/* tiêu đề trang 24px/500 đặt ngoài card */
.ig-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-5) var(--space-1) var(--space-4);
}
.ig-page-head h1 { font-size: 24px; line-height: 32px; font-weight: 500; margin: 0; }
.ig-page-head p { margin: 2px 0 0; font-size: 14px; line-height: 22px; color: var(--text-secondary); max-width: 80ch; }
.ig-head-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding-top: 2px; }
/* card trắng gom mọi khối của trang */
.ig-sheet {
  background: var(--bg-surface);
  overflow: clip;   /* cắt khối đầu / cuối theo góc bo, không tạo vùng cuộn nên sticky vẫn chạy */
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ig-sheet > * { flex: 0 0 auto; }
.ig-sheet > .ig-chat { flex: 1 0 auto; }
.ig-content:has(> .ig-sheet > .ig-chat) > .ig-sheet { flex: 1 0 auto; }
.ig-sheet > .gm-tabs:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.ig-section { padding: var(--space-4) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.ig-section + .ig-section { border-top: 1px solid var(--border-light); }
.ig-section > h2 { font-size: 18px; line-height: 26px; font-weight: 500; margin: 0; }
.ig-grid { display: grid; gap: var(--space-3); }
.ig-grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ig-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------------------------------------------------------- bộ lọc */
.gm-input-sm { height: 32px; padding: 0 10px; border-radius: var(--radius-sm); font-size: 13px; gap: 6px; }
.ig-filters .gm-input-sm,
.ig-filters .gm-btn-sm,
.ig-wzfilter .gm-select { height: 32px; font-size: 13px; padding: 0 10px; }
.ig-filters .gm-select .gm-icon,
.ig-wzfilter .gm-select .gm-icon { width: 14px; height: 14px; }
.gm-input-sm .gm-icon { width: 14px; height: 14px; }

.ig-filters { background: var(--bg-surface); }
.ig-filters-bar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-4) var(--space-6) var(--space-3); }
.ig-filters-bar .spacer { flex: 1; }
.ig-filters .gm-input { background: var(--bg-surface); }
.ig-filters .gm-select { min-width: 132px; }
.ig-fsearch { flex: 1 1 180px; max-width: 240px; }
.ig-fmeta { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.ig-fright { display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap; }

.ig-more { border: 1px solid var(--border) !important; background: var(--bg-surface) !important; }
.ig-more .gm-icon:last-child { transition: transform .12s; }
.ig-more[aria-expanded="true"] { border-color: var(--line-active) !important; color: var(--accent-dark); }
.ig-more[aria-expanded="true"] .gm-badge,
.ig-more .gm-badge { background: var(--accent-dark); color: var(--on-accent); }
.ig-more[aria-expanded="true"] .gm-icon:last-child { transform: rotate(180deg); }

.ig-filters-adv[hidden] { display: none; }
.ig-filters-adv {
  position: relative;
  display: grid;
  gap: var(--space-2);
  margin: 0 var(--space-6) var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
}
.ig-fgrp { display: grid; grid-template-columns: 112px 1fr; gap: var(--space-2); align-items: start; }
.ig-fgrp > .lb { font-size: 12px; line-height: 32px; color: var(--text-secondary); }
.ig-fgrp .row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-2); }
.ig-freset {
  all: unset;
  cursor: pointer;
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  font-size: 13px;
  color: var(--accent-dark);
  line-height: 32px;
}
.ig-freset:hover { text-decoration: underline; }

.ig-filters-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 var(--space-6) var(--space-3); }

/* danh sách việc cần làm */
.ig-todo { display: flex; flex-direction: column; margin: 0; padding: 0; }
.ig-todo li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); list-style: none; }
.ig-todo li:last-child { border-bottom: 0; }
.ig-todo .txt { flex: 1; min-width: 0; }
.ig-todo .txt small { display: block; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.ig-todo ul { margin: 0; padding: 0; }

/* biểu đồ cột thuần CSS */
.ig-chart { display: flex; align-items: stretch; gap: var(--space-2); height: 168px; padding-top: var(--space-2); }
.ig-chart .col { flex: 1; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.ig-chart .bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.ig-chart .bar { display: block; width: 14px; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--chart-1); }
.ig-chart .bar.b2 { background: var(--chart-2); }
.ig-chart .lb { text-align: center; font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
.ig-legend { display: flex; gap: var(--space-4); font-size: 12px; color: var(--text-secondary); flex-wrap: wrap; }
.ig-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* ma trận quyền */
.ig-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.ig-matrix th,
.ig-matrix td { border: 1px solid var(--border-light); padding: 10px var(--space-3); text-align: center; }
.ig-matrix th { background: var(--bg-canvas); font-weight: 500; color: var(--text-primary); }
.ig-matrix td:first-child,
.ig-matrix th:first-child { text-align: left; }
.ig-matrix .yes { color: var(--success-text); font-weight: 500; }
.ig-matrix .no { color: var(--text-disabled); }

/* drawer hồ sơ Creator */
.ig-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 40; }
.ig-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(var(--drawer-width), 100vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-light);
  box-shadow: var(--shadow-pop);
  z-index: 41;
  display: flex;
  flex-direction: column;
  animation: slide-in .14s ease-out;
}
@keyframes slide-in { from { transform: translateX(16px); opacity: 0; } }
.ig-drawer header { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6) var(--space-3); border-bottom: 1px solid var(--border-light); }
.ig-drawer header .gm-avatar { width: 40px; height: 40px; font-size: 14px; }
.ig-drawer header .t { flex: 1; min-width: 0; }
.ig-drawer header .t strong { display: block; font-size: 16px; line-height: 24px; font-weight: 500; }
.ig-drawer header .t span { font-size: 12px; color: var(--text-secondary); }
.ig-drawer .scroll { overflow-y: auto; padding: var(--space-4) var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); background: var(--bg-canvas); flex: 1; }
.ig-drawer footer { margin-top: auto; display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-6); border-top: 1px solid var(--border-light); }
.ig-drawer .scroll .gm-card { padding: var(--space-4); }
.ig-timeline { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.ig-timeline li { display: grid; grid-template-columns: 14px 1fr; gap: var(--space-3); padding-bottom: var(--space-3); }
.ig-timeline .pin { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ig-timeline .pin i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 7px; flex: none; }
.ig-timeline .pin span { flex: 1; width: 1px; background: var(--border-light); }
.ig-timeline li:last-child .pin span { display: none; }
.ig-timeline .tx { font-size: 13px; line-height: 20px; }
.ig-timeline .tx small { display: block; color: var(--text-tertiary); font-size: 12px; }

/* toast */
.ig-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--bg-topbar);
  color: var(--text-inverse);
  padding: 10px var(--space-4);
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: var(--shadow-pop);
  z-index: 60;
  animation: slide-in .14s ease-out;
}

/* ============================================================ trang công khai */
.ig-public { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-canvas); }
/* thanh trên của trang công khai dùng cùng top bar tối với app */
.ig-pub-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--size-topbar);
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  background: var(--bg-topbar);
  color: var(--text-inverse);
  z-index: 10;
}
.ig-pub-nav .ig-brand { display: flex; align-items: center; }
.ig-pub-nav .spacer { flex: 1; }
.ig-pub-nav a:not(.gm-btn) { font-size: 14px; color: var(--text-on-topbar-muted); text-decoration: none; }
.ig-pub-nav a:not(.gm-btn):hover { color: var(--text-inverse); }
.ig-pub-nav .gm-btn { border-color: transparent; background: var(--bg-topbar-pill); color: var(--text-inverse); height: 32px; padding: 0 var(--space-3); font-size: 13px; }
.ig-pub-nav .gm-btn:hover { background: var(--bg-topbar-pill-hover); }
.ig-pub-nav .gm-btn-primary { background: var(--accent-dark); color: var(--on-accent); font-weight: 500; }
.ig-pub-nav .gm-btn-primary:hover { background: var(--accent-hover); }
.ig-pub-account { max-width: 190px; overflow: hidden; color: var(--text-on-topbar-muted); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ig-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--space-6); }
.ig-hero { padding: 56px 0 var(--space-8); text-align: center; }
.ig-hero-mark { display: grid; place-items: center; margin-bottom: var(--space-6); }
.ig-hero-mark .ig-logo { height: 64px; }
.ig-hero h1 { font-size: 40px; line-height: 48px; font-weight: 500; letter-spacing: -.02em; margin: 0 auto var(--space-3); max-width: 18ch; }
.ig-hero p { font-size: 16px; line-height: 26px; color: var(--text-secondary); margin: 0 auto var(--space-6); max-width: 60ch; }
.ig-hero .cta { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; }
.ig-hero .gm-btn { height: 40px; padding: 0 var(--space-5); }
.ig-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--space-3); padding-bottom: var(--space-8); }
.ig-feature { border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: var(--space-4); background: var(--bg-surface); }
.ig-feature .gm-icon { width: 20px; height: 20px; margin-bottom: var(--space-2); color: var(--accent-dark); }
.ig-feature h3 { font-size: 16px; line-height: 24px; margin: 0 0 var(--space-1); font-weight: 500; }
.ig-feature p { margin: 0; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.ig-flow { display: flex; gap: var(--space-3); flex-wrap: wrap; padding-bottom: var(--space-8); }
.ig-flow .s {
  flex: 1;
  min-width: 140px;
  border-radius: var(--radius-xs);
  padding: var(--space-3);
  font-size: 13px;
  line-height: 18px;
  background: var(--bg-card-dark);
  color: var(--text-inverse);
  min-height: 92px;
}
.ig-flow .s b { display: block; font-size: 12px; color: var(--accent-bright); font-weight: 500; margin-bottom: var(--space-2); }
.ig-pub-foot { margin-top: auto; border-top: 1px solid var(--border-light); padding: var(--space-5) 0; font-size: 13px; color: var(--text-secondary); background: var(--bg-surface); }
.ig-pub-foot .ig-wrap { display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
.ig-pub-foot a { color: var(--text-secondary); text-decoration: none; }
.ig-pub-foot a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- đăng nhập / đăng ký */
.ig-auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }

.ig-auth-art {
  background: var(--bg-canvas);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-8) var(--space-6);
  min-width: 0;
}
.ig-auth-art img { width: 100%; max-width: 520px; height: auto; margin: 0 auto; display: block; }
.ig-auth-art .cap { width: 100%; max-width: 520px; margin: 0 auto; }
.ig-auth-art h2 { margin: 0 0 var(--space-2); font-size: 24px; line-height: 32px; font-weight: 500; }
.ig-auth-art p { margin: 0 0 var(--space-4); font-size: 14px; line-height: 22px; color: var(--text-secondary); max-width: 46ch; }
.ig-auth-art ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ig-auth-art li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 12px;
  color: var(--text-primary);
}
.ig-auth-art li .gm-icon { width: 14px; height: 14px; color: var(--accent-dark); }

.ig-auth-pane { display: grid; place-items: center; padding: var(--space-8) var(--space-6); background: var(--bg-surface); }
.ig-auth-card { width: 100%; max-width: 372px; display: flex; flex-direction: column; gap: var(--space-4); }
.ig-auth-card > header .ig-logo { height: 46px; margin-bottom: var(--space-6); }

.ig-auth-card h1 { font-size: 24px; line-height: 32px; font-weight: 500; margin: 0 0 var(--space-1); }
.ig-auth-card header p { margin: 0; font-size: 14px; line-height: 22px; color: var(--text-secondary); }
.ig-auth-card .gm-steps { flex-wrap: wrap; overflow: visible; }
.ig-auth-card .gm-step-line { display: none; }
.ig-auth-card .gm-btn { height: 40px; }
.ig-auth-foot { font-size: 13px; color: var(--text-secondary); }
.ig-auth-back { font-size: 13px; color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.ig-auth-back:hover { color: var(--text-primary); }

.ig-gbtn { gap: var(--space-2); }
.ig-gsvg { width: 18px; height: 18px; flex: none; }
.ig-or { display: flex; align-items: center; gap: var(--space-3); font-size: 12px; color: var(--text-tertiary); }
.ig-or::before, .ig-or::after { content: ""; flex: 1; height: 1px; background: var(--border-light); }
.ig-auth-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: 13px; }

@media (max-width: 920px) {
  .ig-auth-split { grid-template-columns: 1fr; }
  .ig-auth-art { display: none; }
}

.ig-doc { flex: 1; padding: var(--space-8) 0 var(--space-8); }
.ig-doc h1 { font-size: 32px; line-height: 40px; font-weight: 500; margin: 0 0 var(--space-2); }
.ig-doc .upd { font-size: 13px; color: var(--text-secondary); margin: 0 0 var(--space-6); }
.ig-doc h2 { font-size: 18px; line-height: 26px; font-weight: 500; margin: var(--space-6) 0 var(--space-2); }
.ig-doc p,
.ig-doc li { font-size: 14px; line-height: 24px; color: var(--text-secondary); max-width: 76ch; }
.ig-doc ul { padding-left: var(--space-5); }

/* ============================================================ responsive */
@media (max-width: 1100px) {
  .ig-body { grid-template-columns: var(--size-sidebar-collapsed) 1fr; }
  .ig-collapse { display: none; }
  .gm-nav-label { font-size: 0; padding: var(--space-2) 0; }
  .gm-nav-label:first-child { display: none; }
  .gm-nav-label::after { content: ""; display: block; height: 1px; margin: 0 var(--space-2); background: var(--border-light); }
  .gm-nav-item { justify-content: center; padding: 0; }
  .gm-nav-item .tx, .gm-nav-item .gm-chev, .gm-nav-sub { display: none; }
  .gm-nav-item.is-current { background: var(--accent-soft); color: var(--accent-dark); }
  .ig-navsub { display: none; }
}
@media (max-width: 960px) {
  .ig-search,
  .ig-quota { display: none; }
}
@media (max-width: 720px) {
  .ig-user .nm,
  .gm-topbar .sep,
  .ig-shop .cap { display: none; }
  .ig-hero h1 { font-size: 30px; line-height: 38px; }
  .ig-content { padding: 0 var(--space-2) var(--space-4); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================ menu nổi */
.ig-menu {
  position: fixed;
  z-index: 50;
  min-width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm), var(--shadow-pop);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ig-menu button {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.ig-menu button:hover { background: var(--bg-muted); }
.ig-menu button:disabled,
.ig-menu button.is-disabled { cursor: not-allowed; color: var(--text-tertiary); opacity: .48; }
.ig-menu button:disabled:hover,
.ig-menu button.is-disabled:hover { background: transparent; }
.ig-menu .h { font-size: 12px; line-height: 18px; color: var(--text-tertiary); padding: 6px 8px; }

/* ============================================================ biểu đồ SVG */
/* nét mảnh, đường cong mềm, lưới hairline; đen cho chuỗi chính */
.ig-svg { width: 100%; height: auto; display: block; }
.ig-grid { stroke: var(--chart-grid); stroke-width: 1; }
.ig-ax { font-family: var(--font-sans); font-size: 11px; fill: var(--text-tertiary); }
.ig-ax-y { text-anchor: end; }

.ig-donut { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.ig-donut > svg { width: 168px; height: 168px; flex: none; }
.ig-donut-v { font-family: var(--font-sans); font-size: 20px; font-weight: 500; fill: var(--text-primary); }
.ig-donut-l { font-family: var(--font-sans); font-size: 11px; fill: var(--text-secondary); }
.ig-donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 10px; }
.ig-donut-legend li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ig-donut-legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ig-donut-legend .n { flex: 1; color: var(--text-secondary); }

.ig-hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ig-hbars li { display: grid; grid-template-columns: 116px 1fr auto; align-items: center; gap: var(--space-3); font-size: 13px; }
.ig-hbars .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-hbars .t { height: 6px; border-radius: var(--radius-pill); background: var(--bg-subtle); overflow: hidden; }
.ig-hbars .t i { display: block; height: 100%; border-radius: var(--radius-pill); }
.ig-hbars b { font-weight: 500; font-size: 13px; }

.ig-spark { width: 62px; height: 26px; overflow: visible; flex: 0 1 62px; min-width: 0; }
.ig-ring { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.ig-ring svg { width: 116px; height: 116px; }
.ig-ring-l { font-size: 12px; color: var(--text-secondary); text-align: center; }

/* ============================================================ thẻ KPI */
/* như ô số liệu của Trình quản lý quảng cáo: nền xám nhạt, không viền,
   nhãn trên, số lớn 20px, dòng so sánh kỳ trước bên dưới */
.ig-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: var(--space-3); }
@media (min-width: 1180px) { .ig-kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 721px) and (max-width: 1179px) { .ig-kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .ig-kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ig-kpis-6 { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1020px) { .ig-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .ig-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ig-kpi {
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  border: 1px solid transparent;
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.ig-kpi .top { display: flex; align-items: flex-start; gap: var(--space-2); min-height: 36px; font-size: 13px; line-height: 18px; color: var(--text-secondary); white-space: normal; overflow-wrap: anywhere; }
.ig-kpi .ic { width: 24px; height: 24px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.ig-kpi .ic .gm-icon { width: 14px; height: 14px; }
.ig-kpi .v { font-size: 20px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ig-kpi .b { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.ig-kpi .d { font-size: 12px; }

/* ============================================================ trang chủ */
.ig-banner {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  line-height: 0;
}
.ig-banner img { width: 100%; height: auto; max-height: none; object-fit: cover; object-position: center; display: block; }

/* thẻ lối tắt: hàng ngang gọn — ô icon đen, tên + một dòng mô tả, mũi tên phải */
.ig-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-3); }
.ig-tile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .12s, background .12s;
  min-width: 0;
}
.ig-tile:hover { border-color: var(--accent-border); background: var(--bg-canvas); }
.ig-tile .ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-dark); flex: none; }
.ig-tile .ic .gm-icon { width: 18px; height: 18px; }
.ig-tile .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ig-tile b { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--text-primary); }
.ig-tile .tx { font-size: 12px; line-height: 18px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-tile .go { color: var(--text-tertiary); display: grid; transition: transform .14s ease-out, color .12s; }
.ig-tile:hover .go { transform: translateX(2px); color: var(--accent-dark); }

.ig-chips { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ig-chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-primary);
}
.ig-chips a .gm-icon { color: var(--accent-dark); width: 14px; height: 14px; }
.ig-chips a:hover { border-color: var(--line-active); color: var(--accent-dark); }

.ig-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ig-runs li { padding: 10px 0; border-bottom: 1px solid var(--border-light); display: grid; gap: 6px; }
.ig-runs li:last-child { border-bottom: 0; padding-bottom: 0; }
.ig-runs .r1 { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; }
.ig-runs .r1 .n { flex: 1; font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-runs .bar { height: 3px; border-radius: var(--radius-pill); background: var(--border-light); overflow: hidden; }
.ig-runs .bar i { display: block; height: 100%; background: var(--accent); }
.ig-runs .r2 { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); }

/* ============================================================ lưới dashboard */
.ig-dash { display: grid; gap: var(--space-4); }
.ig-dash-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ig-dash-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ig-dash-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1240px) {
  .ig-dash-2, .ig-dash-3, .ig-dash-21 { grid-template-columns: minmax(0, 1fr); }
}
.ig-quota .gm-secondary { color: var(--text-on-topbar-muted); }

/* ============================================================ GOPUSH AI */
/* ô hỏi nhanh nổi ở cuối bảng, thay cho thanh thao tác hàng loạt cũ */
.ig-ask {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  width: min(560px, calc(100% - 48px));
  margin: var(--space-3) auto 6px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 42px;
  padding: 0 5px 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  box-shadow: var(--shadow-pop);
  cursor: text;
}
.ig-ask > .gm-icon { color: var(--text-secondary); flex: none; }
.ig-ask input { font: inherit; flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; }
.ig-ask input::placeholder { color: var(--text-tertiary); }

.ig-send {
  all: unset;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-dark);
  color: var(--on-accent);
  cursor: pointer;
  flex: none;
}
.ig-send:hover { background: var(--accent-hover); }
.ig-send:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }
.ig-send .gm-icon { width: 17px; height: 17px; }

/* khung hội thoại */
.ig-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ig-chat-wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: var(--space-2) var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: var(--space-5); }
.ig-msg { display: flex; gap: var(--space-3); align-items: flex-start; }
.ig-msg.me { justify-content: flex-end; }
.ig-msg.me .bubble {
  background: var(--bg-muted);
  border-radius: 16px 16px 4px 16px;
  padding: 10px var(--space-4);
  max-width: 76%;
  font-size: 14px;
  line-height: 21px;
}
.ig-ai-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--accent-dark);
  color: var(--on-accent);
}
.ig-ai-av .gm-icon { width: 15px; height: 15px; }
.ig-msg .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); font-size: 14px; line-height: 22px; }
.ig-msg .body > p { margin: 0; }
.ig-ai-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ig-ai-text p { margin: 0; }
.ig-ai-text h4 { margin: 2px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-primary); }
.ig-ai-text ul, .ig-ai-text ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 5px; }
.ig-ai-text code { padding: 1px 5px; border-radius: 4px; background: var(--bg-subtle); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }
.ig-ai-text a { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.ig-ai-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.ig-ai-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 13px; line-height: 18px; }
.ig-ai-table th, .ig-ai-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; }
.ig-ai-table th { background: var(--bg-subtle); color: var(--text-secondary); font-weight: 600; white-space: nowrap; }
.ig-ai-table tr:last-child td { border-bottom: 0; }
.ig-ai-table td { overflow-wrap: anywhere; }
.ig-msg .body b { font-weight: 500; }
.ig-msg .body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.ig-msg .body .gm-card { padding: var(--space-3) var(--space-4); }
.ig-msg .body .gm-table { font-size: 13px; }
.ig-msg .body .gm-table th,
.ig-msg .body .gm-table td { padding-left: var(--space-3); padding-right: var(--space-3); }
.ig-msg .body .gm-table-wrap { border-top: 0; }
.ig-msg .body .gm-table td:first-child { white-space: nowrap; }
.ig-msg-actions { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; }
.ig-msg-actions .sep { width: 1px; height: 18px; background: var(--border-light); margin: 0 var(--space-1); }
.ig-typing { display: inline-flex; gap: 3px; align-items: center; }
.ig-typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-tertiary); }

/* ô soạn prompt */
.ig-composer { position: sticky; bottom: 0; z-index: 5; padding: var(--space-2) var(--space-6) var(--space-5); background: var(--bg-surface); }
.ig-composer-in { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-2); }
.ig-suggests { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ig-suggests button {
  all: unset;
  cursor: pointer;
  font-size: 13px;
  padding: 0 12px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: var(--bg-surface);
}
.ig-suggests button:hover { border-color: var(--line-active); color: var(--text-primary); }
.ig-composer-box {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) var(--space-3) 10px var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.ig-composer-box:focus-within { border-color: var(--line-active); box-shadow: 0 0 0 3px var(--ring); }
.ig-composer-box textarea {
  font: inherit;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: inherit;
  min-height: 24px;
  line-height: 24px;
}
.ig-composer-box textarea::placeholder { color: var(--text-tertiary); }
.ig-composer-row { display: flex; align-items: center; gap: var(--space-2); }
.ig-composer-row .spacer { flex: 1; }
.ig-composer-hint { text-align: center; font-size: 11px; color: var(--text-tertiary); }

/* report chi tiết do AI tạo */
.ig-report { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-surface); }
.ig-report-head { display: flex; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-light); background: var(--bg-canvas); }
.ig-report-head h3 { margin: 0 0 4px; font-size: 17px; line-height: 24px; font-weight: 500; }
.ig-report-head .meta { font-size: 12px; color: var(--text-tertiary); display: flex; gap: var(--space-3); flex-wrap: wrap; }
.ig-report-head .t { flex: 1; min-width: 220px; }
.ig-report-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); }
.ig-report-body h4 { margin: 0 0 var(--space-2); font-size: 14px; font-weight: 500; }
.ig-report-sum { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); background: var(--soft-mist); font-size: 14px; line-height: 22px; }
.ig-report-sum .gm-icon { color: var(--soft-mist-ink); flex: none; margin-top: 3px; }
.ig-rec { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ig-rec li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 14px; line-height: 22px; }
.ig-rec .n { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 500; background: var(--accent-dark); color: var(--on-accent); }

/* thang trọng số trong Setting */
.ig-weight { display: grid; grid-template-columns: 1fr 52px; gap: var(--space-3); align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-light); }
.ig-weight:last-child { border-bottom: 0; }
.ig-weight .lb { font-size: 14px; }
.ig-weight .tr { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.ig-weight .tr i { display: block; height: 100%; border-radius: 3px; background: var(--accent-dark); }
.ig-weight b { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }


/* ============================================================ hỗ trợ */
.ig-support { position: fixed; right: var(--space-6); bottom: var(--space-6); z-index: 50; }
.ig-support-btn {
  all: unset;
  box-sizing: border-box;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-dark);
  color: var(--on-accent);
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  touch-action: none;
  transition: transform .14s;
}
.ig-support.is-dragging, .ig-support.is-dragging .ig-support-btn { cursor: grabbing; }
.ig-support.is-dragging .ig-support-menu { pointer-events: none; }
.ig-support-btn:hover { transform: translateY(-2px); }
.ig-support-btn:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.ig-support-btn .gm-icon { width: 21px; height: 21px; }

.ig-support-menu {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: 258px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .14s, transform .14s, visibility .14s;
}
.ig-support:hover .ig-support-menu,
.ig-support:focus-within .ig-support-menu,
.ig-support.open .ig-support-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.ig-support-menu .h { font-size: 12px; color: var(--text-tertiary); padding: 8px 10px 4px; }
.ig-support-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
}
.ig-support-menu a:hover { background: var(--bg-hover); }
.ig-support-menu .ic { width: 32px; height: 32px; border-radius: var(--radius-md); display: grid; place-items: center; flex: none; }
.ig-support-menu b { display: block; font-size: 13.5px; font-weight: 500; }
.ig-support-menu small { display: block; font-size: 12px; color: var(--text-tertiary); }
@media (max-width: 720px) { .ig-support { right: var(--space-4); bottom: var(--space-4); } }

/* ============================================================ bảng tương tác */
.gm-sort {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  font: inherit;
}
.gm-sort .gm-icon { width: 13px; height: 13px; opacity: 0; transition: opacity .12s; }
.gm-sort:hover { color: var(--text-primary); }
.gm-sort:hover .gm-icon { opacity: .5; }
.gm-sort.on { color: var(--text-primary); font-weight: 500; }
.gm-sort.on .gm-icon { opacity: 1; }
.gm-table tr.is-sel td { background: var(--accent-soft); }
.gm-table .col-actions .gm-btn + .gm-btn,
.gm-table .col-actions .gm-btn-icon { margin-left: 2px; }
.ig-creator-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.ig-creator-actions .gm-btn { margin-left: 0 !important; }
.ig-creator-actions .gm-btn-ghost { border-color: var(--border-light); background: var(--bg-surface); }
.ig-creator-actions .gm-btn-ghost:hover { border-color: var(--border); background: var(--bg-hover); }

.ig-campaign-name { display: flex; align-items: center; gap: 8px; min-width: 210px; }
.ig-campaign-thumbs { display: inline-flex; align-items: center; gap: 3px; flex: none; }
.ig-campaign-thumbs .gm-avatar { width: 28px; height: 28px; }
.ig-campaign-thumb { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--bg-muted); color: var(--text-tertiary); display: grid; place-items: center; flex: none; overflow: hidden; }
.ig-campaign-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-campaign-thumb .gm-icon { width: 14px; height: 14px; }
.ig-campaign-name-text { display: flex; flex-direction: column; min-width: 0; }
.ig-campaign-name-text .gm-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-campaign-name-text .gm-help { display: block; }
.ig-campaign-batch { color: var(--text-tertiary); font-size: 11px; line-height: 15px; }

.ig-prog { display: flex; align-items: center; gap: var(--space-2); }
.ig-prog .tr { width: 78px; height: 5px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; flex: none; }
.ig-prog .tr i { display: block; height: 100%; border-radius: 3px; background: var(--accent-dark); }

/* liên kết TikTok và video */
.ig-tt {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 5px;
  color: var(--text-tertiary);
  vertical-align: -3px;
  transition: background .12s, color .12s;
}
.ig-tt:hover { background: var(--accent-dark); color: var(--on-accent); }
.ig-tt .gm-icon { width: 12px; height: 12px; }
.ig-vid {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--soft-sage);
  color: var(--soft-sage-ink);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.ig-vid:hover { filter: brightness(.96); }
.ig-vid .gm-icon { width: 12px; height: 12px; }

/* thanh thao tác khi chọn dòng */
.ig-selbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px var(--space-6);
  border-top: 1px solid var(--border-light);
  background: var(--accent-soft);
}
.ig-selbar .sel { font-size: 13px; color: var(--text-secondary); }
.ig-selbar .spacer { flex: 1; }

/* bộ lọc đang có giá trị */
.gm-select.is-set { border-color: var(--line-active); background: var(--bg-surface); font-weight: 500; }

/* card chỉ chứa bảng */
.gm-card-tablewrap { padding-bottom: 0; }
.gm-card-tablewrap > .gm-table-wrap { margin: 0 calc(-1 * var(--card-px)); border-top: 1px solid var(--border-light); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.gm-card-tablewrap .gm-table th:first-child,
.gm-card-tablewrap .gm-table td:first-child { padding-left: var(--card-px); }
.gm-card-tablewrap .gm-table th:last-child,
.gm-card-tablewrap .gm-table td:last-child { padding-right: var(--card-px); }

/* hàng công tắc */
.ig-switchrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.ig-switchrow:last-child { border-bottom: 0; }
.ig-switchrow .t { flex: 1; min-width: 0; }
.ig-switchrow .n { font-weight: 500; font-size: 14px; display: block; }
.ig-switchrow:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: var(--radius-sm); }

.ig-email-change { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-email-change__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ig-email-change__head > div { min-width: 0; display: grid; gap: 3px; }
.ig-email-change__head span { color: var(--text-secondary); overflow-wrap: anywhere; }
.ig-email-change__checks { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; }
.ig-email-change__checks span { color: var(--text-secondary); font-size: 12px; }
.ig-email-change__checks .is-ok { color: var(--success-text); }
.ig-email-change small { display: block; margin-top: 8px; color: var(--text-muted); }
@media (max-width: 520px) {
  .ig-email-change__head { align-items: stretch; flex-direction: column; }
  .ig-email-change__head .gm-btn { width: 100%; }
  .ig-xbar-row > .gm-input, .ig-xbar-row > .gm-btn { width: 100%; }
}

/* thẻ vai trò bấm được */
.ig-rolecard {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.ig-rolecard:hover { border-color: var(--line-active); }
.ig-rolecard.on { border-color: var(--line-active);  }
.ig-rolecard .h { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ig-rolecard .h b { font-size: 16px; font-weight: 500; }
.ig-rolecard .d { font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.ig-role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.ig-role-detail-head { margin: 24px 0 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ig-role-detail-head h2 { margin: 0; }
.ig-role-detail-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 12px; }
.ig-role-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ig-role-form { display: grid; gap: 20px; }
@media (max-width: 860px) { .ig-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .ig-role-grid { grid-template-columns: minmax(0, 1fr); }
  .ig-role-detail-head { align-items: stretch; flex-direction: column; }
  .ig-role-actions { justify-content: stretch; }
  .ig-role-actions .gm-btn { flex: 1; }
}

/* danh sách chọn trong hộp thoại */
.ig-picklist { display: flex; flex-direction: column; gap: 2px; }
.ig-pickrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.ig-pickrow:hover { background: var(--bg-hover); }
.ig-pickrow .t { flex: 1; min-width: 0; }
.ig-pickrow .t b { display: block; font-size: 14px; font-weight: 500; }

/* hộp thoại */
.ig-modal {
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  animation: pop .14s ease-out;
}
.ig-modal.is-wide { width: min(640px, calc(100vw - 32px)); }
.ig-modal.is-security-unlock { width: min(540px, calc(100vw - 32px)); }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }
.ig-modal header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border-light);
}
.ig-modal header h2 { flex: 1; margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.ig-modal-body { padding: var(--space-5); overflow-y: auto; }
.ig-modal footer {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  padding: var(--space-3) var(--space-5) var(--space-4);
  border-top: 1px solid var(--border-light);
}

/* ============================================================ wizard tạo chiến dịch */
.ig-wzbar {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 9px var(--space-6);
}
/* Wizard booking dùng toàn bộ bề rộng vùng nội dung để bảng Creator/sản phẩm
   không bị ép vào khung 980px rồi phát sinh thanh kéo ngang. */
.ig-wzsteps { display: flex; align-items: center; gap: 8px; max-width: 1440px; margin: 0 auto; }
.ig-wzstep {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.ig-wzstep.is-off { cursor: default; }
.ig-wzstep:not(.is-off):hover { background: var(--bg-hover); }
.ig-wzstep .n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
  flex: none;
  transition: background .14s, border-color .14s, box-shadow .14s;
}
.ig-wzstep .n .gm-icon { width: 13px; height: 13px; stroke-width: 2.4; }
.ig-wzstep .t { font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--text-tertiary); transition: color .14s; }
.ig-wzstep.on .n { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ig-wzstep.on .t { color: var(--text-primary); font-weight: 500; }
.ig-wzstep.done .n { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); }
.ig-wzstep.done .t { color: var(--text-secondary); }
.ig-wzline { flex: 1; min-width: 14px; height: 2px; border-radius: 1px; background: var(--border-light); transition: background .18s; }
.ig-wzline.done { background: var(--accent-dark); }

.ig-wzbody { max-width: 1440px; margin: 0 auto; width: 100%; padding: 4px var(--space-6) var(--space-5); }
.ig-wzrow {
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: var(--space-5);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.ig-wzrow:last-child { border-bottom: 0; }
.ig-wzrow > .lb b { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.ig-wzrow > .lb p { margin: 0; font-size: 13px; line-height: 19px; color: var(--text-tertiary); }
.ig-wzrow .fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ig-wzgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ig-wzins { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ig-phone { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--space-2); }
.req { color: var(--danger); font-style: normal; margin-right: 3px; }

.gm-input .cnt { font-size: 12px; color: var(--text-tertiary); flex: none; align-self: flex-end; }
.gm-input-area .cnt { position: absolute; right: 12px; bottom: 8px; }
.gm-input-area { position: relative; }
.ig-pctin { width: 116px; }
.ig-pctin input { text-align: right; }

.gm-radio {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: inline-grid;
  place-items: center;
  flex: none;
}
.gm-radio.on { border-color: var(--accent-dark); border-width: 1.5px; }
.gm-radio.on::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-dark); }

.ig-optcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 10px; }
.ig-optcard {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 11px 36px 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.ig-optcard:hover { border-color: var(--text-tertiary); }
.ig-optcard.on { border-color: var(--line-active); background: var(--bg-canvas); }
.ig-optcard:hover > .gm-radio { border-color: var(--text-tertiary); }
.ig-optcard.is-off { opacity: .5; cursor: not-allowed; }
.ig-optcard.is-off:hover { border-color: var(--border); }
/* nút chọn ở góc: vòng mảnh khi chưa chọn, tích đặc khi đã chọn */
.ig-optcard > .gm-radio,
.ig-srccard > .gm-radio {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  transition: background .12s, border-color .12s;
}
.ig-optcard > .gm-radio::after,
.ig-srccard > .gm-radio::after { content: none; }
.ig-optcard > .gm-radio.on,
.ig-srccard > .gm-radio.on { background: var(--accent-dark); border-color: var(--accent-dark); }
.ig-optcard > .gm-radio.on::after,
.ig-srccard > .gm-radio.on::after {
  content: "";
  width: 8px;
  height: 4px;
  border: 1.8px solid var(--on-accent);
  border-top: 0;
  border-right: 0;
  border-radius: 1px;
  transform: translateY(-1px) rotate(-45deg);
}
.ig-optcard .tx { min-width: 0; }
.ig-optcard .tx b { display: block; font-size: 13.5px; font-weight: 500; letter-spacing: -.005em; }
.ig-optcard .tx > span { display: block; font-size: 12px; line-height: 17px; color: var(--text-tertiary); margin-top: 3px; }
.ig-optcard.on .tx > span { color: var(--text-secondary); }
/* nhãn khuyến nghị: mang nghĩa nên có màu riêng, không để xám */
.gm-tag-ok { background: var(--success); color: #fff; }
.gm-tag-hot { background: var(--danger); color: #fff; }
.ig-optcard .tx b .gm-tag {
  border: 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  height: 17px;
  padding: 0 6px;
  border-radius: var(--radius-xs);
  vertical-align: 2px;
  margin-left: 5px;
}
.ig-srccards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.ig-wzcheck { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13.5px; cursor: pointer; padding: 4px 0; }

.ig-wzsection { display: flex; flex-direction: column; gap: 10px; padding: 10px 0; }
.ig-wztools { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; color: var(--text-secondary); flex-wrap: wrap; }
.ig-wztools .spacer { flex: 1; }
.ig-wztable td { vertical-align: top; }
.ig-wztable th, .ig-wztable td { padding-left: var(--space-3); padding-right: var(--space-3); }
.ig-wztable { width: 100%; min-width: 780px; table-layout: fixed; }
.ig-wztable th:nth-child(1), .ig-wztable td:nth-child(1) { width: 4%; }
.ig-wztable th:nth-child(2), .ig-wztable td:nth-child(2) { width: 38%; }
.ig-wztable th:nth-child(3), .ig-wztable td:nth-child(3) { width: 17%; }
.ig-wztable th:nth-child(4), .ig-wztable td:nth-child(4) { width: 12%; }
.ig-wztable th:nth-child(5), .ig-wztable td:nth-child(5) { width: 13%; }
.ig-wztable th:nth-child(6), .ig-wztable td:nth-child(6) { width: 16%; }
.ig-wztable .gm-entity > div { min-width: 0; flex: 1; }
.ig-wztable .gm-entity .name, .ig-wztable .gm-entity .meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-wztable .ig-pctin { max-width: 100%; }
.ig-wztable .ig-wz-invalid .ig-wz-commission-error { color: var(--danger); }

.ig-wzpick { display: flex; flex-direction: column; gap: 10px; }
.ig-wzfilter { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-canvas); padding: 8px 10px; }
.ig-wzfhead { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 7px; }
.ig-wzfhead .spacer { flex: 1; }
.ig-wzfhead .gm-icon { vertical-align: -3px; margin-right: 4px; }
.ig-wzfrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ig-wzfrow .gm-select { background: var(--bg-surface); min-width: 0; }
.ig-wzfbar { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); flex-wrap: wrap; }
.ig-wzfbar .spacer { flex: 1; }
.ig-wzmanual-result > span:not(:last-child) { padding-right: 8px; border-right: 1px solid var(--border); }
.ig-wzmanual-error { color: var(--danger); }
.ig-wzmanual-unresolved { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-wzsearch { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.ig-wzsearch .spacer { flex: 1; }
.ig-wzsearch .ig-fsearch { max-width: 260px; }

.ig-cardlist { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.ig-cardrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 10px var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.ig-cardrow .t { flex: 1; min-width: 0; }
.ig-cardrow .t b { display: block; font-size: 13.5px; font-weight: 500; }

.ig-preview { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; max-width: 420px; }
.ig-preview-head { padding: 10px var(--space-4); background: var(--bg-canvas); border-bottom: 1px solid var(--border-light); font-size: 13px; font-weight: 500; }
.ig-preview-body { padding: var(--space-4); font-size: 13.5px; line-height: 20px; }
.ig-preview-body p { margin: 6px 0 0; color: var(--text-secondary); white-space: pre-wrap; }
.ig-preview-card { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); padding: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-md); font-size: 13px; }

/* Booking wizard: keep the action bar in the sheet while the wizard body
   owns the long scroll. This prevents the bar from covering the last table row
   and removes the blank tail caused by negative sticky offsets. */
.ig-content:has(> .ig-sheet .ig-wzfoot) { overflow: hidden; }
.ig-content > .ig-sheet:has(.ig-wzfoot) { flex: 1 1 auto; min-height: 0; }
.ig-sheet:has(.ig-wzfoot) { min-height: 0; }
.ig-sheet:has(.ig-wzfoot) .ig-wzbody {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.ig-wzfoot {
  position: static;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 9px 88px 9px var(--space-6);
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  flex: 0 0 auto;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--space-4));
  box-shadow: 0 -4px 14px rgba(18, 20, 21, .06);
}
.ig-wzfoot .spacer { flex: 1; }
.ig-wzfoot .sum { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.gm-btn.is-blocked { background: var(--bg-muted); border-color: var(--border-light); color: var(--text-disabled); }
.gm-btn.is-blocked:hover { background: var(--bg-muted); }
.ig-wzfoot .sum.warn { color: var(--warning-text); display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 900px) {
  .ig-wzrow { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .ig-wzstep .t { display: none; }
}

/* ============================================================ ô chọn ngày */
.ig-date { position: relative; }
.ig-date input[type="date"] {
  font: inherit;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  flex: 1;
  min-width: 0;
  padding: 0;
  font-variant-numeric: tabular-nums;
}
.ig-date input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.ig-date input[type="date"]::-webkit-datetime-edit { color: var(--text-primary); }
.ig-date input[type="date"]:invalid::-webkit-datetime-edit { color: var(--text-tertiary); }
.ig-date .pick { color: var(--text-tertiary); display: inline-grid; place-items: center; flex: none; }
.ig-date:hover .pick { color: var(--text-primary); }

/* ============================================================ nhóm lựa chọn 2 + 1 */
.ig-optcards.is-2 { grid-template-columns: 1fr 1fr; }
.ig-optcards.is-2 > .span { grid-column: 1 / -1; }
.ig-optcards.is-2 > .span .ig-optcard { width: 100%; }
@media (max-width: 780px) { .ig-optcards.is-2 { grid-template-columns: 1fr; } }

/* ============================================================ chip lọc nhanh */
.ig-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.ig-sheet > .ig-quick { margin: 0; padding: var(--space-4) var(--space-6) 0; }
.ig-sheet > .ig-quick + .ig-filters .ig-filters-bar { padding-top: var(--space-3); }
.ig-quick .lb { font-size: 12px; color: var(--text-secondary); margin-right: var(--space-1); }
.ig-qchip {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.ig-qchip:hover { border-color: var(--line-active); color: var(--text-primary); }
.ig-qchip .gm-icon { width: 12px; height: 12px; }
.ig-qchip.on { background: var(--accent-soft); border-color: var(--line-active); color: var(--accent-dark); font-weight: 500; }

/* ============================================================ popup chọn sản phẩm */
.ig-prodhead {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12.5px;
  color: var(--text-secondary);
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.ig-prodhead .spacer { flex: 1; }
.ig-prodhead .gm-icon { color: var(--text-tertiary); flex: none; }
.ig-prodlist { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow-y: auto; }
.ig-prodrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
}
.ig-prodrow:hover { background: var(--bg-hover); }
.ig-prodrow.on { background: var(--accent-soft); border-color: var(--accent-border); }
.ig-prodrow .th {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-tertiary);
  display: grid;
  place-items: center;
  flex: none;
}
.ig-prodrow .t { flex: 1; min-width: 0; }
.ig-prodrow .t b { display: block; font-size: 13.5px; font-weight: 500; }
.ig-prodrow .t .gm-help { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-prodcount { font-size: 13px; color: var(--text-secondary); }

/* ============================================================ ba nguồn Creator */
.ig-srccards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ig-srccard {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 34px 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  min-width: 0;
  transition: border-color .12s;
}
.ig-srccard .ic {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex: none;
  background: var(--bg-surface);
}
.ig-srccard .tx { flex: 1; min-width: 0; }
.ig-srccard .tx b { display: block; font-size: 13px; font-weight: 500; letter-spacing: -.005em; }
.ig-srccard .tx span { display: block; font-size: 11.5px; line-height: 16px; color: var(--text-secondary); margin-top: 1px; }

.ig-srccard.tone-sky { background: var(--soft-sky); }
.ig-srccard.tone-sky .ic { color: var(--soft-sky-ink); }
.ig-srccard.tone-sky.on { border-color: var(--soft-sky-ink); }
.ig-srccard.tone-sky.on > .gm-radio { background: var(--soft-sky-ink); border-color: var(--soft-sky-ink); }

.ig-srccard.tone-sage { background: var(--soft-sage); }
.ig-srccard.tone-sage .ic { color: var(--soft-sage-ink); }
.ig-srccard.tone-sage.on { border-color: var(--soft-sage-ink); }
.ig-srccard.tone-sage.on > .gm-radio { background: var(--soft-sage-ink); border-color: var(--soft-sage-ink); }

.ig-srccard.tone-lilac { background: var(--soft-lilac); }
.ig-srccard.tone-lilac .ic { color: var(--soft-lilac-ink); }
.ig-srccard.tone-lilac.on { border-color: var(--soft-lilac-ink); }
.ig-srccard.tone-lilac.on > .gm-radio { background: var(--soft-lilac-ink); border-color: var(--soft-lilac-ink); }

@media (max-width: 880px) { .ig-srccards { grid-template-columns: 1fr; } }

/* ============================================================ kênh liên hệ trong lời mời */
.ig-contacts { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ig-contact { display: flex; align-items: center; gap: 6px; width: 100%; }
.ig-contact .ig-cname { width: 148px; flex: none; justify-content: space-between; }
.ig-contact .ig-cname[disabled] { background: var(--bg-muted); color: var(--text-secondary); cursor: default; }
.ig-contact .ig-ccode { width: 104px; flex: none; justify-content: space-between; }
.ig-contact > .gm-input:last-of-type { flex: 1; min-width: 0; }
.ig-cpad { width: 30px; flex: none; }

/* ============================================================ ô nhập khoảng trong bộ lọc */
.ig-rng {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 12.5px;
}
.ig-rng.is-set { border-color: var(--line-active); }
.ig-rng .k { color: var(--text-tertiary); white-space: nowrap; }
.ig-rng i { color: var(--text-tertiary); font-style: normal; }
.ig-rng .u { color: var(--text-tertiary); }
.ig-rng input {
  all: unset;
  width: 54px;
  font-size: 12.5px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.ig-rng input::placeholder { color: var(--text-disabled); }
.ig-rng input::-webkit-outer-spin-button,
.ig-rng input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ============================================================ dải kế hoạch chia lô */
.ig-plan {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  min-height: 52px;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
  font-size: 12.5px;
  line-height: 1;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.ig-plan > * { flex: 0 0 auto; }
.ig-plan .v { color: var(--text-primary); font-weight: 500; }
.ig-plan .ic,
.ig-plan .ar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ig-plan .ic { width: 18px; height: 18px; color: var(--text-tertiary); }
.ig-plan .ar { width: 14px; height: 14px; color: var(--text-tertiary); }
.ig-plan .m { display: inline-flex; align-items: center; gap: 4px; line-height: 1; white-space: nowrap; }
.ig-plan .sub { display: inline-flex; align-items: center; color: var(--text-tertiary); font-size: 11px; line-height: 1; white-space: nowrap; }
.ig-plan-picker,
.ig-plan-count { display: inline-flex; align-items: center; gap: 6px; height: 32px; }
.ig-plan-picker .gm-select { min-width: 72px; }
.ig-plan-number { width: 108px; min-width: 108px; height: 32px; box-sizing: border-box; margin: 0; padding: 0 9px; }
.ig-plan-number input { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.ig-plan-number input::-webkit-outer-spin-button,
.ig-plan-number input::-webkit-inner-spin-button { margin: 0; }
.ig-plan-number.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 2px var(--soft-blush); }
.ig-plan-count-error { color: var(--danger); max-width: 520px; white-space: normal; line-height: 1.35; }
.ig-plan-auto { display: inline-flex; align-items: center; gap: 4px; height: 32px; color: var(--accent-dark); font-size: 12px; line-height: 1; white-space: nowrap; }
.ig-plan-auto.is-loading { color: var(--text-secondary); }
.ig-plan-auto.is-error { color: var(--danger); white-space: nowrap; }
.ig-plan-auto .gm-icon { flex: 0 0 auto; }
.ig-plan-limit { white-space: nowrap; line-height: 1; }
.ig-plan .ok,
.ig-plan .warn { display: inline-flex; align-items: center; gap: 4px; line-height: 1; white-space: nowrap; }
@media (max-width: 900px) {
  .ig-plan { gap: 8px; padding: 7px 9px; }
  .ig-plan-limit,
  .ig-plan-auto { white-space: nowrap; }
}
.ig-plan-hint { color: var(--text-secondary); font-size: 12px; margin-top: 6px; }
.ig-plan .spacer { flex: 1 1 auto; min-width: 12px; }
.ig-plan.is-over { border-color: var(--danger); background: var(--soft-blush); color: var(--soft-blush-ink); }

/* ============================================================ popup hạng mục 2 cấp */
.ig-cats { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 10px; height: 50vh; }
.ig-catcol { overflow-y: auto; border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 4px; }
.ig-catcol.is-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px; align-content: start; }
.ig-catl1 {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.ig-catl1 .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-catl1 .gm-icon { width: 14px; height: 14px; color: var(--text-tertiary); }
.ig-catl1:hover { background: var(--bg-canvas); }
.ig-catl1.on { background: var(--bg-muted); font-weight: 500; }
.ig-catl2 {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}
.ig-catl2:hover { background: var(--bg-canvas); }
.ig-catl2.on { color: var(--text-primary); font-weight: 500; }

/* ============================================================ điều chỉnh kế hoạch */
.ig-tkpick { display: grid; place-items: center; padding: var(--space-5) var(--space-6); }
.ig-tkgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 760px; }
.ig-tkcard {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 38px 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.ig-tkcard:hover { border-color: var(--text-tertiary); }
.ig-tkcard > .gm-radio {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
}
.ig-tkcard > .gm-radio::after { content: none; }
.ig-tkcard > .gm-radio.on::after {
  content: "";
  width: 8px;
  height: 4px;
  border: 1.8px solid var(--on-accent);
  border-top: 0;
  border-right: 0;
  border-radius: 1px;
  transform: translateY(-1px) rotate(-45deg);
}
.ig-tkcard .ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.ig-tkcard .tx { min-width: 0; }
.ig-tkcard .tx b { display: block; font-size: 13.5px; font-weight: 500; letter-spacing: -.005em; }
.ig-tkcard .tx span { display: block; font-size: 12px; line-height: 17.5px; color: var(--text-tertiary); margin-top: 4px; }
.ig-tkcard.tone-blush .ic { background: var(--soft-blush); color: var(--soft-blush-ink); }
.ig-tkcard.tone-blush.on { border-color: var(--soft-blush-ink); }
.ig-tkcard.tone-blush.on > .gm-radio { background: var(--soft-blush-ink); border-color: var(--soft-blush-ink); }
.ig-tkcard.tone-sage .ic { background: var(--soft-sage); color: var(--soft-sage-ink); }
.ig-tkcard.tone-sage.on { border-color: var(--soft-sage-ink); }
.ig-tkcard.tone-sage.on > .gm-radio { background: var(--soft-sage-ink); border-color: var(--soft-sage-ink); }
.ig-tkcard.tone-sky .ic { background: var(--soft-sky); color: var(--soft-sky-ink); }
.ig-tkcard.tone-sky.on { border-color: var(--soft-sky-ink); }
.ig-tkcard.tone-sky.on > .gm-radio { background: var(--soft-sky-ink); border-color: var(--soft-sky-ink); }
.ig-tkcard.tone-sand .ic { background: var(--soft-sand); color: var(--soft-sand-ink); }
.ig-tkcard.tone-sand.on { border-color: var(--soft-sand-ink); }
.ig-tkcard.tone-sand.on > .gm-radio { background: var(--soft-sand-ink); border-color: var(--soft-sand-ink); }
@media (max-width: 820px) { .ig-tkgrid { grid-template-columns: 1fr; } }

.ig-tkcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 var(--space-6) 8px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.ig-tkcrumb .gm-icon { width: 13px; height: 13px; }
.ig-tkcrumb b { color: var(--text-primary); font-weight: 500; }

.ig-tkcell b { display: block; font-size: 13px; font-weight: 500; }
.ig-tkcell span { display: block; font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }
.ig-tktype { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.ig-tktype i { width: 22px; height: 22px; border-radius: var(--radius-xs); display: grid; place-items: center; flex: none; }
.ig-tktype i .gm-icon { width: 13px; height: 13px; }
.ig-tktype i.tone-blush { background: var(--soft-blush); color: var(--soft-blush-ink); }
.ig-tktype i.tone-sage { background: var(--soft-sage); color: var(--soft-sage-ink); }
.ig-tktype i.tone-sky { background: var(--soft-sky); color: var(--soft-sky-ink); }
.ig-tktype i.tone-sand { background: var(--soft-sand); color: var(--soft-sand-ink); }
.ig-tkstat { display: inline-flex; align-items: baseline; gap: 4px; font-size: 11.5px; color: var(--text-tertiary); margin-right: 8px; }
.ig-tkstat b { font-size: 12.5px; color: var(--text-primary); }
.ig-task-list { overflow-x: auto; border-bottom: 1px solid var(--border-light); }
.ig-task-list .gm-table { min-width: 980px; }
.ig-task-list .gm-table th:first-child, .ig-task-list .gm-table td:first-child { min-width: 190px; }
.ig-task-list .gm-table th:nth-child(2), .ig-task-list .gm-table td:nth-child(2) { min-width: 190px; }
@media (max-width: 640px) {
  .ig-task-list .gm-table { min-width: 900px; }
  .ig-task-list .gm-table th, .ig-task-list .gm-table td { padding: 10px 12px; }
}

.ig-tktable { border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-surface); }
.ig-tktable .gm-table-wrap { max-height: 42vh; }
.ig-tknum { height: 26px; width: 84px; padding: 0 6px; }
.ig-tknum input { text-align: right; font-variant-numeric: tabular-nums; }
.ig-tknum .u { font-size: 12px; color: var(--text-tertiary); }
.ig-tkpreview { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); }
.ig-tkpreview span {
  padding: 3px 8px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-xs);
  font-variant-numeric: tabular-nums;
}

/* ============================================================ quản lý mẫu */
.ig-synced {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-right: var(--space-2);
  white-space: nowrap;
}
.ig-synced .gm-icon { width: 14px; height: 14px; }
.ig-synced b { color: var(--text-secondary); font-weight: 500; font-variant-numeric: tabular-nums; }

.ig-sampcr { display: flex; align-items: center; gap: 10px; min-width: 230px; max-width: 300px; }
.ig-sampcr .gm-avatar { flex: none; }
.ig-sampcr .tx { min-width: 0; }
.ig-sampcr .n { display: flex; align-items: center; gap: 4px; font-size: 14px; line-height: 22px; flex-wrap: wrap; }
.ig-sampcr .n .gm-tag { font-size: 11px; height: 18px; padding: 0 6px; }
.ig-sampcr .s { font-size: 12px; line-height: 18px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-sampcr .more {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: var(--radius-xs);
  background: var(--bg-muted);
  color: var(--text-secondary);
  cursor: help;
}

.ig-sampprod { display: flex; align-items: center; gap: 10px; min-width: 210px; max-width: 280px; }
.ig-sampprod .th {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-tertiary);
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
}
.ig-sampprod .th > img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.ig-sampprod .th > .fallback { width: 100%; height: 100%; place-items: center; }
.ig-sampprod .tx { min-width: 0; }
.ig-sampprod .tx b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.ig-sampprod .tx span { display: flex; align-items: center; white-space: nowrap; font-size: 12px; line-height: 18px; color: var(--text-secondary); margin-top: 2px; }

.ig-copy {
  all: unset;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-xs);
  color: var(--text-tertiary);
  vertical-align: -4px;
  margin-left: 3px;
}
.ig-copy:hover { background: var(--bg-muted); color: var(--text-primary); }
.ig-copy .gm-icon { width: 12px; height: 12px; }

.gm-help.is-late { color: var(--danger); font-weight: 500; }
.gm-table th .gm-icon.sw { width: 12px; height: 12px; margin-left: 3px; vertical-align: -2px; color: var(--text-disabled); }

/* lý do từ chối trong popup duyệt mẫu */
.ig-reasons { display: flex; flex-direction: column; gap: 6px; }
.ig-reason {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13.5px;
  transition: border-color .12s, background .12s;
}
.ig-reason:hover { border-color: var(--text-tertiary); }
.ig-reason.on { border-color: var(--line-active); background: var(--bg-canvas); }
.ig-reason .ic {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  flex: none;
}
.ig-reason.on .ic { background: var(--soft-blush); color: var(--soft-blush-ink); }
.ig-reason .t { flex: 1; min-width: 0; }

/* popup gửi tin nhắn mẫu */
.ig-msgrow { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: var(--space-3); padding: 10px 0; }
.ig-msgrow + .ig-msgrow { border-top: 1px solid var(--border-light); }
.ig-msgrow .lb { font-size: 13px; color: var(--text-secondary); padding-top: 7px; }
.ig-msgrow .bd { min-width: 0; }
.ig-msgcard {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-canvas);
}
.ig-msgcard .gm-icon { width: 18px; height: 18px; color: var(--text-secondary); flex: none; }
.ig-msgcard b { display: block; font-size: 13px; font-weight: 500; }
.ig-msgcard span { display: block; font-size: 12px; line-height: 17px; color: var(--text-tertiary); margin-top: 2px; }
.ig-msgup {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
}
.ig-msgup:hover { border-color: var(--line-active); color: var(--text-primary); }
.ig-msgup small { display: block; font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.ig-msgpic {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
}
.ig-msgpic .gm-icon { width: 16px; height: 16px; color: var(--text-tertiary); }
.ig-msgpic span { flex: 1; min-width: 0; }
@media (max-width: 700px) { .ig-msgrow { grid-template-columns: minmax(0, 1fr); } }

/* hành trình vận chuyển */
.ig-trail { list-style: none; margin: 14px 0 0; padding: 0; }
.ig-trail li { position: relative; display: flex; gap: 12px; padding: 0 0 16px 0; }
.ig-trail li .dot {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-surface);
}
.ig-trail li.on .dot { border-color: var(--accent-dark); background: var(--accent-dark); }
.ig-trail li:not(:last-child) .dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12px;
  width: 1px;
  height: calc(100% + 14px);
  transform: translateX(-50%);
  background: var(--border-light);
}
.ig-trail li b { display: block; font-size: 13px; font-weight: 500; }
.ig-trail li span { display: block; font-size: 12.5px; line-height: 18px; color: var(--text-secondary); margin-top: 2px; }
.ig-trail li i {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ============================================================ nội dung Creator đã đăng */
/* tab cấp hai: chữ thường, mục đang chọn chữ đen — như "Tài khoản nhà quảng cáo"
   dưới tab chính trên trang Tài khoản của TikTok */
.ig-subtabs { display: flex; gap: var(--space-6); padding: var(--space-4) var(--space-6) 0; }
.ig-subtabs button {
  all: unset;
  cursor: pointer;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-secondary);
}
.ig-subtabs button:hover { color: var(--text-primary); }
.ig-subtabs button.on { color: var(--accent-dark); font-weight: 500; }
.ig-sheet > .ig-subtabs + .gm-tabs { border-top: 0; }

.ig-appr { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.ig-appr .gm-icon { width: 13px; height: 13px; color: var(--text-tertiary); }
.ig-appr.is-auto .gm-icon { color: var(--soft-sage-ink); }

.ig-clink {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}
.ig-clink:hover { background: var(--bg-canvas); }
.ig-clink > .gm-icon { width: 14px; height: 14px; color: var(--text-secondary); flex: none; }
.ig-clink b { display: block; font-size: 13px; font-weight: 500; }
.ig-clink small { display: block; font-size: 11.5px; color: var(--text-tertiary); margin-top: 1px; }

.ig-stars { font-size: 13px; color: var(--warning); letter-spacing: 1px; white-space: nowrap; cursor: help; }
.ig-stars i { color: var(--border); font-style: normal; }

.ig-drawer-body { overflow-y: auto; flex: 1; display: flex; flex-direction: column; }
.ig-drawer-body > .gm-tabs { padding: 0 var(--space-4); }
.ig-ctlist { padding: var(--space-4); display: flex; flex-direction: column; gap: 10px; }
.ig-ct {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.ig-ct .th {
  width: 84px;
  height: 112px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-tertiary);
  display: grid;
  place-items: center;
  flex: none;
  text-decoration: none;
}
.ig-ct .th:hover { background: var(--bg-canvas); color: var(--text-primary); }
.ig-ct .th .gm-icon { width: 22px; height: 22px; }
.ig-ct .bd { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ig-ct .bd b { font-size: 13.5px; font-weight: 500; line-height: 19px; }
.ig-ct .when { font-size: 12px; color: var(--text-tertiary); }
.ig-ct .ms { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--text-secondary); }
.ig-ct .ms span { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.ig-ct .ms .gm-icon { width: 13px; height: 13px; color: var(--text-tertiary); }
.ig-ct .gm-btn { align-self: flex-start; margin-top: 2px; }

.ig-rate { display: flex; align-items: center; gap: 4px; }
.ig-rate button {
  all: unset;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--border);
  padding: 0 1px;
}
.ig-rate button:hover, .ig-rate button.on { color: var(--warning); }
.ig-rate .lb { margin-left: 8px; font-size: 13px; color: var(--text-secondary); }

/* ============================================================ kênh liên hệ trong lời mời (bản gọn) */
.ig-contacts { gap: 5px; }
.ig-contact { gap: 5px; }
.ig-contact .ig-cname { width: 132px; }
.ig-contact .ig-cname.is-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 28px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  flex: none;
}
.ig-contact .ig-cname.is-lock .req { color: var(--danger); font-style: normal; margin-left: 2px; }
.ig-contact .ig-ccode { width: 92px; }
.ig-contact .gm-btn-icon { width: 28px; height: 28px; flex: none; }
.ig-contact .gm-btn-icon .gm-icon { width: 14px; height: 14px; }
.ig-cpad { width: 28px; }
.ig-caddmore {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  padding: 3px 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.ig-caddmore:hover { color: var(--accent-dark); }
.ig-caddmore .gm-icon { width: 14px; height: 14px; }

/* popup chọn mẫu có sẵn */
.ig-tpllist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 52vh; overflow-y: auto; }
.ig-tplcard {
  all: unset;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-sizing: border-box;
}
.ig-tplcard:hover { border-color: var(--line-active); background: var(--bg-canvas); }
.ig-tplcard .hd { display: flex; align-items: baseline; gap: 8px; }
.ig-tplcard .hd b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; }
.ig-tplcard .bd {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 18px;
  color: var(--text-secondary);
}
.ig-tplcard .vr { font-size: 11.5px; color: var(--text-tertiary); }
@media (max-width: 760px) { .ig-tpllist { grid-template-columns: 1fr; } }

/* ============================================================ thẻ cửa hàng */
/* theo ô số liệu của Trung tâm doanh nghiệp: tên + trạng thái, 2 ô số,
   các dòng phụ nhãn trái giá trị phải, hành động ở đáy */
.ig-shopcard { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.ig-shopcard header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.ig-shopcard .nm { font-size: 16px; line-height: 24px; font-weight: 500; }
.ig-shopcard .meta { margin: -8px 0 0; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.ig-shopcard-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.ig-shopcard-stats .gm-stat { padding: var(--space-3); }
.ig-rows { margin: 0; display: flex; flex-direction: column; }
.ig-rows > div { display: flex; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.ig-rows > div:last-child { border-bottom: 0; }
.ig-rows dt { color: var(--text-secondary); }
.ig-rows dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ig-warn { color: var(--warning-text); font-weight: 500; }
.ig-shopcard footer { display: flex; gap: var(--space-2); margin-top: auto; }
.ig-shopcard footer .gm-btn { flex: 1; height: 32px; padding: 0 var(--space-3); font-size: 13px; }

/* ============================================================ dải thông tin ngang */
.gm-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3) var(--space-4); }
.gm-facts dt { font-size: 12px; line-height: 18px; color: var(--text-secondary); margin-bottom: 2px; }
.gm-facts dd { margin: 0; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }

/* thẻ quy tắc tự động: công tắc cạnh tên, card tắt thì chữ nhạt đi */
.ig-rule .gm-card-title { display: flex; align-items: center; gap: var(--space-2); }
.ig-rule .gm-card-title .gm-tag { font-size: 11px; height: 20px; }
.ig-rule .gm-card-head { padding-bottom: var(--space-3); margin-bottom: var(--space-3); border-bottom: 1px solid var(--border-light); }
.ig-rule.is-off .gm-facts dd { color: var(--text-secondary); }
.ig-section > .ig-rule + .ig-rule { margin-top: 0; }

/* ============================================================ hồ sơ / form */
.ig-me { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-4); margin-bottom: var(--space-4); border-bottom: 1px solid var(--border-light); }
.ig-me .gm-avatar { width: 52px; height: 52px; }
.ig-me .t { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-2); }
.ig-me .t b { font-size: 16px; line-height: 24px; font-weight: 500; }
.ig-me .t small { flex-basis: 100%; font-size: 12px; color: var(--text-secondary); }
.ig-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-4); }
.ig-form-2 .span2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .ig-form-2 { grid-template-columns: 1fr; } }
.ig-modal.is-creator-form { width: min(820px, calc(100vw - 32px)); }
.ig-creator-form { display: grid; gap: 18px; }
.ig-creator-form-section { display: grid; gap: 13px; }
.ig-creator-form-section + .ig-creator-form-section { padding-top: 18px; border-top: 1px solid var(--border-light); }
.ig-creator-form-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.ig-creator-form-heading b { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ig-creator-form-heading span { max-width: 60%; color: var(--text-secondary); font-size: 11px; line-height: 17px; text-align: right; }
.ig-creator-form .gm-field { min-width: 0; }
.ig-creator-form .gm-input input,
.ig-creator-form .gm-input select { min-width: 0; }
.ig-creator-tags { max-height: 180px; padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; overflow-y: auto; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-creator-tag-option { min-width: 0; padding: 9px 10px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--bg-surface); cursor: pointer; }
.ig-creator-tag-option:hover { border-color: var(--border); }
.ig-creator-tag-option input { width: 16px; height: 16px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.ig-creator-tag-option span { min-width: 0; display: grid; gap: 2px; }
.ig-creator-tag-option b { overflow-wrap: anywhere; font-size: 12px; font-weight: 500; }
.ig-creator-tag-option small { overflow-wrap: anywhere; color: var(--text-secondary); font-size: 10px; line-height: 15px; }
.ig-creator-empty-tags { padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--bg-subtle); font-size: 12px; }
.ig-creator-form-error { padding: 10px 12px; border-radius: var(--radius-sm); color: var(--danger-text); background: var(--danger-soft); font-size: 12px; line-height: 18px; }
.ig-creator-form-error[hidden] { display: none; }
.ig-creator-submit.is-loading { cursor: wait; opacity: .7; }
@media (max-width: 720px) {
  .ig-modal.is-creator-form { width: calc(100vw - 16px); }
  .ig-creator-form { gap: 15px; }
  .ig-creator-form-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .ig-creator-form-heading span { max-width: none; text-align: left; }
  .ig-creator-tags { grid-template-columns: minmax(0, 1fr); }
}
.gm-table .nw { white-space: nowrap; }
.gm-table div.nw { white-space: nowrap; }
.ig-clamp { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; min-width: 160px; max-width: 220px; }
/* ô chỉ chứa tag / nút thì giữ một dòng, tránh hàng bảng cao vọt khi bảng co */
.gm-table td:has(> .gm-tag),
.gm-table td:has(> .ig-vid),
.gm-table td:has(> .ig-appr) { white-space: nowrap; }
.gm-entity .name { white-space: nowrap; }
.gm-table td .gm-help { white-space: nowrap; }
.gm-table td .ig-campaign-issue {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ig-campaign-issue.is-warning { color: var(--warning-text); }

/* ============================================================ đầu section có link bên phải */
.ig-sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ig-sec-head h2 { font-size: 18px; line-height: 26px; font-weight: 500; margin: 0; }
.ig-section > h2 { margin-top: var(--space-2); }
.ig-section > .ig-sec-head:not(:first-child) { margin-top: var(--space-2); }

/* việc cần xử lý: ô icon tô theo mức độ, như "Trạng thái tài khoản" của TikTok */
.ig-todo li { gap: var(--space-3); }
.ig-todo .ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.ig-todo .ic .gm-icon { width: 16px; height: 16px; }
.ig-runs .r1 b { font-weight: 500; color: var(--accent-dark); }
.gm-funnel .cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-tertiary); margin-bottom: 2px; }
.gm-funnel .rate { color: var(--text-primary); }
/* tag bấm được (chọn vai trò…): bỏ viền mặc định của button */
button.gm-tag { border: 0; font-family: inherit; cursor: pointer; }
button.gm-tag:hover { box-shadow: inset 0 0 0 1px var(--accent-border); }
button.gm-tag .gm-icon { width: 12px; height: 12px; }

/* ============================================================ phạm vi xem & breadcrumb */
.ig-page-head h1 { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.ig-scope {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--space-2);
  border-radius: var(--radius-pill); border: 1px solid var(--border-light); background: var(--bg-surface);
  font-size: 12px; font-weight: 400; line-height: 22px; color: var(--text-secondary); white-space: nowrap;
}
.ig-scope .gm-icon { width: 12px; height: 12px; }
.ig-scope.is-all { background: var(--accent-soft); border-color: transparent; color: var(--accent-dark); font-weight: 500; }
.ig-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); margin-bottom: 2px; }
.ig-crumb a { color: var(--text-secondary); text-decoration: none; }
.ig-crumb a:hover { color: var(--accent-dark); }
.ig-crumb .gm-icon { width: 12px; height: 12px; color: var(--text-tertiary); }
.ig-crumb .gm-tag { margin-left: var(--space-1); }

/* bộ chọn shop khi trang cần một shop */
.ig-pickshop {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: var(--space-4); border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface);
}
.ig-pickshop:hover { border-color: var(--line-active); background: var(--bg-canvas); }
.ig-pickshop b { font-size: 16px; line-height: 24px; font-weight: 500; }
.ig-shop .flag .gm-icon { width: 16px; height: 16px; }

/* badge đỏ cho số việc tồn trên sidebar */
.gm-nav-item .gm-badge.is-alert { background: var(--danger); color: #ffffff; }

/* ============================================================ panel GOPUSH AI */
.ig-aibtn { gap: 6px; }
.ig-aibtn .gm-icon { color: var(--accent-bright); }
.ig-aibtn.on { background: var(--accent-dark); }
.ig-aibtn.on .gm-icon { color: #ffffff; }
.ig-app.ai-open .ig-body { grid-template-columns: var(--size-sidebar) minmax(0, 1fr) 400px; }
.ig-app.ai-open.sub-collapsed .ig-body { grid-template-columns: var(--size-sidebar-collapsed) minmax(0, 1fr) 400px; }
.ig-aipanel {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--bg-surface); border-left: 1px solid var(--border-light);
}
.ig-aipanel > header { display: flex; align-items: center; gap: var(--space-2); height: 52px; padding: 0 var(--space-3) 0 var(--space-4); border-bottom: 1px solid var(--border-light); }
.ig-aipanel > header b { font-size: 16px; font-weight: 500; }
.ig-aipanel .spacer { flex: 1; }
.ig-ai-ctx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-light); background: var(--bg-canvas); }
.ig-ai-ctx .h { font-size: 12px; color: var(--text-tertiary); margin-right: 2px; }
.ig-ai-ctx .gm-tag { height: 22px; font-weight: 400; background: var(--bg-surface); border: 1px solid var(--border-light); color: var(--text-primary); }
.ig-ai-ctx .gm-tag-ink { background: var(--accent-soft); border-color: transparent; color: var(--accent-dark); }
.ig-ai-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.ig-aipanel .ig-chat-wrap { padding: var(--space-4); gap: var(--space-4); max-width: none; }
.ig-aipanel .ig-msg .body { font-size: 13px; line-height: 20px; }
.ig-aipanel .ig-msg.me .bubble { max-width: 88%; font-size: 13px; }
.ig-aipanel footer { padding: var(--space-3) var(--space-4) var(--space-4); border-top: 1px solid var(--border-light); display: flex; flex-direction: column; gap: var(--space-2); }
.ig-aipanel .ig-suggests button { height: 26px; font-size: 12px; padding: 0 10px; }
.ig-aipanel .ig-composer-box { border-radius: var(--radius-md); padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3); box-shadow: none; }
.ig-aipanel .ig-composer-row .gm-help { font-size: 11px; }
@media (max-width: 1100px) {
  .ig-app.ai-open .ig-aipanel { position: fixed; top: var(--size-topbar); right: 0; bottom: 0; width: min(400px, 100vw); z-index: 30; box-shadow: var(--shadow-pop); }
  .ig-app.ai-open .ig-body { grid-template-columns: var(--size-sidebar-collapsed) 1fr; }
}

/* ============================================================ Việc cần xử lý */
.ig-inbox-t { display: flex; align-items: center; gap: var(--space-3); min-width: 280px; }
.ig-inbox-t .ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.ig-inbox-t .ic .gm-icon { width: 16px; height: 16px; }
.ig-inbox-t b { display: block; font-weight: 400; font-size: 14px; line-height: 20px; }
.ig-inbox-t span:not(.ic) { display: block; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.ig-sev { position: relative; padding-left: var(--space-4); }
.ig-sev::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; }
.ig-sev.is-4::before { background: var(--danger); }
.ig-sev.is-2::before { background: var(--warning); }
.ig-sev.is-0::before { background: var(--accent); }

/* ============================================================ chi tiết chiến dịch */
/* phễu ngang: mỗi bước là một ô bấm được, vạch dưới cho thấy độ lớn so với bước đầu */
.ig-cfunnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2); }
.ig-cstep {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; padding: var(--space-3) var(--space-3) var(--space-4);
  border-radius: var(--radius-md); background: var(--bg-canvas); border: 1px solid transparent;
}
.ig-cstep:hover { border-color: var(--accent-border); }
.ig-cstep.on { background: var(--accent-soft); border-color: var(--line-active); }
.ig-cstep .l { font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.ig-cstep b { font-size: 20px; line-height: 28px; font-weight: 500; }
.ig-cstep .r { font-size: 12px; color: var(--text-tertiary); }
.ig-cstep i { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.ig-cstep + .ig-cstep::before { content: ""; position: absolute; left: -6px; top: 50%; width: 4px; height: 4px; }
.ig-cmeta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); font-size: 13px; color: var(--text-secondary); }
.ig-cmeta span { display: inline-flex; align-items: center; gap: 6px; }
.ig-cmeta .gm-icon { width: 14px; height: 14px; color: var(--text-tertiary); }
.ig-cmeta b { color: var(--text-primary); font-weight: 500; }
@media (max-width: 1100px) { .ig-cfunnel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ============================================================ Pipeline Creator */
.gm-seg button { display: inline-flex; align-items: center; gap: 4px; }
.gm-seg button .gm-icon { width: 13px; height: 13px; }
.ig-kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: var(--space-3); padding: 0 var(--space-6) var(--space-6); overflow-x: auto; }
.ig-kcol { display: flex; flex-direction: column; min-width: 0; border-radius: var(--radius-md); background: var(--bg-canvas); border: 1px dashed transparent; transition: border-color .12s, background .12s; }
.ig-kcol.is-over { border-color: var(--line-active); background: var(--accent-soft); }
.ig-kcol header { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); }
.ig-kcol header .ic { width: 24px; height: 24px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.ig-kcol header .ic .gm-icon { width: 14px; height: 14px; }
.ig-kcol header b { font-weight: 500; }
.ig-kcol header .gmv { margin-left: auto; font-size: 12px; color: var(--text-secondary); }
.ig-kbody { display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--space-2) var(--space-2); max-height: 640px; overflow-y: auto; }
.ig-kcard {
  cursor: grab; display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3);
  border-radius: var(--radius-sm); background: var(--bg-surface); border: 1px solid var(--border-light);
  transition: border-color .12s, opacity .12s;
}
.ig-kcard:hover { border-color: var(--accent-border); }
.ig-kcard.is-drag { opacity: .45; }
.ig-kcard .h { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.ig-kcard .h > div { min-width: 0; }
.ig-kcard .h b { display: block; font-weight: 500; font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-kcard .h span:not(.gm-avatar) { display: block; font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.ig-kcard .m, .ig-kcard .f { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 12px; color: var(--text-secondary); }
.ig-kcard .m b { color: var(--text-primary); font-weight: 500; }
.ig-kcard .f .gm-help { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-kbody .more { margin: var(--space-1) 0; text-align: center; font-size: 12px; color: var(--text-tertiary); }

/* tóm tắt trong hồ sơ Creator */
.ig-crsum { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); margin-bottom: var(--space-3); }
.ig-crsum span { display: flex; flex-direction: column; padding: var(--space-2); border-radius: var(--radius-sm); background: var(--bg-canvas); font-size: 11px; color: var(--text-secondary); }
.ig-crsum b { font-size: 15px; line-height: 22px; color: var(--text-primary); font-weight: 500; }
.ig-timeline .tx .gm-icon { width: 13px; height: 13px; color: var(--text-tertiary); vertical-align: -2px; }
.ig-app.ai-open ~ .ig-support { display: none; }
.ig-kanban { grid-template-columns: repeat(5, minmax(236px, 1fr)); }
.ig-kcol header b { white-space: nowrap; }
.ig-kcol header .gmv { white-space: nowrap; font-size: 11px; }

/* ============================================================ sidebar dạng accordion */
/* dòng module là nút bấm: mở / thu menu con, mũi tên xoay, menu con trượt ra */
button.gm-nav-item { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; }
.ig-navgrp .gm-chev { transition: transform .16s ease; }
.ig-navgrp.is-open > .gm-nav-item .gm-chev { transform: rotate(180deg); }
.ig-navsub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .18s ease; }
.ig-navsub > div { overflow: hidden; min-height: 0; }
.ig-navgrp.is-open > .ig-navsub { grid-template-rows: 1fr; }
.ig-navgrp > .gm-nav-item .ig-navdot { margin-left: auto; }
.ig-navgrp > .gm-nav-item .ig-navdot + .gm-chev { margin-left: 6px; }
.ig-navgrp.is-open > .gm-nav-item .ig-navdot { display: none; }
.ig-navgrp > .gm-nav-item:hover .gm-chev { color: var(--text-primary); }

/* ============================================================ topbar gọn tối đa */
/* phạm vi shop: tên + dòng hạn mức lời mời hôm nay */
.ig-shop { height: 44px; gap: 10px; max-width: 320px; }
.ig-shop .txt { gap: 3px; }
.ig-shop .nm { display: flex; align-items: center; gap: 6px; }
.ig-shop .qt { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 13px; color: var(--text-on-topbar-muted); white-space: nowrap; }
.ig-shop .qt .gm-num { color: var(--text-inverse); font-weight: 500; }
.ig-shop .qt .track { width: 40px; height: 3px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.ig-shop .qt .track i { display: block; height: 100%; background: var(--accent-bright); }
.ig-shop .qt.is-high .track i { background: var(--warning); }
.ig-shop .qt.is-high .gm-num { color: #ffc58f; }

/* ô Tìm hoặc hỏi AI */
.ig-cmd {
  position: relative; display: flex; align-items: center; gap: var(--space-2);
  width: min(460px, 38vw); height: 36px; padding: 0 6px 0 var(--space-3);
  border-radius: var(--radius-pill); background: var(--bg-topbar-pill); color: var(--text-inverse);
  transition: background .12s, box-shadow .12s;
}
.ig-cmd:hover { background: var(--bg-topbar-pill-hover); }
.ig-cmd:focus-within { background: var(--bg-topbar-pill-hover); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.ig-cmd > .gm-icon { width: 15px; height: 15px; color: var(--text-on-topbar-muted); }
.ig-cmd input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 13px; }
.ig-cmd input::placeholder { color: var(--text-on-topbar-muted); }
.ig-cmd input::-webkit-search-cancel-button { display: none; }
.ig-cmd > kbd { flex: none; }
kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--radius-xs); font-family: inherit; font-size: 11px; line-height: 1;
  background: rgba(255, 255, 255, 0.12); color: var(--text-on-topbar-muted);
}
.ig-cmdpop {
  position: absolute; top: calc(100% + 8px); right: 0; width: max(100%, 520px); max-height: min(520px, 70vh); overflow-y: auto;
  z-index: 55; padding: 6px; border-radius: var(--radius-md); border: 1px solid var(--border-light);
  background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-pop);
}
.ig-cmdpop[hidden] { display: none; }
.ig-cmdpop .h { padding: 8px 10px 4px; font-size: 12px; color: var(--text-tertiary); }
.ig-cmdpop .it {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: var(--space-3);
  padding: 8px 10px; border-radius: var(--radius-sm);
}
.ig-cmdpop .it > .gm-icon { color: var(--text-secondary); }
.ig-cmdpop .it .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ig-cmdpop .it b { font-weight: 400; font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-cmdpop .it small { font-size: 12px; line-height: 16px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-cmdpop .it.is-sel { background: var(--accent-soft); }
.ig-cmdpop .it.is-sel > .gm-icon { color: var(--accent-dark); }
.ig-cmdpop .it.is-ai > .gm-icon { color: var(--accent-dark); }
.ig-cmdpop .it.is-ai b { color: var(--accent-dark); font-weight: 500; }
.ig-cmdpop kbd, .ig-menu kbd { background: var(--bg-subtle); color: var(--text-secondary); }
.ig-cmdpop .foot { display: flex; gap: var(--space-4); padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-tertiary); }
.ig-cmdpop .foot span { display: inline-flex; align-items: center; gap: 4px; }

/* avatar: chỉ ảnh + mũi tên */
.ig-avatarbtn {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  height: 36px; padding: 0 8px 0 4px; border-radius: var(--radius-pill); color: var(--text-on-topbar-muted);
}
.ig-avatarbtn:hover { background: var(--bg-topbar-pill); }
.ig-avatarbtn:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.ig-avatarbtn .gm-avatar { width: 30px; height: 30px; }
.ig-avatarbtn > .gm-icon { width: 14px; height: 14px; }

/* menu avatar: tài khoản, tùy chỉnh, trợ giúp */
.ig-me-mini { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.ig-me-mini .gm-avatar { width: 36px; height: 36px; }
.ig-me-mini b { display: block; font-weight: 500; }
.ig-me-mini small { display: block; font-size: 12px; color: var(--text-secondary); }
.ig-menu .sep { height: 1px; background: var(--border-light); margin: 4px 0; }
.ig-menu .row { display: flex; align-items: center; gap: var(--space-2); padding: 6px 8px; font-size: 14px; }
.ig-menu .row > span:not(.gm-seg):not(.gm-switch) { flex: 1; }
.ig-menu .row .gm-switch { cursor: pointer; }
.ig-menu .gm-seg button { all: unset; cursor: pointer; height: 22px; padding: 0 8px; border-radius: var(--radius-xs); font-size: 12px; color: var(--text-secondary); }
.ig-menu .gm-seg button.on { background: var(--bg-surface); color: var(--accent-dark); font-weight: 500; }

/* không còn chuông: khi sidebar thu về cột icon, việc tồn hiện thành chấm đỏ trên icon */
.ig-navgrp > .gm-nav-item { position: relative; }
.ig-app.sub-collapsed .ig-navgrp > .gm-nav-item .ig-navdot {
  display: block; position: absolute; top: 7px; right: 14px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0;
  box-shadow: 0 0 0 2px var(--bg-surface);
}
@media (max-width: 1100px) {
  .ig-navgrp > .gm-nav-item .ig-navdot {
    display: block !important; position: absolute; top: 7px; right: 14px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0;
    box-shadow: 0 0 0 2px var(--bg-surface);
  }
}
@media (max-width: 860px) {
  .ig-cmd { width: 36px; padding: 0; justify-content: center; }
  .ig-cmd input { flex: 0 0 0; width: 0; opacity: 0; }
  .ig-cmd > kbd { display: none; }
  .ig-cmd:focus-within { width: min(420px, 70vw); padding: 0 6px 0 var(--space-3); justify-content: flex-start; }
  .ig-cmd:focus-within input { flex: 1; width: auto; opacity: 1; }
  .ig-shop .qt { display: none; }
}
/* dòng Hỏi GOPUSH AI luôn thấy được, dù danh sách kết quả dài */
.ig-cmdpop .foot { position: sticky; bottom: -6px; background: var(--bg-surface); padding-bottom: 8px; }
.ig-cmdpop .it.is-ai { position: sticky; bottom: 30px; background: var(--bg-surface); box-shadow: 0 -1px 0 var(--border-light); border-radius: 0; }
.ig-cmdpop .it.is-ai.is-sel { background: var(--accent-soft); }

/* topbar: ô tìm nhỏ + 2 icon quan trọng (GOPUSH AI, Việc cần xử lý) + avatar */
.ig-cmd { width: 260px; }
.ig-cmd:focus-within { width: 360px; }
.gm-topbar__right { gap: var(--space-2); }
.ig-aiicon .gm-icon { color: var(--accent-bright); }
.ig-aiicon.on { background: var(--accent-dark); }
.ig-aiicon.on .gm-icon { color: #ffffff; }
.ig-sevdot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; align-self: flex-start; background: var(--accent); }
.ig-sevdot.is-2 { background: var(--warning); }
.ig-sevdot.is-4 { background: var(--danger); }

/* ============================================================ menu GOPUSH AI (ai.js) */
/* bộ chọn dạng filter: nút gọn "Nhãn: giá trị ▾", bấm mới mở danh sách */
.ig-xbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.ig-xp { position: relative; display: inline-flex; max-width: 100%; }
.ig-xp-btn {
  all: unset; box-sizing: border-box; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s;
  height: 32px; max-width: 100%; padding: 0 8px 0 10px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface);
  font-size: 13px; color: var(--text-primary); white-space: nowrap;
}
.ig-xp-btn:hover { border-color: var(--line-active); }
.ig-xp-btn:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 1px; }
.ig-xp-btn > .gm-icon { width: 14px; height: 14px; color: var(--text-secondary); flex: none; }
.ig-xp-btn .l { color: var(--text-secondary); }
.ig-xp-btn .l::after { content: ':'; }
.ig-xp-btn .v { font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ig-xp-btn .chev { width: 14px; height: 14px; color: var(--text-tertiary); transition: transform .15s; }
.ig-xp.has-val .ig-xp-btn { background: var(--bg-subtle); border-color: var(--border-light); }
.ig-xp.is-open .ig-xp-btn { border-color: var(--line-active); background: var(--bg-surface); box-shadow: 0 0 0 3px var(--ring); }
.ig-xp.is-open .chev { transform: rotate(180deg); }
.ig-xp-pop {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 0;
  width: 280px; max-width: calc(100vw - 32px);
  background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: 10px; box-shadow: 0 8px 28px rgba(18, 20, 21, 0.1), 0 1px 3px rgba(18, 20, 21, 0.06);
  display: flex; flex-direction: column; animation: ix-in .12s ease-out;
}
.ig-xp-pop.wide { width: 380px; }
.ig-xp-q { margin: 8px 8px 0; }
.ig-xp-list { max-height: 300px; overflow-y: auto; padding: 4px; display: flex; flex-direction: column; }
.ig-xp-list > button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: var(--radius-sm); font-size: 13px; line-height: 19px; }
.ig-xp-list > button[hidden] { display: none; }
.ig-xp-list > button:hover { background: var(--bg-hover); }
.ig-xp-list > button.on { background: var(--bg-subtle); }
.ig-xp-list > button.on { font-weight: 500; }
.ig-xp-list .t { display: flex; flex-direction: column; min-width: 0; }
.ig-xp-list small { font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
.ig-xp-list .gm-check { margin-top: 2px; flex: none; }
.ig-xp-radio { width: 14px; height: 14px; margin-top: 2px; flex: none; border-radius: 50%; border: 1.5px solid var(--border); box-sizing: border-box; }
.ig-xp-radio.on { border: 4px solid var(--accent-dark); }
.ig-xp-foot { display: flex; align-items: center; gap: var(--space-2); padding: 8px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-secondary); }
.ig-xp-foot .spacer { flex: 1; }
.ig-xsys { font-size: 11px; padding: 2px 6px; border-radius: var(--radius-xs); background: var(--warning-soft); color: var(--warning-text); }

/* orb AI: vòng gradient xoay nhẹ quanh icon */
.ig-xorb { position: relative; width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-dark); color: var(--on-accent); isolation: isolate; }
.ig-xorb > i { position: absolute; inset: -2px; border-radius: 50%; z-index: -1; background: conic-gradient(from 0deg, #25f4ee, #121415 30%, #fe2c55 55%, #121415 75%, #25f4ee); animation: ix-spin 3.2s linear infinite; }
.ig-xorb > i::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: var(--accent-dark); }
.ig-xorb .gm-icon { width: 16px; height: 16px; position: relative; }
.ig-xorb.sm { width: 30px; height: 30px; }
.ig-xorb.sm .gm-icon { width: 14px; height: 14px; }
.ig-xorb.big { width: 52px; height: 52px; }
.ig-xorb.big .gm-icon { width: 22px; height: 22px; }
@keyframes ix-spin { to { transform: rotate(360deg); } }

/* khung form AI */
.ig-xbuild { border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-surface); display: flex; flex-direction: column; }
.ig-xbuild-head { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-light); }
.ig-xbuild-head > div { flex: 1; min-width: 0; }
.ig-xbuild-head h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; }
.ig-xbuild-head p { margin: 0; font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.ig-xform { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.ig-xfoot { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding-top: var(--space-3); border-top: 1px solid var(--border-light); }
.ig-xfoot .spacer { flex: 1; }

/* job AI đang chạy: thanh tiến độ + danh sách bước */
.ig-xjob { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.ig-xjob-head { display: flex; align-items: center; gap: var(--space-3); }
.ig-xjob-head .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ig-xjob-head .t b { font-weight: 500; font-size: 14px; }
.ig-xjob-head .t span { font-size: 13px; color: var(--text-secondary); }
.ig-xjob-head .pct { font-size: 18px; min-width: 48px; text-align: right; }
.ig-xbar { height: 6px; border-radius: var(--radius-pill); background: var(--bg-muted); overflow: hidden; }
.ig-xbar i {
  display: block; height: 100%; border-radius: inherit; transition: width .12s linear;
  background: linear-gradient(90deg, #121415, #3a3d40 40%, #25f4ee 70%, #fe2c55);
  background-size: 200% 100%; animation: ix-flow 1.6s linear infinite;
}
:root[data-theme="dark"] .ig-xbar i { background-image: linear-gradient(90deg, #f1f2f3, #a9abae 40%, #25f4ee 70%, #fe2c55); }
@keyframes ix-flow { to { background-position: -200% 0; } }
.ig-xsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px var(--space-4); }
.ig-xsteps li { display: flex; align-items: center; gap: var(--space-2); font-size: 13px; color: var(--text-tertiary); }
.ig-xsteps .dot { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--border); display: grid; place-items: center; box-sizing: border-box; }
.ig-xsteps .dot .gm-icon { width: 10px; height: 10px; }
.ig-xsteps li.done { color: var(--text-primary); }
.ig-xsteps li.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.ig-xsteps li.run { color: var(--text-primary); font-weight: 500; }
.ig-xsteps li.run .dot { border-color: var(--line-active); border-right-color: transparent; animation: ix-spin .8s linear infinite; }
.ig-xskel { display: flex; flex-direction: column; gap: 8px; }
.ig-xskel i { display: block; height: 10px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--bg-muted) 0, var(--bg-subtle) 50%, var(--bg-muted) 100%); background-size: 200% 100%; animation: ix-shimmer 1.3s ease-in-out infinite; }
.ig-xskel i:nth-child(2) { width: 70%; }
@keyframes ix-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* AI Tìm Creator: 4 cách tìm dạng tab thẻ gọn */
.ig-xmods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
@media (max-width: 1100px) { .ig-xmods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ig-xmod {
  --tone: var(--soft-mist); --ink: var(--soft-mist-ink);
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; align-items: center; gap: var(--space-3); padding: 12px 14px;
  border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-surface);
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}
.ig-xmod.tone-sky { --tone: var(--soft-sky); --ink: var(--soft-sky-ink); }
.ig-xmod.tone-sage { --tone: var(--soft-sage); --ink: var(--soft-sage-ink); }
.ig-xmod.tone-sand { --tone: var(--soft-sand); --ink: var(--soft-sand-ink); }
.ig-xmod.tone-lilac { --tone: var(--soft-lilac); --ink: var(--soft-lilac-ink); }
.ig-xmod:hover { border-color: color-mix(in srgb, var(--ink) 28%, var(--border-light)); }
.ig-xmod:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 16%, transparent); }
.ig-xmod .ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--tone); color: var(--ink); transition: background-color .18s; }
.ig-xmod .ic .gm-icon { width: 16px; height: 16px; }
.ig-xmod .tx { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.ig-xmod b { font-weight: 500; font-size: 14px; line-height: 20px; }
.ig-xmod .d { font-size: 12px; line-height: 17px; color: var(--text-tertiary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* đang chọn: viền mảnh và nền nhạt lấy theo màu icon, không viền đen */
.ig-xmod.on {
  border-color: color-mix(in srgb, var(--ink) 45%, transparent);
  background: color-mix(in srgb, var(--tone) 45%, var(--bg-surface));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 10%, transparent);
}
.ig-xmod.on .ic { background: var(--bg-surface); }
.ig-xmod.on b { color: var(--ink); }
.ig-xempty { display: flex; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-6); border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--text-tertiary); font-size: 13px; text-align: center; }
.ig-xempty.tall { flex-direction: column; min-height: 280px; line-height: 20px; }
.ig-xempty.tall .gm-icon { width: 26px; height: 26px; }

/* tiêu đề khối kết quả */
.ig-xres-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.ig-xres-head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 500; }
.ig-xres-head .spacer { flex: 1; }
.ig-xsearch { width: 240px; }
.ig-xscore { display: flex; align-items: center; gap: var(--space-2); min-width: 110px; }
.ig-xscore .tr { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--bg-muted); overflow: hidden; }
.ig-xscore .tr i { display: block; height: 100%; background: var(--accent-dark); border-radius: inherit; }
.ig-xwhy { font-size: 13px; color: var(--text-secondary); }

/* Content AI: form trái, kết quả phải */
.ig-xcontent { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
@media (max-width: 1240px) { .ig-xcontent { grid-template-columns: minmax(0, 1fr); } }
.ig-xseg { display: flex; gap: 2px; margin: var(--space-3) var(--space-4) 0; padding: 3px; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-xseg button { all: unset; cursor: pointer; flex: 1; height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--radius-xs); font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.ig-xseg button .gm-icon { width: 14px; height: 14px; }
.ig-xseg button.on { background: var(--bg-surface); color: var(--text-primary); font-weight: 500; box-shadow: 0 1px 2px rgba(18, 20, 21, 0.08); }
.ig-xsuggest-sm { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ig-xsuggest-sm button { all: unset; cursor: pointer; font-size: 12px; height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border-radius: var(--radius-pill); background: var(--bg-subtle); color: var(--text-secondary); }
.ig-xsuggest-sm button:hover { color: var(--text-primary); background: var(--bg-muted); }
.ig-xsuggest-sm .gm-icon { width: 12px; height: 12px; }
.ig-xouts { display: flex; flex-direction: column; gap: var(--space-3); }
.ig-xout { border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); animation: slide-in .3s ease-out both; }
.ig-xout:nth-child(2) { animation-delay: .08s; }
.ig-xout:nth-child(3) { animation-delay: .16s; }
.ig-xout header, .ig-xout footer { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-2) 6px var(--space-4); }
.ig-xout header { border-bottom: 1px solid var(--border-light); }
.ig-xout header b { font-weight: 500; }
.ig-xout footer { border-top: 1px solid var(--border-light); }
.ig-xout .spacer { flex: 1; }
.ig-xout .tx { padding: var(--space-3) var(--space-4); font-size: 14px; line-height: 22px; display: flex; flex-direction: column; gap: 4px; }
.ig-xout .tx p { margin: 0; white-space: pre-wrap; }

/* Report AI: form đánh số từng bước */
.ig-rp-form { gap: 0; padding-top: var(--space-2); padding-bottom: var(--space-3); }
.ig-rp-row { display: grid; grid-template-columns: 24px minmax(200px, 300px) minmax(0, 1fr); gap: var(--space-3); align-items: start; padding: var(--space-3) 0; border-bottom: 1px solid var(--border-light); }
.ig-rp-row .n { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-muted); display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.ig-rp-row .lb { display: flex; flex-direction: column; gap: 2px; }
.ig-rp-row .lb b { font-weight: 500; font-size: 14px; }
.ig-rp-row .lb em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--text-tertiary); margin-left: 4px; }
.ig-rp-row .lb span { font-size: 12px; line-height: 17px; color: var(--text-secondary); }
.ig-rp-row .ctl { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ig-rp-row .ctl > .gm-input-area { width: 100%; }
.ig-rp-form .ig-xfoot { border-top: 0; }
@media (max-width: 900px) { .ig-rp-row { grid-template-columns: 24px minmax(0, 1fr); } .ig-rp-row .ctl { grid-column: 2; } }
.ig-rp-kpi { width: auto; gap: 6px; }
.ig-rp-kpi span { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.ig-rp-kpi input { width: 64px; text-align: right; }

/* Report AI: bản report */
.ig-rp { border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); overflow: hidden; }
.ig-rp-head { display: flex; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-light); }
.ig-rp-head .t { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 2px; }
.ig-rp-head .gm-help { display: inline-flex; align-items: center; gap: 4px; }
.ig-rp-head .gm-help .gm-icon { width: 12px; height: 12px; }
.ig-rp-head h2 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 500; }
.ig-rp-answer { display: flex; gap: var(--space-4); align-items: flex-start; margin: var(--space-4) var(--space-5) 0; padding: var(--space-4); border-radius: var(--radius-md); background: var(--bg-subtle); border-left: 3px solid var(--text-secondary); }
.ig-rp-answer.is-good { background: var(--success-soft); border-left-color: var(--success); }
.ig-rp-answer.is-mid { background: var(--warning-soft); border-left-color: var(--warning); }
.ig-rp-answer.is-bad { background: var(--danger-soft); border-left-color: var(--danger); }
.ig-rp-answer .badge { flex: none; font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: var(--radius-xs); background: var(--bg-surface); }
.ig-rp-answer .q { font-size: 12px; color: var(--text-secondary); }
.ig-rp-answer p { margin: 2px 0 0; font-size: 15px; line-height: 23px; }
.ig-rp-sec { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.ig-rp-sec + .ig-rp-sec { border-top: 1px solid var(--border-light); }
.ig-rp-sec h3 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; display: flex; gap: var(--space-2); align-items: baseline; }
.ig-rp-sec .gm-table-wrap { border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.ig-rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2); }
.ig-rp-kpis > div { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--bg-canvas); }
.ig-rp-kpis .l { font-size: 12px; color: var(--text-secondary); }
.ig-rp-kpis b { font-size: 18px; line-height: 26px; font-weight: 500; }
.ig-rp-kpis .d { font-size: 12px; }
.ig-rp-checks { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ig-rp-checks span { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 3px 8px; border-radius: var(--radius-xs); }
.ig-rp-checks .gm-icon { width: 13px; height: 13px; }
.ig-rp-checks .ok { background: var(--success-soft); color: var(--success-text); }
.ig-rp-checks .no { background: var(--danger-soft); color: var(--danger-text); }
.ig-rp-funnel { display: flex; flex-direction: column; gap: 6px; }
.ig-rp-funnel > div { display: grid; grid-template-columns: 170px minmax(0, 1fr) 56px 76px 60px; gap: var(--space-3); align-items: center; padding: 6px var(--space-2); border-radius: var(--radius-sm); font-size: 13px; }
.ig-rp-funnel > div.is-neck { background: var(--danger-soft); }
.ig-rp-funnel .bar { position: relative; height: 8px; border-radius: var(--radius-pill); background: var(--bg-muted); }
.ig-rp-funnel .bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--chart-1); }
.ig-rp-funnel .is-neck .bar i { background: var(--danger); }
.ig-rp-funnel .bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text-secondary); }
.ig-rp-funnel b { text-align: right; font-weight: 500; }
@media (max-width: 760px) { .ig-rp-funnel > div { grid-template-columns: 1fr 56px; } .ig-rp-funnel .bar, .ig-rp-funnel .gm-help { display: none; } }
.ig-rp-note { display: flex; gap: var(--space-2); margin: 0; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.ig-rp-note .gm-icon { width: 16px; height: 16px; color: var(--danger); flex: none; margin-top: 2px; }
.ig-rp-verdict { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: var(--radius-xs); background: var(--bg-muted); white-space: nowrap; }
.ig-rp-verdict.is-good { background: var(--success-soft); color: var(--success-text); }
.ig-rp-verdict.is-mid { background: var(--warning-soft); color: var(--warning-text); }
.ig-rp-verdict.is-bad { background: var(--danger-soft); color: var(--danger-text); }
.ig-rp-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-4); }
@media (max-width: 1000px) { .ig-rp-two { grid-template-columns: minmax(0, 1fr); } }
.ig-rp-lead { margin: 0 0 var(--space-2); font-size: 14px; }
.ig-rp-top { margin: 0; padding: 0; list-style: none; counter-reset: rk; display: flex; flex-direction: column; }
.ig-rp-top li { counter-increment: rk; display: grid; grid-template-columns: 22px auto 1fr auto; gap: var(--space-2); align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.ig-rp-top li::before { content: counter(rk); color: var(--text-tertiary); }
.ig-rp-top b { font-weight: 500; }
.ig-rp-warn { display: flex; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--warning-soft); color: var(--warning-text); align-self: start; }
.ig-rp-warn > .gm-icon { width: 18px; height: 18px; flex: none; }
.ig-rp-warn b { font-weight: 500; }
.ig-rp-warn p { margin: 4px 0 var(--space-2); font-size: 13px; line-height: 20px; color: var(--text-primary); }
.ig-rp-recs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.ig-rp-recs li { display: flex; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.ig-rp-recs .n { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--bg-muted); color: var(--text-primary); display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.ig-rp-recs p { margin: 0 0 4px; font-size: 14px; line-height: 21px; }
.ig-rp-recs .meta { display: flex; gap: var(--space-3); flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); }
.ig-rp-recs .meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ig-rp-recs .meta .gm-icon { width: 12px; height: 12px; }
.ig-rp-pri { padding: 1px 6px; border-radius: var(--radius-xs); font-weight: 500; }
.ig-rp-pri.p-hi { background: var(--danger-soft); color: var(--danger-text); }
.ig-rp-pri.p-md { background: var(--bg-muted); color: var(--text-primary); }
.ig-rp-foot { display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--border-light); background: var(--bg-subtle); font-size: 12px; line-height: 18px; color: var(--text-tertiary); }
.ig-rp-foot .gm-icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
@media print {
  .gm-topbar, .ig-side, .ig-collapse, .ig-support, .ig-page-head, .ig-xbuild, .gm-table-wrap:not(.ig-rp .gm-table-wrap), .ig-section:not(:first-child), .ig-rp-head .ig-head-actions { display: none !important; }
  .ig-content { overflow: visible; padding: 0; }
}

/* AI Chat kiểu ChatGPT: lịch sử bên trái, hội thoại giữa */
.ig-xchat { display: grid; grid-template-columns: 220px minmax(0, 1fr); height: calc(100vh - var(--size-topbar) - 120px); min-height: 520px; }
.ig-content:has(> .ig-sheet > .ig-xchat) > .ig-sheet { flex: 1 0 auto; }
.ig-xchat-side { border-right: 1px solid var(--border-light); background: var(--bg-subtle); padding: var(--space-2); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ig-xchat-side .h { font-size: 12px; color: var(--text-tertiary); padding: var(--space-2) var(--space-2) 4px; }
.ig-xchat-side a { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: var(--space-2); align-items: center; padding: 7px var(--space-2); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-primary); cursor: pointer; text-decoration: none; }
.ig-xchat-side a .gm-icon { width: 14px; height: 14px; color: var(--text-tertiary); }
.ig-xchat-side a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-xchat-side a small { grid-column: 2; font-size: 11px; color: var(--text-tertiary); }
.ig-xchat-side a:hover { background: var(--bg-hover); }
.ig-xchat-side a.on { background: var(--bg-surface); box-shadow: var(--shadow-sm); font-weight: 500; }
.ig-xchat > .ig-chat { min-height: 0; }
.ig-xchat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-top: var(--space-4); }
.ig-xchat .ig-composer { position: static; }
.ig-xhello { max-width: 760px; margin: 0 auto; padding: var(--space-8) var(--space-6); display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); }
.ig-xhello h2 { margin: var(--space-2) 0 0; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -.01em; }
.ig-xhello > p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.ig-xsuggest { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-2); margin-top: var(--space-4); text-align: left; }
.ig-xsuggest button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 18px 1fr; column-gap: var(--space-2); row-gap: 2px; padding: var(--space-3); border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); }
.ig-xsuggest button:hover { border-color: var(--border); background: var(--bg-subtle); }
.ig-xsuggest .gm-icon { width: 16px; height: 16px; color: var(--text-secondary); margin-top: 2px; }
.ig-xsuggest b { font-weight: 500; font-size: 13px; line-height: 20px; }
.ig-xsuggest span { grid-column: 2; font-size: 12px; color: var(--text-tertiary); }
.ig-msg .body ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.ig-think { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.ig-think > span { display: inline-flex; align-items: center; gap: 6px; opacity: 0; animation: ix-in .3s ease-out forwards; animation-delay: var(--d); }
.ig-think > span .gm-icon { width: 13px; height: 13px; color: var(--success); }
.ig-think .ig-xskel { margin-top: 4px; max-width: 420px; }
@keyframes ix-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .ig-xchat { grid-template-columns: minmax(0, 1fr); }
  .ig-xchat-side { display: none; }
}

/* ============================================================ module Creator (creators.js) */
/* Phân loại Creator */
.ig-segintro { display: flex; gap: var(--space-2); margin: 0; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.ig-segintro .gm-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.ig-segintro b { color: var(--text-primary); font-weight: 500; }
.ig-segreconcile { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 var(--space-3); padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.ig-segreconcile > .gm-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.ig-segreconcile-metrics { display: flex; align-items: center; gap: 7px 14px; flex-wrap: wrap; font-size: 13px; line-height: 20px; }
.ig-segreconcile-metrics b { color: var(--text-primary); font-weight: 600; }
.ig-segreconcile small { display: block; margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--text-tertiary); }
.ig-segs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.ig-segcard { --tone: var(--soft-mist); --ink: var(--soft-mist-ink); display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) var(--space-4) var(--space-4); border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); }
.ig-segcard.tone-sky { --tone: var(--soft-sky); --ink: var(--soft-sky-ink); }
.ig-segcard.tone-sage { --tone: var(--soft-sage); --ink: var(--soft-sage-ink); }
.ig-segcard.tone-sand { --tone: var(--soft-sand); --ink: var(--soft-sand-ink); }
.ig-segcard.tone-lilac { --tone: var(--soft-lilac); --ink: var(--soft-lilac-ink); }
.ig-segcard.tone-blush { --tone: var(--soft-blush); --ink: var(--soft-blush-ink); }
.ig-segcard header { display: flex; align-items: center; gap: var(--space-2); margin-right: -8px; }
.ig-segcard header b { font-weight: 500; font-size: 15px; }
.ig-segcard header .spacer { flex: 1; }
.ig-segcard .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--ink); }
.ig-segcard .num { display: flex; align-items: baseline; gap: var(--space-2); }
.ig-segcard .num b { font-size: 22px; line-height: 28px; font-weight: 500; }
.ig-segcard .num span { font-size: 12px; color: var(--text-secondary); }
.ig-segcard .bar { height: 4px; border-radius: var(--radius-pill); background: var(--bg-muted); overflow: hidden; }
.ig-segcard .bar i { display: block; height: 100%; background: var(--ink); }
.ig-segcard p { margin: 0; font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.ig-segcard .conds { display: flex; flex-wrap: wrap; gap: 4px; }
.ig-segcard .conds span { font-size: 12px; padding: 2px 8px; border-radius: var(--radius-xs); background: var(--tone); color: var(--ink); }
.ig-segcard footer { display: flex; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }
.ig-segedit { border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-surface); box-shadow: 0 6px 24px rgba(18, 20, 21, 0.06); }
.ig-segedit-head { display: flex; align-items: center; padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-bottom: 1px solid var(--border-light); }
.ig-segedit-head h3 { margin: 0; font-size: 15px; font-weight: 500; }
.ig-segedit-head .spacer { flex: 1; }
.ig-segedit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: var(--space-3); padding: var(--space-4); }
@media (max-width: 900px) { .ig-segedit-grid { grid-template-columns: minmax(0, 1fr); } }
.ig-segtones { display: flex; gap: 6px; height: 36px; align-items: center; }
.ig-segtones button { all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 6px; box-sizing: border-box; border: 2px solid transparent; }
.ig-segtones button.on { box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 3.5px var(--line-active); }
.ig-segtones .tone-sky { background: var(--soft-sky-ink); } .ig-segtones .tone-sage { background: var(--soft-sage-ink); }
.ig-segtones .tone-sand { background: var(--soft-sand-ink); } .ig-segtones .tone-lilac { background: var(--soft-lilac-ink); }
.ig-segtones .tone-blush { background: var(--soft-blush-ink); } .ig-segtones .tone-mist { background: var(--soft-mist-ink); }
.ig-segconds { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: 0 var(--space-4) var(--space-4); }
.ig-segconds .h { display: flex; gap: var(--space-2); align-items: baseline; }
.ig-segconds .h b { font-weight: 500; font-size: 14px; }
.ig-segcond { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; width: 100%; padding: 6px var(--space-2); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-segcond .and { width: 34px; font-size: 12px; color: var(--text-tertiary); }
.ig-segcond .gm-input-sm { width: 150px; }
.ig-segcond .spacer { flex: 1; }
.ig-segedit-foot { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-light); background: var(--bg-subtle); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.ig-segedit-foot .spacer { flex: 1; }
.ig-segcount { font-size: 13px; color: var(--text-secondary); }
.ig-segcount b { color: var(--text-primary); font-size: 16px; font-weight: 500; }

/* Kho Creator: dải sao lưu và khung tải lên */
.ig-libtop { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-4) var(--space-6) 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--bg-subtle); }
.ig-libtop .ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--bg-surface); flex: none; }
.ig-libtop .ic .gm-icon { width: 16px; height: 16px; }
.ig-libtop .t { display: flex; flex-direction: column; min-width: 0; }
.ig-libtop .t b { font-weight: 500; font-size: 14px; }
.ig-libtop .t span { font-size: 12px; color: var(--text-secondary); }
.ig-libtop .spacer { flex: 1; }
.ig-creator-scan-control { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); max-width: 100%; }
.ig-creator-scan-select { flex: 1 1 190px; width: 190px; min-width: 0; background: var(--bg-surface); }
.ig-creator-scan-select.is-strategy { flex-basis: 242px; width: 242px; }
.ig-creator-scan-select select { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-creator-scan-control .gm-btn { flex: none; }
.ig-creator-scan-status { position: sticky; top: 0; z-index: 20; min-width: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 8px var(--space-6); padding: 9px 12px; border: 1px solid var(--border-light); border-left: 3px solid var(--success-text); border-radius: var(--radius-sm); background: var(--success-bg); box-shadow: 0 4px 12px rgba(18, 20, 21, .08); }
.ig-creator-scan-status-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--success-text); background: var(--bg-surface); }
.ig-creator-scan-status-icon .gm-icon { width: 15px; height: 15px; }
.ig-creator-scan-status-copy { min-width: 0; display: grid; gap: 2px; }
.ig-creator-scan-status-copy > b { color: var(--text-primary); font-size: 12px; line-height: 17px; }
.ig-creator-scan-status-meta { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; color: var(--text-secondary); font-size: 11px; line-height: 16px; }
.ig-creator-scan-status-chip { display: inline-flex; min-height: 21px; align-items: center; padding: 1px 7px; border: 1px solid var(--border-light); border-radius: 4px; color: var(--text-secondary); background: var(--bg-surface); font-size: 10px; line-height: 15px; }
.ig-creator-scan-status-copy > small { color: var(--text-secondary); font-size: 10px; line-height: 15px; }
.ig-creator-scan-status-state { display: inline-flex; align-items: center; gap: 6px; color: var(--success-text); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ig-creator-scan-status-state::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ''; }
.ig-creator-scan-status.is-waiting { border-left-color: var(--warning-text); background: var(--warning-soft); }
.ig-creator-scan-status.is-waiting .ig-creator-scan-status-icon,
.ig-creator-scan-status.is-waiting .ig-creator-scan-status-state { color: var(--warning-text); }
@media (min-width: 1281px) {
  .ig-creator-discover-filters .ig-filters-bar { flex-wrap: nowrap; }
  .ig-creator-discover-filters .ig-filters-bar > .spacer { display: none; }
  .ig-creator-discover-filters .ig-fsearch { flex: 1 1 150px; min-width: 120px; max-width: 220px; }
  .ig-creator-discover-filters .gm-select { flex: 0 1 116px; min-width: 96px; }
  .ig-creator-discover-filters .ig-more { flex: none; }
  .ig-creator-discover-filters .ig-fright { flex: 0 1 auto; min-width: 0; }
  .ig-creator-discover-filters .ig-fmeta { flex: none; }
  .ig-creator-discover-filters .ig-creator-scan-control { flex-wrap: nowrap; min-width: 0; }
  .ig-creator-discover-filters .ig-creator-scan-select { flex: 0 1 160px; width: 160px; }
  .ig-creator-discover-filters .ig-creator-scan-select.is-strategy { flex-basis: 210px; width: 210px; }
}
@media (min-width: 1281px) and (max-width: 1799px) {
  .ig-creator-discover-filters .ig-fmeta-sort { display: none; }
}
.ig-upload { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: var(--space-4); margin: var(--space-3) var(--space-6) 0; }
@media (max-width: 900px) { .ig-upload { grid-template-columns: minmax(0, 1fr); } }
.ig-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; padding: var(--space-4); border: 1.5px dashed var(--border); border-radius: var(--radius-md); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ig-drop:hover, .ig-drop.is-over { border-color: var(--line-active); background: var(--bg-subtle); }
.ig-drop > .gm-icon { width: 22px; height: 22px; color: var(--text-secondary); }
.ig-drop b { font-weight: 500; font-size: 14px; }
.ig-drop span { font-size: 12px; line-height: 18px; color: var(--text-secondary); max-width: 460px; }
.ig-drop code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-muted); padding: 0 4px; border-radius: 3px; }
.ig-upload-side { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.ig-upres { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ig-upres b { font-weight: 500; }
.ig-upres span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.ig-upres .gm-icon { width: 13px; height: 13px; }
.ig-upres .ok { color: var(--success-text); }
.ig-upres .bad, .ig-upbad { color: var(--danger-text); }
.ig-upbad { display: flex; gap: 6px; margin: 0; font-size: 13px; }
.ig-upbad .gm-icon { width: 14px; height: 14px; flex: none; margin-top: 3px; }

/* Gắn Tag: gắn nhanh theo danh sách username */
.ig-tagquick { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--border-light); border-radius: var(--radius-md); }
.ig-tagquick .h { display: flex; flex-direction: column; gap: 2px; }
.ig-tagquick .h b { font-weight: 500; font-size: 14px; }
.ig-tagquick .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; }
.ig-tagquick .side { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2); }
.ig-tagquick .res { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--success-text); }
.ig-tagquick .res .gm-icon { width: 14px; height: 14px; }
.ig-tagquick > .gm-help { margin: 0; }
@media (max-width: 760px) { .ig-tagquick .row { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .ig-xorb > i, .ig-xbar i, .ig-xskel i, .ig-xsteps li.run .dot { animation: none; }
  .ig-think > span { animation: none; opacity: 1; }
}

/* dải ghi nguồn dữ liệu đầu trang: Kho Creator hay API TikTok Shop */
.ig-srcnote { display: flex; align-items: center; gap: var(--space-2); padding: 8px 12px; border-radius: 8px; background: var(--bg-subtle); font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.ig-srcnote > .gm-icon { width: 14px; height: 14px; flex: none; color: var(--soft-sage-ink); }
.ig-srcnote.is-api > .gm-icon { color: var(--soft-sky-ink); }
.ig-srcnote > span { flex: 1; min-width: 0; }
.ig-srcnote b { font-weight: 500; color: var(--text-primary); }
.ig-srcnote .gm-link { flex: none; font-size: 12px; }
.ig-sheet > .ig-srcnote { margin: var(--space-4) var(--space-6) 0; }

/* Chọn nguồn KOC là một điều khiển riêng, không dính vào tab Kết quả ở trên. */
.ig-creator-source {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  margin: var(--space-4) var(--space-6) 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.ig-creator-source-label {
  flex: none;
  min-width: 72px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}
.ig-creator-source .gm-seg {
  gap: 4px;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--border-light);
  background: var(--bg-canvas);
}
.ig-creator-source .gm-seg button {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.ig-creator-source .gm-seg button.on {
  box-shadow: 0 1px 2px rgba(20, 20, 24, .08);
}
.ig-marketplace-error {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) var(--space-6) 0;
  padding: 10px 12px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger-text);
}
.ig-marketplace-error > .gm-icon { width: 16px; height: 16px; flex: none; }
.ig-marketplace-error > span { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 2px; }
.ig-marketplace-error b { font-size: 13px; font-weight: 500; }
.ig-marketplace-error small { color: inherit; font-size: 12px; line-height: 18px; }
.ig-marketplace-error .gm-btn { flex: none; }

/* ============================================================ thị trường & ngôn ngữ trên thanh trên */
.ig-mkt { height: 30px; padding: 0 8px 0 10px; gap: 6px; font-size: 12px; }
.ig-mkt .fl { font-size: 15px; line-height: 1; }
.ig-mkt b { font-weight: 500; letter-spacing: .02em; }
.ig-mkt > .gm-icon { width: 13px; height: 13px; opacity: .75; }
.ig-mkt > .gm-icon:last-child { width: 12px; height: 12px; opacity: .55; }
.ig-menu .ig-mkt-zone { padding-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ig-mkt-fl { font-size: 16px; width: 20px; text-align: center; }
.ig-mkt-code { width: 24px; font-size: 11px; font-weight: 500; color: var(--text-tertiary); }
.ig-menu .ig-mkt-note { max-width: 240px; line-height: 17px; border-top: 1px solid var(--border-light); margin-top: 4px; padding-top: 8px; }
.ig-boot { min-height: 100vh; display: grid; place-items: center; background: var(--bg-canvas); }
.ig-boot span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--text-primary); animation: ix-spin .7s linear infinite; }

/* ============================================================ đăng nhập / đăng ký (auth.js) */
.ig-au { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 5fr) 7fr; background: var(--bg-surface); }
.ig-au-brand {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: var(--space-8); padding: 40px 48px;
  background: #121415; color: #f1f2f3;
}
/* ánh sáng mờ theo hai màu TikTok, rất nhẹ */
.ig-au-brand::before, .ig-au-brand::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: .32; }
.ig-au-brand::before { width: 380px; height: 380px; right: -120px; top: -80px; background: #25f4ee; opacity: .16; }
.ig-au-brand::after { width: 420px; height: 420px; left: -160px; bottom: -160px; background: #fe2c55; opacity: .14; }
.ig-au-brand .logo .ig-logo { height: 40px; }
.ig-au-brand .msg { margin: auto 0; max-width: 440px; display: flex; flex-direction: column; gap: var(--space-4); }
.ig-au-brand h2 { margin: 0; font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -.02em; }
.ig-au-brand p { margin: 0; font-size: 15px; line-height: 24px; color: rgba(241, 242, 243, .7); }
.ig-au-brand ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ig-au-brand li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(241, 242, 243, .88); }
.ig-au-brand li .gm-icon { width: 30px; height: 30px; padding: 7px; box-sizing: border-box; border-radius: 9px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); color: #25f4ee; }
.ig-au-brand .mk { display: flex; flex-direction: column; gap: 8px; }
.ig-au-brand .mk span { display: flex; gap: 6px; }
.ig-au-brand .mk i { font-style: normal; font-size: 18px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.ig-au-brand .mk small { font-size: 12px; color: rgba(241, 242, 243, .5); }

.ig-au-main { display: flex; flex-direction: column; align-items: center; padding: 20px 24px 24px; background: var(--bg-surface); }
.ig-au-top { width: 100%; max-width: 560px; display: flex; align-items: center; gap: var(--space-2); }
.ig-au-top .back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.ig-au-top .back:hover { color: var(--text-primary); }
.ig-au-top .back .gm-icon { width: 14px; height: 14px; }
.ig-au-top .spacer { flex: 1; }
.ig-au-sel { position: relative; display: inline-flex; flex: none; }
.ig-au-lang-btn { all: unset; box-sizing: border-box; cursor: pointer; height: 34px; min-width: 96px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-light); border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--text-primary); font-size: 13px; line-height: 1; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.ig-au-lang-btn:hover { border-color: var(--line-active); background: var(--bg-subtle); }
.ig-au-lang-btn:focus-visible { border-color: var(--line-active); box-shadow: 0 0 0 3px rgba(37, 244, 238, .14); }
.ig-au-lang-btn .gm-icon { width: 14px; height: 14px; color: var(--text-secondary); }
.ig-au-lang-btn .gm-icon:last-child { width: 12px; height: 12px; margin-left: 1px; transition: transform .15s; }
.ig-au-sel.is-open .ig-au-lang-btn .gm-icon:last-child { transform: rotate(180deg); }
.ig-au-lang-menu { position: absolute; z-index: 1200; top: calc(100% + 8px); right: 0; width: 224px; padding: 6px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg-surface); box-shadow: 0 14px 38px rgba(18, 20, 21, .16), 0 3px 10px rgba(18, 20, 21, .08); }
.ig-au-lang-menu[hidden] { display: none; }
.ig-au-lang-menu button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; min-height: 38px; padding: 7px 9px; display: flex; align-items: center; gap: 10px; border-radius: 6px; color: var(--text-primary); font-size: 13px; }
.ig-au-lang-menu button:hover, .ig-au-lang-menu button:focus-visible { background: var(--bg-subtle); }
.ig-au-lang-menu button[aria-selected="true"] { background: var(--primary-soft); color: var(--text-primary); }
.ig-au-lang-menu .code { width: 28px; flex: none; color: var(--text-tertiary); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.ig-au-lang-menu .name { flex: 1; min-width: 0; }
.ig-au-lang-menu .gm-icon { width: 14px; height: 14px; flex: none; color: var(--primary); }
.gm-market-flag { position: relative; display: inline-block; width: 22px; height: 15px; flex: none; overflow: hidden; box-sizing: border-box; border: 1px solid rgba(18, 20, 21, .14); border-radius: 2px; box-shadow: 0 1px 2px rgba(18, 20, 21, .08); }
.gm-market-flag.flag-vn { background: #da251d; }
.gm-market-flag.flag-vn::after { content: '★'; position: absolute; inset: 0; display: grid; place-items: center; color: #ffdf00; font-size: 9px; line-height: 1; }
.gm-market-flag.flag-th { background: linear-gradient(to bottom, #a51931 0 17%, #fff 17% 33%, #2d2a4a 33% 67%, #fff 67% 83%, #a51931 83% 100%); }
.gm-market-flag.flag-id { background: linear-gradient(to bottom, #ce1126 0 50%, #fff 50% 100%); }
.gm-market-flag.flag-my { background: repeating-linear-gradient(to bottom, #cc0001 0 1.15px, #fff 1.15px 2.3px); }
.gm-market-flag.flag-my::before, .gm-market-flag.flag-us::before { content: ''; position: absolute; left: 0; top: 0; width: 9px; height: 8px; background: #18326f; }
.gm-market-flag.flag-my::after { content: '★'; position: absolute; left: 2px; top: 1px; color: #ffd100; font-size: 6px; line-height: 1; }
.gm-market-flag.flag-ph { background: linear-gradient(to bottom, #0038a8 0 50%, #ce1126 50% 100%); }
.gm-market-flag.flag-ph::before { content: ''; position: absolute; left: 0; top: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 9px solid #fff; }
.gm-market-flag.flag-ph::after { content: ''; position: absolute; left: 2px; top: 6px; width: 3px; height: 3px; border-radius: 50%; background: #fcd116; }
.gm-market-flag.flag-sg { background: linear-gradient(to bottom, #ef3340 0 50%, #fff 50% 100%); }
.gm-market-flag.flag-sg::before { content: ''; position: absolute; left: 3px; top: 2px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.gm-market-flag.flag-sg::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 5px; border-radius: 50%; background: #ef3340; }
.gm-market-flag.flag-us { background: repeating-linear-gradient(to bottom, #b22234 0 1.15px, #fff 1.15px 2.3px); }
.gm-market-flag.flag-us::after { content: '✦'; position: absolute; left: 2px; top: 1px; color: #fff; font-size: 5px; line-height: 1; }
.gm-market-flag.flag-br { background: #009b3a; }
.gm-market-flag.flag-br::before { content: ''; position: absolute; left: 6px; top: 2px; width: 9px; height: 9px; background: #ffdf00; transform: rotate(45deg); }
.gm-market-flag.flag-br::after { content: ''; position: absolute; left: 9px; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: #002776; }
.gm-market-flag.flag-jp { background: #fff; }
.gm-market-flag.flag-jp::after { content: ''; position: absolute; left: 7px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: #bc002d; }
.ig-au-market { position: relative; width: 100%; }
.ig-au-market-btn { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; height: 44px; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface); color: var(--text-primary); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.ig-au-market-btn:hover { border-color: var(--line-active); }
.ig-au-market-btn:focus-visible, .ig-au-market.is-open .ig-au-market-btn { border-color: var(--line-active); box-shadow: 0 0 0 3px var(--ring); }
.ig-au-market-btn .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-au-market-btn .code { color: var(--text-tertiary); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.ig-au-market-btn .gm-icon { width: 14px; height: 14px; color: var(--text-tertiary); transition: transform .15s; }
.ig-au-market.is-open .ig-au-market-btn .gm-icon { transform: rotate(180deg); }
.ig-au-market-menu { position: absolute; z-index: 1200; top: calc(100% + 7px); left: 0; right: 0; max-height: 292px; overflow-y: auto; padding: 6px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg-surface); box-shadow: 0 14px 38px rgba(18, 20, 21, .16), 0 3px 10px rgba(18, 20, 21, .08); }
.ig-au-market-menu[hidden] { display: none; }
.ig-au-market-menu button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; min-height: 40px; padding: 7px 9px; display: flex; align-items: center; gap: 10px; border-radius: 6px; color: var(--text-primary); font-size: 13px; }
.ig-au-market-menu button:hover, .ig-au-market-menu button:focus-visible { background: var(--bg-subtle); }
.ig-au-market-menu button:disabled,
.ig-au-market-menu button.is-disabled { cursor: not-allowed; color: var(--text-tertiary); opacity: .48; }
.ig-au-market-menu button:disabled:hover,
.ig-au-market-menu button.is-disabled:hover { background: transparent; }
.ig-au-market-menu button[aria-selected="true"] { background: var(--primary-soft); }
.ig-au-market-menu .name { flex: 1; min-width: 0; }
.ig-au-market-menu .code { color: var(--text-tertiary); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.ig-au-market-menu .gm-icon { width: 14px; height: 14px; flex: none; color: var(--primary); }

.ig-au-card { width: 100%; max-width: 400px; margin: auto 0; padding: var(--space-8) 0; display: flex; flex-direction: column; gap: var(--space-4); }
.ig-au-card h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -.02em; }
.ig-au-card .sub { margin: -8px 0 var(--space-2); font-size: 14px; line-height: 22px; color: var(--text-secondary); }
.ig-au-demo { display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--warning-soft); color: var(--warning-text); font-size: 12px; line-height: 18px; }
.ig-au-demo .gm-icon { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.ig-au-demo b { font-weight: 500; }
.ig-au-demo code { font-family: var(--font-mono); font-size: 11px; }

.ig-au-google {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%; height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface);
  font-size: 14px; font-weight: 500; color: var(--text-primary);
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.ig-au-google:hover { background: var(--bg-subtle); border-color: var(--line-active); }
.ig-au-google:focus-visible { box-shadow: 0 0 0 3px var(--ring); border-color: var(--line-active); }
.ig-au-google:disabled { opacity: .6; cursor: default; }
.ig-au-google svg { width: 18px; height: 18px; }
.ig-au-or { display: flex; align-items: center; gap: var(--space-3); font-size: 12px; color: var(--text-tertiary); }
.ig-au-or::before, .ig-au-or::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }

.ig-au-form { display: flex; flex-direction: column; gap: 14px; }
.ig-au-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ig-au-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ig-au-field > label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.ig-au-input {
  position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface);
  transition: border-color .15s, box-shadow .15s;
}
.ig-au-input:hover { border-color: var(--line-active); }
.ig-au-input:focus-within { border-color: var(--line-active); box-shadow: 0 0 0 3px var(--ring); }
.ig-au-input > .gm-icon { width: 16px; height: 16px; color: var(--text-tertiary); flex: none; }
.ig-au-input input, .ig-au-input select { all: unset; flex: 1; min-width: 0; font-size: 14px; color: var(--text-primary); }
.ig-au-input input::placeholder { color: var(--text-tertiary); }
.ig-au-input select { cursor: pointer; }
.ig-au-eye { all: unset; cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--text-tertiary); }
.ig-au-eye:hover { background: var(--bg-hover); color: var(--text-primary); }
.ig-au-eye .gm-icon { width: 16px; height: 16px; }
.ig-au-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 2px; }
.ig-au-meter i { height: 3px; border-radius: 2px; background: var(--bg-muted); transition: background-color .2s; }
.ig-au-meter[data-score="1"] i:nth-child(1) { background: var(--danger); }
.ig-au-meter[data-score="2"] i:nth-child(-n+2) { background: var(--warning); }
.ig-au-meter[data-score="3"] i { background: var(--success); }
.ig-au-hint { font-size: 12px; color: var(--text-tertiary); }
.ig-au-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.ig-au-check { display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 19px; color: var(--text-secondary); cursor: pointer; }
.ig-au-check input { position: absolute; opacity: 0; pointer-events: none; }
.ig-au-check > span { width: 16px; height: 16px; flex: none; margin-top: 1px; border: 1.5px solid var(--border); border-radius: 4px; box-sizing: border-box; display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.ig-au-check input:checked + span { background: var(--accent-dark); border-color: var(--accent-dark); }
.ig-au-check input:checked + span::after { content: ''; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 1.5px 1.5px 0; transform: translateY(-1px) rotate(45deg); }
.ig-au-check input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.ig-au-check em { font-style: normal; }
.ig-au-plans { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-subtle); }
.ig-au-plans-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ig-au-plans-head b { color: var(--text-primary); font-size: 13px; }
.ig-au-plans-head span { color: var(--text-tertiary); font-size: 11px; text-align: right; }
.ig-au-plan-list { display: grid; gap: 6px; }
.ig-au-plan { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: 8px; color: inherit; background: var(--bg-surface); text-decoration: none; }
.ig-au-plan:hover { border-color: var(--line-active); background: var(--primary-soft); }
.ig-au-plan span { min-width: 0; display: grid; gap: 2px; }
.ig-au-plan b { color: var(--text-primary); font-size: 12px; }
.ig-au-plan small { overflow: hidden; color: var(--text-secondary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ig-au-plan strong { flex: none; color: var(--accent-dark); font-size: 11px; font-variant-numeric: tabular-nums; }
.ig-au-err { display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger-text); font-size: 13px; line-height: 19px; }
.ig-au-err.is-ok { background: var(--success-soft); color: var(--success-text); }
.ig-au-err[hidden] { display: none; }
.ig-au-err .gm-icon { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ig-au-submit {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; height: 44px; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; border-radius: 10px;
  background: var(--accent-dark); color: var(--on-accent); font-size: 14px; font-weight: 500;
  transition: background-color .15s, box-shadow .15s;
}
.ig-au-submit:hover { background: var(--accent-hover); }
.ig-au-submit:focus-visible { box-shadow: 0 0 0 3px var(--ring), 0 0 0 1px var(--accent-dark); }
.ig-au-submit:disabled { cursor: default; opacity: .85; }
.ig-au-submit .spin { display: none; position: absolute; right: 16px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: var(--on-accent); animation: ix-spin .7s linear infinite; }
.ig-au-submit.is-busy .spin { display: block; }
.ig-au-foot { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); text-align: center; }
.ig-au-foot .gm-link { display: inline-flex; align-items: center; gap: 4px; }
.ig-au-foot .gm-icon { width: 13px; height: 13px; }
.ig-au-legal { margin: 0; font-size: 12px; color: var(--text-tertiary); }
.ig-au-legal a { color: inherit; }
@media (max-width: 920px) {
  .ig-au { grid-template-columns: minmax(0, 1fr); }
  .ig-au-brand { padding: 24px; gap: 16px; }
  .ig-au-brand .msg ul, .ig-au-brand .mk, .ig-au-brand p { display: none; }
  .ig-au-brand h2 { font-size: 22px; line-height: 30px; }
}
@media (max-width: 480px) { .ig-au-two { grid-template-columns: minmax(0, 1fr); } }
.ig-pub-nav .ig-au-lang-btn { height: 30px; min-width: 70px; }
/* thanh menu trang công khai nền tối: ô chọn ngôn ngữ trong suốt, nút chính đảo sang trắng */
.ig-pub-nav .ig-au-lang-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #fff; }
.ig-pub-nav .ig-au-lang-btn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .3); }
.ig-pub-nav .ig-au-lang-btn .gm-icon { color: rgba(255, 255, 255, .72); }
.ig-pub-nav .ig-au-lang-menu { --bg-surface: #fff; --bg-subtle: #f4f5f6; --text-primary: #121415; --text-tertiary: #74787d; --border-light: #e3e5e7; --primary-soft: #e8fbfa; --primary: #078982; }
.ig-pub-nav .gm-btn-primary { background: #fff; border-color: #fff; color: #121415; }
.ig-pub-nav .gm-btn-primary:hover { background: #e9eaeb; border-color: #e9eaeb; }

/* ============================================================ trang công khai: trang chủ + bảng giá */
.ig-site { background: var(--bg-surface); }
.ig-site .ig-wrap { max-width: 1180px; }
.ig-pub-nav .links { display: flex; gap: var(--space-5); margin-left: var(--space-6); }
@media (max-width: 760px) { .ig-pub-nav .links { display: none; } }
.ig-eyebrow { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--bg-subtle); border: 1px solid var(--border-light); font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.ig-eyebrow .gm-icon { width: 13px; height: 13px; color: var(--soft-sky-ink); }
.ig-ld-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 12px; background: var(--accent-dark); color: var(--on-accent); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color .15s, transform .15s, box-shadow .15s; }
.ig-ld-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(18, 20, 21, .14); }
.ig-ld-btn .gm-icon { width: 16px; height: 16px; }
.ig-ld-btn.is-line { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border); }
.ig-ld-btn.is-line:hover { border-color: var(--line-active); background: var(--bg-subtle); box-shadow: none; }
.ig-ld-btn.is-light { background: #fff; color: #121415; }
.ig-ld-btn.is-light:hover { background: #ececed; }
.ig-ld-btn.is-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.ig-ld-btn.is-ghost:hover { background: rgba(255, 255, 255, .08); box-shadow: none; }

/* hero */
.ig-ld-hero { position: relative; overflow: hidden; padding: 72px 0 64px;
  background: radial-gradient(700px 360px at 85% 10%, rgba(37, 244, 238, .12), transparent 70%),
              radial-gradient(600px 320px at 10% 90%, rgba(254, 44, 85, .08), transparent 70%), var(--bg-surface); }
.ig-ld-hero .ig-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.ig-ld-hero .copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.ig-ld-hero h1 { margin: 0; font-size: 48px; line-height: 56px; font-weight: 500; letter-spacing: -.03em; }
.ig-ld-hero h1 .hl { background: linear-gradient(90deg, #121415, #0b8f8a 55%, #e0234a); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .ig-ld-hero h1 .hl { background-image: linear-gradient(90deg, #f1f2f3, #25f4ee 55%, #fe2c55); }
.ig-ld-hero .copy > p { margin: 0; font-size: 17px; line-height: 28px; color: var(--text-secondary); max-width: 52ch; }
.ig-ld-hero .act { display: flex; gap: 10px; flex-wrap: wrap; }
.ig-ld-hero .trust { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
.ig-ld-hero .trust li { display: inline-flex; align-items: center; gap: 6px; }
.ig-ld-hero .trust .gm-icon { width: 14px; height: 14px; color: var(--success); }
@media (max-width: 980px) { .ig-ld-hero .ig-wrap { grid-template-columns: minmax(0, 1fr); } .ig-ld-hero h1 { font-size: 36px; line-height: 44px; } }

/* mô phỏng màn hình sản phẩm */
.ig-ld-mock { position: relative; padding: 24px 0; }
.ig-ld-mock .win { border-radius: 16px; background: var(--bg-surface); border: 1px solid var(--border-light); box-shadow: 0 30px 80px rgba(18, 20, 21, .14), 0 2px 6px rgba(18, 20, 21, .06); overflow: hidden; transform: perspective(1400px) rotateY(-4deg) rotateX(2deg); }
.ig-ld-mock .bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #121415; }
.ig-ld-mock .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.ig-ld-mock .bar span { margin-left: 10px; font-size: 11px; color: rgba(255, 255, 255, .5); }
.ig-ld-mock .body { display: grid; grid-template-columns: 44px 1fr; min-height: 300px; padding-bottom: 28px; }
.ig-ld-mock .side { display: flex; flex-direction: column; gap: 8px; padding: 12px 8px; border-right: 1px solid var(--border-light); background: var(--bg-subtle); }
.ig-ld-mock .side span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-tertiary); }
.ig-ld-mock .side span.on { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 2px rgba(18, 20, 21, .08); }
.ig-ld-mock .side .gm-icon { width: 14px; height: 14px; }
.ig-ld-mock .main { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ig-ld-mock .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ig-ld-mock .kpis div { padding: 10px; border-radius: 10px; background: var(--bg-canvas); display: flex; flex-direction: column; gap: 2px; }
.ig-ld-mock .kpis small { font-size: 10px; color: var(--text-tertiary); }
.ig-ld-mock .kpis b { font-size: 16px; font-weight: 500; }
.ig-ld-mock .kpis em { font-style: normal; font-size: 10px; color: var(--success-text); }
.ig-ld-mock .chart { height: 70px; display: flex; align-items: flex-end; gap: 6px; padding: 0 2px; border-bottom: 1px solid var(--border-light); }
.ig-ld-mock .chart i { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #121415, #55585a); opacity: .85; }
.ig-ld-mock .chart i:last-child { background: linear-gradient(180deg, #25f4ee, #0b8f8a); opacity: 1; }
:root[data-theme="dark"] .ig-ld-mock .chart i { background: linear-gradient(180deg, #f1f2f3, #8c8f93); }
.ig-ld-mock .list { display: flex; flex-direction: column; gap: 6px; }
.ig-ld-mock .list .h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--text-secondary); }
.ig-ld-mock .list .h .gm-icon { width: 12px; height: 12px; }
.ig-ld-mock .r { display: grid; grid-template-columns: 24px 1fr 70px 22px; gap: 8px; align-items: center; font-size: 11px; }
.ig-ld-mock .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-muted); font-size: 9px; font-weight: 500; }
.ig-ld-mock .n { display: flex; flex-direction: column; }
.ig-ld-mock .n small { color: var(--text-tertiary); font-size: 10px; }
.ig-ld-mock .sc { height: 5px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.ig-ld-mock .sc i { display: block; height: 100%; background: var(--accent-dark); }
.ig-ld-mock .float { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg-surface); border: 1px solid var(--border-light); box-shadow: 0 12px 32px rgba(18, 20, 21, .12); font-size: 12px; animation: ld-bob 5s ease-in-out infinite; }
.ig-ld-mock .float > .gm-icon { width: 30px; height: 30px; padding: 7px; box-sizing: border-box; border-radius: 9px; background: var(--soft-sky); color: var(--soft-sky-ink); }
.ig-ld-mock .float span { display: flex; flex-direction: column; }
.ig-ld-mock .float b { font-weight: 500; }
.ig-ld-mock .float small { color: var(--text-tertiary); font-size: 11px; }
.ig-ld-mock .f1 { left: -36px; bottom: -6px; }
.ig-ld-mock .f2 { right: -16px; top: 0; animation-delay: -2.5s; }
.ig-ld-mock .f2 > .gm-icon { background: var(--soft-blush); color: var(--soft-blush-ink); }
@keyframes ld-bob { 50% { transform: translateY(-6px); } }
@media (max-width: 980px) { .ig-ld-mock .f1 { left: 8px; } .ig-ld-mock .f2 { right: 8px; } .ig-ld-mock .win { transform: none; } }

/* số liệu */
.ig-ld-stats { border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.ig-ld-stats .ig-wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.ig-ld-stats div { padding: 28px 16px; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.ig-ld-stats div + div { border-left: 1px solid var(--border-light); }
.ig-ld-stats b { font-size: 30px; line-height: 36px; font-weight: 500; letter-spacing: -.02em; }
.ig-ld-stats span { font-size: 13px; color: var(--text-secondary); }
@media (max-width: 760px) { .ig-ld-stats .ig-wrap { grid-template-columns: 1fr 1fr; } .ig-ld-stats div:nth-child(3) { border-left: 0; } }

/* khối nội dung */
.ig-ld-sec { padding: 80px 0; }
.ig-ld-sec.is-tint { background: var(--bg-canvas); }
.ig-ld-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-bottom: 40px; }
.ig-ld-head h2 { margin: 0; font-size: 34px; line-height: 42px; font-weight: 500; letter-spacing: -.02em; max-width: 22ch; }
.ig-ld-head p { margin: 0; font-size: 15px; color: var(--text-secondary); }
.ig-ld-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 920px; margin: 0 auto; }
.ig-ld-vs > div { padding: 28px; border-radius: 16px; border: 1px solid var(--border-light); }
.ig-ld-vs h3 { margin: 0 0 16px; font-size: 16px; font-weight: 500; height: 28px; display: flex; align-items: center; }
.ig-ld-vs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ig-ld-vs li { display: flex; gap: 10px; font-size: 14px; line-height: 21px; }
.ig-ld-vs li .gm-icon { width: 18px; height: 18px; padding: 3px; box-sizing: border-box; border-radius: 50%; flex: none; margin-top: 1px; }
.ig-ld-vs .old { background: var(--bg-subtle); color: var(--text-secondary); }
.ig-ld-vs .old li .gm-icon { background: var(--danger-soft); color: var(--danger-text); }
.ig-ld-vs .new { background: #121415; color: #f1f2f3; border-color: #121415; }
.ig-ld-vs .new .ig-logo { height: 26px; }
.ig-ld-vs .new li .gm-icon { background: rgba(37, 244, 238, .15); color: #25f4ee; }
@media (max-width: 760px) { .ig-ld-vs { grid-template-columns: 1fr; } }
.ig-ld-feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .ig-ld-feats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .ig-ld-feats { grid-template-columns: 1fr; } }
.ig-ld-feats article { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 16px; background: var(--bg-surface); border: 1px solid var(--border-light); transition: transform .2s, box-shadow .2s; }
.ig-ld-feats article:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(18, 20, 21, .08); }
.ig-ld-feats .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ig-ld-feats .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--soft-sky); color: var(--soft-sky-ink); }
.ig-ld-feats article:nth-child(2) .ic { background: var(--soft-sage); color: var(--soft-sage-ink); }
.ig-ld-feats article:nth-child(3) .ic { background: var(--soft-sand); color: var(--soft-sand-ink); }
.ig-ld-feats article:nth-child(4) .ic { background: var(--soft-lilac); color: var(--soft-lilac-ink); }
.ig-ld-feats .ic .gm-icon { width: 18px; height: 18px; }
.ig-ld-feats .no { font-size: 13px; font-weight: 500; color: var(--text-tertiary); }
.ig-ld-feats h3 { margin: 0; font-size: 18px; font-weight: 500; }
.ig-ld-feats article > p { margin: 0 0 6px; font-size: 13px; color: var(--text-secondary); }
.ig-ld-feats ul { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 8px; }
.ig-ld-feats li { display: flex; gap: 8px; font-size: 13px; line-height: 19px; }
.ig-ld-feats li .gm-icon { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--success); }
.ig-ld-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 900px) { .ig-ld-steps { grid-template-columns: 1fr 1fr; } }
.ig-ld-steps li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 14px; border: 1px solid var(--border-light); }
.ig-ld-steps .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-dark); color: var(--on-accent); font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.ig-ld-steps b { font-weight: 500; font-size: 15px; }
.ig-ld-steps p { margin: 0; font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.ig-ld-cta { background: #121415; color: #f1f2f3; padding: 56px 0; position: relative; overflow: hidden; }
.ig-ld-cta::after { content: ''; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: #25f4ee; opacity: .12; filter: blur(90px); }
.ig-ld-cta .ig-wrap { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ig-ld-cta h2 { margin: 0 0 6px; font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.ig-ld-cta p { margin: 0; color: rgba(241, 242, 243, .7); }
.ig-ld-cta .act { display: flex; gap: 10px; flex-wrap: wrap; }
.ig-ld-foot { padding: 48px 0 24px; background: var(--bg-surface); border-top: 1px solid var(--border-light); }
.ig-ld-foot .ig-wrap:first-child { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .ig-ld-foot .ig-wrap:first-child { grid-template-columns: 1fr 1fr; } .ig-ld-foot .brand { grid-column: 1 / -1; } }
.ig-ld-foot .brand .ig-logo { height: 30px; filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .ig-ld-foot .brand .ig-logo { filter: none; }
.ig-ld-foot .brand p { margin: 12px 0; font-size: 13px; line-height: 20px; color: var(--text-secondary); max-width: 36ch; }
.ig-ld-foot .flags { display: flex; gap: 4px; }
.ig-ld-foot .flags i { font-style: normal; font-size: 16px; }
.ig-ld-foot .col { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.ig-ld-foot .col b { font-weight: 500; margin-bottom: 4px; }
.ig-ld-foot .col a { color: var(--text-secondary); text-decoration: none; }
.ig-ld-foot .col a:hover { color: var(--text-primary); }
.ig-ld-foot .copy { display: flex; justify-content: space-between; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-tertiary); }

/* ============================================================ gói dịch vụ (plans.js) */
.ig-cyc { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--radius-pill); background: var(--bg-subtle); border: 1px solid var(--border-light); }
.ig-cyc button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-radius: var(--radius-pill); font-size: 14px; color: var(--text-secondary); transition: background-color .15s, color .15s; }
.ig-cyc button.on { background: var(--bg-surface); color: var(--text-primary); font-weight: 500; box-shadow: 0 1px 3px rgba(18, 20, 21, .1); }
.ig-cyc button span { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--success-soft); color: var(--success-text); }
.ig-tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.ig-plans-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 28px; border: 1px dashed var(--border); border-radius: 14px; color: var(--text-secondary); background: var(--bg-subtle); text-align: center; }
.ig-plans-state .gm-icon { width: 22px; height: 22px; color: var(--text-tertiary); }
.ig-plans-state.is-error { color: var(--danger-text); border-color: color-mix(in srgb, var(--danger-text) 35%, var(--border)); }

@media (max-width: 1100px) { .ig-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ig-tiers { grid-template-columns: minmax(0, 1fr); } }
.ig-tier { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px 22px; border-radius: 16px; border: 1px solid var(--border-light); background: var(--bg-surface); transition: box-shadow .2s, transform .2s; }
.ig-tier:hover { box-shadow: 0 14px 36px rgba(18, 20, 21, .07); }
.ig-tier.is-pop { border-color: color-mix(in srgb, var(--soft-sky-ink) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--soft-sky) 60%, var(--bg-surface)), var(--bg-surface) 40%); box-shadow: 0 14px 40px color-mix(in srgb, var(--soft-sky-ink) 12%, transparent); }
.ig-tier.is-cur { border-color: var(--line-active); }
.ig-tier .ribbon { position: absolute; top: -11px; left: 22px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--soft-sky-ink); color: #fff; font-size: 11px; font-weight: 500; }
.ig-tier header h3 { margin: 0; font-size: 17px; font-weight: 500; }
.ig-tier header p { margin: 4px 0 0; font-size: 13px; line-height: 19px; color: var(--text-secondary); min-height: 38px; }
.ig-tier .price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ig-tier .price b { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: -.02em; }
.ig-tier .price span { font-size: 13px; color: var(--text-tertiary); }
.ig-tier .sub { margin-top: -10px; font-size: 12px; color: var(--text-tertiary); min-height: 18px; }
.ig-tier .sub s { color: var(--text-tertiary); }
.ig-tier ul { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 10px; }
.ig-tier li { display: flex; gap: 10px; font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.ig-tier li b { color: var(--text-primary); font-weight: 500; }
.ig-tier li .gm-icon { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--text-tertiary); }
.ig-tier-btn { all: unset; box-sizing: border-box; cursor: pointer; height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-surface); font-size: 14px; font-weight: 500; color: var(--text-primary); text-decoration: none; transition: background-color .15s, border-color .15s; }
.ig-tier-btn:hover { border-color: var(--line-active); background: var(--bg-subtle); }
.ig-tier-btn.is-primary { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); }
.ig-tier-btn.is-primary:hover { background: var(--accent-hover); }
.ig-tier-btn.is-off, .ig-tier-btn.is-cur { cursor: default; background: var(--bg-subtle); border-color: transparent; color: var(--text-tertiary); font-weight: 400; }
.ig-tier-btn.is-cur { color: var(--success-text); background: var(--success-soft); font-weight: 500; }
.ig-tier-btn .gm-icon { width: 15px; height: 15px; }

/* bảng so sánh */
.ig-cmp-wrap { overflow-x: auto; border: 1px solid var(--border-light); border-radius: 14px; }
.ig-cmp { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.ig-cmp th, .ig-cmp td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); text-align: center; vertical-align: middle; }
.ig-cmp tbody th { text-align: left; font-weight: 400; color: var(--text-primary); width: 28%; }
.ig-cmp th small, .ig-cmp td small { display: block; font-size: 12px; color: var(--text-tertiary); }
.ig-cmp thead th { position: sticky; top: 0; background: var(--bg-surface); vertical-align: bottom; }
.ig-cmp thead th b { display: block; font-weight: 500; font-size: 15px; }
.ig-cmp thead th span { font-size: 13px; color: var(--text-secondary); }
.ig-cmp td.pop, .ig-cmp th.pop { background: color-mix(in srgb, var(--soft-sky) 45%, transparent); }
.ig-cmp td.cur, .ig-cmp th.cur { background: var(--bg-subtle); }
.ig-cmp tr.sec th { padding-top: 18px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--text-tertiary); background: var(--bg-subtle); }
.ig-cmp tr.sec td { background: var(--bg-subtle); }
.ig-cmp tr:last-child th, .ig-cmp tr:last-child td { border-bottom: 0; }
.ig-yes .gm-icon { width: 18px; height: 18px; padding: 3px; box-sizing: border-box; border-radius: 50%; background: var(--success-soft); color: var(--success-text); }
.ig-no { color: var(--text-disabled); }

/* trang Bảng giá */
.ig-pr-hero { padding: 64px 0 40px; text-align: center;
  background: radial-gradient(640px 280px at 50% 0%, rgba(37, 244, 238, .1), transparent 70%), var(--bg-surface); }
.ig-pr-hero .ig-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ig-pr-hero h1 { margin: 0; font-size: 40px; line-height: 48px; font-weight: 500; letter-spacing: -.02em; }
.ig-pr-hero p { margin: 0 0 8px; color: var(--text-secondary); font-size: 16px; }
.ig-pr-cards { padding-bottom: 48px; }
.ig-pr-sec { padding-bottom: 56px; }
.ig-pr-sec h2 { margin: 0 0 20px; font-size: 24px; font-weight: 500; letter-spacing: -.01em; }
.ig-faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.ig-faq details { border: 1px solid var(--border-light); border-radius: 12px; padding: 0 18px; }
.ig-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font-size: 15px; font-weight: 500; }
.ig-faq summary::-webkit-details-marker { display: none; }
.ig-faq summary .gm-icon { width: 16px; height: 16px; color: var(--text-tertiary); transition: transform .2s; }
.ig-faq details[open] summary .gm-icon { transform: rotate(180deg); }
.ig-faq details p { margin: 0 0 16px; font-size: 14px; line-height: 22px; color: var(--text-secondary); }

/* Gói & thanh toán trong app */
.ig-bill-top { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 16px; }
@media (max-width: 1000px) { .ig-bill-top { grid-template-columns: 1fr; } }
.ig-bill-cur { padding: 20px; border-radius: 14px; background: #121415; color: #f1f2f3; display: flex; flex-direction: column; gap: 4px; }
.ig-bill-cur .gm-help { color: rgba(241, 242, 243, .6); }
.ig-bill-cur h2 { margin: 0; font-size: 22px; font-weight: 500; }
.ig-bill-cur p { margin: 0; font-size: 14px; color: rgba(241, 242, 243, .85); }
.ig-bill-cur b { font-weight: 500; font-size: 18px; color: #fff; }
.ig-bill-use { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ig-bill-use > div { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 6px; }
.ig-bill-use .l { font-size: 12px; color: var(--text-secondary); }
.ig-bill-use b { font-size: 18px; font-weight: 500; }
.ig-bill-use b small { font-size: 12px; font-weight: 400; color: var(--text-tertiary); }
.ig-bill-use .tr { height: 5px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.ig-bill-use .tr i { display: block; height: 100%; background: var(--accent-dark); }
.ig-bill-use .is-full .tr i { background: var(--danger); }
.ig-bill-use .is-full .l::after { content: ' · đã đầy'; color: var(--danger-text); }
.ig-bill-head { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ig-bill-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.ig-bill-head .spacer { flex: 1; }
.ig-section > .ig-tiers { margin-top: 8px; }
.ig-buy { display: flex; flex-direction: column; gap: 10px; }
.ig-buy .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-secondary); }
.ig-buy .row b { color: var(--text-primary); font-weight: 500; }
.ig-buy .row.total { padding-top: 10px; border-top: 1px solid var(--border-light); color: var(--text-primary); font-weight: 500; }
.ig-buy .row.total b { font-size: 20px; }
.ig-buy ul { list-style: none; margin: 4px 0; padding: 12px; border-radius: 10px; background: var(--bg-subtle); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.ig-buy li { display: flex; align-items: center; gap: 8px; }
.ig-buy li .gm-icon { width: 14px; height: 14px; color: var(--text-tertiary); }
.ig-buy .gm-help { margin: 0; }
@media (prefers-reduced-motion: reduce) { .ig-ld-mock .float { animation: none; } }
@media (max-width: 560px) {
  .ig-pub-nav { padding: 0 var(--space-4); gap: var(--space-2); }
  .ig-pub-nav .ig-au-sel { display: none; }
  .ig-pub-nav .ig-logo { height: 28px; }
  .ig-ld-hero { padding-top: 40px; }
}
/* đăng nhập nhanh tài khoản demo */
.ig-au-quick { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--border); }
.ig-au-quick .h { font-size: 12px; color: var(--text-tertiary); }
.ig-au-quick button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: 10px; transition: border-color .15s, background-color .15s; }
.ig-au-quick button:hover { border-color: var(--line-active); background: var(--bg-subtle); }
.ig-au-quick .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--soft-sky); color: var(--soft-sky-ink); }
.ig-au-quick button + button .ic { background: var(--soft-sand); color: var(--soft-sand-ink); }
.ig-au-quick .ic .gm-icon { width: 16px; height: 16px; }
.ig-au-quick .t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ig-au-quick b { font-size: 13px; font-weight: 500; }
.ig-au-quick small { font-size: 12px; color: var(--text-tertiary); font-family: var(--font-mono); }
.ig-au-quick button > .gm-icon { width: 14px; height: 14px; color: var(--text-tertiary); }
.ig-role-adm { font-style: normal; font-size: 10px; font-weight: 500; padding: 1px 6px; margin-left: 4px; border-radius: 4px; background: var(--warning-soft); color: var(--warning-text); vertical-align: 1px; }
.ig-me-plan { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; cursor: pointer; text-decoration: none; }
.ig-me-plan span:last-child { font-size: 12px; color: var(--text-secondary); }
.ig-me-plan:hover span:last-child { color: var(--text-primary); text-decoration: underline; }

/* ============================================================ thông báo hệ thống (announce.js) */
.ig-app.has-ann { grid-template-rows: var(--size-topbar) auto 1fr; --ann-h: 28px; }
.ig-app.has-ann .ig-xchat { height: calc(100vh - var(--size-topbar) - var(--ann-h) - 120px); }
/* thanh thông báo nằm ngay dưới thanh trên, nền tối liền mạch, dải màu thụt vào hai bên */
.ig-ann { background: var(--bg-topbar); padding: 0 16px; overflow: hidden; max-height: 32px; transition: max-height .22s ease, opacity .18s; }
.ig-ann.is-closing { max-height: 0; opacity: 0; }
.ig-ann-in {
  display: flex; align-items: center; gap: 12px; height: 28px; padding: 0 4px 0 8px;
  border-radius: 8px 8px 0 0; color: #fff; font-size: 12px; line-height: 16px; animation: ix-in .25s ease-out;
  --ann-bg: #0a9b96; background: var(--ann-bg);
}
.ig-ann-in.tone-violet, .ig-ann-in.tone-ink { --ann-bg: #6a55d6; }
.ig-ann-in.tone-sunset { --ann-bg: #d9670f; }
.ig-ann-in.tone-berry { --ann-bg: #e0234a; }
.ig-ann .pg { display: inline-flex; align-items: center; gap: 0; flex: none; font-size: 11.5px; color: rgba(255, 255, 255, .85); }
.ig-ann .pg .gm-num { min-width: 32px; text-align: center; }
.ig-ann .pg button { all: unset; cursor: pointer; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; color: rgba(255, 255, 255, .8); }
.ig-ann .pg button:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.ig-ann .pg .gm-icon { width: 13px; height: 13px; }
.ig-ann .pg.one .gm-icon { width: 13px; height: 13px; opacity: .85; }
.ig-ann .tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-ann .cta { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 5px; color: #fff; font-weight: 500; text-decoration: none; transition: background-color .15s; }
.ig-ann .cta:hover { background: rgba(255, 255, 255, .16); }
.ig-ann .cta .gm-icon { width: 12px; height: 12px; transition: transform .15s; }
.ig-ann .cta:hover .gm-icon { transform: translate(1px, -1px); }
.ig-ann .x { all: unset; cursor: pointer; flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; color: rgba(255, 255, 255, .8); }
.ig-ann .x:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.ig-ann .x .gm-icon { width: 13px; height: 13px; }
@media (max-width: 700px) { .ig-ann .pg { display: none; } .ig-ann .tx { font-size: 12px; } }
/* xem trước trong trang quản trị */
.ig-ann.is-preview { padding: 6px 6px 0; border-radius: 10px; max-height: none; }
.ig-ann.is-preview span.x { display: grid; }
.ig-annedit { border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-surface); box-shadow: 0 6px 24px rgba(18, 20, 21, .06); }
.ig-annedit .h { display: flex; align-items: center; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border-light); }
.ig-annedit .h b { font-weight: 500; }
.ig-annedit .spacer { flex: 1; }
.ig-annedit .pv { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 6px; }
.ig-annedit .grid { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ig-annedit .two { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.ig-annedit .ft { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-light); background: var(--bg-subtle); border-radius: 0 0 10px 10px; }
.ig-annrow { display: flex; align-items: center; gap: 10px; min-width: 280px; }
.ig-annrow i { width: 10px; height: 10px; border-radius: 3px; flex: none; background: #0a9b96; }
.ig-annrow i.tone-ink, .ig-annrow i.tone-violet { background: #6a55d6; } .ig-annrow i.tone-sunset { background: #d9670f; } .ig-annrow i.tone-berry { background: #e0234a; }

.ig-home-banner { position: relative; min-width: 0; overflow: hidden; border-radius: 8px; aspect-ratio: 1280 / 276; }
.ig-home-banner .ig-banner { position: absolute; inset: 0; display: block; margin: 0; }
.ig-home-banner .ig-banner img { width: 100%; height: 100%; object-fit: cover; }
.ig-home-banner .ig-home-banner-arrow { position: absolute; top: 50%; z-index: 2; width: 36px; height: 36px; transform: translateY(-50%);
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(18,20,21,.58); color: #fff; cursor: pointer; }
.ig-home-banner .ig-home-banner-arrow:hover { background: rgba(18,20,21,.82); }
.ig-home-banner .ig-home-banner-arrow .gm-icon { width: 17px; height: 17px; }
.ig-home-banner .ig-home-banner-arrow.is-prev { left: 12px; }
.ig-home-banner .ig-home-banner-arrow.is-next { right: 12px; }
.ig-home-banner-count { position: absolute; right: 12px; bottom: 12px; z-index: 2; min-width: 48px; padding: 4px 8px; border-radius: 4px;
  background: rgba(18,20,21,.68); color: #fff; text-align: center; font: 12px var(--font-mono); }
.gm-tabs.ig-promo-tabs { margin-bottom: 16px; }
.ig-promo-editor { overflow: hidden; border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg-surface); }
.ig-promo-editor > header, .ig-promo-editor > footer { display: flex; align-items: center; gap: 10px; padding: 13px 16px; }
.ig-promo-editor > header { border-bottom: 1px solid var(--border-light); }
.ig-promo-editor > header b { font-weight: 600; }
.ig-promo-editor > footer { border-top: 1px solid var(--border-light); background: var(--bg-subtle); }
.ig-promo-editor > footer .gm-help { max-width: 60%; }
.ig-promo-editor .spacer { flex: 1; }
.ig-promo-editor .body { display: grid; gap: 18px; padding: 18px; }
.ig-promo-editor .gm-field > span:first-child { color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.ig-promo-preview { display: grid; min-height: 112px; aspect-ratio: 16 / 5; place-items: center; overflow: hidden; border: 1px solid var(--border-light); border-radius: 6px; background: var(--bg-canvas); color: var(--text-tertiary); }
.ig-promo-preview.is-banner { aspect-ratio: 1280 / 276; }
.ig-promo-preview img { display: block; width: 100%; height: 100%; max-height: 280px; object-fit: contain; }
.ig-promo-preview.is-popup { min-height: 112px; }
.ig-promo-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.ig-promo-form-grid .is-wide { grid-column: 1 / -1; }
.ig-promo-form-grid .gm-field { min-width: 0; }
.ig-promo-form-grid .gm-input { min-width: 0; }
.ig-promo-form-grid .gm-admin-select { width: 100%; height: var(--size-control); }
.ig-promo-form-grid input, .ig-promo-form-grid textarea { max-width: 100%; }
.ig-promo-form-grid .gm-input-area { min-height: 132px; }
.ig-promo-form-grid .gm-input-area textarea { min-height: 116px; resize: vertical; }
.ig-promo-form-grid small { color: var(--text-tertiary); overflow-wrap: anywhere; }
.ig-promo-upload { position: relative; min-width: 0; min-height: 56px; padding: 9px 12px; display: flex; align-items: center; gap: 12px; overflow: hidden; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--bg-subtle); cursor: pointer; }
.ig-promo-upload:hover { border-color: var(--text-secondary); background: var(--bg-canvas); }
.ig-promo-upload:focus-within { outline: 2px solid var(--line-active); outline-offset: 2px; }
.ig-promo-upload > .gm-icon { width: 20px; height: 20px; flex: none; color: var(--text-secondary); }
.ig-promo-upload-copy { min-width: 0; display: grid; gap: 2px; }
.ig-promo-upload-copy b { font-size: 12px; font-weight: 600; }
.ig-promo-upload-copy small { max-width: 100%; overflow: hidden; color: var(--text-tertiary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ig-promo-upload input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.ig-promo-flags { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ig-promo-flags .ig-admin-check { min-height: 40px; }
.ig-promo-thumb { display: block; width: 112px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-subtle); }
.ig-popup-row { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.ig-popup-row > span { display: flex; flex-direction: column; min-width: 0; }
.ig-popup-row small { display: -webkit-box; overflow: hidden; color: var(--text-tertiary); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ig-system-popup .ig-modal-body { display: grid; gap: 14px; }
.ig-system-popup-image { display: block; width: 100%; height: auto; max-height: min(56dvh, 480px); object-fit: contain; border-radius: 6px; background: var(--bg-canvas); }
.ig-system-popup-copy { color: var(--text-primary); line-height: 1.65; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .ig-home-banner .ig-home-banner-arrow { width: 32px; height: 32px; }
  .ig-home-banner .ig-home-banner-arrow.is-prev { left: 8px; }
  .ig-home-banner .ig-home-banner-arrow.is-next { right: 8px; }
  .ig-home-banner-count { right: 8px; bottom: 8px; }
  .gm-tabs.ig-promo-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .gm-tabs.ig-promo-tabs .gm-tab { min-width: 0; padding: 8px 5px; white-space: normal; line-height: 1.25; }
  .ig-promo-editor > header, .ig-promo-editor > footer { flex-wrap: wrap; }
  .ig-promo-editor > footer .gm-help { flex: 1 1 100%; }
  .ig-promo-editor .body { padding: 12px; }
  .ig-promo-editor > footer .gm-help { max-width: none; }
  .ig-promo-form-grid, .ig-promo-flags { grid-template-columns: minmax(0, 1fr); }
  .ig-promo-form-grid .is-wide { grid-column: auto; }
  .ig-promo-thumb { width: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .ig-home-banner .ig-home-banner-arrow { transition: none; }
}

/* ============================================================ màu theo gói
   mỗi gói một tông riêng, dùng cho nhãn dưới avatar, menu tài khoản, khối gói hiện tại */
.p-trial { --pl-bg: #ece8fb; --pl-ink: #5442b8; --pl-a: #f3f0ff; --pl-b: #e3dcfb; }
.p-basic { --pl-bg: #dcf3e5; --pl-ink: #1d7146; --pl-a: #effaf3; --pl-b: #d5f0df; }
.p-pro { --pl-bg: #d7f2f1; --pl-ink: #0b6f6b; --pl-a: #eefaf9; --pl-b: #cdeeec; }
.p-premium { --pl-bg: linear-gradient(135deg, #f8e7bd, #ecc76c); --pl-ink: #5c430c; --pl-a: #fdf6e3; --pl-b: #f6e2ae; }
.p-admin { --pl-bg: #c9f7f5; --pl-ink: #0b4f4c; --pl-a: #ecfdfc; --pl-b: #c9f7f5; }

/* avatar + nhãn: một cột căn giữa, mũi tên đứng giữa theo chiều dọc */
.ig-avatarbtn { height: 48px; padding: 0 6px 0 6px; border-radius: 12px; gap: 2px; }
.ig-av { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
.ig-av .gm-avatar { position: relative; z-index: 0; }
.ig-plantag {
  position: relative; z-index: 1; margin-top: -6px;
  min-width: 34px; height: 15px; padding: 0 6px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); border: 1.5px solid var(--bg-topbar);
  background: var(--pl-bg, #ececed); color: var(--pl-ink, #4b4c56);
  font-size: 9.5px; font-weight: 500; line-height: 1; letter-spacing: .01em; white-space: nowrap;
}
.ig-plantag.is-big { margin: 0; height: 20px; padding: 0 9px; font-size: 11px; border: 0; }

/* khối gói hiện tại: nền nhạt theo màu gói thay cho nền đen */
.ig-bill-cur { background: linear-gradient(135deg, var(--pl-a, var(--bg-subtle)), var(--pl-b, var(--bg-muted))); color: var(--pl-ink, var(--text-primary)); border: 1px solid color-mix(in srgb, var(--pl-ink, #000) 14%, transparent); }
.ig-bill-cur .gm-help { color: color-mix(in srgb, var(--pl-ink, #000) 70%, transparent); }
.ig-bill-cur h2 { color: var(--pl-ink); }
.ig-bill-cur p { color: color-mix(in srgb, var(--pl-ink, #000) 85%, transparent); }
.ig-bill-cur b { color: var(--pl-ink); }
.ig-bill-top .ig-bill-use .tr i { background: var(--pl-ink, var(--accent-dark)); }
.ig-bill-top .ig-bill-use .is-full .tr i { background: var(--danger); }

/* thông báo: đỏ cam (chữ trắng) và xanh dương nhạt (chữ xanh đậm cho đủ tương phản) */
.ig-ann-in.tone-coral { --ann-bg: linear-gradient(90deg, #e8452c, #f26b3a); }
.ig-ann-in.tone-sky { --ann-bg: #d6ebff; color: #0f4c8a; }
.ig-ann-in.tone-sky .pg, .ig-ann-in.tone-sky .pg button, .ig-ann-in.tone-sky .cta, .ig-ann-in.tone-sky .x { color: #0f4c8a; }
.ig-ann-in.tone-sky .pg button:hover, .ig-ann-in.tone-sky .cta:hover, .ig-ann-in.tone-sky .x:hover { background: rgba(15, 76, 138, .1); color: #0a3766; }
.ig-annrow i.tone-coral { background: #ec5532; }
.ig-annrow i.tone-sky { background: #9cccf7; }

/* nền sáng (vàng nhạt, xanh dương nhạt, màu tự chọn sáng): chữ và nút đậm */
.ig-ann-in.tone-butter { --ann-bg: #fff1c2; }
.ig-ann-in.is-light { color: #3d2f05; }
.ig-ann-in.tone-sky.is-light { color: #0f4c8a; }
.ig-ann-in.is-light .pg, .ig-ann-in.is-light .pg button, .ig-ann-in.is-light .cta, .ig-ann-in.is-light .x { color: inherit; }
.ig-ann-in.is-light .pg button:hover, .ig-ann-in.is-light .cta:hover, .ig-ann-in.is-light .x:hover { background: rgba(0, 0, 0, .07); color: inherit; }
.ig-annrow i.tone-butter { background: #f5d76e; }
.ig-annclr { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.ig-annclr:hover { border-color: var(--line-active); }
.ig-annclr input { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.ig-annclr input::-webkit-color-swatch-wrapper { padding: 0; }
.ig-annclr input::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, .1); border-radius: 6px; }

/* ============================================================ popup "Không đủ quyền" */
.ig-deny { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 10, 11, 0); transition: background-color .2s; }
.ig-deny.is-in { background: rgba(8, 10, 11, .82); }
.ig-deny-box { position: relative; isolation: isolate; width: min(440px, 100%);
  transform: translateY(14px) scale(.96); opacity: 0; transition: transform .24s cubic-bezier(.2, .9, .3, 1.2), opacity .2s; }
.ig-deny.is-in .ig-deny-box { transform: none; opacity: 1; }
/* đốm sáng xanh kiểu TikTok nằm dưới, chính giữa banner, tỏa ra */
.ig-deny .glow { position: absolute; z-index: -1; left: 50%; bottom: -6%; width: 115%; height: 58%; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(37, 244, 238, .85), rgba(37, 244, 238, .35) 45%, rgba(37, 244, 238, 0));
  filter: blur(42px); opacity: 0; transition: opacity .5s .1s; animation: deny-pulse 3.6s ease-in-out infinite; pointer-events: none; }
.ig-deny.is-in .glow { opacity: .9; }
@keyframes deny-pulse { 50% { transform: translateX(-50%) scale(1.08); filter: blur(52px); } }
/* ảnh 1920×1600 nền trong suốt: cắt sát gấu + thẻ để vùng bấm đúng bằng banner */
.ig-deny .card { display: block; width: 100%; aspect-ratio: 1120 / 1570; overflow: hidden; position: relative; cursor: pointer;
  border-radius: 32px; transition: transform .15s; }
.ig-deny .card:hover { transform: translateY(-2px); }
.ig-deny .card img { position: absolute; width: 171.43%; left: -35.71%; top: -1.27%; max-width: none; pointer-events: none;
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, .35)); }
.ig-deny .x { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; z-index: 2; top: 18.5%; right: -8px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #121415; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); transition: transform .15s; }
.ig-deny .x:hover { transform: scale(1.08); }
.ig-deny .x:focus-visible { outline: 2px solid #25f4ee; outline-offset: 2px; }
.ig-deny .x .gm-icon { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .ig-deny, .ig-deny-box { transition: none; } .ig-deny .glow { animation: none; } }
.ig-navlock { margin-left: auto; display: inline-flex; color: var(--text-tertiary); }
.ig-navlock .gm-icon { width: 13px; height: 13px; }
.ig-au-quick .ic.k-trial { background: var(--soft-lilac); color: var(--soft-lilac-ink); }
.p-none { --pl-bg: #ececed; --pl-ink: #55585a; --pl-a: #f7f7f8; --pl-b: #ececed; }
.ig-au-quick .ic.k-new { background: var(--soft-mist); color: var(--soft-mist-ink); }

/* bước thanh toán (cổng chưa tích hợp) */
.ig-pay { display: flex; flex-direction: column; gap: 12px; }
.ig-pay .sum { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 10px; background: var(--bg-subtle); font-size: 14px; }
.ig-pay .sum b { font-size: 20px; font-weight: 500; }
.ig-pay .methods { display: flex; flex-direction: column; gap: 8px; }
.ig-pay .methods button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: 10px; }
.ig-pay .methods button:hover { border-color: var(--line-active); }
.ig-pay .methods button.on { border-color: var(--line-active); background: var(--bg-subtle); }
.ig-pay .rd { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border); box-sizing: border-box; flex: none; }
.ig-pay .on .rd { border: 5px solid var(--accent-dark); }
.ig-pay .t { display: flex; flex-direction: column; }
.ig-pay .t b { font-size: 14px; font-weight: 500; }
.ig-pay .t small { font-size: 12px; color: var(--text-tertiary); }
.ig-pay .gateway { display: flex; gap: 10px; padding: 18px 14px; border: 1.5px dashed var(--border); border-radius: 10px; color: var(--text-secondary); font-size: 13px; line-height: 19px; }
.ig-pay .gateway .gm-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.ig-pay .gateway b { display: block; font-weight: 500; color: var(--text-primary); }
.ig-pay .gm-help { margin: 0; }
.ig-pay .gm-help b { font-weight: 500; color: var(--text-primary); }
.ig-bill-pend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--warning-soft); color: var(--warning-text); }
.ig-bill-pend > .gm-icon { width: 18px; height: 18px; flex: none; }
.ig-bill-pend b { display: block; font-weight: 500; }
.ig-bill-pend span { font-size: 12px; }
.ig-bill-pend .spacer { flex: 1; }

/* ============================================================ liên kết gian hàng (link.js) */
.ig-lk { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 16px; background: rgba(8, 10, 11, 0); transition: background-color .2s; }
.ig-lk.is-in { background: rgba(8, 10, 11, .72); }
.ig-lk-box { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 20px; background: var(--bg-surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35); transform: translateY(14px) scale(.97); opacity: 0; transition: transform .24s cubic-bezier(.2, .9, .3, 1.2), opacity .2s; }
.ig-lk.is-in .ig-lk-box { transform: none; opacity: 1; }
.ig-lk-box .x { all: unset; box-sizing: border-box; cursor: pointer; position: absolute; z-index: 3; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-secondary); background: rgba(255, 255, 255, .7); }
.ig-lk-box .x:hover { background: var(--bg-hover); color: var(--text-primary); }
.ig-lk-box .x .gm-icon { width: 16px; height: 16px; }
.ig-lk-box h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -.01em; }
.ig-lk-box p { margin: 0; font-size: 14px; line-height: 21px; color: var(--text-secondary); }
.ig-lk-box .foot { display: flex; justify-content: flex-end; gap: 8px; }
.ig-lk-box .foot .gm-btn { height: 40px; padding: 0 16px; }
.ig-lk-box .foot .gm-icon { width: 15px; height: 15px; }
/* hero: GOPUSH ↔ TikTok Shop trên nền tối có đốm sáng cyan */
.ig-lk-box .hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 14px;
  height: 132px; background: #121415; border-radius: 20px 20px 0 0; }
.ig-lk-box .hero .glow { position: absolute; z-index: -1; left: 50%; bottom: -70px; width: 360px; height: 160px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(37, 244, 238, .75), rgba(37, 244, 238, 0)); filter: blur(30px); animation: deny-pulse 3.6s ease-in-out infinite; }
.ig-lk-box .node { height: 52px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border-radius: 14px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: 14px; font-weight: 500; }
.ig-lk-box .node .ig-logo { height: 22px; }
.ig-lk-box .node.tt .gm-icon { width: 20px; height: 20px; }
.ig-lk-box .node em { font-style: normal; }
.ig-lk-box .wire { display: inline-flex; align-items: center; gap: 4px; }
.ig-lk-box .wire i { width: 22px; height: 0; border-top: 2px dashed rgba(37, 244, 238, .6); }
.ig-lk-box .wire b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #25f4ee; color: #0b3b3a; box-shadow: 0 0 18px rgba(37, 244, 238, .7); }
.ig-lk-box .wire b .gm-icon { width: 15px; height: 15px; }
.ig-lk-box .body { padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.ig-lk-box .body.done { align-items: center; text-align: center; padding-bottom: 28px; }
.ig-lk-box .steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.ig-lk-box .steps li { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.ig-lk-box .steps li + li { border-top: 1px solid var(--border-light); }
.ig-lk-box .steps .n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500;
  background: var(--bg-muted); color: var(--text-secondary); }
.ig-lk-box .steps .n .gm-icon { width: 13px; height: 13px; }
.ig-lk-box .steps li.is-cur .n { background: var(--accent-dark); color: var(--on-accent); box-shadow: 0 0 0 4px var(--ring); }
.ig-lk-box .steps li.is-done .n { background: var(--success); color: #fff; }
.ig-lk-box .steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ig-lk-box .steps b { font-size: 14px; font-weight: 500; }
.ig-lk-box .steps li > div > span { font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.ig-lk-open { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; height: 38px; padding: 0 14px; border-radius: 10px;
  background: #121415; color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.ig-lk-open:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(18, 20, 21, .2); }
.ig-lk-open .gm-icon { width: 15px; height: 15px; }
.ig-lk-open .gm-icon:last-child { width: 13px; height: 13px; opacity: .7; }
:root[data-theme="dark"] .ig-lk-open { background: #f1f2f3; color: #121415; }
.ig-lk-check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-subtle); font-size: 13px; color: var(--text-secondary); }
.ig-lk-check i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent-dark); animation: ix-spin .7s linear infinite; }
.ig-lk-sync { width: 220px; height: 5px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.ig-lk-sync i { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, #25f4ee, #0b8f8a); animation: lk-sync 1.1s ease-in-out infinite; }
@keyframes lk-sync { from { transform: translateX(-110%); } to { transform: translateX(260%); } }
.ig-lk-box .note { display: flex; gap: 8px; font-size: 12px; line-height: 18px; color: var(--text-tertiary); }
.ig-lk-box .note .gm-icon { width: 13px; height: 13px; flex: none; margin-top: 2px; }
/* popup nhỏ: chưa liên kết */
.ig-lk-box.is-need { width: min(400px, 100%); padding: 28px 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ig-lk-box.is-need .badge { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 4px;
  background: linear-gradient(135deg, #e6fffe, #c9f7f5); color: #0b6f6b; box-shadow: 0 8px 24px rgba(37, 244, 238, .25); }
.ig-lk-box.is-need .badge .gm-icon { width: 24px; height: 24px; }
.ig-lk-box.is-need .foot { width: 100%; margin-top: 10px; }
.ig-lk-box.is-need .foot .gm-btn { flex: 1; justify-content: center; }
/* khối nhắc trên Trang chủ */
.ig-lkcall { display: flex; align-items: center; gap: 12px; margin: var(--space-4) var(--space-6) 0; padding: 9px 10px 9px 12px; border-radius: 10px;
  background: #f3fbfb; border: 1px solid #d6efee; }
.ig-lkcall .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #dcf5f3; color: #0d7f7a; flex: none; }
.ig-lkcall .ic .gm-icon { width: 14px; height: 14px; }
.ig-lkcall .tx { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ig-lkcall b { font-weight: 500; font-size: 13px; color: #123d3b; }
.ig-lkcall .tx span { font-size: 12.5px; color: #5b7775; }
.ig-lkcall .spacer { flex: 1; }
.ig-lkcall .go { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 7px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 500; background: #fff; color: #0d6e6a; border: 1px solid #bfe6e3; transition: background .15s, border-color .15s; }
.ig-lkcall .go:hover { background: #e3f7f5; border-color: #9fd9d5; }
.ig-lkcall .go .gm-icon { width: 13px; height: 13px; }
@media (max-width: 640px) { .ig-lkcall { flex-wrap: wrap; } .ig-lkcall .spacer { display: none; } .ig-lkcall .go { margin-left: 40px; } }
:root[data-theme="dark"] .ig-lkcall { background: #12292a; border-color: #1f4645; }
:root[data-theme="dark"] .ig-lkcall .ic { background: #1a3d3c; color: #8ae9e4; }
:root[data-theme="dark"] .ig-lkcall b { color: #d5f6f4; }
:root[data-theme="dark"] .ig-lkcall .tx span { color: #8fb3b1; }
:root[data-theme="dark"] .ig-lkcall .go { background: #163332; color: #9ef3ef; border-color: #2a5a58; }
/* danh sách tài khoản demo: 2 cột gọn */
.ig-au-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ig-au-quick .h { grid-column: 1 / -1; }
.ig-au-quick button { align-items: flex-start; padding: 10px; gap: 10px; }
.ig-au-quick button > .gm-icon { display: none; }
.ig-au-quick .ic { width: 28px; height: 28px; border-radius: 8px; }
.ig-au-quick .ic .gm-icon { width: 14px; height: 14px; }
.ig-au-quick .t em { font-style: normal; font-size: 11.5px; line-height: 16px; color: var(--text-secondary); }
.ig-au-quick small { font-size: 10.5px; margin-top: 2px; word-break: break-all; }
.ig-au-quick .ic.k-basic { background: var(--soft-sage); color: var(--soft-sage-ink); }
.ig-au-quick .ic.k-link { background: #c9f7f5; color: #0b6f6b; }
@media (max-width: 480px) { .ig-au-quick { grid-template-columns: 1fr; } }

.ig-au-quick small { word-break: normal; overflow-wrap: anywhere; margin-top: 0; }
.ig-au-quick .t > small:first-of-type { margin-top: 4px; }
.ig-au-quick .reset { grid-column: 1 / -1; justify-content: center; align-items: center; gap: 6px; padding: 8px; border-style: dashed; font-size: 12px; color: var(--text-secondary); }
.ig-au-quick .reset .gm-icon { display: inline-block; width: 13px; height: 13px; }


/* thang lớp nổi: thông báo nhỏ (toast) luôn trên mọi popup */
.ig-toast { z-index: 300; }
/* nền tối: hướng dẫn liên kết, đăng nhập nhanh */
:root[data-theme="dark"] .ig-lk-box .x { background: rgba(255, 255, 255, .08); color: var(--text-secondary); }
:root[data-theme="dark"] .ig-au-quick .ic.k-link { background: #123331; color: #7ff8f4; }

/* ============================================================ hướng dẫn ủy quyền (kiểu màn hình OAuth của sản phẩm thật)
   một khung trắng, không hiệu ứng: logo hai bên, các bước đánh số, khung quyền yêu cầu */
.ig-lk-box.is-auth { width: min(560px, 100%); border-radius: 14px; box-shadow: 0 24px 64px rgba(0, 0, 0, .28); }
.ig-lk-box.is-auth > .x { top: 14px; right: 14px; width: 30px; height: 30px; background: transparent; }
.ig-auth { padding: 28px 32px 22px; display: flex; flex-direction: column; gap: 20px; }
.ig-auth .brands { display: flex; align-items: center; gap: 12px; }
.ig-auth .mark { height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; border: 1px solid var(--border-light);
  background: var(--bg-surface); font-size: 13px; font-weight: 500; }
.ig-auth .mark .ig-logo { height: 18px; }
.ig-auth .mark .gm-icon { width: 17px; height: 17px; }
.ig-auth .arrows { display: inline-flex; color: var(--text-tertiary); }
.ig-auth .arrows .gm-icon { width: 16px; height: 16px; }
.ig-auth .arrows .gm-icon + .gm-icon { margin-left: -6px; }
.ig-auth h2 { margin: -4px 0 0; font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -.01em; }
.ig-auth .lead { margin: -14px 0 0; font-size: 14px; line-height: 21px; color: var(--text-secondary); }
.ig-auth .steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: st; }
.ig-auth .steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; }
.ig-auth .steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500;
  background: var(--bg-muted); color: var(--text-secondary); }
.ig-auth .steps .n .gm-icon { width: 13px; height: 13px; }
.ig-auth .steps li.is-cur .n { background: var(--accent-dark); color: var(--on-accent); }
.ig-auth .steps li.is-done .n { background: var(--success-soft); color: var(--success-text); }
.ig-auth .steps .c { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.ig-auth .steps .c b { font-size: 14px; font-weight: 500; }
.ig-auth .steps .c span { font-size: 13px; line-height: 19px; color: var(--text-secondary); }
.ig-auth .steps li:not(.is-cur):not(.is-done) .c b { color: var(--text-secondary); font-weight: 400; }
.ig-auth .open { align-self: flex-start; margin-top: 8px; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px;
  background: var(--accent-dark); color: var(--on-accent); font-size: 13px; font-weight: 500; text-decoration: none; }
.ig-auth .open:hover { background: var(--accent-hover); }
.ig-auth .open .gm-icon { width: 15px; height: 15px; }
.ig-auth .open .gm-icon:last-child { width: 13px; height: 13px; opacity: .7; }
.ig-auth .scope { border: 1px solid var(--border-light); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.ig-auth .scope .h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-tertiary); }
.ig-auth .scope .h b { font-weight: 500; color: var(--text-secondary); }
.ig-auth .scope ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.ig-auth .scope li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ig-auth .scope li .gm-icon { width: 14px; height: 14px; color: var(--success); flex: none; }
.ig-auth .checking { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.ig-auth .checking i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--text-primary); animation: ix-spin .7s linear infinite; }
.ig-auth .foot { display: flex; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.ig-auth .foot .help { margin-right: auto; font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.ig-auth .foot .help:hover { color: var(--text-primary); text-decoration: underline; }
.ig-auth .foot .gm-btn { height: 36px; }
.ig-auth .foot .gm-icon { width: 14px; height: 14px; }
.ig-auth .note { margin: -8px 0 0; font-size: 12px; line-height: 17px; color: var(--text-tertiary); }
.ig-auth.is-done { align-items: center; text-align: center; padding: 40px 32px 32px; gap: 12px; }
.ig-auth.is-done .ok { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success-text); }
.ig-auth.is-done .ok .gm-icon { width: 22px; height: 22px; }
.ig-auth.is-done h2 { margin: 4px 0 0; }
.ig-auth.is-done p { margin: 0; font-size: 14px; line-height: 21px; color: var(--text-secondary); max-width: 40ch; }
.ig-auth.is-done .ig-lk-sync { margin-top: 8px; height: 3px; }
.ig-auth.is-done .ig-lk-sync i { background: var(--text-primary); }
@media (max-width: 520px) { .ig-auth { padding: 24px 20px 18px; } .ig-auth .scope ul { grid-template-columns: 1fr; } }

.gm-icon.is-solid { fill: currentColor; stroke: none; }
/* popup ủy quyền dạng chữ nhật ngang */
.ig-lk-box.is-auth { width: min(900px, 100%); }
.ig-auth { padding: 28px 32px 22px; gap: 22px; }
.ig-auth .brands { gap: 10px; }
.ig-auth .head { display: flex; flex-direction: column; gap: 4px; margin-top: -6px; }
.ig-auth .head h2, .ig-auth .head .lead { margin: 0; }
.ig-auth .cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ig-auth .cols .steps { gap: 0; }
.ig-auth .cols .steps li { padding: 10px 0; }
.ig-auth .cols .steps li:first-child { padding-top: 0; }
.ig-auth .cols .steps li + li { border-top: 1px solid var(--border-light); }
.ig-auth .right { display: flex; flex-direction: column; gap: 14px; }
.ig-auth .right .scope ul { grid-template-columns: 1fr; gap: 8px; }
.ig-auth .right .scope .h { flex-direction: column; gap: 2px; }
.ig-auth .right .note { margin: 0; }
.ig-auth .mark .gm-icon.is-solid { width: 18px; height: 18px; }
.ig-auth.is-done { padding: 44px 32px 36px; }
@media (max-width: 760px) { .ig-auth .cols { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

/* nút mở trang ủy quyền: nhỏ gọn, nền pastel xanh TikTok */
.ig-auth .open { height: 30px; padding: 0 10px; gap: 6px; margin-top: 8px; border-radius: 7px; font-size: 12.5px;
  background: #dff7f6; color: #0b5c59; border: 1px solid #bfeeec; }
.ig-auth .open:hover { background: #cdf2f0; color: #084a47; }
.ig-auth .open .gm-icon { width: 13px; height: 13px; }
.ig-auth .open .gm-icon:last-child { width: 12px; height: 12px; opacity: .65; }
:root[data-theme="dark"] .ig-auth .open { background: #123331; color: #9ef3ef; border-color: #1f5a57; }
/* popup chữ (không mời nâng cấp): trang chỉ dành cho admin, gói cao nhất chạm giới hạn */
.ig-deny-box.is-text { width: min(400px, 100%); }
.ig-deny .note { position: relative; background: var(--surface, #fff); color: var(--text, #111); border-radius: 14px; padding: 22px 22px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28); }
.ig-deny .note .x { top: 12px; right: 12px; width: 28px; height: 28px; background: transparent; color: var(--text-2, #555); box-shadow: none; }
.ig-deny .note .x:hover { background: var(--bg-soft, #f2f3f5); transform: none; }
.ig-deny .note .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #eef4ff; color: #3d5bd9; margin-bottom: 12px; }
.ig-deny .note .ic .gm-icon { width: 18px; height: 18px; }
.ig-deny .note h2 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.ig-deny .note p { font-size: 13.5px; line-height: 1.55; color: var(--text-2, #555); margin: 0; }
.ig-deny .note .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
:root[data-theme="dark"] .ig-deny .note .ic { background: #1d2540; color: #9fb3ff; }
/* Cài đặt doanh nghiệp: dòng ghim đáy sidebar + thanh tab trên trang */
.ig-side-foot { margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--border-light); }
.ig-settabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border-light); }
.ig-settabs::-webkit-scrollbar { display: none; }
.ig-settabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 9px 12px; margin-bottom: -1px;
  font-size: 13px; color: var(--text-secondary); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.ig-settabs a:hover { color: var(--text-primary); }
.ig-settabs a.is-on { color: var(--text-primary); font-weight: 500; border-bottom-color: var(--text-primary); }
.ig-settabs a .gm-icon { width: 15px; height: 15px; }
.ig-settabs a .lk { width: 12px; height: 12px; opacity: .55; }
@media (max-width: 640px) { .ig-settabs { margin: 0 16px var(--space-3); } }
/* Thao tác nhanh: 4 ô cao, icon pastel, biểu tượng lớn mờ góc dưới phải */
.ig-tiles:has(.ig-tile.is-big) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ig-tiles:has(.ig-tile.is-big) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ig-tiles:has(.ig-tile.is-big) { grid-template-columns: 1fr; } }
.ig-tile.is-big { position: relative; overflow: hidden; flex-direction: column; align-items: flex-start; gap: var(--space-3);
  min-height: 132px; padding: var(--space-4); }
.ig-tile.is-big .ic { width: 40px; height: 40px; border-radius: 12px; }
.ig-tile.is-big .ic .gm-icon { width: 20px; height: 20px; }
.ig-tile.is-big .t { position: relative; z-index: 1; width: 100%; }
.ig-tile.is-big .go { position: absolute; top: var(--space-4); right: var(--space-4); }
.ig-tile.is-big .wm { position: absolute; right: -10px; bottom: -16px; opacity: .16; pointer-events: none;
  transform: rotate(-14deg); transition: transform .3s cubic-bezier(.2,.7,.3,1), opacity .2s; }
.ig-tile.is-big .wm svg { display: block; width: 84px; height: 84px; filter: blur(.6px); }
.ig-tile.is-big:hover .wm { transform: rotate(-6deg) translate(-3px, -3px) scale(1.04); opacity: .24; }
.ig-tile.t0 .ic { background: #e8f0ff; color: #4a6cd4; }
.ig-tile.t1 .ic { background: #e6f7f1; color: #23946c; }
.ig-tile.t2 .ic { background: #fff1e4; color: #d07a2c; }
.ig-tile.t3 .ic { background: #f3ecff; color: #7d5bd0; }
:root[data-theme="dark"] .ig-tile.t0 .ic { background: #1d2846; color: #9db4ff; }
:root[data-theme="dark"] .ig-tile.t1 .ic { background: #15332a; color: #7fdcb6; }
:root[data-theme="dark"] .ig-tile.t2 .ic { background: #3a2817; color: #f2b680; }
:root[data-theme="dark"] .ig-tile.t3 .ic { background: #2a2142; color: #c4b0ff; }

/* banner quảng bá ở đáy sidebar: tối giản, nền trắng, viền mảnh, vạch gradient TikTok mảnh ở mép trên */
.ig-promo { position: relative; overflow: hidden; display: block; margin: 0 0 var(--space-2); padding: 11px 34px 10px 12px;
  border-radius: 10px; text-decoration: none; color: var(--text-primary); background: var(--bg-surface);
  border: 1px solid var(--border-light); transition: border-color .18s, box-shadow .18s; }
.ig-promo::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, #25f4ee, #fe2c55); opacity: .85; }
.ig-promo:hover { border-color: var(--border-strong, #d0d4d6); box-shadow: 0 6px 18px -12px rgba(18, 20, 21, .3); }
.ig-promo b { display: block; font-size: 13px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.ig-promo em { font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 4px; color: #e0244a; background: rgba(254, 44, 85, .09); }
.ig-promo .pd { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11.5px; color: var(--text-tertiary); white-space: nowrap; }
.ig-promo .pa { position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; color: var(--text-tertiary);
  transition: transform .18s, color .18s; }
.ig-promo:hover .pa { transform: translate(2px, -2px); color: var(--text-primary); }
:root[data-theme="dark"] .ig-promo em { color: #ff7a96; background: rgba(254, 44, 85, .16); }
.ig-app.sub-collapsed .ig-promo { display: none; }

:root[data-theme="dark"] .ig-tile.is-big .wm { opacity: .2; }
/* Thao tác nhanh: nổi khối — nền ánh màu riêng, bóng mềm nhiều lớp, nhấc lên khi rê */
.ig-tile.is-big { --tc: 91, 127, 230; border-color: rgba(var(--tc), .14);
  background: linear-gradient(180deg, #fff 35%, rgba(var(--tc), .07) 100%);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 24px -14px rgba(var(--tc), .35);
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s, border-color .2s; }
.ig-tile.is-big.t1 { --tc: 47, 167, 123; }
.ig-tile.is-big.t2 { --tc: 236, 138, 59; }
.ig-tile.is-big.t3 { --tc: 138, 99, 224; }
.ig-tile.is-big:hover { transform: translateY(-3px); border-color: rgba(var(--tc), .35);
  background: linear-gradient(180deg, #fff 30%, rgba(var(--tc), .1) 100%);
  box-shadow: 0 2px 4px rgba(16, 24, 40, .04), 0 18px 32px -16px rgba(var(--tc), .5); }
.ig-tile.is-big .ic { box-shadow: 0 0 0 1px rgba(var(--tc), .12) inset; }
.ig-tile.is-big .wm { opacity: .2; }
.ig-tile.is-big:hover .wm { opacity: .3; }
:root[data-theme="dark"] .ig-tile.is-big { background: linear-gradient(180deg, var(--bg-surface) 35%, rgba(var(--tc), .12) 100%); }
:root[data-theme="dark"] .ig-tile.is-big:hover { background: linear-gradient(180deg, var(--bg-surface) 30%, rgba(var(--tc), .18) 100%); }
/* thanh thông báo: đổi nội dung bằng mờ dần + trượt nhẹ */
.ig-ann .tx, .ig-ann .cta, .ig-ann .pg .gm-num { transition: opacity .36s ease, transform .36s ease; }
.ig-ann.is-out .tx, .ig-ann.is-out .cta, .ig-ann.is-out .pg .gm-num { opacity: 0; transform: translateY(-4px); }
.ig-ann.is-in-start .tx, .ig-ann.is-in-start .cta, .ig-ann.is-in-start .pg .gm-num { opacity: 0; transform: translateY(4px); transition: none; }
.ig-ann > div { transition: background-color .5s ease, color .5s ease; }
@media (prefers-reduced-motion: reduce) { .ig-ann .tx, .ig-ann .cta, .ig-ann .pg .gm-num { transition: none; } }

/* ============================================================ app mobile shell */
.ig-mobile-nav,
.ig-mobile-navback { display: none; }

@media (max-width: 720px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .ig-app { width: 100%; max-width: 100vw; overflow: hidden; }
  .ig-app .ig-body,
  .ig-app.sub-collapsed .ig-body,
  .ig-app.ai-open .ig-body { grid-template-columns: minmax(0, 1fr); }

  .gm-topbar { gap: 4px; padding: 0 8px; width: 100%; max-width: 100vw; }
  .ig-mobile-nav {
    all: unset; box-sizing: border-box; display: grid; place-items: center; flex: none;
    width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--text-inverse); cursor: pointer;
  }
  .ig-mobile-nav:hover,
  .ig-mobile-nav[aria-expanded="true"] { background: var(--bg-topbar-pill); }
  .ig-mobile-nav .gm-icon { width: 19px; height: 19px; }
  .gm-topbar__brand { padding: 0 4px; }
  .gm-topbar .ig-logo { height: 27px; }
  .gm-topbar .sep { display: none; }
  .ig-shop { flex: 1 1 auto; min-width: 0; max-width: none; height: 40px; padding: 0 5px; gap: 6px; }
  .ig-shop .flag { display: none; }
  .ig-shop .txt { min-width: 0; }
  .ig-shop .nm { display: block; max-width: 100%; font-size: 12.5px; text-overflow: ellipsis; overflow: hidden; }
  .ig-shop .gm-dot { display: inline-block; margin-left: 5px; }
  .ig-shop .sw { width: 12px; height: 12px; }
  .gm-topbar__right { flex: none; margin-left: 0; gap: 0; }
  .gm-topbar__right > :not(.ig-avatarbtn) { display: none !important; }
  .ig-avatarbtn { width: 42px; height: 40px; padding: 0; justify-content: center; }
  .ig-avatarbtn > .gm-icon { display: none; }

  .gm-sidebar {
    position: fixed; top: var(--size-topbar); bottom: 0; left: 0; z-index: 46;
    width: min(84vw, 320px); padding: 10px; overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-102%); visibility: hidden; box-shadow: var(--shadow-pop);
    transition: transform .22s ease, visibility .22s;
  }
  .ig-app.has-ann .gm-sidebar { top: calc(var(--size-topbar) + var(--ann-h)); }
  .ig-app.mobile-nav-open .gm-sidebar { transform: translateX(0); visibility: visible; }
  .ig-mobile-navback {
    all: unset; box-sizing: border-box; display: block; position: fixed; inset: var(--size-topbar) 0 0; z-index: 45;
    background: rgba(8, 10, 11, .46); opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .18s ease, visibility .18s;
  }
  .ig-app.has-ann .ig-mobile-navback { top: calc(var(--size-topbar) + var(--ann-h)); }
  .ig-app.mobile-nav-open .ig-mobile-navback { opacity: 1; visibility: visible; pointer-events: auto; }

  .ig-app .gm-sidebar .gm-nav-label,
  .ig-app.sub-collapsed .gm-sidebar .gm-nav-label { display: block; font-size: 12px; padding: var(--space-3) var(--space-2) var(--space-1); }
  .ig-app .gm-sidebar .gm-nav-label:first-child,
  .ig-app.sub-collapsed .gm-sidebar .gm-nav-label:first-child { display: block; padding-top: var(--space-1); }
  .ig-app .gm-sidebar .gm-nav-label::after { display: none; }
  .ig-app .gm-sidebar .gm-nav-item,
  .ig-app.sub-collapsed .gm-sidebar .gm-nav-item { justify-content: flex-start; padding: 0 var(--space-2); }
  .ig-app .gm-sidebar .gm-nav-item .tx,
  .ig-app .gm-sidebar .gm-nav-item .gm-chev,
  .ig-app .gm-sidebar .gm-nav-sub,
  .ig-app .gm-sidebar .ig-navsub,
  .ig-app.sub-collapsed .gm-sidebar .gm-nav-item .tx,
  .ig-app.sub-collapsed .gm-sidebar .gm-nav-item .gm-chev,
  .ig-app.sub-collapsed .gm-sidebar .gm-nav-sub,
  .ig-app.sub-collapsed .gm-sidebar .ig-navsub { display: flex; }
  .ig-app .gm-sidebar .ig-navsub,
  .ig-app.sub-collapsed .gm-sidebar .ig-navsub { display: grid; }
  .ig-app .gm-sidebar .gm-nav-sub,
  .ig-app.sub-collapsed .gm-sidebar .gm-nav-sub { padding-left: 32px; }
  .ig-app .gm-sidebar .ig-navgrp > .gm-nav-item .ig-navdot { position: static; width: auto; height: auto; min-width: 20px; padding: 0 6px; font-size: 11px; box-shadow: none; }
  .ig-app .gm-sidebar .ig-navgrp.is-open > .gm-nav-item .ig-navdot { display: none !important; }
  .ig-side-foot { margin-top: var(--space-4); }

  .ig-content { width: 100%; max-width: 100vw; min-width: 0; overflow-x: hidden; padding: 0 8px calc(20px + env(safe-area-inset-bottom)); }
  .ig-page-head { padding: 16px 4px 12px; gap: 10px; }
  .ig-page-head > div:first-child { min-width: 0; width: 100%; }
  .ig-page-head h1 { font-size: 21px; line-height: 28px; }
  .ig-page-head p { font-size: 13px; line-height: 20px; }
  .ig-head-actions { width: 100%; padding-top: 0; }
  .ig-head-actions .gm-btn { flex: 1 1 auto; }
  .ig-sheet { width: 100%; max-width: 100%; }
  .ig-section { padding: 14px 12px; }
  .ig-section > h2, .ig-sec-head h2 { font-size: 16px; line-height: 23px; }
  .ig-grid-2, .ig-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .ig-filters-bar { padding: 12px; gap: 7px; }
  .ig-filters-bar .ig-fsearch { flex-basis: 100%; max-width: none; }
  .ig-filters-adv { margin: 0 12px 12px; padding: 10px; }
  .ig-fgrp { grid-template-columns: minmax(0, 1fr); }
  .ig-fgrp > .lb { line-height: 22px; }
  .ig-filters-chips { padding: 0 12px 12px; }
  .ig-creator-scan-control { width: 100%; }
  .ig-creator-scan-select { width: auto; flex-basis: 190px; }
  .ig-creator-scan-status { grid-template-columns: 30px minmax(0, 1fr); margin: 6px 8px; padding: 8px 9px; }
  .ig-creator-scan-status-state { grid-column: 2; justify-self: start; }
  .ig-creator-source { align-items: stretch; flex-direction: column; margin: 12px 12px 0; }
  .ig-creator-source-label { min-width: 0; }
  .ig-creator-source .gm-seg { display: flex; width: 100%; }
  .ig-creator-source .gm-seg button { flex: 1 1 0; justify-content: center; padding-inline: 8px; }
  .ig-marketplace-error { align-items: flex-start; flex-wrap: wrap; margin: 12px 12px 0; }
  .ig-marketplace-error .gm-btn { margin-left: 28px; }
  .gm-tabs { padding-inline: 8px; overflow-x: auto; scrollbar-width: none; }
  .gm-table { min-width: 720px; }
  .gm-table th, .gm-table td { padding: 10px 12px; }
  .gm-pager { padding: 10px 12px; overflow-x: auto; justify-content: flex-start; }
  .ig-menu { max-width: calc(100vw - 16px); min-width: min(260px, calc(100vw - 16px)); max-height: calc(100vh - 72px); overflow-y: auto; }
  .ig-modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 10px; }
  .ig-modal-body { padding: 14px; }
  .ig-modal footer { padding: 10px 14px 14px; flex-wrap: wrap; }
  .ig-modal footer .gm-btn { flex: 1 1 auto; }
  .ig-drawer { width: 100vw; }
  .ig-drawer header { padding: 12px 14px; }
  .ig-drawer .scroll { padding: 12px; }
  .ig-drawer footer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .ig-wzbar { padding: 7px 8px; }
  .ig-wzsteps { gap: 3px; justify-content: center; }
  .ig-wzstep { padding: 6px; }
  .ig-wzline { min-width: 5px; }
  .ig-wzbody { padding: 4px 12px 16px; }
  .ig-wzfoot {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 7px; flex-wrap: wrap;
    margin: 0 -8px;
  }
  .ig-wzfoot .sum { order: -1; width: 100%; white-space: normal; }
  .ig-wzfoot .spacer { display: none; }
  .ig-wzfoot .gm-btn { flex: 1 1 auto; }
  .ig-todo li { align-items: flex-start; flex-wrap: wrap; }
  .ig-todo li .gm-btn { margin-left: 34px; }
  .ig-runs .r1 { flex-wrap: wrap; }
  .ig-runs .r1 .n { flex-basis: calc(100% - 30px); }
  .ig-runs .r2 { gap: 8px; flex-wrap: wrap; }
  .ig-support { right: 12px; bottom: 12px; }
  .ig-toast { max-width: calc(100vw - 24px); bottom: 16px; text-align: center; }
}

@media (max-width: 420px) {
  .gm-topbar__brand { display: none; }
  .ig-shop .flag { display: inline; }
  .ig-shop .nm { font-size: 13px; }
  .ig-page-head .ig-scope { max-width: 100%; }
  .ig-bill-use { grid-template-columns: minmax(0, 1fr); }
  .ig-ld-steps { grid-template-columns: minmax(0, 1fr); }
  .ig-ld-hero .act, .ig-ld-cta .act { width: 100%; }
  .ig-ld-hero .act .ig-ld-btn, .ig-ld-cta .act .ig-ld-btn { width: 100%; }
}
/* API login CAPTCHA */
.gopush-api-captcha { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; }
.gopush-api-captcha__backdrop { position: absolute; inset: 0; background: rgba(18,20,21,.55); }
.gopush-api-captcha__box { position: relative; width: min(420px, calc(100vw - 32px)); padding: 24px; background: #fff; border-radius: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.2); }
.gopush-api-captcha__box h2 { margin: 0 32px 6px 0; font-size: 20px; }
.gopush-api-captcha__box p { color: #6d6e70; margin: 0 0 16px; }
.gopush-api-captcha__close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.gopush-api-captcha__stage { position: relative; width: 100%; aspect-ratio: 360 / 200; overflow: hidden; border: 1px solid #dedfdf; border-radius: 8px; background: #f7f8f7; user-select: none; }
.gopush-api-captcha__stage img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gopush-api-captcha__target { position: absolute; padding: 0; border: 2px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; touch-action: manipulation; }
.gopush-api-captcha__target:hover { border-color: rgba(18,20,21,.34); background: rgba(255,255,255,.12); }
.gopush-api-captcha__target.is-selected { border-color: #121415; background: rgba(255,255,255,.2); box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 0 4px rgba(18,20,21,.28); }
.gopush-api-captcha__target.is-selected::after { content: '✓'; position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #121415; font-size: 12px; font-weight: 700; line-height: 1; }
.gopush-api-captcha__loading { position: absolute; inset: 0; display: grid; place-items: center; color: #6d6e70; font-size: 13px; }
.gopush-api-captcha__loading.is-error { color: #b42318; }
.gopush-api-captcha__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 10px; margin-top: 16px; }
.gopush-api-captcha__refresh, .gopush-api-captcha__submit { min-height: 42px; padding: 10px 14px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.gopush-api-captcha__refresh { border: 1px solid #d7d8d8; color: #252728; background: #fff; }
.gopush-api-captcha__refresh:hover { background: #f5f6f6; }
.gopush-api-captcha__submit { border: 1px solid #121415; color: #fff; background: #121415; }
.gopush-api-captcha__refresh:disabled, .gopush-api-captcha__submit:disabled { cursor: wait; opacity: .56; }
.gopush-api-captcha__error { min-height: 18px; color: #b42318 !important; margin: 10px 0 -6px !important; font-size: 12px; }
.gopush-api-captcha__error[hidden] { display: block; visibility: hidden; }
.gopush-2fa-methods { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 14px; }
.gopush-2fa-method { min-height: 34px; padding: 7px 10px; border: 1px solid #d7d8d8; border-radius: 6px; color: #4f5253; background: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.gopush-2fa-method:hover { background: #f5f6f6; }
.gopush-2fa-method.is-active { border-color: #121415; color: #fff; background: #121415; }
.gopush-2fa-help { min-height: 40px; font-size: 13px; line-height: 20px; }
@media (max-width: 390px) {
  .gopush-api-captcha__box { width: calc(100vw - 20px); padding: 18px; }
  .gopush-api-captcha__box h2 { font-size: 18px; }
  .gopush-api-captcha__actions { grid-template-columns: minmax(0, 1fr); }
  .gopush-api-captcha__refresh, .gopush-api-captcha__submit { width: 100%; }
}

/* System administration */
.ig-admin-loading { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-secondary); }
.ig-admin-loading .gm-icon { animation: ig-admin-spin 1s linear infinite; }
@keyframes ig-admin-spin { to { transform: rotate(360deg); } }
.ig-admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ig-admin-stat { min-height: 108px; padding: 18px; display: flex; align-items: flex-start; gap: 14px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); }
.ig-admin-stat > .ic { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--soft-sky); color: var(--soft-sky-ink); }
.ig-admin-stat:nth-child(2) > .ic { background: var(--soft-lilac); color: var(--soft-lilac-ink); }
.ig-admin-stat:nth-child(3) > .ic { background: var(--soft-sage); color: var(--soft-sage-ink); }
.ig-admin-stat:nth-child(4) > .ic { background: var(--soft-sand); color: var(--soft-sand-ink); }
.ig-admin-stat .ic .gm-icon { width: 19px; height: 19px; }
.ig-admin-stat div { min-width: 0; display: flex; flex-direction: column; }
.ig-admin-stat b { font-size: 25px; line-height: 30px; font-weight: 500; }
.ig-admin-stat span { font-size: 13px; color: var(--text-secondary); }
.ig-admin-stat small { margin-top: 5px; font-size: 11px; color: var(--text-tertiary); }
.ig-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ig-admin-panel { min-width: 0; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); overflow: hidden; }
.ig-admin-panel > header { min-height: 52px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-light); }
.ig-admin-panel h2 { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; }
.ig-admin-panel > .body { min-width: 0; }
.ig-admin-panel .gm-table-wrap { border: 0; }
.ig-public-editor-meta { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-secondary); font-size: 12px; }
.ig-public-editor-meta .ig-admin-check { margin: 0; color: var(--text-primary); }
.ig-public-editor { height: min(720px, calc(100vh - 245px)); min-height: 520px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-surface); }
.ig-public-editor-code, .ig-public-editor-preview { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ig-public-editor-code { border-right: 1px solid var(--border-light); background: #171a20; }
.ig-public-editor-tabs { height: 46px; flex: 0 0 46px; display: flex; align-items: end; gap: 2px; padding: 0 10px; border-bottom: 1px solid #303641; background: #20242c; }
.ig-public-editor-tab { height: 38px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; color: #aeb7c6; background: transparent; font: 600 12px/38px var(--font); cursor: pointer; }
.ig-public-editor-tab:hover { color: #fff; }
.ig-public-editor-tab.is-active { color: #fff; border-bottom-color: var(--accent); }
.ig-public-editor-pane { min-height: 0; flex: 1; display: none; }
.ig-public-editor-pane.is-active { display: flex; flex-direction: column; }
.ig-public-editor-pane > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ig-public-editor-pane textarea { width: 100%; min-height: 0; flex: 1; padding: 18px; resize: none; border: 0; outline: 0; color: #e8edf5; background: #171a20; font: 13px/20px Consolas, "Courier New", monospace; tab-size: 2; }
.ig-public-editor-pane textarea::placeholder { color: #697386; }
.ig-public-editor-preview > header { min-height: 46px; flex: 0 0 46px; padding: 7px 10px 7px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border-light); }
.ig-public-editor-preview > header > div { min-width: 0; flex: 1; display: grid; }
.ig-public-editor-preview > header b { font-size: 12px; font-weight: 600; }
.ig-public-editor-preview > header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-tertiary); font-size: 10px; }
.ig-public-editor-preview iframe { width: 100%; min-height: 0; flex: 1; border: 0; background: #fff; }
.ig-public-site-body { min-height: calc(100vh - 160px); }
.ig-public-site-custom { min-height: inherit; }
.ig-admin-row { min-height: 66px; padding: 11px 16px; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--border-light); }
.ig-admin-row:last-child { border-bottom: 0; }
a.ig-admin-row:hover { background: var(--bg-hover); }
.ig-admin-row .row-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-admin-row > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ig-admin-row b { font-size: 13px; font-weight: 500; }
.ig-admin-row small { margin-top: 2px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-admin-integration { border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); overflow: hidden; }
.ig-admin-integration-head { padding: 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border-light); }
.ig-admin-integration-head .logo { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--text-inverse); background: var(--bg-topbar); }
.ig-admin-integration-head .logo .gm-icon { width: 22px; height: 22px; }
.ig-admin-integration-head h2 { margin: 0; font-size: 17px; font-weight: 500; }
.ig-admin-integration-head p { max-width: 760px; margin: 3px 0 0; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.ig-admin-status { padding: 11px 18px; display: flex; align-items: center; gap: 12px; background: var(--bg-subtle); border-bottom: 1px solid var(--border-light); }
.ig-admin-status b { font-size: 12px; font-weight: 500; }
.ig-admin-status span { margin-left: auto; font-size: 11px; color: var(--text-tertiary); }
.ig-admin-form-grid { padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ig-admin-section-actions { padding: 14px 18px 0; display: flex; justify-content: flex-end; gap: 8px; }.ig-admin-payment > h2 { margin: 18px 18px 4px; font-size: 17px; line-height: 24px; font-weight: 500; }
.ig-admin-payment > .ig-admin-integration-intro { margin: 0 18px 16px; }
.ig-admin-payment-links { margin: 0 18px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.ig-admin-payment-links a { color: var(--accent); text-decoration: none; }
.ig-admin-payment-links a:hover { text-decoration: underline; }
.ig-admin-payment-options { display: flex; flex-wrap: wrap; gap: 18px; padding: 0 18px 2px; }
.ig-admin-payment-options .ig-admin-check { margin: 0 0 14px; }
.ig-admin-payment-actions { padding-top: 12px; padding-bottom: 18px; flex-wrap: wrap; }
.gm-admin-select { position: relative; padding: 0; }
.gm-admin-select select { width: 100%; height: 100%; padding: 0 36px 0 12px; border: 0; outline: 0; appearance: none; color: var(--text-primary); background: transparent; font: inherit; }
.gm-admin-select > .gm-icon { position: absolute; right: 10px; pointer-events: none; color: var(--text-tertiary); }
.ig-admin-market-picker { position: relative; }
.ig-admin-integration:has(.ig-admin-market-picker[open]) { overflow: visible; }
.ig-admin-market-picker > summary { list-style: none; cursor: pointer; }
.ig-admin-market-picker > summary::-webkit-details-marker { display: none; }
.ig-admin-market-summary { justify-content: space-between; }
.ig-admin-market-summary .val { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-admin-market-summary .gm-icon { flex: none; color: var(--text-tertiary); transition: transform .12s ease; }
.ig-admin-market-picker[open] .ig-admin-market-summary .gm-icon { transform: rotate(180deg); }
.ig-admin-market-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(430px, 100%); max-height: 276px; padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); box-shadow: 0 10px 24px rgba(28, 34, 46, .16); }
.ig-admin-market-hint { grid-column: 1 / -1; padding: 4px 4px 7px; color: var(--text-secondary); font-size: 11px; line-height: 16px; }
.ig-admin-market-option { min-width: 0; padding: 8px 9px; display: flex; align-items: center; gap: 8px; border-radius: var(--radius-sm); cursor: pointer; }
.ig-admin-market-option:hover { background: var(--bg-hover); }
.ig-admin-market-option input { width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.ig-admin-market-option span { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex: 1; }
.ig-admin-market-option b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.ig-admin-market-option small { flex: none; color: var(--text-secondary); font-size: 11px; }
.ig-admin-check { margin: 0 18px 18px; display: inline-flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.ig-admin-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.ig-admin-integration > .gm-banner { margin: 0 18px 18px; }
.ig-admin-model-section { padding: 0 18px 18px; }
.ig-admin-model-head { display: flex; align-items: end; gap: 18px; margin-bottom: 12px; }
.ig-admin-model-head > div:first-child { flex: 1; min-width: 0; }
.ig-admin-model-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.ig-admin-model-head p { margin: 3px 0 0; color: var(--text-secondary); font-size: 12px; }
.ig-admin-model-head .gm-field { width: min(360px, 45%); }
.ig-admin-models, .ig-admin-permissions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ig-admin-permission { min-width: 0; padding: 11px 12px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface); cursor: pointer; }
.ig-admin-permission:hover { border-color: var(--border); background: var(--bg-subtle); }
.ig-admin-permission input { width: 16px; height: 16px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.ig-admin-permission span { min-width: 0; display: grid; gap: 2px; }
.ig-admin-permission b { overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }
.ig-admin-permission small { overflow-wrap: anywhere; color: var(--text-secondary); font-size: 11px; }
.ig-member-invite { display: grid; gap: 18px; }
.ig-invite-email-state { min-height: 34px; margin-top: -10px; padding: 8px 10px; display: flex; align-items: center; border-radius: var(--radius-sm); background: var(--bg-subtle); color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.ig-invite-email-state[data-invite-email-state="checking"] { background: var(--accent-soft); color: var(--accent-dark); }
.ig-invite-email-state[data-invite-email-state="available"],
.ig-invite-email-state[data-invite-email-state="existing"] { background: var(--success-bg); color: var(--success-text); }
.ig-invite-email-state[data-invite-email-state="error"] { background: var(--danger-soft); color: var(--danger-text); }
.ig-invite-section { display: grid; gap: 10px; }
.ig-invite-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.ig-invite-section-head b { font-size: 14px; font-weight: 500; }
.ig-invite-section-head span { color: var(--text-secondary); font-size: 11px; text-align: right; }
.ig-invite-shops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-member-shop input:disabled + span { opacity: .62; }
.ig-admin-permission-controls { margin: 14px 0; display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .6fr); align-items: end; gap: 14px; }
.ig-admin-permission-controls .ig-admin-check { margin: 0 0 10px; }
.ig-admin-health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.ig-admin-health .ig-admin-panel { min-width: 0; }
.ig-admin-health .ig-admin-panel > header { min-height: 44px; padding: 10px 12px; }
.ig-admin-health .ig-admin-panel > .body { min-width: 0; padding: 3px 12px 8px; }
.ig-admin-health .ig-rows > div { min-height: 32px; align-items: center; padding: 6px 0; }
.ig-admin-health .ig-rows dt { min-width: 0; font-size: 13px; line-height: 20px; }
.ig-admin-health .ig-rows dd { min-width: 0; max-width: 68%; line-height: 20px; overflow-wrap: anywhere; }
.ig-admin-health .gm-tag { justify-content: center; }
.ig-health-queue-summary { min-width: 0; display: grid; overflow: hidden; }
.ig-health-queue-lanes { min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); column-gap: 12px; padding: 4px 0 8px; border-bottom: 1px solid var(--border-light); }
.ig-health-queue-lanes > div { min-width: 0; min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; padding: 7px 0; border-bottom: 1px solid var(--border-light); }
.ig-health-queue-lanes > div:nth-last-child(-n + 2) { border-bottom: 0; }
.ig-health-queue-lanes span { display: block; min-width: 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.ig-health-queue-lanes b { display: block; min-width: 0; color: var(--text-primary); font-size: 13px; line-height: 19px; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.ig-health-counter-heading { min-width: 0; display: flex; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; padding: 8px 0 2px; }
.ig-health-counter-heading b { color: var(--text-primary); font-size: 14px; line-height: 20px; font-weight: 500; }
.ig-health-counter-heading span { margin-left: auto; color: var(--text-tertiary); font-size: 11px; line-height: 17px; text-align: right; overflow-wrap: anywhere; }
.ig-health-counter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); column-gap: 14px; }
.ig-health-counter-grid > div { min-width: 0; min-height: 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid var(--border-light); }
.ig-health-metric-activity-state { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 5px 0 2px; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); font-size: 12px; line-height: 18px; }
.ig-health-metric-activity-state b { color: var(--text-primary); font-weight: 500; white-space: nowrap; }
.ig-health-metric-activity-state span { min-width: 0; color: var(--text-secondary); text-align: right; overflow-wrap: anywhere; }
.ig-health-metric-activity-state.is-active { border-color: var(--success-text); background: var(--success-bg); }
.ig-health-metric-activity-state.is-active b { color: var(--success-text); }
.ig-health-metric-activity-state.is-waiting { border-color: var(--warning); background: var(--warning-soft); }
.ig-health-metric-activity-state.is-waiting b { color: var(--warning-text); }
.ig-health-metric-activity-state.is-idle { border-color: var(--border-light); }
.ig-health-counter-grid span { min-width: 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.ig-health-counter-grid b { min-width: 0; max-width: 100%; color: var(--text-primary); font-size: 14px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.ig-admin-health-runs .ig-health-run-progress {
  display: inline-block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  cursor: help;
}
.ig-health-automation { display: grid; gap: 10px; margin-bottom: 10px; }
.ig-health-scan-control { display: grid; gap: 8px; padding: 8px 0 0; }
.ig-health-scan-heading { display: flex; align-items: center; }
.ig-health-scan-heading h3 { margin: 0 0 4px; font-size: 13px; line-height: 19px; }
.ig-health-scan-heading p { margin: 0; line-height: 18px; }
.ig-health-scan-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-health-scan-fields { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 12px; }
.ig-health-scan-field { min-width: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 8px; }
.ig-health-scan-label { color: var(--text-secondary); font-size: 11px; line-height: 15px; white-space: nowrap; }
.ig-health-scan-toolbar .gm-input { width: 100%; min-width: 0; }
.ig-health-scan-toolbar select { width: 100%; min-width: 0; }
.ig-health-scan-manual-state { justify-self: center; white-space: nowrap; }
.ig-health-scan-toolbar > .gm-btn { min-width: max-content; min-height: 38px; align-self: center; justify-self: stretch; justify-content: center; white-space: nowrap; }
.ig-health-scan-status { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border-light); border-left: 3px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--bg-subtle); font-size: 11px; line-height: 16px; }
.ig-health-scan-status::before { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--border); content: ''; }
.ig-health-scan-status > div { min-width: 0; display: grid; gap: 2px; }
.ig-health-scan-status b { color: var(--text-primary); font-size: 12px; line-height: 17px; }
.ig-health-scan-status span { overflow-wrap: anywhere; }
.ig-health-scan-status.is-running { border-left-color: var(--success-text); }
.ig-health-scan-status.is-running::before { background: var(--success-text); }
.ig-health-scan-status.is-waiting { border-left-color: var(--warning-text); }
.ig-health-scan-status.is-waiting::before { background: var(--warning-text); }
.ig-health-scan-status.is-rate-limited { border-color: var(--warning); border-left-color: var(--warning); background: var(--warning-soft); }
.ig-health-scan-status.is-rate-limited::before { background: var(--warning-text); }
.ig-health-retry-countdown { display: inline-flex; margin-left: 6px; padding: 2px 6px; border-radius: 999px; color: var(--warning-text); background: var(--warning-soft); font-weight: 600; font-variant-numeric: tabular-nums; }
.ig-health-scan-running-state { white-space: nowrap; }
.ig-health-metric-activity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ig-health-metric-lane { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 10px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface); }
.ig-health-metric-lane > b { font-size: 12px; line-height: 17px; }
.ig-health-metric-stats { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.ig-health-metric-stats > div { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border-radius: 4px; background: var(--bg-subtle); }
.ig-health-metric-stats strong { color: var(--text-primary); font-size: 15px; line-height: 20px; font-variant-numeric: tabular-nums; }
.ig-health-metric-stats span, .ig-health-metric-unavailable { color: var(--text-secondary); font-size: 10px; line-height: 14px; text-align: right; overflow-wrap: anywhere; }
.ig-health-metric-lane.is-unavailable { border-color: var(--warning); }
.ig-health-metric-lane.is-unavailable .ig-health-metric-unavailable { color: var(--warning-text); text-align: left; }
.ig-health-automation-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ig-health-automation-head h2 { margin: 0 0 2px; font-size: 15px; line-height: 20px; }
.ig-health-automation-head p { max-width: 720px; margin: 0; line-height: 18px; }
.ig-health-automation-more { display: grid; gap: 8px; padding-top: 0; }
.ig-health-automation-more-head, .ig-health-automation-note > summary { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-primary); font-size: 12px; font-weight: 600; }
.ig-health-automation-more-head span { padding: 2px 7px; border: 1px solid var(--border-light); border-radius: 4px; color: var(--text-secondary); background: var(--bg-subtle); font-size: 10px; font-weight: 500; white-space: nowrap; }
.ig-health-automation-more-body { display: grid; gap: 12px; }
.ig-health-automation-group { display: grid; gap: 6px; }
.ig-health-automation-group h3 { margin: 0; font-size: 13px; line-height: 19px; }
.ig-health-automation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; border-top: 1px solid var(--border-light); }
.ig-health-automation-row { min-width: 0; min-height: 54px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px solid var(--border-light); }
.ig-health-automation-copy { min-width: 0; display: grid; gap: 3px; }
.ig-health-automation-copy b { font-size: 12px; line-height: 17px; }
.ig-health-automation-copy span { color: var(--text-secondary); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.ig-health-toggle { min-width: 106px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); background: var(--bg-surface); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.ig-health-toggle:hover:not(:disabled) { border-color: var(--text-secondary); }
.ig-health-toggle.is-on { border-color: var(--success-text); color: var(--success-text); background: var(--success-bg); }
.ig-health-toggle:disabled { opacity: .58; cursor: wait; }
.ig-health-toggle-state { color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.ig-health-automation-note { padding: 0 10px; border-left: 3px solid var(--warning); color: var(--text-secondary); background: var(--bg-subtle); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.ig-health-automation-note > summary { min-height: 30px; font-size: 11px; }
.ig-health-automation-note > div { padding: 0 0 8px; }
.ig-health-automation-note b { color: var(--text-primary); }
.ig-update-upload { padding: 18px; display: grid; gap: 14px; }
.ig-update-upload-actions { display: flex; justify-content: flex-end; }
.ig-update-file { min-height: 116px; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-content: center; column-gap: 12px; padding: 18px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--bg-subtle); cursor: pointer; }
.ig-update-file:hover { border-color: var(--text-secondary); }
.ig-update-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ig-update-file > span { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--text-inverse); background: var(--bg-topbar); }
.ig-update-file b { align-self: end; font-size: 13px; }
.ig-update-file small { color: var(--text-secondary); font-size: 11px; }
.ig-update-checks { padding: 12px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ig-update-check { min-width: 0; padding: 11px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 0 9px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.ig-update-check > span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.ig-update-check.is-ok > span { color: var(--success-text); background: var(--success-bg); }
.ig-update-check.is-error > span { color: var(--danger-text); background: var(--danger-soft); }
.ig-update-check b { font-size: 12px; }
.ig-update-check small { color: var(--text-secondary); font-size: 10px; }
.ig-update-guide { margin: 4px 18px 18px; padding: 14px; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-update-guide > b { display: block; margin-bottom: 8px; font-size: 13px; }
.ig-update-guide code { display: block; padding: 10px; overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface); font: 500 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.ig-update-guide p { margin: 10px 0; color: var(--text-secondary); font-size: 11px; line-height: 17px; }
.ig-update-guide a { color: var(--text-primary); font-size: 12px; font-weight: 600; }
.ig-update-description { max-width: 420px; min-width: 180px; line-height: 19px; }
.ig-update-description small { display: block; margin-top: 4px; color: var(--danger-text); font-size: 10px; line-height: 15px; }
.ig-update-log-message { display: block; min-width: 260px; max-width: 560px; white-space: normal; line-height: 18px; }
.ig-update-issues { display: grid; gap: 8px; }
.ig-update-issue-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.ig-update-issue-head h2 { margin: 0; font-size: 15px; }
.ig-update-issue-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 12px; }
.ig-update-issue-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; color: var(--text-secondary); font-size: 11px; }
.ig-update-issue-counts b { padding: 6px 8px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); font-weight: 600; }
.ig-update-issues > article { padding: 14px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; border: 1px solid var(--border-light); border-left: 3px solid var(--warning); border-radius: var(--radius-sm); background: var(--bg-surface); }
.ig-update-issues > article[data-severity="critical"], .ig-update-issues > article[data-severity="error"] { border-left-color: var(--danger); }
.ig-update-issues > article[data-status="resolved"] { opacity: .72; border-left-color: var(--success-text); }
.ig-update-issue-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--danger-text); background: var(--danger-soft); }
.ig-update-issues article[data-status="resolved"] .ig-update-issue-icon { color: var(--success-text); background: var(--success-bg); }
.ig-update-issue-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ig-update-issue-title > b { font-size: 13px; }
.ig-update-issues small { display: block; margin-top: 3px; color: var(--text-tertiary); font-size: 10px; line-height: 15px; }
.ig-update-issues p { margin: 7px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.ig-update-badge { padding: 3px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.ig-update-badge.severity-critical, .ig-update-badge.severity-error { color: var(--danger-text); background: var(--danger-soft); }
.ig-update-badge.severity-warning { color: var(--warning-text); background: var(--warning-soft); }
.ig-update-badge.severity-info, .ig-update-badge.status-resolved { color: var(--success-text); background: var(--success-bg); }
.ig-update-badge.status-open, .ig-update-badge.status-checking { color: var(--danger-text); background: var(--danger-soft); }
.ig-update-remediation { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-update-remediation > b { font-size: 11px; }
.ig-update-remediation ol { margin: 5px 0 0; padding-left: 20px; color: var(--text-secondary); font-size: 11px; line-height: 18px; }
.ig-update-remediation li b { color: var(--text-primary); }
.ig-update-issues details { margin-top: 9px; }
.ig-update-issues summary { cursor: pointer; color: var(--text-primary); font-size: 11px; font-weight: 600; }
.ig-update-issues details code { display: block; margin-top: 5px; padding: 8px; overflow: auto; color: var(--text-secondary); border: 1px solid var(--border-light); border-radius: 4px; background: var(--bg-subtle); font-size: 10px; white-space: pre-wrap; }
.ig-update-next-version { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-update-next-version b { font-size: 17px; }
.ig-update-next-version small { color: var(--text-secondary); font-size: 11px; line-height: 16px; }

@media (max-width: 1100px) {
  .ig-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-admin-health { grid-template-columns: minmax(0, 1fr); }
  .ig-public-editor { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .ig-public-editor-code { height: 520px; border-right: 0; border-bottom: 1px solid var(--border-light); }
  .ig-public-editor-preview { height: 560px; }
  .ig-public-editor-meta { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 900px) {
  .ig-health-scan-toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }

  .ig-health-scan-toolbar > .gm-btn { min-width: 0; }
}
@media (max-width: 720px) {
  .ig-admin-stats, .ig-admin-grid, .ig-admin-form-grid { grid-template-columns: minmax(0, 1fr); }
  .ig-admin-stat { min-height: 92px; padding: 14px; }
  .ig-admin-integration-head { align-items: flex-start; flex-wrap: wrap; padding: 14px; }
  .ig-admin-integration-head .spacer { display: none; }
  .ig-admin-status { align-items: flex-start; flex-direction: column; padding: 10px 14px; }
  .ig-admin-status span { margin-left: 0; }
  .ig-admin-form-grid { padding: 14px; gap: 13px; }
  .ig-admin-check { margin: 0 14px 14px; }  .ig-admin-payment > h2 { margin: 14px 14px 4px; }
  .ig-admin-payment > .ig-admin-integration-intro, .ig-admin-payment-links { margin-left: 14px; margin-right: 14px; }
  .ig-admin-payment-options { padding-left: 14px; padding-right: 14px; gap: 12px; }
  .ig-admin-payment-actions { padding-left: 14px; padding-right: 14px; }

  .ig-admin-integration > .gm-banner { margin: 0 14px 14px; }
  .ig-admin-model-section { padding: 0 14px 14px; }
  .ig-admin-model-head { align-items: stretch; flex-direction: column; }
  .ig-admin-model-head .gm-field { width: 100%; }
  .ig-admin-models, .ig-admin-permissions, .ig-admin-permission-controls, .ig-invite-shops { grid-template-columns: minmax(0, 1fr); }
  .ig-admin-market-menu { width: 100%; grid-template-columns: minmax(0, 1fr); }
  .ig-invite-section-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .ig-invite-section-head span { text-align: left; }
  .ig-admin-health .ig-admin-panel > header { min-height: 50px; padding: 12px 14px; }
  .ig-admin-health .ig-admin-panel > .body { padding: 3px 14px 8px; }
  .ig-admin-health .ig-rows > div { min-height: 38px; align-items: flex-start; gap: 16px; }
  .ig-admin-health .ig-rows dd { max-width: 62%; }
  .ig-health-automation-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .ig-health-scan-toolbar { grid-template-columns: minmax(0, 1fr); }
  .ig-health-scan-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ig-au-plans-head { align-items: flex-start; flex-direction: column; gap: 2px; }
  .ig-au-plans-head span { text-align: left; }
  .ig-au-plan strong { font-size: 10px; }

  .ig-health-scan-toolbar > .gm-btn { width: 100%; min-width: 0; }
  .ig-health-scan-manual-state { justify-self: start; min-height: 34px; display: flex; align-items: center; }
  .ig-health-metric-activity { grid-template-columns: minmax(0, 1fr); }
  .ig-health-counter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
  .ig-health-queue-lanes { column-gap: 10px; }




  .ig-health-metric-stats { gap: 6px; }
  .ig-health-automation-grid { grid-template-columns: minmax(0, 1fr); }
  .ig-health-automation-row { min-height: 68px; padding: 10px 0; }
  .ig-update-checks { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
  .ig-update-upload { padding: 14px; }
  .ig-update-guide { margin: 4px 14px 14px; }
  .ig-update-log-message { min-width: 190px; max-width: 280px; }
  .ig-update-issue-head { align-items: flex-start; flex-direction: column; }
  .ig-update-issue-counts { justify-content: flex-start; }
}
.ig-2fa-method-list { display: grid; gap: 10px; margin: 16px 0; }
.ig-2fa-method { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface); }
.ig-2fa-method__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-sm); color: var(--text-primary); background: var(--bg-subtle); }
.ig-2fa-method__icon .gm-icon { width: 19px; height: 19px; }
.ig-2fa-method__copy { min-width: 0; display: grid; gap: 3px; }
.ig-2fa-method__copy b { font-size: 13px; }
.ig-2fa-method__copy small { color: var(--text-secondary); font-size: 11px; line-height: 16px; }
.ig-2fa-method__actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.ig-2fa-password { margin-top: 14px; }
.ig-security-unlock { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.ig-security-unlock__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--bg-subtle); color: var(--text-primary); }
.ig-security-unlock__icon .gm-icon { width: 21px; height: 21px; }
.ig-security-unlock h3 { margin: 1px 0 4px; font-size: 15px; line-height: 22px; }
.ig-security-unlock p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.ig-security-unlock .gm-field { grid-column: 1 / -1; margin-top: 4px; }
.gm-admin-secret input[data-admin-secret-placeholder="1"] { color: var(--text-secondary); letter-spacing: 1px; }
.ig-2fa-setup { display: grid; grid-template-columns: 216px minmax(0, 1fr); align-items: center; gap: 20px; margin-top: 16px; }
.ig-2fa-qr { width: 216px; height: 216px; display: grid; place-items: center; padding: 8px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: #fff; }
.ig-2fa-qr img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: crisp-edges; }
.ig-2fa-manual { min-width: 0; display: grid; gap: 10px; }
.ig-2fa-account { min-width: 0; display: grid; gap: 2px; }
.ig-2fa-account span, .ig-2fa-secret-label { color: var(--text-secondary); font-size: 11px; line-height: 16px; }
.ig-2fa-account b { min-width: 0; color: var(--text-primary); font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.ig-2fa-secret { user-select: all; }
@media (max-width: 560px) {
  .ig-2fa-method { grid-template-columns: 36px minmax(0, 1fr); padding: 11px; }
  .ig-2fa-method__icon { width: 36px; height: 36px; }
  .ig-2fa-method > .gm-tag { grid-column: 2; justify-self: start; }
  .ig-2fa-method__actions { grid-column: 1 / -1; justify-content: stretch; }
  .ig-2fa-method__actions .gm-btn { flex: 1; }
  .ig-2fa-setup { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 16px; }
  .ig-2fa-qr { width: min(216px, 100%); height: auto; aspect-ratio: 1; }
  .ig-2fa-manual { width: 100%; }
}

.gm-code {
  display: block;
  margin: 0;
  padding: 12px 14px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font: 500 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0;
  word-break: break-all;
}

/* Background TikTok sync progress */
.gopush-sync-progress { position: fixed; right: 22px; bottom: 22px; z-index: 1200; width: min(390px, calc(100vw - 32px)); pointer-events: none; }
.gopush-sync-progress__card { pointer-events: auto; padding: 15px 16px; border: 1px solid var(--border-light); border-radius: 8px; background: var(--bg-surface); box-shadow: 0 12px 30px rgba(18,20,21,.14); }
.gopush-sync-progress__head { display: flex; align-items: center; gap: 9px; color: var(--text-primary); font-size: 13px; }
.gopush-sync-progress__head strong { min-width: 0; flex: 1; font-weight: 650; }
.gopush-sync-progress__head b { color: var(--text-secondary); font-size: 12px; font-weight: 650; }
.gopush-sync-progress__spinner { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid var(--border); border-top-color: var(--text-primary); border-radius: 50%; animation: gopush-sync-spin .75s linear infinite; }
.gopush-sync-progress__spinner.is-done { display: grid; place-items: center; border: 0; background: var(--soft-sage); animation: none; }
.gopush-sync-progress__spinner.is-done::after { content: '✓'; color: var(--soft-sage-ink); font-size: 12px; font-weight: 700; }
.gopush-sync-progress__bar { height: 6px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: var(--border-light); }
.gopush-sync-progress__bar i { display: block; height: 100%; border-radius: inherit; background: var(--text-primary); transition: width .35s ease; }
.gopush-sync-progress__time { margin-top: 8px; color: var(--text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.gopush-sync-progress__detail { display: grid; gap: 4px; margin-top: 9px; color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.gopush-sync-progress__detail span { display: block; overflow-wrap: anywhere; }
.gopush-sync-progress__detail span:first-child { color: var(--text-primary); }
.gopush-sync-progress__resources { display: flex; flex-direction: column; max-height: 45vh; overflow-y: auto; overflow-wrap: anywhere; gap: 5px 10px; margin-top: 9px; color: var(--text-secondary); font-size: 11px; }
.gopush-sync-progress__resources span.is-running { color: var(--text-primary); font-weight: 650; }
.gopush-sync-progress__resources span.is-completed { color: var(--soft-sage-ink); }
.gopush-sync-progress__resources span.is-partial { color: var(--warning-text); }
.gopush-sync-progress__resources span.is-failed { color: var(--soft-red-ink, #b42318); }
.gopush-sync-progress__actions { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-light); }
.gopush-sync-progress__cancel, .gopush-sync-progress__close { min-height: 32px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.gopush-sync-progress__cancel { border-color: color-mix(in srgb, var(--soft-red-ink, #b42318) 32%, var(--border)); color: var(--soft-red-ink, #b42318); }
.gopush-sync-progress__cancel:hover:not(:disabled) { background: var(--soft-red, #fef3f2); }
.gopush-sync-progress__cancel:disabled { cursor: wait; opacity: .65; }
.gopush-sync-progress__close { display: block; margin: 12px 0 0 auto; background: var(--text-primary); color: var(--bg-surface); }
.gopush-sync-progress__card.is-success .gopush-sync-progress__bar i { background: var(--soft-sage-ink); }
.gopush-sync-progress__card.is-warning .gopush-sync-progress__bar i { background: #b7791f; }
.gopush-sync-progress__card.is-error .gopush-sync-progress__bar i { background: var(--soft-red-ink, #b42318); }
.gopush-sync-progress__card.is-cancelled .gopush-sync-progress__bar i { background: var(--text-secondary); }
@keyframes gopush-sync-spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .gopush-sync-progress { right: 16px; bottom: 16px; width: calc(100vw - 32px); } }
.gopush-sync-progress__card.is-error .gopush-sync-progress__spinner.is-done::after { content: "!"; color: var(--soft-red-ink, #b42318); }
.gopush-sync-progress__card.is-warning .gopush-sync-progress__spinner.is-done::after { content: "!"; color: #b7791f; }
.gopush-sync-progress__card.is-cancelled .gopush-sync-progress__spinner.is-done::after { content: "×"; color: var(--text-secondary); }


/* Campaign list: compact grouped booking view and reorganization preview. */
.ig-campaign-list .gm-table th, .ig-campaign-list .gm-table td { padding-top: 7px; padding-bottom: 7px; }
.ig-reorg-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ig-reorg-summary > div { background: var(--bg-muted); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 10px 12px; }
.ig-reorg-summary b, .ig-reorg-summary span { display: block; }
.ig-reorg-summary b { font-size: 20px; line-height: 24px; }
.ig-reorg-summary span { color: var(--text-secondary); font-size: 11px; margin-top: 2px; }
.ig-reorg-list { max-height: 42vh; overflow: auto; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.ig-reorg-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) 120px 150px minmax(130px, 1fr); gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border-light); font-size: 12px; }
.ig-reorg-row:last-child { border-bottom: 0; }
.ig-reorg-row em { color: var(--text-secondary); font-style: normal; }
.ig-reorg-row .ig-reorg-safe { color: var(--success, #16845b); font-weight: 600; }
@media (max-width: 720px) { .ig-reorg-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ig-reorg-row { grid-template-columns: 1fr 1fr; } }

/* Booking campaign list: keep grouped and detail views compact without hiding
   status, acceptance, or the actions needed to inspect a batch. */
.ig-campaign-list { min-width: 0; }
.ig-campaign-list .gm-table { table-layout: fixed; }
.ig-campaign-list .gm-table th,
.ig-campaign-list .gm-table td { vertical-align: middle; }
.ig-campaign-list .gm-table th:nth-child(1),
.ig-campaign-list .gm-table td:nth-child(1) { width: 24%; }
.ig-campaign-list .gm-table th:nth-child(2),
.ig-campaign-list .gm-table td:nth-child(2) { width: 18%; }
.ig-campaign-list .gm-table th:nth-child(3),
.ig-campaign-list .gm-table td:nth-child(3) { width: 15%; }
.ig-campaign-list .gm-table th:nth-child(4),
.ig-campaign-list .gm-table td:nth-child(4) { width: 14%; }
.ig-campaign-list .gm-table th:nth-child(5),
.ig-campaign-list .gm-table td:nth-child(5) { width: 9%; }
.ig-campaign-list .gm-table th:nth-child(6),
.ig-campaign-list .gm-table td:nth-child(6) { width: 13%; }
.ig-campaign-list .gm-table th:last-child,
.ig-campaign-list .gm-table td:last-child { width: 7%; }
.ig-campaign-list .gm-table th:nth-child(5),
.ig-campaign-list .gm-table td:nth-child(5),
.ig-campaign-list .gm-table th:nth-child(6),
.ig-campaign-list .gm-table td:nth-child(6) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ig-campaign-list .gm-table td .ig-campaign-issue {
  display: inline-block;
  max-width: 230px;
  margin-left: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}
.ig-campaign-list .ig-campaign-issue { font-size: 11px; line-height: 16px; }
.ig-campaign-list .ig-tkcell { min-width: 0; }
.ig-campaign-list .ig-tkcell b,
.ig-campaign-list .ig-tkcell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .ig-campaign-list .gm-table { table-layout: auto; }
  .ig-campaign-list .gm-table th,
  .ig-campaign-list .gm-table td { width: auto !important; }
  .ig-campaign-list .gm-table td .ig-campaign-issue { max-width: 180px; }
}

/* Campaign reorganization: six compact metrics remain readable on desktop and mobile. */
.ig-reorg-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ig-reorg-summary > div { min-width: 0; }
.ig-reorg-summary span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 980px) { .ig-reorg-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ig-reorg-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Creator scan status: compact inline state beside the KOC source switcher. */
.ig-creator-source .ig-creator-scan-status.is-compact { position: static; z-index: auto; display: inline-flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 7px; margin: 0 0 0 auto; padding: 5px 9px; border-left-width: 2px; border-radius: 5px; box-shadow: none; }
.ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-icon { width: 21px; height: 21px; flex: 0 0 21px; background: transparent; }
.ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-icon .gm-icon { width: 13px; height: 13px; }
.ig-creator-source .ig-creator-scan-status-title { flex: none; color: var(--text-primary); font-size: 11px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-meta { min-width: 0; display: inline-flex; flex: 1 1 auto; flex-wrap: nowrap; gap: 4px; overflow: hidden; color: var(--text-secondary); font-size: 10px; line-height: 15px; white-space: nowrap; }
.ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-meta span { overflow: hidden; text-overflow: ellipsis; }
.ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-meta span:nth-child(even) { flex: none; overflow: visible; }
.ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-state { flex: none; font-size: 10px; line-height: 15px; }
.ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-state::before { width: 6px; height: 6px; }
.ig-creator-source .ig-creator-scan-status.is-compact.is-waiting { border-left-color: var(--warning-text); background: var(--warning-soft); }
@media (max-width: 720px) {
  .ig-creator-source .ig-creator-scan-status.is-compact { width: 100%; flex-basis: 100%; order: 3; margin: 2px 0 0; }
  .ig-creator-source .ig-creator-scan-status.is-compact .ig-creator-scan-status-meta { flex-wrap: wrap; }
}


/* Booking status: keep the primary state visible and move detail into hover. */
.ig-campaign-status { display: inline-flex; align-items: center; max-width: 100%; cursor: help; }
.ig-campaign-status .gm-tag { margin: 0; flex: 0 0 auto; }
.ig-campaign-list .gm-table .ig-campaign-status-col { width: 17%; min-width: 152px; max-width: 210px; overflow: hidden; white-space: nowrap; }
.ig-campaign-list .gm-table .ig-campaign-status-col .ig-campaign-status { max-width: 100%; overflow: hidden; }
.ig-campaign-list .gm-table .ig-campaign-progress-col { width: 15%; min-width: 136px; white-space: nowrap; }
.ig-campaign-list .gm-table .ig-campaign-progress-col .ig-prog { min-width: 118px; }
.ig-campaign-list .gm-table .ig-campaign-accept-col { width: 13%; min-width: 96px; white-space: nowrap; }


/* Manual QR billing and admin review */
.ig-manual-payment-admin { padding: 18px; }
.ig-billing-manual-head { display: flex; align-items: flex-start; gap: 18px; justify-content: space-between; margin-bottom: 14px; }
.ig-billing-manual-head h2 { margin: 0 0 4px; }
.ig-admin-qr-preview { width: 128px; height: 128px; flex: 0 0 128px; object-fit: contain; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: #fff; }
.ig-admin-switch { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.ig-admin-section-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.ig-pay-manual { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.ig-pay-manual img { width: 128px; height: 128px; flex: 0 0 128px; object-fit: contain; border-radius: 5px; background: #fff; }
.ig-pay-manual > div { display: grid; gap: 4px; min-width: 0; }
.ig-pay-manual span, .ig-pay-manual small { color: var(--text-secondary); font-size: 12px; line-height: 17px; }
.ig-pay-rejected { display: block; margin-top: 4px; color: var(--danger-text); }
.ig-proof-form { display: grid; gap: 12px; }
@media (max-width: 640px) { .ig-billing-manual-head { flex-direction: column; } .ig-pay-manual { align-items: flex-start; flex-direction: column; } }

.ig-bill-qr { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 11px; }
.ig-bill-qr img { width: 48px; height: 48px; object-fit: contain; border-radius: 4px; background: #fff; }

/* Manual payment toggle: keep the checkbox inline instead of rendering it as a text input. */
.ig-admin-switch { min-height: var(--size-control); display: inline-flex; align-items: center; gap: 9px; width: fit-content; cursor: pointer; color: var(--text-primary); }
.ig-admin-switch input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--accent); }
.ig-admin-switch span { font-size: 13px; line-height: 18px; }
.ig-admin-switch:focus-within { outline: 2px solid var(--line-active); outline-offset: 2px; border-radius: var(--radius-sm); }

.ig-health-priority { display: grid; gap: 12px; }
.ig-health-section-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ig-health-section-heading h2 { margin: 0 0 3px; font-size: 15px; line-height: 20px; }
.ig-health-section-heading p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 17px; }
.ig-health-updated { flex: none; padding-top: 2px; color: var(--text-tertiary); font-size: 10px; line-height: 16px; white-space: nowrap; }
.ig-health-priority-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ig-health-priority-card { min-width: 0; min-height: 76px; display: grid; align-content: space-between; gap: 8px; padding: 11px 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface); }
.ig-health-priority-card span { min-width: 0; color: var(--text-secondary); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.ig-health-priority-card b { color: var(--text-primary); font-size: 21px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ig-health-active-section { padding-top: 0; }
.ig-health-active-panel { display: grid; gap: 10px; }
.ig-health-active-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ig-health-active-head h2 { margin: 0 0 3px; font-size: 15px; line-height: 20px; }
.ig-health-active-head p { margin: 0; color: var(--text-secondary); font-size: 11px; line-height: 17px; }
.ig-health-active-count { flex: none; padding: 5px 8px; border: 1px solid var(--border-light); border-radius: 999px; color: var(--text-secondary); background: var(--bg-subtle); font-size: 11px; white-space: nowrap; }
.ig-health-active-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.ig-health-active-flow { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 11px 12px; border: 1px solid var(--border-light); border-left: 3px solid var(--success-text); border-radius: var(--radius-sm); background: var(--bg-surface); }
.ig-health-active-flow > div { min-width: 0; display: grid; gap: 2px; }
.ig-health-active-flow b { min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 18px; }
.ig-health-active-flow span { color: var(--text-secondary); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.ig-health-active-flow strong { align-self: center; color: var(--success-text); font-size: 12px; line-height: 17px; text-align: right; white-space: nowrap; }
.ig-health-active-flow small { grid-column: 1 / -1; color: var(--text-secondary); font-size: 11px; line-height: 16px; }
.ig-health-active-empty { min-height: 60px; display: grid; align-content: center; gap: 3px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); background: var(--bg-subtle); }
.ig-health-active-empty b { color: var(--text-primary); font-size: 12px; }
.ig-health-active-empty span { font-size: 11px; line-height: 16px; }
.ig-health-details { margin-top: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface); overflow: hidden; }
.ig-health-details > summary { min-height: 42px; display: flex; align-items: center; padding: 0 13px; cursor: pointer; color: var(--text-primary); font-size: 12px; font-weight: 600; list-style: none; }
.ig-health-details > summary::-webkit-details-marker { display: none; }
.ig-health-details > summary::after { margin-left: auto; color: var(--text-tertiary); content: '+'; font-size: 16px; font-weight: 400; }
.ig-health-details[open] > summary::after { content: '−'; }
.ig-health-details-grid { padding: 0 12px 12px; }
.ig-health-details-grid .ig-admin-panel { min-width: 0; }
.ig-health-details-grid .ig-health-queue-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-health-details-grid .ig-admin-health-runs { grid-column: 1 / -1; }
.ig-health-automation-more { margin-top: 10px; padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-surface); }
@media (max-width: 900px) {
  .ig-health-priority-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ig-health-details-grid .ig-health-queue-lanes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .ig-health-section-heading, .ig-health-active-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .ig-health-priority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ig-health-updated { padding-top: 0; }
  .ig-health-active-list { grid-template-columns: minmax(0, 1fr); }
  .ig-health-details-grid { padding-left: 0; padding-right: 0; }
}
.ig-health-counter-grid-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ig-health-counter-grid-primary > div { min-height: 52px; padding: 8px 0; }
.ig-health-counter-grid-primary b { font-size: 17px; line-height: 22px; }
.ig-health-metric-details { margin-top: 6px; border-top: 1px solid var(--border-light); }
.ig-health-metric-details > summary { min-height: 30px; display: flex; align-items: center; cursor: pointer; color: var(--text-secondary); font-size: 11px; list-style: none; }
.ig-health-metric-details > summary::-webkit-details-marker { display: none; }
.ig-health-metric-details > summary::after { margin-left: auto; content: '+'; color: var(--text-tertiary); font-size: 15px; }
.ig-health-metric-details[open] > summary::after { content: '−'; }
.ig-health-metric-details .ig-health-counter-grid { padding-bottom: 3px; }
@media (max-width: 560px) { .ig-health-counter-grid-primary { grid-template-columns: minmax(0, 1fr); } }
