/* ============================================================
   STREAM — Kênh Donate (bảng điều khiển streamer)
   ============================================================ */

/* Tách phần mô tả (sub) khỏi khối bên dưới cho khỏi dính chữ */
#stream .stream-off, #stream .stream-on { margin-top: 20px; }
#stream .form-wrap { max-width: 1060px; }

/* ============================================================
   STUDIO DONATE — nav dọc (5 mục) + panel (pattern giống AdminCP)
   ============================================================ */
.studio { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: start; }
.studio__nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 14px; }
.studio__navbtn {
  display: flex; align-items: center; gap: 10px; text-align: left;
  border: 0; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 14px;
  padding: 11px 13px; border-radius: 11px; transition: var(--ease);
}
.studio__navbtn span { font-size: 16px; }
.studio__navbtn .nav-badge { font-size: 11px; margin-left: auto; }
.studio__navbtn:hover { background: var(--surface2); color: var(--ink); }
.studio__navbtn.is-active { background: var(--surface2); color: var(--ink); box-shadow: inset 3px 0 0 var(--pink); }
.studio__navfoot { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.studio__body { min-width: 0; }

/* Phần tử CHỈ-Nebula (chrome dashboard) — base ẩn ở Neon; chỉ hiện khi data-theme="nebula" (xem cuối file) */
.studio__brand, .studio__topbar, .studio__navhome, .ov-kpis,
.studio-h1, .studio-h1__d, .hist-period-sel { display: none; }

/* Nhóm "Cài đặt" xổ ra (gom Widget · Ngân hàng · Trang donate) */
.studio__navgroup { display: flex; flex-direction: column; gap: 4px; }
.studio__navtoggle { width: 100%; }
.studio__caret { margin-left: auto; font-size: 11px; transition: transform var(--ease); }
.studio__navtoggle.is-open .studio__caret { transform: rotate(180deg); }
/* Nút cha "Cài đặt" khi đang ở 1 mục con: sáng nhẹ, KHÔNG kẻ sọc hồng (dành cho mục con) */
.studio__navtoggle.is-active { background: var(--surface2); color: var(--ink); box-shadow: none; }
.studio__navsub {
  display: flex; flex-direction: column; gap: 3px;
  margin: 2px 0 2px 15px; padding-left: 10px; border-left: 1px solid var(--line-soft);
}
.studio__navbtn--sub { font-size: 13.5px; padding: 9px 12px; }
.studio-panel { display: none; flex-direction: column; gap: 16px; }
.studio-panel.is-active { display: flex; }

/* Checklist thiết lập nhanh (Tổng quan) */
.setup-check { display: flex; flex-direction: column; gap: 10px; }
.setup-check__item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--line-soft);
}
/* Bản gọn (Tổng quan): mỗi bước 1 dòng, chi tiết đọc ở Hướng dẫn đầy đủ */
.setup-check--compact .setup-check__item { padding: 7px 12px; }
.setup-check--compact .setup-check__box  { width: 20px; height: 20px; }
.setup-check--compact .setup-check__tx b { font-size: 13px; }
.setup-check__box {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
}
.setup-check__item.is-done .setup-check__box {
  background: var(--green); border-color: var(--green);
}
.setup-check__item.is-done .setup-check__box::after { content: '✓'; color: #06210f; font-weight: 800; font-size: 13px; }
.setup-check__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.setup-check__tx b { font-size: 14px; }
.setup-check__tx span { font-size: 12.5px; color: var(--faint); }
.setup-check__item.is-done .setup-check__tx b { color: var(--muted); }

/* Nhãn phụ + link nhỏ trong form thanh toán */
.sd-hint { font-weight: 400; color: var(--faint); font-size: 11.5px; }
.sd-link { color: var(--cyan); font-weight: 600; text-decoration: none; }
.sd-link:hover { text-decoration: underline; }
.sd-sec--sub { margin-top: 4px; }
.bank-form__spacer { display: none; }
@media (min-width: 720px) { .bank-form__spacer { display: block; } }

/* Tab widget (ngang) */
.wtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.wtab {
  border: 1px solid var(--line-soft); background: var(--surface2); color: var(--muted);
  cursor: pointer; font-weight: 600; font-size: 13px; padding: 8px 13px; border-radius: 10px;
  transition: var(--ease);
}
.wtab:hover { color: var(--ink); border-color: var(--line); }
.wtab.is-active { background: linear-gradient(135deg, var(--pink), var(--violet)); color: var(--on-accent); border-color: transparent; }
.wtab-panel { display: none; }
.wtab-panel.is-active { display: block; }

/* Cấu hình widget: 2 cột (cấu hình | xem trước ghim) */
.widget-cols { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.widget-cols__preview { position: sticky; top: 14px; }
.wprev__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wprev__label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.wprev__btns { display: flex; gap: 6px; flex: none; }

/* 📜 Lịch sử donate — công cụ tìm/lọc + phân trang */
.hist-tools { display: flex; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.hist-search { flex: 1; min-width: 200px; }
.hist-kind { flex: none; width: 160px; }
.hist-periods { margin-bottom: 12px; }
/* Phân trang lịch sử dùng class chung .pager (components.css) */

/* Toggle iOS gọn (đặt góc phải thẻ, vd Cài đặt ghi âm) */
.sd-toggle { flex: none; cursor: pointer; }
.sd-toggle input { display: none; }
.sd-toggle__sw {
  display: block; width: 42px; height: 24px; border-radius: 999px;
  background: var(--surface2); border: 1px solid var(--line-soft); position: relative; transition: var(--ease);
}
.sd-toggle__sw::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted); transition: var(--ease);
}
.sd-toggle input:checked + .sd-toggle__sw { background: rgba(var(--violet-rgb), .3); border-color: var(--violet); }
.sd-toggle input:checked + .sd-toggle__sw::after { left: 20px; background: var(--violet); }

/* Thanh link trang donate gọn (mục Tổng quan) — 1 dòng, tiết kiệm chỗ */
.ov-linkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; }
.ov-linkbar__ic { font-size: 18px; flex: none; }
.ov-linkbar .inp { flex: 1; min-width: 180px; }
.ov-linkbar .btn { flex: none; }

/* Trình tùy biến Alert Donate — giãn cách thoáng, gọn gàng, hiện đại */
.alcfg .field-label { margin-top: 16px; }
.alcfg .field-label:first-child { margin-top: 0; }
.alcfg .sd-fine { margin: 6px 0 0; opacity: .9; }
.alcfg .al-switches { margin: 12px 0 2px; gap: 10px 24px; }
.alcfg .sd-save { margin-top: 24px; }
/* Ô cấu hình Studio gọn hơn (select vị trí/hiệu ứng, số… bớt cồng kềnh) — dùng chung mọi widget */
.alcfg .inp { padding: 10px 13px; font-size: 13.5px; }
.alcfg select.inp { padding-right: 30px; }
/* Khối lưới 2 cột (vd Xếp hạng, Đếm ngược) đứng ngay sau ô nhập → chừa khoảng như field-label, hết dính */
.alcfg .sd-grid2 { margin-top: 16px; }

/* Tiêu đề nhóm mảnh — chia form Alert Donate cho dễ quét, không tốn chiều cao */
.al-subhead {
  margin: 18px 0 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 7px; border-bottom: 1px solid var(--line-soft);
}
/* Dồn các select/input vào 1 hàng 3 cột (tiết kiệm chiều cao form nhiều nhất) */
.sd-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.sd-grid3 + .sd-grid3 { margin-top: 12px; }
.sd-grid3 .field-label { margin-top: 0; }
/* Ảnh quà tặng · Âm báo đặt cạnh nhau 2 cột */
.al-media { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; align-items: start; margin-top: 14px; }
.al-media .field-label { margin-top: 0; }
@media (max-width: 620px) { .sd-grid3, .al-media { grid-template-columns: 1fr; } }
/* Chọn giao diện hiển thị alert — 3 thẻ preview (như zypage) */
.al-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.al-layout {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 8px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--surface2); cursor: pointer;
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}
.al-layout:hover { border-color: var(--cyan); transform: translateY(-1px); }
.al-layout.is-selected { border-color: var(--pink); background: rgba(var(--pink-rgb), .08); }
.al-layout small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.al-layout.is-selected small { color: var(--ink); }
/* Ô demo = "cảnh" OBS: nền caro để thấy vùng trong suốt */
.al-layout__demo {
  width: 100%; height: 56px; border-radius: 8px; display: grid; place-items: center; overflow: hidden;
  background:
    linear-gradient(45deg, #2c2556 25%, transparent 25%, transparent 75%, #2c2556 75%) 0 0/14px 14px,
    linear-gradient(45deg, #2c2556 25%, #1b1640 25%, #1b1640 75%, #2c2556 75%) 7px 7px/14px 14px;
}
.al-layout__box {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 10px; border-radius: 7px; line-height: 1.2;
}
.al-layout__box b { color: var(--pink); font-size: 10.5px; }
.al-layout__box i { color: var(--gold); font-size: 9px; font-style: normal; font-family: var(--font-mono); }
.al-layout__box--solid {
  background: linear-gradient(160deg, rgba(var(--surface2-rgb), .95), rgba(var(--bg2-rgb), .95));
  border: 1.5px solid rgba(var(--pink-rgb), .55); box-shadow: 0 4px 12px rgba(var(--shadow-rgb), .4);
}
.al-layout__box--glass {
  background: rgba(var(--bg-rgb), .34); border: 1px solid rgba(var(--hl-rgb), .18); backdrop-filter: blur(4px);
}
.al-layout__box--plain { background: none; border: 0; }
.al-layout__box--plain b, .al-layout__box--plain i { text-shadow: 0 1px 4px rgba(var(--shadow-rgb), .95); }

.al-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.al-color {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface2); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--muted);
}
.al-color input[type=color] {
  width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px;
  background: none; cursor: pointer; flex: none;
}
.al-color input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.al-color input[type=color]::-webkit-color-swatch { border: 1px solid rgba(var(--hl-rgb), .2); border-radius: 7px; }
.al-img-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.al-img-row .sd-fine { margin: 0; }

/* Ảnh quà tặng hiện tại (thumbnail cạnh nút thư viện) */
.al-img-cur {
  width: 38px; height: 38px; flex: none; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; font-size: 22px;
  border: 1.5px solid var(--line-soft); background: var(--surface2);
}
/* Ảnh quà · âm báo: 2 hàng cùng chiều cao cho gọn, cân đối */
.al-media .al-img-row { min-height: 38px; }
.al-snd-name { padding: 8px 12px; }
.al-img-cur img { width: 100%; height: 100%; object-fit: contain; }
/* Thanh âm lượng âm báo — tách nhẹ khỏi hàng chọn âm, %  cùng tone mono như TTS */
.al-media .al-vol-lb { margin-top: 12px; }
.al-vol-lb b { color: var(--cyan); font-family: var(--font-mono); }

/* Popup thư viện ảnh donate */
.gif-modal {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center;
  padding: 20px; background: rgba(var(--scrim-rgb), .66); backdrop-filter: blur(3px);
  animation: fade-in .16s ease;
}
.gif-modal__box {
  width: 100%; max-width: 520px; max-height: 82vh; display: flex; flex-direction: column;
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(170deg, var(--bg2), var(--surface));
  box-shadow: 0 30px 80px -20px rgba(var(--shadow-rgb), .8);
}
.gif-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line-soft); font-size: 15px;
}
.gif-modal__x {
  border: 0; background: var(--surface2); color: var(--ink); width: 30px; height: 30px;
  border-radius: 9px; cursor: pointer; font-size: 14px; transition: background var(--ease);
}
.gif-modal__x:hover { background: var(--line); }
.gif-modal__foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-top: 1px solid var(--line-soft);
}
.gif-modal__foot .sd-fine { margin: 0; }

/* Lưới ảnh trong popup — 3 ảnh/dòng (khỏi cuộn ngang) */
.al-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding: 16px 18px; overflow-x: hidden; overflow-y: auto;
}
.al-gif {
  height: 130px; padding: 8px; border-radius: 12px; cursor: pointer;
  min-width: 0; overflow: hidden;   /* chiều cao CỐ ĐỊNH → mọi ô đều tăm tắp, ảnh cao không đẩy giãn ô */
  border: 1.5px solid var(--line-soft); background: var(--surface2);
  display: grid; place-items: center; transition: border-color var(--ease), transform var(--ease);
}
.al-gif:hover { border-color: var(--violet); transform: translateY(-2px); }
.al-gif.is-selected { border-color: var(--pink); background: rgba(var(--pink-rgb), .14); }
.al-gif img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
@media (max-width: 560px) { .al-gallery { grid-template-columns: repeat(3, 1fr); } }
/* Hàng âm báo: KHÔNG xuống dòng — tên co lại (ellipsis), nút "Đổi âm" luôn bên phải cùng dòng */
.al-snd-row { flex-wrap: nowrap; }
/* Tên âm báo đang chọn (thay ô icon — gọn, rõ tên) */
.al-snd-name {
  flex: 1 1 auto; min-width: 0; padding: 9px 13px; border-radius: 11px;
  border: 1.5px solid var(--line-soft); background: var(--surface2);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Select trong al-img-row (giọng đọc) co giãn để nút ▶ nằm bên phải cùng dòng */
.al-img-row > select.inp { flex: 1 1 auto; min-width: 0; width: auto; }

/* Thư viện âm báo (danh sách trong popup) */
.snd-list { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; overflow-y: auto; }
.snd-item {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  padding: 11px 13px; border-radius: 11px; border: 1.5px solid var(--line-soft);
  background: var(--surface2); color: var(--ink); cursor: pointer; transition: border-color var(--ease), background var(--ease);
}
.snd-item:hover { border-color: var(--violet); }
.snd-item.is-selected { border-color: var(--pink); background: rgba(var(--pink-rgb), .12); }
.snd-item__ic { font-size: 20px; flex: none; }
.snd-item__nm { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snd-item__play {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface); color: var(--cyan); font-size: 12px; transition: background var(--ease), color var(--ease);
}
.snd-item__play:hover { background: var(--cyan); color: var(--on-cyan); }
.al-switches { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 4px; }
.al-switches .stream-switch { padding-bottom: 0; }
.al-sound-row { display: flex; gap: 8px; align-items: stretch; }
.al-sound-row .inp { flex: 1; }

/* Tuỳ chỉnh giọng đọc TTS */
.tts-box {
  margin: 12px 0 4px; padding: 14px 16px;
  border: 1.5px solid var(--line-soft); border-radius: 14px;
  background: rgba(var(--surface2-rgb), .4);
}
.tts-box .sd-grid2 { margin-top: 14px; }   /* tách đều hàng Tốc độ/Âm lượng ↔ Ngưỡng đọc (hết dính) */
.tts-box .field-label b { color: var(--cyan); font-family: var(--font-mono); }
.tts-range {
  width: 100%; height: 6px; -webkit-appearance: none; appearance: none;
  border-radius: 999px; background: var(--surface2); cursor: pointer; margin-top: 8px;
}
.tts-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 17px; height: 17px; border-radius: 50%;
  background: var(--pink); border: 2px solid var(--on-accent); box-shadow: 0 2px 8px rgba(var(--pink-rgb), .6);
}
.tts-range::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: var(--pink); border: 2px solid var(--on-accent);
}
.tts-strip { display: flex; align-items: flex-end; padding-bottom: 6px; }

/* Widget "sắp có" */
.widget-soon {
  text-align: center; padding: 44px 24px; border-radius: 16px;
  background: var(--surface); border: 1px dashed var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.widget-soon--lg { padding: 64px 24px; }
.widget-soon__ic { font-size: 46px; }
.widget-soon b { font-size: 17px; }
.widget-soon p { color: var(--muted); font-size: 14px; max-width: 440px; margin: 0; line-height: 1.55; }
.widget-soon__tag {
  margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--cyan);
  background: rgba(var(--cyan-rgb), .1); border: 1px solid rgba(var(--cyan-rgb), .25);
  padding: 4px 12px; border-radius: 999px;
}

@media (max-width: 860px) {
  .studio { grid-template-columns: 1fr; }
  /* Nav dọc → 1 HÀNG NGANG cuộn được (kiểu tab): phẳng hoá nhóm "Cài đặt", các mục con hiện thẳng */
  .studio__nav {
    position: static; flex-direction: row; flex-wrap: nowrap; gap: 6px;
    overflow-x: auto; padding-bottom: 6px; scrollbar-width: none;
  }
  .studio__nav::-webkit-scrollbar { display: none; }
  .studio__navbtn { white-space: nowrap; flex-shrink: 0; padding: 9px 12px; box-shadow: inset 0 0 0 1px var(--line-soft); }
  .studio__navbtn.is-active { box-shadow: inset 0 0 0 1px var(--pink); }
  .studio__navgroup { display: contents; }
  .studio__navtoggle { display: none; }                          /* bỏ nút xổ — mục con hiện thẳng */
  .studio__navsub, .studio__navsub[hidden] { display: contents; } /* thắng [hidden] của UA */
  .studio__navbtn--sub { font-size: 14px; padding: 9px 12px; }
  .studio__navfoot { width: auto; border-top: 0; margin-top: 0; padding-top: 0; flex-shrink: 0; display: flex; align-items: center; }
  .widget-cols { grid-template-columns: 1fr; }
  .widget-cols__preview { position: static; }
}

/* ---- Trạng thái CHƯA bật nhận donate (màn giới thiệu sạch, thoáng) ---- */
.stream-off {
  overflow: hidden; position: relative;
  background:
    radial-gradient(120% 85% at 50% -15%, rgba(var(--violet-rgb), .20), transparent 62%),
    var(--surface);
}
.stream-off__inner {
  max-width: 470px; margin: 0 auto;
  padding: 46px 28px 42px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.stream-off__badge {
  width: 86px; height: 86px; border-radius: 26px;
  display: grid; place-items: center; font-size: 42px; margin-bottom: 22px;
  background: linear-gradient(150deg, var(--surface2), var(--bg2));
  border: 1px solid var(--line-soft);
  box-shadow: 0 14px 44px -14px rgba(var(--violet-rgb), .75), inset 0 1px 0 rgba(var(--hl-rgb), .06);
}
.stream-off__title { font-size: 22px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.01em; }
.stream-off__desc  { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 0 24px; }
.stream-off__feats {
  list-style: none; margin: 0 0 28px; padding: 0; width: 100%;
  display: flex; flex-direction: column; gap: 10px; text-align: left;
}
.stream-off__feats li {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--ink);
  background: var(--surface2); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 11px 14px;
}
.stream-off__fic {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px; background: var(--bg2);
}
.stream-off__link {
  margin-top: 16px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding: 4px 6px; transition: color var(--ease);
}
.stream-off__link:hover { color: var(--cyan); }
.soff { display: none; }   /* onboarding Nebula — chỉ hiện ở theme nebula (xem khối skin) */

/* ---- Header đồng nhất cho mọi thẻ: icon badge · tiêu đề · mô tả 1 dòng ---- */
.sd-sec {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sd-sec__ic {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-size: 18px;
  border-radius: 11px;
  background: var(--surface2);
  border: 1px solid var(--line-soft);
}
.sd-sec__tx { flex: 1; min-width: 0; }
.sd-sec__t {
  font-size: 15px; font-weight: 800; letter-spacing: -.2px; color: var(--ink);
}
.sd-sec__t .sd-sec__mo { font-weight: 500; color: var(--faint); font-size: 13px; }
.sd-sec__d { font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.sd-sec__badge {
  flex: none;
  font-size: 11px; font-weight: 700; letter-spacing: .2px;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.sd-sec__badge:empty { display: none; }
.sd-badge--cyan { color: var(--cyan); background: rgba(var(--cyan-rgb), .1);  border: 1px solid rgba(var(--cyan-rgb), .25); }
.sd-badge--red  { color: var(--red);  background: rgba(var(--red-rgb), .1); border: 1px solid rgba(var(--red-rgb), .28); }
.sd-badge--gold { color: var(--gold); background: rgba(var(--gold-rgb), .1);  border: 1px solid rgba(var(--gold-rgb), .28); font-family: var(--font-mono); }

/* ---- Tiện ích chung trong màn ---- */
.sd-divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
.sd-fine {
  font-size: 12px; color: var(--faint); line-height: 1.55; margin: 9px 0 0;
}
.sd-fine code {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan);
  background: rgba(var(--cyan-rgb), .1); padding: 1px 5px; border-radius: 5px;
}
.sd-save { margin-top: 18px; }

/* ---- Chân form Studio: hàng hành động nhất quán (phụ ghost trái · chính đặc phải) ---- */
.sd-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-soft);
}
.sd-actions__side { margin-right: auto; }   /* nút phụ/reset dồn về bên trái */

/* ---- Hàng input + nút (link donate / overlay / test) ---- */
.stream-link {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex-wrap: wrap;
}
.stream-link .inp {
  flex: 1 1 240px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
}
.stream-link .btn { flex: none; display: inline-flex; align-items: center; }

/* ---- Cấu hình overlay: thời lượng + TTS cạnh nhau ---- */
.sd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.sd-grid2 .field-label:first-child { margin-top: 0; }

.stream-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  padding-bottom: 13px;
}
.stream-switch input { width: 18px; height: 18px; accent-color: var(--pink); cursor: pointer; }

/* ---- Nút "Tắt nhận donate" (kín đáo, cuối trang) ---- */
.sd-foot { text-align: center; margin-top: 18px; }
.sd-off {
  border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--faint);
  padding: 6px 12px; border-radius: 8px;
  transition: color var(--ease);
}
.sd-off:hover { color: var(--red); }

/* ---- Nút trạng thái phát sóng (Overview) ---- */
.live-btn { flex: none; }
.live-btn.is-live {
  color: var(--red); border-color: rgba(var(--red-rgb), .4);
  background: rgba(var(--red-rgb), .12);
}

/* Ô nhập link xem live = HÀNG icon + nội dung y HỆT .sd-sec (tái dùng .sd-sec__ic cho 🔗)
   → tự căn khớp tiêu đề "Trạng thái phát sóng" ở cả 2 theme (Neon: ô icon 36px · Nebula: emoji inline) */
.live-linkrow { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.live-linkrow__body { flex: 1; min-width: 0; }
.live-linkrow .field-label { margin-bottom: 8px; }
.live-linkrow__opt { color: var(--muted); font-weight: 400; }
.live-linkrow__in { display: flex; gap: 8px; }
.live-linkrow__in .inp { flex: 1; min-width: 0; }
.live-linkrow__in .btn { flex: none; white-space: nowrap; }
/* Khớp khoảng cách icon–chữ của .sd-sec (Nebula gap 10) để nhãn thẳng hàng với tiêu đề */
:root[data-theme="nebula"] #stream .live-linkrow { gap: 10px; }

/* ---- Editor "Trang donate" ---- */
.stream-editor { margin-top: 20px; }
.stream-editor__media { position: relative; margin-bottom: 34px; }
.stream-editor__cover {
  height: 120px; border-radius: 14px; position: relative;
  background: linear-gradient(120deg, #2A1B52, #6B2A57); background-size: cover; background-position: center;
  display: flex; align-items: flex-start; justify-content: flex-end;
}
.stream-editor__coverhint {
  position: absolute; left: 14px; top: 12px; font-size: 12px; color: rgba(var(--hl-rgb), .7);
}
.stream-editor__cover.has-img .stream-editor__coverhint { display: none; }
.stream-editor__avwrap { position: absolute; left: 18px; bottom: -28px; }
.stream-editor__av {
  width: 72px; height: 72px; border-radius: 18px; border: 3px solid var(--surface);
  display: grid; place-items: center; font-size: 32px; overflow: hidden;
  background: linear-gradient(135deg, var(--violet2), var(--cyan));
}
.stream-editor__av img { width: 100%; height: 100%; object-fit: cover; }
.stream-editor__upl {
  border: 0; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--on-accent);
  background: rgba(var(--bg-rgb), .72); border-radius: 9px; padding: 6px 11px; margin: 10px;
  backdrop-filter: blur(3px); transition: var(--ease);
}
.stream-editor__upl:hover { background: rgba(var(--bg-rgb), .9); }
.stream-editor__upl--av {
  position: absolute; right: -6px; bottom: -6px; margin: 0; padding: 5px 8px; border-radius: 999px;
  border: 2px solid var(--surface);
}
.stream-amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.stream-amts .inp { font-family: var(--font-mono); font-size: 13.5px; text-align: center; }

/* ---- Nguồn nhận tiền (ngân hàng) ---- */
.bank-form__row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.bank-form__row .field-label:first-child { margin-top: 0; }
.bank-hook[hidden] { display: none; }
/* web2m: Token/Mật khẩu xếp dọc full-width (giãn cách đều, không bỏ trống nửa ô) */
.bank-w2m-field { margin-bottom: 12px; }
.bank-w2m-field .field-label { margin-top: 0; }
#bankW2mTestBtn { margin-top: 6px; }

/* ---- Doanh thu & phí lũy kế tháng ---- */
/* Doanh thu nhanh (Hôm nay / 30 ngày) — strip nhỏ để liếc nhanh khi live */
/* ---- Bộ lọc thời gian doanh thu (dùng chung 2 theme, giống AdminCP) ---- */
.ov-period { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ov-period__chip {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  padding: 5px 11px; border-radius: 100px; color: var(--muted);
  background: var(--surface2); border: 1px solid var(--line-soft);
  transition: color .15s var(--ease, ease), border-color .15s var(--ease, ease);
}
.ov-period__chip:hover { color: var(--text); border-color: var(--line); }
.ov-period__chip.is-active {
  color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 45%, transparent);
  background: color-mix(in srgb, var(--cyan) 10%, var(--surface2));
}
.ov-custom { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; flex-wrap: wrap; }
.ov-custom[hidden] { display: none; }
.ov-custom .inp { width: auto; flex: 0 0 auto; color-scheme: dark; }
.ov-custom__sep { color: var(--faint); }

.fee-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.fee-summary__stat {
  background: var(--surface2); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.fee-summary__label { font-size: 12px; color: var(--faint); }
.fee-summary__val { font-family: var(--font-mono); font-size: 20px; font-weight: 700; }
.fee-bar {
  height: 9px; border-radius: 6px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--line-soft);
}
.fee-bar__fill {
  height: 100%; width: 0; border-radius: 6px; transition: width .4s var(--ease, ease);
  background: linear-gradient(90deg, var(--cyan), var(--green));
}
.fee-bar__fill.is-over { background: linear-gradient(90deg, var(--gold), var(--pink)); }
.fee-bar__cap { margin-top: 7px; font-size: 12.5px; color: var(--muted); }

/* ---- 💳 Credit phí TRẢ TRƯỚC (mode credit) ---- */
.fee-credit {
  margin-top: 12px; padding: 13px 15px; border-radius: 12px;
  background: var(--surface2); border: 1px solid var(--line-soft);
}
.fee-credit[hidden] { display: none; }
.fee-credit__row { display: flex; align-items: center; gap: 12px; }
.fee-credit__stat { flex: 1; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fee-credit__label { font-size: 12.5px; color: var(--faint); }
.fee-credit__val { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--gold); }
.fee-credit__val.is-neg { color: var(--red); }
.fee-credit__chip {
  font-size: 11.5px; padding: 2.5px 10px; border-radius: 999px;
  border: 1px solid var(--line-soft); color: var(--muted);
}
.fee-credit__chip.is-ok   { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.fee-credit__chip.is-low  { color: var(--gold);  border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.fee-credit__chip.is-neg  { color: var(--red);   border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.fee-credit__toggle {
  margin-top: 8px; background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 12.5px; color: var(--muted); font-family: inherit;
}
.fee-credit__toggle:hover { color: var(--cyan); }
.fee-credit__ledger { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.fcl-row {
  display: flex; align-items: center; gap: 10px; font-size: 12.5px;
  padding: 7px 10px; border-radius: 9px; background: var(--surface);
  border: 1px solid var(--line-soft);
}
.fcl-row__note { flex: 1; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcl-row__amt  { font-family: var(--font-mono); font-weight: 700; }
.fcl-row__amt.is-plus  { color: var(--green); }
.fcl-row__amt.is-minus { color: var(--pink); }
.fcl-row__bal  { font-family: var(--font-mono); color: var(--faint); font-size: 11.5px; }
.fcl-row__time { color: var(--faint); font-size: 11px; }

/* Modal nạp credit: lưới mức nhanh + ô nhập tự do */
.fcx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 12px; }
.fcx-amt {
  font-family: var(--font-mono); font-weight: 600; font-size: 15px; cursor: pointer;
  padding: 12px 8px; border-radius: 11px; color: var(--text);
  background: var(--surface2); border: 1px solid var(--line-soft);
  transition: border-color .15s var(--ease, ease), transform .15s var(--ease, ease);
}
.fcx-amt:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.fcx-amt.is-selected {
  border-color: var(--gold); color: var(--gold);
  background: color-mix(in srgb, var(--gold) 10%, var(--surface2));
}
.fcx-note {
  margin-bottom: 12px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px;
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--red) 40%, transparent);
}
.fcx-note[hidden] { display: none; }

/* Chú thích modal nạp — nhỏ + xám mờ ĐÚNG như dòng "đã trừ …đ phí trong kỳ này" (#fcChargedK / .ov-kpi__cap).
   Dùng selector ID để thắng rule .story-create .sub (nebula ép về --muted). */
#creditTopModal .fcx-hint { font-size: 11px; color: var(--faint); line-height: 1.55; }

/* Pager sổ cái credit (Studio + Admin) — nhỏ gọn, căn giữa, ẩn khi trống */
.fcl-pager { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.fcl-pager:empty { display: none; }
.fcl-pager .pager__btn { min-width: 28px; height: 28px; padding: 0 7px; font-size: 12px; border-radius: 8px; }
.fcl-pager .pager__nav { font-size: 14px; }

/* ---- Hoá đơn phí trả sau (chốt theo tháng) ---- */
.fee-inv {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-top: 8px; border-radius: 10px; font-size: 13px;
  background: var(--surface2); border: 1px solid var(--line-soft);
}
.fee-inv.is-overdue { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.fee-inv__mo  { font-family: var(--font-mono); color: var(--muted); }
.fee-inv__amt { font-family: var(--font-mono); font-weight: 700; color: var(--gold); }
.fee-inv__due { font-size: 12px; color: var(--faint); margin-left: auto; }
.fee-inv.is-overdue .fee-inv__due { color: var(--red); }
.fee-inv__tag { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.fee-inv__tag.is-pending { color: var(--gold);  border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.fee-inv__tag.is-paid    { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.fee-inv__tag.is-waived  { color: var(--faint); border-color: var(--line-soft); }

/* ---- Banner công nợ (mọi tab Studio): vàng chờ nộp · đỏ khoá ---- */
.fee-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px; margin-bottom: 14px; border-radius: 12px; font-size: 13.5px;
  background: color-mix(in srgb, var(--gold) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}
.fee-banner__tx { flex: 1; }
.fee-banner.is-locked {
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--red) 45%, transparent);
}
.fee-banner[hidden] { display: none; }

/* ---- Lịch sử donate ---- */
.stream-history { display: flex; flex-direction: column; gap: 8px; }
.stream-history:empty::after {
  content: 'Chưa có donate nào. Bấm Test Donate để kiểm tra nhé!';
  color: var(--faint);
  font-size: 13px;
}
/* Bản gọn (cạnh bắn thử): hẹp lại, cuộn nội bộ → rút ngắn độ dài trang kỹ thuật */
.stream-history--compact { max-height: 290px; overflow-y: auto; gap: 6px; padding-right: 4px; }
.stream-history--compact .sd-row { min-height: 46px; padding: 6px 10px; gap: 8px; }
.stream-history--compact .sd-row__amt { width: 74px; font-size: 13px; }
.stream-history--compact .sd-row__name { font-size: 13px; }
.stream-history--compact .sd-row__msg { font-size: 12px; }
.stream-history--compact .sd-row__time { width: 46px; }
.stream-history--compact .sd-row__hm   { font-size: 11.5px; }
.stream-history--compact .sd-row__date { font-size: 10px; }
/* Hàng lịch sử ĐỒNG ĐỀU: cùng chiều cao tối thiểu · cột số tiền/giờ cố định · lời nhắn 1 dòng */
.sd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--surface2);
}
.sd-row__amt {
  flex: none;
  width: 96px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.sd-row__body { flex: 1; min-width: 0; }
.sd-row__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-row__name .sd-tag {
  font-size: 11px; font-weight: 600; color: var(--cyan);
  border: 1px solid var(--line-soft); border-radius: 6px; padding: 1px 6px; margin-left: 6px;
  white-space: nowrap;
}
.sd-row__name .sd-tag--test {
  color: var(--gold); border-color: rgba(var(--gold-rgb), .3); background: rgba(var(--gold-rgb), .08);
}
.sd-row__msg { font-size: 13px; color: var(--muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-row__time { flex: none; width: 56px; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.15; }
.sd-row__hm   { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sd-row__date { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
  .bank-form__row,
  .sd-grid2 { grid-template-columns: 1fr; }
  .stream-switch { padding-bottom: 0; }
}

/* ============ Che doanh thu (chống lộ khi live) — nút 👁 + blur ============ */
.sd-eye {
  margin-left: 8px; flex: none;
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--surface2); border: 1px solid rgba(var(--hl-rgb), .09);
  border-radius: 9px; font-size: 14px; cursor: pointer; line-height: 1;
  transition: var(--ease);
}
.sd-eye:hover { transform: translateY(-1px); border-color: var(--gold); }
.sd-eye.is-on { border-color: var(--gold); }
.gl-money { transition: filter .18s ease; }
.money-hidden .gl-money {
  filter: blur(9px); cursor: pointer;
  user-select: none; -webkit-user-select: none;
}

/* Ô nhập link mạng xã hội (editor trang donate) */
.social-inputs { display: grid; gap: 8px; }

/* ============================================================
   NEBULA 2.0 — Studio "Kênh Donate" (dashboard tier)
   CSS-skin 1 DOM: giữ NGUYÊN markup + stream.js. Neon byte-nguyên
   (mọi rule gate :root[data-theme="nebula"] #stream). stream ∈ NEB_SCREENS.
   ============================================================ */
/* ============================================================
   CHROME DASHBOARD RIÊNG (khớp mockup Studio): full-height sidebar 248
   (logo + nav phẳng + footer) + topbar (danh tính kênh · doanh thu · xem trang).
   CHỈ khi đã bật donate (#streamOn hiện) → ẩn top-nav app; khi chưa bật giữ
   top-nav để còn điều hướng. Neon KHÔNG có (gate data-theme + .is-studio).
   ============================================================ */
/* Nền dashboard tối hơn (bớt tím) — đặt trên .app để orb .gl-atmos (z-index:-1) vẫn hiện trên nền này */
:root[data-theme="nebula"] .app.is-neb.is-studio { background: var(--bg-dash); }
/* Orb atmosphere dịu hơn cho tier dashboard */
:root[data-theme="nebula"] .app.is-studio .gl-atmos .o1 { background: radial-gradient(circle, rgba(var(--violet-rgb), .16), transparent 62%); }
:root[data-theme="nebula"] .app.is-studio .gl-atmos .o2 { background: radial-gradient(circle, rgba(var(--pink-rgb), .1), transparent 64%); }
:root[data-theme="nebula"] .app.is-neb.is-studio #content { padding: 0; max-width: none; }
:root[data-theme="nebula"] .app.is-neb.is-studio #content > #stream.screen { max-width: none; margin: 0; padding: 0; }
:root[data-theme="nebula"] #stream .form-wrap { max-width: none; padding: 0; margin: 0; }
/* Ẩn top-nav app khi Studio đang bật (dùng chrome riêng) */
:root[data-theme="nebula"] .app.is-neb.is-studio:has(#streamOn:not([hidden])) .glnav { display: none; }
/* Ẩn header màn (eyebrow/h1/sub) — topbar Studio thay thế */
:root[data-theme="nebula"] #stream .form-wrap > .eyebrow,
:root[data-theme="nebula"] #stream .form-wrap > .h-title,
:root[data-theme="nebula"] #stream .form-wrap > .sub { display: none; }

/* Shell = flex full-viewport: sidebar + body */
:root[data-theme="nebula"] #stream .stream-on.studio {
  display: flex; gap: 0; margin-top: 0; min-height: 100vh; align-items: stretch;
}

/* ---- Sidebar dọc (logo · nav phẳng · footer) ---- */
:root[data-theme="nebula"] #stream .studio__nav {
  width: 248px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  flex-direction: column; gap: 0; padding: 0;
  background: var(--bg-dash-panel); border-right: 1px solid rgba(var(--hl-rgb), .07);
}
/* Logo Studio đầu sidebar */
:root[data-theme="nebula"] #stream .studio__brand {
  display: flex; align-items: center; gap: 9px; height: 66px; flex: none; order: 0;
  padding: 0 20px; border-bottom: 1px solid rgba(var(--hl-rgb), .07);
}
:root[data-theme="nebula"] #stream .studio__brandlogo {
  height: 40px; width: auto; flex: none; display: block; background: none;
  filter: drop-shadow(0 2px 5px rgba(var(--shadow-rgb), .5))
          drop-shadow(0 5px 14px rgba(var(--violet-rgb), .25));
}
:root[data-theme="nebula"] #stream .studio__brandtx { display: flex; flex-direction: column; line-height: 1.1; }
:root[data-theme="nebula"] #stream .studio__brandtx b { font-weight: 800; font-size: 15px; }
:root[data-theme="nebula"] #stream .studio__brandtx small { font-size: 11px; color: var(--n-label); }

/* Nav phẳng: xổ nhóm "Cài đặt" thành mục thẳng + sắp thứ tự như mẫu */
:root[data-theme="nebula"] #stream .studio__navgroup { display: contents; }
:root[data-theme="nebula"] #stream .studio__navtoggle { display: none; }
:root[data-theme="nebula"] #stream .studio__navsub,
:root[data-theme="nebula"] #stream .studio__navsub[hidden] { display: contents !important; }
:root[data-theme="nebula"] #stream .studio__navbtn[data-sp="overview"] { order: 1; margin-top: 14px; }
:root[data-theme="nebula"] #stream .studio__navbtn[data-sp="control"]  { order: 2; }
:root[data-theme="nebula"] #stream .studio__navbtn[data-sp="widget"]   { order: 3; }
:root[data-theme="nebula"] #stream .studio__navbtn[data-sp="history"]  { order: 4; }
:root[data-theme="nebula"] #stream .studio__navbtn[data-sp="page"]     { order: 5; }
:root[data-theme="nebula"] #stream .studio__navbtn[data-sp="money"]    { order: 6; }
:root[data-theme="nebula"] #stream .studio__navbtn {
  color: var(--n-nav); border: 1px solid transparent; border-radius: 10px; margin: 0 12px 4px;
  font-size: 14px; font-weight: 500; padding: 10px 12px; gap: 11px;
}
:root[data-theme="nebula"] #stream .studio__navbtn--sub { font-size: 14px; padding: 10px 12px; }
:root[data-theme="nebula"] #stream .studio__navbtn:hover { background: rgba(var(--hl-rgb), .05); color: var(--ink); }
:root[data-theme="nebula"] #stream .studio__navbtn.is-active {
  background: rgba(var(--violet-rgb), .2); border-color: rgba(var(--violet-rgb), .28);
  color: #fff; font-weight: 600; box-shadow: none;
}
/* Footer sidebar: đẩy xuống đáy · "Tắt nhận donate" đỏ tonal + "Về trang chủ" */
:root[data-theme="nebula"] #stream .studio__navfoot {
  order: 9; margin-top: auto; border-top: 1px solid rgba(var(--hl-rgb), .07); padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
:root[data-theme="nebula"] #stream .studio__navfoot .sd-off {
  border: 1px solid rgba(var(--red-rgb), .3); background: rgba(var(--red-rgb), .1); color: var(--red);
  border-radius: 10px; padding: 10px; font-weight: 600; font-size: 13px;
}
:root[data-theme="nebula"] #stream .studio__navfoot .sd-off:hover { background: rgba(var(--red-rgb), .18); color: var(--red); }
:root[data-theme="nebula"] #stream .studio__navhome {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; color: var(--muted); cursor: pointer; text-decoration: none;
}
:root[data-theme="nebula"] #stream .studio__navhome:hover { background: rgba(var(--hl-rgb), .05); color: var(--ink); }

/* ---- Body + topbar ---- */
:root[data-theme="nebula"] #stream .studio__body { flex: 1; min-width: 0; padding: 0 30px 90px; }
:root[data-theme="nebula"] #stream .studio__topbar {
  display: flex; align-items: center; gap: 16px; height: 66px; margin: 0 -30px 22px; padding: 0 30px;
  position: sticky; top: 0; z-index: 30;
  background: rgba(var(--bg-dash-rgb), .85); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(var(--hl-rgb), .07);
}
:root[data-theme="nebula"] #stream .studio__tbav {
  width: 34px; height: 34px; border-radius: 10px; flex: none; overflow: hidden; display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
}
:root[data-theme="nebula"] #stream .studio__tbav img { width: 100%; height: 100%; object-fit: cover; }
:root[data-theme="nebula"] #stream .studio__tbident { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
:root[data-theme="nebula"] #stream .studio__tbident b { font-size: 14.5px; font-weight: 700; }
:root[data-theme="nebula"] #stream .studio__tbstatus { font-size: 11.5px; color: var(--green); }
:root[data-theme="nebula"] #stream .studio__tbstatus.is-live { color: var(--red); }
:root[data-theme="nebula"] #stream .studio__tbright { margin-left: auto; display: flex; align-items: center; gap: 12px; }
:root[data-theme="nebula"] #stream .studio__tbmonth { font-size: 13px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
:root[data-theme="nebula"] #stream .studio__tbmonth b { color: var(--gold); }
:root[data-theme="nebula"] #stream .studio__tbview {
  border: 1px solid rgba(var(--hl-rgb), .16); background: rgba(var(--hl-rgb), .05); color: var(--ink);
  font-weight: 600; font-size: 13px; padding: 9px 14px; border-radius: 10px; white-space: nowrap; transition: background .15s ease;
}
:root[data-theme="nebula"] #stream .studio__tbview:hover { background: rgba(var(--hl-rgb), .1); }
/* Nebula đã có nút "Xem trang donate" ở topbar → ẩn cả thẻ link donate Tổng quan (tránh trùng). Neon giữ. */
:root[data-theme="nebula"] #stream .ov-linkcard { display: none; }

/* ---- Thẻ chung → glass phẳng (trừ màn giới thiệu stream-off giữ gradient riêng) ---- */
:root[data-theme="nebula"] #stream .card:not(.stream-off) {
  background: rgba(var(--hl-rgb), .04); border: 1px solid rgba(var(--hl-rgb), .09); box-shadow: none;
}

/* ---- Thẻ KPI doanh thu (Nebula thay ô fee-summary) ---- */
:root[data-theme="nebula"] #stream .fee-summary { display: none; }
:root[data-theme="nebula"] #stream .ov-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px;
}
/* Hàng 2 thẻ (Doanh thu + Phí/Credit) — thẻ rộng thoáng hơn bộ 4 cũ */
:root[data-theme="nebula"] #stream .ov-kpis--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
:root[data-theme="nebula"] #stream .ov-kpi__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px;
}
/* Nebula: nút nạp đã nằm trên thẻ KPI credit → ẩn nút trùng ở khối chi tiết */
:root[data-theme="nebula"] #stream #fcTopupBtn { display: none; }
/* Chip lọc: kính + active tím (đồng bộ pill Nebula) */
:root[data-theme="nebula"] #stream .ov-period__chip { background: rgba(var(--hl-rgb), .05); border-color: rgba(var(--hl-rgb), .12); }
:root[data-theme="nebula"] #stream .ov-period__chip.is-active {
  color: var(--violet-tint); border-color: rgba(var(--violet-rgb), .4); background: rgba(var(--violet-rgb), .16);
}
:root[data-theme="nebula"] #stream .ov-kpi {
  background: linear-gradient(180deg, rgba(var(--hl-rgb), .06), rgba(var(--hl-rgb), .022));
  border: 1px solid rgba(var(--hl-rgb), .1); border-radius: 13px; padding: 15px;
  box-shadow: inset 0 1px 0 rgba(var(--hl-rgb), .08), 0 14px 30px -18px rgba(var(--shadow-rgb), .6);
}
:root[data-theme="nebula"] #stream .ov-kpi__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
:root[data-theme="nebula"] #stream .ov-kpi__lb { font-size: 12.5px; color: var(--muted); }
:root[data-theme="nebula"] #stream .ov-kpi__tr {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 100px;
}
:root[data-theme="nebula"] #stream .ov-kpi__tr.is-up   { color: var(--green);     background: rgba(var(--green-rgb), .12); }
:root[data-theme="nebula"] #stream .ov-kpi__tr.is-down { color: var(--pink-tint); background: rgba(var(--pink-rgb), .12); }
:root[data-theme="nebula"] #stream .ov-kpi__v { display: block; font-size: 20px; font-weight: 700; margin-top: 6px; }
:root[data-theme="nebula"] #stream .ov-kpi__spark { width: 100%; height: 26px; margin-top: 8px; display: block; }
:root[data-theme="nebula"] #stream .ov-kpi__cap { font-size: 11px; color: var(--faint); margin-top: 3px; }
/* Hiệu ứng vẽ biểu đồ (như mockup glDraw) — JS thêm .is-draw để chạy lại khi vào Tổng quan */
@keyframes gl-spark-draw { from { stroke-dashoffset: 300; } to { stroke-dashoffset: 0; } }
:root[data-theme="nebula"] #stream .ov-kpi__spark polyline { stroke-dasharray: 300; stroke-dashoffset: 300; }
:root[data-theme="nebula"] #stream .ov-kpis.is-draw .ov-kpi__spark polyline { animation: gl-spark-draw 1.3s ease-out forwards; }
:root[data-theme="nebula"] #stream .ov-kpis.is-draw .ov-kpi:nth-child(2) .ov-kpi__spark polyline { animation-delay: .08s; }
:root[data-theme="nebula"] #stream .ov-kpis.is-draw .ov-kpi:nth-child(3) .ov-kpi__spark polyline { animation-delay: .16s; }
:root[data-theme="nebula"] #stream .ov-kpis.is-draw .ov-kpi:nth-child(4) .ov-kpi__spark polyline { animation-delay: .24s; }

/* ---- Icon nét cho nav Studio (17px như mockup, kế thừa màu chữ nút) ---- */
:root[data-theme="nebula"] #stream .studio__navbtn [data-ic] svg { width: 17px; height: 17px; }

/* ---- Tiêu đề section = emoji inline + chữ đậm (bỏ ô icon vuông, khớp mockup) ---- */
:root[data-theme="nebula"] #stream .sd-sec__ic {
  width: auto; height: auto; background: none; border: 0; border-radius: 0; font-size: 18px; place-items: initial;
}
:root[data-theme="nebula"] #stream .sd-sec { margin-bottom: 16px; gap: 10px; }
:root[data-theme="nebula"] #stream .sd-sec__t { font-weight: 700; font-size: 15px; }

/* ---- Thanh mục tiêu phí: cyan→tím, cao 10, bo tròn (như mockup) ---- */
:root[data-theme="nebula"] #stream .fee-bar { height: 10px; border-radius: 100px; }
:root[data-theme="nebula"] #stream .fee-bar__fill { background: linear-gradient(90deg, var(--cyan), var(--violet)); border-radius: 100px; }

/* ---- Checklist thiết lập: bước xong = nền xanh nhạt · link phụ = chữ tím-nhạt (bỏ nút ghost) ---- */
:root[data-theme="nebula"] #stream .setup-check__item.is-done {
  background: rgba(var(--green-rgb), .08); border-color: rgba(var(--green-rgb), .2);
}
:root[data-theme="nebula"] #stream .setup-check__item .btn--ghost {
  background: none; border: 0; box-shadow: none; padding: 0 2px; color: var(--violet-tint);
  font-weight: 600; font-size: 12.5px;
}
:root[data-theme="nebula"] #stream .setup-check__item .btn--ghost:hover { color: var(--ink); background: none; }
:root[data-theme="nebula"] #stream .setup-check__box { width: 22px; height: 22px; border-width: 2px; }

/* ---- Lưới widget: cấu hình 1.3 · preview 1 (như mockup); preview né topbar sticky ---- */
:root[data-theme="nebula"] #stream .widget-cols { grid-template-columns: 1.3fr 1fr; }
:root[data-theme="nebula"] #stream .widget-cols__preview { top: 86px; }

/* ---- Lịch sử = BẢNG (Nebula) khớp mockup: header mờ · hàng hover tím · số cyan ---- */
:root[data-theme="nebula"] #stream .hist-tbl { width: 100%; border-collapse: collapse; }
:root[data-theme="nebula"] #stream .hist-tbl th {
  text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--n-label);
  border-bottom: 1px solid rgba(var(--hl-rgb), .08);
}
:root[data-theme="nebula"] #stream .hist-tbl td {
  padding: 12px; font-size: 13.5px; border-bottom: 1px solid rgba(var(--hl-rgb), .05); vertical-align: middle;
  transition: background .14s ease;
}
:root[data-theme="nebula"] #stream .hist-tbl tbody tr:last-child td { border-bottom: 0; }
:root[data-theme="nebula"] #stream .hist-tbl tbody tr:hover td { background: rgba(var(--violet-rgb), .06); }
:root[data-theme="nebula"] #stream .hist-tbl .ht-amt b { color: var(--cyan); font-weight: 700; }
:root[data-theme="nebula"] #stream .hist-tbl .ht-msg { color: var(--muted); max-width: 340px; }
:root[data-theme="nebula"] #stream .hist-tbl .ht-time { color: var(--n-label); font-size: 12.5px; white-space: nowrap; }
:root[data-theme="nebula"] #stream .hist-tbl .sd-tag {
  font-size: 11px; border: 1px solid rgba(var(--hl-rgb), .12); border-radius: 6px; padding: 0 5px; margin-left: 4px;
}
/* Bọc bảng trong nền kính bo góc (histList) */
:root[data-theme="nebula"] #stream #histList:has(.hist-tbl) {
  background: rgba(var(--hl-rgb), .04); border: 1px solid rgba(var(--hl-rgb), .08); border-radius: 14px;
  padding: 6px; overflow-x: auto;
}
/* Trạng thái rỗng đẹp (gạch đứt + icon) */
:root[data-theme="nebula"] #stream .hist-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 52px 24px; border: 1.5px dashed rgba(var(--hl-rgb), .13); border-radius: 16px; background: rgba(var(--hl-rgb), .02);
}
:root[data-theme="nebula"] #stream .hist-empty__ic {
  width: 68px; height: 68px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; margin-bottom: 14px;
  background: rgba(var(--pink-rgb), .14); border: 1px solid rgba(var(--pink-rgb), .3);
}
:root[data-theme="nebula"] #stream .hist-empty__t { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
:root[data-theme="nebula"] #stream .hist-empty__d { font-size: 13.5px; color: var(--muted); max-width: 380px; line-height: 1.6; margin-bottom: 18px; }

/* ---- Ngân hàng: card gọn 640 · Trang donate: card gọn 760 (căn trái, tập trung như mockup) ---- */
:root[data-theme="nebula"] #stream #sp-money .card { max-width: 640px; }
:root[data-theme="nebula"] #stream #sp-page .card { max-width: 760px; }
/* Ô nhập Studio khớp mockup (sinp: cao ~42, radius 10, chữ 14) — nhẹ nhàng, không đụng ô cấu hình widget (.alcfg) */
:root[data-theme="nebula"] #stream #sp-page .inp,
:root[data-theme="nebula"] #stream #sp-money .inp,
:root[data-theme="nebula"] #stream #sp-overview .inp {
  padding: 11px 14px; border-radius: 10px; font-size: 14px;
}

/* ---- Lịch sử: bỏ card NGOÀI → tiêu đề + lọc "bare", chỉ BẢNG nằm trong card (khớp mockup 100%) ---- */
:root[data-theme="nebula"] #stream #sp-history > .card { background: none; border: 0; box-shadow: none; }
:root[data-theme="nebula"] #stream #sp-history > .card > .card__body { padding: 0; }
:root[data-theme="nebula"] #stream #sp-history .sd-sec__d,
:root[data-theme="nebula"] #stream #sp-history .sd-sec__ic,
:root[data-theme="nebula"] #stream #sp-history .reload-btn { display: none; }   /* mockup: h1 trơn, không icon/mô tả/tải-lại */
:root[data-theme="nebula"] #stream #sp-history .sd-sec { margin-bottom: 14px; }
:root[data-theme="nebula"] #stream #sp-history .sd-sec__t { font-size: 20px; font-weight: 800; }  /* = h1 mockup */
:root[data-theme="nebula"] #stream #sp-history .hist-tools { margin: 0 0 14px; }
/* Nebula: dùng dropdown thời gian (mockup) → hiện select, ẩn hàng tab period */
:root[data-theme="nebula"] #stream #sp-history .hist-period-sel { display: block; flex: 0 0 auto; width: 160px; }
:root[data-theme="nebula"] #stream #sp-history .hist-periods { display: none; }
/* Nút 👁 che tiền = kính nhẹ (bớt nổi) */
:root[data-theme="nebula"] #stream #sp-history .sd-eye {
  background: rgba(var(--hl-rgb), .05); border: 1px solid rgba(var(--hl-rgb), .12);
}

/* ---- Widget: bỏ card NGOÀI → 2 panel KÍNH riêng (cấu hình | xem trước) như mockup ---- */
:root[data-theme="nebula"] #stream .wtab-panel > .card { background: none; border: 0; box-shadow: none; }
:root[data-theme="nebula"] #stream .wtab-panel > .card > .card__body { padding: 0; }
:root[data-theme="nebula"] #stream .wtab-panel .sd-divider { display: none; }
:root[data-theme="nebula"] #stream .wtab-panel .stream-link { margin-bottom: 18px; }
:root[data-theme="nebula"] #stream .widget-cols__cfg,
:root[data-theme="nebula"] #stream .widget-cols__preview {
  background: rgba(var(--hl-rgb), .04); border: 1px solid rgba(var(--hl-rgb), .08); border-radius: 16px; padding: 20px;
}
/* Sân khấu xem trước OBS = caro chéo TỐI (thay nền tím cũ) — đồng bộ nền dashboard mới */
:root[data-theme="nebula"] #stream .gl-stage--preview {
  background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 14px, var(--bg2) 14px, var(--bg2) 28px);
  border: 1px solid rgba(var(--hl-rgb), .08); aspect-ratio: 16 / 9; min-height: 0;
}

/* ---- Widget config: tinh gọn · tinh tế (hướng platform cao cấp) ----
   nhãn dịu/nhẹ · subhead mảnh · chip màu + thẻ layout gọn · khoảng cách vừa. */
:root[data-theme="nebula"] #stream .widget-cols__cfg .field-label,
:root[data-theme="nebula"] #stream .alcfg .field-label { font-size: 12.5px; font-weight: 600; color: var(--n-nav); }
:root[data-theme="nebula"] #stream .al-subhead {
  font-size: 11px; font-weight: 700; color: var(--n-label); letter-spacing: .1em;
  border-bottom: 1px solid rgba(var(--hl-rgb), .06); margin: 18px 0 12px; padding-bottom: 8px;
}
:root[data-theme="nebula"] #stream .al-color {
  background: rgba(var(--hl-rgb), .04); border: 1px solid rgba(var(--hl-rgb), .08); border-radius: 10px;
  color: var(--n-nav); font-size: 12.5px;
}
:root[data-theme="nebula"] #stream .al-layout { border-width: 1px; border-radius: 12px; }
:root[data-theme="nebula"] #stream .al-layout small { color: var(--n-nav); font-weight: 500; }
:root[data-theme="nebula"] #stream .al-layout.is-selected small { color: var(--ink); font-weight: 600; }
:root[data-theme="nebula"] #stream .stream-switch { color: var(--n-nav); font-size: 13px; }
:root[data-theme="nebula"] #stream .sd-fine { color: var(--n-label); }
/* Panel xem trước: nhãn "Xem trước overlay" dịu, nút Mặc định gọn */
:root[data-theme="nebula"] #stream .wprev__label,
:root[data-theme="nebula"] #stream .wprev__head span { color: var(--n-label); font-size: 12px; letter-spacing: .04em; }

/* ---- Tiêu đề tab (h1) cho Điều khiển & Widget (như mockup) ---- */
:root[data-theme="nebula"] #stream .studio-h1 { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 16px; }
:root[data-theme="nebula"] #stream #sp-control .studio-h1 { margin-bottom: 4px; }
:root[data-theme="nebula"] #stream .studio-h1 + .wtabs { margin-top: 0; }
:root[data-theme="nebula"] #stream .studio-h1__d { display: block; font-size: 13.5px; color: var(--muted); margin: 0 0 18px; }

/* ---- ĐIỀU KHIỂN: dashboard 2 cột gọn (thao tác trực tiếp trái · cấu hình chặn phải) ----
   Reflow thuần CSS (giữ Neon nguyên): Trạng thái + Phát lại nhanh cột trái, Danh sách chặn cột phải. */
:root[data-theme="nebula"] #stream #sp-control.is-active {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px; align-items: start; max-width: 1000px;
}
:root[data-theme="nebula"] #stream #sp-control > .studio-h1,
:root[data-theme="nebula"] #stream #sp-control > .studio-h1__d { grid-column: 1 / -1; }
:root[data-theme="nebula"] #stream #sp-control > .card:nth-of-type(1) { grid-column: 1; grid-row: 3; }
:root[data-theme="nebula"] #stream #sp-control > .card:nth-of-type(2) { grid-column: 1; grid-row: 4; }
:root[data-theme="nebula"] #stream #sp-control > .card:nth-of-type(3) { grid-column: 2; grid-row: 3 / span 2; }
/* Nút "Tạm dừng phát alert" gọn hơn (không tràn full khối) */
:root[data-theme="nebula"] #stream #sp-control #ctrlPauseBtn { width: auto; align-self: flex-start; }
/* Danh sách chặn: 2 ô cạnh nhau cho gọn theo chiều cao */
:root[data-theme="nebula"] #stream #ctrlBlockNames,
:root[data-theme="nebula"] #stream #ctrlBlockWords { min-height: 92px; }

/* ---- Inputs / textarea → glass ---- */
:root[data-theme="nebula"] #stream .inp {
  background: rgba(var(--hl-rgb), .05); border: 1px solid rgba(var(--hl-rgb), .1);
}
:root[data-theme="nebula"] #stream .inp:hover  { border-color: rgba(var(--hl-rgb), .16); }
:root[data-theme="nebula"] #stream .inp:focus  { border-color: rgba(var(--violet-rgb), .55); }
/* Select native → bỏ mũi tên chrome + caret riêng (uiselect vẽ popup kính khi nebula) */
:root[data-theme="nebula"] #stream select.inp {
  appearance: none; -webkit-appearance: none; color-scheme: dark; cursor: pointer; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a83b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
:root[data-theme="nebula"] #stream select.inp option { background: var(--surface2); color: var(--ink); }

/* ---- Nút: chính violet phẳng · ghost kính · gold/cyan phẳng đặc ---- */
:root[data-theme="nebula"] #stream .btn { background: var(--violet2); color: #fff; box-shadow: none; }
:root[data-theme="nebula"] #stream .btn--ghost {
  background: rgba(var(--hl-rgb), .05); border: 1px solid rgba(var(--hl-rgb), .16); color: var(--ink);
}
:root[data-theme="nebula"] #stream .btn--ghost:hover { border-color: rgba(var(--hl-rgb), .28); filter: none; }
:root[data-theme="nebula"] #stream .btn--gold { background: var(--gold); color: var(--on-gold); }
:root[data-theme="nebula"] #stream .btn--cyan { background: var(--cyan); color: var(--on-cyan); }

/* ---- Sub-surface (KPI tile, checklist, hàng lịch sử, icon badge, chip màu, ảnh/âm) → kính mờ ---- */
:root[data-theme="nebula"] #stream .fee-summary__stat,
:root[data-theme="nebula"] #stream .setup-check__item,
:root[data-theme="nebula"] #stream .sd-row,
:root[data-theme="nebula"] #stream .al-color,
:root[data-theme="nebula"] #stream .al-img-cur,
:root[data-theme="nebula"] #stream .al-snd-name {
  background: rgba(var(--hl-rgb), .05); border: 1px solid rgba(var(--hl-rgb), .09);
}
:root[data-theme="nebula"] #stream .fee-bar,
:root[data-theme="nebula"] #stream .tts-range { background: rgba(var(--hl-rgb), .06); border-color: rgba(var(--hl-rgb), .09); }

/* ---- Dịu NỀN bảng lịch sử credit + hoá đơn tháng (bớt nổi bật — review 2026-07-10) ----
   Không scope #stream để phủ luôn sổ cái trong modal AdminCP (cùng class .fcl-row). Giữ nguyên viền. */
:root[data-theme="nebula"] #stream .fee-credit { background: rgba(var(--hl-rgb), .028); border-color: rgba(var(--hl-rgb), .07); }
:root[data-theme="nebula"] .fcl-row,
:root[data-theme="nebula"] .fee-inv { background: rgba(var(--hl-rgb), .02); border-color: rgba(var(--hl-rgb), .06); }
:root[data-theme="nebula"] .fee-inv.is-overdue { border-color: color-mix(in srgb, var(--red) 45%, transparent); }

/* ---- Tab widget (ngang): nghỉ = kính · active giữ gradient hồng→tím như mẫu ---- */
:root[data-theme="nebula"] #stream .wtab {
  background: rgba(var(--hl-rgb), .05); border-color: rgba(var(--hl-rgb), .1); color: var(--n-label);
}
:root[data-theme="nebula"] #stream .wtab:hover { color: var(--ink); border-color: rgba(var(--hl-rgb), .18); }

/* ---- 3 thẻ chọn giao diện alert (Trong suốt/Kính/Đặc) → kính ---- */
:root[data-theme="nebula"] #stream .al-layout {
  background: rgba(var(--hl-rgb), .04); border-color: rgba(var(--hl-rgb), .1);
}
:root[data-theme="nebula"] #stream .al-layout.is-selected {
  border-color: var(--pink); background: rgba(var(--pink-rgb), .1);
}

/* ---- Hộp tuỳ chỉnh TTS → tonal kính ---- */
:root[data-theme="nebula"] #stream .tts-box {
  background: rgba(var(--hl-rgb), .04); border: 1px solid rgba(var(--hl-rgb), .09);
}

/* ---- Popup thư viện ảnh / âm báo → nền glass sâu ---- */
:root[data-theme="nebula"] #stream .gif-modal__box {
  background: linear-gradient(180deg, var(--surface2), var(--bg2)); border: 1px solid rgba(var(--hl-rgb), .1);
}
:root[data-theme="nebula"] #stream .al-gif,
:root[data-theme="nebula"] #stream .snd-item {
  background: rgba(var(--hl-rgb), .05); border-color: rgba(var(--hl-rgb), .09);
}

/* ============================================================
   MỞ KÊNH DONATE (onboarding Nebula) — thay bản legacy khi chưa bật donate.
   #streamOff = container trong suốt; .soff = hero + alert mock + tính năng + phí.
   ============================================================ */
:root[data-theme="nebula"] #stream #streamOff {
  background: none; border: 0; box-shadow: none; margin-top: 0; overflow: visible;
}
:root[data-theme="nebula"] #stream .stream-off__inner { display: none; }   /* ẩn bản legacy */
:root[data-theme="nebula"] #stream .soff {
  display: block; max-width: 980px; margin: 0 auto; padding: 30px 30px 72px;
}
/* Hero 2 cột */
:root[data-theme="nebula"] #stream .soff__hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: center; margin-bottom: 40px;
}
:root[data-theme="nebula"] #stream .soff__kick {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--n-label); margin-bottom: 12px;
}
:root[data-theme="nebula"] #stream .soff__h {
  font-size: 33px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 14px; color: var(--ink);
}
/* A — gradient chữ tiêu đề (trắng → tím nhạt), giữ emoji 📺 nguyên màu */
:root[data-theme="nebula"] #stream .soff__h-grad {
  background: linear-gradient(92deg, var(--ink) 32%, var(--violet-tint));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
:root[data-theme="nebula"] #stream .soff__p { font-size: 15px; line-height: 1.65; color: var(--ink-soft); margin: 0 0 20px; max-width: 460px; }
:root[data-theme="nebula"] #stream .soff__p b { color: var(--ink); font-weight: 700; }
:root[data-theme="nebula"] #stream .soff__chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
:root[data-theme="nebula"] #stream .soff__chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  background: rgba(var(--hl-rgb), .05); border: 1px solid rgba(var(--hl-rgb), .09); padding: 7px 13px; border-radius: 100px;
  transition: border-color var(--ease), background var(--ease);
}
:root[data-theme="nebula"] #stream .soff__chip:hover { border-color: rgba(var(--hl-rgb), .16); background: rgba(var(--hl-rgb), .07); }
:root[data-theme="nebula"] #stream .soff__chip-ic { display: inline-flex; }
:root[data-theme="nebula"] #stream .soff__chip-ic svg { width: 14px; height: 14px; display: block; }
:root[data-theme="nebula"] #stream .soff__chip-ic--c { color: var(--cyan); }
:root[data-theme="nebula"] #stream .soff__chip-ic--g { color: var(--gold); }
:root[data-theme="nebula"] #stream .soff__chip-ic--p { color: var(--pink); }
:root[data-theme="nebula"] #stream .soff__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
:root[data-theme="nebula"] #stream .soff__go {
  background: var(--violet2); color: #fff; border: 0; cursor: pointer;
  font-weight: 700; font-size: 15.5px; padding: 14px 26px; border-radius: 13px;
  box-shadow: 0 16px 34px -14px rgba(var(--violet-rgb), .7); transition: transform var(--ease), filter var(--ease);
}
:root[data-theme="nebula"] #stream .soff__go:hover { transform: translateY(-2px); filter: brightness(1.06); }
:root[data-theme="nebula"] #stream .soff__more {
  background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding: 6px 4px; transition: color var(--ease);
}
:root[data-theme="nebula"] #stream .soff__more:hover { color: var(--cyan); }

/* Alert mock (cột phải) */
:root[data-theme="nebula"] #stream .soff__visual { position: relative; }
:root[data-theme="nebula"] #stream .soff__visual::before {
  content: ''; position: absolute; inset: -14px;
  background: radial-gradient(300px 200px at 62% 18%, rgba(var(--pink-rgb), .16), transparent 70%); pointer-events: none;
}
:root[data-theme="nebula"] #stream .soff__alert {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #241b46, #171233);
  border: 1px solid rgba(var(--hl-rgb), .1); border-radius: 20px; padding: 22px;
  box-shadow: inset 0 1px 0 rgba(var(--hl-rgb), .14), 0 26px 60px -26px rgba(var(--shadow-rgb), .8);
}
:root[data-theme="nebula"] #stream .soff__alert::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(340px 130px at 22% 0%, rgba(var(--gold-rgb), .14), transparent 70%); pointer-events: none;
}
@keyframes soffPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* B — hiệu ứng "vào trang" (chỉ chạy khi .soff.is-enter, JS gắn lại mỗi lần vào màn) */
@keyframes soffRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
:root[data-theme="nebula"] #stream .soff.is-enter .soff__lead { animation: soffRise .6s cubic-bezier(.2, .7, .2, 1) both; }
:root[data-theme="nebula"] #stream .soff.is-enter .soff__alert { animation: soffPop .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: .12s; }
:root[data-theme="nebula"] #stream .soff.is-enter .soff__feat { animation: soffRise .6s cubic-bezier(.2, .7, .2, 1) both; }
:root[data-theme="nebula"] #stream .soff.is-enter .soff__feats .soff__feat:nth-child(1) { animation-delay: .2s; }
:root[data-theme="nebula"] #stream .soff.is-enter .soff__feats .soff__feat:nth-child(2) { animation-delay: .28s; }
:root[data-theme="nebula"] #stream .soff.is-enter .soff__feats .soff__feat:nth-child(3) { animation-delay: .36s; }
:root[data-theme="nebula"] #stream .soff.is-enter .soff__fee { animation: soffRise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="nebula"] #stream .soff.is-enter .soff__lead,
  :root[data-theme="nebula"] #stream .soff.is-enter .soff__alert,
  :root[data-theme="nebula"] #stream .soff.is-enter .soff__feat,
  :root[data-theme="nebula"] #stream .soff.is-enter .soff__fee,
  :root[data-theme="nebula"] #stream .soff__onair-dot,
  :root[data-theme="nebula"] #stream .soff__aav { animation: none; }
}
:root[data-theme="nebula"] #stream .soff__onair {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--pink-tint);
}
:root[data-theme="nebula"] #stream .soff__onair-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); animation: soffRing 1.8s infinite; }
@keyframes soffRing { 0% { box-shadow: 0 0 0 0 rgba(var(--pink-rgb), .5); } 70% { box-shadow: 0 0 0 7px rgba(var(--pink-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--pink-rgb), 0); } }
:root[data-theme="nebula"] #stream .soff__arow { position: relative; display: flex; align-items: center; gap: 14px; margin: 15px 0 12px; }
:root[data-theme="nebula"] #stream .soff__aav {
  width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 20px; color: var(--bg);
  background: linear-gradient(135deg, var(--violet), var(--violet2)); animation: soffFloat 2.6s ease-in-out infinite;
}
@keyframes soffFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
:root[data-theme="nebula"] #stream .soff__aname { font-size: 13.5px; color: var(--ink-soft); }
:root[data-theme="nebula"] #stream .soff__aname b { font-weight: 600; }
:root[data-theme="nebula"] #stream .soff__aamt { font-weight: 700; font-size: 25px; color: var(--gold); line-height: 1.15; }
:root[data-theme="nebula"] #stream .soff__amsg { position: relative; font-size: 13px; color: var(--muted); font-style: italic; }
:root[data-theme="nebula"] #stream .soff__adiv { position: relative; height: 1px; background: rgba(var(--hl-rgb), .09); margin: 16px 0 13px; }
:root[data-theme="nebula"] #stream .soff__abank { position: relative; display: flex; align-items: center; gap: 11px; }
:root[data-theme="nebula"] #stream .soff__abic {
  width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: rgba(var(--cyan-rgb), .14); color: var(--cyan);
}
:root[data-theme="nebula"] #stream .soff__abic svg { width: 16px; height: 16px; }
:root[data-theme="nebula"] #stream .soff__abtx { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-soft); }
:root[data-theme="nebula"] #stream .soff__abtx b { font-weight: 700; }
:root[data-theme="nebula"] #stream .soff__absub { font-size: 11px; color: var(--faint); }
:root[data-theme="nebula"] #stream .soff__afast {
  font-size: 11.5px; font-weight: 700; color: var(--cyan); flex: none;
  background: rgba(var(--cyan-rgb), .12); border: 1px solid rgba(var(--cyan-rgb), .26); padding: 4px 9px; border-radius: 100px;
}

/* 3 thẻ tính năng */
:root[data-theme="nebula"] #stream .soff__feats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px;
}
:root[data-theme="nebula"] #stream .soff__feat {
  background: rgba(var(--hl-rgb), .04); border: 1px solid rgba(var(--hl-rgb), .08); border-radius: 16px; padding: 20px;
  transition: transform var(--ease), border-color var(--ease), background var(--ease);
}
:root[data-theme="nebula"] #stream .soff__feat:hover {
  transform: translateY(-3px); border-color: rgba(var(--hl-rgb), .16); background: rgba(var(--hl-rgb), .055);
}
:root[data-theme="nebula"] #stream .soff__feat-ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 13px;
}
:root[data-theme="nebula"] #stream .soff__feat-ic svg { width: 21px; height: 21px; }
:root[data-theme="nebula"] #stream .soff__feat-ic--v { background: rgba(var(--violet-rgb), .18); color: var(--violet-tint); }
:root[data-theme="nebula"] #stream .soff__feat-ic--p { background: rgba(var(--pink-rgb), .15); color: var(--pink-tint); }
:root[data-theme="nebula"] #stream .soff__feat-ic--c { background: rgba(var(--cyan-rgb), .15); color: var(--cyan); }
:root[data-theme="nebula"] #stream .soff__feat-t { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
:root[data-theme="nebula"] #stream .soff__feat-d { font-size: 13px; line-height: 1.55; color: var(--muted); }

/* Dải phí */
:root[data-theme="nebula"] #stream .soff__fee {
  display: flex; align-items: center; gap: 13px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft);
  background: rgba(var(--cyan-rgb), .07); border: 1px solid rgba(var(--cyan-rgb), .2); border-radius: 14px; padding: 15px 18px;
}
:root[data-theme="nebula"] #stream .soff__fee b { color: var(--ink); font-weight: 700; }
:root[data-theme="nebula"] #stream .soff__fee-ic { font-size: 20px; flex: none; }

/* Mobile: hero xếp dọc */
@media (max-width: 780px) {
  :root[data-theme="nebula"] #stream .soff { padding: 20px 16px 60px; }
  :root[data-theme="nebula"] #stream .soff__hero { grid-template-columns: 1fr; gap: 26px; margin-bottom: 30px; }
  :root[data-theme="nebula"] #stream .soff__h { font-size: 27px; }
  :root[data-theme="nebula"] #stream .soff__feats { grid-template-columns: 1fr; gap: 12px; }
}

/* ---- Nebula mobile (<860): về bố cục xếp dọc, dùng lại top-nav app + header màn ---- */
@media (max-width: 860px) {
  :root[data-theme="nebula"] .app.is-neb.is-studio:has(#streamOn:not([hidden])) .glnav { display: flex; }
  :root[data-theme="nebula"] .app.is-neb.is-studio #content { padding: 22px 16px 70px; }
  :root[data-theme="nebula"] .app.is-neb.is-studio #content > #stream.screen { padding: 0; }
  :root[data-theme="nebula"] #stream .form-wrap > .eyebrow,
  :root[data-theme="nebula"] #stream .form-wrap > .h-title,
  :root[data-theme="nebula"] #stream .form-wrap > .sub { display: revert; }
  /* Trạng thái chưa bật (onboarding .soff có header riêng) → KHÔNG hiện lại header màn */
  :root[data-theme="nebula"] #stream:has(#streamOff:not([hidden])) .form-wrap > .eyebrow,
  :root[data-theme="nebula"] #stream:has(#streamOff:not([hidden])) .form-wrap > .h-title,
  :root[data-theme="nebula"] #stream:has(#streamOff:not([hidden])) .form-wrap > .sub { display: none; }
  :root[data-theme="nebula"] #stream .studio__brand,
  :root[data-theme="nebula"] #stream .studio__topbar,
  :root[data-theme="nebula"] #stream .studio__navhome { display: none; }
  :root[data-theme="nebula"] #stream .stream-on.studio { display: block; min-height: auto; margin-top: 20px; }
  :root[data-theme="nebula"] #stream .studio__nav {
    width: auto; height: auto; position: static; overflow: visible; overflow-x: auto;
    flex-direction: row; flex-wrap: nowrap; gap: 6px; padding: 0 0 6px; margin-bottom: 14px;
    background: none; border-right: 0;
  }
  :root[data-theme="nebula"] #stream .studio__navbtn { margin: 0; white-space: nowrap; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(var(--hl-rgb), .09); }
  :root[data-theme="nebula"] #stream .studio__navbtn.is-active { box-shadow: inset 0 0 0 1px var(--violet); }
  :root[data-theme="nebula"] #stream .studio__navbtn[data-sp="overview"] { margin-top: 0; }
  :root[data-theme="nebula"] #stream .studio__navfoot {
    order: 7; margin-top: 0; border-top: 0; padding: 0; flex-direction: row; align-items: center; flex-shrink: 0;
  }
  :root[data-theme="nebula"] #stream .studio__body { padding: 0; }
  :root[data-theme="nebula"] #stream .widget-cols { grid-template-columns: 1fr; }
  /* Điều khiển: về 1 cột trên mobile (gỡ grid 2 cột + placement) */
  :root[data-theme="nebula"] #stream #sp-control.is-active { display: flex; flex-direction: column; max-width: none; }
  :root[data-theme="nebula"] #stream #sp-control > .card { grid-column: auto !important; grid-row: auto !important; }
}
