:root {
  --bg: #f0f4f8;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #e0e6ed;
  --text: #1a2332;
  --muted: #6b7b8d;
  --accent: #3d5df3;
  --accent-dark: #2e46b6;
  --accent-light: #778ef7;
  --accent-soft: #eceffe;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 4px 24px rgba(0, 40, 100, 0.08);
}

* { box-sizing: border-box; }

html { overflow-y: scroll; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
}

a { color: inherit; text-decoration: none; }

/* ===== Core Components / Tabs: Solid icons ===== */
.core-solid-tabs {
  display:flex;
  list-style:none;
  flex-wrap:wrap;
  gap:22px;
  border:0;
  padding:0;
  margin:0;
}
.core-solid-tabs .core-tab-item { margin:0; }
.core-solid-tabs .core-tab-link,
.nav-pills.core-solid-tabs .core-tab-link,
.filter-tabs.core-solid-tabs .core-tab-link {
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:0 !important;
  border-radius:0;
  background:transparent !important;
  color:#8b9098;
  padding:8px 0 11px;
  min-height:38px;
  font-size:14px;
  font-weight:600;
  line-height:1.2;
  letter-spacing:.01em;
  white-space:nowrap;
  text-decoration:none;
  box-shadow:none !important;
  transition:color .15s ease;
}
.core-solid-tabs .core-tab-link::after,
.nav-pills.core-solid-tabs .core-tab-link::after,
.filter-tabs.core-solid-tabs .core-tab-link::after {
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  width:30%;
  height:3px;
  margin:0 auto;
  border-radius:999px;
  background:currentColor;
  opacity:0;
  transition:opacity .2s ease, width .2s ease, background-color .2s ease;
}
.core-solid-tabs .core-tab-link:hover,
.nav-pills.core-solid-tabs .core-tab-link:hover,
.filter-tabs.core-solid-tabs .core-tab-link:hover { color:#4b5563; }
.core-solid-tabs .core-tab-link.active,
.nav-pills.core-solid-tabs .core-tab-link.active,
.filter-tabs.core-solid-tabs .core-tab-link.active {
  color:var(--accent);
  background:transparent !important;
  box-shadow:none !important;
}
.core-solid-tabs .core-tab-link.active::after,
.nav-pills.core-solid-tabs .core-tab-link.active::after,
.filter-tabs.core-solid-tabs .core-tab-link.active::after {
  opacity:1;
  width:min(60px, 100%);
  animation:coreSolidTabLineIn .22s ease both;
}
@keyframes coreSolidTabLineIn {
  from { opacity:0; width:30%; }
  to { opacity:1; width:min(60px, 100%); }
}
.core-solid-tabs .core-tab-icon {
  width:18px;
  min-width:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
  line-height:1;
}
.core-solid-tabs .core-tab-svg { display:block; width:18px; height:18px; }
.core-solid-tabs .core-tab-text { line-height:1.2; }
.core-solid-tabs .badge { font-weight:700; }
@media(max-width:767px) {
  .core-solid-tabs { overflow-x:auto; flex-wrap:nowrap; gap:18px; padding-bottom:2px; }
}


/* ===== Core Components / List & DataTable ===== */
.core-list-page-title { margin-bottom: 22px; }
.core-list-page-title h1 { margin:0 0 4px; color:#172033; font-weight:700; letter-spacing:.01em; }
.core-list-page-title p { margin:0; color:#7b8496; }
.core-list-card { background:#fff; border:1px solid #e8edf7; border-radius:18px; box-shadow:0 12px 34px rgba(15,23,42,.05); overflow:hidden; }
.core-list-toolbar { padding:18px 20px; display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; border-bottom:1px solid #edf1f7; }
.core-list-toolbar-main { min-width:190px; display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; }
.core-list-title { margin:0; color:#172033; font-size:16px; font-weight:700; }
.core-list-heading { min-width:120px; }
.core-list-subtitle { margin-top:3px; color:#7b8496; font-size:12px; }
.core-list-filter { display:flex; align-items:flex-end; justify-content:flex-end; gap:10px; flex-wrap:nowrap; margin-left:auto; }
.core-field { position:relative; min-width:190px; }
.core-field.core-field-search { min-width:320px; }
.core-field.core-field-sm { min-width:112px; }
/* 筛选栏里的开关型勾选（如数据中心「只看有数据」）：不占 190px 的下拉宽度，
   且与同排的 40px 高输入框底对齐（.core-list-filter 是 align-items:flex-end）。 */
.core-field.core-field-check { min-width:auto; display:flex; align-items:center; height:40px; }
.core-field.core-field-check .form-check-label { font-size:13px; color:#3d4759; cursor:pointer; }
.core-field.core-field-check .form-check-input { cursor:pointer; }

.core-filter-check { min-height:40px; display:flex; align-items:center; padding:0 4px; color:#667085; white-space:nowrap; }
.core-list-table td.core-cell-wrap { white-space:normal; }
.core-list-table td.core-cell-ellipsis { max-width:320px; overflow:hidden; text-overflow:ellipsis; }
.core-field > label { position:absolute; top:-7px; left:12px; z-index:2; padding:0 6px; color:#7b8496; background:#fff; font-size:11px; font-weight:700; line-height:1; letter-spacing:.02em; }
.core-field .form-control,
.core-field .form-select { height:40px; padding-top:10px; border-radius:10px; background-color:#fff; font-size:13px; }
.core-field .form-select { appearance:none; -webkit-appearance:none; padding-right:34px; background-position:right .75rem center; background-repeat:no-repeat; }
.core-field-search .form-control { padding-left:36px; padding-right:34px; }
.core-field-search::before { content:'⌕'; position:absolute; left:13px; top:50%; transform:translateY(-50%); z-index:2; color:#98a2b3; font-size:17px; line-height:1; pointer-events:none; }
.core-search-clear { position:absolute; right:9px; top:50%; transform:translateY(-50%); z-index:3; width:22px; height:22px; border:0; border-radius:50%; display:none; align-items:center; justify-content:center; color:#98a2b3; background:#f2f4f7; font-size:16px; line-height:1; cursor:pointer; }
.core-search-clear:hover { color:#344054; background:#e4e7ec; }
.core-field-search.has-value .core-search-clear { display:flex; }
.core-accordion { display:flex; flex-direction:column; gap:14px; }
.core-accordion-item { background:#fff; border:1px solid #e8edf7; border-radius:18px; box-shadow:0 10px 28px rgba(15,23,42,.06); overflow:hidden; }
.core-accordion-header { width:100%; min-height:58px; padding:0 18px; border:0; background:#fff; color:#172033; display:flex; align-items:center; justify-content:space-between; gap:14px; cursor:pointer; transition:background .15s ease, color .15s ease; }
.core-accordion-header:hover { background:#fbfcff; }
.core-accordion-title { display:flex; align-items:center; gap:10px; min-width:0; }
.core-accordion-icon { width:26px; height:26px; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; background:var(--cork-primary-soft); color:var(--cork-primary); transition:transform .16s ease, background .15s ease, color .15s ease; flex-shrink:0; }
.core-accordion-item.is-collapsed .core-accordion-header,
.core-accordion-item.collapsed .core-accordion-header { background:#f6f8fc; color:#667085; }
.core-accordion-item.is-collapsed .core-accordion-header:hover,
.core-accordion-item.collapsed .core-accordion-header:hover { background:#eef3fb; }
.core-accordion-item.is-collapsed .core-accordion-icon,
.core-accordion-item.collapsed .core-accordion-icon { transform:rotate(-90deg); background:#e4e7ec; color:#667085; }
.core-accordion-name { font-size:15px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.core-accordion-count { min-width:24px; height:22px; padding:0 8px; border-radius:999px; background:#eef4ff; color:var(--cork-primary); font-size:12px; font-weight:800; display:inline-flex; align-items:center; justify-content:center; }
.core-accordion-item.is-collapsed .core-accordion-count,
.core-accordion-item.collapsed .core-accordion-count { background:#fff; color:#667085; }
.core-accordion-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.core-accordion-meta { color:#8a94a6; font-size:12px; font-weight:600; }
.core-accordion-body { border-top:1px solid #edf1f7; }
.core-accordion-item.is-collapsed .core-accordion-body,
.core-accordion-item.collapsed .core-accordion-body { display:none; }
.core-accordion .core-list-table-wrap { border-radius:0; }
.core-list-table-wrap { overflow-x:auto; overflow-y:hidden; }
.core-list-table { min-width:960px; margin:0 !important; border-collapse:separate; border-spacing:0; }
.core-list-table thead { border:0; }
.core-list-table thead th { padding:12px 20px; border:0; border-bottom:1px solid #edf1f7; color:#7b8496; background:#fbfcff; font-size:12px; font-weight:700; letter-spacing:.04em; white-space:nowrap; }
.core-list-table tbody tr { background:#fff; transition:background .12s ease; }
.core-list-table tbody tr:nth-child(even) { background:#f7f8fa; }
.core-list-table tbody td { padding:13px 20px; border:0; border-bottom:1px dashed #e1e7f0; color:#344054; vertical-align:middle; white-space:nowrap; background:transparent; }
.ip-region-stack { line-height:1.28; white-space:normal; min-width:150px; }
.ip-region-main { color:#344054; font-weight:600; }
.ip-region-sub { margin-top:3px; color:#8a94a6; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:12px; }
.core-list-table tbody tr:last-child td { border-bottom:0; }
.core-list-table tbody tr:hover { background:#f1f5fb; }
.core-list-table .col-sticky { position:sticky; right:0; background:inherit; box-shadow:-8px 0 18px rgba(15,23,42,.04); }
.core-list-table thead .col-sticky { background:#fbfcff; }
.core-item-main { color:#172033; font-size:14px; font-weight:700; line-height:1.25; }
.core-item-main a { color:inherit; text-decoration:none; }
.core-item-main a:hover { color:var(--cork-primary); }
.core-item-sub { margin-top:3px; color:#8a94a6; font-size:12px; line-height:1.25; }
.core-avatar { width:34px; height:34px; border-radius:50%; flex-shrink:0; object-fit:cover; box-shadow:0 0 0 2px #fff, 0 0 0 3px #edf1f7; }
.core-avatar-placeholder { display:inline-flex; align-items:center; justify-content:center; color:#98a2b3; background:#edf2fb; font-size:15px; }
/* 统一「用户」单元格（全站 9 处列表复用，见 public/javascripts/viewer-cell.js） */
.user-cell { display:flex; align-items:center; gap:10px; }
.user-cell .user-meta { min-width:0; }
.user-cell .user-name { display:block; color:#333; font-size:14px; font-weight:600; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:180px; }
.user-cell a.user-name-link { text-decoration:none; }
.user-cell a.user-name-link:hover { color:var(--accent); }
.user-cell .user-id { margin-top:3px; color:#999; font-size:12px; line-height:1.2; }
.region-text { color:#344054; }
.core-status { display:inline-flex; align-items:center; justify-content:center; min-height:24px; padding:4px 9px; border-radius:999px; font-size:12px; font-weight:700; line-height:1; border:1px solid transparent; white-space:nowrap; }
.core-status-success { color:#039855; background:#ecfdf3; border-color:#abefc6; }
.core-status-warning { color:#b54708; background:#fffaeb; border-color:#fedf89; }
.core-status-danger { color:#d92d20; background:#fef3f2; border-color:#fecdca; }
.core-status-muted { color:#667085; background:#f2f4f7; border-color:#e4e7ec; }
.core-status-info { color:#2e46b6; background:#eceffe; border-color:#d9dfff; }
.core-row-actions { display:inline-flex; align-items:center; justify-content:center; gap:4px; white-space:nowrap; }
.core-btn-text { background:transparent; border:0; padding:4px 7px; color:var(--cork-primary); font-size:13px; font-weight:700; cursor:pointer; text-decoration:none; }
.core-btn-text:hover { color:var(--cork-primary-dark); text-decoration:none; }
.core-btn-text-danger { color:#d92d20; }
.core-btn-text-danger:hover { color:#b42318; }
/* 禁用态（2026-08-08）：文字按钮原本只用在 <a> 和从不禁用的 <button> 上，所以一直没这条。
   部门成员页的「编辑/删除/批量删除/添加成员」在未选部门时是 disabled 的，
   没有这条的话禁用按钮和可点按钮长得一模一样，点了没反应会让人以为坏了。 */
.core-btn-text:disabled,
.core-btn-text[disabled] { opacity:.42; cursor:not-allowed; }
.core-btn-text:disabled:hover,
.core-btn-text[disabled]:hover { color:var(--cork-primary); }
.core-btn-text-danger:disabled:hover,
.core-btn-text-danger[disabled]:hover { color:#d92d20; }

/* Core Tooltip */
.core-tooltip-trigger,
.core-help-icon {
  width:18px;
  height:18px;
  border:1px solid #d9dfff;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--accent);
  background:var(--accent-soft);
  font-size:11px;
  font-weight:800;
  line-height:1;
  cursor:help;
  vertical-align:middle;
  user-select:none;
}
.core-tooltip-trigger:hover,
.core-help-icon:hover { color:#fff; background:var(--accent); border-color:var(--accent); }
.tooltip.core-tooltip {
  --bs-tooltip-bg:#172033;
  --bs-tooltip-color:#fff;
  --bs-tooltip-opacity:1;
  --bs-tooltip-border-radius:12px;
  --bs-tooltip-padding-x:12px;
  --bs-tooltip-padding-y:8px;
  font-family:"Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
}
.tooltip.core-tooltip .tooltip-inner {
  max-width:280px;
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 14px 34px rgba(15,23,42,.22);
  font-size:12px;
  font-weight:600;
  line-height:1.45;
  text-align:left;
}

.core-drag-handle { width:28px; height:28px; border:0; border-radius:9px; display:inline-flex; align-items:center; justify-content:center; color:#98a2b3; background:#eef2f8; font-size:15px; line-height:1; cursor:grab; transition:background .15s ease, color .15s ease, transform .15s ease; }
.core-drag-handle:hover { color:var(--cork-primary); background:#e9edff; }
.core-drag-handle:active { cursor:grabbing; }
.core-list-table tr.is-dragging { opacity:.58; }
.core-list-table tr.drag-over td { background:#eef4ff; }
.core-list-empty { padding:48px 20px; text-align:center; color:#8a94a6; }
.core-loading-skeleton { padding:18px; }
.core-loading-skeleton.placeholder-wave { display:block; }
.core-skeleton-card { background:#fff; border:1px solid #e8edf7; border-radius:18px; box-shadow:0 10px 28px rgba(15,23,42,.04); overflow:hidden; }
.core-skeleton-card + .core-skeleton-card { margin-top:14px; }
.core-skeleton-head { min-height:58px; padding:0 18px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid #edf1f7; }
.core-skeleton-lines { display:flex; flex-direction:column; gap:8px; flex:1; min-width:0; }
.core-skeleton-table { padding:14px 18px; display:grid; gap:12px; }
.core-skeleton-row { display:grid; grid-template-columns:1.2fr .8fr .7fr .7fr; gap:18px; align-items:center; }
.core-skeleton-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(72px, 1fr)); gap:10px; padding:12px; }
.core-skeleton-thumb { height:58px; border-radius:12px; }
.core-skeleton-tree { display:grid; gap:10px; padding:8px 2px; }
.core-skeleton-table-row { display:grid; grid-template-columns:1.3fr .7fr .8fr .6fr; gap:16px; align-items:center; padding:13px 20px; border-bottom:1px dashed #e1e7f0; }
.placeholder-wave .placeholder,
.core-loading-skeleton .placeholder,
.list-skeleton .placeholder { background-color:#dfe6f1; opacity:1; }
.img-placeholder-wrap { position:relative; }
.img-placeholder-wrap.is-img-loading::before { content:''; position:absolute; inset:0; z-index:20; display:block; border-radius:inherit; background-color:#dfe6f1; pointer-events:none; }
.img-placeholder-wrap.is-img-loading::after { content:''; position:absolute; inset:0; z-index:21; display:block; border-radius:inherit; background:linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation:placeholder-wave 2s linear infinite; pointer-events:none; }
.img-placeholder-wrap.is-img-loading > img { opacity:0; }
.core-list-pagination { padding:15px 18px; background:#fff; border:1px solid #e8edf7; border-radius:16px; box-shadow:0 10px 28px rgba(15,23,42,.04); }
.core-list-pagination .pagination { gap:6px; }
.core-list-pagination .page-link { min-width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; padding:0 10px; border-radius:9px !important; }
.core-reset-btn.is-disabled,
.core-reset-btn.disabled,
a.core-reset-btn[aria-disabled="true"] { opacity:.48; pointer-events:none; cursor:not-allowed; }
@media(max-width:767px) {
  .core-list-toolbar { align-items:stretch; padding:16px; }
  .core-list-toolbar-main { width:100%; }
  .core-list-filter { width:100%; justify-content:stretch; flex-wrap:wrap; }
  .core-field, .core-field.core-field-search { width:100%; min-width:0; }
  .core-list-filter .btn { flex:1 1 auto; }
  .core-list-pagination { padding:12px; }
  .core-accordion-header { align-items:flex-start; flex-direction:column; padding:14px 16px; }
  .core-accordion-actions { justify-content:flex-start; gap:10px; }
}

/* ===== Cork vertical-light-menu shell ===== */
:root {
  --cork-primary: #3d5df3;
  --cork-primary-dark: #2e46b6;
  --cork-primary-soft: #eceffe;
  --cork-sidebar-width: 240px;
  --cork-sidebar-collapsed: 82px;
  --cork-header-height: 56px;
  --cork-sub-header-height: 64px;
}

.top-navbar.cork-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1040;
  height: var(--cork-header-height);
  background: #fff;
  border-bottom: 1px solid #e8edf7;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 18px;
}
.cork-header-left { display:flex; align-items:center; gap:14px; min-width:0; }
.sidebar-toggle-btn {
  width: 38px; height: 38px; border: 1px solid rgba(61,93,243,.18); border-radius: 12px;
  background: var(--cork-primary-soft); color: var(--cork-primary);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; cursor:pointer;
  box-shadow: 0 6px 14px rgba(61,93,243,.08);
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
}
.sidebar-toggle-btn:hover { background: var(--cork-primary); color:#fff; box-shadow:0 10px 22px rgba(61,93,243,.24); transform:translateY(-1px); }
.sidebar-toggle-btn span { width:18px; height:2px; border-radius:2px; background:currentColor; display:block; }
.top-navbar .navbar-brand { display:flex; align-items:center; gap:10px; flex-shrink:0; margin:0; }
.top-navbar .navbar-brand img { width:34px; height:34px; border-radius:10px; object-fit:cover; }
.top-navbar .navbar-brand-text { font-size:16px; font-weight:800; color:#0f172a; white-space:nowrap; letter-spacing:.02em; }
.cork-header-search {
  flex:1; max-width:460px; height:38px; border:1px solid #edf1f7; border-radius:14px; background:#f8fafc;
  display:flex; align-items:center; gap:10px; padding:0 12px; color:#7b8497; min-width:160px;
}
.cork-header-search .search-icon { font-size:18px; color:var(--cork-primary); }
.cork-header-search .search-text { flex:1; font-size:13px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.cork-header-search .search-kbd { font-size:11px; color:#9aa3b5; background:#fff; border:1px solid #e8edf7; padding:2px 7px; border-radius:7px; }

.navbar-user { flex-shrink:0; margin-left:0; position:relative; }
.navbar-user-btn {
  display:flex; align-items:center; gap:9px; height:40px; background:#fff; border:1px solid #edf1f7; cursor:pointer;
  padding:4px 10px 4px 5px; border-radius:999px; transition:background .15s, box-shadow .15s; color:#172033;
}
.navbar-user-btn:hover { background:#f8fafc; box-shadow:0 4px 14px rgba(15,23,42,.06); }
.navbar-user-btn .user-avatar {
  width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,var(--cork-primary),#778ef7); color:#fff;
  font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; border:none;
}
.navbar-user-btn .user-name { max-width:110px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; font-weight:600; }
.navbar-user-btn .caret { font-size:14px; color:#7b8497; transition: transform .2s; }
.navbar-user-btn.open .caret { transform: rotate(180deg); }
.user-dropdown {
  display:none; position:absolute; top:calc(100% + 10px); right:0; width:260px; background:#fff; border-radius:16px;
  box-shadow:0 18px 42px rgba(15,23,42,.14); border:1px solid #edf1f7; padding:8px 0; z-index:1060;
}
.user-dropdown.show { display:block; }
.user-dropdown .ud-profile { display:flex; align-items:center; gap:12px; padding:16px 18px; border-bottom:1px dashed #dbe3ef; }
.user-dropdown .ud-avatar { width:44px; height:44px; border-radius:50%; background:linear-gradient(135deg,var(--cork-primary),#778ef7); color:#fff; font-size:18px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.user-dropdown .ud-info { display:flex; flex-direction:column; justify-content:center; min-width:0; }
.user-dropdown .ud-name { font-size:14px; font-weight:700; color:#172033; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-dropdown .ud-phone { font-size:12px; color:#7b8497; line-height:1.3; }
.user-dropdown .ud-item { display:flex; align-items:center; gap:10px; padding:10px 18px; font-size:14px; color:#172033; cursor:pointer; transition:background .1s,color .1s; }
.user-dropdown .ud-item:hover { background:var(--cork-primary-soft); color:var(--cork-primary); }
.user-dropdown .ud-item .ud-icon { font-size:16px; width:20px; text-align:center; }
.user-dropdown .ud-divider { height:0; border-top:1px dashed #dbe3ef; background:transparent; margin:6px 18px; }
.user-dropdown .ud-item.danger { color:var(--danger); }

.cork-sidebar {
  position:fixed; left:0; top:var(--cork-header-height); bottom:0; width:var(--cork-sidebar-width); z-index:1030;
  background:#fff; border-right:1px solid #e8edf7; box-shadow:8px 0 24px rgba(15,23,42,.03); transition:width .2s ease, transform .2s ease;
  display:flex; flex-direction:column;
}
.sidebar-brand { height:64px; display:flex; align-items:center; justify-content:space-between; padding:0 18px; border-bottom:1px solid #f1f4f9; }
.sidebar-logo { display:flex; align-items:center; gap:10px; min-width:0; }
.sidebar-logo img { width:32px; height:32px; border-radius:9px; object-fit:cover; }
.sidebar-logo span { font-size:16px; font-weight:800; color:#172033; }
.sidebar-collapse-btn {
  width:30px; height:30px; border:1px solid rgba(61,93,243,.18); border-radius:10px;
  background:var(--cork-primary-soft); color:var(--cork-primary); cursor:pointer;
  font-size:20px; line-height:1; display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 14px rgba(61,93,243,.08);
  transition:background .15s,color .15s,box-shadow .15s,transform .15s;
}
.sidebar-collapse-btn:hover { background:var(--cork-primary); color:#fff; box-shadow:0 10px 22px rgba(61,93,243,.24); transform:translateY(-1px); }
.sidebar-shadow { height:12px; background:linear-gradient(180deg,rgba(15,23,42,.06),transparent); opacity:.7; }
.sidebar-nav { flex:1; overflow-y:auto; padding:10px 12px 18px; }
.sidebar-heading { padding:12px 12px 8px; font-size:11px; font-weight:800; color:#a0a8b8; letter-spacing:.12em; }
.sidebar-link {
  display:flex; align-items:center; gap:12px; width:100%; min-height:42px; padding:10px 12px; border:0; border-radius:12px; color:#596277;
  background:transparent; text-align:left; font:inherit; font-size:14px; font-weight:600; margin:3px 0; transition:background .15s,color .15s,box-shadow .15s;
}
.sidebar-link:hover { background:#f7f8fd; color:var(--cork-primary); }
.sidebar-parent-toggle { cursor:pointer; }
.sidebar-link.is-active { background:var(--cork-primary-soft); color:var(--cork-primary); box-shadow:inset 3px 0 0 var(--cork-primary); }
.sidebar-icon { width:24px; height:24px; display:inline-flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; color:currentColor; }
.sidebar-svg-icon { display:block; width:20px; height:20px; color:currentColor; }
.sidebar-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.cork-sub-header {
  position:fixed; top:var(--cork-header-height); left:var(--cork-sidebar-width); right:0; height:var(--cork-sub-header-height); z-index:1025;
  background:#fff; border-bottom:1px solid #e8edf7; box-shadow:0 6px 18px rgba(15, 23, 42, .04); display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:0 28px; transition:left .2s ease;
}
.cork-sub-header h1 { margin:2px 0 0; font-size:20px; line-height:1.2; font-weight:800; color:#172033; }
.sub-header-kicker { font-size:11px; font-weight:800; color:var(--cork-primary); letter-spacing:.12em; text-transform:uppercase; }
.sub-header-actions { display:flex; align-items:center; gap:8px; color:#7b8497; font-size:13px; white-space:nowrap; }
.sub-header-link { color:var(--cork-primary); font-weight:600; }

.app-shell { min-height:100vh; padding-top:calc(var(--cork-header-height) + var(--cork-sub-header-height)); background:#f8fafc; }
.content-area { min-width:0; width:auto; margin-left:var(--cork-sidebar-width); transition:margin-left .2s ease; }

body.sidebar-collapsed .cork-sidebar { width:var(--cork-sidebar-collapsed); }
body.sidebar-collapsed .sidebar-logo span, body.sidebar-collapsed .sidebar-label, body.sidebar-collapsed .sidebar-heading { display:none; }
body.sidebar-collapsed .sidebar-brand { padding:0 14px; justify-content:center; }
body.sidebar-collapsed .sidebar-collapse-btn { display:none; }
body.sidebar-collapsed .cork-sidebar { overflow: visible; }
body.sidebar-collapsed .sidebar-nav { overflow: visible; }
body.sidebar-collapsed .sidebar-link { justify-content:center; padding:10px; position:relative; }
body.sidebar-collapsed .sidebar-link::after {
  content: attr(data-title);
  position:absolute;
  left:calc(100% + 12px);
  top:50%;
  transform:translateY(-50%) translateX(-4px);
  min-width:max-content;
  max-width:180px;
  padding:7px 10px;
  border-radius:9px;
  background:#172033;
  color:#fff;
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
  box-shadow:0 10px 24px rgba(15,23,42,.2);
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  z-index:1050;
}
body.sidebar-collapsed .sidebar-link::before {
  content:'';
  position:absolute;
  left:calc(100% + 6px);
  top:50%;
  transform:translateY(-50%);
  border:6px solid transparent;
  border-right-color:#172033;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease;
  z-index:1051;
}
body.sidebar-collapsed .sidebar-link:hover::after {
  opacity:1;
  transform:translateY(-50%) translateX(0);
}
body.sidebar-collapsed .sidebar-link:hover::before { opacity:1; }
body.sidebar-collapsed .cork-sub-header { left:var(--cork-sidebar-collapsed); }

/* Sidebar nested menu */
.sidebar-item { position: relative; }
.sidebar-link .sidebar-caret {
  margin-left:auto;
  color:#a0a8b8;
  font-size:13px;
  transition: transform .15s ease, color .15s ease;
}
.sidebar-item.is-open .sidebar-caret { transform: rotate(180deg); color: var(--cork-primary); }
.sidebar-submenu {
  display:none;
  margin:2px 0 8px 36px;
  padding-left:10px;
  border-left:1px solid #e7ecf5;
}
.sidebar-item.is-open .sidebar-submenu { display:block; }
.sidebar-sublink {
  display:block;
  padding:7px 10px;
  margin:2px 0;
  border-radius:9px;
  color:#667085;
  font-size:13px;
  font-weight:600;
  text-decoration:none;
  transition: background .15s, color .15s;
}
.sidebar-sublink:hover { color:var(--cork-primary); background:var(--cork-primary-soft); }
.sidebar-sublink.is-active { color:var(--cork-primary); background:var(--cork-primary-soft); font-weight:800; }
body.sidebar-collapsed .sidebar-link .sidebar-caret,
body.sidebar-collapsed .sidebar-submenu,
body.sidebar-collapsed .sidebar-item.is-open .sidebar-submenu { display:none; }
@media (max-width: 991.98px) {
  body.sidebar-collapsed .sidebar-link .sidebar-caret { display:inline; }
  body.sidebar-collapsed .sidebar-submenu { display:none; }
  body.sidebar-collapsed .sidebar-item.is-open .sidebar-submenu { display:block; }
}
body.sidebar-collapsed .content-area { margin-left:var(--cork-sidebar-collapsed); }

.sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(15,23,42,.42); z-index:1029; }

/* ===== Cards & Panels ===== */
.hero, .panel {
  border-radius: 16px;
  background: var(--panel);
}

.hero-title { font-size: 36px; line-height: 1.1; }
.hero-desc { max-width: 720px; color: var(--muted); font-size: 16px; }

.hero-badge {
  min-width: 140px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, #dce8ff 100%);
}
.hero-badge span { display: block; color: var(--muted); font-size: 12px; }
.hero-badge strong { display: block; margin-top: 6px; font-size: 24px; }

.panel { margin-bottom: 20px; padding: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-title { margin: 6px 0 0; font-size: 22px; }

.brand-kicker, .panel-kicker, .hero-kicker, .module-card-kicker {
  display: inline-block;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

/* ===== Module / Metric Cards ===== */
.module-card, .metric-card {
  display: block;
  height: 100%;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  transition: border-color .2s, box-shadow .2s;
}
.module-card:hover { border-color: var(--accent-light); box-shadow: 0 4px 16px rgba(0,141,255,.08); }
.module-card.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, #ffffff 100%);
}

.module-card-title { display: block; margin-top: 10px; font-size: 20px; }
.module-card-value { margin: 8px 0; font-size: 26px; font-weight: 700; }
.module-card-value em { font-style: normal; font-size: 14px; font-weight: 400; color: var(--muted); }
.module-card-desc, .metric-label, .metric-trend, .feature-body p { color: var(--muted); }

/* ===== Order Core Cards ===== */
.order-core-grid { padding:20px; display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:18px; }
.order-core-grid-compact { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.order-core-card { position:relative; min-height:100%; padding:22px; border:1px solid #e8edf7; border-radius:18px; background:#fff; box-shadow:0 10px 28px rgba(15,23,42,.04); overflow:hidden; display:flex; flex-direction:column; gap:16px; transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.order-core-card:hover { border-color:var(--cork-primary); box-shadow:0 16px 40px rgba(61,93,243,.10); transform:translateY(-1px); }
.order-core-card.is-featured { border-color:var(--cork-primary); background:linear-gradient(180deg,#fff 0%,#f7f9ff 100%); }
.order-core-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.order-core-card h3 { margin:9px 0 5px; color:#172033; font-size:20px; font-weight:800; }
.order-core-card p { margin:0; color:#7b8496; font-size:13px; }
.order-core-badge { display:inline-flex; align-items:center; min-height:24px; padding:4px 10px; border-radius:999px; color:var(--cork-primary); background:var(--cork-primary-soft); font-size:12px; font-weight:800; }
.order-core-price { color:#172033; font-size:30px; font-weight:900; line-height:1; white-space:nowrap; }
.order-core-price small { margin-left:2px; color:#7b8496; font-size:13px; font-weight:700; }
.order-core-size { color:var(--cork-primary); font-size:34px; font-weight:900; line-height:1; white-space:nowrap; }
.order-core-size small { margin-left:2px; color:#7b8496; font-size:14px; font-weight:800; }
.order-core-gift { padding:10px 12px; border-radius:12px; background:#f4f7ff; color:#344054; font-size:13px; font-weight:700; }
.order-core-gift strong { color:var(--cork-primary); }
.order-core-features { display:flex; flex-direction:column; gap:9px; flex:1; }
.order-core-feature { display:flex; align-items:flex-start; gap:9px; color:#344054; font-size:14px; line-height:1.45; }
.order-core-feature span { width:20px; height:20px; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; border-radius:50%; color:#039855; background:#ecfdf3; font-weight:900; font-size:12px; }
.order-core-price-row { margin-top:auto; display:flex; align-items:baseline; gap:8px; }
.order-core-price-sm { color:#d92d20; font-size:24px; font-weight:900; }
.order-core-origin { color:#98a2b3; text-decoration:line-through; font-size:13px; }
.order-corner-ribbon { position:absolute; top:14px; right:-31px; transform:rotate(45deg); min-width:120px; padding:3px 0; text-align:center; color:#fff; background:#d92d20; font-size:11px; font-weight:800; }
.order-resource-card { min-height:260px; }
@media(max-width:767px) {
  .order-core-grid { padding:16px; grid-template-columns:1fr; }
  .order-core-card { padding:18px; }
  .order-core-price { font-size:26px; }
}

.metric-value { display: flex; align-items: baseline; gap: 8px; margin: 10px 0; }
.metric-value strong { font-size: 30px; line-height: 1; }
.metric-value span { font-size: 14px; color: var(--muted); }
.trend-up { color: var(--success); }
.trend-flat { color: var(--warning); }
.trend-down { color: var(--danger); }

/* ===== Feature Items ===== */
.feature-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.feature-status {
  align-self: start; padding: 6px 12px; border-radius: 999px;
  text-align: center; color: var(--accent); background: var(--accent-soft);
  font-size: 12px; font-weight: 600;
}
.feature-body h3 { margin: 0 0 6px; font-size: 16px; }
.feature-body p { margin: 0; }

/* ===== Nav list (used inside cards) ===== */
.nav-list { display: grid; gap: 10px; }
.nav-item {
  display: block; padding: 14px 16px; border: 1px solid transparent; border-radius: 12px;
  background: var(--panel); transition: transform .15s, border-color .15s;
}
.nav-item:hover { transform: translateX(4px); border-color: var(--accent-light); }
.nav-item.is-active { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--panel)); }
.nav-item-name { display: block; font-size: 16px; font-weight: 600; }
.nav-item-subtitle { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

/* ===== Buttons ===== */
.btn-accent {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  border-radius: 10px;
  padding: 8px 20px;
  font-weight: 600;
}
.btn-accent:hover { color: #fff; background: var(--accent-dark); border-color: var(--accent-dark); }

/* ===== Filter Tabs ===== */
.filter-tabs .nav-link { border-radius: 10px; color: var(--text); font-size: 14px; padding: 6px 16px; }
.filter-tabs .nav-link.active { background: var(--accent); color: #fff; }
.filter-tabs .nav-link .badge { font-size: 11px; }

/* ===== Pagination ===== */
.pagination .page-link { border-radius: 8px; margin: 0 2px; border-color: var(--line); color: var(--text); }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); }

/* ===== Marketing Tabs ===== */
.mkt-tabs { border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.mkt-tab {
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--muted);
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.mkt-tab:hover { color: var(--text); }
.mkt-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.mkt-info { padding: 14px 16px; background: var(--accent-soft); border-radius: 12px; }
.mkt-info-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }

.mkt-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px;
}
.mkt-list-item:hover { border-color: var(--accent-light); }
.mkt-list-item .item-name { font-weight: 500; font-size: 14px; }
.mkt-list-item .item-status { font-size: 12px; color: var(--muted); }

/* ===== Stat card ===== */
.stat-card {
  padding: 16px; border-radius: 14px; text-align: center;
  background: var(--panel); border: 1px solid var(--line);
}
.stat-card .value { font-size: 28px; font-weight: 700; }
.stat-card .label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== App page container ===== */
.app-page-container,
.page-inner {
  /* 右下角 Boo/AI 悬浮按钮会遮住页面底部操作区，底部留出安全区 */
  padding: 28px 28px 176px;
}
@media (max-width: 1199.98px) {
  .app-page-container,
  .page-inner { padding: 24px 24px 176px; }
}
@media (max-width: 991.98px) {
  .app-page-container,
  .page-inner { padding: 22px 16px 168px; }
}
@media (max-width: 767.98px) {
  .app-page-container,
  .page-inner { padding: 16px 10px 156px; }
}

/* ===== Responsive shell ===== */
@media (max-width: 991.98px) {
  .top-navbar.cork-header { padding: 0 14px; }
  .top-navbar .navbar-brand-text { display: none; }
  .cork-header-search { display:none; }
  .navbar-user-btn .user-name { display:none; }
  .cork-sidebar { transform:translateX(-100%); width:var(--cork-sidebar-width); }
  .cork-sub-header { left:0; padding:0 18px; }
  .content-area { margin-left:0; }
  body.sidebar-open .cork-sidebar { transform:translateX(0); }
  body.sidebar-open .sidebar-overlay { display:block; }
  body.sidebar-collapsed .cork-sidebar { width:var(--cork-sidebar-width); }
  body.sidebar-collapsed .cork-sub-header { left:0; }
  body.sidebar-collapsed .content-area { margin-left:0; }
  body.sidebar-collapsed .sidebar-logo span,
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .sidebar-heading { display:initial; }
  body.sidebar-collapsed .sidebar-link { justify-content:flex-start; padding:10px 12px; }
  body.sidebar-collapsed .sidebar-brand { padding:0 18px; justify-content:space-between; }
  body.sidebar-collapsed .sidebar-collapse-btn { display:block; }
}

@media (max-width: 767.98px) {
  :root { --cork-header-height: 52px; --cork-sub-header-height: 64px; }
  .top-navbar.cork-header { height: var(--cork-header-height); padding: 0 10px; gap:10px; }
  .sidebar-toggle-btn { width:34px; height:34px; }
  .top-navbar .navbar-brand img { width:30px; height:30px; }
  .cork-sub-header h1 { font-size:17px; }
  .sub-header-actions { display:none; }
  .hero-title { font-size: 28px; }
  .feature-item { grid-template-columns: 1fr; }
  .table-responsive { font-size: 13px; }
  .table th, .table td { padding: 8px 6px; white-space: nowrap; }
  .btn-group-sm .btn { font-size: 12px; padding: 4px 8px; }
  .modal-dialog { margin: 8px; max-width: calc(100vw - 16px); }
}


/* ===== Core Modal / SweetAlerts ===== */
/* html 已常驻 scrollbar；Bootstrap modal 再给 body 补 padding-right 会把后台页面横向压缩 */
body.modal-open { padding-right:0 !important; }
.modal-dialog:not(.modal-sm):not(.modal-xl):not(.modal-fullscreen):not(.modal-dialog-scrollable) {
  max-width: 800px;
}
.modal-dialog.modal-dialog-scrollable:not(.modal-sm):not(.modal-xl):not(.modal-fullscreen) {
  max-width: 800px;
}
.modal-content {
  border:0 !important;
  border-radius:22px !important;
  box-shadow:0 24px 70px rgba(15,23,42,.18) !important;
  overflow:hidden;
}
.modal-header {
  min-height:62px;
  padding:18px 24px;
  background:linear-gradient(135deg,#ffffff 0%,#f7f9ff 100%);
  border-bottom:1px solid #edf1f7;
}
.modal-title { color:#172033; font-weight:800; letter-spacing:.01em; }
.modal-body { padding:22px 24px; color:#344054; }
.modal-footer { padding:16px 24px; background:#fbfcff; border-top:1px solid #edf1f7; gap:10px; }
.modal-footer .btn { min-width:88px; }
.modal .btn-close { width:34px; height:34px; border-radius:999px; background-color:#f2f4f7; opacity:.85; background-size:12px; }
.modal .btn-close:hover { opacity:1; background-color:#e8edf7; }

.core-sweet-modal { z-index:2055; }
.core-sweet-modal .modal-dialog { max-width:440px !important; }
.core-sweet-modal .modal-content {
  border-radius:24px !important;
  text-align:center;
  box-shadow:0 28px 80px rgba(15,23,42,.22) !important;
}
.core-sweet-modal .modal-header { justify-content:center; border-bottom:0; padding:30px 28px 8px; background:#fff; }
.core-sweet-modal .modal-title { font-size:20px; }
.core-sweet-modal .btn-close { position:absolute; right:18px; top:18px; }
.core-sweet-modal .modal-body { padding:8px 34px 10px; color:#667085; font-size:14px; line-height:1.7; }
.core-sweet-modal .modal-footer { justify-content:center; border-top:0; background:#fff; padding:14px 28px 30px; }
.core-sweet-icon {
  width:72px; height:72px; margin:0 auto 16px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:34px; font-weight:800;
}
.core-sweet-icon.is-primary { color:var(--cork-primary); background:var(--cork-primary-soft); }
.core-sweet-icon.is-success { color:#138a5b; background:#eefbf6; }
.core-sweet-icon.is-warning { color:#b66a00; background:#fff7e8; }
.core-sweet-icon.is-danger { color:#dc3545; background:#fff1f2; }

/* ===== Core Snackbar ===== */
.core-snackbar {
  position:fixed;
  left:50%;
  bottom:28px;
  z-index:2100;
  min-width:220px;
  max-width:min(560px, calc(100vw - 32px));
  transform:translate(-50%, 12px);
  opacity:0;
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 18px;
  border-radius:999px;
  color:#fff;
  background:rgba(23,32,51,.94);
  box-shadow:0 18px 48px rgba(15,23,42,.22);
  font-size:14px;
  font-weight:700;
  transition:opacity .18s ease, transform .18s ease;
}
.core-snackbar.show { opacity:1; transform:translate(-50%, 0); }
.core-snackbar-icon {
  width:22px; height:22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.2);
  font-size:14px;
  flex:0 0 auto;
}
.core-snackbar.is-success { background:linear-gradient(135deg,#19a974,#13c28b); }
.core-snackbar.is-danger { background:linear-gradient(135deg,#dc3545,#ef476f); }
.core-snackbar.is-warning { background:linear-gradient(135deg,#f59e0b,#f97316); }
.core-snackbar.is-info { background:linear-gradient(135deg,#3d5df3,#5b7cfa); }
@media (max-width: 767.98px) {
  .modal-dialog:not(.modal-sm):not(.modal-xl):not(.modal-fullscreen),
  .modal-dialog.modal-dialog-scrollable:not(.modal-sm):not(.modal-xl):not(.modal-fullscreen) { max-width: calc(100vw - 16px); }
  .modal-header { padding:16px 18px; }
  .modal-body { padding:18px; }
  .modal-footer { padding:14px 18px; }
  .core-sweet-modal .modal-dialog { max-width:calc(100vw - 32px) !important; margin:16px auto; }
}

/* ===== Text buttons (used in live list) ===== */
.btn-text { background:none; border:none; padding:4px 8px; font-size:13px; color:var(--accent); cursor:pointer; font-weight:500; white-space:nowrap; }
.btn-text:hover { color: var(--accent-dark); }

/* hide old mobile topbar & legacy sidebar wrappers */
.mobile-topbar { display: none !important; }
.sidebar-wrap { display: none !important; }

/* ========================================
   BooDeptPicker (shared) - 部门树形下拉浮层
   ======================================== */
.dept-picker-hidden { display: none !important; }
.dept-picker-btn {
  width: 100%;
  background-color: #fff;
  cursor: pointer;
  text-align: left;
  padding-right:34px;
  background-image: var(--bs-form-select-bg-img), var(--bs-form-select-bg-icon, none);
  background-position: right .75rem center;
  background-size: 16px 12px;
  background-repeat: no-repeat;
}
.dept-picker-panel {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15,23,42,.16);
  padding: 6px 0;
  font-size: 14px;
  min-width: 220px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.dept-picker-panel .dpp-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.dept-picker-panel .dpp-item:hover { background: rgba(0,141,255,.08); }
.dept-picker-panel .dpp-item.active { background: var(--accent); color: #fff; font-weight: 500; }
.dept-picker-panel .dpp-item.active .dpp-arrow { color: rgba(255,255,255,.85); }
.dept-picker-panel .dpp-arrow {
  width: 22px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  border-radius: 8px;
}
.dept-picker-panel .dpp-arrow.dpp-leaf { cursor: default; visibility: hidden; }
.dept-picker-panel .dpp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dept-picker-panel.is-scrolling .dpp-item { pointer-events: none; }

/* ===== 通用 MediaPicker grid 样式（全站共享） ===== */
.media-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:12px; max-height:400px; overflow-y:auto; }
.media-grid-item { cursor:pointer; border:2px solid transparent; border-radius:12px; overflow:hidden; position:relative; aspect-ratio:16/9; background:#f0ede8; }
.media-grid-item:hover { border-color:var(--accent); }
/* 选中不再用边框高亮，改左上角选择框（见 public/javascripts/media-picker.js 的 .mp-check） */
.media-grid-item.selected { border-color:transparent; box-shadow:none; }
.media-grid-item img, .media-grid-item video { width:100%; height:100%; object-fit:cover; }
/* 左上角选择框：未选=空心圆，选中=实心 accent + ✓。单选/多选共用 */
.media-grid-item .mp-check { position:absolute; top:6px; left:6px; z-index:2; width:20px; height:20px; border-radius:50%; border:2px solid #fff; background:rgba(0,0,0,.30); box-shadow:0 0 0 1px rgba(0,0,0,.18); display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; line-height:1; transition:background .15s ease, border-color .15s ease; }
.media-grid-item.selected .mp-check { background:var(--accent); border-color:#fff; }
.media-grid-item.selected .mp-check::after { content:'✓'; }
/* 多选：已选素材横排（modal 内，可横滑 + 拖拽排序） */
.mp-selected-bar { margin-top:12px; padding-top:12px; border-top:1px solid #eef0f5; }
.mp-selected-strip { display:flex; gap:10px; overflow-x:auto; padding:4px 2px 6px; }
.mp-sel-chip { position:relative; flex:0 0 auto; width:104px; cursor:grab; }
.mp-sel-chip .mp-sel-thumb { width:104px; height:60px; border-radius:9px; object-fit:cover; background:#eef2fb; display:flex; align-items:center; justify-content:center; color:#98a2b3; font-size:12px; }
.mp-sel-chip .mp-sel-name { font-size:11px; color:#5b6475; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-sel-chip .mp-sel-del { position:absolute; top:-6px; right:-6px; width:18px; height:18px; border-radius:50%; background:#ef4444; color:#fff; border:2px solid #fff; font-size:10px; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.mp-sel-chip .mp-sel-idx { position:absolute; left:5px; top:5px; min-width:16px; height:16px; padding:0 4px; border-radius:8px; background:rgba(0,0,0,.5); color:#fff; font-size:10px; line-height:16px; text-align:center; }
.mp-sel-chip.sortable-ghost { opacity:.4; }
.media-grid-item .item-name { position:absolute; bottom:0; left:0; right:0; background:rgba(0,0,0,.6); color:#fff; font-size:11px; padding:2px 6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.media-grid-item .media-play-badge { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:32px; height:32px; border-radius:50%; background:rgba(0,0,0,.45); color:#fff; font-size:14px; display:flex; align-items:center; justify-content:center; pointer-events:none; }

/* ===== 通用 chip-style tabs (从营销-答题-分类抽出) ===== */
.cat-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:999px; background:#f4f4f6; color:#555; cursor:pointer; font-size:13px; border:1px solid transparent; text-decoration:none; transition:background .15s,color .15s; }
.cat-chip:hover { background:#eceef2; color:#333; }
.cat-chip.active { background:var(--accent,#c76b2a); color:#fff; }
.cat-chip .count { font-size:11px; opacity:.7; }
.cat-chips-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }

/* ========================================
   Core UI component theme overrides
   统一后台 Bootstrap 组件观感：button / switch / tab / progress / badge / pagination / form / modal / card
   ======================================== */
.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { border-radius: 8px; font-weight: 600; }
.btn-lg { border-radius: 12px; }
.btn.core-btn-loading,
.btn.core-btn-loading:hover,
.btn.core-btn-loading:focus { transform:none; cursor:wait; pointer-events:none; }
.core-btn-loading { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.core-btn-spinner { width:1em; height:1em; flex:0 0 auto; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:core-btn-spin .65s linear infinite; opacity:.9; }
@keyframes core-btn-spin { to { transform:rotate(360deg); } }

.btn-primary,
.btn-accent {
  color: #fff !important;
  background: var(--cork-primary) !important;
  border-color: var(--cork-primary) !important;
  box-shadow: 0 8px 18px rgba(61,93,243,.18);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-accent:hover,
.btn-accent:focus {
  color: #fff !important;
  background: var(--cork-primary-dark) !important;
  border-color: var(--cork-primary-dark) !important;
  box-shadow: 0 12px 24px rgba(61,93,243,.26);
}
.btn-outline-primary,
.btn-outline-accent {
  color: var(--cork-primary) !important;
  border-color: rgba(61,93,243,.42) !important;
  background: #fff !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-accent:hover,
.btn-outline-accent:focus {
  color: #fff !important;
  background: var(--cork-primary) !important;
  border-color: var(--cork-primary) !important;
  box-shadow: 0 10px 22px rgba(61,93,243,.2);
}
.btn-secondary {
  color: #344054 !important;
  background: #eef2ff !important;
  border-color: #dfe5ff !important;
}
.btn-secondary:hover,
.btn-secondary:focus {
  color: var(--cork-primary) !important;
  background: var(--cork-primary-soft) !important;
  border-color: rgba(61,93,243,.28) !important;
}
.btn-outline-secondary {
  color: #667085 !important;
  background: #fff !important;
  border-color: #d9e0ec !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: var(--cork-primary) !important;
  background: var(--cork-primary-soft) !important;
  border-color: rgba(61,93,243,.32) !important;
}
.btn-link { color: var(--cork-primary); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: var(--cork-primary-dark); text-decoration: none; }

.form-control,
.form-select {
  border-color: #dce3ef;
  border-radius: 10px;
  color: #172033;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-control-sm,
.form-select-sm { border-radius: 8px; }
.form-control:focus,
.form-select:focus {
  border-color: rgba(61,93,243,.65);
  box-shadow: 0 0 0 .22rem rgba(61,93,243,.12);
}
.form-control-color { border-radius: 10px; padding: 4px; }

.form-check-input {
  border-color: #cfd8e8;
  cursor: pointer;
  box-shadow: none !important;
}
.form-check-input:checked {
  background-color: var(--cork-primary);
  border-color: var(--cork-primary);
}
.form-check-input:focus {
  border-color: rgba(61,93,243,.65);
  box-shadow: 0 0 0 .22rem rgba(61,93,243,.12) !important;
}
.form-switch .form-check-input {
  width: 2.6em;
  height: 1.35em;
  border-radius: 999px;
  background-color: #dbe3f2;
  border-color: #dbe3f2;
  cursor: pointer;
}
.form-switch .form-check-input:checked {
  background-color: var(--cork-primary);
  border-color: var(--cork-primary);
  box-shadow: 0 6px 14px rgba(61,93,243,.18) !important;
}
.form-switch .form-check-input:disabled { opacity: .48; cursor: not-allowed; }
.core-switch,
.form-check.form-switch.core-switch {
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:28px;
  padding-left:0;
  margin:0;
  color:#344054;
  font-weight:600;
  line-height:1.2;
}
.core-switch .form-check-input,
.form-check.form-switch.core-switch .form-check-input {
  float:none;
  flex:0 0 auto;
  margin:0;
}
.core-switch .form-check-label,
.form-check.form-switch.core-switch .form-check-label {
  margin:0;
  line-height:1.2;
  cursor:pointer;
  user-select:none;
}
.core-screen-pill { display:inline-flex; align-items:center; min-height:24px; padding:4px 9px; border-radius:999px; color:#6941c6; background:#f4f3ff; border:1px solid #d9d6fe; font-size:12px; font-weight:700; line-height:1; white-space:nowrap; }
.core-screen-pill.portrait { color:#c11574; background:#fdf2fa; border-color:#fcceee; }
.core-screen-pill.landscape { color:#6941c6; background:#f4f3ff; border-color:#d9d6fe; }
.btn-check:checked + .btn,
.btn-check:active + .btn {
  color: #fff !important;
  background: var(--cork-primary) !important;
  border-color: var(--cork-primary) !important;
  box-shadow: 0 8px 18px rgba(61,93,243,.18);
}

.nav-tabs { border-bottom-color: #e8edf7; gap: 6px; }
.nav-tabs .nav-link {
  border: none;
  border-radius: 10px 10px 0 0;
  color: #667085;
  font-weight: 700;
  padding: 9px 16px;
}
.nav-tabs .nav-link:hover { color: var(--cork-primary); background: var(--cork-primary-soft); }
.nav-tabs .nav-link.active {
  color: var(--cork-primary);
  background: #fff;
  box-shadow: inset 0 -2px 0 var(--cork-primary);
}
.nav-pills .nav-link,
.filter-tabs .nav-link {
  border-radius: 999px;
  color: #596277;
  font-weight: 700;
  background: #f3f6fb;
  border: 1px solid transparent;
}
.nav-pills .nav-link:hover,
.filter-tabs .nav-link:hover {
  color: var(--cork-primary);
  background: var(--cork-primary-soft);
}
.nav-pills .nav-link.active,
.filter-tabs .nav-link.active {
  background: var(--cork-primary) !important;
  border-color: var(--cork-primary) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(61,93,243,.18);
}
.mkt-tabs { border-bottom-color: #e8edf7; }
.mkt-tab {
  border-radius: 999px;
  border-bottom: none;
  color: #596277;
  background: #f3f6fb;
  font-weight: 700;
  margin-bottom: 8px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.mkt-tab:hover { color: var(--cork-primary); background: var(--cork-primary-soft); }
.mkt-tab.active {
  color: #fff;
  background: var(--cork-primary);
  border-bottom-color: transparent;
  box-shadow: 0 8px 18px rgba(61,93,243,.18);
}
.cat-chip.active { background: var(--cork-primary); color: #fff; box-shadow: 0 8px 18px rgba(61,93,243,.16); }

.progress {
  height: 10px;
  background: #edf2fb;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar,
.bg-accent,
.bg-primary {
  background-color: var(--cork-primary) !important;
}
.progress-bar {
  border-radius: 999px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.22);
}

.pagination { gap: 6px; }
.pagination .page-link,
.page-link {
  border-radius: 9px !important;
  border-color: #dce3ef;
  color: #596277;
  font-weight: 700;
  min-width: 36px;
  text-align: center;
}
.pagination .page-link:hover,
.page-link:hover {
  color: var(--cork-primary);
  background: var(--cork-primary-soft);
  border-color: rgba(61,93,243,.28);
}
.pagination .page-item.active .page-link {
  color: #fff;
  background: var(--cork-primary);
  border-color: var(--cork-primary);
  box-shadow: 0 8px 18px rgba(61,93,243,.18);
}
.pagination .page-item.disabled .page-link { color: #b6bfce; background: #f5f7fb; }

.badge {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .01em;
  padding: .38em .62em;
}
.badge.bg-primary { background: var(--cork-primary) !important; }
.badge.bg-light.text-dark {
  color: var(--cork-primary) !important;
  background: var(--cork-primary-soft) !important;
  border: 1px solid rgba(61,93,243,.12);
}

.card,
.panel,
.modal-content,
.dropdown-menu {
  border-color: #e8edf7;
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15,23,42,.06);
}
.card-header,
.modal-header,
.modal-footer {
  border-color: #edf1f7;
}
.alert {
  border-radius: 14px;
  border-width: 1px;
}
.alert-info,
.alert-light {
  color: var(--cork-primary-dark);
  background: var(--cork-primary-soft);
  border-color: rgba(61,93,243,.18);
}

/* Core Solid Icons tabs must stay underline-style even when combined with .nav-pills/.filter-tabs. */
.nav-pills.core-solid-tabs .core-tab-link,
.filter-tabs.core-solid-tabs .core-tab-link {
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#8b9098 !important;
  box-shadow:none !important;
  outline:0 !important;
  padding:8px 0 11px !important;
}
.nav-pills.core-solid-tabs .core-tab-link:hover,
.filter-tabs.core-solid-tabs .core-tab-link:hover { color:#4b5563 !important; background:transparent !important; }
.nav-pills.core-solid-tabs .core-tab-link.active,
.filter-tabs.core-solid-tabs .core-tab-link.active { color:var(--accent) !important; background:transparent !important; border-color:transparent !important; box-shadow:none !important; outline:0 !important; }
.nav-pills.core-solid-tabs .core-tab-link.active::after,
.filter-tabs.core-solid-tabs .core-tab-link.active::after { opacity:1; width:min(60px, 100%); }

.nav-pills.core-solid-tabs .core-tab-link:focus,
.nav-pills.core-solid-tabs .core-tab-link:focus-visible,
.filter-tabs.core-solid-tabs .core-tab-link:focus,
.filter-tabs.core-solid-tabs .core-tab-link:focus-visible {
  outline:0 !important;
  border-color:transparent !important;
  box-shadow:none !important;
}

/* Final Solid Icons tab reset: no pill/card/focus rectangle, only underline. */
.core-solid-tabs .core-tab-link,
.core-solid-tabs .core-tab-link:hover,
.core-solid-tabs .core-tab-link:focus,
.core-solid-tabs .core-tab-link:focus-visible,
.core-solid-tabs .core-tab-link:active,
.core-solid-tabs .core-tab-link.active {
  appearance:none !important;
  -webkit-appearance:none !important;
  border:0 !important;
  border-color:transparent !important;
  border-radius:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}
.core-solid-tabs .core-tab-link.active {
  color:var(--accent) !important;
}


/* Nuclear reset for Core Solid tabs: no surrounding rectangle from wrappers/elements. */
.setting-side,
.rbac-top-tabs,
.log-tabs,
.filter-tabs.core-solid-tabs,
.core-solid-tabs,
.core-solid-tabs > .core-tab-item,
.core-solid-tabs > li,
.core-solid-tabs .core-tab-icon,
.core-solid-tabs .core-tab-svg,
.core-solid-tabs .core-tab-text {
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}
.core-solid-tabs,
.core-solid-tabs > .core-tab-item,
.core-solid-tabs > li {
  list-style:none !important;
}
.core-solid-tabs::before,
.core-solid-tabs::after,
.core-solid-tabs > .core-tab-item::before,
.core-solid-tabs > .core-tab-item::after,
.core-solid-tabs > li::before,
.core-solid-tabs > li::after,
.setting-side::before,
.setting-side::after,
.rbac-top-tabs::before,
.rbac-top-tabs::after {
  content:none !important;
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
}
.core-solid-tabs .core-tab-link,
.core-solid-tabs .core-tab-link * {
  text-decoration:none !important;
}

.core-mini-table-card { background:#fff; border:1px solid #e8edf7; border-radius:16px; box-shadow:0 10px 28px rgba(15,23,42,.045); overflow:hidden; }
.core-mini-table-card .core-list-table { font-size:13px; }
.core-section-title { font-size:15px; font-weight:700; color:#24364d; margin:20px 0 10px; letter-spacing:.01em; }
.core-stat-card { background:#fff; border:1px solid #edf1f7; border-radius:16px; padding:18px 20px; box-shadow:0 10px 26px rgba(15,23,42,.045); height:100%; }
.core-stat-card .big { font-size:26px; font-weight:700; color:#24364d; }
.core-stat-card .label { color:#7a869a; font-size:13px; }
.core-stat-card .hint { font-size:12px; color:#9a9a9a; margin-top:6px; }
.core-chip-card { background:#fff; border:1px solid #e8edf7; border-radius:18px; padding:18px 20px; box-shadow:0 10px 28px rgba(15,23,42,.045); }
.core-chip { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; border:1px solid #e7edf7; background:#f8fafc; margin:0 8px 8px 0; }
.core-chip .meta { color:#8a94a6; font-size:12px; }
.core-scroll-table { overflow-x:auto; }
/* 吸附「操作」列：z-index 抬到滚动内容之上 + 背景按行态（普通/斑马/悬停）铺成不透明，
   否则左右横滑时其它列内容会透过/压到操作列上（2026-09-15 W 反馈）。td 本身是透明的，
   行色画在 tr 上，所以吸附格必须自己补一层与该行同色的不透明背景。 */
.core-sticky-action { position:sticky; right:0; z-index:2; background:#fff; box-shadow:-4px 0 8px rgba(15,23,42,.04); }
.core-list-table tbody tr:nth-child(even) .core-sticky-action { background:#f7f8fa; }
.core-list-table tbody tr:hover .core-sticky-action { background:#fffaf3; }
/* Core list label helpers */
.core-type-badge { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:22px; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:700; line-height:1; background:#eef6ff; color:#1d6fd8; white-space:nowrap; }
.core-type-badge.core-type-badge-sm { min-height:22px; padding:4px 10px; font-size:12px; }
.core-type-badge.is-image { background:#eefbf6; color:#138a5b; }
.core-type-badge.is-video { background:#eff4ff; color:#315fd1; }
.core-type-badge.is-audio { background:#fff7e8; color:#b66a00; }
.core-type-badge.is-service { background:#eff4ff; color:#315fd1; }
.core-type-badge.is-resource { background:#eefbf6; color:#138a5b; }
.core-type-badge.is-neutral { background:#f3f4f6; color:#64748b; }
.core-type-badge.is-boo-storage { background:var(--cork-primary-soft); color:var(--cork-primary); }
.core-media-corner { position:absolute; left:6px; top:6px; display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:8px; background:rgba(15,23,42,.72); color:#fff; font-size:13px; line-height:1; backdrop-filter:blur(4px); pointer-events:none; }

/* ===== Notifications (Core-inspired dropdown + timeline) ===== */
.navbar-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.navbar-notifications { position:relative; }
.navbar-icon-btn {
  position:relative; width:40px; height:40px; border:1px solid #edf1f7; border-radius:14px; background:#fff; color:#172033;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer; transition:background .15s, color .15s, box-shadow .15s, transform .15s;
}
.navbar-icon-btn:hover, .navbar-icon-btn.open { background:var(--cork-primary-soft); color:var(--cork-primary); box-shadow:0 8px 22px rgba(61,93,243,.14); transform:translateY(-1px); }
.navbar-bell-icon { font-size:17px; line-height:1; }
.navbar-dot-badge {
  position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; padding:0 5px; border-radius:999px; background:#f04438; color:#fff;
  border:2px solid #fff; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; line-height:1;
}
.notification-dropdown {
  display:none; position:absolute; top:calc(100% + 10px); right:-58px; width:370px; max-width:calc(100vw - 24px); background:#fff; border:1px solid #edf1f7;
  border-radius:18px; box-shadow:0 18px 42px rgba(15,23,42,.14); z-index:1060; overflow:hidden;
}
.notification-dropdown.show { display:block; }
.notification-head { padding:16px 18px 12px; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; border-bottom:1px solid #f0f3f8; }
.notification-head strong { display:block; color:#172033; font-size:16px; line-height:1.2; }
.notification-sub { margin-top:3px; color:#8a94a6; font-size:12px; }
.notification-view-all { color:var(--cork-primary); font-size:12px; font-weight:800; white-space:nowrap; }
.notification-tabs { display:flex; gap:18px; padding:0 18px; border-bottom:1px solid #f0f3f8; }
.notification-tabs a { position:relative; padding:11px 0 12px; color:#8b9098; font-size:13px; font-weight:700; }
.notification-tabs a::after { content:''; position:absolute; left:0; right:0; bottom:0; height:3px; border-radius:999px; background:currentColor; opacity:0; }
.notification-tabs a:hover, .notification-tabs a.active { color:var(--cork-primary); }
.notification-tabs a.active::after { opacity:1; }
.notification-list-mini { max-height:360px; overflow-y:auto; padding:8px; }
.notification-empty-mini { padding:28px 12px; color:#8a94a6; text-align:center; }
.notification-mini-item { display:flex; align-items:flex-start; gap:10px; padding:11px 10px; border-radius:13px; transition:background .15s; }
.notification-mini-item:hover { background:#f8fafc; }
.notification-mini-dot { width:9px; height:9px; border-radius:50%; margin-top:7px; background:#98a2b3; flex-shrink:0; box-shadow:0 0 0 4px #f2f4f7; }
.notification-mini-item.is-success .notification-mini-dot { background:#12b76a; box-shadow:0 0 0 4px #ecfdf3; }
.notification-mini-item.is-warning .notification-mini-dot { background:#f79009; box-shadow:0 0 0 4px #fffaeb; }
.notification-mini-item.is-danger .notification-mini-dot { background:#f04438; box-shadow:0 0 0 4px #fef3f2; }
.notification-mini-item.is-info .notification-mini-dot { background:var(--cork-primary); box-shadow:0 0 0 4px var(--cork-primary-soft); }
.notification-mini-body { min-width:0; flex:1; }
.notification-mini-title { display:block; color:#172033; font-size:13px; font-weight:800; line-height:1.25; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.notification-mini-text { display:block; margin-top:3px; color:#7b8496; font-size:12px; line-height:1.35; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.notification-mini-tag { flex-shrink:0; border-radius:999px; background:#f2f4f7; color:#667085; padding:3px 7px; font-size:11px; font-weight:800; }

.notification-page-card { overflow:visible; }
.notification-page-title h1 { font-size:24px; line-height:1.25; }
.notification-timeline { position:relative; padding:22px 24px 24px 34px; }
.notification-timeline::before { content:''; position:absolute; left:38px; top:36px; bottom:28px; width:2px; background:#e8edf7; border-radius:999px; }
.core-timeline-date { position:relative; z-index:1; display:inline-flex; align-items:center; min-height:24px; margin:8px 0 12px -8px; padding:4px 10px; border-radius:999px; background:#eef4ff; color:var(--cork-primary); font-size:12px; font-weight:800; }
.core-timeline-item { position:relative; margin:0 0 14px; padding-left:28px; }
.core-timeline-dot { position:absolute; left:0; top:19px; width:12px; height:12px; border-radius:50%; background:#98a2b3; border:3px solid #fff; box-shadow:0 0 0 3px #f2f4f7; z-index:2; }
.core-timeline-item.is-success .core-timeline-dot { background:#12b76a; box-shadow:0 0 0 3px #ecfdf3; }
.core-timeline-item.is-warning .core-timeline-dot { background:#f79009; box-shadow:0 0 0 3px #fffaeb; }
.core-timeline-item.is-danger .core-timeline-dot { background:#f04438; box-shadow:0 0 0 3px #fef3f2; }
.core-timeline-item.is-info .core-timeline-dot { background:var(--cork-primary); box-shadow:0 0 0 3px var(--cork-primary-soft); }
.core-timeline-card { width:100%; border:1px solid #e8edf7; background:#fff; border-radius:16px; padding:14px 16px; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; text-align:left; box-shadow:0 10px 28px rgba(15,23,42,.04); cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .15s; }
.core-timeline-card:hover { border-color:#d9dfff; box-shadow:0 14px 34px rgba(15,23,42,.07); transform:translateY(-1px); }
.core-timeline-main { min-width:0; flex:1; }
.core-timeline-head { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.core-timeline-head strong { color:#172033; font-size:14px; line-height:1.3; }
.core-timeline-summary { margin-top:7px; color:#667085; font-size:13px; line-height:1.45; overflow:hidden; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; }
.core-timeline-meta { display:flex; flex-direction:column; align-items:flex-end; gap:7px; color:#8a94a6; font-size:12px; white-space:nowrap; }
.core-timeline-expand { color:var(--cork-primary); font-weight:800; }
.core-timeline-detail { display:none; margin:8px 0 0; padding:13px 16px; border:1px dashed #d9dfff; border-radius:14px; background:#fbfcff; color:#667085; }
.core-timeline-detail p { margin:0 0 8px; line-height:1.65; }
.core-timeline-item.is-expanded .core-timeline-summary { -webkit-line-clamp:unset; }
.core-timeline-item.is-expanded .core-timeline-detail { display:block; }
@media(max-width:767px) {
  .navbar-actions { gap:7px; }
  .notification-dropdown { right:-86px; width:340px; }
  .notification-timeline { padding:18px 14px 20px 24px; }
  .notification-timeline::before { left:25px; }
  .core-timeline-item { padding-left:24px; }
  .core-timeline-card { flex-direction:column; gap:8px; }
  .core-timeline-meta { width:100%; flex-direction:row; justify-content:space-between; }
}

/* notification refinement */
.navbar-bell-icon { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.85; stroke-linecap:round; stroke-linejoin:round; }
.navbar-bell-icon path { fill:none; stroke:currentColor; }
.notification-dropdown .notification-head { border-bottom:0; }
.notification-list-mini { border-top:1px solid #f0f3f8; }
.notification-load-sentinel { margin:10px 0 0 156px; padding:16px; text-align:center; color:#8a94a6; font-size:12px; font-weight:700; }
.notification-load-sentinel.is-done { color:#b0b7c3; }

/* notification unread badge: Core badge style */
.navbar-dot-badge.core-badge-pulse {
  top:-7px; right:-7px; min-width:20px; height:20px; padding:0 6px; border-radius:999px;
  background:#e7515a; color:#fff; font-size:10px; font-weight:900; letter-spacing:.01em;
  border:2px solid #fff; box-shadow:0 6px 14px rgba(231,81,90,.28), 0 0 0 4px rgba(231,81,90,.12);
}
.navbar-dot-badge.core-badge-pulse::after {
  content:''; position:absolute; inset:-5px; border-radius:999px; border:1px solid rgba(231,81,90,.28);
  animation:notificationBadgePulse 1.9s ease-out infinite;
}
@keyframes notificationBadgePulse {
  0% { transform:scale(.72); opacity:.75; }
  100% { transform:scale(1.45); opacity:0; }
}

/* notification timeline: explicit coordinates for date/time/dot/line */
.notification-timeline {
  --notify-time-col:96px;
  --notify-line-col:40px;
  --notify-line-left:calc(var(--notify-time-col) + (var(--notify-line-col) / 2));
  --notify-date-gap:-18px;
  position:relative;
  padding:18px 24px 28px 0;
}
.notification-timeline::before { content:none !important; }
.notification-timeline .core-timeline-date {
  display:block;
  position:relative;
  min-height:30px;
  margin:24px 0 24px;
  padding:0;
  background:transparent;
  color:#111827;
  font-size:13px;
  font-weight:900;
  letter-spacing:0;
}
.notification-timeline .core-timeline-date::before,
.notification-timeline .core-timeline-date::after { content:none !important; display:none !important; }
.notification-timeline .core-timeline-date span {
  position:absolute;
  right:calc(100% - var(--notify-line-left) + var(--notify-date-gap));
  top:50%;
  transform:translateY(-50%) !important;
  white-space:nowrap;
}
.notification-timeline .core-timeline-item {
  display:grid;
  grid-template-columns:var(--notify-time-col) var(--notify-line-col) minmax(0,1fr);
  column-gap:0;
  align-items:start;
  position:relative;
  margin:0 0 18px;
  padding-left:0;
}
.notification-timeline .core-timeline-item::before {
  content:'';
  position:absolute;
  left:var(--notify-line-left);
  top:-18px;
  bottom:-18px;
  width:1px;
  background:#e5e7eb;
  transform:translateX(-.5px);
  z-index:0;
}
.notification-timeline .core-timeline-item:first-of-type::before { top:18px; }
.notification-timeline .core-timeline-item + .core-timeline-date { margin-top:24px; }
.notification-timeline .core-timeline-time {
  grid-column:1;
  justify-self:end;
  padding-top:16px;
  padding-right:4px;
  color:#6b7280;
  font-size:12px;
  font-weight:800;
  letter-spacing:.01em;
  white-space:nowrap;
}
.notification-timeline .core-timeline-dot {
  position:relative;
  left:auto;
  top:18px;
  grid-column:2;
  justify-self:center;
  width:8px;
  height:8px;
  border-radius:50%;
  border:0;
  background:#a9afb9;
  box-shadow:0 0 0 4px #fff !important;
  z-index:2;
}
.notification-timeline .core-timeline-card,
.notification-timeline .core-timeline-detail { grid-column:3; position:relative; z-index:1; }
.notification-timeline .core-timeline-card { padding:14px 16px; }
.notification-timeline .core-timeline-link { display:none; margin-top:8px; }
.notification-timeline .core-timeline-item.is-expanded .core-timeline-link { display:inline-flex; }
.notification-timeline .core-timeline-item.is-announcement .core-timeline-summary { display:block; -webkit-line-clamp:unset; max-height:calc(1.7em * 3); overflow:hidden; }
.notification-timeline .core-timeline-item.is-announcement.is-expanded .core-timeline-summary { max-height:none; overflow:visible; }
.notification-timeline .announcement-markdown { line-height:1.7; color:#344054; }
.notification-timeline .announcement-markdown p { margin:0 0 10px; }
.notification-timeline .announcement-markdown p:last-child { margin-bottom:0; }
.notification-timeline .announcement-markdown h1 { margin:0 0 10px; font-size:18px; line-height:1.35; font-weight:700; }
.notification-timeline .announcement-markdown h2 { margin:0 0 9px; font-size:17px; line-height:1.35; font-weight:700; }
.notification-timeline .announcement-markdown h3 { margin:0 0 8px; font-size:16px; line-height:1.35; font-weight:700; }
.notification-timeline .announcement-markdown h4 { margin:0 0 8px; font-size:15px; line-height:1.35; font-weight:700; }
.notification-timeline .announcement-markdown h5,
.notification-timeline .announcement-markdown h6 { margin:0 0 8px; font-size:14px; line-height:1.35; font-weight:700; }
.notification-timeline .announcement-markdown ul,
.notification-timeline .announcement-markdown ol { margin:0 0 10px 20px; padding:0; }
.notification-timeline .announcement-markdown blockquote { margin:0 0 10px; padding-left:12px; border-left:3px solid #e0e6ed; color:#667085; }
.notification-timeline .announcement-markdown code { padding:2px 5px; border-radius:5px; background:#f2f4f7; color:#344054; }
.notification-timeline .announcement-markdown pre { padding:10px; border-radius:10px; background:#f8fafc; overflow:auto; }
.notification-timeline .core-timeline-detail { margin-top:8px; }
.notification-timeline .core-timeline-meta { justify-content:center; }
.notification-timeline .core-timeline-item.is-success .core-timeline-dot { background:#12b76a; box-shadow:0 0 0 4px #ecfdf3 !important; }
.notification-timeline .core-timeline-item.is-warning .core-timeline-dot { background:#f79009; box-shadow:0 0 0 4px #fffaeb !important; }
.notification-timeline .core-timeline-item.is-danger .core-timeline-dot { background:#f04438; box-shadow:0 0 0 4px #fef3f2 !important; }
.notification-timeline .core-timeline-item.is-info .core-timeline-dot { background:var(--cork-primary); box-shadow:0 0 0 4px var(--cork-primary-soft) !important; }
@media(max-width:767px) {
  .notification-timeline { --notify-time-col:60px; --notify-line-col:28px; --notify-date-gap:-12px; padding:16px 12px 24px 0; }
  .notification-timeline .core-timeline-date { font-size:12px; }
  .notification-timeline .core-timeline-item { grid-template-columns:var(--notify-time-col) var(--notify-line-col) minmax(0,1fr); }
  .notification-timeline .core-timeline-time { font-size:11px; padding-right:2px; }
  .notification-load-sentinel { margin-left:88px; }
}


/* ===== CORK Pricing Table 3 / Service Order ===== */
.cork-pricing-widget {
  padding: 24px 28px 34px;
  background: #fff;
  overflow: hidden;
}
.cork-pricing-widget .core-list-toolbar { margin-bottom: 26px; }
.pricing-table-3.order-service-pricing {
  padding: 28px 0 8px;
  background: #fff;
}
.order-service-pricing .pricing-plans-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 560px;
}
.order-service-pricing .pricing-plan {
  position: relative;
  width: 31.5%;
  min-width: 260px;
  max-width: 360px;
  padding: 44px 38px 34px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.order-service-pricing .pricing-plan.plan-basic {
  margin-right: -8px;
  z-index: 1;
}
.order-service-pricing .pricing-plan.plan-starter,
.order-service-pricing .pricing-plan.recommanded {
  min-height: 520px;
  z-index: 3;
  box-shadow: 0 12px 36px rgba(31, 45, 61, .09);
  border-color: #f1f2f5;
}
.order-service-pricing .pricing-plan.plan-premium {
  min-height: 600px;
  margin-left: -8px;
  z-index: 2;
  box-shadow: 0 12px 36px rgba(31, 45, 61, .08);
  border-color: #f1f2f5;
}
.order-service-pricing .pricing-plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 46px rgba(31, 45, 61, .12);
  border-color: #e8eaf0;
  z-index: 4;
}
.order-service-pricing .pricing-plan-popular {
  position: absolute;
  right: 32px;
  top: 48px;
}
.order-service-pricing .badge-light-success {
  color: #0e9f6e;
  background: #e7f8ef;
  border-radius: 4px;
  padding: 7px 10px;
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .08em;
  font-weight: 800;
}
.order-service-pricing .pricing-header-section {
  border-bottom: 1px dashed #dfe5ef;
}
.order-service-pricing .pricing-header h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .01em;
}
.order-service-pricing .pricing-header p {
  margin: 0;
  color: #4361ee;
  font-size: 13px;
  font-weight: 700;
}
.order-service-pricing .pricing-header-pricing {
  display: flex;
  align-items: flex-start;
  min-height: 62px;
  color: #050505;
}
.order-service-pricing .pricing-header-pricing p { margin: 0; }
.order-service-pricing .dollar-pricing {
  padding-top: 4px;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}
.order-service-pricing .yearly-pricing {
  display: block;
  color: #050505;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.05em;
}
.order-service-pricing .free-pricing { letter-spacing: -.02em; }
.order-service-pricing .sub-title {
  align-self: flex-end;
  margin-bottom: 9px !important;
  color: #1f2937;
  font-size: 13px;
  font-weight: 800;
}
.order-service-pricing .pricing-plan-features h5 {
  margin: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
.order-service-pricing .pricing-plan-features .d-flex > p {
  margin: 0;
  color: #111827;
  font-size: 13px;
  text-decoration: underline;
  font-weight: 700;
}
.order-service-pricing .pricing-plan-features ul {
  margin: 0;
  padding: 0;
}
.order-service-pricing .pricing-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 18px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}
.order-service-pricing .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
  color: #138a72;
  font-size: 14px;
  font-weight: 900;
}
.order-service-pricing .btn-pricing-btn {
  height: 44px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: none;
}
.order-service-pricing .btn-gradient-dark {
  background-image: linear-gradient(to right, #202331 0%, #555762 100%);
}
.order-service-pricing .btn-gradient-primary {
  background-image: linear-gradient(to right, #3153e6 0%, #d1358f 100%);
}
.order-service-pricing .btn-gradient-secondary {
  background-image: linear-gradient(to right, #8b27d8 0%, #4f7df6 100%);
}
.order-service-pricing .btn-pricing-btn:hover,
.order-service-pricing .btn-pricing-btn:focus:hover {
  color:#fff;
  opacity:.78;
  filter:none;
  transform:none;
}
@media(max-width: 1199px) {
  .order-service-pricing .pricing-plans-container { gap: 18px; align-items: stretch; min-height: 0; }
  .order-service-pricing .pricing-plan,
  .order-service-pricing .pricing-plan.plan-basic,
  .order-service-pricing .pricing-plan.plan-starter,
  .order-service-pricing .pricing-plan.recommanded,
  .order-service-pricing .pricing-plan.plan-premium {
    width: 33.333%;
    min-width: 0;
    min-height: auto;
    margin: 0;
    padding: 34px 24px 26px;
  }
}
@media(max-width: 991px) {
  .order-service-pricing .pricing-plans-container { flex-direction: column; }
  .order-service-pricing .pricing-plan,
  .order-service-pricing .pricing-plan.plan-basic,
  .order-service-pricing .pricing-plan.plan-starter,
  .order-service-pricing .pricing-plan.recommanded,
  .order-service-pricing .pricing-plan.plan-premium {
    width: 100%;
    max-width: 520px;
  }
}
@media(max-width: 767px) {
  .cork-pricing-widget { padding: 18px 14px 24px; }
  .order-service-pricing .pricing-plan { padding: 28px 20px 22px !important; }
  .order-service-pricing .pricing-plan-popular { right: 20px; top: 32px; }
  .order-service-pricing .yearly-pricing { font-size: 36px; }
}

/* ===== Boo Dashboard Dark Mode (CORK-inspired, scoped to Boo DOM) ===== */
html.dark {
  color-scheme: dark;
}
html.dark body,
body.dark {
  --bg:#0e1726;
  --panel:#111c2d;
  --panel-strong:#162238;
  --line:#25344f;
  --text:#e5edf8;
  --muted:#8ea0ba;
  --accent-soft:rgba(67,97,238,.18);
  --shadow:0 16px 42px rgba(0,0,0,.34);
  color:var(--text);
  background:#0e1726;
}
body.dark a { color:inherit; }
body.dark .app-shell { background:#0e1726; }
body.dark .top-navbar.cork-header,
body.dark .cork-sidebar,
body.dark .cork-sub-header {
  background:#111c2d;
  border-color:#25344f;
  box-shadow:0 10px 30px rgba(0,0,0,.24);
}
body.dark .top-navbar .navbar-brand-text,
body.dark .sidebar-logo span,
body.dark .cork-sub-header h1,
body.dark .core-list-page-title h1,
body.dark .core-list-title,
body.dark .panel-title,
body.dark .module-card-title,
body.dark .metric-value strong,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6 { color:#e5edf8; }
body.dark .core-list-page-title p,
body.dark .hero-desc,
body.dark .module-card-desc,
body.dark .metric-label,
body.dark .metric-trend,
body.dark .feature-body p,
body.dark .sub-header-actions,
body.dark .text-muted { color:#8ea0ba !important; }

body.dark .sidebar-toggle-btn,
body.dark .sidebar-collapse-btn,
body.dark .navbar-icon-btn {
  background:#162238;
  border-color:#2b3c5d;
  color:#c8d7ee;
  box-shadow:none;
}
body.dark .sidebar-toggle-btn:hover,
body.dark .sidebar-collapse-btn:hover,
body.dark .navbar-icon-btn:hover,
body.dark .navbar-icon-btn.open,
body.dark .navbar-icon-btn.is-dark {
  background:var(--cork-primary);
  border-color:var(--cork-primary);
  color:#fff;
  box-shadow:0 12px 24px rgba(61,93,243,.24);
}
.theme-toggle-btn .theme-icon { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.theme-toggle-btn .theme-icon-sun { display:none; }
body.dark .theme-toggle-btn .theme-icon-moon { display:none; }
body.dark .theme-toggle-btn .theme-icon-sun { display:block; }

body.dark .navbar-user-btn,
body.dark .user-dropdown,
body.dark .notification-dropdown,
body.dark .dropdown-menu {
  background:#162238;
  border-color:#2b3c5d;
  color:#e5edf8;
  box-shadow:0 18px 42px rgba(0,0,0,.32);
}
body.dark .navbar-user-btn { color:#e5edf8; }
body.dark .navbar-user-btn:hover,
body.dark .user-dropdown .ud-item:hover,
body.dark .notification-mini-item:hover { background:#1d2a43; }
body.dark .navbar-user-btn .caret,
body.dark .user-dropdown .ud-phone,
body.dark .notification-sub,
body.dark .notification-mini-text,
body.dark .notification-mini-tag { color:#8ea0ba; }
body.dark .user-dropdown .ud-profile,
body.dark .user-dropdown .ud-divider,
body.dark .notification-head,
body.dark .notification-list-mini { border-color:#334669; }
body.dark .user-dropdown .ud-name,
body.dark .user-dropdown .ud-item,
body.dark .notification-head strong,
body.dark .notification-mini-title { color:#e5edf8; }
body.dark .notification-mini-tag { background:#22304b; }
body.dark .navbar-dot-badge,
body.dark .navbar-dot-badge.core-badge-pulse { border-color:#111c2d; }

body.dark .sidebar-shadow { background:linear-gradient(180deg,rgba(0,0,0,.22),transparent); }
body.dark .sidebar-brand,
body.dark .sidebar-submenu { border-color:#25344f; }
body.dark .sidebar-heading { color:#64748b; }
body.dark .sidebar-link { color:#aebdd2; }
body.dark .sidebar-link:hover { background:#1d2a43; color:#fff; }
body.dark .sidebar-link.is-active,
body.dark .sidebar-sublink.is-active { background:rgba(61,93,243,.18); color:#8ea2ff; }
body.dark .sidebar-sublink { color:#9aabc3; }
body.dark .sidebar-sublink:hover { background:#1d2a43; color:#fff; }
body.dark.sidebar-collapsed .sidebar-link::after { background:#24324d; color:#e5edf8; }
body.dark.sidebar-collapsed .sidebar-link::before { border-right-color:#24324d; }

body.dark .card,
body.dark .panel,
body.dark .hero,
body.dark .modal-content,
body.dark .core-list-card,
body.dark .core-list-pagination,
body.dark .module-card,
body.dark .metric-card,
body.dark .order-core-card,
body.dark .feature-item,
body.dark .nav-item,
body.dark .stat-box,
body.dark .dash-card,
body.dark .func-item,
body.dark .core-timeline-card {
  background:#162238 !important;
  border-color:#25344f !important;
  color:#dbe6f5;
  box-shadow:0 16px 36px rgba(0,0,0,.24);
}
body.dark .card-header,
body.dark .card-footer,
body.dark .modal-header,
body.dark .modal-footer,
body.dark .core-list-toolbar,
body.dark .live-tabs { background:#162238 !important; border-color:#25344f !important; }
body.dark .modal-footer { background:#121e31 !important; }
body.dark .modal-title,
body.dark .core-timeline-head strong { color:#e5edf8; }
body.dark .modal-body,
body.dark .core-timeline-summary,
body.dark .core-timeline-detail { color:#aebdd2; }
body.dark .core-timeline-detail { background:#111c2d; border-color:#334669; }
body.dark .module-card.is-active,
body.dark .order-core-card.is-featured,
body.dark .nav-item.is-active { background:linear-gradient(180deg,rgba(61,93,243,.2),#162238) !important; }
body.dark .hero-badge,
body.dark .mkt-info,
body.dark .order-core-gift { background:#1d2a43; color:#c8d7ee; }

body.dark .form-control,
body.dark .form-select,
body.dark .form-control:disabled,
body.dark .form-select:disabled,
body.dark .form-control[readonly] {
  background:#111c2d;
  border-color:#2b3c5d;
  color:#e5edf8;
}
body.dark .form-control::placeholder { color:#64748b; }
body.dark .form-control:focus,
body.dark .form-select:focus {
  background:#111c2d;
  border-color:rgba(96,121,255,.75);
  color:#fff;
  box-shadow:0 0 0 .22rem rgba(61,93,243,.2);
}
body.dark .form-check-input { background-color:#111c2d; border-color:#3a4d70; }
body.dark .form-switch .form-check-input { background-color:#334155; border-color:#334155; }
body.dark .form-check-input:checked,
body.dark .form-switch .form-check-input:checked { background-color:var(--cork-primary); border-color:var(--cork-primary); }
body.dark .core-switch,
body.dark .form-check.form-switch.core-switch { color:#c8d7ee; }

body.dark .btn-outline-primary,
body.dark .btn-outline-accent,
body.dark .btn-outline-secondary {
  background:#162238 !important;
  color:#c8d7ee !important;
  border-color:#334669 !important;
}
body.dark .btn-outline-primary:hover,
body.dark .btn-outline-accent:hover,
body.dark .btn-outline-secondary:hover { background:var(--cork-primary) !important; color:#fff !important; border-color:var(--cork-primary) !important; }
body.dark .btn-secondary { background:#22304b !important; border-color:#334669 !important; color:#dbe6f5 !important; }
body.dark .btn-secondary:hover { background:#2b3c5d !important; color:#fff !important; }
body.dark .btn-close { filter:invert(1) grayscale(100%); }

body.dark .table,
body.dark .core-list-table { --bs-table-bg:transparent; --bs-table-color:#dbe6f5; color:#dbe6f5; border-color:#25344f; }
body.dark .table th,
body.dark .table td,
body.dark .core-list-table th,
body.dark .core-list-table td { border-color:#25344f; color:#dbe6f5; }
body.dark .ip-region-main { color:#e5edf8; }
body.dark .ip-region-sub { color:#8ea0ba; }
body.dark .table thead th,
body.dark .core-list-table thead th { background:#111c2d; color:#aebdd2; border-color:#25344f; }
body.dark .table-striped>tbody>tr:nth-of-type(odd)>* { --bs-table-bg-type:rgba(255,255,255,.025); color:#dbe6f5; }
body.dark .table-hover>tbody>tr:hover>* { --bs-table-bg-state:#1d2a43; color:#fff; }
body.dark .core-sticky-action { background:#162238; }
body.dark .core-list-table tbody tr:nth-child(even) .core-sticky-action { background:#111c2d; }
body.dark .core-list-table tbody tr:hover .core-sticky-action { background:#1d2a43; }

body.dark .nav-tabs { border-color:#25344f; }
body.dark .nav-tabs .nav-link,
body.dark .nav-pills .nav-link,
body.dark .filter-tabs .nav-link,
body.dark .mkt-tab,
body.dark .cat-chip { background:#1d2a43; color:#aebdd2; border-color:#2b3c5d; }
body.dark .nav-tabs .nav-link:hover,
body.dark .nav-pills .nav-link:hover,
body.dark .filter-tabs .nav-link:hover,
body.dark .mkt-tab:hover,
body.dark .cat-chip:hover { background:#25344f; color:#fff; }
body.dark .nav-tabs .nav-link.active { background:#162238; color:#8ea2ff; }
body.dark .nav-pills.core-solid-tabs .core-tab-link,
body.dark .filter-tabs.core-solid-tabs .core-tab-link { color:#8ea0ba !important; background:transparent !important; }
body.dark .nav-pills.core-solid-tabs .core-tab-link:hover,
body.dark .filter-tabs.core-solid-tabs .core-tab-link:hover { color:#dbe6f5 !important; }
body.dark .nav-pills.core-solid-tabs .core-tab-link.active,
body.dark .filter-tabs.core-solid-tabs .core-tab-link.active { color:#8ea2ff !important; }

body.dark .pagination .page-link,
body.dark .page-link { background:#162238; border-color:#334669; color:#c8d7ee; }
body.dark .pagination .page-link:hover,
body.dark .page-link:hover { background:#1d2a43; color:#fff; }
body.dark .pagination .page-item.disabled .page-link { background:#111c2d; color:#64748b; }
body.dark .badge.bg-light.text-dark { color:#8ea2ff !important; background:rgba(61,93,243,.18) !important; border-color:rgba(96,121,255,.25); }
body.dark .alert-info,
body.dark .alert-light { color:#c8d7ee; background:#142743; border-color:#28517d; }
body.dark .alert-warning { color:#ffe6a8; background:#3a2a10; border-color:#6c4b13; }
body.dark .alert-danger { color:#fecaca; background:#3a171c; border-color:#7f1d1d; }
body.dark .alert-success { color:#bbf7d0; background:#123224; border-color:#166534; }

body.dark .media-grid-item,
body.dark .img-placeholder-wrap { background:#111c2d; border-color:#25344f; }
body.dark .core-type-badge.is-neutral { background:#25344f; color:#c8d7ee; }
body.dark .progress { background:#25344f; }

/* Dark mode list/table refinements */
body.dark .core-list-table tbody tr { background:#162238; }
body.dark .core-list-table tbody tr:nth-child(even) { background:#111c2d; }
body.dark .core-list-table tbody tr:hover { background:#1d2a43; }
body.dark .core-list-table .col-sticky { background:inherit; box-shadow:-8px 0 18px rgba(0,0,0,.18); }
body.dark .core-list-table thead .col-sticky { background:#111c2d; }
body.dark .core-field > label { color:#8ea0ba; background:#162238; }
body.dark .core-accordion-item,
body.dark .core-skeleton-card,
body.dark .core-mini-table-card,
body.dark .core-stat-card,
body.dark .core-chip-card,
body.dark .q-card {
  background:#162238 !important;
  border-color:#25344f !important;
  color:#dbe6f5;
}
body.dark .core-accordion-header,
body.dark .core-accordion-item.collapsed .core-accordion-count { background:#162238; color:#dbe6f5; }
body.dark .core-list-empty { color:#8ea0ba; }
body.dark .more-popup { background:#162238 !important; border:1px solid #2b3c5d; box-shadow:0 18px 42px rgba(0,0,0,.32); }
body.dark .mat-status-badge,
body.dark .tag-owner { background:#3a2a10; border-color:#6c4b13; color:#ffe6a8; }

/* Dark mode list text contrast */
body.dark .core-list-card .text-dark,
body.dark .core-list-table .text-dark,
body.dark .core-list-table a.text-dark,
body.dark .core-list-table .fw-semibold,
body.dark .core-list-table .fw-bold,
body.dark .core-accordion-item .text-dark,
body.dark .core-accordion-item .fw-semibold,
body.dark .core-accordion-item .fw-bold {
  color:#e5edf8 !important;
}
body.dark .core-list-card .small,
body.dark .core-list-table .small,
body.dark .core-list-table small,
body.dark .core-list-table .core-subtext,
body.dark .core-list-table .item-status,
body.dark .core-list-table .item-meta,
body.dark .core-accordion-item .small,
body.dark .core-accordion-item small {
  color:#8ea0ba !important;
}
body.dark .core-list-table a:not(.btn):not(.badge) { color:#dbe6f5; }
body.dark .core-list-table a:not(.btn):not(.badge):hover { color:#8ea2ff; }
body.dark .core-list-table .btn-text,
body.dark .core-list-card .btn-text { color:#8ea2ff; }

/* Dark mode home recent live contrast */
body.dark .section-title,
body.dark .dash-card .card-title,
body.dark .recent-live-name,
body.dark .task-info .task-name,
body.dark .stat-box .stat-total,
body.dark .stat-sub-value,
body.dark .user-card .uname,
body.dark .func-item .func-name {
  color:#e5edf8 !important;
}
body.dark .recent-live-cover,
body.dark .recent-live-cover-placeholder { background:#111c2d; color:#8ea0ba; }
body.dark .task-card { background:linear-gradient(135deg,#162238,#111c2d) !important; }
body.dark .task-item { border-color:#25344f; }
body.dark .task-lock-hint { background:#3a2a10 !important; border-color:#6c4b13 !important; color:#ffe6a8 !important; }
body.dark .task-locked .task-check { background:#25344f; border-color:#334669; }
body.dark .stat-sub { border-top-color:#25344f; }
body.dark .stat-sub-label { color:#8ea0ba; }
body.dark .func-item:hover { color:#8ea2ff; border-color:#3d5df3; }

/* Dark mode live group header refinement */
body.dark .live-groups-accordion .core-accordion-item,
body.dark .live-groups-accordion .core-accordion-item.is-collapsed,
body.dark .live-groups-accordion .core-accordion-item.collapsed {
  background:#162238 !important;
  border-color:#25344f !important;
}
body.dark .live-groups-accordion .core-accordion-header,
body.dark .live-groups-accordion .core-accordion-header:hover,
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-header,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-header,
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-header:hover,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-header:hover {
  background:#111c2d !important;
  color:#dbe6f5 !important;
}
body.dark .live-groups-accordion .core-accordion-body {
  border-top-color:#25344f !important;
}
body.dark .live-groups-accordion .core-accordion-name { color:#e5edf8 !important; }
body.dark .live-groups-accordion .core-accordion-meta { color:#8ea0ba !important; }
body.dark .live-groups-accordion .core-accordion-icon,
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-icon,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-icon {
  background:#1d2a43 !important;
  color:#8ea2ff !important;
}
body.dark .live-groups-accordion .core-accordion-count,
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-count,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-count {
  background:#1d2a43 !important;
  color:#c8d7ee !important;
}

/* Dark mode category chips active state */
body.dark .cat-chips-row .cat-chip.active,
body.dark .cat-chip.active {
  background:linear-gradient(135deg,#3d5df3,#6d7cff) !important;
  border-color:#8ea2ff !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(61,93,243,.42), 0 0 0 1px rgba(255,255,255,.12) inset !important;
}
body.dark .cat-chips-row .cat-chip.active .count,
body.dark .cat-chip.active .count {
  color:#fff !important;
  opacity:1;
}

/* Dark mode live group collapsed/expanded distinction */
body.dark .live-groups-accordion .core-accordion-item:not(.is-collapsed):not(.collapsed) .core-accordion-header,
body.dark .live-groups-accordion .core-accordion-item:not(.is-collapsed):not(.collapsed) .core-accordion-header:hover {
  background:#162238 !important;
  color:#e5edf8 !important;
}
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-header,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-header {
  background:#0f1828 !important;
  color:#aebdd2 !important;
}
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-header:hover,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-header:hover {
  background:#142033 !important;
  color:#dbe6f5 !important;
}
body.dark .live-groups-accordion .core-accordion-item.is-collapsed,
body.dark .live-groups-accordion .core-accordion-item.collapsed {
  border-color:#1f2c44 !important;
  box-shadow:0 8px 20px rgba(0,0,0,.18);
}
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-name,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-name {
  color:#aebdd2 !important;
}
body.dark .live-groups-accordion .core-accordion-item:not(.is-collapsed):not(.collapsed) .core-accordion-icon {
  background:rgba(61,93,243,.22) !important;
  color:#9fb0ff !important;
}
body.dark .live-groups-accordion .core-accordion-item.is-collapsed .core-accordion-icon,
body.dark .live-groups-accordion .core-accordion-item.collapsed .core-accordion-icon {
  background:#25344f !important;
  color:#8ea0ba !important;
}

/* Dark mode sticky column/page inline overrides */
body.dark .live-groups-accordion .core-list-table tbody tr:nth-child(odd) .col-sticky,
body.dark .core-list-table tbody tr:nth-child(odd) .col-sticky {
  background:#162238 !important;
}
body.dark .live-groups-accordion .core-list-table tbody tr:nth-child(even) .col-sticky,
body.dark .core-list-table tbody tr:nth-child(even) .col-sticky {
  background:#111c2d !important;
}
body.dark .live-groups-accordion .core-list-table tbody tr:hover .col-sticky,
body.dark .core-list-table tbody tr:hover .col-sticky {
  background:#1d2a43 !important;
}
body.dark .live-groups-accordion .core-list-table thead .col-sticky,
body.dark .core-list-table thead .col-sticky,
body.dark .table-light .col-sticky {
  background:#111c2d !important;
}
body.dark .table-hover tbody tr:hover .col-sticky {
  background:#1d2a43 !important;
}

/* Dark mode global list/card/table unification */
body.dark .core-list-card,
body.dark .card,
body.dark .list-group-item,
body.dark .q-card,
body.dark .q-card.readonly,
body.dark .qz-card,
body.dark .cat-row,
body.dark .picker-item,
body.dark .rw-item,
body.dark .setting-card,
body.dark .rect-tabs,
body.dark .stats-card {
  background:#162238 !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
}
body.dark .stats-card h6,
body.dark .stats-grid .item .val {
  color:#e5edf8 !important;
}
body.dark .stats-grid .item .lbl,
body.dark .stats-card .refresh-hint {
  color:#8ea0ba !important;
}
body.dark .stats-grid .item .val.viewer-modal-link,
body.dark .stats-grid .item .val[style*="var(--accent)"] {
  color:#8ea2ff !important;
}
body.dark .stats-grid .item .val.viewer-modal-link:hover {
  color:#b8c4ff !important;
}
body.dark .core-list-card .text-dark,
body.dark .core-list-card .fw-bold,
body.dark .core-list-card .fw-semibold,
body.dark .card .text-dark,
body.dark .card .fw-bold,
body.dark .card .fw-semibold,
body.dark .q-card .q-title,
body.dark .q-card .fw-bold,
body.dark .q-card .fw-semibold,
body.dark .qz-card .qz-head-title,
body.dark .list-group-item .text-dark,
body.dark .list-group-item .fw-bold,
body.dark .list-group-item .fw-semibold {
  color:#e5edf8 !important;
}
body.dark .core-list-card .text-muted,
body.dark .card .text-muted,
body.dark .q-card .q-meta,
body.dark .q-card .text-muted,
body.dark .qz-card .text-muted,
body.dark .list-group-item .text-muted,
body.dark .small.text-muted,
body.dark small.text-muted {
  color:#8ea0ba !important;
}
body.dark .q-card:hover,
body.dark .q-card.readonly:hover,
body.dark .qz-card:hover,
body.dark .list-group-item:hover {
  background:#1d2a43 !important;
  border-color:#3d5df3 !important;
}
body.dark .q-card .q-actions a:not(.text-danger),
body.dark .qz-preview,
body.dark .core-list-card a:not(.btn):not(.badge):not(.cat-chip):not(.text-danger) {
  color:#8ea2ff !important;
}
body.dark .q-card .q-actions a:not(.text-danger):hover,
body.dark .qz-preview:hover,
body.dark .core-list-card a:not(.btn):not(.badge):not(.cat-chip):not(.text-danger):hover {
  color:#b8c4ff !important;
}
body.dark .tag-cat {
  background:rgba(61,93,243,.18) !important;
  border-color:rgba(142,162,255,.28) !important;
  color:#9fb0ff !important;
}
body.dark .tag-owner,
body.dark .tag-owner.readonly {
  background:#26364f !important;
  border-color:#3a4d70 !important;
  color:#dbe6f5 !important;
}
body.dark .tag-owner:not(.readonly) {
  background:#3a2a10 !important;
  border-color:#6c4b13 !important;
  color:#ffe6a8 !important;
}
body.dark .table,
body.dark .table tbody,
body.dark .table tr,
body.dark .table td,
body.dark .table th,
body.dark .table > :not(caption) > * > * {
  background-color:transparent !important;
  color:#dbe6f5 !important;
  border-color:#25344f !important;
  box-shadow:none !important;
}
body.dark .table thead,
body.dark .table thead tr,
body.dark .table-light,
body.dark .table-light > :not(caption) > * > * {
  background-color:#111c2d !important;
  color:#aebdd2 !important;
  --bs-table-bg:#111c2d;
  --bs-table-color:#aebdd2;
}
body.dark .table tbody tr:nth-child(odd) { background:#162238 !important; }
body.dark .table tbody tr:nth-child(even) { background:#111c2d !important; }
body.dark .table-hover tbody tr:hover,
body.dark .table tbody tr:hover { background:#1d2a43 !important; }
body.dark .table tbody tr:hover > * { color:#fff !important; }
body.dark .modal-content .table tbody tr:nth-child(odd),
body.dark .card .table tbody tr:nth-child(odd) { background:#162238 !important; }
body.dark .modal-content .table tbody tr:nth-child(even),
body.dark .card .table tbody tr:nth-child(even) { background:#111c2d !important; }

body.dark .table .text-dark,
body.dark .table .fw-bold,
body.dark .table .fw-semibold,
body.dark .table b,
body.dark .table strong { color:#e5edf8 !important; }
body.dark .table .text-muted,
body.dark .table small,
body.dark .table .small { color:#8ea0ba !important; }
body.dark .modal-content [style*="background:#fff"],
body.dark .modal-content [style*="background: #fff"],
body.dark .modal-content [style*="background:#faf9f7"],
body.dark .modal-content [style*="background: #faf9f7"],
body.dark .core-list-card [style*="background:#fff"],
body.dark .core-list-card [style*="background: #fff"] {
  background:#111c2d !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
}
body.dark .cat-name-input,
body.dark .core-touchspin,
body.dark .rect-tabs .rtab {
  background:#111c2d !important;
  border-color:#2b3c5d !important;
  color:#dbe6f5 !important;
}
body.dark .rect-tabs .rtab.active,
body.dark .rect-tabs .rtab:hover {
  background:#1d2a43 !important;
  color:#fff !important;
}
body.dark .option-row .label { color:#fca5a5 !important; }
body.dark .q-actions a.disabled { color:#64748b !important; }

/* Dark mode account/rbac/asset/live-info/placeholder refinements */
body.dark .account-side-card,
body.dark .account-form-card,
body.dark .account-resource-card,
body.dark .account-field,
body.dark .dept-tree,
body.dark .dept-detail .core-list-card,
body.dark .asset-balance-card,
body.dark .asset-fee-preview,
body.dark .asset-pay-qr,
body.dark .live-info-bar {
  background:#162238 !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
  box-shadow:0 16px 36px rgba(0,0,0,.22) !important;
}
body.dark .account-section-title,
body.dark .account-side-card h5,
body.dark .account-card-head h5,
body.dark .account-field span,
body.dark .account-resource-card strong,
body.dark .dept-tree h6,
body.dark .dept-node-row,
body.dark .asset-balance-card h1,
body.dark .asset-balance-card h2,
body.dark .asset-balance-card h3,
body.dark .asset-balance-card strong,
body.dark .live-info-bar strong,
body.dark .live-info-bar .fw-bold,
body.dark .live-info-title {
  color:#e5edf8 !important;
}
body.dark .account-side-card p,
body.dark .account-card-head span,
body.dark .account-field label,
body.dark .account-resource-card .text-muted,
body.dark .dept-node-row .dept-meta,
body.dark .dept-node-row .toggle,
body.dark .asset-balance-card .text-muted,
body.dark .asset-balance-label,
body.dark .asset-fee-preview,
body.dark .asset-fee-preview .text-muted,
body.dark .live-info-bar small,
body.dark .live-info-bar .text-muted,
body.dark .live-info-meta small {
  color:#8ea0ba !important;
}
body.dark .asset-balance-value {
  color:#f8fbff !important;
  text-shadow:0 8px 22px rgba(0,0,0,.22);
}
body.dark .account-side-card::before {
  background:linear-gradient(135deg,#0b1220,#1d4ed8) !important;
  opacity:.82;
}
body.dark .account-side-avatar img,
body.dark .account-avatar-placeholder { border-color:#25344f !important; }
body.dark .dept-tree-toggle { background:#1d2a43 !important; color:#9fb0ff !important; box-shadow:0 8px 18px rgba(0,0,0,.28) !important; }
body.dark .dept-layout.is-tree-collapsed .dept-tree-toggle { background:var(--cork-primary) !important; color:#fff !important; }
body.dark .dept-node-children { border-left-color:#334669 !important; }
body.dark .dept-node-row:hover { background:#1d2a43 !important; }
body.dark .dept-node-row.active { background:linear-gradient(135deg,#3d5df3,#6d7cff) !important; color:#fff !important; }
body.dark .dept-node-row:not(.active) .dept-actions button { color:#aebdd2 !important; }
body.dark .row-action-menu,
body.dark .dept-picker-panel {
  background:#162238 !important;
  border-color:#2b3c5d !important;
  box-shadow:0 18px 42px rgba(0,0,0,.32) !important;
}
body.dark .row-action-menu a,
body.dark .dept-picker-panel .dpp-item { color:#dbe6f5 !important; }
body.dark .row-action-menu a:hover,
body.dark .dept-picker-panel .dpp-item:hover { background:#1d2a43 !important; color:#8ea2ff !important; }
body.dark .row-action-menu hr { border-top-color:#25344f !important; }
body.dark .dept-picker-btn { background:#111c2d !important; border-color:#2b3c5d !important; color:#dbe6f5 !important; }
body.dark .dept-picker-panel .dpp-arrow { color:#8ea0ba !important; }
body.dark .role-root,
body.dark .role-super_admin,
body.dark .role-dept_admin,
body.dark .role-normal { border:1px solid rgba(255,255,255,.08); }
body.dark .role-root { background:#3a2a10 !important; color:#ffe6a8 !important; }
body.dark .role-super_admin { background:#142743 !important; color:#bfdbfe !important; }
body.dark .role-dept_admin { background:#123224 !important; color:#bbf7d0 !important; }
body.dark .role-normal { background:#25344f !important; color:#c8d7ee !important; }
body.dark .asset-fee-preview [style*="color:#"] { color:#dbe6f5 !important; }
body.dark .asset-pay-qr canvas,
body.dark .asset-pay-qr img { background:#fff; border-radius:12px; padding:6px; }
body.dark .live-info-bar {
  background:linear-gradient(135deg,rgba(61,93,243,.13),#162238) !important;
}
body.dark .placeholder {
  background-color:#334669 !important;
  opacity:.78 !important;
}
body.dark .placeholder-wave .placeholder { animation:placeholder-wave-dark 1.6s linear infinite; }
@keyframes placeholder-wave-dark {
  100% { mask-position:-200% 0%; -webkit-mask-position:-200% 0%; }
}
body.dark .core-loading-skeleton,
body.dark .list-skeleton,
body.dark .ao-empty,
body.dark .core-skeleton-tree,
body.dark .core-skeleton-grid,
body.dark .core-skeleton-table {
  color:#334669 !important;
}
body.dark [style*="background:#faf7f2"],
body.dark [style*="background: #faf7f2"],
body.dark [style*="background:#fffaf4"],
body.dark [style*="background: #fffaf4"] {
  background:#111c2d !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
}

/* Dark mode order service / traffic pages */
body.dark .cork-pricing-widget,
body.dark .pricing-table-3.order-service-pricing,
body.dark .order-service-pricing .pricing-plan,
body.dark .traffic-summary-card,
body.dark .traffic-chart-card {
  background:#162238 !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
  box-shadow:0 16px 36px rgba(0,0,0,.22) !important;
}
body.dark .order-service-pricing .pricing-plan.plan-basic,
body.dark .order-service-pricing .pricing-plan.plan-starter,
body.dark .order-service-pricing .pricing-plan.recommanded,
body.dark .order-service-pricing .pricing-plan.plan-premium {
  background:linear-gradient(180deg,#162238,#111c2d) !important;
  border-color:#25344f !important;
}
body.dark .order-service-pricing .pricing-plan:hover,
body.dark .traffic-summary-card:hover,
body.dark .traffic-chart-card:hover {
  border-color:#3d5df3 !important;
  box-shadow:0 18px 46px rgba(0,0,0,.32) !important;
}
body.dark .order-service-pricing .pricing-header-section { border-bottom-color:#334669 !important; }
body.dark .order-service-pricing .pricing-header h3,
body.dark .order-service-pricing .pricing-header-pricing,
body.dark .order-service-pricing .yearly-pricing,
body.dark .order-service-pricing .pricing-plan-features h5,
body.dark .order-service-pricing .pricing-plan-features .d-flex > p,
body.dark .traffic-summary-card .value,
body.dark .traffic-chart-card h1,
body.dark .traffic-chart-card h2,
body.dark .traffic-chart-card h3,
body.dark .traffic-chart-card h4,
body.dark .traffic-chart-card h5,
body.dark .traffic-chart-card strong,
body.dark .core-item-main {
  color:#e5edf8 !important;
}
body.dark .order-service-pricing .pricing-header p,
body.dark .order-service-pricing .sub-title,
body.dark .order-service-pricing .pricing-plan-features li,
body.dark .traffic-summary-card .label,
body.dark .traffic-summary-card .value small,
body.dark .traffic-chart-card .text-muted,
body.dark .traffic-chart-card small {
  color:#8ea0ba !important;
}
body.dark .order-service-pricing .check-icon { color:#5eead4 !important; }
body.dark .order-service-pricing .badge-light-success {
  background:rgba(34,197,94,.16) !important;
  border:1px solid rgba(74,222,128,.22) !important;
  color:#86efac !important;
}
body.dark .traffic-chart-card canvas {
  background:#111c2d;
  border-radius:12px;
  padding:8px;
}
body.dark .traffic-chart-card .table td:first-child,
body.dark .traffic-chart-card .core-item-main,
body.dark .core-list-card .core-item-main {
  color:#e5edf8 !important;
}
body.dark .traffic-chart-card .table td,
body.dark .traffic-chart-card .table th {
  color:#dbe6f5 !important;
}

/* Dark mode RBAC role permission cards */
body.dark .rbac-wrap .role-card,
body.dark .rbac-wrap .perm-group,
body.dark .rbac-wrap .card,
body.dark .rbac-wrap .card-body {
  background:#162238 !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
}
body.dark .rbac-wrap .role-card:hover {
  background:#1d2a43 !important;
  border-color:#3d5df3 !important;
}
body.dark .rbac-wrap .role-card.active {
  background:linear-gradient(135deg,#1d2a43,#162238) !important;
  border-color:#8ea2ff !important;
  box-shadow:0 12px 28px rgba(61,93,243,.26) !important;
}
body.dark .rbac-wrap .role-card .name,
body.dark .rbac-wrap .perm-group-head .module-label,
body.dark .rbac-wrap .perm-actions label span {
  color:#e5edf8 !important;
}
body.dark .rbac-wrap .role-card .hint,
body.dark .rbac-wrap .perm-group-head .module-count {
  color:#8ea0ba !important;
}
body.dark .rbac-wrap .badge-readonly {
  background:#3a2a10 !important;
  border:1px solid #6c4b13 !important;
  color:#ffe6a8 !important;
}
body.dark .rbac-wrap .perm-actions {
  border-top-color:#334669 !important;
}
body.dark .rbac-wrap .perm-actions input[type="checkbox"]:disabled + span {
  color:#64748b !important;
}
body.dark .rbac-wrap .perm-tip {
  background:#111c2d !important;
  border-color:#3a4d70 !important;
  color:#8ea0ba !important;
}
body.dark .rbac-wrap .perm-tip:hover {
  background:#1d2a43 !important;
  border-color:#8ea2ff !important;
  color:#b8c4ff !important;
}

/* Dark mode notification center date/time contrast */
body.dark .notification-timeline .core-timeline-time {
  color:#c8d7ee !important;
}
body.dark .notification-timeline .core-timeline-date span,
body.dark .core-timeline-date {
  background:#1d2a43 !important;
  border:1px solid #334669 !important;
  color:#9fb0ff !important;
}
body.dark .notification-timeline .core-timeline-item::before {
  background:#25344f !important;
}
body.dark .notification-timeline .announcement-markdown,
body.dark .notification-timeline .announcement-markdown p,
body.dark .notification-timeline .announcement-markdown li {
  color:#dbe6f5 !important;
}
body.dark .notification-timeline .announcement-markdown blockquote {
  border-left-color:#334669 !important;
  color:#aebdd2 !important;
}
body.dark .notification-timeline .announcement-markdown code {
  background:#111c2d !important;
  color:#dbe6f5 !important;
}
body.dark .notification-timeline .announcement-markdown pre {
  background:#111c2d !important;
  color:#dbe6f5 !important;
}

/* Dark mode RBAC permission save bar */
body.dark .rbac-wrap .save-bar {
  background:linear-gradient(to top, #162238 78%, rgba(22,34,56,0)) !important;
  border-top:1px solid #25344f !important;
  box-shadow:0 -14px 28px rgba(0,0,0,.18) !important;
}
body.dark .rbac-wrap .save-bar .btn:disabled {
  background:#25344f !important;
  border-color:#334669 !important;
  color:#64748b !important;
  opacity:1 !important;
}
body.dark .rbac-wrap #changedHint {
  color:#fbbf24 !important;
}

/* Dark mode touchspin buttons */
body.dark .core-touchspin-btn {
  background:#1d2a43 !important;
  color:#c8d7ee !important;
  border-color:#334669 !important;
}
body.dark .core-touchspin-btn:hover,
body.dark .core-touchspin-btn:focus {
  background:#3d5df3 !important;
  color:#fff !important;
}
body.dark .core-touchspin-input {
  background:#111c2d !important;
  border-left-color:#334669 !important;
  border-right-color:#334669 !important;
  color:#e5edf8 !important;
}

/* Dark mode image loading placeholders */
body.dark .img-placeholder-wrap.is-img-loading::before {
  background-color:#25344f !important;
}
body.dark .img-placeholder-wrap.is-img-loading::after {
  background:linear-gradient(90deg, transparent, rgba(142,162,255,.28), transparent) !important;
}
body.dark .img-placeholder-wrap.is-img-loading {
  background:#111c2d !important;
}
body.dark .core-skeleton-thumb {
  background-color:#25344f !important;
}

/* Dark mode more popup items */
body.dark .more-popup .popup-item {
  color:#dbe6f5 !important;
  background:transparent !important;
}
body.dark .more-popup .popup-item:hover,
body.dark .more-popup .popup-item:focus {
  background:#1d2a43 !important;
  color:#fff !important;
}
body.dark .more-popup .popup-item.text-muted {
  color:#8ea0ba !important;
}
body.dark .more-popup .popup-item.text-danger {
  color:#fca5a5 !important;
}
body.dark .more-popup .popup-item.text-danger:hover,
body.dark .more-popup .popup-item.text-danger:focus {
  background:#3a171c !important;
  color:#fecaca !important;
}
body.dark .more-popup .popup-divider {
  background:#25344f !important;
}

/* Dark mode unified GroupList accordions (live/material/admin/list skeleton) */
body.dark .core-accordion .core-accordion-item,
body.dark .core-accordion .core-accordion-item.is-collapsed,
body.dark .core-accordion .core-accordion-item.collapsed {
  background:#162238 !important;
  border-color:#25344f !important;
  box-shadow:0 12px 28px rgba(0,0,0,.22) !important;
}
body.dark .core-accordion .core-accordion-item:not(.is-collapsed):not(.collapsed) .core-accordion-header,
body.dark .core-accordion .core-accordion-item:not(.is-collapsed):not(.collapsed) .core-accordion-header:hover {
  background:#162238 !important;
  color:#e5edf8 !important;
}
body.dark .core-accordion .core-accordion-item.is-collapsed .core-accordion-header,
body.dark .core-accordion .core-accordion-item.collapsed .core-accordion-header {
  background:#0f1828 !important;
  color:#aebdd2 !important;
}
body.dark .core-accordion .core-accordion-item.is-collapsed .core-accordion-header:hover,
body.dark .core-accordion .core-accordion-item.collapsed .core-accordion-header:hover {
  background:#142033 !important;
  color:#dbe6f5 !important;
}
body.dark .core-accordion .core-accordion-body {
  background:#162238 !important;
  border-top-color:#25344f !important;
}
body.dark .core-accordion .core-accordion-name { color:#e5edf8 !important; }
body.dark .core-accordion .core-accordion-meta { color:#8ea0ba !important; }
body.dark .core-accordion .core-accordion-actions,
body.dark .core-accordion .core-btn-text { color:#8ea2ff !important; }
body.dark .core-accordion .core-btn-text:hover { color:#b8c4ff !important; }
body.dark .core-accordion .core-accordion-count {
  background:#1d2a43 !important;
  border:1px solid #334669 !important;
  color:#c8d7ee !important;
}
body.dark .core-accordion .core-accordion-icon {
  background:rgba(61,93,243,.22) !important;
  color:#9fb0ff !important;
}
body.dark .core-accordion .core-accordion-item.is-collapsed,
body.dark .core-accordion .core-accordion-item.collapsed {
  border-color:#1f2c44 !important;
}
body.dark .core-accordion .core-accordion-item.is-collapsed .core-accordion-name,
body.dark .core-accordion .core-accordion-item.collapsed .core-accordion-name {
  color:#aebdd2 !important;
}
body.dark .core-accordion .core-accordion-item.is-collapsed .core-accordion-icon,
body.dark .core-accordion .core-accordion-item.collapsed .core-accordion-icon {
  background:#25344f !important;
  color:#8ea0ba !important;
}
body.dark .core-accordion .core-accordion-item.is-collapsed .core-accordion-count,
body.dark .core-accordion .core-accordion-item.collapsed .core-accordion-count {
  background:#111c2d !important;
  color:#8ea0ba !important;
}
body.dark .core-accordion .group-pagebar.core-list-pagination {
  background:#111c2d !important;
  border-top:1px solid #25344f !important;
}

/* Unified small back links */
.core-back-link {
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:0;
  background:transparent;
  color:#8a94a6 !important;
  font-size:13px;
  font-weight:600;
  line-height:1.4;
  padding:2px 0;
  text-decoration:none !important;
  cursor:pointer;
}
.core-back-link:hover,
.core-back-link:focus {
  color:var(--cork-primary, #4361ee) !important;
}
body.dark .core-back-link {
  color:#8ea0ba !important;
}
body.dark .core-back-link:hover,
body.dark .core-back-link:focus {
  color:#9fb0ff !important;
}

/* Dark mode QR design page */
body.dark .qrd-app-shell,
body.dark .qrd-page {
  background:#0e1726 !important;
  color:#dbe6f5 !important;
}
body.dark .qrd-header-title h3,
body.dark .qrd-panel h4,
body.dark .qrd-tpl-name {
  color:#e5edf8 !important;
}
body.dark .qrd-panel,
body.dark .qrd-preview-wrap,
body.dark .qrd-tpl-card,
body.dark .qrd-img-lib,
body.dark .qrd-img-item,
body.dark .qrd-slot-empty {
  background:#162238 !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
  box-shadow:0 16px 36px rgba(0,0,0,.22) !important;
}
body.dark .qrd-tpl-card:hover,
body.dark .qrd-img-item:hover {
  border-color:#8ea2ff !important;
}
body.dark .qrd-tpl-card.active,
body.dark .qrd-img-item.active {
  background:#1d2a43 !important;
  border-color:#8ea2ff !important;
  box-shadow:0 10px 24px rgba(61,93,243,.28) !important;
}
body.dark .qrd-tpl-thumb,
body.dark .qrd-img-item.clear {
  background:#111c2d !important;
  border-color:#334669 !important;
  color:#8ea0ba !important;
}
body.dark .qrd-preview-canvas {
  background:#111c2d !important;
  box-shadow:0 12px 28px rgba(0,0,0,.28) !important;
}
body.dark .qrd-url-hint,
body.dark .qrd-row label,
body.dark .qrd-panel .text-muted,
body.dark .qrd-slot-empty {
  color:#8ea0ba !important;
}
body.dark .qrd-row input[type=text],
body.dark .qrd-row input[type=number],
body.dark .qrd-row select {
  background:#111c2d !important;
  border-color:#2b3c5d !important;
  color:#e5edf8 !important;
}
body.dark .qrd-row input[type=color] {
  background:#111c2d !important;
  border-color:#2b3c5d !important;
}
body.dark .qrd-row input[type=range] { accent-color:#8ea2ff; }
body.dark .qrd-actions .btn-light,
body.dark .qrd-actions .btn-outline-secondary {
  background:#162238 !important;
  border-color:#334669 !important;
  color:#dbe6f5 !important;
}
body.dark .qrd-actions .btn-light:hover,
body.dark .qrd-actions .btn-outline-secondary:hover {
  background:#1d2a43 !important;
  color:#fff !important;
}

/* Admin submenu card */
.admin-submenu-card {
  background:#fff;
  border:1px solid #e8edf7;
  border-radius:16px;
  padding:10px 12px;
  box-shadow:0 2px 12px rgba(0,0,0,.04);
}
.admin-submenu-row { display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.admin-submenu-row.has-divider { border-bottom:1px dashed #eee; padding-bottom:6px; margin-bottom:6px; }
.admin-submenu-label { min-width:42px; padding:4px 6px; color:#8a94a6; font-size:12px; }
.admin-submenu-link { padding:8px 12px; border-radius:10px; color:#8a94a6; text-decoration:none; }
.admin-submenu-link:hover { color:var(--accent,#4361ee); background:rgba(67,97,238,.08); }
.admin-submenu-link.active { background:var(--accent,#4361ee); color:#fff; font-weight:700; }
body.dark .admin-submenu-card { background:#162238 !important; border-color:#25344f !important; box-shadow:0 16px 36px rgba(0,0,0,.22) !important; }
body.dark .admin-submenu-row.has-divider { border-bottom-color:#25344f !important; }
body.dark .admin-submenu-label { color:#8ea0ba !important; }
body.dark .admin-submenu-link { color:#aebdd2 !important; }
body.dark .admin-submenu-link:hover { background:#1d2a43 !important; color:#fff !important; }
body.dark .admin-submenu-link.active { background:linear-gradient(135deg,#3d5df3,#6d7cff) !important; color:#fff !important; }

/* Dark mode sortable group drag handles */
body.dark #sortableGroupBody .core-drag-handle,
body.dark .core-drag-handle,
body.dark .qz-drag {
  background:#1d2a43 !important;
  border:1px solid #334669 !important;
  color:#c8d7ee !important;
  box-shadow:none !important;
}
body.dark #sortableGroupBody .core-drag-handle:hover,
body.dark .core-drag-handle:hover,
body.dark .qz-drag:hover {
  background:#3d5df3 !important;
  border-color:#8ea2ff !important;
  color:#fff !important;
}
body.dark #sortableGroupBody tr.is-dragging,
body.dark #sortableGroupBody tr.drag-over { background:#1d2a43 !important; }

/* Dark mode live assignment overlay */
body.dark #assignOverlay { background:rgba(0,0,0,.62) !important; }
body.dark #assignOverlay .ao-card { background:#162238 !important; border:1px solid #25344f !important; color:#dbe6f5 !important; box-shadow:0 28px 70px rgba(0,0,0,.48) !important; }
body.dark #assignOverlay .ao-head,
body.dark #assignOverlay .ao-foot { border-color:#25344f !important; background:#162238 !important; }
body.dark #assignOverlay .ao-head h5 { color:#e5edf8 !important; }
body.dark #assignOverlay .ao-close { color:#8ea0ba !important; }
body.dark #assignOverlay .ao-close:hover { color:#fff !important; }
body.dark #assignOverlay .ao-body { background:#162238 !important; }
body.dark #assignOverlay .ao-title,
body.dark #assignOverlay #aoTitle,
body.dark #assignOverlay .ao-status { color:#8ea0ba !important; }
body.dark #assignOverlay .ao-list { background:#111c2d !important; border-color:#25344f !important; }
body.dark #assignOverlay .ao-dept { background:#0f1828 !important; border-bottom-color:#25344f !important; color:#aebdd2 !important; }
body.dark #assignOverlay .ao-dept:hover { background:#142033 !important; color:#e5edf8 !important; }
body.dark #assignOverlay .ao-dept-count,
body.dark #assignOverlay .ao-dept-arrow { color:#8ea0ba !important; }
body.dark #assignOverlay .ao-user { background:#111c2d !important; border-bottom-color:#25344f !important; color:#dbe6f5 !important; }
body.dark #assignOverlay .ao-user:hover { background:#1d2a43 !important; }
body.dark #assignOverlay .ao-user.selected { background:linear-gradient(135deg,#3d5df3,#6d7cff) !important; color:#fff !important; }
body.dark #assignOverlay .ao-user.selected .ao-sub { color:rgba(255,255,255,.86) !important; }
body.dark #assignOverlay .ao-user.current { opacity:.62; }
body.dark #assignOverlay .ao-sub,
body.dark #assignOverlay .ao-empty { color:#8ea0ba !important; }
body.dark #assignOverlay .ao-sel-hint { color:#f0abfc !important; }


/* Dark mode modal hardening (Bootstrap + custom live assignment) */
body.dark .modal-backdrop,
body.dark .modal-backdrop.show {
  background-color:#020617 !important;
  opacity:.72 !important;
}
body.dark .modal-content {
  background:#162238 !important;
  border:1px solid #25344f !important;
  color:#dbe6f5 !important;
  box-shadow:0 28px 70px rgba(0,0,0,.48) !important;
}
body.dark .modal-header,
body.dark .modal-footer {
  background:#162238 !important;
  border-color:#25344f !important;
}
body.dark .modal-body {
  background:#162238 !important;
  color:#c8d7ee !important;
}
body.dark .modal-title,
body.dark .modal-content h1,
body.dark .modal-content h2,
body.dark .modal-content h3,
body.dark .modal-content h4,
body.dark .modal-content h5,
body.dark .modal-content h6,
body.dark .modal-content label,
body.dark .modal-content .form-label {
  color:#e5edf8 !important;
}
body.dark .modal-content .text-muted,
body.dark .modal-content small,
body.dark .modal-content .small,
body.dark .modal-content p {
  color:#8ea0ba !important;
}
body.dark .modal-content .table,
body.dark .modal-content .table > :not(caption) > * > * {
  background:transparent !important;
  color:#dbe6f5 !important;
  border-color:#25344f !important;
}
body.dark .modal-content [style*="background:#fff"],
body.dark .modal-content [style*="background: #fff"],
body.dark .modal-content [style*="background:white"],
body.dark .modal-content [style*="background: white"],
body.dark .modal-content [style*="background:#fafafa"],
body.dark .modal-content [style*="background: #fafafa"],
body.dark .modal-content [style*="background:#faf9f7"],
body.dark .modal-content [style*="background: #faf9f7"],
body.dark .modal-content [style*="background:#f8f9fa"],
body.dark .modal-content [style*="background: #f8f9fa"] {
  background:#111c2d !important;
  color:#dbe6f5 !important;
  border-color:#25344f !important;
}
body.dark .modal-content [style*="border-bottom:1px solid #f0ede8"],
body.dark .modal-content [style*="border-top:1px solid #f0ede8"] {
  border-color:#25344f !important;
}
body.dark .modal-content .list-group-item {
  background:#111c2d !important;
  border-color:#25344f !important;
  color:#dbe6f5 !important;
}
body.dark .modal-content .badge.bg-light,
body.dark .modal-content .bg-light {
  background:#1d2a43 !important;
  color:#c8d7ee !important;
}
body.dark #assignOverlay {
  background:rgba(2,6,23,.74) !important;
  backdrop-filter:blur(2px);
}
body.dark #assignOverlay .ao-card,
body.dark #assignOverlay .ao-head,
body.dark #assignOverlay .ao-body,
body.dark #assignOverlay .ao-foot {
  background:#162238 !important;
}
body.dark #assignOverlay input,
body.dark #assignOverlay .form-control {
  background:#111c2d !important;
  border-color:#2b3c5d !important;
  color:#e5edf8 !important;
}
body.dark #assignOverlay input::placeholder,
body.dark #assignOverlay .form-control::placeholder {
  color:#64748b !important;
}

/* ============ Boo Copilot (AI 助手) ============ */
.ai-copilot-fab {
  position: fixed; right: 18px; bottom: 22px; z-index: 1080;
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff; border: none; border-radius: 999px;
  padding: 10px 16px; cursor: pointer;
  box-shadow: 0 10px 28px rgba(99,102,241,0.35), 0 2px 6px rgba(0,0,0,0.08);
  font-weight: 700; font-size: 14px; line-height: 1; transition: transform .15s ease, box-shadow .15s ease;
}
.ai-copilot-fab:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(99,102,241,0.45); }
.ai-copilot-fab svg { display: block; }
.ai-copilot-fab-label { font-size: 13px; letter-spacing: 0.2px; }

/* Boo FAB 上方动态提示气泡 */
.ai-copilot-fab-tip {
  position: absolute; right: 0; bottom: calc(100% + 10px);
  white-space: nowrap; pointer-events: none;
  background: #fff; color: #6366f1;
  font-size: 14px; font-weight: 700; line-height: 1.2;
  padding: 9px 16px; border-radius: 999px;
  box-shadow: 0 8px 22px rgba(99,102,241,0.34), 0 2px 6px rgba(0,0,0,0.10);
  animation: aiCopilotTipFloat 2.4s ease-in-out infinite;
}
.ai-copilot-fab-tip::after {
  content: ""; position: absolute; right: 22px; top: 100%;
  border: 7px solid transparent; border-top-color: #fff;
}
@keyframes aiCopilotTipFloat {
  0%, 100% { transform: translateY(0); opacity: 0.9; }
  50%      { transform: translateY(-5px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-copilot-fab-tip { animation: none; }
}

.ai-copilot-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,0.35);
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
  z-index: 1090;
}
.ai-copilot-mask.is-open { opacity: 1; pointer-events: auto; }

.ai-copilot-drawer {
  position: fixed; right: 0; top: 0; height: 100vh;
  width: min(440px, 96vw); background: #fff;
  box-shadow: -16px 0 40px rgba(15,23,42,0.18);
  display: flex; flex-direction: column; z-index: 1100;
  transform: translateX(110%); transition: transform .25s cubic-bezier(.4,.0,.2,1);
}
.ai-copilot-drawer.is-open { transform: translateX(0); }

.ai-copilot-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
}
.ai-copilot-title { display: flex; align-items: center; gap: 6px; font-size: 15px; color: #1f2937; }
.ai-copilot-emoji { font-size: 16px; }
.ai-copilot-actions { display: flex; gap: 4px; }
.ai-copilot-btn-ghost {
  width: 30px; height: 30px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; color: #64748b; font-size: 16px;
}
.ai-copilot-btn-ghost:hover { background: #f1f5f9; color: #1f2937; }
.ai-copilot-btn-ghost#aiCopilotClose { font-size: 20px; }

.ai-copilot-body {
  flex: 1; overflow-y: auto; padding: 14px 14px 6px 14px; background: #fafbfd;
}
.ai-copilot-welcome {
  background: #fff; border: 1px solid #eef2f7; border-radius: 14px; padding: 14px;
  box-shadow: 0 1px 0 rgba(15,23,42,0.02);
}
.ai-copilot-welcome.is-hidden { display: none; }
.ai-copilot-welcome-text { color: #475569; font-size: 13px; margin-bottom: 10px; }
.ai-copilot-welcome-hi { margin: 0 0 8px; }
.ai-copilot-welcome-list { list-style: none; margin: 0 0 8px; padding: 0; }
.ai-copilot-welcome-list li { position: relative; padding-left: 14px; margin: 4px 0; line-height: 1.55; }
.ai-copilot-welcome-list li::before {
  content: "•"; position: absolute; left: 2px; top: 0; color: #6366f1; font-weight: 700;
}
.ai-copilot-welcome-list strong { color: #4338ca; font-weight: 700; }
.ai-copilot-welcome-ask { margin: 0; }
.ai-copilot-suggestions { display: flex; flex-direction: column; gap: 6px; }
.ai-copilot-suggest-item {
  text-align: left; padding: 8px 10px; border: 1px solid #e5e7eb;
  background: #f8fafc; color: #334155; border-radius: 10px;
  font-size: 13px; cursor: pointer; transition: background .12s ease, border-color .12s ease;
}
.ai-copilot-suggest-item:hover { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.ai-copilot-loading { color: #94a3b8; font-size: 12px; }

.ai-copilot-messages { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ai-copilot-msg { display: flex; }
.ai-copilot-msg-user { justify-content: flex-end; }
.ai-copilot-msg-assistant { justify-content: flex-start; }
.ai-copilot-bubble {
  max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 13.5px;
  line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.ai-copilot-msg-user .ai-copilot-bubble {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #fff; border-bottom-right-radius: 4px;
}
.ai-copilot-msg-assistant .ai-copilot-bubble {
  background: #fff; color: #1f2937; border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}
.ai-copilot-bubble-error { background: #fef2f2 !important; color: #991b1b !important; border-color: #fecaca !important; }
.ai-copilot-bubble-error-inline { color: #b45309; font-size: 12px; }
.ai-copilot-confirm-card {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: #fff8ed; border: 1px solid #f6dfbd; color: #7a4b00;
  font-size: 13px;
}
.ai-copilot-confirm-title { font-weight: 700; margin-bottom: 6px; }
.ai-copilot-confirm-msg { line-height: 1.55; margin-bottom: 8px; white-space: pre-wrap; }
.ai-copilot-confirm-actions { display: flex; justify-content: flex-end; }
body.dark .ai-copilot-confirm-card { background: #2a210d; border-color: #5b4423; color: #fde68a; }

/* Markdown 渲染 */
.ai-copilot-bubble-md { white-space: normal; }
.ai-copilot-bubble-md > *:first-child { margin-top: 0; }
.ai-copilot-bubble-md > *:last-child  { margin-bottom: 0; }
.ai-copilot-bubble-md p { margin: 6px 0; line-height: 1.6; }
.ai-copilot-bubble-md h1,
.ai-copilot-bubble-md h2,
.ai-copilot-bubble-md h3,
.ai-copilot-bubble-md h4 { margin: 12px 0 6px; font-weight: 700; line-height: 1.3; }
.ai-copilot-bubble-md h1 { font-size: 17px; }
.ai-copilot-bubble-md h2 { font-size: 16px; }
.ai-copilot-bubble-md h3 { font-size: 15px; }
.ai-copilot-bubble-md h4 { font-size: 14px; }
.ai-copilot-bubble-md ul,
.ai-copilot-bubble-md ol { margin: 6px 0; padding-left: 22px; }
.ai-copilot-bubble-md li { margin: 2px 0; line-height: 1.55; }
.ai-copilot-bubble-md code {
  background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em;
}
.ai-copilot-bubble-md pre {
  background: #0f172a; color: #e5e7eb; padding: 10px 12px;
  border-radius: 8px; overflow-x: auto; margin: 8px 0;
  font-size: 12.5px; line-height: 1.5;
}
.ai-copilot-bubble-md pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }
.ai-copilot-bubble-md blockquote {
  border-left: 3px solid #d4b878; padding: 4px 10px; margin: 8px 0;
  background: #fff8ed; color: #5a3a10; border-radius: 0 6px 6px 0;
}
.ai-copilot-bubble-md table {
  border-collapse: collapse; margin: 8px 0; width: 100%; font-size: 12.5px;
}
.ai-copilot-bubble-md th,
.ai-copilot-bubble-md td { border: 1px solid #e5e7eb; padding: 5px 8px; text-align: left; }
.ai-copilot-bubble-md th { background: #f9fafb; font-weight: 700; }
.ai-copilot-bubble-md a { color: #2563eb; text-decoration: underline; }
.ai-copilot-bubble-md hr { border: none; border-top: 1px solid #e5e7eb; margin: 10px 0; }
body.dark .ai-copilot-bubble-md code { background: rgba(255,255,255,0.08); }
body.dark .ai-copilot-bubble-md pre { background: #0b1220; }
body.dark .ai-copilot-bubble-md blockquote { background: #2a210d; color: #fde68a; border-left-color: #b88a32; }
body.dark .ai-copilot-bubble-md th { background: #1f2937; }
body.dark .ai-copilot-bubble-md th,
body.dark .ai-copilot-bubble-md td { border-color: #374151; }
body.dark .ai-copilot-bubble-md a { color: #93c5fd; }

/* 历史对话面板 */
.ai-copilot-drawer { position: fixed; } /* 作为定位上下文 */
.ai-copilot-history-panel {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: #fff;
  transform: translateY(8px); opacity: 0; pointer-events: none;
  transition: all 0.18s ease;
  display: flex; flex-direction: column; z-index: 3;
}
.ai-copilot-history-panel.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.ai-copilot-history-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #f2ece1;
  font-size: 14px;
}
.ai-copilot-history-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.ai-copilot-history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #faf6ef;
}
.ai-copilot-history-item:hover { background: #fff8ed; }
.ai-copilot-history-item.is-active { background: #fef3d7; }
.ai-copilot-history-main { flex: 1; min-width: 0; }
.ai-copilot-history-title {
  font-weight: 600; font-size: 13px; color: #172033;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ai-copilot-history-meta { font-size: 11px; color: #98a2b3; margin-top: 2px; }
.ai-copilot-history-del {
  background: transparent; border: none; color: #9ca3af; font-size: 18px;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
}
.ai-copilot-history-del:hover { background: #fee2e2; color: #b91c1c; }
body.dark .ai-copilot-history-panel { background: #0f172a; border-top-color: #1f2937; }
body.dark .ai-copilot-history-header { border-bottom-color: #1f2937; color: #e5e7eb; }
body.dark .ai-copilot-history-item { border-bottom-color: #1f2937; }
body.dark .ai-copilot-history-item:hover { background: #1e293b; }
body.dark .ai-copilot-history-item.is-active { background: #1e3a8a; }
body.dark .ai-copilot-history-title { color: #e5e7eb; }

.ai-copilot-thinking { display: inline-flex; align-items: center; color: #94a3b8; font-style: italic; }
.ai-copilot-thinking .dot { animation: aiCopilotDot 1.2s infinite; opacity: .3; margin-left: 1px; }
.ai-copilot-thinking .dot:nth-child(2) { animation-delay: .2s; }
.ai-copilot-thinking .dot:nth-child(3) { animation-delay: .4s; }
@keyframes aiCopilotDot { 0%,80%,100% { opacity:.3; } 40% { opacity:1; } }

.ai-copilot-input {
  border-top: 1px solid #eef2f7; padding: 10px 14px 12px; background: #fff;
}
.ai-copilot-input textarea {
  width: 100%; resize: none; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 8px 10px; font-size: 13px; color: #1f2937; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.ai-copilot-input textarea:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,0.18); }
.ai-copilot-input-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.ai-copilot-input-hint { font-size: 11px; color: #94a3b8; }
.ai-copilot-send {
  background: #4f46e5; color: #fff; border: none; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ai-copilot-send:disabled { background: #cbd5e1; cursor: not-allowed; }
.ai-copilot-send:not(:disabled):hover { background: #4338ca; }
/* 停止按钮（2026-09-12）：只在生成中出现，红框弱填充，不跟「发送」抢主色 */
.ai-copilot-stop {
  margin-right: 8px; padding: 6px 12px; border: 1px solid #fca5a5; border-radius: 8px;
  background: #fff; color: #dc2626; font-size: 13px; cursor: pointer;
}
.ai-copilot-stop:hover { background: #fef2f2; }
/* 题库文件上传按钮（2026-09-08）：与发送按钮同高，弱化成次要动作 */
.ai-copilot-upload {
  margin-right: 8px; padding: 6px 12px; border: 1px solid #d0d7de; border-radius: 8px;
  background: #fff; color: #475569; font-size: 13px; cursor: pointer;
}
.ai-copilot-upload:disabled { color: #cbd5e1; cursor: not-allowed; }
.ai-copilot-upload:not(:disabled):hover { border-color: #6366f1; color: #4338ca; }

/* 暗黑模式 */
body.dark .ai-copilot-drawer { background: #0f172a; box-shadow: -16px 0 40px rgba(0,0,0,0.5); }
body.dark .ai-copilot-header { background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%); border-bottom-color: #1e293b; }
body.dark .ai-copilot-title { color: #e2e8f0; }
body.dark .ai-copilot-btn-ghost { color: #94a3b8; }
body.dark .ai-copilot-btn-ghost:hover { background: #1e293b; color: #e2e8f0; }
body.dark .ai-copilot-body { background: #0b1220; }
body.dark .ai-copilot-welcome { background: #0f172a; border-color: #1e293b; }
body.dark .ai-copilot-welcome-text { color: #cbd5e1; }
body.dark .ai-copilot-welcome-list strong { color: #a5b4fc; }
body.dark .ai-copilot-welcome-list li::before { color: #818cf8; }
body.dark .ai-copilot-suggest-item { background: #111827; border-color: #1f2937; color: #cbd5e1; }
body.dark .ai-copilot-suggest-item:hover { background: #1e1b4b; border-color: #4338ca; color: #c7d2fe; }
body.dark .ai-copilot-msg-assistant .ai-copilot-bubble { background: #111827; color: #e5e7eb; border-color: #1f2937; }
body.dark .ai-copilot-bubble-error { background: #2a0e0e !important; color: #fecaca !important; border-color: #7f1d1d !important; }
body.dark .ai-copilot-input { background: #0f172a; border-top-color: #1e293b; }
body.dark .ai-copilot-input textarea { background: #111827; color: #e5e7eb; border-color: #1f2937; }
body.dark .ai-copilot-input textarea:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.25); }
body.dark .ai-copilot-input-hint { color: #64748b; }

/* 移动端铺满 */
@media (max-width: 575.98px) {
  .ai-copilot-drawer { width: 100vw; }
  .ai-copilot-fab-label { display: none; }
  .ai-copilot-fab { padding: 12px; }
}

/* ============ AI 润色 / 出题 通用 UI ============ */
.ai-polish-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca;
  border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease, opacity .12s ease;
}
.ai-polish-btn:hover { background: #e0e7ff; border-color: #818cf8; }
.ai-polish-btn:disabled { opacity: .6; cursor: not-allowed; }
.ai-polish-icon-btn {
  border: 0;
  background: transparent;
  color: #6366f1;
  border-radius: 999px;
  padding: 0;
  width: 22px;
  height: 22px;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
.ai-polish-icon-btn:hover { background: transparent; color: #4338ca; }
.ai-polish-icon-btn:focus-visible { outline: 2px solid rgba(99,102,241,.35); outline-offset: 2px; }
.ai-polish-icon-btn:disabled { background: transparent; }
.ai-polish-candidates {
  display: flex; flex-direction: column; gap: 6px; margin-top: 8px;
}
.ai-polish-candidate {
  text-align: left; padding: 8px 10px; border: 1px solid #e5e7eb;
  background: #f8fafc; color: #334155; border-radius: 8px;
  font-size: 13px; cursor: pointer; transition: background .12s ease, border-color .12s ease;
}
.ai-polish-candidate:hover { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
body.dark .ai-polish-btn { background: #1e1b4b; color: #c7d2fe; border-color: #3730a3; }
body.dark .ai-polish-btn:hover { background: #312e81; border-color: #6366f1; }
body.dark .ai-polish-icon-btn { background: transparent; color: #a5b4fc; border-color: transparent; }
body.dark .ai-polish-icon-btn:hover { background: transparent; color: #c7d2fe; }
body.dark .ai-polish-candidate { background: #111827; border-color: #1f2937; color: #cbd5e1; }
body.dark .ai-polish-candidate:hover { background: #1e1b4b; border-color: #4338ca; color: #c7d2fe; }

/* ===== Core page navigation loading ===== */
#load_screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  background: var(--panel-strong, #fff);
  opacity: 1;
}
#load_screen.show { display: flex; }
.loader-clones-square {
  width: 60px;
  aspect-ratio: 1;
  display: flex;
  --c1: linear-gradient(#92400e 0 0);
  --c2: linear-gradient(#f59e0b 0 0);
  --s: calc(100% / 3) calc(100% / 3);
  background: var(--c1) 0 0, var(--c2) 50% 0, var(--c1) 100% 0, var(--c2) 0 50%, var(--c2) 100% 50%, var(--c1) 0 100%, var(--c2) 50% 100%, var(--c1) 100% 100%;
  background-repeat: no-repeat;
  animation: core-loader-clones-square 1.5s infinite alternate;
}
.loader-clones-square::before {
  content: "";
  width: 33.3333333333%;
  height: 33.3333333333%;
  background: var(--danger, #ef4444);
  animation: inherit;
  animation-delay: 0s;
  animation-name: core-loader-clones-square-dot;
}
@keyframes core-loader-clones-square {
  0%, 12.49% { background-size: var(--s), 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  12.5%, 24.9% { background-size: var(--s), var(--s), 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  25%, 37.4% { background-size: var(--s), var(--s), var(--s), 0 0, 0 0, 0 0, 0 0, 0 0; }
  37.5%, 49.9% { background-size: var(--s), var(--s), var(--s), 0 0, var(--s), 0 0, 0 0, 0 0; }
  50%, 61.4% { background-size: var(--s), var(--s), var(--s), 0 0, var(--s), 0 0, 0 0, var(--s); }
  62.5%, 74.9% { background-size: var(--s), var(--s), var(--s), 0 0, var(--s), 0 0, var(--s), var(--s); }
  75%, 86.4% { background-size: var(--s), var(--s), var(--s), 0 0, var(--s), var(--s), var(--s), var(--s); }
  87.5%, 100% { background-size: var(--s), var(--s), var(--s), var(--s), var(--s), var(--s), var(--s), var(--s); }
}
@keyframes core-loader-clones-square-dot {
  0%, 5% { transform: translate(0, 0); }
  12.5% { transform: translate(100%, 0); }
  25% { transform: translate(200%, 0); }
  37.5% { transform: translate(200%, 100%); }
  50% { transform: translate(200%, 200%); }
  62.5% { transform: translate(100%, 200%); }
  75% { transform: translate(0, 200%); }
  87.5% { transform: translate(0, 100%); }
  95%, 100% { transform: translate(100%, 100%); }
}
html.dark #load_screen { background: var(--panel-strong, #101826); }
html.dark .loader-clones-square {
  --c1: linear-gradient(#f59e0b 0 0);
  --c2: linear-gradient(#fbbf24 0 0);
}

/* Core DropDown: shared action popup for list buttons / "..." menus. */
.core-dropdown-popup,
.more-popup {
  display:none;
  position:fixed;
  z-index:1055;
  min-width:148px;
  padding:6px 0;
  background:#fff;
  border:1px solid #e8edf7;
  border-radius:14px;
  box-shadow:0 16px 40px rgba(15,23,42,.14);
  overscroll-behavior:contain;
}
.core-dropdown-popup.show,
.more-popup.show { display:block; }
.core-dropdown-item,
.more-popup .popup-item {
  display:block;
  width:100%;
  padding:8px 16px;
  border:0;
  background:transparent;
  color:#344054;
  font-size:13px;
  font-weight:600;
  line-height:1.35;
  text-align:center;
  text-decoration:none;
  cursor:pointer;
  white-space:nowrap;
}
.core-dropdown-item:hover,
.core-dropdown-item:focus,
.more-popup .popup-item:hover,
.more-popup .popup-item:focus {
  color:var(--cork-primary);
  background:var(--cork-primary-soft);
  outline:0;
}
.core-dropdown-item.is-danger,
.more-popup .popup-item.text-danger { color:#dc3545 !important; }
.core-dropdown-item.is-danger:hover,
.core-dropdown-item.is-danger:focus,
.more-popup .popup-item.text-danger:hover,
.more-popup .popup-item.text-danger:focus {
  color:#b42318 !important;
  background:#fff1f3;
}
.core-dropdown-item.is-muted,
.core-dropdown-item:disabled,
.more-popup .popup-item.text-muted {
  color:#98a2b3 !important;
  cursor:default;
}
.core-dropdown-divider,
.more-popup .popup-divider {
  height:1px;
  margin:5px 10px;
  background:#edf1f7;
}
.core-dropdown-popup[data-placement="top"] { transform-origin:bottom right; }
.core-dropdown-popup[data-placement="bottom"] { transform-origin:top right; }
body.dark .core-dropdown-popup,
body.dark .more-popup {
  background:#162238 !important;
  border-color:#2b3c5d !important;
  box-shadow:0 18px 42px rgba(0,0,0,.32) !important;
}
body.dark .core-dropdown-item,
body.dark .more-popup .popup-item { color:#d7e3f5 !important; }
body.dark .core-dropdown-item:hover,
body.dark .core-dropdown-item:focus,
body.dark .more-popup .popup-item:hover,
body.dark .more-popup .popup-item:focus {
  color:#fff !important;
  background:rgba(61,93,243,.18) !important;
}
body.dark .core-dropdown-item.is-muted,
body.dark .core-dropdown-item:disabled,
body.dark .more-popup .popup-item.text-muted { color:#7f91ad !important; }
body.dark .core-dropdown-item.is-danger,
body.dark .more-popup .popup-item.text-danger { color:#fca5a5 !important; }
body.dark .core-dropdown-item.is-danger:hover,
body.dark .core-dropdown-item.is-danger:focus,
body.dark .more-popup .popup-item.text-danger:hover,
body.dark .more-popup .popup-item.text-danger:focus { background:rgba(127,29,29,.26) !important; }
body.dark .core-dropdown-divider,
body.dark .more-popup .popup-divider { background:#2b3c5d !important; }

/* SearchableSelect: 带搜索框的下拉（searchable-select.js） */
.searchable-select { display:inline-block; position:relative; }
.searchable-select-native { display:none !important; }
.searchable-select-trigger { cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.searchable-select-popup {
  /* 高于自定义高层 overlay（如批量复制并分配 modal z-index:99999），否则下拉弹层被盖住。
     仅在 .show 时可见，抬高对其它场景无副作用。 */
  display:none; position:fixed; z-index:100000; max-height:320px;
  background:#fff; border:1px solid #e8edf7; border-radius:14px;
  box-shadow:0 16px 40px rgba(15,23,42,.14);
  overscroll-behavior:contain; overflow:hidden;
  flex-direction:column;
}
.searchable-select-popup.show { display:flex; }
.searchable-select-search { padding:10px 10px 8px; border-bottom:1px solid #edf1f7; }
.searchable-select-list { overflow-y:auto; padding:6px 0; }
.searchable-select-item {
  display:block; width:100%; padding:8px 16px; border:0; background:transparent;
  color:#344054; font-size:13px; font-weight:600; line-height:1.35;
  text-align:left; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.searchable-select-item:hover,
.searchable-select-item:focus,
.searchable-select-item.is-active { color:var(--cork-primary); background:var(--cork-primary-soft); outline:0; }
.searchable-select-item.is-selected { color:var(--cork-primary); font-weight:700; }
.searchable-select-empty { padding:12px 16px; color:#98a2b3; font-size:13px; }
body.dark .searchable-select-popup { background:#162238; border-color:#2b3c5d; box-shadow:0 18px 42px rgba(0,0,0,.32); }
body.dark .searchable-select-search { border-bottom-color:#25344f; }
body.dark .searchable-select-item { color:#aebdd2; }
body.dark .searchable-select-item:hover,
body.dark .searchable-select-item:focus,
body.dark .searchable-select-item.is-active { color:#dbe6f5; background:#1d2a43; }
body.dark .searchable-select-empty { color:#5d6c85; }
.core-field .searchable-select { display:block; width:100%; }
.core-field .searchable-select-trigger { width:100%; }
/* SearchableSelect 树形（两层直播分组，data-tree）：父组可展开/折叠子组 */
/* 顶层项（含没有子组的、以及占位项）统一预留左侧箭头列，与有子组的项文字对齐（2026-09-16 W） */
.searchable-select-popup.ss-tree .searchable-select-item { position:relative; padding-left:36px; }
/* 子分组（二级）文本比父级小 1 号且更淡（2026-09-16 W）；颜色只淡「静止态」，
   悬停/选中/键盘高亮仍走主色，避免高特异性把状态色盖掉。所有分组下拉共用同一套。 */
.searchable-select-popup.ss-tree .searchable-select-item.ss-child { padding-left:44px; font-size:12px; }
.searchable-select-popup.ss-tree .searchable-select-item.ss-child:not(.is-selected):not(:hover):not(:focus):not(.is-active) { color:#8a93a1; }
body.dark .searchable-select-popup.ss-tree .searchable-select-item.ss-child:not(.is-selected):not(:hover):not(:focus):not(.is-active) { color:#7e8ca3; }
.ss-toggle {
  position:absolute; left:8px; top:50%; transform:translateY(-50%);
  width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:6px; color:#98a2b3; font-size:12px; line-height:1;
}
.ss-toggle:hover { background:rgba(15,23,42,.06); color:var(--cork-primary); }
.ss-parent-hint { color:#98a2b3; font-weight:600; }
body.dark .ss-toggle { color:#5d6c85; }
body.dark .ss-toggle:hover { background:rgba(255,255,255,.08); color:#dbe6f5; }
body.dark .ss-parent-hint { color:#5d6c85; }
/* 增强后的分组下拉在「半宽行」(d-flex gap-2 half-width-input：分组框 + 新建分组按钮) 里
   要接替原生 <select flex:1> 撑满剩余宽度，否则 wrapper 是 inline-block 会缩成内容宽（2026-09-16 W 反馈变窄）。
   效果：分组框 + 新建分组 = 上方直播标题 input 宽度。 */
.half-width-input > .searchable-select { flex:1 1 auto; min-width:0; display:block; }
