/* ==========================================================================
   Ty云科技 · 控制台统一设计系统 (ty.console.css)
   覆盖：产品管理全分类列表、产品转移、充值中心、账单详情/列表、交易记录、
        发票管理、工单列表、帮助中心、资源下载。
   严格限定在 body[data-ty-console="1"]，支持浅色（暖粉/奶油）与深色（柔粉/梅灰）。
   ========================================================================== */

body[data-ty-console="1"] {
  --tyc-radius: 16px;
  --tyc-radius-md: 12px;
  --tyc-radius-sm: 9px;
  --tyc-pink: var(--pink-main, #e85b97);
  --tyc-pink-hover: var(--pink-main-hover, #d63f80);
  --tyc-pink-dark: var(--pink-dark, #9e2d5d);
  --tyc-pink-soft: rgba(232, 91, 151, 0.09);
  --tyc-pink-border: rgba(232, 91, 151, 0.28);
  --tyc-pink-grad: linear-gradient(135deg, #e85b97, #d63f80);
  --tyc-card-shadow: 0 8px 26px rgba(176, 62, 114, 0.06), 0 1px 3px rgba(16, 18, 21, 0.04);
  --tyc-thead-bg: rgba(232, 91, 151, 0.075);
  --tyc-row-hover: rgba(232, 91, 151, 0.045);
}

html[data-theme="dark"] body[data-ty-console="1"],
:root[data-theme="dark"] body[data-ty-console="1"] {
  --tyc-pink: #df88aa;
  --tyc-pink-hover: #eb9ebb;
  --tyc-pink-dark: #f2b7cf;
  --tyc-pink-soft: rgba(223, 136, 170, 0.13);
  --tyc-pink-border: rgba(223, 136, 170, 0.30);
  --tyc-pink-grad: linear-gradient(135deg, #d86e9c, #be5081);
  --tyc-card-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
  --tyc-thead-bg: rgba(223, 136, 170, 0.08);
  --tyc-row-hover: rgba(223, 136, 170, 0.06);
}

/* =========================
   1. 通用主卡片与排版基础
   ========================= */
body[data-ty-console="1"] .page-content {
  padding-bottom: 44px;
}

body[data-ty-console="1"] .card {
  background: var(--ty-surface) !important;
  border: 1px solid var(--ty-border) !important;
  border-radius: var(--tyc-radius) !important;
  box-shadow: var(--tyc-card-shadow) !important;
  margin-bottom: 20px;
  overflow: visible;
}

body[data-ty-console="1"] .card-body {
  background: transparent !important;
  color: var(--ty-text) !important;
  padding: 20px 22px;
}

body[data-ty-console="1"] .card h3,
body[data-ty-console="1"] .card h4,
body[data-ty-console="1"] .card h5,
body[data-ty-console="1"] .card h6 {
  color: var(--ty-text) !important;
}

body[data-ty-console="1"] .text-black,
body[data-ty-console="1"] .text-dark {
  color: var(--ty-text) !important;
}

body[data-ty-console="1"] .text-black-50,
body[data-ty-console="1"] .text-muted {
  color: var(--ty-text-3) !important;
}

body[data-ty-console="1"] .text-primary {
  color: var(--tyc-pink) !important;
}

body[data-ty-console="1"] a.text-primary:hover {
  color: var(--tyc-pink-hover) !important;
}

body[data-ty-console="1"] hr {
  border-top: 1px solid var(--ty-border) !important;
  opacity: 1;
}

/* =========================
   2. 表单控件 & 按钮统一
   ========================= */
body[data-ty-console="1"] .form-control,
body[data-ty-console="1"] .custom-select,
body[data-ty-console="1"] select.form-control {
  background-color: var(--ty-surface) !important;
  color: var(--ty-text) !important;
  border: 1px solid var(--ty-border-2, var(--ty-border)) !important;
  border-radius: 10px !important;
  min-height: 38px;
  font-size: 13.5px;
  box-shadow: none !important;
  transition: border-color .16s ease, box-shadow .16s ease;
}

body[data-ty-console="1"] .form-control::placeholder {
  color: var(--ty-text-3) !important;
}

body[data-ty-console="1"] .form-control:focus,
body[data-ty-console="1"] .custom-select:focus {
  border-color: var(--tyc-pink) !important;
  box-shadow: 0 0 0 3px rgba(232, 91, 151, 0.16) !important;
  outline: none !important;
}

body[data-ty-console="1"] .btn {
  border-radius: 10px !important;
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .14s ease, filter .16s ease;
}

body[data-ty-console="1"] .btn-primary,
body[data-ty-console="1"] .btn-success.ty-cta-btn {
  background: var(--tyc-pink-grad) !important;
  border: 1px solid transparent !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(214, 63, 128, 0.24) !important;
}

body[data-ty-console="1"] .btn-primary:hover,
body[data-ty-console="1"] .btn-success.ty-cta-btn:hover {
  filter: brightness(1.06);
  color: #ffffff !important;
}

body[data-ty-console="1"] .btn-primary i,
body[data-ty-console="1"] .btn-primary span,
body[data-ty-console="1"] .btn-success.ty-cta-btn i,
body[data-ty-console="1"] .btn-success.ty-cta-btn span {
  color: #ffffff !important;
}

body[data-ty-console="1"] .btn-outline-primary,
body[data-ty-console="1"] .btn-secondary,
body[data-ty-console="1"] .btn-light,
body[data-ty-console="1"] .btn-outline-light {
  background: var(--ty-surface-2) !important;
  border: 1px solid var(--ty-border) !important;
  color: var(--ty-text) !important;
}

body[data-ty-console="1"] .btn-outline-primary:hover:not(:disabled):not(.not-allowed),
body[data-ty-console="1"] .btn-secondary:hover:not(:disabled):not(.not-allowed),
body[data-ty-console="1"] .btn-light:hover,
body[data-ty-console="1"] .btn-outline-light:hover {
  background: var(--tyc-pink-soft) !important;
  border-color: var(--tyc-pink-border) !important;
  color: var(--tyc-pink-dark) !important;
}

/* Bootstrap-select 下拉框统一 */
body[data-ty-console="1"] .bootstrap-select.form-control {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  min-height: 0 !important;
}

body[data-ty-console="1"] .bootstrap-select > .dropdown-toggle {
  background: var(--ty-surface) !important;
  color: var(--ty-text) !important;
  border: 1px solid var(--ty-border-2, var(--ty-border)) !important;
  border-radius: 10px !important;
  min-height: 38px;
  padding: 7px 14px !important;
  font-size: 13.5px;
  font-weight: 500;
}

body[data-ty-console="1"] .bootstrap-select > .dropdown-toggle:hover,
body[data-ty-console="1"] .bootstrap-select.show > .dropdown-toggle {
  border-color: var(--tyc-pink) !important;
}

body[data-ty-console="1"] .bootstrap-select .filter-option-inner-inner {
  color: var(--ty-text) !important;
}

body[data-ty-console="1"] .bootstrap-select > .dropdown-toggle {
  position: relative;
  padding-right: 32px !important;
}
body[data-ty-console="1"] .bootstrap-select > .dropdown-toggle::after {
  content: "" !important;
  display: inline-block !important;
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  width: 7px !important;
  height: 7px !important;
  margin-top: -5px !important;
  border: none !important;
  border-right: 1.8px solid var(--ty-text-2) !important;
  border-bottom: 1.8px solid var(--ty-text-2) !important;
  transform: rotate(45deg) !important;
  pointer-events: none;
  opacity: .85;
}
body[data-ty-console="1"] .bootstrap-select.show > .dropdown-toggle::after {
  margin-top: -2px !important;
  transform: rotate(-135deg) !important;
}

body[data-ty-console="1"] .bootstrap-select .dropdown-menu,
body[data-ty-console="1"] .table-footer .dropdown-menu {
  background: var(--ty-surface) !important;
  border: 1px solid var(--ty-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--ty-shadow) !important;
  padding: 6px !important;
}

body[data-ty-console="1"] .bootstrap-select .dropdown-menu li a,
body[data-ty-console="1"] .table-footer .dropdown-item {
  border-radius: 8px !important;
  padding: 8px 12px !important;
  color: var(--ty-text) !important;
  font-size: 13.5px;
}

body[data-ty-console="1"] .bootstrap-select .dropdown-menu li a:hover,
body[data-ty-console="1"] .bootstrap-select .dropdown-menu li.selected a,
body[data-ty-console="1"] .bootstrap-select .dropdown-menu li.active a,
body[data-ty-console="1"] .table-footer .dropdown-item:hover {
  background: var(--tyc-pink-soft) !important;
  color: var(--tyc-pink-dark) !important;
}

body[data-ty-console="1"] .bootstrap-select .dropdown-menu .check-mark {
  color: var(--tyc-pink) !important;
}

/* =========================
   3. 统一表格工具栏 + 数据表格 + 分页
   （覆盖所有产品列表、账单、交易、发票、工单、转移）
   ========================= */
body[data-ty-console="1"] .table-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body[data-ty-console="1"] .table-header:empty {
  display: none !important;
}
body[data-ty-console="1"] .table-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 16px !important;
  margin-bottom: 0 !important;
  background: var(--ty-surface-2) !important;
  border: 1px solid var(--ty-border) !important;
  border-radius: var(--tyc-radius-md) !important;
  box-shadow: none !important;
}

/* 统一财务 / 列表一体化顶栏（无空工具条，集成切换胶囊与实时筛选） */
.ty-fin-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.ty-fin-kpi {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: var(--tyc-radius);
  box-shadow: var(--tyc-card-shadow);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.ty-fin-kpi-meta {
  min-width: 0;
}
.ty-fin-kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ty-text-3);
  margin-bottom: 6px;
}
.ty-fin-kpi-label i {
  font-size: 15px;
  color: var(--tyc-pink);
}
.ty-fin-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--ty-text);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.ty-fin-kpi-val.is-warn {
  color: var(--tyc-pink);
}
.ty-fin-kpi-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ty-text-2);
}
.ty-fin-kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink-dark) !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .15s ease;
}
.ty-fin-kpi-pill:hover {
  background: var(--tyc-pink);
  border-color: var(--tyc-pink);
  color: #fff !important;
}
.ty-fin-kpi-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ty-ok-bg);
  color: var(--ty-ok);
  border: 1px solid rgba(10, 125, 63, 0.22);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.ty-fin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 16px;
}
.ty-fin-topbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ty-fin-topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.ty-fin-topbar .nav-tabs-custom {
  margin-bottom: 0 !important;
}

.ty-fin-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  border-radius: 11px;
}
.ty-fin-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 13px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ty-text-2) !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: all .15s ease;
  white-space: nowrap;
}
.ty-fin-pill:hover {
  color: var(--ty-text) !important;
  background: rgba(128, 128, 128, 0.08);
}
.ty-fin-pill.is-active {
  background: var(--tyc-pink) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px -4px rgba(217, 67, 130, 0.55);
}

.ty-sub-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  border-radius: 10px;
}
.ty-sub-pill {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  color: var(--ty-text-2) !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .15s ease;
  white-space: nowrap;
}
.ty-sub-pill:hover {
  color: var(--ty-text) !important;
}
.ty-sub-pill.is-active {
  background: var(--ty-surface);
  color: var(--tyc-pink-dark) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ty-live-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 256px;
  max-width: 100%;
  flex: 0 0 256px;
}
.ty-live-search > .bx-search,
.ty-live-search > .bx-search-alt,
.ty-live-search > .ty-ls-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--ty-text-3);
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}
.ty-live-search input.form-control {
  height: 38px !important;
  padding: 0 34px 0 36px !important;
  border-radius: 10px !important;
  background: var(--ty-surface-2) !important;
  border: 1px solid var(--ty-border) !important;
  color: var(--ty-text) !important;
  font-size: 13px !important;
  width: 100%;
}
.ty-live-search input.form-control:focus {
  background: var(--ty-surface) !important;
  border-color: var(--tyc-pink) !important;
  box-shadow: 0 0 0 3px var(--tyc-pink-soft) !important;
}
.ty-live-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ty-text-3);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}
.ty-live-search-clear:hover {
  background: var(--ty-border);
  color: var(--ty-text);
}
.ty-live-search.has-val .ty-live-search-clear {
  display: inline-flex;
}
.ty-live-empty-row td {
  text-align: center !important;
  padding: 36px 16px !important;
  color: var(--ty-text-3) !important;
  font-size: 13.5px;
}

body[data-ty-console="1"] .table-filter {
  margin-bottom: 0 !important;
  flex: 1 1 auto;
  min-width: 220px;
}

body[data-ty-console="1"] .table-filter .row {
  margin: 0;
}

body[data-ty-console="1"] .table-filter .col {
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-ty-console="1"] .table-filter .btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px !important;
}

body[data-ty-console="1"] .table-search {
  flex: 0 1 320px;
  min-width: 220px;
}

body[data-ty-console="1"] .table-search .row {
  margin: 0;
}

body[data-ty-console="1"] .table-search .col-sm-6 {
  flex: 0 0 100%;
  max-width: 100%;
  padding: 0;
}

body[data-ty-console="1"] .search-box,
body[data-ty-console="1"] .search-box .position-relative {
  width: 100%;
  position: relative !important;
}

body[data-ty-console="1"] #searchInp {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 14px 0 38px !important;
  text-align: left !important;
  border-radius: 10px !important;
  background: var(--ty-surface) !important;
  border: 1px solid var(--ty-border-2, var(--ty-border)) !important;
  color: var(--ty-text) !important;
  font-size: 13.5px;
}

body[data-ty-console="1"] #searchIcon.search-icon {
  position: absolute !important;
  left: 12px !important;
  right: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--tyc-pink) !important;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

/* 表格外壳 */
body[data-ty-console="1"] .table-responsive {
  background: var(--ty-surface) !important;
  border: 1px solid var(--ty-border) !important;
  border-radius: var(--tyc-radius-md) !important;
  overflow-x: auto !important;
  box-shadow: none !important;
  min-height: 0 !important;
  scrollbar-width: thin;
  scrollbar-color: var(--ty-border-2) transparent;
}

body[data-ty-console="1"] .table-responsive::-webkit-scrollbar {
  height: 7px;
  width: 7px;
}

body[data-ty-console="1"] .table-responsive::-webkit-scrollbar-thumb {
  background: var(--ty-border-2);
  border-radius: 999px;
}

body[data-ty-console="1"] .table {
  margin-bottom: 0 !important;
  background: transparent !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: var(--ty-text) !important;
  font-size: 13.5px;
}

body[data-ty-console="1"] .table thead,
body[data-ty-console="1"] .table thead.bg-light {
  background: var(--tyc-thead-bg) !important;
}

body[data-ty-console="1"] .table thead th {
  background: var(--tyc-thead-bg) !important;
  color: var(--tyc-pink-dark) !important;
  border-top: none !important;
  border-bottom: 1px solid var(--ty-border) !important;
  font-size: 12.5px;
  font-weight: 700 !important;
  padding: 13px 14px !important;
  white-space: nowrap;
  vertical-align: middle !important;
}

body[data-ty-console="1"] .table thead th .bx-caret-up,
body[data-ty-console="1"] .table thead th .bx-caret-down {
  font-size: 11px;
  line-height: 0.72;
}

body[data-ty-console="1"] .table tbody td {
  background: transparent !important;
  color: var(--ty-text) !important;
  border-top: 1px solid var(--ty-border) !important;
  border-bottom: none !important;
  padding: 13px 14px !important;
  vertical-align: middle !important;
  font-variant-numeric: tabular-nums;
}

body[data-ty-console="1"] .table tbody tr:first-child td {
  border-top: none !important;
}

body[data-ty-console="1"] .table tbody tr:hover td {
  background: var(--tyc-row-hover) !important;
}

body[data-ty-console="1"] .table tfoot td,
body[data-ty-console="1"] .table tfoot th {
  border-top: 1px solid var(--ty-border) !important;
  border-bottom: none !important;
  padding: 13px 14px !important;
}

body[data-ty-console="1"] .table th.checkbox,
body[data-ty-console="1"] .table td:first-child:has(.custom-checkbox) {
  width: 46px;
  text-align: center;
  padding-left: 12px !important;
  padding-right: 6px !important;
}

body[data-ty-console="1"] .table .custom-checkbox {
  margin-bottom: 0 !important;
  min-height: 18px;
  padding-left: 18px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

body[data-ty-console="1"] .table .custom-checkbox .custom-control-label::before,
body[data-ty-console="1"] .table .custom-checkbox .custom-control-label::after {
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
}

body[data-ty-console="1"] .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--tyc-pink) !important;
  border-color: var(--tyc-pink) !important;
}

body[data-ty-console="1"] .table a.text-dark strong {
  color: var(--ty-text) !important;
  font-weight: 700;
  transition: color .15s ease;
}

body[data-ty-console="1"] .table a.text-dark:hover strong {
  color: var(--tyc-pink) !important;
}

/* 语义化状态徽章（浅/深双模式高对比） */
body[data-ty-console="1"] .badge-pill,
body[data-ty-console="1"] .status.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px !important;
  padding: 5px 11px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.15;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

body[data-ty-console="1"] .status-active,
body[data-ty-console="1"] .status-paid {
  background: var(--ty-ok-bg) !important;
  color: var(--ty-ok) !important;
  border-color: rgba(10, 125, 63, 0.24) !important;
}

body[data-ty-console="1"] .status-pending {
  background: var(--ty-warn-bg) !important;
  color: var(--ty-warn) !important;
  border-color: rgba(154, 91, 0, 0.24) !important;
}

body[data-ty-console="1"] .status-suspended,
body[data-ty-console="1"] .status-unpaid {
  background: var(--ty-err-bg) !important;
  color: var(--ty-err) !important;
  border-color: rgba(191, 47, 38, 0.24) !important;
}

body[data-ty-console="1"] .status-deleted,
body[data-ty-console="1"] .status-terminated,
body[data-ty-console="1"] .status-cancelled,
body[data-ty-console="1"] .status-canceled,
body[data-ty-console="1"] .status-refunded,
body[data-ty-console="1"] .status-fraud {
  background: var(--ty-surface-2) !important;
  color: var(--ty-text-2) !important;
  border-color: var(--ty-border) !important;
}

body[data-ty-console="1"] .badge-light {
  background: var(--ty-surface-2) !important;
  color: var(--ty-text) !important;
  border: 1px solid var(--ty-border) !important;
  border-radius: 8px;
  padding: 4px 9px;
  font-weight: 600;
  font-family: var(--ty-mono);
}
html[data-theme="dark"] body[data-ty-console="1"] .badge-light,
html[data-theme="dark"] body[data-ty-console="1"] span.badge.badge-light {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f4edf6 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body[data-ty-console="1"] .badge-light,
  html:not([data-theme="light"]) body[data-ty-console="1"] span.badge.badge-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #f4edf6 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
  }
}

body[data-ty-console="1"] .badge-secondary {
  background: var(--tyc-pink-soft) !important;
  color: var(--tyc-pink-dark) !important;
  border: 1px solid var(--tyc-pink-border) !important;
  border-radius: 8px;
  padding: 5px 10px;
  font-weight: 600;
}

/* 表格操作链接统一为轻量按钮风格 */
body[data-ty-console="1"] .table td a.text-success,
body[data-ty-console="1"] .table td a.text-primary,
body[data-ty-console="1"] .table td a.text-danger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background-color .15s ease, color .15s ease;
}

body[data-ty-console="1"] .table td a.text-success {
  color: var(--ty-text) !important;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
}

body[data-ty-console="1"] .table td a.text-success:hover {
  color: var(--tyc-pink-dark) !important;
  border-color: var(--tyc-pink-border);
  background: var(--tyc-pink-soft);
}

body[data-ty-console="1"] .table td a.text-primary {
  color: var(--tyc-pink-dark) !important;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
}

body[data-ty-console="1"] .table td a.text-primary:hover {
  background: var(--tyc-pink);
  color: #ffffff !important;
}

body[data-ty-console="1"] .table td a.text-danger {
  color: var(--ty-err) !important;
  background: var(--ty-err-bg);
  border: 1px solid rgba(191, 47, 38, 0.22);
}

body[data-ty-console="1"] .table td a.text-danger:hover {
  background: var(--ty-err);
  color: #ffffff !important;
}

/* 底部工具栏 + 分页 */
body[data-ty-console="1"] .table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-top: 4px;
  margin-top: 0 !important;
}

body[data-ty-console="1"] .table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ty-text-2);
}

body[data-ty-console="1"] .table-action-btn,
body[data-ty-console="1"] .table-tools #readBtn,
body[data-ty-console="1"] .table-tools #tyBatchDelBtn,
body[data-ty-console="1"] .table-tools #bulkOperation {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 15px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

body[data-ty-console="1"] .table-tools #tyBatchDelBtn {
  background: rgba(225, 29, 72, 0.06) !important;
  border: 1px solid rgba(225, 29, 72, 0.34) !important;
  color: #e11d48 !important;
  transition: all .16s ease !important;
}

body[data-ty-console="1"] .table-tools #tyBatchDelBtn:hover:not(:disabled) {
  background: #e11d48 !important;
  border-color: #e11d48 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.24) !important;
}

body[data-ty-console="1"] .table-tools #tyBatchDelBtn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

body[data-ty-console="1"] .not-allowed {
  cursor: not-allowed !important;
  opacity: .56 !important;
}

body[data-ty-console="1"] .table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body[data-ty-console="1"] .table-pageinfo {
  font-size: 13px;
  color: var(--ty-text-2);
  display: inline-flex;
  align-items: center;
}

body[data-ty-console="1"] .table-pageinfo select#limitSel {
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  margin: 0 4px;
  border-radius: 8px !important;
  background: var(--ty-surface);
  color: var(--ty-text);
  border: 1px solid var(--ty-border);
  font-size: 13px;
}

body[data-ty-console="1"] .pagination {
  margin-bottom: 0;
  gap: 4px;
}

body[data-ty-console="1"] .pagination .page-link {
  border-radius: 8px !important;
  border: 1px solid var(--ty-border) !important;
  background: var(--ty-surface) !important;
  color: var(--ty-text-2) !important;
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 600;
}

body[data-ty-console="1"] .pagination .page-item.active .page-link {
  background: var(--tyc-pink-grad) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

body[data-ty-console="1"] .pagination .page-item.disabled .page-link {
  opacity: 0.45;
}

/* 空状态美化 */
body[data-ty-console="1"] .no-data {
  padding: 40px 16px;
  text-align: center;
  color: var(--ty-text-3);
}

body[data-ty-console="1"] .no-data .empty img {
  opacity: 0.72;
  filter: grayscale(0.35);
}

body[data-ty-console="1"] .ty-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 44px 16px;
  color: var(--ty-text-3);
}

body[data-ty-console="1"] .ty-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

body[data-ty-console="1"] .ty-empty-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ty-text-2);
  margin: 0;
}

/* 现代化胶囊标签页（交易记录、发票子页等） */
body[data-ty-console="1"] .nav-tabs {
  border-bottom: none !important;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}

body[data-ty-console="1"] .nav-tabs .nav-item {
  margin-bottom: 0;
}

body[data-ty-console="1"] .nav-tabs .nav-link {
  border: none !important;
  border-radius: 9px !important;
  padding: 7px 16px !important;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ty-text-2) !important;
  background: transparent !important;
  transition: background-color .15s ease, color .15s ease;
}

body[data-ty-console="1"] .nav-tabs .nav-link:hover {
  color: var(--ty-text) !important;
  background: var(--ty-surface) !important;
}

body[data-ty-console="1"] .nav-tabs .nav-link.active {
  background: var(--tyc-pink-grad) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(214, 63, 128, 0.24);
}

/* =========================
   4. 账户充值中心 (/addfunds)
   ========================= */
.ty-af-layout,
.ty-kb-layout,
.ty-dl-layout {
  width: 100%;
  justify-items: stretch !important;
}

.ty-af-layout > .card,
.ty-kb-layout > .card,
.ty-dl-layout > .card {
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.ty-af-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.ty-af-balance-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--tyc-pink-soft), var(--ty-surface-2));
  border: 1px solid var(--tyc-pink-border);
  margin-bottom: 24px;
}

.ty-af-bal-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ty-text-2);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ty-af-bal-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--tyc-pink);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.ty-af-bal-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--ty-text-2);
  margin-left: 4px;
}

.ty-af-section {
  margin-bottom: 24px;
}

.ty-af-sec-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ty-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ty-af-sec-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--ty-text-3);
}

.ty-af-presets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ty-af-preset-btn {
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
  color: var(--ty-text);
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all .15s ease;
}

.ty-af-preset-btn:hover {
  border-color: var(--tyc-pink-border);
  background: var(--tyc-pink-soft);
  color: var(--tyc-pink-dark);
}

.ty-af-preset-btn.is-active {
  background: var(--tyc-pink-grad);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(214, 63, 128, 0.25);
}

.ty-af-amount-wrap {
  display: flex;
  align-items: center;
  background: var(--ty-surface);
  border: 1.5px solid var(--ty-border-2, var(--ty-border));
  border-radius: 12px;
  padding: 0 14px;
  height: 48px;
  max-width: 340px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.ty-af-amount-wrap:focus-within {
  border-color: var(--tyc-pink);
  box-shadow: 0 0 0 3px rgba(232, 91, 151, 0.16);
}

.ty-af-currency {
  font-size: 18px;
  font-weight: 800;
  color: var(--tyc-pink);
  margin-right: 8px;
}

.ty-af-amount-wrap input#addfundsInp {
  flex: 1 1 auto;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 100%;
  min-height: 0;
  padding: 0 !important;
  font-size: 20px;
  font-weight: 800;
  color: var(--ty-text) !important;
  font-variant-numeric: tabular-nums;
  text-align: left !important;
}

.ty-af-suffix {
  font-size: 13px;
  font-weight: 600;
  color: var(--ty-text-3);
  margin-left: 8px;
}

/* 支付方式卡片网格（替换旧蓝色选中态为品牌玫红） */
.ty-af-gateways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ty-af-gateways .addfunds {
  padding: 0;
  margin: 0;
}

.ty-af-gateways .addfunds-payment {
  position: relative;
  min-height: 58px;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  border: 1.5px solid var(--ty-border) !important;
  background: var(--ty-surface) !important;
  color: var(--ty-text) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 !important;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .14s ease;
}

.ty-af-gateways .addfunds-payment:hover {
  border-color: var(--tyc-pink-border) !important;
  background: var(--ty-surface-2) !important;
  transform: translateY(-1px);
}

.ty-af-gateways .addfunds-payment.active {
  border-color: var(--tyc-pink) !important;
  background: var(--tyc-pink-soft) !important;
  box-shadow: 0 0 0 2px rgba(232, 91, 151, 0.14) !important;
}

.ty-af-gateways .addfunds-payment.active::after {
  content: "✓";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 20px;
  height: 20px;
  border-radius: 0 11px 0 9px;
  background: var(--tyc-pink);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ty-af-gateways .addfunds-payment img {
  max-height: 26px !important;
  height: auto !important;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

html[data-theme="dark"] .ty-af-gateways .addfunds-payment img,
:root[data-theme="dark"] .ty-af-gateways .addfunds-payment img {
  background: rgba(255, 255, 255, 0.93);
  padding: 4px 10px;
  border-radius: 7px;
  max-height: 32px !important;
}

.ty-af-submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ty-af-submit-row .pay-now-btn {
  min-width: 180px;
  height: 46px;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ty-af-side-card .ty-af-guide-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ty-text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ty-af-side-card .ty-af-guide-title i {
  color: var(--tyc-pink);
  font-size: 18px;
}

.ty-af-guide-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ty-af-guide-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ty-text-2);
}

.ty-af-guide-num {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--tyc-pink-soft);
  color: var(--tyc-pink-dark);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* =========================
   5. 账单详情页 (/viewbilling)
   ========================= */
.ty-bill-wrap {
  max-width: 980px;
  margin: 0 auto;
}

.ty-bill-box {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: var(--ty-surface);
  color: var(--ty-text);
  border: 1px solid var(--ty-border);
  border-radius: 18px;
  box-shadow: var(--tyc-card-shadow);
  padding: 0;
  font-size: 13.5px;
}
.ty-bill-box::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--tyc-pink) 0%, #f18ab6 55%, #f6b5cf 100%);
}

.ty-bill-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 24px;
  padding: 24px 32px;
  background: linear-gradient(135deg, var(--tyc-pink-soft) 0%, transparent 65%);
  border-bottom: 1px solid var(--ty-border);
}

.ty-bill-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ty-bill-brand .head-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.ty-bill-brand-divider {
  width: 1px;
  height: 28px;
  background: var(--ty-border);
}

.ty-bill-brand-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ty-bill-doc-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ty-text-3);
}

.ty-bill-id-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ty-text);
  font-family: var(--ty-mono);
  cursor: pointer;
  transition: all .15s ease;
}
.ty-bill-id-tag:hover {
  border-color: var(--tyc-pink-border);
  color: var(--tyc-pink);
}
.ty-bill-id-tag i {
  font-size: 13px;
  color: var(--ty-text-3);
}

.ty-bill-status-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ty-bill-hero-amt-wrap {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.ty-bill-hero-amt-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ty-text-3);
}
.ty-bill-hero-amt {
  font-size: 27px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ty-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.ty-bill-hero-amt.is-unpaid {
  color: var(--tyc-pink);
}

.ty-bill-body {
  padding: 24px 32px 26px;
}

.ty-bill-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.ty-bill-status-pill .ty-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.ty-bill-status-pill.is-paid {
  background: var(--ty-ok-bg);
  color: var(--ty-ok);
  border: 1px solid rgba(10, 125, 63, 0.26);
}

.ty-bill-status-pill.is-unpaid {
  background: var(--ty-err-bg);
  color: var(--ty-err);
  border: 1px solid rgba(191, 47, 38, 0.26);
}

.ty-bill-status-pill.is-muted {
  background: var(--ty-surface-2);
  color: var(--ty-text-2);
  border: 1px solid var(--ty-border);
}

.ty-bill-pay-btn {
  height: 40px;
  padding: 0 22px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ty-bill-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ty-bill-meta-card {
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  border-radius: 13px;
  padding: 15px 18px;
}

.ty-bill-meta-card .ty-bm-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ty-text-3);
  margin-bottom: 10px;
}

.ty-bill-meta-card .ty-bm-title i {
  color: var(--tyc-pink);
  font-size: 15px;
}

.ty-bill-kv {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ty-bill-kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.ty-bill-kv-k {
  color: var(--ty-text-3);
  flex-shrink: 0;
}
.ty-bill-kv-v {
  color: var(--ty-text);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.ty-bill-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ty-bill-sec-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ty-text);
}
.ty-bill-sec-title i {
  color: var(--tyc-pink);
  font-size: 16px;
}
.ty-bill-sec-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--ty-text-3);
}

.ty-bill-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--tyc-pink-soft);
  color: var(--tyc-pink-dark);
  border: 1px solid var(--tyc-pink-border);
  white-space: nowrap;
}

.ty-copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text);
  font-family: var(--ty-mono);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.ty-copy-chip:hover {
  border-color: var(--tyc-pink-border);
  color: var(--tyc-pink);
}
.ty-copy-chip i {
  font-size: 13px;
  color: var(--ty-text-3);
}

.ty-bill-total-row td {
  background: var(--ty-surface-2) !important;
  font-weight: 700 !important;
  padding-top: 15px !important;
  padding-bottom: 15px !important;
}

.ty-bill-total-amt {
  font-size: 21px;
  font-weight: 800;
  color: var(--tyc-pink);
  font-variant-numeric: tabular-nums;
}

.ty-bill-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--ty-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ty-bill-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ty-bill-footer .btn,
.ty-bill-actions .btn {
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =========================
   6. 帮助中心 (/knowledgebase & view)
   ========================= */
.ty-kb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: start;
}

.ty-kb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.ty-kb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  text-decoration: none !important;
  transition: border-color .16s ease, background-color .16s ease, transform .14s ease;
}

.ty-kb-item:hover {
  border-color: var(--tyc-pink-border);
  background: var(--tyc-pink-soft);
  transform: translateY(-1px);
}

.ty-kb-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ty-kb-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  color: var(--tyc-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

.ty-kb-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ty-text);
  margin: 0 0 4px;
  line-height: 1.4;
}

.ty-kb-item:hover .ty-kb-title {
  color: var(--tyc-pink-dark);
}

.ty-kb-meta {
  font-size: 12px;
  color: var(--ty-text-3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.ty-kb-arrow {
  color: var(--ty-text-3);
  font-size: 19px;
  flex-shrink: 0;
  transition: transform .16s ease, color .16s ease;
}

.ty-kb-item:hover .ty-kb-arrow {
  color: var(--tyc-pink);
  transform: translateX(3px);
}

.ty-kb-side-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ty-text-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ty-kb-cate-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ty-kb-cate-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ty-surface-2);
  border: 1px solid transparent;
  color: var(--ty-text) !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .15s ease;
}

.ty-kb-cate-link:hover,
.ty-kb-cate-link.is-active {
  background: var(--tyc-pink-soft);
  border-color: var(--tyc-pink-border);
  color: var(--tyc-pink-dark) !important;
}

.ty-kb-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-2);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ty-kb-article {
  max-width: 860px;
  margin: 0 auto;
}

.ty-kb-article-body {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ty-text);
  word-break: break-word;
}

.ty-kb-article-body img {
  max-width: 100%;
  height: auto !important;
  border-radius: 10px;
  border: 1px solid var(--ty-border);
}

.ty-kb-article-body a {
  color: var(--tyc-pink);
  text-decoration: underline;
}

/* =========================
   7. 资源下载 (/downloads)
   ========================= */
.ty-dl-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.ty-dl-file-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ty-dl-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.ty-dl-file-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ty-text) !important;
  text-decoration: none !important;
}

.ty-dl-file-name:hover {
  color: var(--tyc-pink) !important;
}

.ty-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* =========================
   8. 发票详情/申请表格 <pre> 清理
   ========================= */
body[data-ty-console="1"] .table pre {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ty-text);
  background: transparent;
  border: none;
  white-space: pre-wrap;
  word-break: break-word;
}

/* =========================
   9. 产品转移子页卡片 + 电源状态点 + 统一弹窗
   ========================= */
.ty-divert-form-card {
  max-width: 560px;
  margin: 12px auto;
}

body[data-ty-console="1"] .dots {
  cursor: pointer;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ty-surface);
  position: absolute;
  top: 8px;
  left: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}
body[data-ty-console="1"] .on_color { background-color: #22c55e; }
body[data-ty-console="1"] .ing_color { background-color: #eab308; }
body[data-ty-console="1"] .off_color { background-color: #e85b97; }
body[data-ty-console="1"] .unknown_color { background-color: #9ca3af; }
body[data-ty-console="1"] .error_color { background-color: #ef4444; }
body[data-ty-console="1"] .not_support_color { background-color: #6b7280; }

body[data-ty-console="1"] .modal-content {
  background: var(--ty-surface) !important;
  color: var(--ty-text) !important;
  border: 1px solid var(--ty-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--ty-shadow) !important;
  overflow: hidden;
}
body[data-ty-console="1"] .modal-header {
  background: var(--ty-surface) !important;
  border-bottom: 1px solid var(--ty-border) !important;
}
body[data-ty-console="1"] .modal-title {
  color: var(--ty-text) !important;
  font-weight: 700 !important;
}
body[data-ty-console="1"] .modal-body,
body[data-ty-console="1"] .modal-footer {
  background: var(--ty-surface) !important;
  border-color: var(--ty-border) !important;
}
body[data-ty-console="1"] .modal .close {
  color: var(--ty-text-2) !important;
  text-shadow: none !important;
}

/* =========================
   10. 公告中心 (/news, /newsview)
   ========================= */
.ty-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-news-head-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ty-text);
}
.ty-news-head-title i {
  color: var(--tyc-pink);
  font-size: 18px;
}
.ty-news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.ty-news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 13px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  text-decoration: none !important;
  transition: border-color .16s ease, background-color .16s ease, transform .14s ease;
}
.ty-news-item:hover {
  border-color: var(--tyc-pink-border);
  background: var(--tyc-pink-soft);
  transform: translateY(-1px);
}
.ty-news-item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.ty-news-date {
  width: 56px;
  height: 52px;
  border-radius: 11px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.ty-news-date-md {
  font-size: 14px;
  font-weight: 800;
  color: var(--tyc-pink);
  line-height: 1.15;
}
.ty-news-date-yr {
  font-size: 11px;
  font-weight: 600;
  color: var(--ty-text-3);
  line-height: 1.2;
  margin-top: 2px;
}
.ty-news-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ty-text);
  line-height: 1.45;
  margin: 0 0 3px;
  word-break: break-word;
}
.ty-news-item:hover .ty-news-title {
  color: var(--tyc-pink-dark);
}
.ty-news-time {
  font-size: 12px;
  color: var(--ty-text-3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.ty-news-article-head {
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-news-article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.ty-news-article-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ty-text);
  line-height: 1.4;
  margin: 0 0 10px;
}
.ty-news-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ty-text-3);
}
.ty-news-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--ty-border);
}
.ty-news-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink-dark);
}
.ty-news-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--ty-border);
}
.ty-news-nav-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  text-decoration: none !important;
  transition: all .15s ease;
}
.ty-news-nav-card:hover {
  border-color: var(--tyc-pink-border);
  background: var(--tyc-pink-soft);
}
.ty-news-nav-card.is-next {
  text-align: right;
  align-items: flex-end;
}
.ty-news-nav-dir {
  font-size: 12px;
  font-weight: 600;
  color: var(--ty-text-3);
}
.ty-news-nav-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ty-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* =========================
   11. 推广赚钱 (/affiliates)
   ========================= */
.ty-aff-top {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}
.ty-aff-hero {
  position: relative;
  border-radius: 16px;
  padding: 24px 24px 22px;
  background: linear-gradient(135deg, #ec4899 0%, #db2777 56%, #be185d 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 32px rgba(219, 39, 119, 0.22);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.ty-aff-hero::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -36px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.ty-aff-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.ty-aff-hero-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88) !important;
}
.ty-aff-notice-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease;
}
.ty-aff-notice-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}
.ty-aff-bal {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}
.ty-aff-bal small {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.88;
  margin-left: 4px;
}
.ty-aff-submetrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
  z-index: 1;
}
.ty-aff-sub-k {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8) !important;
}
.ty-aff-sub-v {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff !important;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.ty-aff-hero-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.ty-aff-min-tip {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82) !important;
}
.ty-aff-withdraw-btn {
  background: #ffffff !important;
  color: #be185d !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 8px 18px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14) !important;
}
.ty-aff-withdraw-btn:hover:not(:disabled) {
  background: #fff5f9 !important;
  color: #9d174d !important;
}
.ty-aff-withdraw-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.ty-aff-right-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ty-aff-link-box {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--ty-shadow-sm);
}
.ty-aff-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.ty-aff-link-input {
  flex: 1 1 auto;
  height: 42px !important;
  font-family: var(--ty-mono);
  font-size: 13.5px !important;
  background: var(--ty-surface-2) !important;
}
.ty-aff-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  flex: 1 1 auto;
}
.ty-aff-stat-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--ty-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ty-aff-stat-k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ty-text-3);
}
.ty-aff-stat-k i {
  color: var(--tyc-pink);
  font-size: 16px;
}
.ty-aff-stat-v {
  font-size: 26px;
  font-weight: 800;
  color: var(--ty-text);
  font-variant-numeric: tabular-nums;
  margin-top: 10px;
  line-height: 1.1;
}
.ty-aff-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.ty-aff-rule-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--ty-shadow-sm);
}
.ty-aff-rule-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ty-text);
  margin-bottom: 4px;
}
.ty-aff-rule-desc {
  font-size: 12.5px;
  color: var(--ty-text-3);
  line-height: 1.45;
}
.ty-aff-rate-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink-dark);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
.ty-aff-notice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ty-aff-notice-item {
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ty-text);
}
.ty-aff-notice-item.is-highlight {
  background: var(--tyc-pink-soft);
  border-color: var(--tyc-pink-border);
}
.ty-aff-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 28px;
}
.ty-aff-step-card {
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
}
.ty-aff-step-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 12px;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* =========================
   12. 账户管理 (个人信息 / 实名认证 / 安全中心 / 消息 / 日志 / API)
   ========================= */
.ty-acc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--tyc-pink-soft) 0%, var(--ty-surface) 70%);
  border: 1px solid var(--ty-border);
  border-radius: 16px;
  margin-bottom: 18px;
  box-shadow: var(--ty-shadow-sm);
}
.ty-acc-banner-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.ty-acc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.24);
}
.ty-acc-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ty-text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ty-acc-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ty-text-2);
}
.ty-acc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ty-acc-meta i {
  color: var(--tyc-pink);
  font-size: 15px;
}
.ty-acc-section {
  padding: 22px 26px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-acc-section:last-child {
  border-bottom: none;
}
.ty-acc-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ty-text);
  margin-bottom: 16px;
}
.ty-acc-sec-title i {
  color: var(--tyc-pink);
  font-size: 18px;
}
.ty-acc-check-card {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
}
.ty-acc-footer {
  padding: 18px 26px;
  background: var(--ty-surface-2);
  border-top: 1px solid var(--ty-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* 安全中心 */
.ty-sec-progress {
  width: 180px;
  height: 8px;
  border-radius: 999px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  overflow: hidden;
}
.ty-sec-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #db2777 0%, #ec4899 55%, #fb7185 100%);
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.28);
  transition: width .3s ease;
}
.ty-sec-list {
  display: flex;
  flex-direction: column;
}
.ty-sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-sec-row:first-child {
  padding-top: 4px;
}
.ty-sec-row:last-child {
  padding-bottom: 4px;
  border-bottom: none;
}
.ty-sec-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.ty-sec-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.ty-sec-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ty-text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 3px;
}
.ty-sec-desc {
  font-size: 12.5px;
  color: var(--ty-text-3);
  line-height: 1.5;
}
.ty-sec-btn {
  flex-shrink: 0;
  min-width: 96px;
}
.ty-sec-side-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* 实名认证 */
.ty-ver-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 820px;
  margin: 24px auto 8px;
}
.ty-ver-type-card {
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .16s ease, transform .14s ease, box-shadow .16s ease;
}
.ty-ver-type-card:hover {
  border-color: var(--tyc-pink-border);
  transform: translateY(-2px);
  box-shadow: var(--ty-shadow);
}
.ty-ver-ico {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 16px;
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}
.ty-ver-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.ty-ver-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ty-text-2);
}
.ty-ver-features i {
  color: #10b981;
  font-size: 15px;
}
.ty-ver-form-wrap {
  max-width: 680px;
  margin: 0 auto;
}
.ty-ver-status-wrap {
  max-width: 540px;
  margin: 12px auto;
  text-align: center;
}
.ty-ver-qr-frame {
  display: inline-flex;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--ty-border);
  box-shadow: var(--ty-shadow-sm);
}
.ty-ver-explain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  font-size: 12.5px;
  color: var(--ty-text-2);
}
.ty-ver-explain img {
  max-height: 76px;
  border-radius: 8px;
  border: 1px solid var(--ty-border);
}

/* API 管理 */
.ty-api-onboard {
  max-width: 620px;
  margin: 16px auto;
  padding: 36px 28px;
  border-radius: 16px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  text-align: center;
}
.ty-api-kpis {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.ty-api-card {
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ty-api-key-val {
  font-family: var(--ty-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ty-text);
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
}
.ty-api-stat-v {
  font-size: 26px;
  font-weight: 800;
  color: var(--ty-text);
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  line-height: 1.15;
}
.ty-api-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 11, 20, 0.52);
  backdrop-filter: blur(4px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ty-api-lock-box {
  max-width: 420px;
  width: 100%;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: var(--ty-shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ty-text);
}

/* 消息中心 / 日志页辅助 */
.ty-msg-unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tyc-pink);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px var(--tyc-pink-soft);
}
.ty-msg-title-link {
  font-weight: 600;
  color: var(--ty-text);
  cursor: pointer;
  transition: color .14s ease;
}
.ty-msg-title-link:hover {
  color: var(--tyc-pink);
}
.ty-msg-batch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ty-border);
}
.ty-ip-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  font-family: var(--ty-mono);
  font-size: 12.5px;
  color: var(--ty-text-2);
}

/* =========================
   13. 工单回复页 (/viewticket)
   ========================= */
.ty-tk-header {
  position: relative;
  overflow: hidden;
  border-radius: 16px !important;
  margin-bottom: 18px !important;
}
.ty-tk-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ec4899 0%, #f472b6 55%, #db2777 100%);
}
.ty-tk-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-tk-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ty-tk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}
.ty-tk-tid {
  font-family: var(--ty-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ty-text-3);
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
}
.ty-tk-subject {
  font-size: 17px;
  font-weight: 800;
  color: var(--ty-text);
  margin: 0;
  word-break: break-word;
}
.ty-tk-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ty-tk-meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 13px 24px;
  background: var(--ty-surface-2);
  font-size: 13px;
  color: var(--ty-text-2);
}
.ty-tk-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ty-tk-meta-item i {
  color: var(--tyc-pink);
  font-size: 15px;
}
.ty-tk-meta-item strong {
  color: var(--ty-text);
  font-weight: 600;
}
.ty-tk-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}
.ty-tk-msg {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 15px;
  box-shadow: var(--ty-shadow-sm);
  overflow: hidden;
}
.ty-tk-msg.is-admin {
  border-left: 3.5px solid var(--tyc-pink);
}
.ty-tk-msg.is-user {
  border-left: 3.5px solid #10b981;
}
.ty-tk-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 20px;
  background: var(--ty-surface-2);
  border-bottom: 1px solid var(--ty-border);
}
.ty-tk-msg.is-admin .ty-tk-msg-head {
  background: linear-gradient(90deg, var(--tyc-pink-soft) 0%, var(--ty-surface-2) 65%);
}
.ty-tk-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ty-tk-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ty-tk-msg.is-admin .ty-tk-avatar {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
}
.ty-tk-msg.is-user .ty-tk-avatar {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}
.ty-tk-author-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ty-text);
}
.ty-tk-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.ty-tk-msg.is-admin .ty-tk-role-pill {
  background: var(--tyc-pink-soft);
  border: 1px solid var(--tyc-pink-border);
  color: var(--tyc-pink-dark);
}
.ty-tk-msg.is-user .ty-tk-role-pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #059669;
}
html[data-theme="dark"] .ty-tk-msg.is-user .ty-tk-role-pill {
  color: #6ee7b7;
}
.ty-tk-msg-time {
  font-size: 12.5px;
  color: var(--ty-text-3);
  font-variant-numeric: tabular-nums;
}
.ty-tk-msg-body {
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ty-text);
  word-break: break-word;
}
.ty-tk-msg-body p:last-child {
  margin-bottom: 0;
}
.ty-tk-msg-body img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--ty-border);
  margin: 6px 0;
}
.ty-tk-att-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--ty-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ty-tk-att-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text) !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .14s ease;
}
.ty-tk-att-chip:hover {
  border-color: var(--tyc-pink-border);
  color: var(--tyc-pink) !important;
}
.ty-tk-rating-bar {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--ty-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ty-text-3);
}
.ty-tk-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  margin-bottom: 8px;
}
.ty-tk-file-row input[type="file"] {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  color: var(--ty-text-2);
}
.ty-tk-reply-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--ty-border);
}

/* Summernote 深浅色适配 */
body[data-ty-console="1"] .note-editor.note-frame {
  border: 1px solid var(--ty-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: var(--ty-surface) !important;
}
body[data-ty-console="1"] .note-toolbar {
  background: var(--ty-surface-2) !important;
  border-bottom: 1px solid var(--ty-border) !important;
}
body[data-ty-console="1"] .note-toolbar .note-btn {
  background: var(--ty-surface) !important;
  border-color: var(--ty-border) !important;
  color: var(--ty-text-2) !important;
}
body[data-ty-console="1"] .note-editing-area .note-editable {
  background: var(--ty-surface) !important;
  color: var(--ty-text) !important;
}
body[data-ty-console="1"] .note-statusbar {
  background: var(--ty-surface-2) !important;
  border-top: 1px solid var(--ty-border) !important;
}

/* =========================
   14. 响应式适配
   ========================= */
@media (max-width: 991.98px) {
  .ty-af-layout,
  .ty-kb-layout,
  .ty-dl-layout,
  .ty-aff-top,
  .ty-api-kpis {
    grid-template-columns: 1fr;
  }
  .ty-af-presets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ty-bill-meta,
  .ty-fin-kpis,
  .ty-aff-stats-grid,
  .ty-aff-steps,
  .ty-ver-grid,
  .ty-news-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  body[data-ty-console="1"] .card-body {
    padding: 16px;
  }
  .ty-bill-hero {
    padding: 18px 16px;
  }
  .ty-bill-body {
    padding: 18px 16px 20px;
  }
  .ty-bill-hero-amt-wrap {
    align-items: flex-start;
    text-align: left;
  }
  .ty-fin-topbar-right {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .ty-live-search {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
  }
  .ty-af-gateways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ty-af-bal-value {
    font-size: 25px;
  }
  body[data-ty-console="1"] .table-header {
    padding: 12px !important;
  }
  body[data-ty-console="1"] .table-search {
    flex: 1 1 100%;
    min-width: 0;
  }
  body[data-ty-console="1"] .table-footer {
    flex-direction: column;
    align-items: stretch;
  }
  body[data-ty-console="1"] .table-pagination {
    justify-content: space-between;
  }
}

/* ==========================================================================
   v6.0 · 全局精修弹窗 + 全量检索示例条 + 个人中心2栏重构 + API密钥卡 + 公告标签 + 工单系统
   ========================================================================== */

/* --- 2. 财务全量检索栏 + 示例提示胶囊 --- */
.ty-db-search-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ty-search-hints {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ty-search-hints-label {
  font-size: 12px;
  color: var(--ty-text-3);
  white-space: nowrap;
}
.ty-hint-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ty-text-2);
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none !important;
  white-space: nowrap;
}
.ty-hint-chip:hover {
  color: var(--tyc-pink-dark);
  border-color: rgba(214, 71, 130, 0.42);
  background: var(--tyc-pink-soft);
}
.ty-db-search-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ty-db-search-form .ty-live-search {
  width: 280px;
  flex: 0 0 280px;
}
.ty-db-search-btn {
  height: 38px !important;
  padding: 0 15px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ty-search-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--tyc-pink-soft);
  border: 1px solid rgba(214, 71, 130, 0.24);
  font-size: 13px;
  color: var(--ty-text);
}
.ty-search-banner strong {
  color: var(--tyc-pink-dark);
}
.ty-search-banner-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-2) !important;
  text-decoration: none !important;
}
.ty-search-banner-clear:hover {
  color: var(--tyc-pink-dark) !important;
  border-color: var(--tyc-pink);
}

/* --- 3. 个人中心 (/details) 精致双栏重构 --- */
.ty-prof-wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.ty-prof-rail {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ty-prof-id-card {
  border-radius: 16px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface);
  overflow: hidden;
  box-shadow: var(--ty-shadow-sm);
}
.ty-prof-banner {
  height: 54px;
  background: linear-gradient(135deg, rgba(214, 71, 130, 0.16) 0%, rgba(168, 56, 102, 0.06) 100%);
  border-bottom: 1px solid var(--ty-border);
}
html[data-theme="dark"] .ty-prof-banner {
  background: linear-gradient(135deg, rgba(223, 120, 162, 0.22) 0%, rgba(120, 62, 108, 0.08) 100%);
}
.ty-prof-id-body {
  padding: 0 18px 18px;
  margin-top: -26px;
}
.ty-prof-avatar {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, #c9487a 0%, #9f305c 100%);
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ty-surface);
  box-shadow: 0 6px 16px rgba(171, 68, 104, 0.24);
}
.ty-prof-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.ty-prof-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ty-text);
  margin: 0;
}
.ty-prof-group-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--tyc-pink-soft);
  color: var(--tyc-pink-dark);
}
.ty-prof-bind-list {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ty-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ty-prof-bind-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}
.ty-prof-bind-l {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ty-text-2);
}
.ty-prof-bind-l i {
  font-size: 15px;
  color: var(--ty-text-3);
  flex-shrink: 0;
}
.ty-prof-bind-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ty-text);
  font-weight: 500;
}
.ty-prof-bind-act {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tyc-pink-dark) !important;
  text-decoration: none !important;
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--tyc-pink-soft);
}
.ty-prof-bind-act:hover {
  filter: brightness(0.95);
}
.ty-prof-nav-card {
  border-radius: 16px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface);
  padding: 8px;
  box-shadow: var(--ty-shadow-sm);
}
.ty-prof-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--ty-text-2) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .15s ease;
}
.ty-prof-nav-link:hover {
  background: var(--ty-surface-2);
  color: var(--ty-text) !important;
}
.ty-prof-nav-link-l {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.ty-prof-nav-link-l i {
  font-size: 16px;
  color: var(--tyc-pink-dark);
}
.ty-prof-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ty-prof-section {
  border-radius: 16px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface);
  box-shadow: var(--ty-shadow-sm);
  overflow: hidden;
}
.ty-prof-sec-head {
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--ty-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ty-prof-sec-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ty-text);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ty-prof-sec-title i {
  color: var(--tyc-pink-dark);
  font-size: 16px;
}
.ty-prof-sec-sub {
  font-size: 12px;
  color: var(--ty-text-3);
}
.ty-prof-sec-body {
  padding: 18px 20px;
}
.ty-prof-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.ty-prof-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}
.ty-prof-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ty-text-2);
  margin-bottom: 6px;
}
.ty-prof-field .form-control,
.ty-prof-field select.form-control {
  height: 38px !important;
  border-radius: 9px !important;
  font-size: 13.5px !important;
  padding: 0 12px !important;
  background: var(--ty-surface-2) !important;
  border: 1px solid var(--ty-border) !important;
  color: var(--ty-text) !important;
}
.ty-prof-field .form-control:focus {
  background: var(--ty-surface) !important;
  border-color: var(--tyc-pink) !important;
  box-shadow: 0 0 0 3px var(--tyc-pink-soft) !important;
}
.ty-prof-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
}
.ty-prof-switch-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ty-text);
}
.ty-prof-switch-desc {
  font-size: 12px;
  color: var(--ty-text-3);
  margin-top: 2px;
}
.ty-ios-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}
.ty-ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ty-ios-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--ty-border-2, #cfc6ce);
  transition: background .2s ease;
}
.ty-ios-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform .2s ease;
}
.ty-ios-switch input:checked + .ty-ios-slider {
  background: linear-gradient(135deg, #c9487a, #a93260);
}
.ty-ios-switch input:checked + .ty-ios-slider::before {
  transform: translateX(20px);
}
.ty-prof-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
}

/* --- 4. API 管理 (/apimanage) 全新密钥英雄卡 + 统一按钮 --- */
.ty-api-hero {
  border-radius: 16px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface);
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: var(--ty-shadow-sm);
}
.ty-api-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ty-api-hero-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ty-text);
}
.ty-api-hero-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--tyc-pink-soft);
  color: var(--tyc-pink-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.ty-api-status-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}
.ty-api-hero-time {
  font-size: 12.5px;
  color: var(--ty-text-3);
}
.ty-api-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
}
.ty-api-key-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  min-width: 0;
}
.ty-api-key-code {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ty-text);
  letter-spacing: 0.02em;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ty-api-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ty-api-btn {
  height: 36px !important;
  padding: 0 14px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease !important;
  line-height: 1 !important;
}
.ty-api-btn-copy {
  background: var(--ty-surface) !important;
  border: 1px solid var(--ty-border-2, var(--ty-border)) !important;
  color: var(--ty-text) !important;
}
.ty-api-btn-copy:hover {
  border-color: var(--tyc-pink) !important;
  color: var(--tyc-pink-dark) !important;
  background: var(--tyc-pink-soft) !important;
}
.ty-api-btn-primary {
  background: linear-gradient(135deg, #c9487a 0%, #a93260 100%) !important;
  border: 1px solid transparent !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(171, 68, 104, 0.24) !important;
}
.ty-api-btn-primary:hover {
  filter: brightness(1.06);
}
.ty-api-btn-ghost {
  background: var(--ty-surface) !important;
  border: 1px solid var(--ty-border-2, var(--ty-border)) !important;
  color: var(--ty-text-2) !important;
}
.ty-api-btn-ghost:hover {
  color: var(--ty-text) !important;
  border-color: var(--ty-text-3) !important;
}
.ty-api-btn-danger {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1px solid rgba(239, 68, 68, 0.28) !important;
  color: #dc2626 !important;
}
html[data-theme="dark"] .ty-api-btn-danger {
  background: rgba(248, 113, 113, 0.12) !important;
  border-color: rgba(248, 113, 113, 0.32) !important;
  color: #fca5a5 !important;
}
.ty-api-btn-danger:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.48) !important;
}
.ty-api-kpi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

/* --- 5. 公告中心标签与热门标签云 --- */
.ty-news-meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.ty-news-cat-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--tyc-pink-soft);
  color: var(--tyc-pink-dark);
}
.ty-news-tag-pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-2);
}
.ty-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ty-tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-2) !important;
  text-decoration: none !important;
  transition: all .15s ease;
}
.ty-tag-cloud-item:hover,
.ty-tag-cloud-item.is-active {
  background: var(--tyc-pink-soft);
  border-color: rgba(214, 71, 130, 0.45);
  color: var(--tyc-pink-dark) !important;
}

/* --- 6. 提交工单与工单列表重构 (.ty-tkt-*) --- */
.ty-tkt-composer {
  max-width: 860px;
  margin: 0 auto;
}
.ty-tkt-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
}
.ty-tkt-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ty-text-3);
}
.ty-tkt-step.is-active {
  color: var(--ty-text);
}
.ty-tkt-step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-3);
}
.ty-tkt-step.is-active .ty-tkt-step-num {
  background: linear-gradient(135deg, #c9487a, #a93260);
  border-color: transparent;
  color: #fff;
}
.ty-tkt-step.is-done .ty-tkt-step-num {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}
.ty-tkt-step-sep {
  flex: 1;
  height: 1px;
  background: var(--ty-border);
  max-width: 60px;
}
.ty-tkt-dept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ty-tkt-dept-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
  text-decoration: none !important;
  transition: all .18s ease;
}
.ty-tkt-dept-card:hover {
  border-color: rgba(214, 71, 130, 0.45);
  background: var(--tyc-pink-soft);
  transform: translateY(-2px);
}
.ty-tkt-dept-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(214, 71, 130, 0.16), rgba(168, 56, 102, 0.08));
  color: var(--tyc-pink-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ty-tkt-dept-info {
  flex: 1;
  min-width: 0;
}
.ty-tkt-dept-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ty-text);
}
.ty-tkt-dept-sub {
  font-size: 12.5px;
  color: var(--ty-text-3);
  margin-top: 2px;
}
.ty-tkt-kb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ty-tkt-kb-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ty-text-2) !important;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  text-decoration: none !important;
  transition: all .15s ease;
}
.ty-tkt-kb-chip:hover {
  color: var(--tyc-pink-dark) !important;
  border-color: rgba(214, 71, 130, 0.4);
  background: var(--tyc-pink-soft);
}

@media (max-width: 991.98px) {
  .ty-prof-wrap {
    grid-template-columns: 1fr;
  }
  .ty-prof-rail {
    position: static;
  }
  .ty-api-kpi-grid-3 {
    grid-template-columns: 1fr;
  }
  .ty-tkt-dept-grid {
    grid-template-columns: 1fr;
  }
  .ty-prof-grid-2,
  .ty-prof-grid-3 {
    grid-template-columns: 1fr;
  }
  .ty-db-search-form .ty-live-search {
    width: 100%;
    flex: 1 1 180px;
  }
}

@media print {
  body[data-ty-console="1"] #page-topbar,
  body[data-ty-console="1"] .ty-topnav,
  body[data-ty-console="1"] .page-title-box,
  body[data-ty-console="1"] .d-print-none {
    display: none !important;
  }
  .ty-bill-box {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}

/* ===== TY-CONSOLE-V7-POLISH ===== */
/* 1. Billing search box width so placeholder never truncates */
.ty-db-search-form .ty-live-search {
  min-width: 245px;
}

/* 2. Personal center QQ photo avatar */
.ty-prof-avatar.is-photo {
  padding: 0 !important;
  overflow: hidden;
  background: var(--ty-surface) !important;
  border: 3px solid var(--ty-surface) !important;
  box-shadow: 0 10px 24px rgba(214, 63, 128, .22);
}
.ty-prof-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3. Viewticket v7 Bold 2-Column Helpdesk Layout */
.ty-tk-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: start;
}
.ty-tk-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ty-tk-hero-bar {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ty-tk-hero-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.ty-tk-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tk-color, #e85b97);
  background: color-mix(in srgb, var(--tk-color, #e85b97) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tk-color, #e85b97) 28%, transparent);
}
.ty-tk-status-dot .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.ty-tk-status-dot.is-sm { padding: 3px 9px; font-size: 11.5px; }
.ty-tk-tid-pill,
.ty-tk-dept-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-2);
}
.ty-tk-hero-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--ty-text);
  line-height: 1.4;
}
.ty-tk-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.ty-tk-btn-back,
.ty-tk-btn-close {
  height: 36px;
  padding: 0 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}

.ty-tk-conversation {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ty-tk-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color .16s ease;
}
.ty-tk-card.is-staff {
  border-color: rgba(232, 91, 151, .28);
  background: linear-gradient(180deg, rgba(232, 91, 151, .045), var(--ty-surface) 92px);
}
.ty-tk-card-head {
  padding: 15px 20px 12px;
  border-bottom: 1px solid var(--ty-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ty-tk-who {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ty-tk-av {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ty-tk-av.is-staff-av {
  background: linear-gradient(135deg, #f06ba5, #c83274);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 6px 14px rgba(214, 63, 128, .26);
}
.ty-tk-av.is-user-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ty-tk-who-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ty-tk-who-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ty-text);
}
.ty-tk-who-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.ty-tk-who-badge.is-staff {
  background: rgba(232, 91, 151, .14);
  color: #e85b97;
}
.ty-tk-who-badge.is-customer {
  background: var(--ty-surface-2);
  color: var(--ty-text-3);
  border: 1px solid var(--ty-border);
}
.ty-tk-who-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ty-text-3);
  margin-top: 2px;
}
.ty-tk-card-body {
  padding: 18px 20px 20px;
}
.ty-tk-prose {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ty-text);
  word-break: break-word;
}
.ty-tk-prose img {
  max-width: 100%;
  border-radius: 10px;
  margin: 8px 0;
}
.ty-tk-att-list {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--ty-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ty-tk-att-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ty-text-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ty-tk-rate-row {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  align-items: center;
  gap: 10px;
}
.ty-tk-rate-lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ty-text-2);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ty-tk-composer {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 18px;
  overflow: hidden;
}
.ty-tk-comp-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
}
.ty-tk-comp-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ty-tk-comp-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(232, 91, 151, .14);
  color: #e85b97;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.ty-tk-comp-title h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ty-text);
}
.ty-tk-comp-title p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--ty-text-3);
}
.ty-tk-comp-body {
  padding: 18px 20px 20px;
}
.ty-tk-upload-box {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px dashed var(--ty-border);
  background: var(--ty-surface-2);
}
.ty-tk-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ty-tk-upload-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--ty-text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ty-tk-comp-foot {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.ty-tk-btn-cancel,
.ty-tk-btn-submit {
  height: 42px;
  border-radius: 12px !important;
  padding: 0 22px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.ty-tk-aside {
  position: sticky;
  top: 132px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ty-tk-aside-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 18px;
  padding: 18px;
}
.ty-tk-aside-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ty-text);
  margin-bottom: 14px;
}
.ty-tk-meta-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.ty-tk-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-tk-meta-row:last-child { padding-bottom: 0; border-bottom: 0; }
.ty-tk-meta-row dt { color: var(--ty-text-3); font-weight: 500; margin: 0; flex: 0 0 auto; }
.ty-tk-meta-row dd { color: var(--ty-text); font-weight: 600; margin: 0; text-align: right; word-break: break-word; }

.ty-tk-sla-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ty-tk-sla-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(16, 185, 129, .14);
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex: 0 0 36px;
}
.ty-tk-sla-head h6 { margin: 0; font-size: 13.5px; font-weight: 800; color: var(--ty-text); }
.ty-tk-sla-head span { font-size: 11.5px; color: var(--ty-text-3); }
.ty-tk-sla-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ty-tk-sla-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ty-text-2);
  line-height: 1.55;
}
.ty-tk-sla-list li i { color: #e85b97; font-size: 15px; margin-top: 2px; flex: 0 0 auto; }

@media (max-width: 1024px) {
  .ty-tk-shell { grid-template-columns: 1fr; }
  .ty-tk-aside { position: static; }
}

/* 4. Invoice Issue Card v7 (invoicelist.tpl?action=invoiceapply&type=issue) */
.ty-inv-issue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-inv-issue-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ty-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ty-inv-issue-title i { color: #e85b97; font-size: 20px; }
.ty-inv-issue-sub { margin: 4px 0 0; font-size: 13px; color: var(--ty-text-3); }
.ty-inv-quick-links { display: flex; gap: 8px; flex-wrap: wrap; }
.ty-inv-type-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ty-inv-type-lbl { font-size: 13.5px; font-weight: 700; color: var(--ty-text); }
.ty-inv-radio-pills { display: inline-flex; gap: 8px; }
.ty-inv-radio-pill {
  margin: 0;
  cursor: pointer;
}
.ty-inv-radio-pill input { display: none; }
.ty-inv-radio-pill span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 11px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
  color: var(--ty-text-2);
  font-size: 13.5px;
  font-weight: 600;
  transition: all .15s ease;
}
.ty-inv-radio-pill input:checked + span {
  border-color: #e85b97;
  background: rgba(232, 91, 151, .12);
  color: #e85b97;
}
.ty-inv-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.ty-inv-field-full { grid-column: 1 / -1; }
.ty-inv-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.ty-inv-field-head label { margin: 0; font-size: 13px; font-weight: 700; color: var(--ty-text); }
.ty-inv-add-link { font-size: 12.5px; font-weight: 600; color: #e85b97 !important; text-decoration: none; }
.ty-inv-add-link:hover { text-decoration: underline; }
.ty-inv-field .form-control {
  height: 44px;
  border-radius: 12px !important;
}
.ty-inv-table-wrap { margin-bottom: 18px; }
.ty-inv-desc-pre {
  margin: 0;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ty-text-2);
  background: transparent;
  border: 0;
  padding: 0;
  white-space: pre-wrap;
}
.ty-inv-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
}
.ty-inv-fee-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ty-text-2);
}
.ty-inv-fee-text i { font-size: 19px; color: #e85b97; }
.ty-inv-fee-text strong { color: var(--ty-text); font-weight: 800; }
.ty-inv-actions { display: flex; gap: 10px; }
@media (max-width: 767.98px) {
  .ty-inv-form-grid { grid-template-columns: 1fr; }
}

/* 5. Product Transfer (pushpulllist.tpl) v7 Badges & Modals */
.ty-divert-prod { display: flex; flex-direction: column; gap: 2px; }
.ty-divert-sub { font-size: 12px; color: var(--ty-text-3); }
.ty-divert-user { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.ty-div-type {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.ty-div-type.is-out { background: rgba(245, 158, 11, .14); color: #f59e0b; }
.ty-div-type.is-in { background: rgba(16, 185, 129, .14); color: #10b981; }
.ty-div-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-2);
}
.ty-div-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ty-divert-empty { padding: 44px 20px; text-align: center; }
.ty-divert-empty > i { font-size: 38px; color: var(--ty-text-3); opacity: .6; display: block; margin-bottom: 8px; }
.ty-divert-empty p { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ty-text); }
.ty-divert-empty span { font-size: 12.5px; color: var(--ty-text-3); }
.ty-div-modal-info {
  border-radius: 14px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ty-div-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.ty-div-modal-row span { color: var(--ty-text-3); }
.ty-div-modal-row strong { color: var(--ty-text); text-align: right; }
.ty-div-modal-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, .10);
  border: 1px solid rgba(245, 158, 11, .24);
  font-size: 12.5px;
  color: var(--ty-text-2);
}
.ty-div-modal-tip i { font-size: 17px; color: #f59e0b; flex: 0 0 auto; margin-top: 1px; }
/* ==========================================================================
   TY VAULT CONSOLE v8 (20261120.8)
   Pagination, Personal Center, Chat-Bubble Helpdesk, Credit Limit, Divert
   ========================================================================== */

/* 1. Single-line horizontal pagination (never wrap "每页 [10 v] 条") */
.table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-top: 14px;
}
.table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
  margin-left: auto;
}
.table-pageinfo {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  white-space: nowrap !important;
  font-size: 13px;
  color: var(--ty-text-2);
}
.table-pageinfo > span {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  white-space: nowrap !important;
  margin: 0 !important;
}
.table-pageinfo select,
#limitSel {
  display: inline-block !important;
  width: auto !important;
  min-width: 60px !important;
  height: 30px !important;
  line-height: 28px !important;
  padding: 0 24px 0 10px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  border: 1px solid var(--ty-border-2) !important;
  background-color: var(--ty-surface-2) !important;
  color: var(--ty-text) !important;
  font-size: 13px !important;
  vertical-align: middle !important;
}
.table-pagination .pagination {
  margin: 0 !important;
  flex-wrap: nowrap;
}

/* 2. Personal Center (details.tpl) v9 — compact centered 2-column + zero excess whitespace */
.ty-prof-v8 {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
@media (max-width: 991.98px) {
  .ty-prof-v8 {
    grid-template-columns: 1fr;
  }
}
.ty-prof-v8 .ty-prof-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 84px;
}
@media (max-width: 991.98px) {
  .ty-prof-v8 .ty-prof-rail { position: static; }
}
.ty-prof-v8 .ty-prof-id-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(32, 18, 28, .05);
}
.ty-prof-v8 .ty-prof-banner {
  height: 44px;
  background: linear-gradient(135deg, rgba(232, 91, 151, .20), rgba(171, 68, 104, .10));
  border-bottom: 1px solid var(--ty-border);
}
.ty-prof-v8 .ty-prof-id-body {
  padding: 0 14px 14px;
}
.ty-prof-v8 .ty-prof-av-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: -22px;
  margin-bottom: 10px;
}
.ty-prof-v8 .ty-prof-avatar {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  overflow: hidden;
  border: 3px solid var(--ty-surface);
  background: var(--ty-surface-2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  flex-shrink: 0;
  margin: 0 !important;
}
.ty-prof-v8 .ty-prof-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ty-prof-v8 .ty-prof-id-meta {
  min-width: 0;
  padding-bottom: 1px;
}
.ty-prof-v8 .ty-prof-name {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ty-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ty-prof-v8 .ty-prof-group-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--ty-accent-subtle);
  color: var(--ty-accent);
  border: 1px solid rgba(232, 91, 151, .22);
}
.ty-prof-v8 .ty-prof-bind-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--ty-border);
}
.ty-prof-v8 .ty-prof-bind-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--ty-text-2);
}
.ty-prof-v8 .ty-prof-bind-l {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ty-prof-v8 .ty-prof-bind-l i {
  color: var(--ty-accent);
  font-size: 14px;
  flex-shrink: 0;
}
.ty-prof-v8 .ty-prof-bind-val {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ty-prof-v8 .ty-prof-bind-act {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ty-accent);
  flex-shrink: 0;
}
.ty-prof-v8 .ty-prof-nav-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 14px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ty-prof-v8 .ty-prof-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ty-text-2);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.ty-prof-v8 .ty-prof-nav-link:hover {
  background: var(--ty-surface-2);
  color: var(--ty-text);
}
.ty-prof-v8 .ty-prof-nav-link-l {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ty-prof-v8 .ty-prof-nav-link-l i {
  font-size: 15px;
  color: var(--ty-accent);
}
.ty-prof-v8 .ty-prof-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(32, 18, 28, .05);
}
.ty-prof-v8 .ty-prof-block {
  padding: 13px 18px;
  border-bottom: 1px solid var(--ty-border);
}
.ty-prof-v8 .ty-prof-block:last-of-type {
  border-bottom: 0;
}
.ty-prof-v8 .ty-prof-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.ty-prof-v8 .ty-prof-block-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ty-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ty-prof-v8 .ty-prof-block-title i {
  color: var(--ty-accent);
  font-size: 16px;
}
.ty-prof-v8 .ty-prof-block-sub {
  font-size: 11.5px;
  color: var(--ty-text-3);
}
.ty-prof-v8 .ty-prof-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}
.ty-prof-v8 .ty-prof-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px 12px;
}
@media (max-width: 640px) {
  .ty-prof-v8 .ty-prof-grid-2,
  .ty-prof-v8 .ty-prof-grid-3 {
    grid-template-columns: 1fr;
  }
}
.ty-prof-field label,
.ty-prof-v8 .ty-prof-field label {
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 2px !important;
  font-size: 12px;
  font-weight: 600;
  color: var(--ty-text-2);
  margin-bottom: 3px;
  width: auto !important;
}
.ty-req-star {
  color: #ef4444;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  top: -0.25em;
  position: relative;
  margin-left: 1px;
}
.ty-prof-v8 .ty-prof-field .form-control {
  height: 35px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  padding: 0 11px !important;
}
.ty-prof-v8 .ty-prof-field textarea.form-control {
  height: auto !important;
  padding: 8px 11px !important;
}
.ty-prof-v8 .ty-prof-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
}
.ty-prof-v8 .ty-prof-switch-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ty-text);
}
.ty-prof-v8 .ty-prof-switch-desc {
  font-size: 11.5px;
  color: var(--ty-text-3);
  margin-top: 1px;
}
.ty-prof-v8 .ty-prof-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 18px;
  background: var(--ty-surface-2);
  border-top: 1px solid var(--ty-border);
}

/* 3. Chat-Bubble Helpdesk (viewticket.tpl) v8 */
.ty-chat-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1024px) {
  .ty-chat-shell { grid-template-columns: 1fr; }
}
.ty-chat-topbar {
  grid-column: 1 / -1;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.ty-chat-topbar-left { min-width: 0; flex: 1; }
.ty-chat-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.ty-chat-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ty-text);
  line-height: 1.35;
  word-break: break-word;
}
.ty-chat-subline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12.5px;
  color: var(--ty-text-3);
}
.ty-chat-subline span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ty-chat-topbar-acts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ty-chat-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--tk-color, #ab4468) 14%, transparent);
  color: var(--tk-color, #ab4468);
  border: 1px solid color-mix(in srgb, var(--tk-color, #ab4468) 32%, transparent);
}
.ty-chat-status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.ty-chat-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.ty-chat-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 16px;
  overflow: hidden;
}
.ty-chat-card-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--ty-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ty-chat-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ty-text);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ty-chat-card-title i { color: var(--ty-accent); font-size: 17px; }
.ty-chat-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
  color: var(--ty-text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.ty-chat-sync-btn:hover { color: var(--ty-accent); border-color: var(--ty-accent); }
.ty-chat-sync-btn.is-spin i { animation: tySpin 0.8s linear infinite; }
@keyframes tySpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.ty-chat-stream {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 620px;
  overflow-y: auto;
  background: var(--ty-bg);
}
.ty-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 84%;
}
.ty-chat-msg.is-staff {
  align-self: flex-start;
}
.ty-chat-msg.is-customer {
  align-self: flex-end;
  flex-direction: row-reverse;
}
@media (max-width: 640px) {
  .ty-chat-msg { max-width: 95%; }
}
.ty-chat-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 2px solid var(--ty-surface);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}
.ty-chat-av.is-staff {
  background: linear-gradient(135deg, #ab4468, #d66a94);
  color: #fff;
}
.ty-chat-av.is-customer {
  background: var(--ty-surface-2);
}
.ty-chat-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ty-chat-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ty-chat-msg.is-customer .ty-chat-col {
  align-items: flex-end;
}
.ty-chat-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ty-text-3);
  padding: 0 2px;
}
.ty-chat-msg.is-customer .ty-chat-meta {
  flex-direction: row-reverse;
}
.ty-chat-sender {
  font-weight: 700;
  color: var(--ty-text-2);
}
.ty-chat-role-tag {
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: var(--ty-accent-subtle);
  color: var(--ty-accent);
}
.ty-chat-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 13.8px;
  line-height: 1.65;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 2px 8px rgba(20, 12, 22, .05);
}
.ty-chat-msg.is-staff .ty-chat-bubble {
  background: var(--ty-surface);
  color: var(--ty-text);
  border: 1px solid var(--ty-border);
  border-top-left-radius: 4px;
}
.ty-chat-msg.is-customer .ty-chat-bubble {
  background: linear-gradient(135deg, #b84b72, #9b365b);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .1);
  border-top-right-radius: 4px;
}
[data-theme="dark"] .ty-chat-msg.is-customer .ty-chat-bubble {
  background: linear-gradient(135deg, #9f3e64, #7c2d4d);
  color: #fff6fa;
}
.ty-chat-bubble p:last-child { margin-bottom: 0; }
.ty-chat-bubble img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 6px;
}
.ty-chat-bubble a {
  color: inherit;
  text-decoration: underline;
}
.ty-chat-atts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ty-chat-att {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  text-decoration: none !important;
  background: rgba(0, 0, 0, .06);
  color: inherit;
  border: 1px solid rgba(128, 128, 128, .22);
}
.ty-chat-msg.is-customer .ty-chat-att {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}
.ty-chat-rate {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 9px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  font-size: 12px;
  color: var(--ty-text-2);
}

.ty-chat-composer {
  padding: 16px 18px;
}
.ty-chat-textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border-radius: 12px !important;
  border: 1px solid var(--ty-border-2) !important;
  background: var(--ty-surface-2) !important;
  color: var(--ty-text) !important;
  padding: 12px 14px !important;
  font-size: 13.8px !important;
  line-height: 1.6;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ty-chat-textarea:focus {
  border-color: var(--ty-accent) !important;
  box-shadow: 0 0 0 3px var(--ty-ring) !important;
  outline: none;
}
.ty-chat-comp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.ty-chat-comp-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ty-chat-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px dashed var(--ty-border-2);
  background: var(--ty-surface-2);
  color: var(--ty-text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}
.ty-chat-file-btn:hover { border-color: var(--ty-accent); color: var(--ty-accent); }
.ty-chat-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ty-chat-picked-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  font-size: 12px;
  color: var(--ty-text-2);
}
.ty-chat-picked-chip button {
  background: none;
  border: 0;
  color: var(--ty-text-3);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 14px;
}
.ty-chat-picked-chip button:hover { color: #ef4444; }
.ty-chat-send-btn {
  height: 36px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ty-chat-shortcut {
  font-size: 11.5px;
  color: var(--ty-text-3);
}
.ty-chat-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 84px;
}
@media (max-width: 1024px) {
  .ty-chat-aside { position: static; }
}
.ty-chat-info-dl {
  margin: 0;
  padding: 12px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ty-chat-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--ty-border);
}
.ty-chat-info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ty-chat-info-row dt { color: var(--ty-text-3); font-weight: 500; margin: 0; flex-shrink: 0; }
.ty-chat-info-row dd { color: var(--ty-text); font-weight: 600; margin: 0; text-align: right; word-break: break-word; }

/* 4. Credit Management (credit.tpl & creditdetail.tpl) v8 */
.ty-crd-kpis {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 991.98px) {
  .ty-crd-kpis { grid-template-columns: 1fr; }
}
.ty-crd-card {
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 6px 20px rgba(32, 18, 28, .04);
}
.ty-crd-gauge-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}
.ty-crd-gauge-wrap svg {
  width: 92px;
  height: 92px;
  transform: rotate(-90deg);
}
.ty-crd-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ty-crd-gauge-pct {
  font-size: 16px;
  font-weight: 800;
  color: var(--ty-text);
  line-height: 1.1;
}
.ty-crd-gauge-lbl {
  font-size: 11px;
  color: var(--ty-text-3);
  margin-top: 2px;
}
.ty-crd-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.ty-crd-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.ty-crd-stat-l {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ty-text-2);
}
.ty-crd-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ty-crd-stat-v {
  font-weight: 700;
  color: var(--ty-text);
  font-variant-numeric: tabular-nums;
}
.ty-crd-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ty-crd-kpi-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ty-text-2);
}
.ty-crd-kpi-amt {
  font-size: 22px;
  font-weight: 800;
  color: var(--ty-text);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ty-crd-kpi-sub {
  font-size: 12px;
  color: var(--ty-text-3);
}
.ty-crd-kpi-ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--ty-accent-subtle);
  color: var(--ty-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ty-crd-prepay {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--ty-accent);
  background: var(--ty-accent-subtle);
  color: var(--ty-accent) !important;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all .15s ease;
}
.ty-crd-prepay:hover {
  background: var(--ty-accent);
  color: #fff !important;
}

/* 5. Product Divert launch button & modal controls */
.ty-div-launch-btn {
  height: 36px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.ty-div-lookup-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ty-div-lookup-row .form-control {
  flex: 1;
  min-width: 0;
}
.ty-div-lookup-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.disClass:disabled {
  opacity: .46 !important;
  cursor: not-allowed !important;
  filter: grayscale(.25);
}

/* 6. ViewTicket desktop zero-outer-scroll app viewport (v20261120.10) */
@media (min-width: 1025px) {
  html.ty-ticket-desk,
  body.ty-ticket-desk {
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.ty-ticket-desk .main-content {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.ty-ticket-desk .page-content {
    padding-top: 14px !important;
    padding-bottom: 12px !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  body.ty-ticket-desk .page-content > .container-fluid:first-child:has(.page-title-box),
  body.ty-ticket-desk .page-title-box,
  body.ty-ticket-desk footer.footer,
  body.ty-ticket-desk #tthetop {
    display: none !important;
  }
  body.ty-ticket-desk .ty-chat-shell {
    height: var(--ty-chat-shell-h, calc(100vh - 148px));
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px 16px;
    align-items: stretch;
  }
  body.ty-ticket-desk .ty-chat-topbar {
    padding: 11px 18px;
    border-radius: 14px;
    gap: 10px;
  }
  body.ty-ticket-desk .ty-chat-title-row {
    margin-bottom: 4px;
  }
  body.ty-ticket-desk .ty-chat-title {
    font-size: 16.5px;
  }
  body.ty-ticket-desk .ty-chat-main {
    min-height: 0;
    height: 100%;
    gap: 12px;
  }
  body.ty-ticket-desk .ty-chat-main > .ty-chat-card:first-child {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
  }
  body.ty-ticket-desk .ty-chat-card-head {
    padding: 10px 16px;
  }
  body.ty-ticket-desk .ty-chat-stream {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding: 16px 18px;
  }
  body.ty-ticket-desk #ticketReplyContainer {
    flex: 0 0 auto;
    margin-bottom: 0 !important;
  }
  body.ty-ticket-desk .ty-chat-composer {
    padding: 10px 16px 12px;
  }
  body.ty-ticket-desk .ty-chat-textarea {
    min-height: 68px;
    max-height: 150px;
    padding: 9px 12px !important;
  }
  body.ty-ticket-desk .ty-chat-comp-bar {
    margin-top: 8px;
  }
  body.ty-ticket-desk .ty-chat-aside {
    position: static;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    gap: 12px;
  }
  body.ty-ticket-desk .ty-chat-aside > .ty-chat-card {
    margin-bottom: 0 !important;
  }
}

/* 7. Searchable Product Picker inside Product Divert Modal (v20261120.10) */
#pushModal .modal-content,
#pushModal .modal-body {
  overflow: visible !important;
}
#pushModal .ty-mv7-head {
  border-radius: 22px 22px 0 0;
}
#pushModal .ty-mv7-foot {
  border-radius: 0 0 22px 22px;
}
.ty-hp-wrap {
  position: relative;
}
.ty-hp-trigger {
  width: 100%;
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 11px;
  border: 1px solid var(--ty-border-2, var(--ty-border));
  background: var(--ty-surface-2);
  color: var(--ty-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ty-hp-trigger:hover {
  border-color: var(--ty-accent);
}
.ty-hp-wrap.is-open .ty-hp-trigger {
  border-color: var(--ty-accent);
  box-shadow: 0 0 0 3px var(--ty-ring, rgba(232, 91, 151, .22));
  background: var(--ty-surface);
}
.ty-hp-sel-main {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
}
.ty-hp-sel-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ty-text);
}
.ty-hp-sel-dom {
  font-size: 12px;
  color: var(--ty-text-3);
  font-family: var(--ty-mono, monospace);
}
.ty-hp-sel-ip {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: var(--ty-mono, monospace);
  background: var(--ty-accent-subtle, rgba(232, 91, 151, .11));
  color: var(--ty-accent);
  font-weight: 600;
}
.ty-hp-caret {
  font-size: 18px;
  color: var(--ty-text-3);
  flex-shrink: 0;
  transition: transform .15s ease;
}
.ty-hp-wrap.is-open .ty-hp-caret {
  transform: rotate(180deg);
  color: var(--ty-accent);
}
.ty-hp-panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1080;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border-2, var(--ty-border));
  border-radius: 13px;
  box-shadow: 0 18px 44px rgba(15, 10, 22, .22);
  overflow: hidden;
}
.ty-hp-wrap.is-open .ty-hp-panel {
  display: block;
}
.ty-hp-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
}
.ty-hp-search-bar > i {
  font-size: 16px;
  color: var(--ty-text-3);
  flex-shrink: 0;
}
.ty-hp-search-inp {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--ty-text) !important;
  font-size: 13px;
  padding: 2px 0;
}
.ty-hp-search-inp::placeholder {
  color: var(--ty-text-3);
}
.ty-hp-search-clr {
  display: none;
  border: 0;
  background: var(--ty-surface);
  color: var(--ty-text-3);
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ty-hp-search-clr.is-vis {
  display: inline-flex;
}
.ty-hp-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--ty-text-3);
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ty-hp-list {
  max-height: 236px;
  overflow-y: auto;
  padding: 5px;
}
.ty-hp-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ty-text);
  border-radius: 9px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease;
}
.ty-hp-item:hover,
.ty-hp-item.is-hi {
  background: var(--ty-surface-2);
}
.ty-hp-item.is-active {
  background: var(--ty-accent-subtle, rgba(232, 91, 151, .11));
}
.ty-hp-item-l {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ty-hp-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--ty-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ty-hp-domain {
  font-size: 11.5px;
  color: var(--ty-text-3);
  font-family: var(--ty-mono, monospace);
}
.ty-hp-item-r {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ty-hp-ip {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-family: var(--ty-mono, monospace);
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-2);
}
.ty-hp-item.is-active .ty-hp-ip {
  border-color: rgba(232, 91, 151, .35);
  color: var(--ty-accent);
}
.ty-hp-check {
  font-size: 16px;
  color: var(--ty-accent);
  opacity: 0;
}
.ty-hp-item.is-active .ty-hp-check {
  opacity: 1;
}
.ty-hp-empty {
  display: none;
  padding: 20px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ty-text-3);
}

/* ==========================================================================
   TY VAULT CONSOLE v11 (20261120.11) · Mobile Bug Fixes
   1. Prevent change.qr.css 25% button width squishing "订购产品" on mobile
   2. Un-clip bottom-right pagination ("共 X 条 每页 [20] 条") on mobile
   3. Prevent .container-fluid padding:0 + .row negative margins causing x-scroll
   4. Clean mobile batch bar & responsive modal polish
   ========================================================================== */
body[data-ty-console="1"] .table-header .btn.btn-sm.btn-primary.w-xs,
body[data-ty-console="1"] .table-filter .btn {
  min-width: auto !important;
  max-width: none !important;
  width: auto !important;
  white-space: nowrap !important;
  padding: 0 18px !important;
  flex: 0 0 auto;
}

body[data-ty-console="1"] .table-pageinfo,
body[data-ty-console="1"] .table-pageinfo .form-inline {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px 10px !important;
  white-space: nowrap !important;
  margin: 0 !important;
  width: auto !important;
  max-width: 100% !important;
}
body[data-ty-console="1"] .table-pageinfo > span,
body[data-ty-console="1"] .table-pageinfo .form-inline > span {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

@media (max-width: 767.98px) {
  body[data-ty-console="1"] .page-content > .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-width: 100% !important;
  }
  body[data-ty-console="1"] .table-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  body[data-ty-console="1"] .table-filter {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
  }
  body[data-ty-console="1"] .table-filter .col {
    gap: 8px;
  }
  body[data-ty-console="1"] .table-filter .bootstrap-select {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  body[data-ty-console="1"] .table-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
  }
  body[data-ty-console="1"] .table-tools {
    width: 100% !important;
    margin-bottom: 0 !important;
    gap: 8px !important;
  }
  body[data-ty-console="1"] .table-pagination {
    width: 100% !important;
    margin-left: 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
  }
  body[data-ty-console="1"] .table-pageinfo {
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    justify-content: center !important;
    white-space: normal !important;
  }
  body[data-ty-console="1"] .table-pageinfo .form-inline {
    justify-content: center !important;
  }
  body[data-ty-console="1"] .table-pagination .pagination {
    flex-wrap: wrap !important;
    justify-content: center !important;
    max-width: 100% !important;
  }
  .ty-msg-batch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .ty-msg-batch .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    justify-content: center;
  }
}

/* ==========================================================================
   TY VAULT CONSOLE v12 (20261120.12) · Mobile /transaction & /submitticket & /supporttickets Polish
   ========================================================================== */
.ty-tkt-steps-track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.ty-tkt-back-btn {
  height: 30px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  margin-left: auto;
  flex-shrink: 0;
}

body[data-ty-console="1"] .table-pageinfo select.form-control,
body[data-ty-console="1"] #limitSel {
  width: auto !important;
  min-width: 58px !important;
  max-width: 78px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 2px 24px 2px 10px !important;
  border-radius: 8px !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
}

@media (max-width: 767.98px) {
  /* /transaction topbar: single horizontal scrollable tab strip + full-width search */
  .ty-fin-topbar-left {
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .ty-fin-topbar .nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px;
    padding-bottom: 2px;
  }
  .ty-fin-topbar .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .ty-fin-topbar .nav-tabs .nav-item {
    flex: 0 0 auto;
  }
  .ty-fin-topbar .nav-tabs .nav-link {
    white-space: nowrap !important;
    padding: 7px 12px !important;
    font-size: 13px !important;
  }
  .ty-sub-pills {
    align-self: flex-start;
  }
  .ty-db-search-group {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .ty-search-hints {
    width: 100%;
    flex-wrap: wrap;
    gap: 5px 6px;
  }
  .ty-db-search-form {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ty-db-search-form .ty-live-search {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
  }
  .ty-db-search-btn {
    flex-shrink: 0;
    height: 38px !important;
    padding: 0 14px !important;
    white-space: nowrap !important;
  }

  /* /submitticket step bar & department cards */
  .ty-tkt-steps {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
  .ty-tkt-steps-track {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .ty-tkt-step {
    white-space: nowrap;
    font-size: 12.5px;
    gap: 6px;
    flex-shrink: 0;
  }
  .ty-tkt-step-sep {
    max-width: none;
    min-width: 12px;
  }
  .ty-tkt-back-btn {
    margin-left: 0 !important;
    width: 100% !important;
    height: 34px !important;
  }
  .ty-tkt-dept-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .ty-tkt-dept-card {
    padding: 14px 15px !important;
  }

  /* /supporttickets KPIs, filter bar & table readability */
  .ty-fin-kpis {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }
  .ty-fin-kpi {
    padding: 12px 14px !important;
  }
  .ty-fin-pills {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ty-fin-pill {
    justify-content: center;
    padding: 0 8px !important;
  }
  .ty-fin-topbar-left > a.btn {
    width: 100%;
    justify-content: center;
  }
  #tyTicketsTable {
    min-width: 580px;
  }
  #tyTicketsTable td,
  #tyTicketsTable th {
    padding: 10px 10px !important;
    white-space: nowrap;
  }
  #tyTicketsTable td:nth-child(2) {
    white-space: normal;
    min-width: 170px;
  }
}

/* 9. SubmitTicket v13 Redesign, Searchable Product Picker & Zero-Outer-Scroll Desktop (20261120.13) */
@media (min-width: 1025px) {
  html.ty-submitticket-desk,
  body.ty-submitticket-desk {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.ty-submitticket-desk #layout-wrapper {
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.ty-submitticket-desk .main-content {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  body.ty-submitticket-desk .page-content {
    padding-top: 14px !important;
    padding-bottom: 12px !important;
    height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  body.ty-submitticket-desk .page-content > .container-fluid:first-child:has(.page-title-box),
  body.ty-submitticket-desk .page-title-box,
  body.ty-submitticket-desk footer.footer,
  body.ty-submitticket-desk #tthetop {
    display: none !important;
  }
  body.ty-submitticket-desk .ty-tkt-submit-composer {
    height: var(--ty-tkt-submit-h, calc(100vh - 148px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
  }
  body.ty-submitticket-desk .ty-tkt-submit-composer .ty-tkt-steps {
    flex: 0 0 auto;
    margin-bottom: 0 !important;
    padding: 10px 16px;
  }
  body.ty-submitticket-desk .ty-tkt-submit-card {
    flex: 1 1 0;
    min-height: 0;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.ty-submitticket-desk .ty-tkt-submit-card > form {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.ty-submitticket-desk .ty-tkt-submit-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px 14px;
  }
  body.ty-submitticket-desk .ty-tkt-submit-foot {
    flex: 0 0 auto;
    padding: 12px 22px;
  }
}

.ty-tkt-submit-card {
  border-radius: 16px !important;
  border: 1px solid var(--ty-border) !important;
  background: var(--ty-surface) !important;
}
.ty-tkt-submit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
}
.ty-tkt-submit-head h5 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ty-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ty-tkt-submit-head h5 i {
  color: var(--ty-accent);
  font-size: 18px;
}
.ty-tkt-hours-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  font-size: 12px;
  color: var(--ty-text-3);
}
.ty-tkt-submit-scroll {
  padding: 20px 22px 16px;
}
.ty-tkt-submit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--ty-border);
  background: var(--ty-surface-2);
}
.ty-tkt-submit-tip {
  font-size: 12px;
  color: var(--ty-text-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ty-tkt-field-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(240px, 1.45fr) minmax(190px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 991.98px) {
  .ty-tkt-field-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.ty-tkt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ty-text-2);
  margin-bottom: 6px;
}
.ty-tkt-submit-composer .form-control {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 11px !important;
  border: 1px solid var(--ty-border-2, var(--ty-border)) !important;
  background: var(--ty-surface-2) !important;
  color: var(--ty-text) !important;
  box-shadow: none !important;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.ty-tkt-native-sel {
  display: none !important;
}
.ty-tkt-submit-composer input.form-control {
  height: 40px !important;
  padding: 0 13px !important;
  font-size: 13.5px !important;
}
.ty-tkt-submit-composer textarea.form-control {
  padding: 11px 13px !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  resize: vertical;
  min-height: 138px;
}
.ty-tkt-submit-composer .form-control:focus {
  border-color: rgba(232, 91, 151, .6) !important;
  background: var(--ty-surface) !important;
  box-shadow: 0 0 0 3px rgba(232, 91, 151, .12) !important;
}

/* Custom department & searchable product pickers */
.ty-tkt-submit-composer .ty-hp-trigger {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--ty-border-2, var(--ty-border));
  background: var(--ty-surface-2);
}
.ty-tkt-submit-composer .ty-hp-wrap.is-open .ty-hp-trigger {
  border-color: rgba(232, 91, 151, .6);
  box-shadow: 0 0 0 3px rgba(232, 91, 151, .12);
}
.ty-tkt-submit-composer .ty-hp-sel-main {
  flex-wrap: nowrap;
  overflow: hidden;
}
.ty-tkt-submit-composer .ty-hp-sel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
}
.ty-tkt-submit-composer .ty-hp-panel {
  z-index: 1060;
}
.ty-tkt-host-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  color: var(--ty-text-3);
  white-space: nowrap;
}
.ty-tkt-host-tag.is-active {
  background: rgba(16, 185, 129, .12);
  border-color: rgba(16, 185, 129, .28);
  color: #10b981;
}

/* Segmented priority pills */
.ty-tkt-prio-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  height: 40px;
  padding: 3px;
  border-radius: 11px;
  background: var(--ty-surface-2);
  border: 1px solid var(--ty-border-2, var(--ty-border));
}
.ty-tkt-prio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ty-text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.ty-tkt-prio-btn:hover {
  color: var(--ty-text);
  background: rgba(128, 128, 128, .08);
}
.ty-tkt-prio-btn.is-active {
  background: var(--ty-surface);
  color: var(--ty-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  border: 1px solid rgba(232, 91, 151, .45);
}
.ty-tkt-prio-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}
.ty-tkt-prio-btn[data-prio="medium"] .ty-tkt-prio-dot { background: #f59e0b; }
.ty-tkt-prio-btn[data-prio="high"] .ty-tkt-prio-dot { background: #ef4444; }

/* Custom sleek attachment picker rows */
.ty-tkt-attach-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ty-tkt-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--ty-surface-2);
  border: 1px dashed var(--ty-border-2, var(--ty-border));
  transition: border-color .15s ease;
}
.ty-tkt-file-row:hover {
  border-color: rgba(232, 91, 151, .45);
}
.ty-tkt-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.ty-tkt-file-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
  margin: 0;
}
.ty-tkt-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  color: var(--ty-text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.ty-tkt-file-name {
  font-size: 12.5px;
  color: var(--ty-text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ty-tkt-file-name.has-file {
  color: var(--ty-text);
  font-weight: 600;
}
.ty-tkt-file-del {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, .28);
  background: rgba(239, 68, 68, .08);
  color: #ef4444 !important;
  cursor: pointer;
  flex-shrink: 0;
}
.ty-tkt-file-row.has-file .ty-tkt-file-del {
  display: inline-flex;
}

/* ==========================================================================
   TY VAULT CONSOLE v14 (20261121.1)
   Divert Icon Fix, Compact Mobile Service/Ticket/API/News Layouts
   ========================================================================== */

/* 1. Product Divert: fix empty-state icon rule leaking into .ty-div-launch-btn */
.ty-div-launch-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: 38px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.ty-div-launch-btn > i {
  font-size: 16px !important;
  line-height: 1 !important;
  margin: 0 !important;
  opacity: 1 !important;
  color: inherit !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

/* 2. API Manage onboard condition rows */
.ty-api-cond-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.ty-api-cond-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ty-surface);
  border: 1px solid var(--ty-border);
  text-align: left;
}
.ty-api-cond-txt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ty-text);
  line-height: 1.45;
}
.ty-api-cond-txt i {
  font-size: 17px;
  color: var(--tyc-pink);
  flex-shrink: 0;
}
.ty-api-cond-btn {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  height: 32px !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
}

/* 3. News mobile top bar (hidden on desktop >= 992px) */
.ty-news-mob-bar {
  display: none;
}

@media (max-width: 991.98px) {
  .ty-news-mob-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--ty-surface);
    border: 1px solid var(--ty-border);
    border-radius: 14px;
    padding: 12px;
  }
  .ty-news-mob-search {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .ty-news-mob-search .position-relative {
    flex: 1 1 auto;
    min-width: 0;
  }
  .ty-news-mob-search .form-control {
    height: 38px !important;
    padding-left: 34px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }
  .ty-news-mob-search .search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ty-text-3);
    font-size: 16px;
  }
  .ty-news-mob-sbtn {
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: none;
    background: var(--tyc-pink-grad);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .ty-news-mob-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    overflow: visible;
    padding-bottom: 2px;
  }
  .ty-news-mob-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--ty-surface-2);
    border: 1px solid var(--ty-border);
    color: var(--ty-text-2) !important;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none !important;
  }
  .ty-news-mob-cat span.cnt {
    font-size: 11px;
    opacity: .75;
  }
  .ty-news-mob-cat.is-active {
    background: var(--tyc-pink-grad);
    border-color: transparent;
    color: #fff !important;
  }
  .ty-news-mob-tags-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 10px;
    border-radius: 9px;
    border: 1px dashed var(--ty-border);
    background: var(--ty-surface-2);
    color: var(--ty-text-2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .ty-news-mob-tags {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
  }
  .ty-news-mob-tags.is-open {
    display: flex;
  }
  .ty-news-side-card {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  /* Empty tables never force horizontal width or right-shift .no-data */
  #tyTicketsTable:has(.no-data),
  #tyDivertTable:has(.no-data) {
    min-width: 0 !important;
    width: 100% !important;
    display: block !important;
  }
  #tyTicketsTable:has(.no-data) thead,
  #tyDivertTable:has(.no-data) thead {
    display: none !important;
  }
  #tyTicketsTable:has(.no-data) tbody,
  #tyTicketsTable:has(.no-data) tr,
  #tyTicketsTable:has(.no-data) td,
  #tyDivertTable:has(.no-data) tbody,
  #tyDivertTable:has(.no-data) tr,
  #tyDivertTable:has(.no-data) td {
    display: block !important;
    width: 100% !important;
  }

  /* /news compact cards on mobile */
  html, body {
    overflow-y: auto !important;
  }
  .ty-kb-layout {
    gap: 10px !important;
  }
  .ty-kb-layout > .card > .card-body {
    padding: 12px !important;
  }
  .ty-news-head {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }
  .ty-news-list {
    gap: 7px;
    margin-bottom: 10px;
  }
  .ty-news-item {
    padding: 9px 11px !important;
    gap: 10px !important;
    border-radius: 11px !important;
  }
  .ty-news-date {
    width: 56px !important;
    height: 48px !important;
    min-width: 56px !important;
    padding: 4px 6px !important;
  }
  .ty-news-date-md {
    font-size: 13px !important;
    white-space: nowrap !important;
  }
  .ty-news-date-yr {
    font-size: 10.5px !important;
  }
  .ty-news-title {
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    margin-bottom: 4px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ty-news-meta-line {
    margin-top: 2px !important;
    gap: 6px !important;
  }
  .ty-news-time,
  .ty-news-tag-pill,
  .ty-news-item .ty-kb-arrow {
    display: none !important;
  }

  /* /apimanage mobile polish */
  .ty-api-onboard-card {
    padding: 16px 12px !important;
  }
  .ty-api-onboard {
    margin: 0 auto !important;
    padding: 20px 14px !important;
  }
  .ty-api-onboard h4 {
    font-size: 16px !important;
  }
  .ty-api-cond-item {
    padding: 11px 12px;
    gap: 10px;
  }
  .ty-api-cond-txt {
    font-size: 12.5px;
  }
  .ty-api-hero {
    padding: 14px !important;
    border-radius: 14px !important;
  }
  .ty-api-hero-bar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .ty-api-key-group {
    width: 100%;
    justify-content: space-between;
  }
  .ty-api-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px !important;
    width: 100%;
  }
  .ty-api-actions .ty-api-btn {
    justify-content: center;
    padding: 0 6px !important;
    font-size: 12px !important;
  }
  .ty-api-kpi-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .ty-api-kpi-grid-3 .ty-api-card {
    padding: 10px !important;
  }
  .ty-api-kpi-grid-3 .ty-api-stat-v {
    font-size: 18px !important;
  }
  #api-charts-main {
    height: 220px !important;
  }

  /* /supporttickets mobile compact KPI strip, topbar & card rows */
  .ty-tkt-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }
  .ty-tkt-kpis .ty-fin-kpi {
    padding: 10px 10px 9px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    border-top: 2px solid rgba(var(--ty-accent-rgb, 232, 91, 151), .45) !important;
  }
  .ty-tkt-kpis .ty-fin-kpi:nth-child(2) {
    border-top-color: rgba(245, 158, 11, .55) !important;
  }
  .ty-tkt-kpis .ty-fin-kpi:nth-child(3) {
    border-top-color: rgba(16, 185, 129, .55) !important;
  }
  .ty-tkt-kpis .ty-fin-kpi-label {
    font-size: 11px !important;
  }
  .ty-tkt-kpis .ty-fin-kpi-val {
    font-size: 19px !important;
  }
  .ty-tkt-kpis .ty-fin-kpi-ok,
  .ty-tkt-kpis .ty-fin-kpi-pill {
    display: none !important;
  }
  .table-container:has(#tyTicketsTable) .ty-fin-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .table-container:has(#tyTicketsTable) .ty-fin-topbar-left {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .table-container:has(#tyTicketsTable) .ty-fin-topbar-right,
  .table-container:has(#tyTicketsTable) .ty-live-search {
    width: 100% !important;
  }
  .table-container:has(#tyTicketsTable) .ty-live-search .form-control {
    border: 1.5px solid var(--ty-border-2, rgba(232, 91, 151, .26)) !important;
    background: var(--ty-surface-2) !important;
  }

  /* /submitticket?step=2 mobile input contrast & sleek attachments */
  .ty-tkt-submit-scroll {
    padding: 14px 14px 12px !important;
  }
  .ty-tkt-submit-composer .form-control,
  .ty-tkt-submit-composer .ty-hp-trigger,
  .ty-tkt-submit-composer .ty-tkt-prio-group {
    border-width: 1.5px !important;
    border-color: rgba(184, 50, 114, .28) !important;
    background: #ffffff !important;
  }
  :root[data-theme="dark"] .ty-tkt-submit-composer .form-control,
  :root[data-theme="dark"] .ty-tkt-submit-composer .ty-hp-trigger,
  :root[data-theme="dark"] .ty-tkt-submit-composer .ty-tkt-prio-group {
    border-color: rgba(255, 255, 255, .20) !important;
    background: rgba(10, 7, 14, .58) !important;
  }
  :root[data-theme="dark"] .ty-tkt-submit-composer .form-control::placeholder {
    color: rgba(255, 255, 255, .48) !important;
  }
  .ty-tkt-attach-head {
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  .ty-tkt-add-file-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 28px !important;
    padding: 0 11px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .ty-tkt-file-row {
    padding: 6px 10px !important;
    border-style: solid !important;
    border-width: 1.5px !important;
    border-color: rgba(184, 50, 114, .22) !important;
    background: #ffffff !important;
  }
  :root[data-theme="dark"] .ty-tkt-file-row {
    border-color: rgba(255, 255, 255, .18) !important;
    background: rgba(10, 7, 14, .48) !important;
  }
  .ty-tkt-submit-foot {
    padding: 12px 14px !important;
  }
  .ty-tkt-submit-foot > div {
    width: 100%;
    justify-content: flex-end;
  }
  .ty-tkt-submit-foot .submitBtn {
    flex: 1 1 auto;
    justify-content: center;
  }
  #tyTicketsTable:not(:has(.no-data)) {
    min-width: 0 !important;
    width: 100% !important;
    display: block !important;
  }
  #tyTicketsTable:not(:has(.no-data)) thead {
    display: none !important;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody tr[data-tkt-state] {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 8px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--ty-border) !important;
    background: var(--ty-surface-2) !important;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody tr[data-tkt-state]::after {
    content: "";
    order: 2;
    flex-basis: 100%;
    height: 0;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody td:nth-child(2) {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody td:nth-child(5) {
    order: 2;
    flex: 0 0 auto;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody td:nth-child(1) {
    order: 3;
    flex: 0 0 auto;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody td:nth-child(3) {
    display: none !important;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody td:nth-child(4) {
    order: 4;
    flex: 0 0 auto;
    font-size: 11.5px !important;
    color: var(--ty-text-3) !important;
  }
  #tyTicketsTable:not(:has(.no-data)) tbody td:nth-child(6) {
    order: 5;
    margin-left: auto;
    flex: 0 0 auto;
  }

  /* /service* compact mobile card rows (cuts vertical scroll dramatically) */
  .table-container:has(#serviceTbody) .table-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }
  .table-container:has(#serviceTbody) .table-filter .col {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .table-container:has(#serviceTbody) .table-search {
    margin-top: 0 !important;
  }
  .table-container:has(#serviceTbody) table.tablelist:not(:has(.no-data)) {
    min-width: 0 !important;
    width: 100% !important;
    display: block !important;
  }
  .table-container:has(#serviceTbody) table.tablelist:not(:has(.no-data)) thead {
    display: none !important;
  }
  .table-container:has(#serviceTbody) #serviceTbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .table-container:has(#serviceTbody) #serviceTbody tr:not(:has(.no-data)) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 8px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--ty-border) !important;
    background: var(--ty-surface-2) !important;
  }
  .table-container:has(#serviceTbody) #serviceTbody tr:not(:has(.no-data))::after {
    content: "";
    order: 3;
    flex-basis: 100%;
    height: 0;
  }
  .table-container:has(#serviceTbody) #serviceTbody tr:not(:has(.no-data)) td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    white-space: normal !important;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(1) {
    order: 1;
    flex: 0 0 auto;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(1) .mb-3 {
    margin-bottom: 0 !important;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(3) {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(3) strong,
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(3) small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(2) {
    order: 3;
    flex: 0 0 auto;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(2) .dots {
    position: static !important;
    display: inline-block !important;
    vertical-align: middle;
    margin-right: 4px;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(4) {
    order: 4;
    flex: 0 0 auto;
    font-family: var(--ty-mono);
    font-size: 12px !important;
    color: var(--ty-text-2);
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(5) {
    order: 5;
    flex: 0 0 auto;
    font-size: 12px !important;
    color: var(--ty-text-3);
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(6) {
    order: 6;
    flex: 0 0 auto;
    font-size: 12px !important;
    font-weight: 700;
    color: var(--tyc-pink);
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(7),
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(8) {
    display: none !important;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(9) {
    order: 7;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .table-container:has(#serviceTbody) #serviceTbody td:nth-child(9) .btn {
    padding: 4px 12px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    width: auto !important;
  }
  .table-container:has(#serviceTbody) table.tablelist:has(.no-data) {
    min-width: 0 !important;
    width: 100% !important;
    display: block !important;
  }
  .table-container:has(#serviceTbody) table.tablelist:has(.no-data) thead {
    display: none !important;
  }
  .table-container:has(#serviceTbody) table.tablelist:has(.no-data) tbody,
  .table-container:has(#serviceTbody) table.tablelist:has(.no-data) tr,
  .table-container:has(#serviceTbody) table.tablelist:has(.no-data) td {
    display: block !important;
    width: 100% !important;
  }

  .table-container:has(#serviceTbody) #serviceTbody tr.ty-mob-hidden {
    display: none !important;
  }

  /* Mobile 5-item pager for /service* */
  .ty-mob-srv-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    margin-top: 8px;
    border-radius: 10px;
    background: var(--ty-surface-2);
    border: 1px solid var(--ty-border);
    font-size: 12px;
    color: var(--ty-text-2);
  }
  .ty-mob-srv-pager-btns {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .ty-mob-srv-pbtn {
    height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--ty-border);
    background: var(--ty-surface);
    color: var(--ty-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .ty-mob-srv-pbtn:disabled {
    opacity: .45;
    cursor: not-allowed;
  }

  /* Divert mobile topbar right full width */
  .ty-div-launch-btn {
    width: 100%;
  }
}


/* === ty ticket close visibility & list actions 20261123 === */
.ty-chat-topbar-acts a.btn.ty-tk-btn-close,
a.btn.ty-tk-btn-close {
  background: rgba(239, 68, 68, .12) !important;
  border: 1.5px solid rgba(239, 68, 68, .48) !important;
  color: #dc2626 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, .10);
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.ty-chat-topbar-acts a.btn.ty-tk-btn-close:hover,
a.btn.ty-tk-btn-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(239, 68, 68, .28);
  transform: translateY(-1px);
}
:root[data-theme="dark"] .ty-chat-topbar-acts a.btn.ty-tk-btn-close,
:root[data-theme="dark"] a.btn.ty-tk-btn-close {
  background: rgba(239, 68, 68, .18) !important;
  border-color: rgba(248, 113, 113, .52) !important;
  color: #fca5a5 !important;
}
:root[data-theme="dark"] .ty-chat-topbar-acts a.btn.ty-tk-btn-close:hover,
:root[data-theme="dark"] a.btn.ty-tk-btn-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.ty-tkt-row-acts {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}
.ty-tkt-act-view {
  border-radius: 8px !important;
  padding: 4px 11px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
.ty-tkt-act-close {
  border-radius: 8px !important;
  padding: 4px 11px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, .10) !important;
  border: 1px solid rgba(239, 68, 68, .38) !important;
  color: #dc2626 !important;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.ty-tkt-act-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}
:root[data-theme="dark"] .ty-tkt-act-close {
  background: rgba(239, 68, 68, .16) !important;
  border-color: rgba(248, 113, 113, .42) !important;
  color: #fca5a5 !important;
}
:root[data-theme="dark"] .ty-tkt-act-close:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

/* Product Divert Modal Realname & Lookup UI (20261123.2) */
.ty-div-rn-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  margin-bottom: 14px;
  border-radius: 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ty-text-2);
  border: 1px solid transparent;
}
.ty-div-rn-banner i {
  font-size: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.ty-div-rn-banner.is-req {
  background: rgba(232, 91, 151, .08);
  border-color: rgba(232, 91, 151, .22);
}
.ty-div-rn-banner.is-req i { color: var(--ty-accent, #e85b97); }
.ty-div-rn-banner.is-free {
  background: rgba(16, 185, 129, .08);
  border-color: rgba(16, 185, 129, .22);
}
.ty-div-rn-banner.is-free i { color: #10b981; }
.ty-div-rn-badge {
  display: inline-block;
  font-weight: 700;
  color: var(--ty-text);
  margin-right: 4px;
}
.ty-div-lookup-msg {
  display: none;
  align-items: flex-start;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
}
.ty-div-lookup-msg.is-loading,
.ty-div-lookup-msg.is-ok,
.ty-div-lookup-msg.is-err {
  display: flex;
}
.ty-div-lookup-msg i {
  font-size: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.ty-div-lookup-msg.is-loading {
  background: var(--ty-surface-2);
  color: var(--ty-text-3);
  border: 1px solid var(--ty-border);
}
.ty-div-lookup-msg.is-ok {
  background: rgba(16, 185, 129, .10);
  border: 1px solid rgba(16, 185, 129, .25);
  color: #059669;
}
[data-theme="dark"] .ty-div-lookup-msg.is-ok { color: #34d399; }
.ty-div-lookup-msg.is-err {
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .24);
  color: #dc2626;
}
[data-theme="dark"] .ty-div-lookup-msg.is-err { color: #f87171; }
.ty-hp-rn-tag {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.ty-hp-rn-tag.is-req {
  background: rgba(232, 91, 151, .11);
  color: var(--ty-accent, #e85b97);
}
.ty-hp-rn-tag.is-free {
  background: rgba(16, 185, 129, .11);
  color: #059669;
}
[data-theme="dark"] .ty-hp-rn-tag.is-free { color: #34d399; }

/* Product Divert Button, Crisp Native Font Rendering & Icon Alignment (20261123.4) */
.ty-modal-v7,
.ty-modal-v7 .modal-dialog,
.ty-modal-v7 .modal-content,
.ty-modal-v7 * {
  -webkit-font-smoothing: auto !important;
  -moz-osx-font-smoothing: auto !important;
  text-rendering: auto !important;
}
.ty-modal-v7.show .modal-dialog {
  transform: none !important;
}
.ty-modal-v7 .modal-content {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}
[data-theme="dark"] .ty-modal-v7 .modal-content {
  background: #1d1a22 !important;
}
.ty-modal-v7 .modal-title {
  color: #111827 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}
.ty-modal-v7 .ty-mv7-sub {
  color: #4b5563 !important;
  font-weight: 400 !important;
}
.ty-modal-v7 .ty-mv7-field > label {
  color: #111827 !important;
  font-weight: 600 !important;
}
.ty-hp-sel-name,
.ty-hp-name {
  color: #111827 !important;
  font-weight: 600 !important;
}
.ty-hp-sel-dom,
.ty-hp-domain {
  color: #4b5563 !important;
  font-weight: 500 !important;
}
[data-theme="dark"] .ty-modal-v7 .modal-title,
[data-theme="dark"] .ty-modal-v7 .ty-mv7-field > label,
[data-theme="dark"] .ty-hp-sel-name,
[data-theme="dark"] .ty-hp-name {
  color: #f3f4f6 !important;
}
[data-theme="dark"] .ty-modal-v7 .ty-mv7-sub,
[data-theme="dark"] .ty-hp-sel-dom,
[data-theme="dark"] .ty-hp-domain {
  color: #cbd5e1 !important;
}
.ty-hp-panel {
  background: #ffffff !important;
  border-color: #d1d5db !important;
}
[data-theme="dark"] .ty-hp-panel {
  background: #221e28 !important;
  border-color: rgba(255, 255, 255, .14) !important;
}
.ty-hp-trigger {
  background: #f9fafb !important;
  border-color: #d1d5db !important;
}
[data-theme="dark"] .ty-hp-trigger {
  background: #27222e !important;
  border-color: rgba(255, 255, 255, .14) !important;
}

.ty-div-launch-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 38px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  background: var(--ty-surface) !important;
  border: 1.5px solid rgba(232, 91, 151, .45) !important;
  color: var(--tyc-pink-dark, #c93472) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease !important;
}
.ty-div-launch-btn > i {
  width: 16px !important;
  height: 16px !important;
  font-size: 16px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}
.ty-div-launch-btn:hover,
.ty-div-launch-btn:focus {
  background: var(--ty-accent, #e85b97) !important;
  border-color: var(--ty-accent, #e85b97) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(232, 91, 151, .22) !important;
}
[data-theme="dark"] .ty-div-launch-btn {
  background: rgba(232, 91, 151, .12) !important;
  border-color: rgba(232, 91, 151, .45) !important;
  color: #ff8bbd !important;
}
[data-theme="dark"] .ty-div-launch-btn:hover,
[data-theme="dark"] .ty-div-launch-btn:focus {
  background: #e85b97 !important;
  border-color: #e85b97 !important;
  color: #fff !important;
}

.ty-divert-sub {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

/* Crisp banner alignment & high-contrast typography inside modal */
.ty-div-rn-banner,
.ty-div-modal-tip,
.ty-div-lookup-msg {
  display: flex;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 13px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 20px !important;
}
.ty-div-rn-banner > i,
.ty-div-modal-tip > i,
.ty-div-lookup-msg > i {
  width: 18px !important;
  height: 20px !important;
  font-size: 17px !important;
  line-height: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 18px !important;
  margin-top: 0 !important;
}
.ty-div-rn-banner.is-req {
  background: #fdf2f6 !important;
  border: 1px solid #f6c8da !important;
  color: #881337 !important;
}
.ty-div-rn-banner.is-req > i { color: #db2777 !important; }
[data-theme="dark"] .ty-div-rn-banner.is-req {
  background: rgba(232, 91, 151, .14) !important;
  border-color: rgba(232, 91, 151, .32) !important;
  color: #fbcfe8 !important;
}
[data-theme="dark"] .ty-div-rn-banner.is-req > i { color: #f472b6 !important; }

.ty-div-modal-tip {
  background: #fffbeb !important;
  border: 1px solid #fde68a !important;
  color: #78350f !important;
}
.ty-div-modal-tip > i { color: #d97706 !important; }
[data-theme="dark"] .ty-div-modal-tip {
  background: rgba(245, 158, 11, .12) !important;
  border-color: rgba(245, 158, 11, .28) !important;
  color: #fde68a !important;
}
[data-theme="dark"] .ty-div-modal-tip > i { color: #fbbf24 !important; }

.ty-div-lookup-msg {
  display: none;
  margin-top: 8px !important;
  padding: 9px 12px !important;
}
.ty-div-lookup-msg.is-loading,
.ty-div-lookup-msg.is-ok,
.ty-div-lookup-msg.is-err {
  display: flex !important;
}
.ty-div-lookup-msg.is-loading {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
.ty-div-lookup-msg.is-ok {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
}
.ty-div-lookup-msg.is-ok > i { color: #059669 !important; }
[data-theme="dark"] .ty-div-lookup-msg.is-ok {
  background: rgba(16, 185, 129, .14) !important;
  border-color: rgba(16, 185, 129, .30) !important;
  color: #a7f3d0 !important;
}
.ty-div-lookup-msg.is-err {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
}
.ty-div-lookup-msg.is-err > i { color: #dc2626 !important; }
[data-theme="dark"] .ty-div-lookup-msg.is-err {
  background: rgba(239, 68, 68, .14) !important;
  border-color: rgba(239, 68, 68, .32) !important;
  color: #fecaca !important;
}

.ty-div-lookup-row .form-control,
.ty-div-lookup-btn {
  height: 38px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
}
.ty-div-lookup-btn {
  padding: 0 15px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ty-modal-v7 .ty-mv7-foot .btn {
  height: 38px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  line-height: 1 !important;
}
.ty-modal-v7 .ty-mv7-foot .btn > i {
  font-size: 16px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}


/* ===== TY-DIVERT-NOTICE-20261125: 产品列表「待转入」提示条精修 ===== */
body[data-ty-console="1"] .table-header .ty-divert-notice {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 13px;
  margin: 0 !important;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.11);
  border: 1px solid rgba(245, 158, 11, 0.34);
  color: #92400e;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  flex: 0 1 auto;
  box-shadow: none;
}
html[data-theme="dark"] body[data-ty-console="1"] .table-header .ty-divert-notice {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.34);
  color: #fde68a;
}
body[data-ty-console="1"] .table-header .ty-divert-notice-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
  font-size: 14px;
  flex-shrink: 0;
}
html[data-theme="dark"] body[data-ty-console="1"] .table-header .ty-divert-notice-ico {
  background: rgba(251, 191, 36, 0.20);
  color: #fbbf24;
}
body[data-ty-console="1"] .table-header .ty-divert-notice-text strong {
  color: #b45309;
  font-weight: 750;
  margin: 0 2px;
}
html[data-theme="dark"] body[data-ty-console="1"] .table-header .ty-divert-notice-text strong {
  color: #fcd34d;
}
body[data-ty-console="1"] .table-header .ty-divert-notice-cta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease;
}
body[data-ty-console="1"] .table-header .ty-divert-notice-cta:hover {
  background: #d97706;
  color: #ffffff !important;
  transform: translateY(-1px);
}
body[data-ty-console="1"] .table-header .ty-divert-notice .close {
  position: static !important;
  padding: 0 2px !important;
  margin-left: 2px;
  float: none !important;
  font-size: 16px;
  line-height: 1;
  color: inherit !important;
  opacity: .55;
  text-shadow: none;
}
body[data-ty-console="1"] .table-header .ty-divert-notice .close:hover {
  opacity: .95;
}
@media (max-width: 767.98px) {
  body[data-ty-console="1"] .table-header .ty-divert-notice {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 8px 12px;
  }
}


/* ===== TY-MCA-SKEL-20261125: 产品详情模块子页骨架屏与按需优先加载 ===== */
.ty-mca-slot {
  width: 100%;
  min-height: 220px;
}
.ty-mca-skel {
  padding: 4px 0;
}
.ty-mca-skel-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: 11px;
  background: var(--ty-accent-subtle, rgba(232, 91, 151, .08));
  border: 1px solid rgba(232, 91, 151, .18);
  color: var(--ty-accent, #e85b97);
  font-size: 12.5px;
  font-weight: 600;
}
@keyframes tyMcaSpin { to { transform: rotate(360deg); } }
.ty-mca-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  box-sizing: border-box;
  flex-shrink: 0;
  animation: tyMcaSpin .75s linear infinite;
}
.ty-mca-skel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ty-mca-skel-card {
  border-radius: 14px;
  border: 1px solid var(--ty-border, rgba(0, 0, 0, .08));
  background: var(--ty-surface, #fff);
  padding: 16px;
}
.ty-mca-skel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--ty-border, rgba(0, 0, 0, .06));
}
.ty-mca-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(148,163,184,.14) 25%, rgba(148,163,184,.26) 50%, rgba(148,163,184,.14) 75%);
  background-size: 200% 100%;
  animation: tyMcaShimmer 1.3s ease-in-out infinite;
}
.ty-mca-line.is-title { width: 120px; height: 15px; }
.ty-mca-line.is-btn { width: 88px; height: 30px; border-radius: 8px; }
.ty-mca-line.is-row { width: 100%; height: 14px; margin-bottom: 11px; }
.ty-mca-line.is-row.is-short { width: 68%; margin-bottom: 0; }
@keyframes tyMcaShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ty-mca-err {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 42px 20px;
  border-radius: 14px;
  border: 1px dashed var(--ty-border-2, rgba(0, 0, 0, .14));
  background: var(--ty-surface-2, rgba(0, 0, 0, .02));
  color: var(--ty-text-2, #4b5563);
  font-size: 13px;
  text-align: center;
}
.ty-mca-retry {
  height: 34px;
  padding: 0 16px;
  border-radius: 9px;
  border: none;
  background: var(--ty-accent, #e85b97);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.ty-mca-retry:hover { opacity: .9; }
@media (max-width: 1199.98px) {
  .ty-mca-skel-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* TY-MODAL-CENTER-20261126 */
body[data-ty-console="1"].modal-open,
body[data-ty-console="1"] .modal.ty-modal-v7 {
  padding-right: 0 !important;
  padding-left: 0 !important;
}
.ty-modal-v7 .modal-header.ty-mv7-head > *,
.ty-modal-v7 .modal-header.ty-mv7-head .modal-title,
.ty-modal-v7 .modal-header.ty-mv7-head .ty-mv7-sub {
  margin-left: auto;
  margin-right: auto;
}
.ty-modal-v7.ty-modal-v7-wide .modal-header.ty-mv7-head > *,
.ty-modal-v7.ty-modal-v7-wide .modal-header.ty-mv7-head .modal-title,
.ty-modal-v7.ty-modal-v7-wide .modal-header.ty-mv7-head .ty-mv7-sub {
  margin-left: 0;
  margin-right: 0;
}
