*{box-sizing:border-box}

body{font-family:'Inter','Segoe UI',system-ui,sans-serif;margin:0}

/* Tailwind 资源异常时也绝不能让登录页、后台主体和模态框同时裸露。 */
.hidden{display:none!important}

.spinner{animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}

.fade-in{animation:fadeIn .25s ease}@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.toast{animation:slideIn .3s ease}@keyframes slideIn{from{transform:translateX(100%);opacity:0}to{transform:none;opacity:1}}

.sidebar-item{transition:all .15s}

.sidebar-item:hover,.sidebar-item.active{background:var(--admin-primary-soft);color:var(--admin-primary)}

.img-grid img{transition:transform .15s}.img-grid img:hover{transform:scale(1.03)}

.tab-active{border-color:var(--admin-primary)!important;color:var(--admin-primary)!important}

textarea{resize:vertical}

.modal-bg{background:rgba(0,0,0,.8)}

::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:#111}::-webkit-scrollbar-thumb{background:#333;border-radius:3px}

.user-table{min-width:1160px}
.user-table th,.user-table td{white-space:nowrap;vertical-align:middle}
.user-table .user-register-method{min-width:104px}
.user-table .user-contact{min-width:190px}
.user-table .user-contact>strong{display:block;color:var(--admin-text);font-size:12px;font-weight:650}
.user-table .user-contact>code{display:block;margin-top:3px;color:var(--admin-muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px}
.user-table .user-time{min-width:128px}
.user-registration-badge{border:1px solid transparent}
.user-registration-badge--guest{border-color:#c4b5fd;background:#f5f3ff;color:#6d28d9;box-shadow:0 0 0 2px rgba(124,58,237,.06)}
.user-table .user-contact>.user-contact-label--guest{color:#6d28d9;font-weight:750}

@media (max-width:1199px){
  .admin-sidebar{width:4.5rem}
  .admin-sidebar .sidebar-title,.admin-sidebar .sidebar-divider{display:none}
  .admin-sidebar .sidebar-item{font-size:0;justify-content:center;padding-left:.75rem;padding-right:.75rem}
  .admin-sidebar .sidebar-item>span{font-size:1rem}
  .admin-content{padding:1rem}
}

/* ===== 2026 管理后台视觉系统 ===== */
:root{
  color-scheme:light;
  --admin-canvas:#f5f7fb;
  --admin-surface:#ffffff;
  --admin-surface-soft:#f8fafc;
  --admin-sidebar:#ffffff;
  --admin-border:#e4e9f1;
  --admin-border-strong:#d4dbe7;
  --admin-text:#172033;
  --admin-text-soft:#475569;
  --admin-muted:#7c899d;
  --admin-primary:#2563eb;
  --admin-primary-fill:#2563eb;
  --admin-primary-soft:#eff6ff;
  --admin-primary-hover:#1d4ed8;
  --admin-primary-active:#1e40af;
  --admin-primary-focus:rgba(37,99,235,.22);
  --admin-success:#15803d;
  --admin-success-soft:#f0fdf4;
  --admin-warning:#b45309;
  --admin-danger:#dc2626;
  --admin-danger-hover:#b91c1c;
  --admin-danger-active:#991b1b;
  --admin-danger-soft:#fef2f2;
  --admin-disabled-bg:#f2f4f7;
  --admin-disabled-border:#e4e7ec;
  --admin-disabled-text:#98a2b3;
  --admin-field-bg:#ffffff;
  --admin-field-border:#d5dae2;
  --admin-shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px rgba(15,23,42,.045);
  --admin-shadow-lg:0 22px 60px rgba(15,23,42,.18);
  --admin-radius:14px;
}

.admin-text-danger{color:var(--admin-danger)!important}
html[data-theme="dark"]{
  color-scheme:dark;
  --admin-canvas:#0d111b;
  --admin-surface:#151b27;
  --admin-surface-soft:#1b2331;
  --admin-sidebar:#111722;
  --admin-border:#273143;
  --admin-border-strong:#364258;
  --admin-text:#eef2f8;
  --admin-text-soft:#c1cada;
  --admin-muted:#8996aa;
  --admin-primary:#60a5fa;
  --admin-primary-fill:#2563eb;
  --admin-primary-soft:rgba(37,99,235,.18);
  --admin-primary-hover:#1d4ed8;
  --admin-primary-active:#1e40af;
  --admin-primary-focus:rgba(96,165,250,.28);
  --admin-success:#4ade80;
  --admin-success-soft:rgba(34,197,94,.12);
  --admin-warning:#f59e0b;
  --admin-danger:#fb7185;
  --admin-danger-hover:#f43f5e;
  --admin-danger-active:#e11d48;
  --admin-danger-soft:rgba(244,63,94,.12);
  --admin-disabled-bg:#202938;
  --admin-disabled-border:#344054;
  --admin-disabled-text:#667085;
  --admin-field-bg:#111827;
  --admin-field-border:#344054;
  --admin-shadow:0 1px 2px rgba(0,0,0,.2),0 14px 30px rgba(0,0,0,.16);
  --admin-shadow-lg:0 24px 70px rgba(0,0,0,.5);
}
html,body{background:var(--admin-canvas)!important;color:var(--admin-text)!important}
.admin-canvas{background:var(--admin-canvas)!important;color:var(--admin-text)!important}
.admin-surface{background:var(--admin-surface)!important;color:var(--admin-text)!important}
.admin-inner-section{background:transparent!important;color:var(--admin-text)!important}
.admin-border{border-color:var(--admin-border)!important}
.admin-border-primary{border-color:var(--admin-primary)!important}
.admin-text{color:var(--admin-text)!important}
.admin-text-soft{color:var(--admin-text-soft)!important}
.admin-text-warning{color:var(--admin-warning)!important}
.admin-muted{color:var(--admin-muted)!important}
.feedback-card-meta{flex-wrap:wrap}.feedback-reporter-identity{display:inline-flex;align-items:baseline;gap:8px;min-width:0}.feedback-reporter-identity code{color:var(--admin-muted);font-size:9px;overflow-wrap:anywhere}.feedback-reporter-name{padding:0;border:0;background:transparent;color:var(--admin-text);font:inherit;font-size:12px;font-weight:700;cursor:pointer;text-align:left}.feedback-reporter-name:hover{text-decoration:underline}.feedback-reporter-name:focus-visible,.feedback-reporter-avatar:focus-visible{outline:2px solid var(--admin-primary);outline-offset:2px}.feedback-reporter-name:disabled,.feedback-reporter-avatar:disabled{cursor:default;opacity:.65}.feedback-reporter-avatar{position:relative;display:flex;width:36px;height:36px;align-items:center;justify-content:center;flex:0 0 36px;overflow:hidden;border:1px solid var(--admin-border);border-radius:50%;background:var(--admin-surface-soft);color:var(--admin-text);font-size:12px;font-weight:800;cursor:pointer}.feedback-reporter-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.feedback-reporter-avatar span{align-items:center;justify-content:center;width:100%;height:100%}.feedback-reporter-avatar span:not([hidden]){display:flex}
.feedback-user-note{margin-top:5px}.feedback-user-note>span,.content-report-snapshot-heading{display:block;margin-bottom:3px;color:var(--admin-muted);font-size:10px;font-weight:750}.feedback-user-note>p{margin:0}
.content-report-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.content-report-context{margin-top:14px;padding:14px;border:1px solid var(--admin-border);border-radius:10px;background:var(--admin-surface-soft)}
.content-report-context-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--admin-border)}
.content-report-context-heading strong,.content-report-context-heading small{display:block}.content-report-context-heading small{margin-top:3px;color:var(--admin-muted);font-size:10px;overflow-wrap:anywhere}.content-report-context-heading>span{color:var(--admin-warning);font-size:10px;font-weight:700}
.content-report-context-stream{display:flex;flex-direction:column;gap:9px;max-height:520px;overflow:auto;padding:2px}
.content-report-context-message{width:min(82%,680px)}.content-report-context-message.is-user{align-self:flex-end}.content-report-context-message.is-ai{align-self:flex-start}
.content-report-context-meta{display:flex;align-items:center;gap:7px;margin:0 3px 4px;color:var(--admin-muted);font-size:9px}.content-report-context-message.is-user .content-report-context-meta{justify-content:flex-end}.content-report-context-meta>span{padding:1px 6px;border-radius:999px;background:color-mix(in srgb,var(--admin-warning) 14%,transparent);color:var(--admin-warning);font-weight:750}.content-report-context-meta time{margin-left:auto}.content-report-context-message.is-user .content-report-context-meta time{margin-left:0}
.content-report-context-bubble{padding:9px 12px;border:1px solid var(--admin-border);border-radius:5px 12px 12px;background:var(--admin-surface);color:var(--admin-text);overflow-wrap:anywhere}.content-report-context-message.is-user .content-report-context-bubble{border-radius:12px 5px 12px 12px;background:var(--admin-primary-fill);color:#fff}.content-report-context-bubble p{margin:0;white-space:pre-wrap}.content-report-context-bubble a{display:inline-block;margin-top:7px;margin-right:10px}
.content-report-context-message.is-target{padding:8px;border:1px solid color-mix(in srgb,var(--admin-warning) 62%,var(--admin-border));border-radius:12px;background:color-mix(in srgb,var(--admin-warning) 9%,transparent);box-shadow:0 0 0 2px color-mix(in srgb,var(--admin-warning) 12%,transparent)}
@media(max-width:640px){.feedback-card-layout{flex-direction:column}.feedback-card-main{width:100%}.feedback-card-actions{width:100%;flex-direction:row!important;flex-wrap:wrap}.content-report-heading,.content-report-context-heading{align-items:flex-start;flex-direction:column}.content-report-context-message{width:100%}}
.admin-modal-backdrop{
  background:rgba(8,13,23,.72)!important;
  color:#fff!important;
  backdrop-filter:blur(4px);
}
.admin-content .admin-surface:is(.rounded-xl,.rounded-2xl){
  border-radius:var(--admin-radius)!important;
  box-shadow:var(--admin-shadow);
}
.admin-kpi-card{
  border:1px solid var(--admin-border);
  background:var(--admin-surface);
  box-shadow:var(--admin-shadow);
}
.admin-progress-track{
  overflow:hidden;
  border-radius:99px;
  background:var(--admin-surface-soft)!important;
}
.admin-progress-fill{
  border-radius:inherit;
  background:var(--admin-primary-fill)!important;
  transition:width .2s ease;
}
.admin-checkbox{accent-color:var(--admin-primary-fill)}
.admin-image-overlay{
  background:linear-gradient(to top,rgba(8,13,23,.92),rgba(8,13,23,.48),transparent)!important;
  color:#fff!important;
}
.image-card-selected{
  border-color:var(--admin-primary)!important;
  box-shadow:0 0 0 2px var(--admin-primary-focus)!important;
}
body{
  font-family:Inter,"SF Pro Text","PingFang SC","Microsoft YaHei","Segoe UI",system-ui,sans-serif;
  font-size:14px;
  line-height:1.55;
  letter-spacing:.005em;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea{font:inherit}
button,a,[onclick]{-webkit-tap-highlight-color:transparent}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid var(--admin-primary-focus)!important;
  outline-offset:2px;
}

.admin-topbar{
  height:64px!important;
  padding:0 24px!important;
  background:color-mix(in srgb,var(--admin-surface) 94%,transparent)!important;
  border-color:var(--admin-border)!important;
  box-shadow:0 1px 0 rgba(15,23,42,.02);
  backdrop-filter:blur(14px);
  position:sticky;
  top:0;
}
.admin-brand{font-size:16px!important;letter-spacing:-.015em}
.admin-brand{flex:0 0 auto;white-space:nowrap}
.admin-brand-mark{
  width:34px!important;height:34px!important;
  border-radius:11px!important;
  background:linear-gradient(145deg,#3b82f6,#2563eb)!important;
  color:#fff!important;
  box-shadow:0 6px 16px rgba(37,99,235,.22);
}
.admin-account{
  background:var(--admin-surface-soft)!important;
  border:1px solid var(--admin-border);
  color:var(--admin-text-soft)!important;
  padding:5px 10px!important;
}
.admin-version{
  background:transparent!important;
  border-color:var(--admin-border)!important;
  color:var(--admin-primary)!important;
}
.admin-topbar-actions{flex:0 0 auto}
.admin-readonly-badge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  height:30px;
  padding:0 10px;
  border:1px solid rgba(245,158,11,.28);
  border-radius:99px;
  background:rgba(245,158,11,.09);
  color:var(--admin-text-soft);
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}
.admin-readonly-badge>span{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#f59e0b;
  box-shadow:0 0 0 3px rgba(245,158,11,.12);
}
.admin-tabs{
  display:flex;
  align-items:center;
  align-self:stretch;
  flex:1 1 auto;
  min-width:80px;
  gap:6px;
  margin:0 18px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
.admin-tabs::-webkit-scrollbar{display:none}
.admin-workspace-tab{
  position:relative;
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  height:100%;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--admin-muted);
  transition:background .15s,color .15s;
}
.admin-workspace-tab:hover{background:var(--admin-surface-soft);color:var(--admin-text-soft)}
.admin-workspace-tab.active{
  background:transparent;
  color:var(--admin-primary);
  box-shadow:none;
}
.admin-workspace-tab.active::after{
  content:"";
  position:absolute;
  right:8px;
  bottom:0;
  left:8px;
  height:2px;
  border-radius:2px 2px 0 0;
  background:var(--admin-primary);
}
.admin-workspace-tab-label{
  height:100%;
  min-width:0;
  padding:0 12px;
  border:0;
  background:transparent;
  color:inherit;
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
  cursor:pointer;
}
.admin-workspace-tab-close{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  margin-right:4px;
  padding:0;
  border:0;
  border-radius:7px;
  background:transparent;
  color:var(--admin-muted);
  font-size:16px;
  line-height:1;
  cursor:pointer;
}
.admin-workspace-tab-close:hover{background:rgba(148,163,184,.16);color:var(--admin-text)}

.admin-sidebar{
  width:232px!important;
  padding:18px 12px!important;
  background:var(--admin-sidebar)!important;
  border-color:var(--admin-border)!important;
}
.sidebar-title,.sidebar-section-label{
  color:var(--admin-muted)!important;
  font-size:11px!important;
  font-weight:700;
  letter-spacing:.09em!important;
  padding:0 12px!important;
  margin:4px 0 8px!important;
}
.sidebar-section-label{margin-top:12px!important}
.sidebar-divider{border-color:var(--admin-border)!important;margin:12px 8px!important}
.sidebar-item{
  min-height:42px;
  margin:2px 0;
  padding:9px 12px!important;
  gap:11px!important;
  border:1px solid transparent;
  border-radius:10px;
  color:var(--admin-text-soft)!important;
  font-weight:550;
  line-height:1.2;
}
.sidebar-item>span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  min-width:24px;
  font-size:15px;
  filter:saturate(.7);
}
.sidebar-item:hover{
  background:var(--admin-surface-soft)!important;
  border-color:var(--admin-border)!important;
  color:var(--admin-text)!important;
}
.sidebar-item.active{
  background:var(--admin-surface-soft)!important;
  border-color:var(--admin-border)!important;
  color:var(--admin-text)!important;
  box-shadow:none;
  font-weight:700;
}
.sidebar-item.active>span{
  color:inherit;
  filter:none;
}

.admin-content{
  padding:30px 32px 48px!important;
  background:var(--admin-canvas)!important;
  scroll-behavior:smooth;
}
.admin-content>.fade-in,
.admin-content>.admin-tab-panel>.fade-in{width:100%;max-width:1560px;margin:0 auto}
.admin-tab-panel{width:100%;min-height:100%}
.admin-tab-panel[hidden]{display:none!important}
.admin-content h2{
  color:var(--admin-text)!important;
  font-size:24px!important;
  font-weight:720!important;
  line-height:1.25;
  letter-spacing:-.025em;
}
.admin-content h3{color:var(--admin-text)!important;letter-spacing:-.01em}
.admin-content p{line-height:1.65}
.admin-content input:not([type="checkbox"]):not([type="radio"]),
.admin-content select,
.admin-content textarea,
.modal-bg input:not([type="checkbox"]):not([type="radio"]),
.modal-bg select,
.modal-bg textarea{
  min-height:40px;
  background:var(--admin-field-bg)!important;
  border:1px solid var(--admin-field-border)!important;
  border-radius:10px!important;
  color:var(--admin-text)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.025);
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.admin-content textarea,.modal-bg textarea{min-height:92px}
.admin-content input:hover,.admin-content select:hover,.admin-content textarea:hover,
.modal-bg input:hover,.modal-bg select:hover,.modal-bg textarea:hover{border-color:#b8c2d2!important}
.admin-content input:focus,.admin-content select:focus,.admin-content textarea:focus,
.modal-bg input:focus,.modal-bg select:focus,.modal-bg textarea:focus{
  border-color:var(--admin-primary)!important;
  box-shadow:0 0 0 3px var(--admin-primary-focus)!important;
  outline:none!important;
}
.admin-content input::placeholder,.admin-content textarea::placeholder{color:#9aa6b8!important}
.admin-content label,.modal-bg label{color:var(--admin-text-soft)!important;font-weight:600}

.admin-content button:not(.admin-button),
.modal-bg button:not(.admin-button){
  min-height:36px;
  border-radius:9px!important;
  font-weight:600;
  transition:transform .12s,box-shadow .12s,background .12s,color .12s,border-color .12s!important;
}
.admin-content button:not(.admin-button):hover:not(:disabled),
.modal-bg button:not(.admin-button):hover:not(:disabled){transform:translateY(-1px)}
.admin-content button:not(.admin-button):active:not(:disabled),
.modal-bg button:not(.admin-button):active:not(:disabled){transform:translateY(0)}

.admin-content table{
  border-collapse:separate;
  border-spacing:0;
  width:100%;
  color:var(--admin-text-soft);
}
.admin-content table thead{position:sticky;top:0;z-index:2}
.admin-content table th{
  height:42px;
  padding:10px 14px!important;
  background:var(--admin-surface-soft);
  border-bottom:1px solid var(--admin-border)!important;
  color:var(--admin-muted)!important;
  font-size:11px!important;
  font-weight:700!important;
  letter-spacing:.045em;
  text-transform:none;
}
.admin-content table td{
  padding:12px 14px!important;
  border-bottom:1px solid var(--admin-border)!important;
  color:var(--admin-text-soft);
}
.admin-content table tbody tr:nth-child(even){background:color-mix(in srgb,var(--admin-surface-soft) 52%,transparent)}
.admin-content table tbody tr:hover{background:var(--admin-primary-soft)!important}
.admin-content table tbody tr:last-child td{border-bottom:0!important}

/* Data lists grow with their content; the workspace owns vertical scrolling. */
.users-page{
  display:flex;
  width:100%;
  height:auto;
  min-height:0;
  flex-direction:column;
  overflow:visible;
}
.admin-list-page{
  display:flex;
  width:100%;
  height:auto;
  min-height:0;
  flex-direction:column;
  overflow:visible;
}
.admin-list-page-header{
  display:flex;
  flex:0 0 auto;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:16px;
}
.admin-list-toolbar{display:flex;flex:0 0 auto;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:12px}
.admin-list-region{
  position:relative;
  display:flex;
  min-height:0;
  flex:1 1 auto;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:var(--admin-surface);
}
.admin-list-loading-overlay{
  position:absolute;
  z-index:8;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:color-mix(in srgb,var(--admin-surface) 86%,transparent);
  color:var(--admin-muted);
  font-size:12px;
  backdrop-filter:blur(1px);
}
.admin-list-scroll{min-height:0;flex:0 0 auto;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;overscroll-behavior-y:auto}
.admin-list-scroll>table{min-width:100%}
.admin-list-scroll>table thead{top:0!important;z-index:3!important}
.admin-list-region>.admin-pagination{margin:0;border-width:1px 0 0;border-radius:0}
.admin-resizable-page.users-page,
.admin-resizable-page.admin-list-page{height:auto;min-height:calc(100vh - 138px);overflow:visible}
.admin-resizable-region{
  height:auto;
  min-height:0!important;
  max-height:none;
  flex:0 0 auto!important;
  resize:none;
  overflow:hidden!important;
}
.proactive-main-panel.admin-list-region{padding:0}
.proactive-main-panel .proactive-tabs,.proactive-main-panel #proactiveToolbar{flex:0 0 auto}
.proactive-main-panel .proactive-body{display:flex;min-height:0;flex:1 1 auto;flex-direction:column}
.proactive-main-panel .proactive-body>.admin-list-scroll{flex:1 1 auto}
.proactive-main-panel .proactive-body>.admin-pagination{margin:0;border-width:1px 0 0;border-radius:0}
.users-page-header{
  display:flex;
  flex:0 0 auto;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:16px;
}
.users-summary{display:flex;align-items:center;gap:18px;padding-top:6px;color:var(--admin-muted);font-size:12px;white-space:nowrap}
.users-summary strong{margin-left:4px;color:var(--admin-text);font-size:13px}
.users-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px}
.users-metric-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  flex:0 0 auto;
  gap:10px;
  margin-bottom:12px;
}
html[data-theme="dark"] .user-registration-badge--guest{border-color:#6d28d9;background:rgba(109,40,217,.22);color:#ddd6fe;box-shadow:none}
html[data-theme="dark"] .user-table .user-contact>.user-contact-label--guest{color:#c4b5fd}
.users-metric-card{
  display:block!important;
  min-width:0;
  min-height:0!important;
  padding:12px 14px;
  text-align:center;
  color:var(--admin-text);
  background:color-mix(in srgb,var(--admin-surface) 92%,var(--admin-surface-soft));
  border:0!important;
  border-radius:12px!important;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 5px 14px rgba(15,23,42,.035);
  white-space:normal!important;
  transition:background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.users-metric-card:hover{
  background:color-mix(in srgb,var(--admin-primary-soft) 38%,var(--admin-surface));
  box-shadow:0 2px 4px rgba(15,23,42,.055),0 8px 18px rgba(15,23,42,.05);
  transform:translateY(-1px);
}
.users-device-metric{cursor:default;align-content:center}
.users-device-metric:hover{transform:none;background:var(--admin-surface);box-shadow:none}
.users-device-metric p{margin:4px 0 0;color:var(--admin-muted);font-size:10px;line-height:1.4}
.users-metric-card.users-device-metric>span{white-space:normal}
@media(min-width:901px) and (max-width:1280px){
  .users-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.users-metric-card:focus-visible{
  outline:2px solid color-mix(in srgb,var(--admin-primary) 58%,transparent);
  outline-offset:2px;
}
.users-metric-card.is-active{
  background:color-mix(in srgb,var(--admin-primary-soft) 76%,var(--admin-surface))!important;
  border:0!important;
  box-shadow:0 3px 10px color-mix(in srgb,var(--admin-primary) 11%,transparent)!important;
}
.users-metric-card>span{display:block;color:var(--admin-muted);font-size:11px;white-space:nowrap}
.users-metric-card small{margin-left:3px;color:var(--admin-muted);font-size:10px;font-weight:500}
.users-metric-card strong{display:block;margin-top:3px;color:var(--admin-text);font-size:22px;line-height:1.15;font-weight:700}
.users-daily-toolbar{
  display:flex;
  flex:0 0 auto;
  align-items:flex-end;
  gap:10px;
  margin-bottom:10px;
  padding:10px 12px;
  background:var(--admin-surface);
  border:1px solid var(--admin-border);
  border-radius:10px;
}
.users-daily-toolbar>label,.users-version-filter>label{
  display:flex;
  flex-direction:column;
  gap:5px;
  color:var(--admin-muted)!important;
  font-size:11px;
  font-weight:650!important;
}
.users-daily-toolbar input,.users-daily-toolbar select{height:36px;min-height:36px!important;font-size:12px}
.users-daily-toolbar input{min-width:150px;padding:0 10px}
.users-daily-toolbar select{min-width:142px;padding:0 32px 0 11px}
.users-daily-toolbar>span{align-self:center;color:var(--admin-muted);font-size:11px}
.admin-refresh-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.admin-refresh-icon{display:inline-block;font-size:17px;line-height:1;transform-origin:center}
.admin-refresh-button.is-refreshing .admin-refresh-icon{animation:admin-refresh-spin .7s linear infinite}
@keyframes admin-refresh-spin{to{transform:rotate(360deg)}}
.billing-header-actions{display:flex;max-width:min(100%,1040px);align-items:flex-start;justify-content:flex-end;gap:10px}
.billing-tabs{flex-wrap:wrap;justify-content:flex-end}
.users-toolbar{
  display:flex;
  flex:0 0 auto;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:10px;
  margin-bottom:12px;
}
.users-toolbar>label{display:flex;flex-direction:column;gap:5px;color:var(--admin-muted)!important;font-size:11px;font-weight:650!important}
.users-toolbar select{min-width:142px;height:38px;min-height:38px!important;padding:0 32px 0 11px;font-size:12px}
.users-version-filter{display:flex;align-items:flex-end;gap:6px}
.users-version-filter select{min-width:142px}
.users-version-manage-button{height:38px;min-height:38px!important;padding-inline:10px!important;white-space:nowrap}
.users-search{position:relative;min-width:300px}
.users-search>span{position:absolute;left:12px;bottom:10px;z-index:1;color:var(--admin-muted);font-size:13px}
.users-search>input{width:100%;height:38px;min-height:38px!important;padding:0 12px 0 34px!important;font-size:12px}
.users-quota-launch{display:flex;flex-direction:column;gap:5px;color:var(--admin-muted);font-size:11px;font-weight:650}
.users-quota-launch-button{height:38px;min-height:38px!important;white-space:nowrap}
.users-quota-launch-button>span{font-size:10px;opacity:.8}
.user-version-dialog{
  display:flex;
  width:min(780px,100%);
  max-height:min(780px,92vh);
  flex-direction:column;
  overflow:hidden;
  border-radius:16px;
  box-shadow:0 24px 80px rgba(0,0,0,.36);
}
.user-version-dialog-header,.user-version-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px}
.user-version-dialog-header{border-bottom:1px solid var(--admin-border)}
.user-version-dialog-header h3{margin:0;color:var(--admin-text);font-size:18px;font-weight:700}
.user-version-dialog-header p{margin:4px 0 0;color:var(--admin-muted);font-size:11px}
.user-version-dialog-body{min-height:0;padding:16px 20px;overflow:auto}
.user-version-search{display:flex;flex-direction:column;gap:5px;color:var(--admin-muted);font-size:11px;font-weight:650}
.user-version-search input{height:38px;min-height:38px!important;padding:0 11px;font-size:12px}
.user-version-platforms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.user-version-platform-section{min-width:0;border:1px solid var(--admin-border);border-radius:12px;overflow:hidden}
.user-version-platform-section>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;background:var(--admin-surface-soft)}
.user-version-platform-section h4{margin:0;color:var(--admin-text);font-size:13px;font-weight:700}
.user-version-platform-section header span{display:block;margin-top:2px;color:var(--admin-muted);font-size:10px}
.user-version-platform-section header>div:last-child{display:flex;gap:3px}
.user-version-option-list{max-height:360px;overflow:auto}
.user-version-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px 12px;border-bottom:1px solid var(--admin-border);cursor:pointer}
.user-version-option:last-child{border-bottom:0}
.user-version-option:hover{background:var(--admin-surface-soft)}
.user-version-option input{width:15px;height:15px;margin:0}
.user-version-option span{overflow:hidden;color:var(--admin-text-soft);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.user-version-option small{color:var(--admin-muted);font-size:10px}
.user-version-option:has(input:not(:checked)) small{color:var(--admin-danger)}
.user-version-empty{padding:24px 12px;text-align:center;color:var(--admin-muted);font-size:11px}
.user-version-dialog-footer{border-top:1px solid var(--admin-border)}
.user-version-dialog-footer>span{color:var(--admin-muted);font-size:10px}
.user-version-dialog-footer>div{display:flex;gap:8px}
.quota-lookup-dialog{
  width:min(820px,100%);
  max-height:min(880px,92vh);
  overflow:hidden auto;
  border-radius:18px;
  box-shadow:var(--admin-shadow-lg);
}
.quota-lookup-header{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  overflow:hidden;
  padding:22px 24px 20px;
  border-bottom:1px solid var(--admin-border);
  background:linear-gradient(135deg,var(--admin-primary-soft),transparent 66%);
}
.quota-lookup-header::after{
  content:"";
  position:absolute;
  top:-44px;
  right:76px;
  width:128px;
  height:128px;
  border:1px solid var(--admin-border-strong);
  border-radius:50%;
  opacity:.42;
  pointer-events:none;
}
.quota-lookup-header>div{position:relative;z-index:1}
.quota-lookup-kicker{display:block;margin-bottom:4px;color:var(--admin-primary);font-size:10px;font-weight:800;letter-spacing:.18em}
.quota-lookup-header h3{margin:0;color:var(--admin-text);font-size:21px;font-weight:750;letter-spacing:-.025em}
.quota-lookup-header p{margin:4px 0 0;color:var(--admin-muted);font-size:12px}
.quota-lookup-body{padding:20px 24px 24px}
.quota-lookup-search-row>label{display:block;margin-bottom:7px;color:var(--admin-text-soft);font-size:11px;font-weight:700}
.quota-lookup-search-row>div{display:flex;gap:9px}
.quota-lookup-search-row input{min-width:0;flex:1 1 auto;height:40px;padding:0 12px;font-size:13px}
.quota-lookup-search-row button{flex:0 0 auto}
.quota-lookup-content{min-height:220px;margin-top:18px}
.quota-lookup-empty,.quota-lookup-loading,.quota-lookup-error{
  display:flex;
  min-height:220px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:7px;
  border:1px dashed var(--admin-border-strong);
  border-radius:14px;
  background:var(--admin-surface-soft);
  color:var(--admin-muted);
  text-align:center;
}
.quota-lookup-empty strong,.quota-lookup-error strong{color:var(--admin-text-soft);font-size:14px}
.quota-lookup-empty span,.quota-lookup-error span{max-width:460px;padding:0 20px;font-size:12px}
.quota-lookup-error{color:var(--admin-danger)}
.quota-lookup-result{animation:fadeIn .22s ease}
.quota-lookup-identity{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:0 2px}
.quota-lookup-avatar{
  display:grid;
  width:44px;
  height:44px;
  flex:0 0 44px;
  place-items:center;
  border:1px solid var(--admin-border);
  border-radius:14px;
  background:var(--admin-primary-soft);
  color:var(--admin-primary);
  font-size:16px;
  font-weight:800;
}
.quota-lookup-name-line{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.quota-lookup-name-line>strong{color:var(--admin-text);font-size:15px}
.quota-lookup-name-line>span{padding:2px 7px;border:1px solid var(--admin-border);border-radius:99px;color:var(--admin-text-soft);font-size:10px;font-weight:700}
.quota-lookup-identity p{margin:2px 0 0;color:var(--admin-text-soft);font-size:12px}
.quota-lookup-identity code{display:block;margin-top:1px;color:var(--admin-muted);font-family:"SFMono-Regular",Consolas,monospace;font-size:10px}
.quota-metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.quota-metric-card{padding:17px;border:1px solid var(--admin-border);border-radius:14px;background:var(--admin-surface-soft)}
.quota-metric-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--admin-text-soft);font-size:12px;font-weight:750}
.quota-metric-heading small{color:var(--admin-muted);font-size:10px;font-weight:600}
.quota-metric-value{display:flex;align-items:baseline;gap:5px;margin:10px 0 11px;color:var(--admin-text)}
.quota-metric-value strong{font-size:32px;font-weight:780;line-height:1;letter-spacing:-.045em}
.quota-metric-value span{color:var(--admin-muted);font-size:12px}
.quota-metric-value-voice strong{font-size:25px;letter-spacing:-.035em}
.quota-meter{height:6px;overflow:hidden;border-radius:99px;background:var(--admin-border)}
.quota-meter>i{display:block;height:100%;border-radius:inherit;background:var(--admin-primary-fill);transition:width .35s ease}
.quota-metric-breakdown{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin-top:11px;color:var(--admin-muted);font-size:10px}
.quota-metric-breakdown b{color:var(--admin-text-soft);font-size:11px}
.quota-metric-card>p{margin:7px 0 0;color:var(--admin-muted);font-size:10px}
.quota-lookup-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:14px 0 0;border:1px solid var(--admin-border);border-radius:14px}
.quota-lookup-details>div{min-width:0;padding:11px 14px;border-bottom:1px solid var(--admin-border)}
.quota-lookup-details>div:nth-child(odd){border-right:1px solid var(--admin-border)}
.quota-lookup-details>div:nth-last-child(-n+2){border-bottom:0}
.quota-lookup-details dt{color:var(--admin-muted);font-size:10px;font-weight:650}
.quota-lookup-details dd{margin:3px 0 0;overflow:hidden;color:var(--admin-text-soft);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.quota-lookup-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px}
.quota-lookup-actions>span{color:var(--admin-muted);font-size:10px}
.users-table-shell{
  position:relative;
  display:flex;
  min-height:0;
  flex:1 1 auto;
  flex-direction:column;
  overflow:hidden;
  border-radius:12px;
}
.users-data-loading-overlay{
  position:absolute;
  z-index:8;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  background:color-mix(in srgb,var(--admin-surface) 86%,transparent);
  color:var(--admin-muted);
  font-size:12px;
  backdrop-filter:blur(1px);
}
.users-data-error{display:flex;min-height:240px;align-items:center;justify-content:center;color:var(--admin-danger);font-size:13px}
.users-table-scroll{min-height:0;flex:0 0 auto;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;overscroll-behavior-y:auto}
.users-table-scroll table{min-width:1610px}
.users-table-scroll thead{top:0!important;z-index:3!important}
.user-platform{min-width:102px;white-space:nowrap}
.user-platform-badge{
  display:inline-flex;
  min-width:62px;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border:1px solid var(--admin-border-strong);
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
}
.user-platform-badge.is-android{border-color:#bbf7d0;background:#f0fdf4;color:#15803d}
.user-platform-badge.is-ios{border-color:#cbd5e1;background:#f8fafc;color:#334155}
.user-platform-badge.is-web{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.user-app-version{min-width:110px;white-space:nowrap}

.one-step-task-center{display:flex;flex-direction:column;gap:0}
.one-step-task-center-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.admin-button.one-step-task-center-toggle{display:flex;min-height:38px;flex:1;align-items:center;justify-content:flex-start;gap:10px;padding:0!important;text-align:left}
.one-step-task-center-toggle>span:last-child{display:flex;min-width:0;flex-direction:column;gap:2px}
.one-step-task-center-toggle strong{color:var(--admin-text);font-size:14px;font-weight:750}
.one-step-task-center-toggle small{color:var(--admin-muted);font-size:11px;font-weight:500}
.one-step-task-center-arrow{display:grid;width:24px;height:24px;flex:0 0 24px;place-items:center;border:1px solid var(--admin-border);border-radius:7px;color:var(--admin-primary);font-size:20px;line-height:1}
.one-step-task-center-body{margin-top:14px;padding-top:12px;border-top:1px solid var(--admin-border);overscroll-behavior:contain}
.one-step-task-center-tip{margin:0 0 10px;color:var(--admin-muted);font-size:10px}
.one-step-task-bulk-actions{position:sticky;z-index:3;top:0;display:flex;align-items:center;justify-content:flex-end;gap:7px;margin:0 0 12px;padding:8px;border:1px solid var(--admin-border);border-radius:10px;background:color-mix(in srgb,var(--admin-surface) 94%,transparent);backdrop-filter:blur(8px)}
.one-step-task-bulk-actions>span{margin-right:auto;color:var(--admin-text-soft);font-size:11px;font-weight:700}
.one-step-task-list{display:flex;flex-direction:column;gap:16px}
.one-step-task-section{display:flex;flex-direction:column;gap:8px}
.one-step-task-section-title{display:flex;align-items:center;gap:7px;color:var(--admin-text-soft);font-size:11px}
.one-step-task-section-title strong{font-weight:750}.one-step-task-section-title span{color:var(--admin-muted);font-size:10px}
.one-step-task-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(330px,1fr));gap:10px}
.one-step-task-card{min-width:0;overflow:hidden;border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-surface-soft)}
.one-step-task-card.is-error{border-color:color-mix(in srgb,var(--admin-danger) 38%,var(--admin-border))}
.one-step-task-card.is-repair,.one-step-task-card.is-preview{border-color:#fcd34d}
.admin-button.one-step-task-item{
  display:grid;
  width:100%;
  min-width:0;
  min-height:0;
  align-items:stretch;
  justify-content:initial;
  gap:4px;
  padding:13px!important;
  border:0;
  border-radius:0;
  background:transparent;
  color:var(--admin-text-soft);
  font-size:11px;
  line-height:1.4;
  text-align:left;
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.one-step-task-item:hover{background:color-mix(in srgb,var(--admin-primary-soft) 54%,transparent);transform:none}
.one-step-task-item.is-selected{background:var(--admin-primary-soft);box-shadow:inset 3px 0 0 var(--admin-primary)}
.one-step-task-title-row{display:flex;min-width:0;align-items:center;gap:9px}
.one-step-task-title-row strong{overflow:hidden;color:var(--admin-text);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.one-step-task-meta{color:var(--admin-muted);font-family:"SFMono-Regular",Consolas,monospace;font-size:9px}
.one-step-task-metrics{color:var(--admin-text-soft);font-size:11px}
.one-step-task-progress{height:5px;overflow:hidden;border-radius:99px;background:var(--admin-border)}
.one-step-task-progress>i{display:block;height:100%;border-radius:inherit;background:var(--admin-primary-fill)}
.one-step-task-progress-text{color:var(--admin-muted);font-size:10px}
.one-step-task-reason{padding:6px 8px;border-radius:7px;background:#fff7ed;color:#b45309;font-size:10px;white-space:normal}
.one-step-task-item small{overflow:hidden;color:var(--admin-muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.one-step-task-actions{display:flex;min-height:43px;align-items:center;justify-content:space-between;gap:10px;padding:7px 9px 7px 13px;border-top:1px solid var(--admin-border);background:var(--admin-surface)}
.one-step-task-actions>span{color:var(--admin-muted);font-size:9px}.one-step-task-actions>div{display:flex;align-items:center;gap:6px}
.one-step-task-actions .admin-button{min-height:28px;padding:0 9px!important;font-size:10px}
.one-step-task-running-note{color:var(--admin-muted);font-size:9px}
.one-step-task-status{display:inline-flex;width:max-content;align-items:center;gap:6px;color:var(--admin-text-soft);font-size:10px;font-weight:750}
.one-step-task-status i{width:7px;height:7px;border-radius:50%;background:#94a3b8}
.one-step-task-item.is-running .one-step-task-status{color:#2563eb}
.one-step-task-item.is-running .one-step-task-status i{background:#2563eb;animation:one-step-task-pulse 1.3s ease-in-out infinite}
.one-step-task-item.is-complete .one-step-task-status{color:#15803d}
.one-step-task-item.is-complete .one-step-task-status i{background:#22c55e}
.one-step-task-item.is-repair .one-step-task-status,.one-step-task-item.is-preview .one-step-task-status{color:#b45309}
.one-step-task-item.is-repair .one-step-task-status i,.one-step-task-item.is-preview .one-step-task-status i{background:#f59e0b}
.one-step-task-item.is-error .one-step-task-status{color:#b91c1c}
.one-step-task-item.is-error .one-step-task-status i{background:#ef4444}
.one-step-task-empty{grid-column:1/-1;padding:18px;border:1px dashed var(--admin-border);border-radius:10px;color:var(--admin-muted);font-size:11px;text-align:center}
.one-step-task-empty.is-error{color:var(--admin-danger)}
@keyframes one-step-task-pulse{50%{opacity:.35;transform:scale(.72)}}

.one-step-repair-badge{
  padding:4px 9px;
  border:1px solid #f59e0b;
  border-radius:999px;
  background:#fffbeb;
  color:#b45309;
  font-size:10px;
  font-weight:750;
}
.one-step-repair-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 12px;
  padding:9px 11px;
  border:1px solid #fcd34d;
  border-radius:9px;
  background:#fffbeb;
}
.one-step-repair-summary>div{display:flex;min-width:0;flex-direction:column;gap:2px}
.one-step-repair-summary>.admin-button{flex:0 0 auto}
.one-step-repair-summary strong{color:#92400e;font-size:11px}
.one-step-repair-summary span{color:#b45309;font-size:10px}
.one-step-image-repair img,.one-step-image-repair>div{
  border-color:#f59e0b!important;
  box-shadow:0 0 0 2px rgba(245,158,11,.13);
}
.one-step-image-repair-label{
  position:absolute;
  z-index:2;
  right:4px;
  bottom:4px;
  padding:3px 6px;
  border-radius:6px;
  background:rgba(146,64,14,.92);
  color:#fff;
  font-size:9px;
  font-weight:700;
  pointer-events:none;
}
.one-step-retry-visible{opacity:1!important}
.user-locale{min-width:90px;white-space:nowrap}
.user-ip{min-width:132px;white-space:nowrap;font-variant-numeric:tabular-nums}
.user-country{min-width:112px}
.user-country-value{display:inline-flex;align-items:baseline;gap:6px;white-space:nowrap}
.user-country-value strong{color:var(--admin-text-soft);font-size:12px;font-weight:650}
.user-country-value small{color:var(--admin-muted);font-size:10px}
.users-empty{height:180px;text-align:center;color:var(--admin-muted)!important;font-size:13px}
.users-pagination{
  display:flex;
  min-height:54px;
  flex:0 0 auto;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:9px 14px;
  border-top:1px solid var(--admin-border);
  background:var(--admin-surface);
  color:var(--admin-muted);
  font-size:12px;
}
.users-pagination>div{display:flex;align-items:center;gap:7px}
.users-pagination strong{color:var(--admin-text)}

/* User behavior path: a full-page, ordered view reached from the users list. */
.user-behavior-page{display:grid;gap:12px;padding-bottom:24px}
.user-behavior-header{align-items:flex-end;margin-bottom:0}
.user-behavior-header>div:first-child{min-width:0}
.user-behavior-header h2{font-size:22px;line-height:1.2}
.user-behavior-header p{margin-top:5px}
.user-behavior-header p>span{color:var(--admin-text-soft);font-weight:650}
.user-behavior-header code{font-size:11px;color:var(--admin-muted);overflow-wrap:anywhere}
.behavior-back{min-height:30px!important;margin:0 0 8px -10px;padding:0 10px!important}
.behavior-loading,.behavior-page-error,.behavior-unavailable,.behavior-empty{
  display:flex;align-items:center;justify-content:center;gap:10px;min-height:130px;padding:22px;
  border:1px dashed var(--admin-border-strong);border-radius:12px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:12px;text-align:center
}
.behavior-page-error,.behavior-unavailable{flex-direction:column;color:var(--admin-danger)}
.behavior-page-error span,.behavior-unavailable span{max-width:680px;color:var(--admin-muted);overflow-wrap:anywhere}
.behavior-loading-compact{min-height:110px;border:0;background:transparent}
.behavior-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.behavior-metric-card{
  min-width:0;min-height:118px;padding:17px 18px;border:1px solid var(--admin-border);border-radius:var(--admin-radius);
  background:var(--admin-surface);box-shadow:var(--admin-shadow)
}
.behavior-metric-card>span{display:block;color:var(--admin-muted);font-size:11px;font-weight:650}
.behavior-metric-card>strong{display:block;margin:8px 0 6px;color:var(--admin-text);font-size:19px;line-height:1.25;overflow-wrap:anywhere}
.behavior-metric-card>small{display:block;color:var(--admin-text-soft);font-size:11px;line-height:1.45}
.behavior-context-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.behavior-context-card{min-height:235px}
.behavior-context-card>.behavior-unavailable{margin:14px;min-height:120px}
.behavior-definition-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0;padding:8px 18px 16px}
.behavior-definition-list>div{min-width:0;padding:10px 0;border-bottom:1px solid var(--admin-border)}
.behavior-definition-list>div:nth-child(odd){padding-right:14px}
.behavior-definition-list>div.is-wide{grid-column:1/-1;padding-right:0}
.behavior-definition-list dt{margin-bottom:4px;color:var(--admin-muted);font-size:10px;font-weight:650}
.behavior-definition-list dd{margin:0;color:var(--admin-text-soft);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.behavior-quality-counts{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px 18px 8px}
.behavior-quality-counts span{padding:9px;border-radius:9px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:10px}
.behavior-quality-counts b{display:block;margin-bottom:2px;color:var(--admin-text);font-size:16px}
.behavior-issue-list{display:flex;flex-wrap:wrap;gap:6px;padding:4px 18px 16px;color:var(--admin-text-soft);font-size:10px}
.behavior-issue-list>span{display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid var(--admin-border);border-radius:8px}
.behavior-status{display:inline-flex;align-items:center;min-height:20px;padding:1px 7px;border-radius:99px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:9px;font-weight:700;white-space:nowrap}
.behavior-status.is-success{background:var(--admin-success-soft);color:var(--admin-success)}
.behavior-status.is-danger{background:var(--admin-danger-soft);color:var(--admin-danger)}
.behavior-workspace{display:grid;grid-template-columns:minmax(260px,.78fr) minmax(300px,.92fr) minmax(440px,1.5fr);gap:14px;align-items:start}
.behavior-days-panel,.behavior-sessions-panel,.behavior-events-panel{min-height:480px}
.behavior-days-list,.behavior-session-list,.behavior-event-list{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;overscroll-behavior-y:auto}
.behavior-day-row{display:grid;grid-template-columns:82px minmax(120px,1fr) minmax(130px,1fr);gap:10px;align-items:center;padding:12px 15px;border-bottom:1px solid var(--admin-border)}
.behavior-day-row time{color:var(--admin-text);font-size:11px;font-weight:700}
.behavior-day-row>div{min-width:0}
.behavior-day-row strong,.behavior-day-row span{display:block;overflow-wrap:anywhere}
.behavior-day-row strong{color:var(--admin-text-soft);font-size:11px}
.behavior-day-row span{margin-top:3px;color:var(--admin-muted);font-size:9px;line-height:1.4}
.behavior-day-row .behavior-status{display:inline-flex;margin-top:5px}
.admin-button.behavior-session-row{display:grid;width:100%;min-height:0;grid-template-columns:1.2fr 1fr;gap:12px;padding:13px 15px;border:0;border-bottom:1px solid var(--admin-border);border-radius:0!important;background:transparent;color:inherit;text-align:left;white-space:normal;box-shadow:none;transform:none!important;cursor:pointer}
.behavior-session-row:hover{background:var(--admin-surface-soft)}
.behavior-session-row.is-active{background:var(--admin-primary-soft);box-shadow:inset 3px 0 0 var(--admin-primary)}
.behavior-session-row span{min-width:0}
.behavior-session-row strong,.behavior-session-row b,.behavior-session-row small{display:block;overflow-wrap:anywhere}
.behavior-session-row strong,.behavior-session-row b{color:var(--admin-text-soft);font-size:11px}
.behavior-session-row small{margin-top:4px;color:var(--admin-muted);font-size:9px;line-height:1.4}
.behavior-event-list{padding:0 16px}
.behavior-event-row{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;position:relative;padding:15px 0}
.behavior-event-row:not(:last-child){border-bottom:1px solid var(--admin-border)}
.behavior-event-marker{position:relative;display:flex;justify-content:center}
.behavior-event-marker:after{content:"";position:absolute;top:26px;bottom:-16px;left:50%;width:1px;background:var(--admin-border)}
.behavior-event-row:last-child .behavior-event-marker:after{display:none}
.behavior-event-marker span{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--admin-primary-soft);color:var(--admin-primary);font-size:9px;font-weight:800}
.behavior-event-body{min-width:0}
.behavior-event-body>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.behavior-event-body>header>div{min-width:0}
.behavior-event-body strong{display:block;color:var(--admin-text);font-size:12px}
.behavior-event-body code{display:block;margin-top:2px;color:var(--admin-muted);font-size:9px;overflow-wrap:anywhere}
.behavior-event-body time{flex-shrink:0;color:var(--admin-muted);font-size:9px}
.behavior-event-body dl{display:flex;flex-wrap:wrap;gap:5px 12px;margin:9px 0 0;padding:8px 10px;border-radius:9px;background:var(--admin-surface-soft)}
.behavior-event-body dl>div{display:flex;min-width:0;gap:4px;font-size:9px}
.behavior-event-body dt{color:var(--admin-muted);white-space:nowrap}
.behavior-event-body dd{margin:0;color:var(--admin-text-soft);overflow-wrap:anywhere}
.behavior-event-flags{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.behavior-event-flags span{padding:3px 6px;border-radius:6px;background:var(--admin-danger-soft);color:var(--admin-danger);font-size:8px;font-weight:650}
.behavior-load-more{display:flex;justify-content:center;padding:12px;border-top:1px solid var(--admin-border);background:var(--admin-surface)}

/* User activity stream: the primary admin view is a plain account of real
   actions. Funnel/outreach diagnostics intentionally do not compete here. */
.behavior-header-actions{display:flex;align-items:flex-end;gap:10px}
.behavior-header-actions label{display:flex;flex-direction:column;gap:5px;color:var(--admin-muted);font-size:10px;font-weight:700}
.behavior-header-actions select{min-width:118px;height:38px;min-height:38px!important;padding:0 30px 0 10px;font-size:11px}
.behavior-date-explorer{display:grid;grid-template-columns:300px minmax(0,1fr);gap:12px;align-items:start}
.behavior-calendar-panel{position:sticky;top:12px;overflow:hidden;padding:14px}
.behavior-calendar-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
.behavior-calendar-title h3{margin:0;color:var(--admin-text);font-size:14px;font-weight:750}
.behavior-calendar-title p{margin:3px 0 0;color:var(--admin-muted);font-size:9px}
.admin-button.behavior-calendar-summary{min-height:28px;padding:0 8px!important;border:1px solid var(--admin-border);border-radius:7px!important;font-size:9px;white-space:nowrap}
.admin-button.behavior-calendar-summary.is-active{border-color:var(--admin-primary)!important;background:var(--admin-primary-soft)!important;color:var(--admin-primary)!important}
.behavior-calendar-month-nav{display:grid;grid-template-columns:30px 1fr 30px;align-items:center;gap:7px;margin-bottom:8px}
.behavior-calendar-month-nav strong{color:var(--admin-text);font-size:11px;text-align:center}
.behavior-calendar-month-nav .admin-button{width:28px;height:28px;min-height:28px!important;font-size:17px}
.behavior-calendar-weekdays,.behavior-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.behavior-calendar-weekdays{margin-bottom:4px}
.behavior-calendar-weekdays span{padding:3px 0;color:var(--admin-muted);font-size:8px;font-weight:700;text-align:center}
.behavior-calendar-blank{min-height:34px}
.admin-button.behavior-calendar-day{position:relative;display:flex;min-width:0;min-height:38px;align-items:center;justify-content:center;flex-direction:column;gap:1px;padding:3px!important;border:1px solid transparent;border-radius:7px!important;background:transparent;color:var(--admin-muted);cursor:default}
.behavior-calendar-day b{font-size:10px;font-weight:650}
.behavior-calendar-day i{position:absolute;top:4px;right:4px;width:4px;height:4px;border-radius:50%;background:var(--admin-primary)}
.admin-button.behavior-calendar-day.has-data{border-color:var(--admin-border)!important;background:var(--admin-surface-soft)!important;color:var(--admin-text)!important;cursor:pointer}
.admin-button.behavior-calendar-day.has-data:hover{border-color:var(--admin-primary)!important;background:var(--admin-primary-soft)!important}
.admin-button.behavior-calendar-day.is-selected{border-color:var(--admin-primary)!important;background:var(--admin-primary)!important;color:#fff!important;box-shadow:0 4px 10px color-mix(in srgb,var(--admin-primary) 24%,transparent)!important}
.behavior-calendar-day.is-selected i{background:#fff}
.behavior-calendar-day.is-today:not(.is-selected) b{color:var(--admin-primary);font-weight:800}
.behavior-calendar-day.is-outside{opacity:.28}
.behavior-calendar-panel>footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding-top:10px;border-top:1px solid var(--admin-border);color:var(--admin-muted);font-size:8px}
.behavior-calendar-panel>footer span{display:flex;align-items:center;gap:5px}
.behavior-calendar-panel>footer i{width:6px;height:6px;border-radius:50%;background:var(--admin-primary)}
.behavior-calendar-panel>footer b{color:var(--admin-text-soft);font-weight:650}
.behavior-explorer-content{min-height:520px;overflow:hidden}
.behavior-range-heading,.behavior-day-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:17px 19px;border-bottom:1px solid var(--admin-border)}
.behavior-range-heading span{color:var(--admin-primary);font-size:9px;font-weight:750;letter-spacing:.06em}
.behavior-range-heading h3,.behavior-day-detail-heading h3{margin:3px 0 0;color:var(--admin-text);font-size:18px;font-weight:750}
.behavior-range-heading p,.behavior-day-detail-heading p{margin:4px 0 0;color:var(--admin-muted);font-size:10px}
.behavior-day-detail-heading>div:first-child>.admin-button{min-height:25px;margin:0 0 4px -8px;padding:0 8px!important;font-size:9px}
.behavior-range-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--admin-border)}
.behavior-range-kpis>div{padding:14px 17px;border-right:1px solid var(--admin-border)}
.behavior-range-kpis>div:last-child{border-right:0}
.behavior-range-kpis span{display:block;color:var(--admin-muted);font-size:9px}
.behavior-range-kpis strong{display:block;margin-top:5px;color:var(--admin-text);font-size:18px;font-weight:750}
.behavior-range-section{padding:17px 19px;border-bottom:1px solid var(--admin-border)}
.behavior-range-section:last-child{border-bottom:0}
.behavior-range-section h4{margin:0 0 11px;color:var(--admin-text);font-size:11px;font-weight:750}
.behavior-range-funnel{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:hidden;border:1px solid var(--admin-border);border-radius:9px}
.behavior-range-funnel>div{position:relative;padding:12px 13px;border-right:1px solid var(--admin-border);background:var(--admin-surface-soft)}
.behavior-range-funnel>div:last-child{border-right:0}
.behavior-range-funnel span{display:block;color:var(--admin-muted);font-size:8px;white-space:nowrap}
.behavior-range-funnel strong{display:block;margin-top:5px;color:var(--admin-text);font-size:16px}
.behavior-range-day-list{display:grid;overflow:hidden;border:1px solid var(--admin-border);border-radius:9px}
.behavior-range-day-item{display:grid;grid-template-columns:90px minmax(0,1fr) 92px;align-items:center;gap:12px;width:100%;min-height:48px;padding:8px 12px;border:0;border-bottom:1px solid var(--admin-border);background:var(--admin-surface);color:var(--admin-text-soft);font:inherit;text-align:left;cursor:pointer}
.behavior-range-day-item:last-child{border-bottom:0}
.behavior-range-day-item:hover{background:var(--admin-primary-soft)}
.behavior-range-day-item time{color:var(--admin-text);font-size:9px;font-weight:700}
.behavior-range-day-metrics{display:flex;min-width:0;flex-wrap:wrap;gap:5px 18px;color:var(--admin-muted);font-size:8px}
.behavior-range-day-metrics>span{white-space:nowrap}
.behavior-range-day-metrics b{color:var(--admin-text);font-size:11px;font-weight:750}
.behavior-range-day-item>small{color:var(--admin-muted);font-size:8px;text-align:right;white-space:nowrap}
.behavior-raw-event-note{display:inline-flex;margin-top:7px;padding:4px 7px;border-radius:6px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:8px}
.behavior-day-activity-region{padding-top:8px}
.behavior-activity-panel{overflow:hidden}
.behavior-activity-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:14px 17px;border-bottom:1px solid var(--admin-border)}
.behavior-activity-heading h3{margin:0;color:var(--admin-text);font-size:14px;font-weight:750}
.behavior-activity-heading p{max-width:720px;margin:4px 0 0;color:var(--admin-muted);font-size:10px;line-height:1.55}
.behavior-activity-quality-note{display:inline-flex;margin-top:7px;padding:4px 7px;border-radius:6px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:8px}
.behavior-action-filters{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.admin-button.behavior-action-filter{display:inline-flex;min-height:30px;padding:0 9px!important;gap:6px;border:1px solid transparent;border-radius:7px!important;color:var(--admin-text-soft);font-size:10px;white-space:nowrap}
.admin-button.behavior-action-filter span{display:grid;min-width:18px;height:18px;padding:0 4px;place-items:center;border-radius:99px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:8px}
.admin-button.behavior-action-filter.is-active{border-color:var(--admin-primary)!important;background:var(--admin-primary-soft)!important;color:var(--admin-primary)!important}
.admin-button.behavior-action-filter.is-active span{background:var(--admin-surface);color:var(--admin-primary)}
.behavior-activity-region{padding:10px;background:var(--admin-canvas)}
.behavior-activity-session{overflow:hidden;margin:0 auto 10px;border:1px solid var(--admin-border);border-radius:9px;background:var(--admin-surface)}
.behavior-activity-session:last-child{margin-bottom:0}
.behavior-activity-session>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 14px;border-bottom:1px solid var(--admin-border);background:var(--admin-surface-soft)}
.behavior-activity-session>header strong{display:block;color:var(--admin-text);font-size:11px;font-weight:750}
.behavior-activity-session>header span{color:var(--admin-muted);font-size:9px;white-space:nowrap}
.behavior-activity-steps{padding:3px 14px}
.behavior-activity-step{display:grid;grid-template-columns:64px 14px minmax(0,1fr);gap:8px;position:relative;align-items:center;min-height:42px;padding:5px 0;border-bottom:1px solid var(--admin-border)}
.behavior-activity-step:last-child{border-bottom:0}
.behavior-activity-step>time{color:var(--admin-muted);font-size:9px;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.behavior-activity-dot{position:relative;width:8px;height:8px;margin:auto;border:2px solid var(--admin-primary);border-radius:50%;background:var(--admin-surface);z-index:1}
.behavior-activity-dot:after{content:"";position:absolute;top:8px;bottom:-24px;left:1px;width:2px;background:var(--admin-border)}
.behavior-activity-step:last-child .behavior-activity-dot:after{display:none}
.behavior-kind-click .behavior-activity-dot{border-color:var(--admin-primary);background:var(--admin-primary)}
.behavior-kind-browse .behavior-activity-dot{border-color:#4f8bbd}
.behavior-kind-chat .behavior-activity-dot{border-color:var(--admin-success);background:var(--admin-success)}
.behavior-kind-account .behavior-activity-dot{border-color:#b07832;background:#b07832}
.behavior-kind-system .behavior-activity-dot{border-color:var(--admin-muted)}
.behavior-activity-card{display:flex;min-width:0;align-items:center;gap:12px;padding:4px 7px;border-radius:6px;background:transparent}
.behavior-kind-click .behavior-activity-card{background:var(--admin-primary-soft)}
.behavior-activity-action{display:flex;align-items:center;gap:8px;min-width:0}
.behavior-activity-action strong{min-width:0;color:var(--admin-text);font-size:12px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.behavior-action-kind{display:inline-flex;min-width:39px;min-height:19px;align-items:center;justify-content:center;flex:0 0 auto;padding:1px 6px;border-radius:5px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:8px;font-weight:750}
.behavior-kind-click .behavior-action-kind{background:var(--admin-primary);color:#fff}
.behavior-kind-chat .behavior-action-kind{background:var(--admin-success-soft);color:var(--admin-success)}
.behavior-kind-account .behavior-action-kind{background:#fff4df;color:#8a5a18}
.behavior-activity-card dl{display:flex;min-width:0;flex-wrap:wrap;gap:4px 12px;margin:0;padding:0}
.behavior-activity-card dl>div{display:flex;gap:4px;min-width:0;font-size:9px}
.behavior-activity-card dt{color:var(--admin-muted);white-space:nowrap}
.behavior-activity-card dd{margin:0;color:var(--admin-text-soft);overflow-wrap:anywhere}

@media(max-width:1280px){
  .behavior-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .behavior-date-explorer{grid-template-columns:270px minmax(0,1fr)}
  .behavior-range-funnel{grid-template-columns:repeat(3,minmax(0,1fr))}
  .behavior-range-funnel>div:nth-child(3){border-right:0}
  .behavior-range-funnel>div:nth-child(-n+3){border-bottom:1px solid var(--admin-border)}
  .behavior-range-day-item{grid-template-columns:82px minmax(0,1fr)}
  .behavior-range-day-item>small{grid-column:2;text-align:left}
  .behavior-context-grid{grid-template-columns:1fr 1fr}
  .behavior-context-card:last-child{grid-column:1/-1}
  .behavior-workspace{grid-template-columns:1fr 1fr}
  .behavior-events-panel{grid-column:1/-1}
}

@media(max-width:760px){
  .behavior-summary-grid,.behavior-context-grid,.behavior-workspace{grid-template-columns:1fr}
  .behavior-date-explorer{grid-template-columns:1fr}
  .behavior-calendar-panel{position:static}
  .behavior-range-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .behavior-range-kpis>div{border-bottom:1px solid var(--admin-border)}
  .behavior-range-kpis>div:nth-child(even){border-right:0}
  .behavior-range-kpis>div:nth-last-child(-n+2){border-bottom:0}
  .behavior-day-detail-heading{align-items:stretch;flex-direction:column}
  .behavior-range-day-item{grid-template-columns:1fr;gap:7px}
  .behavior-range-day-item>small{grid-column:auto;text-align:left}
  .behavior-context-card:last-child,.behavior-events-panel{grid-column:auto}
  .behavior-day-row{grid-template-columns:72px 1fr}
  .behavior-day-row>div:last-child{grid-column:2}
  .behavior-session-row{grid-template-columns:1fr}
  .behavior-event-body>header{display:block}
  .behavior-event-body time{display:block;margin-top:5px}
  .behavior-header-actions,.behavior-activity-heading{align-items:stretch;flex-direction:column}
  .behavior-action-filters{justify-content:flex-start}
  .behavior-activity-region{padding:9px}
  .behavior-activity-steps{padding:6px 10px}
  .behavior-activity-step{grid-template-columns:58px 14px minmax(0,1fr);gap:7px}
  .behavior-activity-card{align-items:flex-start;flex-direction:column;gap:5px}
}
.admin-pagination{margin-top:12px;border:1px solid var(--admin-border);border-radius:10px}
.admin-pagination-summary{display:flex;align-items:center;gap:18px!important}
.admin-pagination-size{display:flex;align-items:center;gap:7px;color:var(--admin-muted);font-weight:650}
.admin-pagination-size select{height:34px;min-height:34px!important;min-width:92px;padding:0 28px 0 10px;font-size:12px}
.admin-pagination-actions{display:flex;align-items:center;gap:7px}
@media(max-width:900px){
  .users-page,.admin-list-page{height:auto;min-height:0;overflow:visible}
  .users-page-header,.admin-list-page-header,.users-pagination{align-items:flex-start;flex-direction:column}
  .users-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .users-daily-toolbar{align-items:stretch;flex-wrap:wrap}
  .users-daily-toolbar>span{flex-basis:100%}
  .user-version-platforms{grid-template-columns:1fr}
  .admin-list-toolbar{align-items:stretch;flex-direction:column}
  .admin-list-region{min-height:0;flex:none}
  .users-header-actions{width:100%;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
  .users-summary{flex-wrap:wrap;gap:10px 16px}
  .users-toolbar{align-items:stretch;flex-direction:column}
  .users-search{min-width:0}
  .users-quota-launch{align-items:stretch}
  .users-version-filter>label{flex:1 1 auto}
  .quota-lookup-body{padding:17px}
  .quota-lookup-search-row>div,.quota-lookup-actions{align-items:stretch;flex-direction:column}
  .quota-metric-grid,.quota-lookup-details{grid-template-columns:1fr}
  .quota-lookup-details>div:nth-child(odd){border-right:0}
  .quota-lookup-details>div:nth-last-child(2){border-bottom:1px solid var(--admin-border)}
  .users-pagination>div{max-width:100%;flex-wrap:wrap}
  .admin-pagination-summary{align-items:flex-start!important;flex-direction:column;gap:8px!important}
}

.modal-bg{
  background:rgba(15,23,42,.48)!important;
  backdrop-filter:blur(5px);
  padding:20px;
}
.modal-bg>.admin-surface,
body>div.fixed.inset-0>.admin-surface{
  background:var(--admin-surface)!important;
  border-color:var(--admin-border)!important;
  box-shadow:var(--admin-shadow-lg)!important;
}
.modal-bg h3,body>div.fixed.inset-0 h3{color:var(--admin-text)!important}

.toast{
  border:1px solid rgba(255,255,255,.18);
  border-radius:11px!important;
  box-shadow:0 14px 34px rgba(15,23,42,.2)!important;
  padding:11px 14px!important;
  color:#fff!important;
}
.toast-success{background:#15803d!important}
.toast-error{background:#b91c1c!important}
.toast-info{background:#1d4ed8!important}
.toast-warning{background:#b45309!important}
.spinner{border-color:color-mix(in srgb,var(--admin-primary) 22%,transparent)!important;border-top-color:var(--admin-primary)!important}
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#c8d0dc;border:2px solid transparent;background-clip:padding-box;border-radius:99px}
::-webkit-scrollbar-thumb:hover{background:#aab5c5;border:2px solid transparent;background-clip:padding-box}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#465267;border:2px solid transparent;background-clip:padding-box}

.admin-page{width:100%;max-width:1560px;margin:0 auto}
.admin-page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:18px;
}
.admin-page-header h2{margin:0}
.admin-page-header p{margin:5px 0 0;color:var(--admin-muted);font-size:13px}
.admin-page-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
.admin-preview-badge{
  display:inline-flex;
  align-items:center;
  height:24px;
  padding:0 9px;
  border:1px solid color-mix(in srgb,var(--admin-primary) 22%,transparent);
  border-radius:99px;
  background:var(--admin-primary-soft);
  color:var(--admin-primary);
  font-size:11px;
  font-weight:700;
}
.admin-preview-notice{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  min-height:40px;
  margin-bottom:20px;
  padding:9px 13px;
  border:1px solid #dbe4ff;
  border-radius:10px;
  background:#f4f7ff;
  color:#52617a;
  font-size:12px;
  overflow-wrap:anywhere;
}
html[data-theme="dark"] .admin-preview-notice{border-color:#2f3b57;background:#182036;color:#aab5ca}
.admin-preview-notice>span:first-child{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:50%;
  background:var(--admin-primary);
  color:#fff;
  font-size:11px;
  font-weight:800;
}
.admin-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:38px;
  padding:0 15px;
  border:1px solid transparent;
  border-radius:9px!important;
  font-size:13px;
  font-weight:650;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:none;
  transition:transform .12s,box-shadow .12s,background .12s,color .12s,border-color .12s!important;
}
.admin-button:hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]){transform:translateY(-1px)}
.admin-button:active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]){transform:translateY(0)}
.admin-button-primary{
  border-color:var(--admin-primary-fill)!important;
  background:var(--admin-primary-fill)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:0 5px 13px rgba(37,99,235,.18)!important;
}
.admin-button-primary:hover:not(:disabled){
  border-color:var(--admin-primary-hover)!important;
  background:var(--admin-primary-hover)!important;
}
.admin-button-primary:active:not(:disabled){
  border-color:var(--admin-primary-active)!important;
  background:var(--admin-primary-active)!important;
}
.admin-button-secondary{
  border-color:var(--admin-border-strong)!important;
  background:var(--admin-surface)!important;
  color:var(--admin-text-soft)!important;
  box-shadow:none!important;
}
.admin-button-secondary:hover:not(:disabled){
  border-color:var(--admin-border-strong)!important;
  background:var(--admin-surface-soft)!important;
  color:var(--admin-text)!important;
}
.admin-button-secondary:active:not(:disabled){
  border-color:var(--admin-border-strong)!important;
  background:color-mix(in srgb,var(--admin-surface-soft) 78%,var(--admin-border))!important;
}
.admin-button-danger{
  border-color:var(--admin-danger)!important;
  background:var(--admin-surface)!important;
  color:var(--admin-danger)!important;
  box-shadow:none!important;
}
.admin-button-danger:hover:not(:disabled){
  border-color:var(--admin-danger-hover)!important;
  background:var(--admin-danger-soft)!important;
  color:var(--admin-danger-hover)!important;
}
.admin-button-danger:active:not(:disabled){
  border-color:var(--admin-danger-active)!important;
  background:var(--admin-danger-soft)!important;
  color:var(--admin-danger-active)!important;
}
.admin-button-danger-solid{
  border-color:var(--admin-danger)!important;
  background:var(--admin-danger)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  box-shadow:0 5px 13px rgba(220,38,38,.16)!important;
}
.admin-button-danger-solid:hover:not(:disabled){
  border-color:var(--admin-danger-hover)!important;
  background:var(--admin-danger-hover)!important;
}
.admin-button-danger-solid:active:not(:disabled){
  border-color:var(--admin-danger-active)!important;
  background:var(--admin-danger-active)!important;
}
.admin-button-ghost{
  border-color:transparent!important;
  background:transparent!important;
  color:var(--admin-text-soft)!important;
  box-shadow:none!important;
}
.admin-button-ghost:hover:not(:disabled){
  background:var(--admin-surface-soft)!important;
  color:var(--admin-text)!important;
}
.admin-button-ghost:active:not(:disabled){
  background:color-mix(in srgb,var(--admin-surface-soft) 78%,var(--admin-border))!important;
}
.admin-button-sm{
  min-height:32px!important;
  padding-right:11px!important;
  padding-left:11px!important;
  border-radius:8px!important;
  font-size:12px!important;
}
.admin-button-lg{min-height:40px!important;padding-right:18px!important;padding-left:18px!important}
.admin-button-icon{
  width:32px;
  min-width:32px;
  min-height:32px!important;
  padding:0!important;
}
.admin-button-overlay{
  border-color:rgba(255,255,255,.16)!important;
  background:rgba(0,0,0,.62)!important;
  color:#fff!important;
  box-shadow:none!important;
}
.admin-button-overlay:hover:not(:disabled){background:rgba(0,0,0,.82)!important;color:#fff!important}
.admin-button-overlay.admin-button-danger{
  border-color:rgba(254,202,202,.5)!important;
  background:rgba(153,27,27,.86)!important;
  color:#fff!important;
}
.admin-button-overlay.admin-button-danger:hover:not(:disabled){
  border-color:rgba(255,255,255,.72)!important;
  background:rgba(127,29,29,.96)!important;
}
.admin-button-tab{
  border-color:var(--admin-border-strong)!important;
  background:var(--admin-surface)!important;
  color:var(--admin-text-soft)!important;
  box-shadow:none!important;
}
.admin-button-tab:hover:not(:disabled){
  background:var(--admin-surface-soft)!important;
  color:var(--admin-text)!important;
}
.admin-button-tab.admin-button-primary,
.admin-button-tab.active,
.admin-button-tab[aria-selected="true"],
.admin-button-tab[aria-pressed="true"]{
  border-color:var(--admin-primary-fill)!important;
  background:var(--admin-primary-fill)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
.admin-button-tab.admin-button-primary:hover:not(:disabled),
.admin-button-tab.admin-button-primary:focus:not(:disabled),
.admin-button-tab.admin-button-primary:focus-visible:not(:disabled),
.admin-button-tab.admin-button-primary:active:not(:disabled),
.admin-button-tab.active:hover:not(:disabled),
.admin-button-tab.active:focus:not(:disabled),
.admin-button-tab.active:focus-visible:not(:disabled),
.admin-button-tab.active:active:not(:disabled),
.admin-button-tab[aria-selected="true"]:hover:not(:disabled),
.admin-button-tab[aria-selected="true"]:focus:not(:disabled),
.admin-button-tab[aria-selected="true"]:focus-visible:not(:disabled),
.admin-button-tab[aria-selected="true"]:active:not(:disabled),
.admin-button-tab[aria-pressed="true"]:hover:not(:disabled),
.admin-button-tab[aria-pressed="true"]:focus:not(:disabled),
.admin-button-tab[aria-pressed="true"]:focus-visible:not(:disabled),
.admin-button-tab[aria-pressed="true"]:active:not(:disabled){
  border-color:var(--admin-primary-hover)!important;
  background:var(--admin-primary-hover)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
.admin-button-tab.admin-button-primary>*,
.admin-button-tab.active>*,
.admin-button-tab[aria-selected="true"]>*,
.admin-button-tab[aria-pressed="true"]>*{
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
}
.admin-button:focus-visible{
  outline:3px solid var(--admin-primary-focus)!important;
  outline-offset:2px;
}
.admin-button:disabled,
.admin-button[aria-disabled="true"],
.admin-button[aria-busy="true"]{
  border-color:var(--admin-disabled-border)!important;
  background:var(--admin-disabled-bg)!important;
  color:var(--admin-disabled-text)!important;
  -webkit-text-fill-color:var(--admin-disabled-text)!important;
  box-shadow:none!important;
  cursor:not-allowed!important;
  opacity:1!important;
  transform:none!important;
}
.admin-button[aria-disabled="true"],
.admin-button[aria-busy="true"]{pointer-events:none}
.admin-workspace-tab-label.admin-button{
  height:100%;
  min-height:0!important;
  padding:0 12px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:inherit!important;
  box-shadow:none!important;
  transform:none!important;
}
.admin-workspace-tab-close.admin-button{
  width:26px;
  min-width:26px;
  height:26px;
  min-height:26px!important;
  margin-right:4px;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  color:var(--admin-muted)!important;
  transform:none!important;
}
.admin-workspace-tab-close.admin-button:hover{
  background:rgba(148,163,184,.16)!important;
  color:var(--admin-text)!important;
}
.admin-settings-nav .admin-button-tab{
  border-color:transparent!important;
  background:transparent!important;
  color:var(--admin-text-soft)!important;
}
.admin-settings-nav .admin-button-tab.active{
  background:var(--admin-primary-soft)!important;
  color:var(--admin-primary)!important;
  -webkit-text-fill-color:var(--admin-primary)!important;
}
button.admin-button-overlay{
  cursor:pointer;
  transition:background .12s,border-color .12s,color .12s!important;
}
.admin-panel{
  min-width:0;
  overflow:hidden;
  border:1px solid var(--admin-border);
  border-radius:var(--admin-radius);
  background:var(--admin-surface);
  box-shadow:var(--admin-shadow);
}
.admin-panel-heading,.admin-panel-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:68px;
  padding:14px 18px;
  border-bottom:1px solid var(--admin-border);
}
.admin-panel-heading{display:block}
.admin-panel-heading h3,.admin-panel-toolbar h3{margin:0;font-size:14px;font-weight:700}
.admin-panel-heading p,.admin-panel-toolbar p{margin:3px 0 0;color:var(--admin-muted);font-size:12px}
.admin-search{position:relative;width:min(260px,40vw)}
.admin-search>span{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--admin-muted);font-size:16px}
.admin-search>input{width:100%;padding:8px 12px 8px 34px!important}
.admin-table-wrap{overflow:auto}
.admin-primary-cell{display:flex;align-items:center;gap:10px;color:var(--admin-text)}
.admin-primary-cell strong{font-size:13px;font-weight:650}
.admin-avatar{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  flex:0 0 30px;
  border-radius:9px;
  background:var(--admin-primary-soft);
  color:var(--admin-primary);
  font-size:12px;
  font-weight:800;
}
.admin-status{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:2px 8px;
  border-radius:99px;
  font-size:11px;
  font-weight:700;
}
.admin-status.is-success,
.admin-status.is-pending{background:transparent;color:var(--admin-text-soft)}
.admin-status.is-muted{background:var(--admin-surface-soft);color:var(--admin-muted)}
.admin-row-action{
  min-height:32px!important;
  padding:0 11px;
  border:1px solid var(--admin-border);
  background:var(--admin-surface);
  color:var(--admin-text-soft);
  font-size:12px;
}
.admin-metric-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}
.admin-metric-card{
  min-height:120px;
  padding:18px 20px;
  border:1px solid var(--admin-border);
  border-radius:var(--admin-radius);
  background:var(--admin-surface);
  box-shadow:var(--admin-shadow);
}
.admin-metric-card>span{display:block;color:var(--admin-muted);font-size:12px}
.admin-metric-card>strong{display:block;margin:6px 0 5px;color:var(--admin-text);font-size:26px;line-height:1.2;letter-spacing:-.025em}
.admin-metric-card>small{font-size:11px;font-weight:650}
.admin-metric-card .is-positive,
.admin-metric-card .is-warning{color:var(--admin-text-soft)}
.admin-dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(320px,1fr);gap:18px}
.admin-dashboard-grid>.admin-settings-layout{display:block}
.admin-dashboard-grid .admin-settings-nav{display:none}
.admin-settings-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px}
.admin-settings-nav{
  align-self:start;
  overflow:hidden;
  padding:8px;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:var(--admin-surface);
  box-shadow:var(--admin-shadow);
}
.admin-settings-nav button{
  display:block;
  width:100%;
  min-height:40px;
  padding:0 12px;
  border:0;
  border-radius:8px!important;
  background:transparent;
  color:var(--admin-text-soft);
  text-align:left;
  font-size:13px;
}
.admin-settings-nav button.active{background:var(--admin-primary-soft);color:var(--admin-primary);font-weight:700}
.admin-form-panel{overflow:visible}
.admin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:20px}
.admin-form-grid label{display:block}
.admin-form-grid label>span{display:block;margin-bottom:7px;color:var(--admin-text-soft);font-size:12px;font-weight:650}
.admin-form-grid input,.admin-form-grid select,.admin-form-grid textarea{width:100%;padding:9px 11px}
.admin-field-full{grid-column:1/-1}
.admin-form-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 20px;
  border-top:1px solid var(--admin-border);
  color:var(--admin-muted);
  font-size:11px;
}
.admin-workspace-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:18px}
.admin-summary-card{align-self:start;padding:20px}
.admin-summary-card h3{margin:0 0 16px}
.admin-summary-card dl{margin:0 0 18px}
.admin-summary-card dl>div{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--admin-border)}
.admin-summary-card dt{color:var(--admin-muted);font-size:12px}.admin-summary-card dd{margin:0;color:var(--admin-text);font-weight:650}
.admin-summary-card>.admin-button{width:100%}
.admin-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:18px}
.admin-gallery-card{overflow:hidden;border:1px solid var(--admin-border);border-radius:11px;background:var(--admin-surface)}
.admin-gallery-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  aspect-ratio:16/10;
  background:linear-gradient(145deg,#eef2ff,#e2e8f0);
  color:#818cf8;
  font-size:28px;
  font-weight:800;
}
html[data-theme="dark"] .admin-gallery-placeholder{background:linear-gradient(145deg,#222a3c,#172033)}
.admin-gallery-card>div:last-child{display:flex;justify-content:space-between;gap:10px;padding:11px 12px}
.admin-gallery-card strong{color:var(--admin-text);font-size:12px}.admin-gallery-card small{color:var(--admin-muted);font-size:11px}
.admin-loading-state,.admin-error-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:55vh;
  gap:12px;
  color:var(--admin-muted);
}
.admin-loading-state .spinner{width:28px;height:28px;border:3px solid;border-radius:50%}
.admin-error-state{max-width:460px;margin:auto;text-align:center}
.admin-error-state h2{margin:0!important;font-size:19px!important}.admin-error-state p{margin:0}
.admin-error-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:#fef2f2;color:#dc2626;font-size:20px;font-weight:800}
.admin-error-state button:not(.admin-button){margin-top:6px;padding:0 16px;border:0;background:var(--admin-primary-fill);color:#fff}

@media (min-width:1024px) and (max-width:1199px){
  .admin-sidebar{width:232px!important}
  .admin-sidebar .sidebar-title,.admin-sidebar .sidebar-divider,.admin-sidebar .sidebar-section-label{display:block!important}
  .admin-sidebar .sidebar-item{font-size:14px!important;justify-content:flex-start!important;padding-left:12px!important;padding-right:12px!important}
  .admin-sidebar .sidebar-item>span{font-size:15px!important}
}
@media (max-width:1023px){
  .admin-tabs{margin:0 10px;gap:5px}
  .admin-workspace-tab-label{padding:0 10px!important}
  .admin-sidebar{width:72px!important;padding-left:8px!important;padding-right:8px!important}
  .admin-sidebar .sidebar-title,.admin-sidebar .sidebar-divider,.admin-sidebar .sidebar-section-label{display:none!important}
  .admin-sidebar .sidebar-item{font-size:0!important;justify-content:center!important;padding:9px!important}
  .admin-sidebar .sidebar-item>span{font-size:16px!important}
  .admin-content{padding:22px 20px 40px!important}
  .admin-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .admin-dashboard-grid,.admin-workspace-grid{grid-template-columns:1fr}
  .admin-settings-layout{grid-template-columns:180px minmax(0,1fr)}
}
@media (max-width:640px){
  .admin-topbar{height:58px!important;padding:0 12px!important}
  .admin-brand{font-size:14px!important}
  .admin-brand-title,.admin-brand .admin-version,.admin-brand .build-time,
  .admin-topbar .admin-account,
  .admin-topbar button[onclick="doLogout()"]{display:none!important}
  .admin-brand{gap:0!important}
  .admin-tabs{margin:0 7px}
  .admin-workspace-tab{height:100%}
  .admin-workspace-tab-label{max-width:92px;overflow:hidden;text-overflow:ellipsis}
  .admin-sidebar{width:60px!important}
  .admin-content{
    width:calc(100vw - 60px);
    max-width:calc(100vw - 60px);
    padding:18px 12px 32px!important;
    overflow-x:hidden!important;
  }
  .admin-page,.admin-page-header,.admin-page-actions{min-width:0;max-width:100%}
  .admin-content h2{font-size:21px!important}
  .admin-content .grid{gap:12px!important}
  .modal-bg{padding:10px}
  .admin-page-header{display:block}
  .admin-page-actions{margin-top:14px}
  .admin-page-actions{width:100%;min-width:0}
  .admin-page-actions .admin-button{flex:1 1 0;width:0;min-width:0;white-space:nowrap}
  .admin-preview-notice{align-items:flex-start}
  .admin-preview-notice>span:last-child{min-width:0;white-space:normal}
  .admin-metric-grid{grid-template-columns:1fr 1fr;gap:10px}
  .admin-metric-card{min-height:104px;padding:14px}
  .admin-metric-card>strong{font-size:21px}
  .admin-settings-layout{display:block}
  .admin-settings-nav{display:flex;margin-bottom:12px;overflow:auto}
  .admin-settings-nav button{width:auto;white-space:nowrap}
  .admin-form-grid{grid-template-columns:1fr;padding:16px}
  .admin-field-full{grid-column:auto}
  .admin-form-footer{align-items:flex-end;flex-direction:column}
  .admin-form-footer .admin-button{width:100%}
  .admin-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}
  .admin-panel-toolbar{align-items:flex-start;flex-direction:column}
  .admin-search{width:100%}
}

/* ===== 2026-07 内容区减法视觉：白色主卡片 + 无填充内层 ===== */
.admin-content{
  --admin-inner-rule:color-mix(in srgb,var(--admin-border) 88%,transparent);
}

/* 主卡片负责分组，卡片内部不再叠加灰色底板。 */
.admin-content .admin-panel,
.admin-content .admin-metric-card,
.admin-content .admin-gallery-card{
  box-shadow:0 1px 2px rgba(15,23,42,.025),0 8px 22px rgba(15,23,42,.035);
}
html[data-theme="dark"] .admin-content .admin-panel,
html[data-theme="dark"] .admin-content .admin-metric-card,
html[data-theme="dark"] .admin-content .admin-gallery-card{
  box-shadow:0 1px 2px rgba(0,0,0,.16);
}

/* 表格保持单一表面，用分隔线表达层级。 */
.admin-content table thead,
.admin-content table th{
  background:var(--admin-surface)!important;
}
.admin-content table tbody tr,
.admin-content table tbody tr:nth-child(even){
  background:transparent!important;
}
.admin-content table tbody tr:hover{
  background:color-mix(in srgb,var(--admin-surface-soft) 82%,transparent)!important;
}
.admin-content table th,
.admin-content table td{
  border-color:var(--admin-inner-rule)!important;
}

/* 角色详情：键值资料像信息清单，不再像一组灰色按钮。 */
.admin-detail-kv-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  column-gap:24px;
  row-gap:0;
}
.admin-detail-kv{
  min-width:0;
  padding:11px 0 12px;
  border:0;
  border-bottom:1px solid var(--admin-inner-rule);
  border-radius:0;
  background:transparent;
}
.admin-detail-kv-label{
  margin-bottom:4px;
  color:var(--admin-muted);
  font-size:11px;
  line-height:1.35;
}
.admin-detail-kv-value{
  color:var(--admin-text-soft);
  font-size:13px;
  line-height:1.55;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
.admin-detail-copy-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}
.admin-detail-copy-value{
  min-width:0;
  flex:1;
  color:var(--admin-text-soft);
  line-height:1.55;
}
.admin-detail-copy-status{
  display:block;
  margin-bottom:2px;
  color:var(--admin-muted);
  font-family:inherit;
}
.admin-detail-copy-text{
  display:block;
  overflow-wrap:anywhere;
  user-select:all;
}
.admin-detail-copy-button{
  flex:0 0 auto;
  min-height:28px;
  padding:4px 9px;
  font-size:11px;
}

/* 表单仍保留输入边界，但不使用灰底。 */
.admin-content input:not([type="checkbox"]):not([type="radio"]),
.admin-content select,
.admin-content textarea{
  background:var(--admin-field-bg)!important;
  box-shadow:none!important;
}
.admin-content input:disabled,
.admin-content select:disabled,
.admin-content textarea:disabled{
  background:var(--admin-field-bg)!important;
  color:var(--admin-muted)!important;
}

@media(max-width:1100px){
  .admin-detail-kv-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .admin-detail-kv-grid{grid-template-columns:1fr}
  .users-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .users-daily-toolbar>label{width:100%}
  .users-daily-toolbar input,.users-daily-toolbar select{width:100%}
  .users-version-filter{width:100%}
  .user-version-dialog-header,.user-version-dialog-footer{align-items:flex-start;flex-direction:column}
  .user-version-dialog-footer>div{width:100%;justify-content:flex-end}
}

/* 导航选中态统一为浅底、紫色文字、细边框，不使用侧边阴影。 */
html[data-theme="light"] .admin-sidebar .sidebar-item.active{
  background:#f8fafc!important;
  border:1px solid #dfe5ee!important;
  color:var(--admin-primary)!important;
}
html[data-theme="dark"] .admin-sidebar .sidebar-item.active{
  background:var(--admin-surface-soft)!important;
  border:1px solid var(--admin-border)!important;
  color:#fff!important;
}
.admin-sidebar .sidebar-item.active{
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
}
.admin-sidebar .sidebar-item.active::before,
.admin-sidebar .sidebar-item.active::after{
  display:none!important;
  content:none!important;
}
.admin-sidebar .sidebar-item.active>span{
  color:inherit!important;
}

/* 状态与能力标签统一透明底，颜色只用于文字提示。 */
.admin-content span.rounded-full[class*="bg-"],
.admin-content .admin-status{
  background:transparent!important;
  border:1px solid var(--admin-border-strong)!important;
  box-shadow:none!important;
}

/* 表格操作区使用紧凑文字按钮，且不影响头像、试听等其他表格控件。 */
.admin-content .admin-table-actions button{
  flex:0 0 auto;
  min-height:30px!important;
  padding:0 7px!important;
  white-space:nowrap;
}
.admin-content .admin-table-actions button:hover:not(:disabled){
  transform:none;
  filter:brightness(.94);
}
.admin-content table tbody td:has(> .admin-table-actions){
  min-width:100px;
}
.admin-content .admin-table-actions{
  flex-wrap:nowrap;
  gap:6px!important;
}
.admin-content .admin-table-actions .admin-table-action-edit:not(.admin-button){
  background:var(--admin-primary-fill)!important;
  border:1px solid var(--admin-primary-fill)!important;
  color:#fff!important;
}
.admin-content .admin-table-actions .admin-table-action-offline:not(.admin-button){
  background:var(--admin-surface)!important;
  border:1px solid var(--admin-border-strong)!important;
  color:var(--admin-text-soft)!important;
}
.admin-content .admin-table-actions .admin-table-action-birth:not(.admin-button){
  background:var(--admin-surface)!important;
  border:1px solid var(--admin-border-strong)!important;
  color:var(--admin-text-soft)!important;
}

/* 角色详情与当前主题保持一致，不再使用割裂的深色横幅。 */
.character-detail-header{
  background:var(--admin-surface)!important;
  border-color:var(--admin-border)!important;
  box-shadow:0 6px 18px rgba(15,23,42,.045);
  backdrop-filter:blur(14px);
}
.character-detail-header h2{
  color:var(--admin-text)!important;
}
.character-preview-media{
  height:min(58vh,560px);
  min-height:420px;
  background:var(--admin-surface-soft)!important;
}
.character-preview-media>img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.character-preview-caption{
  background:linear-gradient(
    to top,
    rgba(8,13,23,.82),
    rgba(8,13,23,.34),
    transparent
  );
  color:#fff;
}
.character-preview-caption .admin-muted,
.character-preview-caption .admin-text-soft{color:rgba(255,255,255,.78)!important}
.character-asset-shortcut{
  display:flex!important;
  min-height:54px!important;
  align-items:flex-start!important;
  flex-direction:column;
  gap:3px!important;
  padding:9px 11px!important;
  text-align:left;
}
.character-asset-shortcut>span{
  color:var(--admin-muted)!important;
  font-size:11px;
  font-weight:600;
}
.character-asset-shortcut>strong{
  color:var(--admin-text-soft)!important;
  font-size:12px;
  font-weight:650;
}
.character-asset-preview{
  min-height:0!important;
  padding:0!important;
  border:1px solid var(--admin-border)!important;
  background:var(--admin-surface-soft)!important;
  color:var(--admin-text)!important;
  box-shadow:none!important;
  transform:none!important;
}
.character-asset-preview:hover,
.character-asset-preview:focus-visible{
  border-color:var(--admin-border-strong)!important;
  background:var(--admin-surface-soft)!important;
  transform:none!important;
}
.character-asset-preview>img{display:block;background:transparent}
.admin-image-unavailable{
  position:relative;
  background:var(--admin-surface-soft)!important;
}
.admin-image-unavailable::after{
  content:"图片暂不可用";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  color:var(--admin-muted);
  font-size:12px;
  font-weight:600;
  text-align:center;
}
.character-detail-header .admin-image-unavailable::after{
  content:"暂无";
  font-size:10px;
}
@media(max-width:900px){
  .character-preview-media{
    height:min(70vh,520px);
    min-height:360px;
  }
}

/* ===== 角色列表重构：固定信息层级，避免长文本挤压所有列 ===== */
.character-list-page.admin-list-page{width:100%;max-width:1560px;margin:0 auto;height:auto;min-height:0;overflow:visible}
.character-list-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:18px;
}
.character-list-title-line{display:flex;align-items:center;gap:10px}
.character-list-title-line h2{margin:0}
.character-list-title-line>span{
  color:var(--admin-muted);
  font-size:12px;
  font-weight:600;
}
.character-list-header p{margin:5px 0 0;color:var(--admin-muted);font-size:13px}
.character-create-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:38px!important;
  padding:0 15px;
  border:1px solid var(--admin-primary-fill)!important;
  background:var(--admin-primary-fill)!important;
  color:#fff!important;
  box-shadow:0 5px 13px rgba(37,99,235,.16);
  white-space:nowrap;
}
.character-create-button>span{font-size:17px;line-height:1}

.character-list-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
}
.character-filter-group{
  display:inline-flex;
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid var(--admin-border);
  border-radius:10px;
  background:var(--admin-surface);
}
.character-filter-group button{
  min-height:32px!important;
  padding:0 11px;
  border:0!important;
  background:transparent!important;
  color:var(--admin-text-soft)!important;
  box-shadow:none!important;
  font-size:12px;
  white-space:nowrap;
}
.character-filter-group button>span{margin-left:3px;color:var(--admin-muted);font-weight:600}
.character-filter-group button.active,
.character-filter-group button.active:hover,
.character-filter-group button.active:focus,
.character-filter-group button.active:focus-visible,
.character-filter-group button.active:active,
.character-filter-group button[aria-selected="true"]{
  background:var(--admin-primary-fill)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
.character-filter-group button.active>span,
.character-filter-group button[aria-selected="true"]>span{
  color:rgba(255,255,255,.82)!important;
  -webkit-text-fill-color:rgba(255,255,255,.82)!important;
}
.character-filter-result{color:var(--admin-muted);font-size:12px}

.character-selection-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:48px;
  margin-bottom:12px;
  padding:8px 12px;
  border:1px solid color-mix(in srgb,var(--admin-primary) 24%,var(--admin-border));
  border-radius:10px;
  background:color-mix(in srgb,var(--admin-primary-soft) 45%,var(--admin-surface));
  color:var(--admin-text-soft);
  font-size:12px;
}
.character-selection-bar>span strong{color:var(--admin-primary)}
.character-selection-bar>div{display:flex;align-items:center;gap:8px}
.character-selection-bar button{
  min-height:32px!important;
  padding:0 11px;
  font-size:12px;
}
.character-selection-bar .character-batch-delete{
  border-color:var(--admin-danger)!important;
  color:var(--admin-danger)!important;
}

.character-list-panel{
  overflow:hidden;
  overscroll-behavior:auto;
  border:1px solid var(--admin-border);
  border-radius:var(--admin-radius);
  background:var(--admin-surface);
  box-shadow:0 1px 2px rgba(15,23,42,.025),0 8px 22px rgba(15,23,42,.035);
}
.character-list-scroll{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
}
.character-list-table{
  min-width:1240px;
  table-layout:fixed;
}
.character-list-table .character-select-column{width:44px}
.character-list-table .character-identity-column{width:180px}
.character-list-table .character-style-column{width:190px}
.character-list-table .character-time-column{width:clamp(116px,7vw,138px)}
.character-list-table .character-status-column{width:92px}
.character-list-table .character-voice-column{width:auto;min-width:330px}
.character-list-table .character-images-column{width:72px}
.character-list-table .character-actions-column{width:176px}
.character-list-table th{
  height:44px;
  padding:0 12px!important;
  background:var(--admin-surface)!important;
  color:var(--admin-muted)!important;
  font-size:11px!important;
  letter-spacing:.02em;
}
.character-list-table td{padding:10px 12px!important;vertical-align:middle}
.character-list-table .character-time-cell{
  color:var(--admin-muted);
  font-size:11px;
  white-space:nowrap;
}
.character-list-row{height:88px}
.character-list-row.is-selected{background:color-mix(in srgb,var(--admin-primary-soft) 38%,transparent)!important}
.character-list-row:hover{background:var(--admin-surface-soft)!important}
.character-list-row.is-selected:hover{background:color-mix(in srgb,var(--admin-primary-soft) 62%,transparent)!important}

.character-identity{display:flex;align-items:center;gap:12px}
.character-avatar{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  flex:0 0 44px;
  overflow:hidden;
  padding:0!important;
  border:1px solid var(--admin-border)!important;
  border-radius:11px!important;
  background:var(--admin-surface-soft)!important;
  color:var(--admin-primary)!important;
  box-shadow:none!important;
  font-size:13px;
  font-weight:750;
}
.character-avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.character-avatar.admin-image-unavailable::after{display:none}
.character-identity-copy{min-width:0}
.character-identity-copy strong{
  display:block;
  overflow:hidden;
  color:var(--admin-text);
  font-size:13px;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.character-identity-copy span{display:block;margin-top:4px;color:var(--admin-muted);font-size:11px}
.character-style-cell{
  color:var(--admin-text-soft)!important;
  font-size:12px;
  line-height:1.55;
}
.character-style-text{
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.character-time-cell{color:var(--admin-muted)!important;font-size:11px;white-space:nowrap}
.character-status{display:inline-flex;align-items:center;gap:6px;color:var(--admin-text-soft);font-size:12px;white-space:nowrap}
.character-status>i,.character-voice-state>i{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:var(--admin-muted)}
.character-status.is-born,
.character-status.is-offline{color:var(--admin-text-soft)}
.character-status.is-born>i{background:#22c55e}
.character-status.is-offline>i{background:#f59e0b}

/* 角色详情中的资料值统一使用正文色，不再按“完成类型”分配多套颜色。 */
.character-detail-metrics{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:24px;
}
.character-detail-metric{min-width:82px}
.character-detail-metric>div{
  margin-bottom:2px;
  color:var(--admin-muted);
  font-size:11px;
}
.character-detail-metric>strong{
  color:var(--admin-text);
  font-size:17px;
  font-weight:700;
}
.character-detail-data-value{
  color:var(--admin-text-soft)!important;
  font-size:12px;
  font-weight:600;
}

/* ===== AI 主动触达：同一表面、同一正文色，状态只用文字与小圆点区分 ===== */
.proactive-title-row{display:flex;align-items:center;gap:10px}
.proactive-summary-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.proactive-summary-card{
  min-width:0;
  min-height:110px;
  padding:17px 18px;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:var(--admin-surface);
  box-shadow:var(--admin-shadow);
}
.proactive-summary-card>span,
.proactive-summary-card>small{
  display:block;
  color:var(--admin-muted);
  font-size:12px;
}
.proactive-summary-card>strong{
  display:block;
  margin:7px 0 5px;
  color:var(--admin-text);
  font-size:25px;
  line-height:1.1;
}
.proactive-summary-card>.proactive-health-value{font-size:20px}
.proactive-page.admin-list-page{
  height:auto;
  min-height:calc(100vh - 138px);
  overflow:visible;
}
.proactive-main-panel{
  flex:0 0 auto;
  overflow:visible;
}
.proactive-tabs{
  display:flex;
  align-items:center;
  gap:8px;
  padding:14px 18px 0;
  border-bottom:1px solid var(--admin-border);
}
.proactive-tab.admin-button{
  min-height:38px!important;
  margin-bottom:-1px;
  padding:0 3px 10px!important;
  border-width:0 0 2px!important;
  border-color:transparent!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--admin-muted)!important;
  box-shadow:none!important;
  transform:none!important;
}
.proactive-tab.admin-button:hover{
  background:transparent!important;
  color:var(--admin-text)!important;
  box-shadow:none!important;
  transform:none!important;
}
.proactive-tab.admin-button.active,
.proactive-tab.admin-button[aria-selected="true"]{
  border-color:var(--admin-primary)!important;
  background:transparent!important;
  color:var(--admin-primary)!important;
  box-shadow:none!important;
  transform:none!important;
}
.proactive-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 18px;
  border-bottom:1px solid var(--admin-border);
}
.proactive-filter-select{min-width:148px}
.proactive-body{min-height:310px}
.proactive-table-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 18px;
  border-bottom:1px solid var(--admin-border);
  color:var(--admin-muted);
  font-size:12px;
}
.proactive-resizable-table{
  position:relative;
  height:auto;
  min-height:0;
  max-height:none;
  flex:0 0 auto!important;
  resize:none;
  overflow-x:auto;
  overflow-y:hidden;
}
.proactive-table{width:100%;min-width:1120px}
.proactive-table th{white-space:nowrap}
.proactive-table td{vertical-align:top}
.proactive-table td:nth-last-child(-n+3){white-space:nowrap}
.proactive-job-table{min-width:1480px}
.proactive-job-table th:last-child,
.proactive-job-table td:last-child{min-width:285px}
.proactive-engagement-table{min-width:1460px}
.proactive-user-cell{min-width:150px}
.proactive-user-cell strong,
.proactive-user-cell small,
.proactive-cell-note,
.proactive-character,
.proactive-error-text{
  display:block;
}
.proactive-user-cell strong{color:var(--admin-text);font-weight:650}
.proactive-user-cell small,
.proactive-cell-note,
.proactive-character{
  margin-top:3px;
  color:var(--admin-muted);
  font-size:11px;
  line-height:1.45;
}
.proactive-character{color:var(--admin-text-soft)}
.proactive-cell-note,
.proactive-message-preview,
.proactive-error-text{
  max-width:290px;
  overflow-wrap:anywhere;
  white-space:normal;
}
.proactive-message-preview{display:block;color:var(--admin-text-soft);line-height:1.55}
.proactive-error-text{margin-top:4px;color:var(--admin-text-soft);font-size:11px;line-height:1.45}
.proactive-overdue-text{color:var(--admin-danger)}
.proactive-muted{color:var(--admin-muted)}
.proactive-decision{min-width:245px}
.proactive-decision strong,
.proactive-decision small,
.proactive-decision q{display:block}
.proactive-decision strong{color:var(--admin-text);font-size:12px}
.proactive-decision small{margin-top:4px;color:var(--admin-text-soft);font-size:11px;line-height:1.5}
.proactive-decision q{
  max-width:280px;
  margin-top:7px;
  color:var(--admin-muted);
  font-size:11px;
  font-style:normal;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.proactive-condition-list{display:grid;min-width:220px;gap:7px}
.proactive-condition-list>div{display:flex;align-items:flex-start;gap:7px}
.proactive-condition-list b{width:13px;flex:0 0 13px;color:var(--admin-muted);font-size:11px}
.proactive-condition-list .is-pass b{color:#16a34a}
.proactive-condition-list .is-fail b{color:var(--admin-danger)}
.proactive-condition-list span,
.proactive-condition-list strong,
.proactive-condition-list small{display:block}
.proactive-condition-list strong{color:var(--admin-text-soft);font-size:11px}
.proactive-condition-list small{margin-top:1px;color:var(--admin-muted);font-size:10px}
.proactive-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--admin-text-soft);
  font-size:12px;
  font-weight:650;
  white-space:nowrap;
}
.proactive-status>i,
.proactive-check-dot{
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:var(--admin-muted);
}
.proactive-status.is-ok,
.proactive-status.is-warn,
.proactive-status.is-error{color:var(--admin-text-soft)}
.proactive-status.is-ok>i,
.proactive-check-dot.is-ok{background:#22c55e}
.proactive-status.is-warn>i{background:#f59e0b}
.proactive-status.is-error>i,
.proactive-check-dot.is-error{background:var(--admin-danger)}
.proactive-schedule-modal{width:min(620px,calc(100vw - 32px))}
.proactive-schedule-editor{
  display:grid;
  gap:20px;
  padding:20px;
}
.proactive-schedule-editor>div>span{
  display:block;
  margin-bottom:8px;
  color:var(--admin-text-soft);
  font-size:12px;
}
.proactive-schedule-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:0 20px 20px;
}
.proactive-overview-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.proactive-guide{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:18px 20px;
  border-bottom:1px solid var(--admin-border);
}
.proactive-guide>div{display:flex;align-items:center;gap:10px;min-width:0}
.proactive-guide>div>b{
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  flex:0 0 26px;
  border:1px solid var(--admin-border-strong);
  border-radius:50%;
  color:var(--admin-primary);
  font-size:12px;
}
.proactive-guide span,
.proactive-guide strong,
.proactive-guide small{display:block}
.proactive-guide strong{color:var(--admin-text-soft);font-size:12px}
.proactive-guide small{margin-top:3px;color:var(--admin-muted);font-size:11px;line-height:1.35}
.proactive-guide>i{color:var(--admin-muted);font-style:normal}
.proactive-runtime-settings{
  display:flex;
  align-items:center;
  gap:22px;
  padding:16px 20px;
  border-bottom:1px solid var(--admin-border);
}
.proactive-runtime-settings>div{min-width:260px;margin-right:auto}
.proactive-runtime-settings strong,
.proactive-runtime-settings small{display:block}
.proactive-runtime-settings strong{color:var(--admin-text);font-size:14px}
.proactive-runtime-settings small{margin-top:4px;color:var(--admin-muted);font-size:11px}
.proactive-switch{
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:var(--admin-text-soft);
  font-size:12px;
  cursor:pointer;
}
.proactive-switch input{position:absolute;opacity:0;pointer-events:none}
.proactive-switch span{
  position:relative;
  width:38px;
  height:22px;
  border:1px solid var(--admin-border-strong);
  border-radius:999px;
  background:var(--admin-field-bg);
  transition:.18s ease;
}
.proactive-switch span::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:var(--admin-muted);
  transition:.18s ease;
}
.proactive-switch input:checked+span{
  border-color:var(--admin-primary);
  background:var(--admin-field-bg);
}
.proactive-switch input:checked+span::after{
  transform:translateX(16px);
  background:var(--admin-field-bg);
  box-shadow:inset 0 0 0 8px var(--admin-primary);
}
.proactive-switch input:focus-visible+span{outline:2px solid var(--admin-primary);outline-offset:2px}
.proactive-delay-field{
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--admin-muted);
  font-size:12px;
}
.proactive-delay-field select{min-width:112px}
.proactive-overview-section{
  min-width:0;
  padding:20px;
  border-right:1px solid var(--admin-border);
}
.proactive-overview-section:last-child{border-right:0}
.proactive-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.proactive-section-heading h3{margin:0;color:var(--admin-text);font-size:15px}
.proactive-section-heading p{margin:4px 0 0;color:var(--admin-muted);font-size:12px}
.proactive-rule-editor .admin-form-field{display:flex;flex-direction:column;gap:6px;color:var(--admin-text-soft);font-size:12px}
.proactive-rule-editor input:not([type="checkbox"]),
.proactive-rule-editor textarea{width:100%;border:1px solid var(--admin-border);border-radius:8px;background:var(--admin-field-bg);color:var(--admin-text);padding:9px 10px;outline:none}
.proactive-policy-notice{padding:11px 13px;border:1px solid rgba(37,99,235,.2);border-radius:9px;background:rgba(37,99,235,.07);color:var(--admin-text-soft);font-size:12px;line-height:1.55}
.notification-modal.proactive-rule-modal{width:min(980px,calc(100vw - 32px))}
.proactive-anchor-summary{
  min-height:68px;
  padding:10px 12px;
  border:1px solid var(--admin-border);
  border-radius:9px;
  background:var(--admin-field-bg);
}
.proactive-anchor-summary strong{color:var(--admin-text);font-size:13px}
.proactive-anchor-summary small{color:var(--admin-muted);font-size:11px;line-height:1.45}
.proactive-audience-rules{display:grid;gap:12px}
.proactive-audience-rules-head strong,
.proactive-audience-rules-head small{display:block}
.proactive-audience-rules-head strong{color:var(--admin-text);font-size:14px}
.proactive-audience-rules-head small{margin-top:4px;color:var(--admin-muted);font-size:11px;line-height:1.5}
.proactive-audience-tier{
  padding:14px;
  border:1px solid var(--admin-border);
  border-radius:11px;
  background:var(--admin-field-bg);
}
.proactive-audience-tier.is-fallback{border-style:dashed}
.proactive-audience-tier-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.proactive-audience-tier-head>div{display:flex;align-items:center;gap:8px;min-width:0}
.proactive-audience-tier-head strong{color:var(--admin-text);font-size:13px}
.proactive-audience-tier-head b{
  padding:2px 7px;
  border-radius:999px;
  background:rgba(37,99,235,.09);
  color:var(--admin-primary);
  font-size:10px;
  font-weight:600;
}
.proactive-audience-tier-head small{color:var(--admin-muted);font-size:10px}
.proactive-tier-order{
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  flex:0 0 22px;
  border-radius:50%;
  background:var(--admin-primary);
  color:#fff;
  font-size:10px;
  font-weight:700;
}
.proactive-audience-tier>p{margin:7px 0 12px;color:var(--admin-muted);font-size:11px;line-height:1.5}
.proactive-tier-match-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px}
.proactive-tier-match-spacer{min-height:1px}
.proactive-tier-advanced{
  padding:8px 10px;
  border:1px solid var(--admin-border);
  border-radius:8px;
}
.proactive-tier-advanced summary{cursor:pointer;color:var(--admin-text-soft);font-size:11px}
.proactive-tier-advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.proactive-fallback-note{margin-bottom:12px;padding:9px 11px;border-radius:8px;background:rgba(100,116,139,.08);color:var(--admin-text-soft);font-size:11px;line-height:1.5}
.proactive-delay-band-picker{margin:0;padding:0;border:0}
.proactive-delay-band-picker legend{margin-bottom:7px;color:var(--admin-text-soft);font-size:11px;font-weight:600}
.proactive-delay-band-picker>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.proactive-delay-band-picker label{display:flex;align-items:flex-start;gap:7px;min-width:0;padding:8px;border:1px solid var(--admin-border);border-radius:8px;cursor:pointer}
.proactive-delay-band-picker label:has(input:checked){border-color:var(--admin-primary);background:var(--admin-field-bg);box-shadow:inset 0 0 0 1px var(--admin-primary)}
.proactive-delay-band-picker input{margin-top:2px;accent-color:var(--admin-primary)}
.proactive-delay-band-picker span,
.proactive-delay-band-picker strong,
.proactive-delay-band-picker small{display:block;min-width:0}
.proactive-delay-band-picker strong{color:var(--admin-text-soft);font-size:10px;line-height:1.35}
.proactive-delay-band-picker small{margin-top:2px;color:var(--admin-muted);font-size:9px;line-height:1.3}
.proactive-hook-editors{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media(max-width:900px){.proactive-delay-band-picker>div{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.proactive-rule-editor{grid-template-columns:1fr}.proactive-rule-editor>*{grid-column:1}.proactive-hook-editors{grid-template-columns:1fr}.proactive-tier-match-grid,.proactive-tier-advanced-grid{grid-template-columns:1fr}.proactive-tier-match-grid>*{grid-column:1}.proactive-delay-band-picker>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
.proactive-check-list{display:grid}
.proactive-check-row{
  display:grid;
  grid-template-columns:8px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:56px;
  border-top:1px solid var(--admin-border);
}
.proactive-check-row:first-child{border-top:0}
.proactive-check-row strong,
.proactive-check-row small{display:block}
.proactive-check-row strong{color:var(--admin-text-soft);font-size:12px}
.proactive-check-row small{margin-top:2px;color:var(--admin-muted);font-size:11px}
.proactive-check-row b{color:var(--admin-text-soft);font-size:11px}
.proactive-rule-list{margin:0}
.proactive-rule-list>div{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  min-height:42px;
  padding:10px 0;
  border-top:1px solid var(--admin-border);
}
.proactive-rule-list>div:first-child{border-top:0}
.proactive-rule-list dt{color:var(--admin-muted);font-size:12px}
.proactive-rule-list dd{
  margin:0;
  color:var(--admin-text-soft);
  font-size:12px;
  font-weight:600;
  text-align:right;
}
.proactive-empty,
.proactive-database-warning{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:220px;
  padding:28px;
  text-align:center;
}
.proactive-empty strong,
.proactive-database-warning strong{color:var(--admin-text)}
.proactive-empty span,
.proactive-database-warning span{margin-top:5px;color:var(--admin-muted);font-size:12px}
.proactive-database-warning{align-items:flex-start;text-align:left}

@media (max-width:1200px){
  .proactive-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .proactive-overview-grid{grid-template-columns:1fr}
  .proactive-overview-section{border-right:0;border-bottom:1px solid var(--admin-border)}
  .proactive-overview-section:last-child{border-bottom:0}
  .proactive-guide{grid-template-columns:1fr 1fr}
  .proactive-guide>i{display:none}
}
@media (max-width:760px){
  .proactive-runtime-settings{align-items:flex-start;flex-wrap:wrap}
  .proactive-runtime-settings>div{width:100%;margin-right:0}
}
@media (max-width:720px){
  .proactive-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .proactive-summary-grid .proactive-health-card{grid-column:1/-1}
  .proactive-tabs{overflow-x:auto}
  .proactive-toolbar{align-items:stretch;flex-direction:column}
  .proactive-toolbar .admin-search{width:100%}
}

.character-voice-cell{min-width:330px;transition:background-color .35s}
.character-voice-cell.is-updated{background:color-mix(in srgb,#22d3ee 9%,transparent)!important}
.character-voice-summary{min-width:0}
.character-voice-meta{display:flex;align-items:center;gap:10px;margin-bottom:5px}
.character-voice-state{display:inline-flex;align-items:center;gap:5px;color:var(--admin-muted);font-size:10px;white-space:nowrap}
.character-voice-state.is-ready{color:var(--admin-text-soft)}.character-voice-state.is-ready>i{background:#22d3ee}
.character-voice-engine{color:var(--admin-muted);font-size:10px;white-space:nowrap}
.character-speech-feature{color:var(--admin-muted);font-size:10px;white-space:nowrap}
.character-opening-copy{
  display:-webkit-box;
  min-height:0;
  margin:0;
  overflow:hidden;
  color:var(--admin-text-soft);
  font-size:11px;
  line-height:1.55!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.character-voice-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:5px;
}
.character-voice-name{
  min-width:0;
  overflow:hidden;
  color:var(--admin-muted);
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.character-voice-actions{display:flex;align-items:center;gap:0;flex:0 0 auto}
.character-voice-actions button:not(.admin-button){
  min-height:28px!important;
  padding:0 8px!important;
  border:1px solid var(--admin-border-strong)!important;
  border-radius:7px!important;
  background:var(--admin-surface)!important;
  color:var(--admin-text-soft)!important;
  box-shadow:none!important;
  font-size:10px;
  line-height:1.2;
  white-space:nowrap;
}
.character-voice-actions{gap:5px}
.character-voice-actions button:not(.admin-button):hover{
  background:var(--admin-surface-soft)!important;
  color:var(--admin-text)!important;
  transform:none!important;
}
.character-voice-actions .admin-button{
  min-height:28px!important;
  padding:0 8px!important;
  border-radius:7px!important;
  font-size:10px!important;
  line-height:1.2;
}
.character-voice-actions>span{color:var(--admin-muted);font-size:10px}
.character-image-count{
  overflow:hidden;
  text-align:center;
  white-space:nowrap;
}
.character-image-count strong{color:var(--admin-text);font-size:14px}
.character-image-count span{display:inline;margin-left:2px;color:var(--admin-muted);font-size:10px}
.character-actions-cell{overflow:hidden}
.character-actions-cell .admin-table-actions{
  display:flex;
  width:100%;
  justify-content:flex-end;
}
.admin-content .character-actions-cell .admin-table-actions .admin-button{
  min-width:40px;
  min-height:40px!important;
  padding:0 8px!important;
  box-shadow:none!important;
}
.character-empty-row{height:180px!important;color:var(--admin-muted)!important;text-align:center}

@media(max-width:900px){
  .character-list-header,.character-list-toolbar{align-items:stretch;flex-direction:column}
  .character-create-button{align-self:flex-start}
  .character-filter-group{align-self:flex-start;max-width:100%;overflow:auto}
  .character-filter-result{display:none}
  .character-selection-bar{align-items:flex-start;flex-direction:column}
}

/* ===== 全局视觉表面规则 =====
 * 1. 页面画布只使用 --admin-canvas。
 * 2. 一级卡片只使用 --admin-surface。
 * 3. 输入框、选择框、文本框、只读输出和内容展示框只使用 --admin-field-bg。
 * 4. 状态差异只使用文字、圆点和边框，不允许增加第三种字段背景。
 * 5. 图片、图表、遮罩、主按钮不属于字段表面，可使用各自必要颜色。
 */
/* 所有输入控件，包括挂载在 body 根节点的动态弹窗，统一使用同一背景。 */
html[data-theme] body input:not([type="checkbox"]):not([type="radio"]),
html[data-theme] body select:not([data-admin-native-surface]),
html[data-theme] body textarea:not([data-admin-native-surface]){
  background:var(--admin-field-bg)!important;
  border-color:var(--admin-field-border)!important;
  color:var(--admin-text)!important;
  box-shadow:none!important;
}
html[data-theme] body input:not([type="checkbox"]):not([type="radio"]):hover,
html[data-theme] body select:not([data-admin-native-surface]):hover,
html[data-theme] body textarea:not([data-admin-native-surface]):hover{
  border-color:color-mix(in srgb,var(--admin-field-border) 68%,var(--admin-text-soft))!important;
}
html[data-theme] body input:not([type="checkbox"]):not([type="radio"]):focus,
html[data-theme] body select:not([data-admin-native-surface]):focus,
html[data-theme] body textarea:not([data-admin-native-surface]):focus{
  background:var(--admin-field-bg)!important;
  border-color:var(--admin-primary)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--admin-primary) 14%,transparent)!important;
}
html[data-theme] body input:disabled,
html[data-theme] body select:disabled,
html[data-theme] body textarea:disabled,
html[data-theme] body input[readonly],
html[data-theme] body textarea[readonly]{
  background:var(--admin-field-bg)!important;
  color:var(--admin-muted)!important;
  opacity:1;
}
html[data-theme] body input:-webkit-autofill,
html[data-theme] body input:-webkit-autofill:hover,
html[data-theme] body input:-webkit-autofill:focus{
  -webkit-text-fill-color:var(--admin-text)!important;
  box-shadow:0 0 0 1000px var(--admin-field-bg) inset!important;
}
.admin-preview-notice{
  background:var(--admin-surface)!important;
  border-color:var(--admin-field-border)!important;
}
html[data-theme="dark"] .admin-preview-notice{
  background:var(--admin-surface)!important;
  border-color:var(--admin-field-border)!important;
}

/* 代码预览、只读输出与内容展示框使用同一字段背景。 */
html[data-theme] body :is(.admin-content,.modal-bg,body>div.fixed.inset-0) pre{
  background:var(--admin-field-bg)!important;
  border-color:var(--admin-field-border)!important;
  color:var(--admin-text-soft)!important;
}

/* 配置分组只负责组织内容，不再用彩色或字段色铺满整块区域。 */
.admin-config-section{
  background:transparent!important;
  border-color:var(--admin-border)!important;
  box-shadow:none!important;
}
.admin-config-section-title{
  color:var(--admin-text)!important;
}

/* 折叠行与摘要行属于页面结构，不属于输入字段，不铺灰色背景。 */
.dimension-summary-row,
.dimension-weight-section,
.dimension-weight-option{
  background:var(--admin-surface)!important;
  border-color:var(--admin-border)!important;
  box-shadow:none!important;
}
.dimension-weight-section+.dimension-weight-section{
  margin-top:10px;
}
/* Prompt 配置元信息使用一条信息行，不再堆叠彩色标签。 */
.prompt-config-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  margin-top:8px;
}
.prompt-config-meta-item{
  display:inline-flex;
  min-height:22px;
  align-items:center;
  gap:5px;
  padding:0 10px;
  border-right:1px solid var(--admin-border);
  background:transparent!important;
  color:var(--admin-text-soft);
  font-size:11px;
  line-height:1.4;
  white-space:nowrap;
}
.prompt-config-meta-item:first-child{padding-left:0}
.prompt-config-meta-item:last-child{border-right:0}
.prompt-config-meta-item>i{
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:50%;
  background:var(--admin-muted);
}
.prompt-config-meta-item strong{
  color:var(--admin-text);
  font-weight:700;
}
.prompt-config-meta-item.is-version>i,
.prompt-config-meta-item.is-active>i{background:#22c55e}
.prompt-config-meta-item.is-version strong{color:var(--admin-text)}
.prompt-config-meta-item.is-active{color:var(--admin-text-soft)}
.prompt-config-meta-item.is-draft>i{background:#f59e0b}
.prompt-config-meta-item.is-draft{color:var(--admin-text-soft)}
.prompt-config-meta-item.is-muted{color:var(--admin-muted)}
.prompt-config-meta-item.is-storage{
  color:var(--admin-muted);
}
.prompt-config-meta-item.is-storage code{
  padding:0;
  border:0;
  background:transparent!important;
  color:var(--admin-text-soft)!important;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:10px;
}
.prompt-config-meta-item.is-dirty{color:var(--admin-text-soft)}
.prompt-config-meta-item.is-dirty>i{background:var(--admin-danger)}

/* ===== 对话记录：三栏阅读工作台 ===== */
.chat-page{
  display:flex;
  min-height:0;
  flex-direction:column;
}
.chat-page-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:16px;
}
.chat-page-header h2{
  margin:0!important;
  color:var(--admin-text)!important;
  font-size:24px!important;
  line-height:1.25!important;
}
.chat-page-header p{
  margin:5px 0 0;
  color:var(--admin-muted);
  font-size:12px;
}
.chat-search{
  position:relative;
  display:block;
  width:min(420px,42vw);
}
.chat-search>span{
  position:absolute;
  z-index:1;
  left:13px;
  top:50%;
  color:var(--admin-muted);
  font-size:17px;
  line-height:1;
  transform:translateY(-52%);
  pointer-events:none;
}
.chat-search>input{
  width:100%;
  height:40px;
  padding:0 14px 0 38px!important;
  border-radius:10px!important;
  font-size:13px!important;
}
.chat-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.chat-page-header.has-user-facts{align-items:center}
.chat-user-facts{
  display:grid;
  min-width:0;
  width:min(100%,944px);
  grid-template-columns:repeat(4,minmax(112px,1fr));
  gap:1px;
  overflow:hidden;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:var(--admin-border);
}
.chat-user-fact{
  display:flex;
  min-width:0;
  min-height:42px;
  padding:7px 10px;
  flex-direction:column;
  justify-content:center;
  background:var(--admin-surface);
}
.chat-user-fact small{color:var(--admin-muted);font-size:10px;line-height:1.2}
.chat-user-fact strong{
  overflow:hidden;
  margin-top:3px;
  color:var(--admin-text);
  font-size:12px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-user-facts-loading{
  display:flex;
  min-height:84px;
  grid-column:1/-1;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:var(--admin-surface);
  color:var(--admin-muted);
  font-size:12px;
}

.chat-workspace{
  display:grid;
  grid-template-columns:260px 280px minmax(520px,1fr);
  min-height:560px;
  height:calc(100vh - 172px);
  overflow-x:auto;
  gap:12px;
}
.chat-workspace.is-single-user{grid-template-columns:300px minmax(560px,1fr)}
.chat-workspace.is-single-user .chat-user-pane{display:none}
.chat-workspace.is-single-character{grid-template-columns:300px minmax(560px,1fr)}
.chat-workspace.is-single-character .chat-conversation-pane{display:none}
.chat-pane{
  display:flex;
  min-width:0;
  min-height:0;
  overflow:hidden;
  flex-direction:column;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:var(--admin-surface);
  box-shadow:none;
}
.chat-pane-heading{
  display:flex;
  min-height:68px;
  padding:13px 14px 11px;
  flex:0 0 auto;
  flex-direction:column;
  justify-content:center;
  border-bottom:1px solid var(--admin-border);
  background:var(--admin-surface);
}
.chat-pane-heading>div{
  display:flex;
  align-items:center;
  gap:7px;
}
.chat-pane-heading strong{
  color:var(--admin-text);
  font-size:14px;
  font-weight:750;
}
.chat-pane-heading>div>span{
  display:inline-flex;
  min-width:20px;
  height:20px;
  align-items:center;
  justify-content:center;
  padding:0 6px;
  border:1px solid var(--admin-border);
  border-radius:999px;
  color:var(--admin-muted);
  font-size:10px;
  font-weight:700;
}
.chat-pane-heading small{
  display:block;
  overflow:hidden;
  margin-top:3px;
  color:var(--admin-muted);
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-list{
  min-height:0;
  overflow-y:auto;
  flex:1 1 auto;
  background:var(--admin-surface);
}
.chat-load-more{display:flex;justify-content:center;padding:12px;border-top:1px solid var(--admin-border);background:var(--admin-surface)}
.chat-list-pagination{flex:0 0 auto;background:var(--admin-surface)}
.chat-list-pagination .admin-pagination{margin:0;border-width:1px 0 0;border-radius:0;padding:8px;align-items:stretch;flex-direction:column;gap:8px}
.chat-list-pagination .admin-pagination-summary{justify-content:space-between;gap:8px!important}
.chat-list-pagination .admin-pagination-size>span{display:none}
.chat-list-pagination .admin-pagination-size select{min-width:78px}
.chat-list-pagination .admin-pagination-actions{justify-content:space-between}
.chat-list-pagination .admin-pagination-actions button:first-child,
.chat-list-pagination .admin-pagination-actions button:last-child{display:none}
.chat-list-pagination .admin-pagination-actions span{font-size:11px}
.chat-list-row{
  position:relative;
  display:flex;
  width:100%;
  min-height:68px!important;
  align-items:center;
  gap:11px;
  padding:11px 13px!important;
  border:0!important;
  border-bottom:1px solid var(--admin-border)!important;
  border-radius:0!important;
  background:var(--admin-surface)!important;
  color:var(--admin-text)!important;
  box-shadow:none!important;
  text-align:left;
  transform:none!important;
}
.chat-list-row:hover{
  background:var(--admin-surface-soft)!important;
  transform:none!important;
}
.chat-list-row.is-selected{
  background:var(--admin-field-bg)!important;
}
.chat-list-row.is-selected::before{
  position:absolute;
  inset:9px auto 9px 0;
  width:3px;
  border-radius:0 4px 4px 0;
  background:var(--admin-primary);
  content:"";
}
.chat-list-row.is-selected .chat-list-copy>strong{
  color:var(--admin-primary);
}
.chat-user-avatar{
  display:flex;
  width:36px;
  height:36px;
  flex:0 0 36px;
  align-items:center;
  justify-content:center;
  border:1px solid color-mix(in srgb,var(--admin-primary) 25%,var(--admin-border));
  border-radius:50%;
  background:var(--admin-primary-soft);
  color:var(--admin-primary);
  font-size:12px;
  font-weight:800;
}
.chat-list-copy{
  display:block;
  min-width:0;
  flex:1 1 auto;
}
.chat-list-copy>strong{
  display:block;
  overflow:hidden;
  color:var(--admin-text);
  font-size:13px;
  font-weight:700;
  line-height:1.4;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-user-row .chat-list-copy>small{
  display:block;
  overflow:hidden;
  margin-top:2px;
  color:var(--admin-muted);
  font-size:10px;
  line-height:1.35;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-user-row .chat-list-copy>span{
  display:block;
  margin-top:3px;
  color:var(--admin-text-soft);
  font-size:11px;
  line-height:1.35;
}
.chat-user-row .chat-list-copy>.chat-user-meta{
  display:flex;
  min-width:0;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.chat-user-meta b{font-weight:600;white-space:nowrap}
.chat-user-meta time{overflow:hidden;color:var(--admin-muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.chat-conversation-row{
  min-height:82px!important;
}
.chat-character-avatar{
  position:relative;
  display:flex;
  width:40px;
  height:40px;
  flex:0 0 40px;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border:1px solid var(--admin-border);
  border-radius:10px;
  background:var(--admin-field-bg);
  color:var(--admin-text-soft);
  font-size:12px;
  font-weight:800;
}
.chat-character-avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.chat-character-avatar.is-header{width:38px;height:38px;flex-basis:38px}
.chat-character-id{
  display:block;
  overflow:hidden;
  margin-top:2px;
  color:var(--admin-muted);
  font-size:9px;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-conversation-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:7px;
  color:var(--admin-muted);
  font-size:10px;
  line-height:1.3;
}
.chat-conversation-meta time{white-space:nowrap}
.chat-row-arrow{
  flex:0 0 auto;
  color:var(--admin-muted);
  font-size:20px;
  font-weight:400;
}
.chat-list-row.is-selected .chat-row-arrow{color:var(--admin-primary)}

.chat-message-pane{
  min-width:520px;
}
.chat-messages-header{
  display:flex;
  min-height:68px;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:10px 18px;
  flex:0 0 auto;
  border-bottom:1px solid var(--admin-border);
  background:var(--admin-surface);
}
.chat-conversation-title{
  display:flex;
  min-width:0;
  align-items:center;
  gap:10px;
}
.chat-header-status{
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 4px color-mix(in srgb,#22c55e 12%,transparent);
}
.chat-conversation-title.is-empty .chat-header-status{
  background:var(--admin-muted);
  box-shadow:none;
}

/* Conversation context diagnostics: restrained, operations-first visual language. */
.chat-context-button{gap:6px}
.chat-trace-button{border:0;background:transparent;color:var(--admin-primary,#2563eb);font-size:11px;cursor:pointer;padding:2px 4px;border-radius:5px}
.chat-trace-button:hover{background:color-mix(in srgb,var(--admin-primary,#2563eb) 9%,transparent)}
.chat-context-modal{width:min(980px,96vw);max-height:88vh;overflow:auto;background:var(--admin-surface,#fff);border:1px solid var(--admin-border,#e2e8f0);border-radius:18px;box-shadow:0 30px 80px rgba(15,23,42,.26)}
.chat-context-modal-header{display:flex;justify-content:space-between;gap:24px;padding:24px 26px 18px;border-bottom:1px solid var(--admin-border,#e2e8f0)}
.chat-context-modal-header h3{font-size:20px;margin:3px 0 4px;color:var(--admin-text,#0f172a)}
.chat-context-modal-header p{margin:0;color:var(--admin-muted,#64748b);font-size:12px}
.chat-context-kicker{font-size:10px;letter-spacing:.16em;font-weight:800;color:#2563eb}
.chat-context-close{font-size:24px;line-height:1;align-self:flex-start}
.chat-context-health{margin:18px 26px 0;padding:12px 14px;border:1px solid var(--admin-border,#e2e8f0);border-radius:12px;display:flex;align-items:center;gap:10px;font-size:12px;color:var(--admin-muted,#64748b)}
.chat-context-health strong{color:var(--admin-text,#0f172a)}
.chat-context-health .admin-button{margin-left:auto}
.chat-context-health-dot{width:9px;height:9px;border-radius:99px;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.13)}
.chat-context-health.is-healthy .chat-context-health-dot{background:#16a34a;box-shadow:0 0 0 4px rgba(22,163,74,.12)}
.chat-context-health.is-working .chat-context-health-dot{background:#d97706;box-shadow:0 0 0 4px rgba(217,119,6,.12)}
.chat-context-health.is-danger .chat-context-health-dot{background:#dc2626;box-shadow:0 0 0 4px rgba(220,38,38,.12)}
.chat-context-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(300px,.88fr);gap:14px;padding:14px 26px 22px}
.chat-context-panel{min-width:0;border:1px solid var(--admin-border,#e2e8f0);border-radius:14px;padding:16px;background:color-mix(in srgb,var(--admin-surface,#fff) 94%,#64748b 6%)}
.chat-context-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.chat-context-panel-title h4{margin:0;font-size:14px;color:var(--admin-text,#0f172a)}
.chat-context-panel-title span{font-size:11px;color:var(--admin-muted,#64748b)}
.chat-context-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;max-height:320px;overflow:auto;font:12px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--admin-text-soft,#334155)}
.chat-memory-list{display:grid;gap:9px;max-height:360px;overflow:auto}
.chat-memory-item{border-left:3px solid #2563eb;padding:9px 11px;background:var(--admin-surface,#fff);border-radius:5px 10px 10px 5px}
.chat-memory-item p{margin:5px 0 4px;font-size:12px;line-height:1.55;color:var(--admin-text,#0f172a)}
.chat-memory-item small,.chat-memory-type{font-size:10px;color:var(--admin-muted,#64748b)}
.chat-memory-type{text-transform:uppercase;letter-spacing:.08em;font-weight:700}
.chat-context-error{display:grid;gap:4px;margin-top:12px;padding:10px;border-radius:9px;background:rgba(220,38,38,.08);color:#b91c1c;font-size:11px}
.chat-context-empty,.chat-context-loading{display:flex;min-height:180px;align-items:center;justify-content:center;gap:10px;color:var(--admin-muted,#64748b);font-size:12px;text-align:center;padding:24px}
.chat-context-loading.is-error{flex-direction:column;color:#b91c1c}
.chat-context-footer{display:flex;justify-content:space-between;gap:10px;padding:12px 26px 16px;border-top:1px solid var(--admin-border,#e2e8f0);color:var(--admin-muted,#64748b);font-size:10px}
@media(max-width:820px){.chat-context-grid{grid-template-columns:1fr}.chat-context-health{align-items:flex-start;flex-wrap:wrap}.chat-context-health .admin-button{margin-left:0}.chat-context-footer{flex-direction:column}}
.chat-conversation-title>div{min-width:0}
.chat-conversation-title strong{
  display:block;
  overflow:hidden;
  color:var(--admin-text);
  font-size:14px;
  font-weight:750;
  line-height:1.4;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-conversation-title small{
  display:block;
  overflow:hidden;
  margin-top:2px;
  color:var(--admin-muted);
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.chat-conversation-summary{
  display:flex;
  flex:0 0 auto;
  align-items:center;
  gap:14px;
  color:var(--admin-muted);
  font-size:10px;
}
.chat-conversation-summary strong{
  color:var(--admin-text-soft);
  font-size:11px;
}

/* Character heat uses explicit totals; each row is also a navigation target. */
.stats-character-heading h3{margin:0;color:var(--admin-text);font-size:14px;font-weight:750}
.stats-character-heading p{margin:4px 0 12px;color:var(--admin-muted);font-size:10px;line-height:1.45}
.stats-character-row{
  display:grid;
  width:100%;
  min-height:64px;
  grid-template-columns:26px 40px minmax(120px,1fr) 66px 72px 14px;
  align-items:center;
  gap:9px;
  padding:8px 7px;
  border:0;
  border-bottom:1px solid var(--admin-border);
  background:transparent;
  color:var(--admin-text);
  text-align:left;
  cursor:pointer;
}
.stats-character-row:last-child{border-bottom:0}
.stats-character-row:hover{background:var(--admin-surface-soft)}
.stats-character-rank{color:var(--admin-muted);font-size:10px;font-weight:750;text-align:center}
.stats-character-avatar{position:relative;display:flex;width:38px;height:38px;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--admin-border);border-radius:10px;background:var(--admin-field-bg);color:var(--admin-text-soft);font-size:11px;font-weight:800}
.stats-character-avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.stats-character-copy{display:block;min-width:0}
.stats-character-copy strong,.stats-character-copy small,.stats-character-copy em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stats-character-copy strong{color:var(--admin-text);font-size:12px;font-style:normal}
.stats-character-copy small{margin-top:1px;color:var(--admin-muted);font-size:9px}
.stats-character-copy em{margin-top:3px;color:var(--admin-text-soft);font-size:9px;font-style:normal}
.stats-character-total{text-align:right}
.stats-character-total strong{display:block;color:var(--admin-text);font-size:13px}
.stats-character-total small{display:block;margin-top:2px;color:var(--admin-muted);font-size:8px;white-space:nowrap}
.stats-character-arrow{color:var(--admin-muted);font-size:18px}

/* Growth analytics */
.stats-view-tabs{display:flex;align-items:center;gap:4px;margin-bottom:16px;border-bottom:1px solid var(--admin-border)}
.stats-view-tabs .admin-button{margin-bottom:-1px;border:0;border-bottom:2px solid transparent;border-radius:8px 8px 0 0;background:transparent;color:var(--admin-muted);padding:9px 14px;font-size:12px}
.stats-view-tabs .admin-button:hover{color:var(--admin-text);background:var(--admin-surface-soft)}
.stats-view-tabs .admin-button.active{border-bottom-color:#6366f1;color:var(--admin-text);font-weight:750}
.growth-page{max-width:1680px;margin:0 auto}
.growth-filters,.growth-custom-dates{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.growth-custom-dates input{border:1px solid var(--admin-border);border-radius:8px;background:var(--admin-field-bg);color:var(--admin-text);padding:7px 9px;font-size:12px}
.growth-custom-dates span{color:var(--admin-muted);font-size:12px}
.growth-section{padding:18px;margin-bottom:16px}
.growth-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.growth-section-heading h3{margin:0;color:var(--admin-text);font-size:17px;font-weight:800}
.growth-section-heading p{margin:4px 0 0;color:var(--admin-muted);font-size:11px;line-height:1.55}
.growth-two-column{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:18px;align-items:stretch}
.growth-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:18px}
.growth-kpi{display:flex;min-height:90px;flex-direction:column;justify-content:center;border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-surface-soft);padding:13px}
.growth-kpi span{color:var(--admin-muted);font-size:11px}
.growth-kpi strong{margin-top:4px;color:var(--admin-text);font-size:22px;line-height:1.15}
.growth-kpi small{margin-top:5px;color:var(--admin-text-soft);font-size:10px}
.growth-funnel{display:flex;height:100%;min-height:210px;flex-direction:column;justify-content:center;gap:10px}
.growth-funnel-row{display:grid;grid-template-columns:112px minmax(80px,1fr) 142px;gap:10px;align-items:center}
.growth-funnel-copy strong,.growth-funnel-copy small,.growth-funnel-value strong,.growth-funnel-value small{display:block}
.growth-funnel-copy strong,.growth-funnel-value strong{color:var(--admin-text);font-size:12px}
.growth-funnel-copy small,.growth-funnel-value small{margin-top:2px;color:var(--admin-muted);font-size:9px}
.growth-funnel-value{text-align:right}
.growth-funnel-track{height:19px;overflow:hidden;border-radius:6px;background:var(--admin-field-bg)}
.growth-funnel-track span{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,#6366f1,#d946ef);min-width:4px}
.growth-chart{min-height:230px;border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-surface-soft);padding:10px 10px 2px}
.growth-chart svg{display:block;width:100%;height:auto;overflow:visible}
.growth-chart-grid{stroke:var(--admin-border);stroke-width:1;stroke-dasharray:3 4}
.growth-chart-label{fill:var(--admin-muted);font-size:9px}
.growth-chart-line,.growth-chart-dot{pointer-events:none}
.growth-chart-hitarea{fill:transparent;pointer-events:all;cursor:crosshair;outline:none}
.growth-chart-tooltip{pointer-events:none;opacity:0;transition:opacity .12s ease}
.growth-chart-hover:hover .growth-chart-tooltip,.growth-chart-hover:focus .growth-chart-tooltip,.growth-chart-hover:focus-visible .growth-chart-tooltip{opacity:1}
.growth-chart-hover:focus{outline:none}
.growth-chart-guide{stroke:var(--admin-text-soft);stroke-width:1;stroke-dasharray:3 3;opacity:.55}
.growth-chart-focus-dot{stroke:var(--admin-surface);stroke-width:2}
.growth-chart-tooltip-bg{fill:var(--admin-surface);stroke:var(--admin-border);stroke-width:1;filter:drop-shadow(0 4px 8px rgba(15,23,42,.16))}
.growth-chart-tooltip-date{fill:var(--admin-text);font-size:9px;font-weight:750}
.growth-chart-tooltip-text{fill:var(--admin-text-soft);font-size:8.5px}
.growth-chart-tooltip-value{fill:var(--admin-text);font-size:8.5px;font-weight:750}
.growth-chart-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:0 4px 4px}
.growth-chart-legend span{display:flex;align-items:center;gap:5px;color:var(--admin-text-soft);font-size:9px}
.growth-chart-legend i{width:8px;height:8px;border-radius:50%}
.growth-empty{display:flex;min-height:150px;flex-direction:column;align-items:center;justify-content:center;color:var(--admin-muted);text-align:center}
.growth-empty span{font-size:24px}.growth-empty p{margin:5px 0 0;font-size:11px}
.growth-payment-top{margin-bottom:18px}
.growth-revenue-note{display:flex;min-height:180px;flex-direction:column;justify-content:center;border:1px solid var(--admin-border);border-radius:12px;background:var(--admin-surface-soft);padding:18px}
.growth-revenue-note strong{color:var(--admin-text);font-size:14px}.growth-revenue-note p{margin:7px 0 0;color:var(--admin-text-soft);font-size:11px;line-height:1.6}.growth-revenue-note .is-warning{color:#f97316}
.growth-breakdown-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.growth-breakdown{min-width:0;border:1px solid var(--admin-border);border-radius:12px;overflow:hidden}
.growth-breakdown h4{margin:0;padding:12px 14px;border-bottom:1px solid var(--admin-border);background:var(--admin-surface-soft);color:var(--admin-text);font-size:12px}
.growth-table-wrap{overflow-x:auto;overflow-y:hidden}.growth-breakdown table{width:100%;border-collapse:collapse;font-size:10px}.growth-breakdown th,.growth-breakdown td{padding:9px 10px;border-bottom:1px solid var(--admin-border);color:var(--admin-text-soft);text-align:right;white-space:nowrap}.growth-breakdown th:first-child,.growth-breakdown td:first-child{text-align:left}.growth-breakdown th{position:sticky;top:0;background:var(--admin-surface);color:var(--admin-muted);font-weight:650}.growth-breakdown td small{display:block;margin-top:2px;color:#f97316;font-size:8px}
@media (max-width:1199px){.growth-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.growth-breakdown-grid{grid-template-columns:1fr}.growth-two-column{grid-template-columns:1fr}}
@media (max-width:639px){.growth-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.growth-funnel-row{grid-template-columns:92px minmax(48px,1fr) 116px}.growth-section{padding:13px}.growth-chart{overflow-x:auto}.growth-chart svg{min-width:620px}}

/* Operations analytics information architecture. */
.ops-stats-shell{
  display:grid;
  width:100%;
  min-width:0;
  max-width:1680px;
  margin:0 auto;
  gap:16px;
  color:var(--admin-text);
}
.ops-stats-header{
  display:flex;
  min-width:0;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
}
.ops-stats-header>div{min-width:0}
.ops-stats-heading{min-width:0}
.ops-stats-eyebrow{margin:0 0 3px!important;color:var(--admin-primary);font-size:9px!important;font-weight:800;letter-spacing:.12em;line-height:1.4;text-transform:uppercase}
.ops-stats-title{margin:0!important;color:var(--admin-text);text-wrap:balance}
.ops-stats-subtitle{max-width:76ch;margin:5px 0 0;color:var(--admin-muted);font-size:12px;line-height:1.6;text-wrap:pretty}
.ops-view-tabs{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:3px;
  min-width:0;
  padding:4px;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:color-mix(in srgb,var(--admin-surface-soft) 76%,var(--admin-surface));
  scrollbar-width:thin;
  scrollbar-color:var(--admin-border-strong) transparent;
  overscroll-behavior-x:contain;
  margin:0;
}
.ops-view-tab{
  position:relative;
  display:flex;
  min-width:0;
  min-height:44px!important;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0!important;
  padding:7px 9px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--admin-muted)!important;
  font-size:11px;
  font-weight:650!important;
  line-height:1.25;
  text-align:center;
  white-space:nowrap;
  cursor:pointer;
  transition:background-color .12s,color .12s,border-color .12s,box-shadow .12s!important;
}
.ops-view-tab:hover:not(:disabled){
  transform:none!important;
  background:var(--admin-surface)!important;
  color:var(--admin-text-soft)!important;
}
.ops-view-tab.active,
.ops-view-tab[aria-selected="true"]{
  border-color:var(--admin-border-strong)!important;
  background:var(--admin-surface)!important;
  color:var(--admin-primary)!important;
  box-shadow:0 1px 2px color-mix(in srgb,var(--admin-text) 7%,transparent);
}
.ops-view-tab:focus-visible{
  z-index:1;
  outline:3px solid var(--admin-primary-focus)!important;
  outline-offset:1px;
}
.ops-view-tab:disabled{color:var(--admin-disabled-text)!important;cursor:not-allowed}
.ops-view-tab-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
.ops-view-tab-meta{
  display:inline-flex;
  min-width:18px;
  min-height:18px;
  align-items:center;
  justify-content:center;
  padding:0 5px;
  border-radius:99px;
  background:var(--admin-surface-soft);
  color:var(--admin-muted);
  font-size:9px;
  font-variant-numeric:tabular-nums;
}
.ops-view-tab.active .ops-view-tab-meta,
.ops-view-tab[aria-selected="true"] .ops-view-tab-meta{background:var(--admin-primary-soft);color:var(--admin-primary)}
.ops-view-panel{display:grid;min-width:0;gap:16px}
.ops-view-panel[hidden]{display:none!important}

.ops-configurator{
  display:flex;
  min-width:0;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:10px 12px;
  padding:12px 14px;
  border-block:1px solid var(--admin-border);
  background:color-mix(in srgb,var(--admin-surface-soft) 58%,transparent);
}
.ops-configurator>label,
.ops-configurator>.form-group,
.ops-range-field{
  display:grid;
  min-width:132px;
  gap:5px;
  margin:0;
  color:var(--admin-muted)!important;
  font-size:10px;
  font-weight:700!important;
}
.ops-range-field{flex:0 1 178px}
.ops-range-configurator{
  flex:0 1 auto;
  padding:9px 10px;
  border:1px solid var(--admin-border);
  border-radius:12px;
}
.ops-configurator :is(input,select,button),
.ops-configurator .admin-button,
.ops-configurator-actions :is(button,.admin-button){min-height:40px!important}
.ops-configurator-actions{
  display:flex;
  min-width:0;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-left:auto;
}
.ops-dashboard-configurator{
  display:block;
  padding:18px;
  border:1px solid var(--admin-border);
  border-radius:var(--admin-radius);
  background:var(--admin-surface);
}
.ops-metric-catalog{
  display:grid;
  min-width:0;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0 16px;
  border-block:1px solid var(--admin-border);
}
.ops-metric-option{
  display:grid;
  min-width:0;
  min-height:76px;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:11px 2px;
  border-bottom:1px solid var(--admin-border);
}
.ops-metric-option-copy{min-width:0}
.ops-metric-option-copy>strong,
.ops-metric-option-copy>span,
.ops-metric-option-copy>small{display:block;overflow-wrap:anywhere}
.ops-metric-option-copy>strong{color:var(--admin-text);font-size:12px;font-weight:700;line-height:1.4}
.ops-metric-option-copy>span{margin-top:3px;color:var(--admin-text-soft);font-size:10px;line-height:1.45}
.ops-metric-option-copy>small{margin-top:4px;color:var(--admin-muted);font-size:9px;line-height:1.4}
.ops-metric-option-state{min-width:68px;min-height:40px!important;padding-inline:10px!important;font-size:10px!important}

.ops-button-favorites{
  display:grid;
  min-width:0;
  align-items:stretch;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--admin-border);
  border-radius:var(--admin-radius);
  background:var(--admin-surface);
}
.ops-button-favorites-header{
  display:flex;
  min-width:0;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.ops-button-favorites-header>div{min-width:0}
.ops-button-favorites-header h3{margin:0;color:var(--admin-text);font-size:14px;font-weight:750;line-height:1.4;text-wrap:balance}
.ops-button-favorites-header p{margin:4px 0 0;color:var(--admin-muted);font-size:10px;line-height:1.55;text-wrap:pretty}
.ops-button-favorite-picker{
  display:flex;
  min-width:min(100%,360px);
  align-items:flex-end;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
.ops-button-favorite-picker>label,
.ops-button-favorite-field{
  display:grid;
  min-width:0;
  flex:1 1 220px;
  gap:5px;
  color:var(--admin-muted)!important;
  font-size:10px;
  font-weight:700!important;
}
.ops-button-favorite-picker select{width:100%;min-width:0}
.ops-button-favorites :is(button,a.admin-button,select){min-height:40px!important}
.ops-button-favorites :is(button,a.admin-button,select):focus-visible{
  outline:3px solid var(--admin-primary-focus)!important;
  outline-offset:2px;
}
.ops-button-favorite-list{
  display:grid;
  min-width:0;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.ops-button-favorite-item{
  display:flex;
  min-width:0;
  min-height:64px;
  align-items:center;
  gap:10px;
  padding:10px 11px;
  border:1px solid var(--admin-border);
  border-radius:10px;
  background:color-mix(in srgb,var(--admin-surface-soft) 72%,transparent);
}
.ops-button-favorite-item>div:first-child,
.ops-button-favorite-copy{min-width:0;flex:1 1 auto}
.ops-button-favorite-item :is(strong,span,small){overflow-wrap:anywhere}
.ops-button-favorite-item strong{display:block;color:var(--admin-text);font-size:12px;font-weight:700;line-height:1.4}
.ops-button-favorite-item span{display:block;margin-top:2px;color:var(--admin-text-soft);font-size:10px;line-height:1.45}
.ops-button-favorite-item small{display:block;margin-top:3px;color:var(--admin-muted);font-size:9px;line-height:1.4}
.ops-button-favorite-item>div:last-child:not(:first-child),
.ops-button-favorite-actions{display:flex;flex:0 0 auto;align-items:center;gap:6px}
.ops-button-favorite-item :is(button,a.admin-button){flex:0 0 auto;min-height:40px!important;padding-inline:10px!important;font-size:10px!important}
.ops-button-favorite-list>.ops-empty-state,
.ops-button-favorites>.ops-empty-state{min-height:104px;grid-column:1/-1;padding:16px}

.ops-kpi-grid{
  display:grid;
  min-width:0;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px 0;
  padding:8px 0;
  border-block:1px solid var(--admin-border);
}
.ops-kpi-card{
  display:flex;
  min-width:0;
  min-height:92px;
  flex-direction:column;
  justify-content:center;
  padding:10px 18px;
  border-left:2px solid var(--admin-border);
  border-radius:0!important;
  background:transparent;
  box-shadow:none!important;
}
.business-kpis.ops-kpi-grid .ops-kpi-card{
  padding:10px 18px;
  border:0;
  border-left:2px solid var(--admin-border);
  border-radius:0!important;
  background:transparent;
  box-shadow:none!important;
}
.business-kpis.ops-kpi-grid .ops-kpi-card:first-child{border-left-color:var(--admin-primary)}
.ops-kpi-card:first-child,
.ops-kpi-card.is-primary{border-left-color:var(--admin-primary)}
.ops-kpi-card.is-success{border-left-color:var(--admin-success)}
.ops-kpi-card.is-warning{border-left-color:var(--admin-warning)}
.ops-kpi-card.is-danger{border-left-color:var(--admin-danger)}
.ops-kpi-label,
.ops-kpi-card>span:first-child{color:var(--admin-muted);font-size:10px;font-weight:650;line-height:1.4}
.ops-kpi-value,
.ops-kpi-card>strong{
  display:block;
  margin-top:5px;
  overflow-wrap:anywhere;
  color:var(--admin-text);
  font-size:clamp(20px,2vw,28px);
  font-weight:760;
  font-variant-numeric:tabular-nums lining-nums;
  letter-spacing:-.035em;
  line-height:1.12;
}
.ops-kpi-meta,
.ops-kpi-card>small{display:block;margin-top:6px;color:var(--admin-text-soft);font-size:10px;line-height:1.45;text-wrap:pretty}
.ops-kpi-label{display:flex;min-width:0;align-items:flex-start;justify-content:space-between;gap:8px}
.ops-kpi-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:10px}
.ops-kpi-label>.ops-kpi-actions{flex:0 0 auto;margin-top:-5px}
.ops-kpi-actions :is(button,.admin-button){min-height:40px!important}
.ops-custom-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}

.ops-section{
  min-width:0;
  padding:18px;
  overflow:hidden;
  border:1px solid var(--admin-border);
  border-radius:var(--admin-radius);
  background:var(--admin-surface);
  box-shadow:0 1px 2px color-mix(in srgb,var(--admin-text) 4%,transparent);
}
.ops-button-favorites.ops-section{padding:14px 16px;overflow:visible}
.business-panel.ops-section{margin:0;padding:18px}
.ops-section-header{
  display:flex;
  min-width:0;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.ops-section-header>div{min-width:0}
.ops-button-favorites-header.ops-section-header{margin-bottom:0}
.ops-section-body{min-width:0}
.ops-section-title,
.ops-section h3.ops-section-title{margin:0;color:var(--admin-text);font-size:15px;font-weight:750;line-height:1.35;text-wrap:balance}
.ops-section-header p{margin:4px 0 0;color:var(--admin-muted);font-size:10px;line-height:1.55;text-wrap:pretty}
.ops-section-actions{display:flex;flex:0 0 auto;align-items:center;flex-wrap:wrap;gap:8px}
.ops-section-actions :is(button,.admin-button),
.ops-empty-state :is(button,.admin-button){min-height:40px!important}
.ops-panel-intro{
  display:flex;
  min-width:0;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding-bottom:12px;
  border-bottom:1px solid var(--admin-border);
}
.ops-panel-intro>div{min-width:0}
.ops-panel-intro h3{margin:0;color:var(--admin-text);font-size:15px;font-weight:750;text-wrap:balance}
.ops-panel-intro p{max-width:76ch;margin:4px 0 0;color:var(--admin-muted);font-size:10px;line-height:1.55;text-wrap:pretty}

.ops-empty-state{
  display:flex;
  min-height:156px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:24px;
  border:1px dashed var(--admin-border-strong);
  border-radius:11px;
  background:color-mix(in srgb,var(--admin-surface-soft) 68%,transparent);
  color:var(--admin-muted);
  text-align:center;
}
.ops-empty-state>strong{color:var(--admin-text-soft);font-size:13px;font-weight:700;text-wrap:balance}
.ops-empty-state>span{color:inherit;font-size:11px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.ops-empty-state>p{max-width:58ch;margin:0;color:var(--admin-muted);font-size:11px;line-height:1.55;text-wrap:pretty}
.ops-empty-state-error,
.ops-empty-state.is-error{
  border-color:color-mix(in srgb,var(--admin-danger) 38%,var(--admin-border));
  background:color-mix(in srgb,var(--admin-danger-soft) 48%,transparent);
  color:var(--admin-danger);
}
.ops-empty-state-error>strong,
.ops-empty-state.is-error>strong{color:var(--admin-danger)}
.ops-kpi-value>.ops-empty-state{
  min-height:0;
  align-items:flex-start;
  padding:10px;
  color:var(--admin-danger);
  font-size:11px;
  font-weight:600;
  letter-spacing:normal;
  line-height:1.5;
  text-align:left;
}
.ops-kpi-value>.ops-empty-state .admin-button{align-self:stretch;margin-top:3px}
.ops-quality-alerts{display:grid;min-width:0;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.ops-quality-alerts>.ops-empty-state{min-height:112px;align-items:flex-start;text-align:left}
.ops-inline-error{
  display:flex;
  min-width:0;
  align-items:flex-start;
  gap:8px;
  padding:10px 12px;
  border-left:3px solid var(--admin-danger);
  border-radius:0 8px 8px 0;
  background:var(--admin-danger-soft);
  color:var(--admin-danger);
  font-size:11px;
  line-height:1.55;
  overflow-wrap:anywhere;
}
.ops-data-note{
  display:grid;
  min-width:0;
  grid-template-columns:auto minmax(0,1fr);
  align-items:start;
  gap:7px;
  margin:0;
  padding:9px 11px;
  border-left:3px solid var(--admin-border-strong);
  border-radius:0 8px 8px 0;
  background:color-mix(in srgb,var(--admin-surface-soft) 60%,transparent);
  color:var(--admin-muted);
  font-size:10px;
  line-height:1.55;
  text-wrap:pretty;
}
.ops-data-note::before{content:"口径";color:var(--admin-text-soft);font-size:9px;font-weight:800;letter-spacing:.06em}
.ops-data-note strong{color:var(--admin-text-soft);font-weight:700}
.ops-data-note.is-warning{border-left-color:var(--admin-warning)}
.ops-data-note.is-error{border-left-color:var(--admin-danger);color:var(--admin-danger)}
.ops-custom-dashboard-note{margin-top:10px}
.ops-stats-shell :is(button,a.admin-button),
.ops-stats-shell button.admin-button{min-height:40px!important}
.ops-stats-shell button.ops-view-tab{min-height:44px!important}

@media(max-width:1199px){
  .ops-view-tabs{
    display:flex;
    scroll-snap-type:x proximity;
  }
  .ops-view-tab{min-width:132px;flex:1 0 132px;scroll-snap-align:start}
  .ops-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ops-metric-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ops-button-favorite-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .ops-stats-shell,.ops-view-panel{gap:12px}
  .ops-stats-header,.ops-panel-intro{align-items:stretch;flex-direction:column}
  .ops-stats-header>.ops-range-configurator{width:100%}
  .ops-view-tabs{margin-inline:-4px;border-radius:10px}
  .ops-view-tab{min-width:122px;flex-basis:122px}
  .ops-configurator{align-items:stretch;padding:10px}
  .ops-configurator>label,.ops-configurator>.form-group,.ops-range-field{flex:1 1 148px}
  .ops-configurator-actions{width:100%;margin-left:0}
  .ops-configurator-actions :is(button,.admin-button){flex:1 1 auto}
  .ops-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:0}
  .ops-kpi-card{min-height:84px;padding:10px 12px}
  .ops-section{padding:13px;border-radius:12px}
  .ops-section-header{align-items:stretch;flex-direction:column;margin-bottom:12px}
  .ops-section-actions{width:100%}
  .ops-section-actions :is(button,.admin-button){flex:1 1 auto}
  .ops-dashboard-configurator{padding:13px}
  .ops-metric-catalog{grid-template-columns:1fr}
  .ops-button-favorites.ops-section{padding:12px}
  .ops-button-favorites-header{align-items:stretch;flex-direction:column}
  .ops-button-favorite-picker{width:100%;min-width:0;justify-content:flex-start}
  .ops-button-favorite-list{grid-template-columns:1fr}
  .ops-custom-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ops-empty-state{min-height:136px;padding:20px 14px}
}
@media(max-width:420px){
  .ops-configurator>label,.ops-configurator>.form-group{flex-basis:100%}
  .ops-kpi-value,.ops-kpi-card>strong{font-size:20px}
  .ops-button-favorite-picker{align-items:stretch;flex-direction:column}
  .ops-button-favorite-picker>*{width:100%}
  .ops-button-favorite-item{align-items:stretch;flex-direction:column}
  .ops-button-favorite-item>div:last-child:not(:first-child),.ops-button-favorite-actions{width:100%}
  .ops-button-favorite-item :is(button,a.admin-button){flex:1 1 auto}
}
@media(prefers-reduced-motion:reduce){
  .ops-view-tabs{scroll-behavior:auto}
  .ops-view-tab,
  .ops-stats-shell button{transition:none!important}
  .ops-view-tab:hover:not(:disabled),
  .ops-stats-shell button:hover:not(:disabled),
  .ops-stats-shell button:active:not(:disabled){transform:none!important}
}

/* Operations analytics: align the production screen with the approved local prototype. */
.ops-stats-shell{
  max-width:1440px;
  gap:14px;
}
.ops-stats-header{
  display:block;
  padding:2px 2px 0;
}
.ops-stats-heading{max-width:820px}
.ops-stats-title{
  font-size:26px!important;
  font-weight:780!important;
  letter-spacing:-.035em;
  line-height:1.12;
}
.ops-stats-subtitle{margin-top:6px;font-size:13px;line-height:1.55}
.ops-scope-note{width:fit-content;max-width:100%;margin-top:7px;font-size:10px}
.ops-view-tab{gap:7px;font-size:12px}
.ops-view-tab-icon{width:16px;height:16px;flex:0 0 16px}
.ops-view-tab.active::after,
.ops-view-tab[aria-selected="true"]::after{
  position:absolute;
  right:22%;
  bottom:-5px;
  left:22%;
  height:2px;
  border-radius:2px;
  background:var(--admin-primary);
  content:"";
}
.ops-range-toolbar{
  display:flex;
  min-width:0;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 12px;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:var(--admin-surface);
  box-shadow:0 1px 2px color-mix(in srgb,var(--admin-text) 4%,transparent);
}
.ops-range-summary{display:grid;min-width:132px;gap:2px}
.ops-range-summary strong{color:var(--admin-text);font-size:11px;font-weight:750}
.ops-range-summary span{color:var(--admin-muted);font-size:9px}
.ops-range-toolbar>.ops-range-configurator{
  width:auto;
  flex:0 1 auto;
  align-items:center;
  flex-wrap:nowrap;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.ops-range-toolbar .ops-range-field{
  display:flex;
  min-width:0;
  flex:0 1 auto;
  align-items:center;
  gap:7px;
}
.ops-range-toolbar .ops-range-field>span{white-space:nowrap}
.ops-range-toolbar #statsPeriodSelect{min-width:138px}
.ops-range-toolbar .ops-configurator-actions{flex-wrap:nowrap;margin-left:0}

.ops-dashboard-policy{
  display:flex;
  min-width:0;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:11px 14px;
  border-left:3px solid var(--admin-primary);
  border-radius:5px 12px 12px 5px;
  background:var(--admin-primary-soft);
  color:var(--admin-text-soft);
  font-size:11px;
  line-height:1.55;
}
.ops-dashboard-policy strong{color:var(--admin-text)}
.ops-dashboard-policy button{
  flex:0 0 auto;
  min-height:0!important;
  padding:4px 0;
  border:0;
  background:transparent;
  color:var(--admin-primary);
  font-size:11px;
  font-weight:750;
  cursor:pointer;
}
.ops-dashboard-policy button:hover{text-decoration:underline;text-underline-offset:3px}
.ops-dashboard-empty{min-height:340px;padding:0}
.ops-dashboard-empty-inner{
  display:grid;
  min-height:338px;
  place-content:center;
  justify-items:center;
  padding:34px;
  text-align:center;
}
.ops-dashboard-empty-icon{
  display:grid;
  width:50px;
  height:50px;
  place-items:center;
  margin-bottom:13px;
  border:1px solid var(--admin-border);
  border-radius:15px;
  background:var(--admin-primary-soft);
  color:var(--admin-primary);
}
.ops-dashboard-empty-icon svg{width:22px;height:22px}
.ops-dashboard-empty h3,
.ops-dashboard-stage h3{margin:0;color:var(--admin-text);font-size:19px;font-weight:760;letter-spacing:-.025em}
.ops-dashboard-empty-inner>p{max-width:600px;margin:8px auto 18px;color:var(--admin-muted);font-size:11px;line-height:1.7}
.ops-dashboard-custom-scope{
  display:grid;
  width:min(680px,100%);
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  margin-top:24px;
  border:1px solid var(--admin-border);
  border-radius:11px;
  overflow:hidden;
  background:var(--admin-surface-soft);
}
.ops-dashboard-custom-scope>span{display:grid;gap:3px;padding:11px 13px;border-left:1px solid var(--admin-border);text-align:left}
.ops-dashboard-custom-scope>span:first-child{border-left:0}
.ops-dashboard-custom-scope strong{color:var(--admin-text-soft);font-size:10px}
.ops-dashboard-custom-scope small{color:var(--admin-muted);font-size:9px;line-height:1.45}
.ops-dashboard-stage-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}
.ops-dashboard-stage-head p{margin:4px 0 0;color:var(--admin-muted);font-size:10px}
.ops-dashboard-domains .ops-section-header{margin-bottom:12px}
.ops-dashboard-domain-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.ops-dashboard-domain-links>button{
  display:grid;
  min-width:0;
  grid-template-columns:24px minmax(0,1fr);
  align-items:center;
  gap:8px;
  padding:11px;
  border:1px solid var(--admin-border);
  border-radius:10px;
  background:var(--admin-surface-soft);
  color:var(--admin-muted);
  text-align:left;
  cursor:pointer;
  transition:border-color .15s,background-color .15s,color .15s!important;
}
.ops-dashboard-domain-links>button:hover{transform:none!important;border-color:var(--admin-border-strong);background:var(--admin-surface);color:var(--admin-primary)}
.ops-dashboard-domain-links svg{width:17px;height:17px}
.ops-dashboard-domain-links span{display:grid;min-width:0;gap:2px}
.ops-dashboard-domain-links strong{color:var(--admin-text);font-size:10px}
.ops-dashboard-domain-links small{color:var(--admin-muted);font-size:9px}

.ops-dashboard-editor-backdrop{
  position:fixed;
  inset:0;
  z-index:70;
  display:grid;
  place-items:center;
  padding:24px;
  background:color-mix(in srgb,#0f172a 46%,transparent);
  backdrop-filter:blur(5px);
}
.ops-dashboard-editor{
  display:grid;
  width:min(1080px,calc(100vw - 40px));
  max-height:calc(100dvh - 48px);
  overflow:hidden;
  border:1px solid var(--admin-border);
  border-radius:18px;
  background:var(--admin-canvas);
  box-shadow:0 28px 80px color-mix(in srgb,#0f172a 24%,transparent);
}
.ops-dashboard-editor-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:20px 22px 16px;
  border-bottom:1px solid var(--admin-border);
  background:var(--admin-surface);
}
.ops-dashboard-editor-head h3{margin:0;color:var(--admin-text);font-size:20px;font-weight:780;letter-spacing:-.025em}
.ops-dashboard-editor-head p:not(.ops-stats-eyebrow){max-width:700px;margin:5px 0 0;color:var(--admin-muted);font-size:11px;line-height:1.55}
.ops-dashboard-editor-grid{
  display:grid;
  min-height:0;
  grid-template-columns:minmax(0,1.08fr) minmax(320px,.92fr);
  gap:14px;
  padding:14px;
  overflow:auto;
}
.ops-dashboard-editor-grid>section{min-width:0;padding:14px;border:1px solid var(--admin-border);border-radius:13px;background:var(--admin-surface)}
.ops-dashboard-editor-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.ops-dashboard-editor-section-head h4{margin:0;color:var(--admin-text);font-size:13px}
.ops-dashboard-editor-section-head span{color:var(--admin-muted);font-size:9px}
.ops-dashboard-editor .ops-metric-catalog{grid-template-columns:1fr;max-height:480px;overflow:auto;border-top:1px solid var(--admin-border)}
.ops-dashboard-editor .ops-metric-option{min-height:68px;padding:9px 2px}
.ops-dashboard-editor .ops-metric-option-state{border-color:var(--admin-border-strong)!important;background:var(--admin-surface)!important;color:var(--admin-primary)!important;box-shadow:none!important}
.ops-dashboard-selected-list{display:grid;gap:7px}
.ops-dashboard-selected-list>article{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid var(--admin-border);border-radius:10px;background:var(--admin-surface-soft)}
.ops-dashboard-selected-list>article>div:first-child{display:grid;min-width:0;gap:2px}
.ops-dashboard-selected-list strong{color:var(--admin-text);font-size:11px}
.ops-dashboard-selected-list small{color:var(--admin-muted);font-size:9px}
.ops-dashboard-selected-list>article>div:last-child{display:flex;gap:5px}
.ops-dashboard-selected-list .admin-button-icon{min-width:40px}
.ops-dashboard-editor-empty{display:grid;min-height:180px;place-items:center;border:1px dashed var(--admin-border-strong);border-radius:10px;color:var(--admin-muted);font-size:10px}
.ops-dashboard-editor-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:13px 22px;border-top:1px solid var(--admin-border);background:var(--admin-surface)}
.ops-dashboard-editor-footer>span{margin-right:auto;color:var(--admin-muted);font-size:10px}

@media(max-width:900px){
  .ops-dashboard-domain-links{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ops-dashboard-editor-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .ops-stats-title{font-size:24px!important}
  .ops-range-toolbar{align-items:stretch;flex-direction:column;gap:10px}
  .ops-range-toolbar>.ops-range-configurator{width:100%;align-items:stretch;flex-wrap:wrap}
  .ops-range-toolbar .ops-range-field{flex:1 1 148px;align-items:stretch;flex-direction:column}
  .ops-range-toolbar .ops-configurator-actions{width:100%;align-items:stretch;flex-wrap:wrap}
  .ops-dashboard-policy{align-items:flex-start;flex-direction:column;gap:6px}
  .ops-dashboard-empty-inner{min-height:320px;padding:26px 18px}
  .ops-dashboard-custom-scope{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ops-dashboard-custom-scope>span:nth-child(3){border-left:0;border-top:1px solid var(--admin-border)}
  .ops-dashboard-custom-scope>span:nth-child(4){border-top:1px solid var(--admin-border)}
  .ops-dashboard-stage-head{align-items:stretch;flex-direction:column}
  .ops-dashboard-editor-backdrop{padding:10px}
  .ops-dashboard-editor{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);border-radius:14px}
  .ops-dashboard-editor-head{padding:16px}
  .ops-dashboard-editor-grid{padding:10px}
  .ops-dashboard-editor-footer{align-items:stretch;flex-wrap:wrap;padding:12px 16px}
  .ops-dashboard-editor-footer>span{width:100%;margin:0 0 4px}
  .ops-dashboard-editor-footer .admin-button{flex:1 1 auto}
}
@media(max-width:430px){
  .ops-dashboard-domain-links{grid-template-columns:1fr}
}
.chat-messages-scroll{
  min-height:0;
  overflow-y:auto;
  flex:1 1 auto;
  background:var(--admin-surface);
}
.chat-message-stream{
  width:min(100%,880px);
  min-height:100%;
  margin:0 auto;
  padding:24px 28px 60px;
}
.chat-message-row{
  display:flex;
  width:100%;
  margin-bottom:18px;
}
.chat-message-row.is-user{justify-content:flex-end}
.chat-message-row.is-ai{justify-content:flex-start}
.chat-message-stack{
  width:fit-content;
  min-width:128px;
  max-width:min(72%,620px);
}
.chat-message-meta{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0 2px 5px;
  color:var(--admin-muted);
  font-size:10px;
  line-height:1.3;
}
.chat-message-row.is-user .chat-message-meta{justify-content:flex-end}
.chat-message-meta strong{
  color:var(--admin-text-soft);
  font-size:10px;
  font-weight:700;
}
.chat-source-badge,.chat-source-job{
  display:inline-flex;
  align-items:center;
  min-height:18px;
  padding:1px 6px;
  border:1px solid var(--admin-border,#e2e8f0);
  border-radius:999px;
  background:var(--admin-surface,#fff);
  color:var(--admin-muted,#64748b);
  font-size:9px;
  font-weight:700;
  white-space:nowrap;
}
.chat-source-badge.is-proactive{
  border-color:rgba(217,119,6,.28);
  background:rgba(245,158,11,.10);
  color:#b45309;
}
.chat-source-badge.is-opening{
  border-color:rgba(124,58,237,.24);
  background:rgba(139,92,246,.09);
  color:#6d28d9;
}
.chat-source-badge.is-reply{
  border-color:rgba(37,99,235,.22);
  background:rgba(37,99,235,.08);
  color:#1d4ed8;
}
.chat-source-job{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:500}
.chat-message-bubble{
  padding:10px 13px;
  border:1px solid var(--admin-field-border);
  border-radius:5px 13px 13px 13px;
  background:var(--admin-field-bg);
  color:var(--admin-text);
  box-shadow:none;
}
.chat-message-row.is-user .chat-message-bubble{
  border-color:var(--admin-primary-fill);
  border-radius:13px 5px 13px 13px;
  background:var(--admin-primary-fill);
  color:#fff;
}
.chat-message-text{
  color:inherit;
  font-size:13px;
  line-height:1.65;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}
.chat-message-transcript-empty{
  color:inherit;
  font-size:11px;
  font-style:italic;
  opacity:.72;
}
.chat-subscription-nudge{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--admin-border);
}
.chat-subscription-nudge small{
  display:block;
  margin-bottom:6px;
  color:var(--admin-muted);
  font-size:11px;
  overflow-wrap:anywhere;
}
.chat-subscription-cta{
  display:inline-block;
  margin-top:6px;
  color:var(--admin-primary);
  font-size:13px;
  font-weight:600;
}
.chat-voice-message{
  min-width:min(270px,60vw);
}
.chat-voice-message+.chat-message-text{margin-top:8px}
.chat-voice-label{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:7px;
  color:inherit;
}
.chat-voice-label>span{
  font-size:14px;
  transform:rotate(20deg);
}
.chat-voice-label strong{
  color:inherit;
  font-size:11px;
  font-weight:700;
}
.chat-voice-label small{
  margin-left:auto;
  color:inherit;
  font-size:10px;
  opacity:.72;
}
.chat-voice-message audio{
  display:block;
  width:100%;
  height:32px;
  max-width:300px;
}
.chat-voice-unavailable{
  display:block;
  color:inherit;
  font-size:10px;
  opacity:.72;
}
.chat-image-message{
  width:min(260px,58vw);
  margin-bottom:8px;
}
.chat-image-message img{
  display:block;
  width:100%;
  max-height:320px;
  border-radius:9px;
  object-fit:cover;
}
.chat-image-message small{
  display:block;
  margin-top:6px;
  color:inherit;
  font-size:10px;
  opacity:.72;
}
.chat-image-unavailable{
  display:flex;
  min-height:110px;
  align-items:center;
  justify-content:center;
  border:1px dashed currentColor;
  border-radius:9px;
  opacity:.66;
}
.chat-state{
  display:flex;
  width:100%;
  min-height:180px;
  align-items:center;
  justify-content:center;
  padding:24px;
  flex-direction:column;
  color:var(--admin-muted);
  text-align:center;
}
.chat-list>.chat-state{min-height:150px}
.chat-state-icon{
  display:flex;
  width:34px;
  height:34px;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
  border:1px solid var(--admin-border);
  border-radius:50%;
  color:var(--admin-muted);
  font-size:12px;
  letter-spacing:1px;
}
.chat-state>strong{
  color:var(--admin-text-soft);
  font-size:12px;
  font-weight:700;
}
.chat-state>small{
  max-width:280px;
  margin-top:4px;
  color:var(--admin-muted);
  font-size:10px;
  line-height:1.55;
}
.chat-state.is-error>strong{color:var(--admin-text)}
.chat-loading-dot{
  width:7px;
  height:7px;
  margin-bottom:10px;
  border-radius:50%;
  background:var(--admin-primary);
  animation:chatPulse 1s ease-in-out infinite alternate;
}
@keyframes chatPulse{
  from{opacity:.3;transform:scale(.8)}
  to{opacity:1;transform:scale(1.15)}
}

html[data-theme="dark"] .chat-message-row.is-user .chat-message-bubble{
  color:#fff;
}

/* Notification management */
.notification-admin-page{display:grid;gap:18px}
.notification-unified-header{
  overflow:hidden;
  border:1px solid var(--admin-border);
  border-radius:12px;
  background:var(--admin-surface);
  box-shadow:var(--admin-shadow-sm);
}
.notification-unified-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:17px 19px 14px;
}
.notification-unified-title>div{min-width:0}
.notification-unified-title h2{margin:0;color:var(--admin-text);font-size:20px}
.notification-unified-title p{max-width:820px;margin:5px 0 0;color:var(--admin-muted);font-size:12px;line-height:1.5}
.notification-view-tabs{
  display:flex;
  min-width:0;
  overflow-x:auto;
  padding:0 10px;
  border-top:1px solid var(--admin-border);
  scrollbar-width:thin;
}
.notification-view-tab.admin-button{
  position:relative;
  min-height:42px;
  flex:0 0 auto;
  padding:0 13px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--admin-text-soft)!important;
  box-shadow:none!important;
  font-size:12px;
}
.notification-view-tab.admin-button::after{
  position:absolute;
  right:12px;
  bottom:0;
  left:12px;
  height:2px;
  border-radius:2px 2px 0 0;
  background:transparent;
  content:'';
}
.notification-view-tab.admin-button:hover{color:var(--admin-text)!important}
.notification-view-tab.admin-button.active{color:var(--admin-primary)!important;-webkit-text-fill-color:var(--admin-primary)!important;font-weight:750}
.notification-view-tab.admin-button.active::after{background:var(--admin-primary)}
.notification-content-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.notification-effect-toolbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  padding:14px 17px;
}
.notification-effect-toolbar>div:first-child{min-width:220px}
.notification-effect-toolbar>div:first-child strong,.notification-effect-toolbar>div:first-child span{display:block}
.notification-effect-toolbar>div:first-child strong{color:var(--admin-text);font-size:13px}
.notification-effect-toolbar>div:first-child span{margin-top:4px;color:var(--admin-muted);font-size:10px;line-height:1.45}
.notification-date-controls{display:flex;align-items:flex-end;justify-content:flex-end;gap:8px}
.notification-date-controls label{display:flex;flex-direction:column;gap:5px;color:var(--admin-muted);font-size:9px;font-weight:700;white-space:nowrap}
.notification-date-controls input,.notification-date-controls select{min-width:126px;height:36px;padding:0 9px;border:1px solid var(--admin-border);border-radius:8px;background:var(--admin-field-bg);color:var(--admin-text);font-size:11px;outline:none}
.notification-date-controls select{min-width:100px}
.notification-date-controls .admin-button{min-height:36px}
.notification-delivery-funnel{
  display:grid;
  grid-template-columns:minmax(180px,1fr) 24px minmax(180px,1fr) minmax(180px,.85fr);
  align-items:stretch;
  gap:8px;
}
.notification-recall-story{
  display:grid;
  grid-template-columns:minmax(180px,1fr) 24px minmax(210px,1.2fr) minmax(170px,.85fr);
  align-items:stretch;
  gap:8px;
}
.notification-delivery-funnel article,.notification-recall-story article{
  min-width:0;
  padding:16px 17px;
  border:1px solid var(--admin-border);
  border-radius:11px;
  background:var(--admin-surface);
  box-shadow:var(--admin-shadow-sm);
}
.notification-delivery-funnel article>span,.notification-recall-story article>span{display:block;color:var(--admin-muted);font-size:10px;font-weight:650}
.notification-delivery-funnel article>strong,.notification-recall-story article>strong{display:block;margin-top:6px;color:var(--admin-text);font-size:24px;line-height:1.05}
.notification-delivery-funnel article>strong small,.notification-recall-story article>strong small{font-size:11px;font-weight:650}
.notification-delivery-funnel article>p,.notification-recall-story article>p{margin:7px 0 0;color:var(--admin-muted);font-size:9px;line-height:1.4}
.notification-delivery-funnel>i,.notification-recall-story>i{display:grid;place-items:center;color:var(--admin-muted);font-size:17px;font-style:normal}
.notification-delivery-funnel article.is-should-send{border-color:color-mix(in srgb,var(--admin-primary) 28%,var(--admin-border))}
.notification-delivery-funnel article.is-sent{background:color-mix(in srgb,var(--admin-primary-soft) 45%,var(--admin-surface))}
.notification-delivery-funnel article.is-unsent.has-unsent{border-color:color-mix(in srgb,#d97706 45%,var(--admin-border));background:color-mix(in srgb,#fff7ed 68%,var(--admin-surface))}
.notification-delivery-funnel article.is-unsent.has-unsent>span,.notification-delivery-funnel article.is-unsent.has-unsent>strong{color:#b45309}
.notification-recall-story article.is-recall{
  border-color:color-mix(in srgb,var(--admin-primary) 40%,var(--admin-border));
  background:var(--admin-primary-soft);
  box-shadow:0 8px 22px color-mix(in srgb,var(--admin-primary) 12%,transparent);
}
.notification-recall-story article.is-recall>span,.notification-recall-story article.is-recall>strong{color:var(--admin-primary)}
.notification-recall-story article.is-rate{border-color:color-mix(in srgb,var(--admin-primary) 25%,var(--admin-border))}
.notification-delivery-diagnosis{overflow:hidden;padding:0}
.notification-delivery-diagnosis.is-warning{border-color:color-mix(in srgb,#d97706 38%,var(--admin-border))}
.notification-diagnosis-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:15px 17px;border-bottom:1px solid var(--admin-border)}
.notification-diagnosis-heading>div:first-child>span{display:block;color:#b45309;font-size:9px;font-weight:800;letter-spacing:.08em}
.notification-delivery-diagnosis.is-empty .notification-diagnosis-heading>div:first-child>span{color:var(--admin-primary)}
.notification-diagnosis-heading h3{margin:4px 0 0;color:var(--admin-text);font-size:14px}
.notification-diagnosis-heading p{margin:4px 0 0;color:var(--admin-muted);font-size:10px;line-height:1.5}
.notification-diagnosis-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px}
.notification-unsent-reasons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.notification-unsent-reasons article{min-width:0;padding:14px 17px;border-right:1px solid var(--admin-border);border-bottom:1px solid var(--admin-border)}
.notification-unsent-reasons article:nth-child(3n){border-right:0}
.notification-unsent-reasons article>div{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.notification-unsent-reasons article strong{color:var(--admin-text);font-size:11px}
.notification-unsent-reasons article b{color:#b45309;font-size:11px;white-space:nowrap}
.notification-unsent-reasons article p{margin:6px 0 0;color:var(--admin-text-soft);font-size:9px;line-height:1.5}
.notification-unsent-reasons article small{display:block;margin-top:5px;color:var(--admin-muted);font-size:8px;line-height:1.5}
.notification-runtime-note{padding:9px 17px;border-bottom:1px solid var(--admin-border);background:var(--admin-surface-soft);color:var(--admin-muted);font-size:9px}
.notification-runtime-funnel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-bottom:1px solid var(--admin-border)}
.notification-runtime-funnel article{padding:13px 16px;border-right:1px solid var(--admin-border)}
.notification-runtime-funnel article:last-child{border-right:0}
.notification-runtime-funnel span,.notification-runtime-funnel strong,.notification-runtime-funnel small{display:block}
.notification-runtime-funnel span{color:var(--admin-muted);font-size:9px}
.notification-runtime-funnel strong{margin-top:5px;color:var(--admin-text);font-size:18px}
.notification-runtime-funnel small{margin-top:4px;color:var(--admin-muted);font-size:8px;line-height:1.45}
.notification-runtime-reasons{padding:14px 17px}
.notification-runtime-reasons h4{margin:0 0 9px;color:var(--admin-text);font-size:11px}
.notification-runtime-reasons>article{display:grid;grid-template-columns:65px minmax(0,1fr);gap:10px;padding:9px 0;border-top:1px solid var(--admin-border)}
.notification-runtime-reasons>article:first-of-type{border-top:0}
.notification-runtime-reasons>article>b{color:var(--admin-primary);font-size:9px}
.notification-runtime-reasons>article strong,.notification-runtime-reasons>article small{display:block}
.notification-runtime-reasons>article strong{color:var(--admin-text-soft);font-size:10px}
.notification-runtime-reasons>article small{margin-top:3px;color:var(--admin-muted);font-size:8px;line-height:1.45}
.notification-runtime-reasons>p{margin:0;color:var(--admin-muted);font-size:10px}
.notification-response-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;padding:0}
.notification-response-strip>div{padding:13px 16px;border-right:1px solid var(--admin-border)}
.notification-response-strip>div:last-child{border-right:0}
.notification-response-strip span,.notification-response-strip strong,.notification-response-strip small{display:block}
.notification-response-strip span{color:var(--admin-muted);font-size:9px}
.notification-response-strip strong{margin-top:4px;color:var(--admin-text);font-size:16px}
.notification-response-strip small{margin-top:3px;color:var(--admin-muted);font-size:8px}
.notification-tier-panel{overflow:hidden;padding:0}
.notification-tier-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid var(--admin-border)}
.notification-tier-heading h3{margin:0;color:var(--admin-text);font-size:15px}
.notification-tier-heading p{margin:4px 0 0;color:var(--admin-muted);font-size:11px}
.notification-tier-heading>span{color:var(--admin-muted);font-size:10px;white-space:nowrap}
.notification-recall-table{min-width:1580px}
.notification-recall-table th,.notification-recall-table td{
  padding:12px 13px;
  text-align:center;
  vertical-align:middle;
  white-space:nowrap;
}
.notification-recall-table th{font-size:10px}
.notification-recall-table td{color:var(--admin-text-soft);font-size:11px}
.notification-recall-table td>strong,.notification-recall-table td>small{display:block}
.notification-recall-table td>strong{color:var(--admin-text);font-size:13px}
.notification-recall-table td>small{margin-top:3px;color:var(--admin-muted);font-size:9px}
.notification-unsent-cell{min-width:210px}
.notification-unsent-cell>strong{color:#b45309!important}
.notification-unsent-reason-list{display:grid;gap:3px;margin-top:5px}
.notification-unsent-reason-list span{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--admin-muted);font-size:8px}
.notification-unsent-reason-list b{color:var(--admin-text-soft);font-size:8px;white-space:nowrap}
.notification-tier-name{text-align:center}
.notification-tier-name strong,.notification-tier-name small{display:block;text-align:center}
.notification-tier-name strong{color:var(--admin-text);font-size:12px}
.notification-tier-name small{margin-top:4px;color:var(--admin-muted);font-size:9px}
.notification-recall-table th.is-recall{background:var(--admin-primary-soft);color:var(--admin-primary)}
.notification-recalled-cell{background:color-mix(in srgb,var(--admin-primary-soft) 55%,transparent)}
.notification-recalled-cell strong,.notification-rate-cell strong{color:var(--admin-primary)!important;font-size:15px!important}
.notification-rate-cell{background:color-mix(in srgb,var(--admin-primary-soft) 55%,transparent)}
.notification-recall-definitions{display:flex;flex-wrap:wrap;gap:8px 24px;padding:12px 18px;border-top:1px solid var(--admin-border);color:var(--admin-muted);font-size:9px;line-height:1.5}
.notification-recall-definitions b{color:var(--admin-text-soft)}
.notification-proactive-embedded .proactive-tabs{display:none}
.notification-proactive-embedded .proactive-main-panel{min-height:400px}
.notification-proactive-embedded.is-jobs .proactive-summary-grid,.notification-proactive-embedded.is-deliveries .proactive-summary-grid{margin-bottom:0}
.notification-page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
}
.notification-page-header h2{margin:0}
.notification-page-header p{
  margin:5px 0 0;
  color:var(--admin-muted);
  font-size:13px;
}
.notification-page-header .admin-page-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}
.notification-filter-row{display:flex;flex-wrap:wrap;gap:7px}
.notification-health-panel{padding:0}
.notification-health-loading,.notification-health-error{
  padding:18px;
  color:var(--admin-muted);
  font-size:13px;
}
.notification-health-error{color:var(--admin-text-soft)}
.notification-health-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px 12px;
}
.notification-health-head h3{margin:0;font-size:15px}
.notification-health-head p{
  margin:3px 0 0;
  color:var(--admin-muted);
  font-size:12px;
}
.notification-check-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  border-top:1px solid var(--admin-border);
}
.notification-check-item{
  display:flex;
  min-width:0;
  align-items:flex-start;
  gap:10px;
  padding:14px 16px;
  border-right:1px solid var(--admin-border);
}
.notification-check-item:last-child{border-right:0}
.notification-check-mark{
  display:flex;
  width:22px;
  height:22px;
  flex:0 0 22px;
  align-items:center;
  justify-content:center;
  border:1px solid var(--admin-border);
  border-radius:50%;
  color:var(--admin-text-soft);
  font-size:12px;
  font-weight:800;
}
.notification-check-item.is-error .notification-check-mark{
  border-color:var(--admin-danger);
  color:var(--admin-danger);
}
.notification-check-item strong{
  display:block;
  color:var(--admin-text);
  font-size:12px;
}
.notification-check-item small{
  display:block;
  overflow-wrap:anywhere;
  margin-top:3px;
  color:var(--admin-muted);
  font-size:11px;
  line-height:1.45;
}
.notification-table{min-width:960px}
.notification-table th:nth-child(1){width:29%}
.notification-table th:nth-child(4){width:18%}
.notification-table th:last-child{width:240px}
.notification-title-cell strong{
  display:block;
  color:var(--admin-text);
  font-size:13px;
}
.notification-title-cell small{
  display:-webkit-box;
  overflow:hidden;
  margin-top:4px;
  color:var(--admin-muted);
  font-size:11px;
  line-height:1.5;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.notification-push-summary strong{
  display:block;
  color:var(--admin-text-soft);
  font-size:12px;
}
.notification-push-summary small{
  display:block;
  margin-top:3px;
  color:var(--admin-muted);
  font-size:10px;
}
.notification-empty{
  padding:24px;
  color:var(--admin-muted);
  text-align:center;
}
.notification-modal{
  width:min(720px,calc(100vw - 32px));
  max-height:calc(100vh - 40px);
  overflow:auto;
  border:1px solid var(--admin-border);
  border-radius:14px;
  box-shadow:var(--admin-shadow-lg);
}
.notification-test-modal{width:min(620px,calc(100vw - 32px))}
.notification-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-bottom:1px solid var(--admin-border);
}
.notification-modal-head h3{margin:0}
.notification-modal-head p{
  margin:4px 0 0;
  color:var(--admin-muted);
  font-size:12px;
}
.notification-publish-note{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:0 20px 18px;
  padding:12px 0;
  border-top:1px solid var(--admin-border);
  border-bottom:1px solid var(--admin-border);
}
.notification-publish-note strong{
  color:var(--admin-text);
  font-size:12px;
}
.notification-publish-note span{
  color:var(--admin-muted);
  font-size:11px;
  text-align:right;
}
.notification-test-result{
  margin:0 20px 18px;
  padding:12px 0;
  border-top:1px solid var(--admin-border);
  color:var(--admin-muted);
  font-size:12px;
}
.notification-test-result strong{
  display:block;
  color:var(--admin-text);
  font-size:13px;
}
.notification-test-result span{display:block;margin-top:4px;line-height:1.5}
.notification-test-result.is-error strong{color:var(--admin-danger)}
.notification-test-result.is-success strong{color:var(--admin-text)}

@media(max-width:1100px){
  .notification-effect-toolbar{align-items:stretch;flex-direction:column}
  .notification-date-controls{justify-content:flex-start}
  .notification-delivery-funnel{grid-template-columns:1fr 24px 1fr}
  .notification-delivery-funnel article.is-unsent{grid-column:1/-1}
  .notification-recall-story{grid-template-columns:1fr 24px 1.2fr}
  .notification-recall-story article.is-rate{grid-column:1/-1}
  .notification-unsent-reasons,.notification-runtime-funnel{grid-template-columns:repeat(2,minmax(0,1fr))}
  .notification-unsent-reasons article:nth-child(3n){border-right:1px solid var(--admin-border)}
  .notification-unsent-reasons article:nth-child(2n),.notification-runtime-funnel article:nth-child(2n){border-right:0}
  .notification-runtime-funnel article:nth-child(n+3){border-top:1px solid var(--admin-border)}
  .notification-check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .notification-check-item:nth-child(2n){border-right:0}
  .notification-check-item:nth-child(n+3){border-top:1px solid var(--admin-border)}
}
@media(max-width:760px){
  .notification-unified-title{align-items:stretch;flex-direction:column}
  .notification-date-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .notification-date-controls label,.notification-date-controls input,.notification-date-controls select,.notification-date-controls .admin-button{width:100%;min-width:0}
  .notification-delivery-funnel,.notification-recall-story{grid-template-columns:1fr}
  .notification-delivery-funnel>i,.notification-recall-story>i{display:none}
  .notification-delivery-funnel article.is-unsent,.notification-recall-story article.is-rate{grid-column:auto}
  .notification-diagnosis-heading{align-items:stretch;flex-direction:column}
  .notification-diagnosis-actions{justify-content:flex-start}
  .notification-unsent-reasons,.notification-runtime-funnel{grid-template-columns:1fr}
  .notification-unsent-reasons article,.notification-unsent-reasons article:nth-child(2n),.notification-unsent-reasons article:nth-child(3n),.notification-runtime-funnel article{border-right:0}
  .notification-unsent-reasons article+.notification-unsent-reasons article,.notification-runtime-funnel article+article{border-top:1px solid var(--admin-border)}
  .notification-response-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .notification-response-strip>div:nth-child(2){border-right:0}
  .notification-response-strip>div:nth-child(n+3){border-top:1px solid var(--admin-border)}
  .notification-tier-heading{align-items:stretch;flex-direction:column}
  .notification-tier-heading>span{white-space:normal}
  .notification-content-actions{justify-content:flex-start}
  .notification-page-header{flex-direction:column}
  .notification-page-header .admin-page-actions{width:100%;justify-content:flex-start}
  .notification-check-grid{grid-template-columns:1fr}
  .notification-check-item{border-right:0;border-top:1px solid var(--admin-border)}
  .notification-check-item:first-child{border-top:0}
  .notification-publish-note{flex-direction:column}
  .notification-publish-note span{text-align:left}
}

@media(max-width:1280px){
  .chat-workspace{grid-template-columns:230px 250px minmax(500px,1fr)}
  .chat-conversation-summary>span:last-child{display:none}
}
@media(max-width:900px){
  .chat-page-header{align-items:stretch;flex-direction:column;gap:12px}
  .chat-search{width:100%}
  .chat-workspace{
    grid-template-columns:220px 240px minmax(480px,1fr);
    height:calc(100vh - 210px);
  }
}

/* ===== 全后台响应式外壳：笔记本、小屏与窄屏统一规则 ===== */
html,body,#mainLayout{max-width:100%;overflow-x:hidden}
#mainLayout>div.flex,.admin-content,.admin-tab-panel,.admin-page,
.character-list-page,.notification-admin-page{min-width:0}
.admin-table-wrap{
  width:100%;
  max-width:100%;
  overflow:auto;
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
  scrollbar-gutter:stable;
}
.character-list-panel{
  width:100%;
  max-width:100%;
  overflow:hidden;
  overscroll-behavior:auto;
}
.character-list-scroll.admin-list-scroll{
  flex:0 0 auto;
  max-height:none;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
}
.users-table-scroll{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  overscroll-behavior-y:auto;
}
.admin-content :is(table,.admin-panel,.admin-form-panel){max-width:100%}
.billing-page{min-width:0}
.billing-content-region{display:flex;min-height:0;flex:0 0 auto;flex-direction:column;overflow:visible}
.billing-content-region>.admin-list-region{flex:1 1 auto}
.billing-page-header{gap:16px}
.billing-tabs{max-width:100%;overflow-x:auto;scrollbar-width:thin}
.billing-tabs>.admin-button{flex:0 0 auto;white-space:nowrap}
.billing-page .admin-table-wrap table{min-width:820px}
.billing-page .admin-table-wrap .billing-orders-table{min-width:1540px}
.billing-page .billing-data-table{table-layout:fixed}
.billing-page .billing-plan-table{min-width:1260px}
.billing-page .billing-product-table{min-width:980px}
.billing-data-table .billing-col-name{width:180px}
.billing-data-table .billing-col-product-id{width:300px}
.billing-data-table .billing-col-compact{width:92px}
.billing-data-table .billing-col-metric{width:124px}
.billing-data-table .billing-col-status{width:86px}
.billing-data-table .billing-col-actions{width:96px}
.billing-plan-table .billing-col-name{width:140px}
.billing-plan-table .billing-col-product-id{width:260px}
.billing-plan-table .billing-col-price{width:180px}
.billing-plan-table .billing-col-actions{width:156px}
.billing-data-table .billing-name-cell{font-weight:500}
.billing-data-table .billing-actions-cell{white-space:nowrap}
.billing-plan-table .billing-actions-cell .admin-button+.admin-button{margin-left:6px}
.billing-plan-table .billing-store-price{display:grid;grid-template-columns:58px auto;align-items:center;justify-content:center;column-gap:8px;white-space:nowrap}
.billing-toolbar{gap:14px}
.billing-state{font-weight:650}
.billing-state.is-warning,.billing-notice.is-warning{color:#d97706}
.billing-state.is-danger,.billing-notice.is-danger{color:var(--admin-danger)}
.billing-state.is-neutral{color:var(--admin-text)}
.modal-bg>.admin-surface,
body>div.fixed.inset-0>.admin-surface{
  max-width:calc(100vw - 32px)!important;
  max-height:calc(100dvh - 32px)!important;
  overflow:auto;
}

/* Explicit dialog sizes override the legacy viewport-wide modal clamp. */
:is(.modal-bg,.admin-modal-backdrop)>.admin-dialog-md,
body>div.fixed.inset-0>.admin-dialog-md{
  width:min(560px,calc(100vw - 32px))!important;
  max-width:560px!important;
}
:is(.modal-bg,.admin-modal-backdrop)>.admin-dialog-lg,
body>div.fixed.inset-0>.admin-dialog-lg{
  width:min(760px,calc(100vw - 32px))!important;
  max-width:760px!important;
}
:is(.modal-bg,.admin-modal-backdrop)>.admin-dialog-wide,
body>div.fixed.inset-0>.admin-dialog-wide{
  width:min(880px,calc(100vw - 32px))!important;
  max-width:880px!important;
}

/* Character image repair is a focused task dialog, not a workspace canvas. */
.modal-bg>.character-image-repair-dialog{
  width:min(640px,100%)!important;
  max-width:640px!important;
  max-height:min(82dvh,760px)!important;
  overflow:hidden;
  box-shadow:0 24px 64px rgba(15,23,42,.24)!important;
}
.character-image-repair-warning{
  padding:9px 12px;
  border:1px solid var(--admin-border);
  border-radius:9px;
  background:var(--admin-inner);
  color:var(--admin-text-soft);
  font-size:12px;
  line-height:1.55;
  text-align:left;
}
.character-image-repair-header{
  padding:16px 18px 14px;
}
.character-image-repair-header>div{min-width:0}
.character-image-repair-header p{line-height:1.55}
.character-image-repair-body{
  max-height:calc(min(82dvh,760px) - 72px);
  overflow:auto;
  padding:18px;
}
.character-image-repair-option{
  display:block!important;
  width:100%;
  height:auto!important;
  min-height:142px;
  text-align:left!important;
  white-space:normal!important;
}
.character-image-repair-option:hover{
  border-color:var(--admin-primary)!important;
  box-shadow:0 8px 20px color-mix(in srgb,var(--admin-primary) 10%,transparent);
}

/* 常见 1366/1440 笔记本：保留文字导航，但减少无效留白。 */
@media (max-width:1440px) and (min-width:1181px){
  .admin-topbar{height:58px!important;padding:0 16px!important}
  .admin-tabs{margin:0 10px}
  .admin-sidebar{width:188px!important;padding:14px 10px!important}
  .admin-sidebar .sidebar-item{min-height:38px;padding:8px 10px!important;gap:8px!important;font-size:13px!important}
  .admin-sidebar .sidebar-item>span{width:21px;min-width:21px;font-size:14px!important}
  .sidebar-title,.sidebar-section-label{padding:0 10px!important}
  .admin-content{padding:20px 20px 34px!important}
  .admin-content table th{padding:9px 11px!important}
  .admin-content table td{padding:10px 11px!important}
  .admin-metric-grid,.proactive-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .admin-dashboard-grid{grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr)}
  .admin-settings-layout{grid-template-columns:190px minmax(0,1fr)}
  .character-list-table{min-width:1160px}
  .character-list-table .character-style-column{width:165px}
  .character-list-table .character-time-column{width:116px}
  .character-list-table .character-voice-column{min-width:290px}
  .character-list-table .character-actions-column{width:168px}
  .proactive-job-table,.proactive-engagement-table{min-width:1320px}
  .chat-workspace{grid-template-columns:220px 240px minmax(430px,1fr);gap:10px}
  .chat-message-pane{min-width:430px}
}

/* 小型笔记本与横屏平板：侧栏折叠为图标轨道，内容区优先。 */
@media (max-width:1180px){
  .admin-topbar{height:58px!important;padding:0 14px!important}
  .admin-brand .admin-version,.admin-brand .build-time{display:none!important}
  .admin-tabs{margin:0 8px;gap:3px}
  .admin-workspace-tab-label{padding:0 9px!important}
  .admin-topbar-actions{gap:6px!important}
  .admin-sidebar{width:72px!important;padding:10px 8px!important}
  .admin-sidebar .sidebar-title,
  .admin-sidebar .sidebar-divider,
  .admin-sidebar .sidebar-section-label{display:none!important}
  .admin-sidebar .sidebar-item{
    min-height:42px;
    justify-content:center!important;
    gap:0!important;
    padding:9px!important;
    font-size:0!important;
  }
  .admin-sidebar .sidebar-item>span{width:24px;min-width:24px;font-size:16px!important}
  .admin-content{padding:18px 18px 32px!important}
  .admin-page-header,.character-list-header,.notification-page-header{gap:14px}
  .admin-page-actions,.character-list-toolbar,.character-selection-bar{flex-wrap:wrap}
  .admin-metric-grid,.proactive-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .admin-dashboard-grid,.admin-workspace-grid{grid-template-columns:1fr}
  .admin-settings-layout{display:block}
  .admin-settings-nav{
    display:flex;
    gap:4px;
    margin-bottom:14px;
    overflow-x:auto;
    scrollbar-width:thin;
  }
  .admin-settings-nav button{width:auto;flex:0 0 auto;white-space:nowrap}
  .users-page{height:auto}
  .users-page-header{margin-bottom:12px}
  .users-toolbar{flex-wrap:wrap}
  .users-search{min-width:240px;flex:1 1 260px}
  .billing-page-header{align-items:flex-start;flex-direction:column}
  .billing-tabs{width:100%;padding-bottom:4px}
  .billing-toolbar{align-items:flex-start;flex-direction:column}
  .proactive-guide{grid-template-columns:1fr 1fr}
  .proactive-guide>i{display:none}
  .proactive-runtime-settings{align-items:flex-start;flex-wrap:wrap}
  .proactive-runtime-settings>div{width:100%;margin-right:0}
  .notification-check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* 900px 以下不再强撑三栏；列表在上、消息在下，均可独立滚动。 */
@media (max-width:900px){
  .admin-brand-title{display:none!important}
  .admin-brand{width:0;min-width:0;overflow:hidden}
  .admin-topbar .admin-account,
  .admin-topbar button[onclick="doLogout()"],
  .admin-readonly-badge{display:none!important}
  .admin-page-header,.character-list-header,.notification-page-header,
  .users-page-header{align-items:stretch;flex-direction:column}
  .admin-page-actions{width:100%;justify-content:flex-start}
  .admin-form-grid{grid-template-columns:1fr;padding:16px}
  .admin-field-full{grid-column:auto}
  .character-list-toolbar,.character-selection-bar{align-items:flex-start;flex-direction:column}
  .character-filter-group{max-width:100%;overflow-x:auto}
  .character-selection-bar>div{max-width:100%;flex-wrap:wrap}
  .proactive-summary-grid,.admin-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .proactive-tabs{overflow-x:auto;scrollbar-width:thin}
  .proactive-toolbar{align-items:stretch;flex-direction:column}
  .proactive-toolbar .admin-search{width:100%}
  .proactive-overview-grid{grid-template-columns:1fr}
  .proactive-overview-section{border-right:0;border-bottom:1px solid var(--admin-border)}
  .proactive-overview-section:last-child{border-bottom:0}
  .notification-page-header .admin-page-actions{justify-content:flex-start}
  .chat-workspace{
    height:auto;
    min-height:0;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-rows:minmax(250px,32vh) minmax(480px,68vh);
    overflow:visible;
  }
  .chat-user-pane{grid-column:1;grid-row:1}
  .chat-conversation-pane{grid-column:2;grid-row:1}
  .chat-message-pane{grid-column:1/-1;grid-row:2;min-width:0}
  .chat-workspace.is-single-user,
  .chat-workspace.is-single-character{
    grid-template-columns:minmax(210px,32%) minmax(0,1fr);
    grid-template-rows:minmax(500px,70vh);
  }
  .chat-workspace.is-single-user .chat-conversation-pane,
  .chat-workspace.is-single-character .chat-user-pane{grid-column:1;grid-row:1}
  .chat-workspace.is-single-user .chat-message-pane,
  .chat-workspace.is-single-character .chat-message-pane{grid-column:2;grid-row:1}
  .chat-message-stream{padding:18px 18px 44px}
  .chat-message-stack{max-width:82%}
}

/* 手机和极窄窗口：导航改为顶部横向栏，避免永久占据内容宽度。 */
@media (max-width:720px){
  .admin-topbar{height:54px!important;padding:0 10px!important}
  .admin-brand{display:none!important}
  .admin-tabs{margin:0;min-width:0}
  .admin-workspace-tab-label{max-width:98px;overflow:hidden;text-overflow:ellipsis}
  .admin-topbar-actions .admin-button{min-width:34px;padding:0 8px!important}
  .admin-topbar-actions .admin-button>span:not(#themeIcon){display:none!important}
  #mainLayout>div.flex{flex-direction:column}
  .admin-sidebar{
    width:100%!important;
    height:54px;
    min-height:54px;
    padding:6px 8px!important;
    flex:0 0 54px;
    flex-direction:row!important;
    gap:4px;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    border-right:0!important;
    border-bottom:1px solid var(--admin-border)!important;
    scrollbar-width:none;
  }
  .admin-sidebar::-webkit-scrollbar{display:none}
  .admin-sidebar .sidebar-item{
    min-width:max-content;
    min-height:40px;
    flex:0 0 auto;
    justify-content:flex-start!important;
    gap:7px!important;
    margin:0;
    padding:8px 10px!important;
    font-size:12px!important;
    white-space:nowrap;
  }
  .admin-sidebar .sidebar-item>span{width:20px;min-width:20px;font-size:14px!important}
  .admin-content{
    width:100vw!important;
    max-width:100vw!important;
    padding:14px 12px 28px!important;
    overflow-x:hidden!important;
  }
  .admin-content h2{font-size:20px!important}
  .admin-page-header{margin-bottom:14px}
  .admin-page-actions{gap:7px}
  .admin-page-actions .admin-button{width:auto;min-width:0;flex:0 1 auto}
  .admin-metric-card,.proactive-summary-card{min-height:96px;padding:14px}
  .admin-metric-card>strong,.proactive-summary-card>strong{font-size:21px}
  .users-page{height:auto;min-height:0;overflow:visible}
  .users-toolbar{align-items:stretch;flex-direction:column}
  .users-toolbar>*{flex:0 0 auto}
  .users-search{min-width:0;width:100%}
  .users-toolbar select{width:100%}
  .users-pagination{align-items:flex-start;flex-direction:column}
  #billingContent .grid.grid-cols-2,
  #billingContent .grid.grid-cols-3{grid-template-columns:1fr!important}
  .proactive-runtime-settings{padding:14px}
  .proactive-delay-field{width:100%;justify-content:space-between}
  .proactive-guide{grid-template-columns:1fr}
  .notification-check-grid{grid-template-columns:1fr}
  .notification-check-item{border-right:0;border-top:1px solid var(--admin-border)}
  .notification-check-item:first-child{border-top:0}
  .chat-workspace,
  .chat-workspace.is-single-user,
  .chat-workspace.is-single-character{
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:auto;
    gap:10px;
  }
  .chat-workspace .chat-pane,
  .chat-workspace.is-single-user .chat-pane,
  .chat-workspace.is-single-character .chat-pane{
    grid-column:1;
    grid-row:auto;
    min-width:0;
  }
  .chat-user-pane,.chat-conversation-pane{height:270px}
  .chat-message-pane{height:68vh;min-height:460px}
  .chat-message-stream{padding:16px 12px 36px}
  .chat-message-stack{max-width:90%}
  .chat-voice-message{min-width:min(230px,72vw)}
  .one-step-task-center-head{align-items:stretch;flex-direction:column}
  .one-step-task-center-head .admin-button{width:100%}
  .one-step-task-bulk-actions{align-items:stretch;flex-direction:column}
  .one-step-task-bulk-actions>span{width:100%;margin:0 0 2px}
  .one-step-task-grid{grid-template-columns:1fr}
}

@media (max-width:480px){
  .admin-metric-grid,.proactive-summary-grid,.admin-gallery-grid{grid-template-columns:1fr}
  .proactive-summary-grid .proactive-health-card{grid-column:auto}
  .admin-page-actions{align-items:stretch;flex-direction:column}
  .admin-page-actions .admin-button{width:100%}
  .character-create-button{width:100%}
  .modal-bg{padding:8px}
  .modal-bg>.admin-surface,
  body>div.fixed.inset-0>.admin-surface{max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
}

/* 低高度笔记本（常见 1366×768）：压缩纵向留白，保留数据可视面积。 */
@media (max-height:820px) and (min-width:721px){
  .admin-topbar{height:56px!important}
  .admin-content{padding-top:16px!important;padding-bottom:24px!important}
  .admin-page-header,.character-list-header{margin-bottom:12px}
  .admin-metric-grid,.proactive-summary-grid{gap:10px;margin-bottom:12px}
  .admin-metric-card,.proactive-summary-card{min-height:92px;padding:13px 15px}
  .admin-metric-card>strong,.proactive-summary-card>strong{font-size:22px}
  .users-page{height:auto}
  .chat-workspace{height:calc(100vh - 140px);min-height:500px}
}
/* ============ 官网博客编辑器 ============ */
.blog-admin-page{--blog-accent:#4f46e5}
.blog-page-header{align-items:center}
.blog-page-heading{display:flex;align-items:center;gap:14px}
.blog-page-icon{display:grid;width:42px;height:42px;flex:0 0 42px;place-items:center;border:1px solid color-mix(in srgb,var(--admin-primary) 22%,var(--admin-border));border-radius:13px;background:var(--admin-primary-soft);color:var(--admin-primary);font-size:18px}
.blog-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
.blog-summary-grid article{min-height:100px;padding:15px 17px;border:1px solid var(--admin-border);border-radius:13px;background:var(--admin-surface);box-shadow:var(--admin-shadow)}
.blog-summary-grid article>span{display:block;color:var(--admin-muted);font-size:11px;font-weight:650}
.blog-summary-grid article>strong{display:block;margin:6px 0 3px;color:var(--admin-text);font-size:25px;line-height:1.15;letter-spacing:-.03em}
.blog-summary-grid article>small{color:var(--admin-muted);font-size:10px}.blog-summary-grid article>small.is-positive{color:#0f8a5f}
.blog-toolbar{align-items:center;gap:18px;min-height:74px;flex-wrap:nowrap}
.blog-filter-bar{display:flex;align-items:flex-end;justify-content:flex-end;gap:8px;min-width:0}
.blog-filter-field{display:flex!important;flex-direction:column;gap:4px;min-width:122px}
.blog-filter-field>span{padding-left:2px;color:var(--admin-muted);font-size:10px;font-weight:650}
.blog-filter-field select{height:38px;min-height:38px!important;padding:6px 30px 6px 10px!important;font-size:12px}
.blog-search{width:min(300px,32vw)}
.blog-search>input{height:38px;min-height:38px!important}
.blog-refresh-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:38px;min-height:38px!important}
.blog-post-table{min-width:930px}
.blog-post-table th,.blog-post-table td{vertical-align:middle}
.blog-post-table th:first-child{width:48%}.blog-post-table th:nth-child(2){width:13%}.blog-post-table th:nth-child(3){width:7%;text-align:center}.blog-post-table th:nth-child(4){width:17%}.blog-post-table th:last-child{width:15%}
.blog-admin-article{display:flex;align-items:center;gap:13px;min-width:390px}
.blog-admin-cover{position:relative;display:grid;width:82px;height:52px;flex:0 0 82px;overflow:hidden;place-items:center;border:1px solid var(--admin-border);border-radius:10px;background:linear-gradient(135deg,#eef2ff,#fdf2f8);color:#818cf8}
.blog-admin-cover[data-style="chat"],.blog-admin-cover[data-style="voice"]{background:linear-gradient(135deg,#ecfeff,#eef2ff)}
.blog-admin-cover[data-style="calm"],.blog-admin-cover[data-style="shield"]{background:linear-gradient(135deg,#ecfdf5,#eff6ff)}
.blog-admin-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 20%}.blog-admin-cover>span{font-size:16px}
.blog-admin-title{display:flex;min-width:0;max-width:560px;flex-direction:column;gap:3px}
.blog-admin-title-line{display:flex;align-items:center;gap:8px;min-width:0}
.blog-admin-title strong{overflow:hidden;color:var(--admin-text);font-size:13px;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
.blog-admin-title>span{overflow:hidden;color:var(--admin-text-soft);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.blog-admin-title code{overflow:hidden;color:var(--admin-muted);font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.blog-bilingual-badge{flex:0 0 auto;padding:2px 6px;border:1px solid var(--admin-border);border-radius:99px;color:var(--admin-muted);font-size:9px;font-weight:700}
.blog-status-stack{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.blog-status-stack .admin-status{min-height:22px;padding:1px 7px}
.blog-order-value{display:block;color:var(--admin-text);font-variant-numeric:tabular-nums;text-align:center}
.blog-updated-time{color:var(--admin-text-soft);font-size:11px;white-space:nowrap}
.blog-row-actions{display:flex!important;align-items:center;justify-content:flex-end;gap:5px!important}
.blog-row-actions .admin-button{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:0 8px;font-size:11px;text-decoration:none;white-space:nowrap}
.blog-row-actions .blog-delete-button{color:#dc2626!important}
.blog-editor-shell{width:min(96vw,1480px);height:min(94vh,960px);display:flex;flex-direction:column;border:1px solid var(--admin-border);border-radius:18px;overflow:hidden;box-shadow:0 24px 80px rgba(15,23,42,.2)}
.blog-editor-header,.blog-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 22px;border-bottom:1px solid var(--admin-border);background:var(--admin-surface);flex-shrink:0}
.blog-editor-header h3{margin:0;font-size:18px;font-weight:700;color:var(--admin-text)}
.blog-editor-header p,.blog-editor-footer>span{font-size:11px;color:var(--admin-muted);margin-top:3px}
.blog-editor-footer{border-top:1px solid var(--admin-border);border-bottom:0}
.blog-editor-footer .admin-table-actions{display:flex!important;gap:8px!important}
.blog-editor-scroll{padding:20px 22px;overflow:auto;flex:1;background:var(--admin-canvas)}
.blog-editor-settings{padding:17px;border:1px solid var(--admin-border);border-radius:14px;background:var(--admin-surface)}
.blog-editor-settings,.blog-editor-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px}
.blog-editor-settings label,.blog-editor-fields label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--admin-text-soft)}
.blog-editor-settings small{font-size:10px;color:var(--admin-muted);line-height:1.4}
.blog-editor-settings .admin-field-full,.blog-editor-fields .admin-field-full{grid-column:1/-1}
.blog-featured-field{justify-content:flex-end}.blog-featured-field input{width:18px;height:18px}
.blog-upload-row{display:flex;gap:8px}.blog-upload-row input{flex:1;min-width:0}
.blog-language-tabs{position:sticky;top:-20px;z-index:4;display:flex;align-items:center;gap:5px;margin:18px -22px 16px;padding:9px 22px;border-block:1px solid var(--admin-border);background:color-mix(in srgb,var(--admin-surface) 96%,transparent);backdrop-filter:blur(12px)}
.blog-language-tabs button{padding:8px 14px!important;border:1px solid transparent!important;border-radius:9px!important;color:var(--admin-muted);font-size:12px;font-weight:650}
.blog-language-tabs button[aria-selected="true"]{border-color:color-mix(in srgb,var(--admin-primary) 28%,var(--admin-border))!important;background:var(--admin-primary-soft)!important;color:var(--admin-primary)!important;-webkit-text-fill-color:var(--admin-primary)!important}
.blog-language-tabs span{margin-left:auto;color:var(--admin-muted);font-size:10px}
.blog-editor-fields{padding:16px;border:1px solid var(--admin-border);border-radius:14px;background:var(--admin-surface)}
.blog-content-workspace{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(340px,.92fr);gap:14px;margin-top:14px;min-height:510px}
.blog-markdown-pane,.blog-preview-pane{border:1px solid var(--admin-border);border-radius:14px;overflow:hidden;background:var(--admin-surface)}
.blog-markdown-pane{display:flex;flex-direction:column}
.blog-markdown-toolbar{display:flex;align-items:center;gap:5px;padding:8px 10px;border-bottom:1px solid var(--admin-border);background:var(--admin-surface-soft)}
.blog-markdown-toolbar button{min-width:32px;padding:5px 8px;border:1px solid var(--admin-border);border-radius:7px;color:var(--admin-text-soft);font-size:11px;background:var(--admin-field-bg)}
.blog-markdown-toolbar button:hover{color:var(--admin-primary);border-color:var(--admin-primary)}
.blog-content-input{flex:1!important;min-height:460px!important;border:0!important;border-radius:0!important;resize:vertical;font-family:"SFMono-Regular",Consolas,monospace!important;font-size:13px!important;line-height:1.75!important;box-shadow:none!important}
.blog-preview-pane{overflow:auto;padding:0 25px 28px}
.blog-preview-label{position:sticky;top:0;margin:0 -25px 20px;padding:10px 25px;border-bottom:1px solid var(--admin-border);background:var(--admin-surface);color:var(--admin-muted);font-size:10px;font-weight:700;letter-spacing:.06em;z-index:1}
.blog-preview-content{color:var(--admin-text);line-height:1.8}.blog-preview-content h1{font-size:27px;line-height:1.25;margin-bottom:12px}.blog-preview-content h2{font-size:19px;margin:27px 0 9px}.blog-preview-content h3{font-size:16px;margin:21px 0 8px}.blog-preview-content p,.blog-preview-content li{color:var(--admin-text-soft);font-size:13px;margin:0 0 12px}.blog-preview-content ul{list-style:disc;padding-left:22px}.blog-preview-content blockquote{border-left:3px solid var(--admin-primary);padding:8px 14px;margin:16px 0;color:var(--admin-text-soft);background:var(--admin-surface-soft)}.blog-preview-content img{width:100%;max-height:340px;object-fit:cover;border-radius:10px;margin:17px 0}.blog-preview-content a{color:var(--admin-primary);text-decoration:underline}.blog-preview-excerpt{font-size:14px!important;color:var(--admin-muted)!important;border-bottom:1px solid var(--admin-border);padding-bottom:17px}
@media(max-width:1180px){.blog-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.blog-toolbar{align-items:flex-start;flex-direction:column}.blog-filter-bar{width:100%;justify-content:flex-start}.blog-search{flex:1;width:auto}.blog-editor-settings,.blog-editor-fields{grid-template-columns:1fr 1fr}.blog-content-workspace{grid-template-columns:1fr}.blog-preview-pane{min-height:400px}}
@media(max-width:720px){.blog-page-heading{align-items:flex-start}.blog-page-icon{width:36px;height:36px;flex-basis:36px}.blog-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.blog-summary-grid article{min-height:88px;padding:13px}.blog-filter-bar{align-items:stretch;flex-direction:column}.blog-filter-field,.blog-search{width:100%}.blog-refresh-button{width:100%}.blog-editor-settings,.blog-editor-fields{grid-template-columns:1fr}.blog-language-tabs span{display:none}.blog-editor-footer>span{display:none}.blog-upload-row{align-items:stretch;flex-direction:column}}
/* Subscription optimization: responsive, independently scrollable comparison tables. */
.payment-scope{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.payment-scope p,.payment-definitions p{color:var(--admin-muted);font-size:12px;line-height:1.7;margin-top:6px}
.payment-rates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:24px}
.payment-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0}
.payment-reference{max-width:180px;overflow-wrap:anywhere;font-family:monospace;font-size:11px}
.payment-definitions,.growth-secondary{border:1px solid var(--admin-border);border-radius:12px;padding:16px;margin:18px 0;background:var(--admin-surface)}
.payment-definitions summary,.growth-secondary>summary{cursor:pointer;font-weight:600;color:var(--admin-text)}
.growth-secondary[open]>summary{margin-bottom:18px}
#paymentJourney h4{font-weight:700;margin-top:24px}
#paymentJourney .growth-table-wrap{overflow-x:auto;overflow-y:hidden;border:1px solid var(--admin-border);border-radius:10px}
#paymentJourney table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}
#paymentJourney th{white-space:nowrap;position:sticky;top:0;background:var(--admin-surface-soft);z-index:1;color:var(--admin-muted);padding:12px 14px;font-weight:600}
#paymentJourney td{vertical-align:top;min-width:90px;padding:12px 14px;border-top:1px solid var(--admin-border)}
#paymentJourney tbody tr:hover{background:var(--admin-surface-soft)}
#paymentJourney td small{display:block;color:var(--admin-muted);margin-top:4px}
#paymentJourney[aria-busy=true]{opacity:.65;pointer-events:none}
@media(max-width:639px){.payment-rates{grid-template-columns:1fr}.payment-scope{align-items:flex-start;flex-direction:column}}
/* Business overview separates period metrics, observation cohorts and current state. */
.business-panel{background:var(--admin-surface);border:1px solid var(--admin-border);border-radius:14px;padding:20px;margin:16px 0}
.business-panel h3{font-size:16px;font-weight:700;margin:0 0 10px}
.business-note{font-size:12px;color:var(--admin-muted);line-height:1.7;margin:8px 0 14px}
.business-range{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--admin-text-soft);font-size:12px;margin:18px 0}
.business-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.business-kpis.business-conversation-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
.business-kpis .admin-kpi-card{padding:16px;border:1px solid var(--admin-border);border-radius:12px}
.business-kpis .admin-kpi-card>div:nth-child(2){font-size:23px;font-weight:700;margin:8px 0}
.business-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:12px 0}
.business-metrics>div{padding:12px;background:var(--admin-surface-soft);border-radius:10px}
.business-metrics>div>div:first-child{font-size:12px;color:var(--admin-muted)}
.business-metrics>div>div:last-child{font-size:18px;font-weight:700;margin-top:6px}
.business-trends,.business-retention-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.business-trends{align-items:stretch}
.business-trends>.business-panel{display:flex;flex-direction:column;min-width:0}
.business-trends .business-chart{margin-top:auto}
.business-trends .business-bar>span{max-width:56px}
.business-single-day{min-height:149px;display:flex;flex-direction:column;justify-content:center;margin-top:auto;font-variant-numeric:tabular-nums}
.business-single-value{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.business-single-value strong{font-size:40px;line-height:1.2;font-weight:700;letter-spacing:-1px;color:var(--admin-text)}
.business-single-value span{font-size:13px;color:var(--admin-text-soft)}
.business-single-day p{font-size:12px;color:var(--admin-muted);margin:12px 0 0}
.business-retention-grid{grid-template-columns:2fr 1fr}
#business-activity{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.business-table-wrap{overflow-x:auto;overflow-y:hidden;border:1px solid var(--admin-border);border-radius:10px;margin:12px 0}
.business-table-wrap table{width:100%;border-collapse:collapse;font-size:12px;text-align:left}
.business-table-wrap th{white-space:nowrap;background:var(--admin-surface-soft);padding:12px;position:sticky;top:0;color:var(--admin-muted)}
.business-table-wrap td{padding:12px;vertical-align:top;border-top:1px solid var(--admin-border);white-space:nowrap}
.business-table-wrap td small{display:block;font-size:10px;color:var(--admin-muted);margin-top:4px}
.business-warning,.business-error{border:1px solid var(--admin-border);border-left:3px solid #d97706;border-radius:10px;padding:14px;margin:14px 0;background:var(--admin-surface);font-size:12px;line-height:1.7}
.business-error{border-left-color:#dc2626}
.business-loading{padding:20px;color:var(--admin-muted);font-size:12px}
.business-definitions,.business-details{border:1px solid var(--admin-border);border-radius:12px;padding:16px;margin:16px 0;font-size:12px}
.business-definitions summary,.business-details summary{font-weight:600;cursor:pointer}
.business-definitions p{line-height:1.7;color:var(--admin-muted)}
.business-chart{display:flex;align-items:flex-end;gap:6px;min-height:130px;overflow-x:auto;padding:12px 0}
.business-bar{flex:1;min-width:20px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;position:relative;height:125px}
.business-bar>span{width:85%;border-radius:4px 4px 0 0}.business-bar small{font-size:9px;color:var(--admin-muted);margin-top:6px}
.business-bar em{display:none;position:absolute;top:0;z-index:2;background:var(--admin-surface);padding:4px;font-size:11px;font-style:normal}.business-bar:hover em,.business-bar:focus em{display:block}
@media(max-width:1199px){.business-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.business-retention-grid{grid-template-columns:1fr}}
@media(max-width:639px){.business-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.business-trends,#business-activity{grid-template-columns:1fr}.business-panel{padding:14px}}
.recall-toolbar{flex-wrap:wrap;gap:12px}
.recall-toolbar>label{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--admin-text-soft)}
.recall-toolbar .admin-search{flex:1;min-width:240px}
.recall-toolbar select,.recall-toolbar .admin-search input{height:38px;border:1px solid var(--admin-field-border);border-radius:8px;background:var(--admin-field-bg);color:var(--admin-text-soft);padding:0 12px;font:inherit}
.recall-toolbar .admin-search input{width:100%;min-width:0}
.recall-toolbar select:focus-visible,.recall-toolbar input:focus-visible{outline:2px solid var(--admin-primary);outline-offset:2px}
.recall-result-intro{padding:22px 24px 12px}
.recall-result-intro h3{font-size:18px;margin:0 0 8px}
.recall-result-intro p,.recall-result-note{font-size:13px;line-height:1.7;color:var(--admin-muted)}
.recall-result-intro p{margin:0}
.recall-outcome-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;padding:8px 24px 16px}
.admin-button.recall-outcome-tab{display:flex;flex-direction:column;align-items:flex-start;gap:0;white-space:normal;border:1px solid var(--admin-border);background:var(--admin-surface);border-radius:10px;padding:14px!important;text-align:left;cursor:pointer;color:var(--admin-text-soft)}
.recall-outcome-tab strong{display:block;margin-top:10px;font-size:24px;font-variant-numeric:tabular-nums;color:var(--admin-text)}
.admin-button.recall-outcome-tab.active{border-color:var(--admin-primary)!important;background:var(--admin-primary-soft)!important;box-shadow:inset 0 0 0 1px var(--admin-primary)}
.recall-outcome-tab.active span{color:var(--admin-primary)}
.recall-outcome-tab:focus-visible{outline:3px solid var(--admin-primary);outline-offset:2px}
.recall-result-note{margin:0 24px 16px;padding:10px 14px;background:var(--admin-surface-soft);border-radius:8px}
.recall-results-wrap{overflow:auto;max-height:none!important;height:auto!important;resize:none!important}
.recall-results-table{table-layout:fixed;min-width:940px}
.recall-results-table th:nth-child(1){width:23%}
.recall-results-table th:nth-child(2){width:29%}
.recall-results-table th:nth-child(3){width:18%}
.recall-results-table th:nth-child(4){width:19%}
.recall-results-table th:nth-child(5){width:11%}
.recall-results-table td{padding:18px!important;font-size:14px;vertical-align:top;overflow-wrap:anywhere}
.recall-results-table th{padding:14px 18px!important;text-align:left}
.recall-results-table .proactive-cell-note,.recall-results-table .proactive-user-cell small{font-size:12px;line-height:1.6}
.recall-message-preview{margin:7px 0 0;line-height:1.65;color:var(--admin-text-soft);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.recall-evidence-list{display:flex;flex-wrap:wrap;gap:6px}
.recall-evidence{display:inline-block;padding:4px 8px;border-radius:5px;font-size:12px;white-space:nowrap}
.recall-evidence.positive{background:var(--admin-success-soft);color:var(--admin-success)}
.recall-evidence.neutral{background:var(--admin-surface-soft);color:var(--admin-muted)}
.recall-detail-row[hidden]{display:none!important}
.recall-detail-row>td{background:var(--admin-surface-soft)}
.recall-detail-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:28px;padding:6px}
.recall-detail-grid h4{font-size:14px;margin:0 0 16px}
.recall-full-message{white-space:pre-wrap;line-height:1.8;margin:12px 0 20px}
.recall-detail-meta{font-size:12px;line-height:1.9;color:var(--admin-muted);user-select:text}
.recall-timeline{list-style:none;margin:0;padding:0}
.recall-timeline li{display:flex;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid var(--admin-border);color:var(--admin-muted);font-size:12px}
.recall-timeline li.recorded{color:var(--admin-text-soft)}
.recall-timeline time{font-variant-numeric:tabular-nums}
.recall-error{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--admin-danger);background:var(--admin-danger-soft);padding:12px;border-radius:6px;font-size:12px}
.recall-health-details{margin-top:16px;padding:16px 20px}
.recall-health-details>summary{cursor:pointer;font-weight:600}
.recall-queue-guide{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 24px;border-bottom:1px solid var(--admin-border)}
.recall-queue-guide p{color:var(--admin-muted);line-height:1.7;margin:6px 0 0}
.notification-proactive-embedded.is-jobs .proactive-resizable-table{height:auto;max-height:none;resize:none}
.notification-proactive-embedded.is-jobs .proactive-table td{font-size:14px;line-height:1.7;padding:16px}
.notification-proactive-embedded.is-jobs .proactive-cell-note,.notification-proactive-embedded.is-jobs .proactive-error-text{font-size:12px;line-height:1.7}
@media(max-width:1100px){.recall-outcome-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.recall-detail-grid{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.recall-outcome-tabs{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px 14px}.recall-queue-guide{align-items:flex-start;flex-direction:column}.recall-result-intro{padding:18px 14px}.recall-result-note{margin:8px 14px}.recall-toolbar .admin-search{min-width:100%}}

/* Behavior journeys: colors identify observed activity types; width counts events, not time. */
.behavior-journey-overview{padding:18px 20px 22px;background:var(--admin-surface);border-bottom:1px solid var(--admin-border);margin:-10px -10px 18px}
.behavior-journey-eyebrow{font-size:11px;font-weight:700;color:var(--admin-primary)}
.behavior-journey-overview h4{font-size:20px;letter-spacing:-.4px;margin:5px 0 7px;color:var(--admin-text)}
.behavior-journey-overview p{font-size:12px;line-height:1.7;color:var(--admin-muted);margin:0;max-width:72ch}
.journey-tone-discover{--journey-color:#3371b6;--journey-soft:#edf4fc}
.journey-tone-detail{--journey-color:#7861a4;--journey-soft:#f4f0fa}
.journey-tone-chat{--journey-color:#167e67;--journey-soft:#eaf6f1}
.journey-tone-account{--journey-color:#976818;--journey-soft:#fbf4e5}
.journey-tone-problem{--journey-color:#bc4550;--journey-soft:#fceff0}
.journey-tone-away,.journey-tone-system{--journey-color:#64748b;--journey-soft:#f1f4f8}
.behavior-journey-distribution{display:flex;gap:3px;height:8px;border-radius:4px;overflow:hidden;margin-top:19px}
.behavior-journey-distribution>span{background:var(--journey-color);min-width:3px;flex-basis:0}
.behavior-journey-legend{display:flex;flex-wrap:wrap;gap:8px 17px;margin-top:11px;align-items:center;font-size:11px;color:var(--admin-text-soft)}
.behavior-journey-legend>span{display:flex;align-items:center;gap:5px}
.behavior-journey-legend i{width:6px;height:6px;border-radius:2px;background:var(--journey-color)}
.behavior-journey-legend b{font-variant-numeric:tabular-nums}
.behavior-journey-legend small{color:var(--admin-muted);margin-left:auto;font-size:10px}
.behavior-journey-session{border-radius:12px;background:var(--admin-surface);border:1px solid var(--admin-border);margin:0 0 18px;overflow:hidden}
.behavior-journey-session>header{display:flex;align-items:center;gap:12px;padding:18px 20px}
.behavior-journey-session-number{font-size:24px;font-weight:700;color:var(--admin-muted);font-variant-numeric:tabular-nums;letter-spacing:-1px}
.behavior-journey-session h4{font-size:14px;margin:0;color:var(--admin-text)}
.behavior-journey-session>header p{font-size:11px;color:var(--admin-muted);margin:4px 0 0}
.behavior-journey-session>header>span{margin-left:auto;font-size:11px;color:var(--admin-muted)}
.behavior-journey-map{display:flex;align-items:center;gap:4px;flex-wrap:wrap;padding:0 20px 17px;border-bottom:1px solid var(--admin-border)}
.behavior-journey-map .admin-button{min-height:30px;height:auto;white-space:normal;box-shadow:none;position:relative;display:flex;align-items:center;gap:6px;border:0;padding:7px 10px;border-radius:6px;background:var(--journey-soft);color:var(--journey-color);font-size:11px;font-weight:650;cursor:pointer;font-family:inherit}
.behavior-journey-map button:hover{filter:brightness(.95)}
.behavior-journey-map button:focus-visible,.behavior-journey-card>summary:focus-visible{outline:2px solid var(--admin-primary);outline-offset:3px}
.behavior-journey-map svg{width:15px;height:15px;flex-shrink:0}
.behavior-journey-map b{margin-left:5px;opacity:.5}
.behavior-journey-track{padding:20px 20px 4px;margin:0;list-style:none}
.behavior-journey-phase{display:grid;grid-template-columns:94px minmax(0,1fr);gap:12px;position:relative;padding:0 0 18px;scroll-margin-top:20px}
.behavior-journey-rail{display:flex;align-items:flex-start;gap:9px;padding-top:17px;position:relative}
.behavior-journey-rail:after{content:"";position:absolute;top:48px;bottom:-17px;right:15px;width:1px;background:var(--admin-border)}
.behavior-journey-phase:last-child .behavior-journey-rail:after{display:none}
.behavior-journey-rail time{font-size:10px;line-height:32px;font-variant-numeric:tabular-nums;color:var(--admin-muted);white-space:nowrap}
.behavior-journey-rail>span{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;color:var(--journey-color);background:var(--journey-soft);flex-shrink:0}
.behavior-journey-rail svg{width:18px;height:18px}
.behavior-journey-card{min-width:0;border:1px solid var(--admin-border);border-left:3px solid var(--journey-color);border-radius:9px;background:var(--admin-surface)}
.behavior-journey-card>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;cursor:pointer;border-radius:8px}
.behavior-journey-card>summary::-webkit-details-marker{display:none}
.behavior-journey-card>summary:hover{background:var(--admin-surface-soft)}
.behavior-journey-card-main{min-width:0}
.behavior-journey-category{font-size:10px;font-weight:650;color:var(--journey-color)}
.behavior-journey-card h5{font-size:16px;font-weight:700;color:var(--admin-text);line-height:1.5;margin:5px 0 9px;overflow-wrap:anywhere}
.behavior-journey-metrics{display:flex;gap:7px 16px;flex-wrap:wrap;align-items:center;color:var(--admin-text-soft);font-size:11px}
.behavior-journey-metrics b{font-size:21px;font-variant-numeric:tabular-nums;margin-right:5px;color:var(--journey-color);letter-spacing:-.5px}
.behavior-journey-metrics mark{padding:4px 7px;color:var(--journey-color);background:var(--journey-soft);border-radius:4px;font-size:10px}
.behavior-journey-card p{margin:9px 0 0;font-size:10px;line-height:1.6;color:var(--admin-muted)}
.behavior-journey-expand{white-space:nowrap;color:var(--admin-muted);font-size:10px;display:flex;gap:8px;align-items:center}
.behavior-journey-expand b{font-size:15px}
.behavior-journey-card[open] .behavior-journey-expand b{transform:rotate(180deg)}
.behavior-journey-evidence{padding:0 14px 8px;border-top:1px solid var(--admin-border);overflow-wrap:anywhere}
.behavior-journey-evidence .behavior-activity-step{grid-template-columns:56px 12px minmax(0,1fr)}
.behavior-journey-evidence .behavior-activity-card{display:block}
.behavior-journey-evidence .behavior-activity-action strong{font-size:11px}
.behavior-journey-evidence .behavior-activity-card dl{margin-top:5px}
.behavior-journey-session>footer{display:flex;align-items:center;gap:8px;padding:13px 20px;background:var(--admin-surface-soft);color:var(--admin-muted);font-size:11px;line-height:1.6}
.behavior-journey-session>footer svg{width:16px;height:16px;flex-shrink:0}
.behavior-journey-session>footer strong{font-weight:600;color:var(--admin-text-soft)}
@media(max-width:1100px){.behavior-day-detail-heading{flex-wrap:wrap}.behavior-day-detail-heading .behavior-action-filters{justify-content:flex-start}}
@media(max-width:600px){
 .behavior-journey-overview{padding:16px}.behavior-journey-overview h4{font-size:18px}
 .behavior-journey-session>header{padding:15px 12px;flex-wrap:wrap}.behavior-journey-session>header>span{width:100%;margin:0}
 .behavior-journey-map{padding:0 12px 12px}.behavior-journey-track{padding:12px 10px 0}
 .behavior-journey-phase{grid-template-columns:minmax(0,1fr);gap:6px;padding-bottom:14px}
 .behavior-journey-rail{padding:0;align-items:center;flex-direction:row-reverse;justify-content:flex-end}.behavior-journey-rail:after{display:none}
 .behavior-journey-rail>span{width:25px;height:25px}.behavior-journey-rail svg{width:15px;height:15px}
 .behavior-journey-card>summary{padding:12px;gap:7px}.behavior-journey-card h5{font-size:14px}.behavior-journey-expand{font-size:9px}
 .behavior-journey-evidence{padding:0 8px 8px}.behavior-journey-evidence .behavior-activity-step{grid-template-columns:1fr}.behavior-journey-evidence .behavior-activity-dot{display:none}.behavior-journey-evidence time{text-align:left}
 .behavior-journey-session>footer{padding:12px}.behavior-journey-legend small{width:100%;margin:0}
}

/* Subscription diagnostics: observed stages and explicit evidence gaps. */
.subscription-diagnosis{background:var(--admin-surface);margin:-10px;padding:22px;color:var(--admin-text-soft)}
.subscription-diagnosis-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:24px}
.subscription-diagnosis-header>div>span{color:var(--admin-primary);font-size:11px;font-weight:700}
.subscription-diagnosis-header h3{font-size:22px;letter-spacing:-.5px;line-height:1.45;margin:8px 0;color:var(--admin-text)}
.subscription-diagnosis-header p{font-size:12px;color:var(--admin-muted);line-height:1.6;margin:0}
.diagnosis-status{flex-shrink:0;padding:6px 9px;border-radius:5px;font-size:10px;font-weight:600;background:var(--admin-surface-soft);color:var(--admin-muted)}
.diagnosis-success{color:#167e67;background:#eaf6f1}.diagnosis-problem{color:#ab5632;background:#fff1e8}
.subscription-conversion-path{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:13px;padding:5px 0 12px}
.subscription-conversion-path .subscription-stage{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:7px;min-width:0;height:auto;min-height:162px;padding:13px 11px!important;border:1px dashed var(--admin-border);border-radius:9px!important;background:var(--admin-surface-soft)!important;color:var(--admin-muted)!important;text-align:left;white-space:normal;box-shadow:none;transform:none!important}
.subscription-stage-index{position:absolute;top:12px;right:11px;font-size:10px;opacity:.7;font-variant-numeric:tabular-nums}
.subscription-stage i{display:grid;place-items:center;width:29px;height:29px;background:var(--admin-surface);border-radius:7px;margin-bottom:3px}
.subscription-stage svg{width:18px;height:18px}
.subscription-stage strong{font-size:13px;color:var(--admin-text);line-height:1.5}
.subscription-stage small{font-size:10px;font-weight:400;line-height:1.5;min-height:30px}
.subscription-stage>b{margin-top:auto;font-size:11px;font-weight:600}
.subscription-conversion-path .subscription-stage.is-observed{border-style:solid!important;border-color:#b8dacf!important;background:#f1f9f5!important;color:#18775e!important}
.subscription-conversion-path .subscription-stage.is-focus{outline:2px solid #c78243;outline-offset:2px}
.subscription-stage-arrow{position:absolute;right:-14px;top:68px;color:var(--admin-muted);font-size:16px;z-index:1}
.subscription-stage:last-child .subscription-stage-arrow{display:none}
.subscription-stage:focus-visible{outline:2px solid var(--admin-primary)!important;outline-offset:3px}
.subscription-path-note{font-size:10px;line-height:1.7;color:var(--admin-muted);margin:5px 0 21px}
.subscription-diagnosis-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:16px;margin-bottom:26px}
.subscription-verdict{padding:18px 20px;border:1px solid var(--admin-border);border-radius:9px}
.subscription-verdict h4,.subscription-next-check h4,.subscription-entry-analysis h4,.subscription-evidence h4{margin:0 0 12px;font-size:14px;font-weight:700;color:var(--admin-text)}
.subscription-verdict>div{display:grid;grid-template-columns:72px minmax(0,1fr);gap:12px;margin-top:14px}
.subscription-verdict b{font-size:11px;font-weight:650;padding-top:2px;color:var(--admin-muted)}
.subscription-verdict p,.subscription-next-check p{margin:0;font-size:12px;line-height:1.8}
.subscription-next-check{padding:18px 20px;background:#fff8ee;border:1px solid #f1ddc3;border-radius:9px}
.subscription-next-check>span{color:#916130;font-size:10px;font-weight:700}
.subscription-next-check h4{margin-top:6px}.subscription-next-check button{margin-top:16px}
.subscription-entry-analysis{border-top:1px solid var(--admin-border);padding-top:20px}
.subscription-entry-analysis>header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.subscription-entry-analysis h4{margin-bottom:5px}.subscription-entry-analysis p,.subscription-entry-analysis>header>span{font-size:11px;color:var(--admin-muted);margin:0;line-height:1.6}
.subscription-entry-table{overflow-x:auto;border:1px solid var(--admin-border);border-radius:8px}
.subscription-entry-table table{width:100%;border-collapse:collapse;text-align:left;font-size:11px}
.subscription-entry-table th{font-size:10px;color:var(--admin-muted);background:var(--admin-surface-soft);padding:10px 12px;white-space:nowrap}
.subscription-entry-table td{padding:12px;border-top:1px solid var(--admin-border);min-width:90px;overflow-wrap:anywhere}
.subscription-entry-table small{display:block;margin-top:5px;font-size:10px;color:var(--admin-muted)}
.subscription-entry-table .admin-button{display:block;font-size:10px;margin-top:6px;min-height:26px}
.subscription-evidence-empty{padding:18px;border:1px dashed var(--admin-border);border-radius:8px;font-size:12px;line-height:1.8;color:var(--admin-muted);background:var(--admin-surface-soft)}
.subscription-evidence{margin-top:22px;border-top:1px solid var(--admin-border);padding-top:18px}
.subscription-evidence>header{display:flex;justify-content:space-between;gap:12px}.subscription-evidence>p,.subscription-evidence>header>span{font-size:11px;color:var(--admin-muted);line-height:1.8}
.subscription-evidence .behavior-activity-card{display:block}.subscription-evidence .behavior-activity-card dl{margin-top:6px}
@media(max-width:1200px){.subscription-conversion-path{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.subscription-stage:nth-child(3) .subscription-stage-arrow{display:none}}
@media(max-width:650px){.subscription-diagnosis{padding:15px}.subscription-diagnosis-header{display:block;margin-bottom:18px}.subscription-diagnosis-header h3{font-size:19px}.diagnosis-status{display:inline-block;margin-top:12px}.subscription-conversion-path{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.subscription-stage:nth-child(3) .subscription-stage-arrow{display:block}.subscription-stage:nth-child(2n) .subscription-stage-arrow{display:none}.subscription-diagnosis-grid{grid-template-columns:1fr}.subscription-verdict,.subscription-next-check{padding:15px}.subscription-verdict>div{grid-template-columns:1fr;gap:5px}.subscription-entry-analysis>header{display:block}.subscription-entry-analysis>header>span{display:block;margin-top:8px}.subscription-evidence .behavior-activity-step{grid-template-columns:1fr}.subscription-evidence .behavior-activity-dot{display:none}.subscription-evidence .behavior-activity-step time{text-align:left}}

/* Operations summary: one conclusion, observed actions, and one next action. */
.subscription-ops{background:var(--admin-surface);margin:-10px;padding:25px}
.subscription-ops>header>span{font-size:12px;font-weight:650;color:var(--admin-muted)}
.subscription-ops>header h3{font-size:25px;line-height:1.45;color:var(--admin-text);letter-spacing:-.5px;margin:8px 0 10px}
.subscription-ops>header p{font-size:14px;line-height:1.8;color:var(--admin-text-soft);margin:0;max-width:65ch}
.subscription-ops-facts{margin:25px 0 20px}
.subscription-ops-facts h4,.subscription-ops-action h4{font-size:14px;font-weight:700;color:var(--admin-text);margin:0 0 10px}
.subscription-ops-facts ul{display:flex;gap:10px;flex-wrap:wrap;list-style:none;padding:0;margin:0}
.subscription-ops-facts li{padding:9px 13px;border-radius:7px;background:var(--admin-surface-soft);font-size:14px;color:var(--admin-text-soft)}
.subscription-ops-progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:0;list-style:none;gap:12px;margin:0 0 26px}
.subscription-ops-progress li{position:relative;display:grid;justify-items:center;gap:8px;text-align:center;padding:18px 10px;border-radius:9px;background:var(--admin-surface-soft);color:var(--admin-muted)}
.subscription-ops-progress li.is-seen{background:#edf7f2;color:#207a61}
.subscription-ops-progress li>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--admin-surface);font-size:17px;font-weight:700}
.subscription-ops-progress strong{font-size:14px;font-weight:650}.subscription-ops-progress small{font-size:12px}
.subscription-ops-progress li:not(:last-child):after{position:absolute;content:'→';right:-13px;top:48px;color:var(--admin-muted);font-size:17px;z-index:1}
.subscription-ops-action{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px;border-left:3px solid #c58a47;border-radius:8px;background:#fff8ee}
.subscription-ops-action>div>span{display:block;font-size:11px;color:#8d602a;font-weight:650;margin-bottom:7px}
.subscription-ops-action p{font-size:14px;line-height:1.8;margin:0;color:var(--admin-text-soft);max-width:58ch}
.subscription-ops-action button{flex-shrink:0}
.subscription-ops-scope{font-size:11px;color:var(--admin-muted);line-height:1.7;margin:15px 0 23px}
.subscription-ops-details{border-top:1px solid var(--admin-border)}
.subscription-ops-details>summary{cursor:pointer;list-style:none;padding:17px 0;font-size:13px;color:var(--admin-text-soft);font-weight:650}
.subscription-ops-details>summary:before{content:'▸';display:inline-block;margin-right:9px}.subscription-ops-details[open]>summary:before{transform:rotate(90deg)}
.subscription-ops-details>summary span{font-size:11px;font-weight:400;color:var(--admin-muted);margin-left:10px}
.subscription-ops-details>summary:focus-visible{outline:2px solid var(--admin-primary);outline-offset:2px}
.subscription-ops-details .subscription-diagnosis{margin:0;padding:15px 0}
@media(max-width:650px){.subscription-ops{padding:17px}.subscription-ops>header h3{font-size:21px}.subscription-ops-progress{grid-template-columns:repeat(2,minmax(0,1fr))}.subscription-ops-progress li:nth-child(2):after{display:none}.subscription-ops-action{display:block;padding:16px}.subscription-ops-action button{margin-top:14px}.subscription-ops-facts li{font-size:13px}}

/* Subscription exposure history: visible in both range and daily views. */
.paywall-history{padding:20px;min-width:0}
.paywall-range .paywall-history{padding:0}
.paywall-history header>span{font-size:12px;color:var(--admin-primary);font-weight:600}
.paywall-history h3{font-size:20px;margin:6px 0;color:var(--admin-text)}
.paywall-history header p,.paywall-record>p{font-size:12px;color:var(--admin-muted);line-height:1.6}
.paywall-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0;padding:16px;border:1px solid var(--admin-border);border-radius:10px}
.paywall-metrics span{display:block;font-size:12px;color:var(--admin-muted)}
.paywall-metrics strong{display:block;margin-top:6px;font-size:22px;font-variant-numeric:tabular-nums}
.paywall-record{padding:16px 0;border-top:1px solid var(--admin-border);overflow-wrap:anywhere}
.paywall-record-heading{display:grid;grid-template-columns:155px minmax(0,1fr) minmax(140px,.7fr);gap:16px;align-items:start;font-size:13px}
.paywall-record time{font-size:12px;color:var(--admin-muted);font-variant-numeric:tabular-nums}
.paywall-record-heading>span{color:var(--admin-text-soft)}
.paywall-record details{margin-top:10px;font-size:12px}
.paywall-record summary{cursor:pointer;color:var(--admin-primary);padding:4px 0}
.paywall-record ol{padding-left:20px;line-height:1.9}
@media(max-width:800px){.paywall-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.paywall-record-heading{grid-template-columns:1fr;gap:6px}}

.behavior-replay-steps{list-style:none;margin:12px 0;padding:0;display:grid;gap:8px;font-size:12px;line-height:1.6}
.behavior-replay-steps li{display:grid;grid-template-columns:54px 32px minmax(0,1fr);gap:8px;align-items:start;overflow-wrap:anywhere}
.behavior-replay-steps time{font-size:11px;color:var(--admin-muted);font-variant-numeric:tabular-nums}
.behavior-replay-kind{font-size:10px;color:var(--admin-muted);border:1px solid var(--admin-border);border-radius:4px;text-align:center}
.character-swappable-asset[draggable=true]{position:relative;transition:border-color .15s ease,box-shadow .15s ease}
.character-swappable-asset.asset-drop-target{border-color:var(--admin-primary);box-shadow:0 0 0 2px var(--admin-primary)}
.character-swappable-asset.asset-drop-target::after{content:attr(data-drop-hint);position:absolute;inset:8px 8px auto;background:var(--admin-primary);color:white;padding:8px 12px;border-radius:8px;font-size:13px;text-align:center;pointer-events:none}
.asset-swap-dialog{color:var(--admin-text);border:1px solid var(--admin-border);border-radius:16px;padding:24px;width:min(800px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto}
.asset-swap-dialog::backdrop{background:rgb(0 0 0 / .5)}
.asset-swap-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:20px 0}
.asset-swap-canvas-wrap{height:320px;display:flex;align-items:center;justify-content:center;margin:12px 0;background:var(--admin-surface-soft);border-radius:8px;overflow:hidden}
.asset-swap-canvas-wrap canvas{max-width:100%;max-height:100%;width:auto;height:auto;cursor:grab;touch-action:none}
.asset-swap-canvas-wrap canvas:active{cursor:grabbing}
.asset-swap-slider{display:flex;align-items:center;gap:12px;min-height:44px;font-size:12px}
.asset-swap-slider span{width:56px;flex-shrink:0}
.asset-swap-slider input{flex:1;min-width:0;accent-color:var(--admin-primary)}
.asset-swap-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px;max-height:55vh;overflow:auto}
.asset-swap-picker button{display:flex;flex-direction:column;gap:8px;padding:8px;white-space:normal}
.asset-swap-picker img{height:120px;width:100%;object-fit:contain;border-radius:8px}
@media(max-width:560px){.asset-swap-dialog{padding:16px}.asset-swap-previews{grid-template-columns:1fr;gap:20px}.asset-swap-canvas-wrap{height:240px}.asset-swap-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}
