:root {
  color: #13233f;
  background: #eef6ff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100%; background: radial-gradient(circle at 8% 8%, rgba(43, 111, 255, .16), transparent 30%), radial-gradient(circle at 92% 12%, rgba(0, 214, 201, .14), transparent 28%), #eef6ff; }
button, input, textarea, select { font: inherit; }
button {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #1f5eff 0%, #1743c5 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 11px 16px;
  box-shadow: 0 10px 22px rgba(31, 94, 255, 0.22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(31, 94, 255, 0.26); }
button.secondary { background: linear-gradient(135deg, rgba(232, 244, 255, .96), rgba(236, 232, 255, .96)); color: #2455d6; border: 1px solid rgba(89, 126, 247, .24); box-shadow: 0 8px 20px rgba(46, 91, 255, .10); }
button.danger { background: #fff1f1; color: #c02626; box-shadow: none; }
code { background: #edf1ff; border-radius: 6px; padding: 2px 6px; }

.login-layout {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 520px);
  gap: 0;
  padding: 48px;
  place-content: center;
  background:
    radial-gradient(circle at 15% 10%, rgba(31, 94, 255, .18), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, .18), transparent 28%),
    linear-gradient(135deg, #edf4ff 0%, #f8fbff 46%, #eef3f8 100%);
}
.login-panel, .login-aside, .panel, .card {
  border: 1px solid rgba(213, 222, 238, .85);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 24px 70px rgba(20, 32, 64, 0.11);
}
.login-panel {
  width: min(520px, calc(100vw - 40px));
  padding: 44px;
  align-self: center;
  justify-self: center;
  backdrop-filter: blur(16px);
}
.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #10213f;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 24px;
}
.brand-logo { display: block; object-fit: contain; }
.login-logo { width: 238px; height: auto; margin: 0 auto 28px; }
.logo-brand { display: flex; align-items: center; justify-content: center; min-height: 58px; margin-top: 0; }
.sidebar-logo { width: 168px; max-height: 66px; object-fit: contain; margin: 0 auto; }
.login-panel h1 { margin: 10px 0 14px; font-size: clamp(32px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.04em; text-align: center; }
.login-subtitle, .login-aside p, .panel p, .card p { color: #667085; line-height: 1.7; }
.login-aside {
  padding: 46px;
  align-self: center;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(145deg, #10213f 0%, #183b73 55%, #1f5eff 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.login-aside::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  right: -80px;
  bottom: -90px;
  background: rgba(255,255,255,.12);
}
.login-aside h2 { max-width: 560px; margin: 18px 0 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.12; letter-spacing: -0.03em; }
.login-aside p { color: rgba(255,255,255,.76); max-width: 620px; }
.status-pill {
  align-self: flex-start;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 8px 13px;
  color: #eaf2ff;
  font-weight: 700;
  font-size: 13px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}
.feature-grid div {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  padding: 18px;
}
.feature-grid strong { display: block; font-size: 18px; margin-bottom: 6px; }
.feature-grid span { color: rgba(255,255,255,.72); font-size: 14px; }
.eyebrow { color: #1f5eff; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.login-form, .form-grid { display: grid; gap: 16px; margin: 26px 0 0; }
.login-form label, .form-grid label { display: grid; gap: 8px; color: #344054; font-weight: 700; }
.login-form input, .form-grid input, .form-grid textarea, .form-grid select, .filter-bar input, .filter-bar select {
  border: 1px solid #d5deee;
  border-radius: 14px;
  background: #fff;
  color: #142033;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.login-form input:focus, .form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus, .filter-bar input:focus, .filter-bar select:focus {
  border-color: #1f5eff;
  box-shadow: 0 0 0 4px rgba(31, 94, 255, .10);
}
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(140px, auto)); gap: 10px; margin: 16px 0 22px; }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid textarea { min-height: 120px; resize: vertical; }
.form-grid small { color: #667085; font-size: 13px; font-weight: 500; line-height: 1.5; }
.gewe-config-panel { max-width: 1100px; }
.gewe-config-form { align-items: start; }
.config-notice { padding: 14px 16px; border: 1px solid #cddcff; border-radius: 14px; background: #f5f8ff; color: #35558a; line-height: 1.6; }
.alert { display: grid; gap: 8px; border-radius: 14px; padding: 14px; }
.alert.error { background: #fff0f0; color: #b42318; }

.app-layout { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar {
  background: linear-gradient(180deg, #0e1a31 0%, #132a4e 100%);
  color: #fff;
  padding: 30px 18px;
  box-shadow: 16px 0 44px rgba(20, 32, 64, .14);
}
.brand { font-size: 30px; font-weight: 950; letter-spacing: .08em; }
.sidebar p { color: #9fb0d1; margin: 8px 0 0; }
.sidebar nav { display: grid; gap: 8px; margin-top: 30px; }
.nav-item {
  width: 100%;
  background: transparent;
  color: #d9e2ff;
  text-align: left;
  border-radius: 14px;
  box-shadow: none;
  padding: 12px 14px;
}
.nav-item:hover { background: rgba(255,255,255,.08); transform: none; box-shadow: none; }
.nav-item.active { background: #fff; color: #15356e; box-shadow: 0 12px 26px rgba(0,0,0,.16); }
.main-panel { padding: 30px; overflow: auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.topbar h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: -0.03em; }
.topbar p { margin: 0; color: #667085; }
.hero-card {
  border-radius: 28px;
  background: linear-gradient(135deg, #10213f 0%, #1f5eff 100%);
  color: #fff;
  padding: 34px;
  box-shadow: 0 24px 58px rgba(20, 32, 64, 0.18);
}
.hero-card p { color: #e4e9ff; max-width: 760px; }
.hero-card h2 { margin: 8px 0 12px; font-size: clamp(28px, 3vw, 42px); letter-spacing: -0.03em; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.card, .panel { padding: 24px; margin-bottom: 20px; }
.card h3, .panel h2 { margin: 0 0 10px; }
.card strong { display: block; color: #1f5eff; font-size: 34px; letter-spacing: -0.03em; }
.section-head, .quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.quick-actions { justify-content: flex-start; margin: 16px 0; }
.table-list { display: grid; gap: 12px; }
.record-row {
  border: 1px solid #e5eaf5;
  border-radius: 18px;
  background: #fbfcff;
  padding: 16px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.record-row:hover { border-color: #c9d7f3; box-shadow: 0 12px 26px rgba(20, 32, 64, .07); transform: translateY(-1px); }
.record-row strong { display: block; margin-bottom: 7px; }
.record-row span { color: #667085; font-size: 13px; }
.record-row p { margin-bottom: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
pre {
  overflow: auto;
  max-height: 380px;
  border-radius: 14px;
  background: #0e1a31;
  color: #d6e4ff;
  padding: 16px;
  white-space: pre-wrap;
}

@media (max-width: 980px) {
  .login-layout { grid-template-columns: 1fr; padding: 24px; }
  .login-aside { min-height: auto; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { border-radius: 0 0 24px 24px; }
}
@media (max-width: 640px) {
  .main-panel { padding: 18px; }
  .topbar { flex-direction: column; }
  .filter-bar, .feature-grid { grid-template-columns: 1fr; }
  .login-panel, .login-aside { padding: 28px; }
}

.nav-group { display: grid; gap: 7px; margin: 18px 0; }
.nav-group > span { color: #7f94bd; font-size: 12px; font-weight: 900; letter-spacing: .08em; padding: 0 12px; }
.table-head { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; border: 1px solid #e5eaf5; border-radius: 18px; background: #fff; }
.data-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.data-table th, .data-table td { padding: 14px 16px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: middle; }
.data-table th { background: #f7f9fd; color: #475467; font-size: 13px; font-weight: 900; }
.data-table td { color: #27364f; font-size: 14px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:last-child { white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.empty-cell, .empty-hint { color: #667085; text-align: center; padding: 28px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 800; }
.badge.ok, .badge.success { background: #e9f8ef; color: #067647; }
.badge.warning { background: #fff6e5; color: #b54708; }
.badge.muted { background: #f2f4f7; color: #667085; }
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.step-card { border: 1px solid #e5eaf5; border-radius: 18px; padding: 18px; background: #fbfcff; display: flex; align-items: flex-start; gap: 12px; }
.step-card b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #1f5eff; color: #fff; flex: 0 0 auto; }
.step-card span { color: #344054; line-height: 1.6; }
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .48); display: grid; place-items: center; padding: 24px; z-index: 20; }
.modal-card { width: min(960px, 96vw); max-height: 90vh; overflow: auto; border-radius: 24px; background: #fff; box-shadow: 0 24px 80px rgba(15, 23, 42, .28); padding: 24px; }
.filter-bar.single { grid-template-columns: minmax(220px, 1fr) auto; }

/* Production console density polish */
.modal-card { width: min(820px, 94vw); padding: 22px; }
.modal-card .section-head { border-bottom: 1px solid #edf1f7; padding-bottom: 14px; margin-bottom: 18px; }
.icon-button { width: 34px; height: 34px; padding: 0; border-radius: 10px; background: linear-gradient(135deg, #eef6ff, #e9edff); color: #2455d6; border: 1px solid rgba(89,126,247,.20); box-shadow: none; font-size: 22px; line-height: 1; }
.icon-button:hover { transform: none; box-shadow: none; background: #e8edf5; }
.modal-form { margin: 0; gap: 14px 16px; align-items: start; }
.modal-form label { font-size: 13px; align-content: start; }
.modal-form label > .field-label, .modal-form label > .field-heading { min-height: 38px; align-content: start; }
.modal-form input:not([type="checkbox"]):not([type="radio"]), .modal-form select { height: 42px; min-height: 42px; }
.modal-form input, .modal-form textarea, .modal-form select { padding: 10px 12px; border-radius: 10px; }
.field-heading { display: grid; gap: 2px; }
.field-heading .field-hint { margin-top: 0; font-weight: 500; }
.modal-form textarea { min-height: 92px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; line-height: 1.5; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; border-top: 1px solid #edf1f7; }
.form-actions button { min-width: 84px; padding: 9px 16px; box-shadow: none; }
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 60;
  min-width: 148px;
  max-width: min(320px, calc(100vw - 48px));
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #1d4ed8;
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 14px 34px rgba(30, 64, 175, .28);
  pointer-events: none;
}
.toast.success { background: #2563eb; }
.toast.error { background: #c62828; border-color: #991b1b; }
.panel > .form-grid:not(.modal-form) button[type="submit"] { justify-self: start; min-width: 120px; }

/* Platform Admin redesign: light SaaS console, independent scroll panes */
html, body, #app { height: 100%; overflow: hidden; }
body { background: #f6f7fb; color: #171a1f; }
button { border-radius: 12px; background: linear-gradient(135deg, #2b6fff 0%, #00bcd4 100%); color: #fff; box-shadow: 0 10px 22px rgba(43,111,255,.22); padding: 9px 14px; font-weight: 800; }
button:hover { transform: none; box-shadow: none; filter: brightness(.96); }
button.secondary { background: linear-gradient(135deg, rgba(232, 244, 255, .96), rgba(236, 232, 255, .96)); color: #2455d6; border: 1px solid rgba(89, 126, 247, .24); box-shadow: 0 8px 20px rgba(46,91,255,.10); }
button.ghost { background: transparent; color: #4b5563; border: 1px solid transparent; box-shadow: none; }
button.ghost:hover { background: rgba(43,111,255,.10); }
.app-layout { height: 100vh; min-height: 0; grid-template-columns: 248px minmax(0, 1fr); background: #f7f8fb; overflow: hidden; }
.sidebar { height: 100vh; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 55%, #f7fbff 100%); color: #13233f; padding: 8px 14px 18px; border-right: 1px solid rgba(96, 132, 255, .18); box-shadow: 12px 0 36px rgba(43, 111, 255, .06); display: flex; flex-direction: column; }
.sidebar::-webkit-scrollbar, .main-panel::-webkit-scrollbar { width: 8px; height: 8px; }
.sidebar::-webkit-scrollbar-thumb, .main-panel::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
.brand { font-size: 24px; letter-spacing: -.03em; color: #111827; }
.sidebar p { color: #6b7280; font-size: 12px; margin-bottom: 16px; }
.sidebar nav { gap: 4px; margin-top: 16px; flex: 1; }
.nav-item { color: #4b5563; border-radius: 12px; padding: 11px 13px; font-weight: 700; font-size: 14px; }
.nav-item:hover { background: rgba(43,111,255,.10); color: #1743c5; }
.nav-item.active { background: linear-gradient(135deg, #2b6fff 0%, #7c3aed 100%); color: #fff; box-shadow: 0 12px 24px rgba(43,111,255,.24); }
.main-panel { min-width: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; padding: 30px 44px 56px; }
.site-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
  padding: 18px 12px 0;
  border-top: 1px solid #e5eaf2;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #2455d6; text-decoration: underline; }
.login-layout > .site-footer {
  position: fixed;
  right: 0;
  bottom: 36px;
  left: 0;
  z-index: 3;
  margin: 0;
  padding: 8px 20px;
  border-top: 0;
  color: #475569;
}
.topbar { position: sticky; top: -30px; z-index: 5; background: rgba(247,248,251,.94); backdrop-filter: blur(12px); padding: 20px 0 18px; margin: -30px 0 18px; border-bottom: 1px solid rgba(229,231,235,.78); }
.topbar h1 { font-size: 28px; color: #111827; letter-spacing: -.02em; }
.topbar p { color: #6b7280; font-size: 13px; }
.hero-card { background: #fff; color: #111827; border: 1px solid #edf0f4; border-radius: 18px; padding: 24px; box-shadow: 0 10px 30px rgba(17,24,39,.04); }
.hero-card h2 { font-size: 26px; }
.hero-card p { color: #6b7280; }
.eyebrow { color: #6b7280; letter-spacing: .08em; }
.card, .panel, .login-panel, .login-aside { border: 1px solid rgba(104, 134, 255, .18); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,255,.94)); box-shadow: 0 16px 42px rgba(33, 72, 160, .09); }
.card, .panel { padding: 20px; margin-bottom: 18px; }
.card strong { color: #111827; font-size: 28px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.admin-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin: 14px 0 18px; }
.admin-toolbar .toolbar-left, .admin-toolbar .toolbar-right { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-input, .compact-select { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; background: #fff; min-width: 220px; outline: none; }
.compact-select { min-width: 140px; }
.search-input:focus, .compact-select:focus { border-color: #2b6fff; box-shadow: 0 0 0 4px rgba(43,111,255,.12); }
.module-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.module-tab { background: rgba(239,246,255,.92); color: #2a4a7f; border: 1px solid rgba(95, 130, 255, .18); box-shadow: none; padding: 9px 16px; min-width: 5.5em; width: max-content; border-radius: 999px; text-align: center; }
.module-tab.active { background: linear-gradient(135deg, #2b6fff 0%, #00bcd4 100%); color: #fff; box-shadow: 0 10px 22px rgba(43,111,255,.22); }
.table-wrap { border-radius: 14px; border-color: #edf0f4; }
.data-table { min-width: 760px; }
.data-table th { background: linear-gradient(180deg, #eef6ff, #f8fbff); color: #31507d; }
.data-table th, .data-table td { padding: 13px 14px; }
.empty-hint { background: #fafafa; border-radius: 12px; margin-top: 12px; }
.action-modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(19, 35, 63, .34); backdrop-filter: blur(10px); }
.action-modal-card { width: min(680px, calc(100vw - 48px)); max-height: min(82vh, 760px); overflow-y: auto; background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,249,255,.96)); border: 1px solid rgba(108, 134, 255, .24); border-radius: 22px; box-shadow: 0 28px 90px rgba(28,62,142,.28); padding: 24px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(19, 35, 63, .38); backdrop-filter: blur(8px); }
.drawer { width: min(680px, calc(100vw - 32px)); height: 100%; max-height: 100vh; overflow-y: auto; box-sizing: border-box; padding: 24px; background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(245,249,255,.98)); border-left: 1px solid rgba(108,134,255,.22); box-shadow: -24px 0 72px rgba(28,62,142,.24); animation: drawer-enter .18s ease-out; }
.drawer-header { position: sticky; top: -24px; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: -24px -24px 22px; padding: 22px 24px 18px; border-bottom: 1px solid #e7edf5; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.drawer-header h2 { margin: 0; color: #172033; font-size: 24px; }
.drawer-header button { width: 38px; height: 38px; flex: 0 0 38px; padding: 0; border-radius: 50%; background: #eef3fb; color: #42526e; box-shadow: none; font-size: 24px; line-height: 1; }
@keyframes drawer-enter { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: translateX(0); } }
.sidebar-logout {
  width: 100%;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2b6fff 0%, #00bcd4 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(43,111,255,.22);
}
.action-modal-card-wide { width: min(980px, calc(100vw - 48px)); }
.action-modal-card-wide .modal-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.drawer-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid #edf0f4; padding-bottom: 16px; margin-bottom: 18px; }
.drawer-head h2 { margin: 0 0 6px; }
.drawer-head p { margin: 0; color: #6b7280; }
.drawer-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.detail-list div { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid #edf0f4; }
.detail-list span { color: #667085; font-size: 13px; }
.detail-list strong { color: #1d2939; overflow-wrap: anywhere; }
.password-input-wrap { display: flex; gap: 8px; align-items: stretch; }
.password-input-wrap input { min-width: 0; flex: 1; }
.password-input-wrap .password-toggle { flex: 0 0 auto; padding-inline: 14px; }
.hint-box { border: 1px dashed #d1d5db; border-radius: 14px; background: #fafafa; padding: 14px; color: #6b7280; line-height: 1.7; }
.step-list { margin: 10px 0 0; padding-left: 20px; color: #4b5563; line-height: 1.8; }
.login-layout { overflow-y: auto; }
@media (max-width: 980px) {
  html, body, #app { overflow: auto; height: auto; }
  .app-layout { height: auto; grid-template-columns: 1fr; overflow: visible; }
  .sidebar { height: auto; max-height: 42vh; border-right: 0; border-bottom: 1px solid #e8ebf0; }
  .main-panel { height: auto; overflow: visible; padding: 22px; }
  .topbar { position: static; margin: 0 0 18px; padding-top: 0; }
}
@media (max-height: 680px) {
  .login-layout { place-content: start center; padding-bottom: 104px; }
  .login-layout > .site-footer { bottom: 20px; }
}
.inline-details { margin-top: 16px; border: 1px solid #edf0f4; border-radius: 14px; background: #fafafa; padding: 14px; }
.inline-details summary { cursor: pointer; font-weight: 800; color: #374151; }
.inline-details .form-grid { margin-top: 14px; }
.empty-hint { display: grid; gap: 6px; text-align: left; border: 1px dashed #d1d5db; color: #6b7280; }
.empty-hint strong { color: #374151; font-size: 14px; }
.empty-hint span { line-height: 1.6; }
.section-head h2 { color: #111827; letter-spacing: -.01em; }
.section-head p { margin: 4px 0 0; color: #6b7280; font-size: 13px; }
.data-table .empty-cell { text-align: center; color: #9ca3af; background: #fcfcfd; }

/* Enterprise customer portal polish */
.portal-layout .sidebar,
.portal-sidebar {
  background: #fff;
  color: #111827;
  border-right: 1px solid #e8ebf0;
  box-shadow: none;
}
.portal-sidebar p { color: #6b7280; }
.portal-sidebar .nav-item { color: #4b5563; }
.portal-sidebar .nav-item:hover { background: rgba(43,111,255,.10); }
.portal-sidebar .nav-item.active { background: linear-gradient(135deg, #2b6fff 0%, #7c3aed 100%); color: #fff; box-shadow: 0 12px 24px rgba(43,111,255,.24); }
.portal-main { background: radial-gradient(circle at 8% 8%, rgba(43,111,255,.12), transparent 32%), #f4f9ff; }
.portal-hero { border: 1px solid #e5e7eb; }
.portal-toolbar { border: 1px solid #edf0f4; border-radius: 14px; padding: 12px; background: #fafafa; }
.portal-tabs { margin-top: 8px; }
.portal-panel .table-wrap { margin-top: 12px; }
.portal-chain { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.chain-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}
.chain-card > b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2b6fff 0%, #00bcd4 100%);
  color: #fff;
  flex: 0 0 auto;
}
.chain-card h3 { margin: 0 0 8px; color: #111827; }
.chain-card strong { display: block; font-size: 30px; letter-spacing: -.03em; color: #111827; }
.chain-card p { margin: 6px 0 0; color: #6b7280; line-height: 1.6; }
.config-card { display: grid; gap: 8px; align-content: start; }
.config-card .badge { justify-self: start; }
.portal-drawer .hint-box { margin-top: 16px; }
.wechat-login-panel { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.wechat-qr-card, .wechat-login-guide { border: 1px solid #e5eaf5; border-radius: 18px; background: #fff; padding: 22px; }
.wechat-qr-card { display: grid; justify-items: center; gap: 12px; text-align: center; }
.wechat-qr-card h3, .wechat-login-guide h3 { margin: 0 0 8px; }
.wechat-qr-card p { margin: 0; color: #667085; }
.wechat-qr-image { width: 240px; height: 240px; object-fit: contain; border: 1px solid #edf1f7; border-radius: 14px; background: #fff; padding: 8px; }
.wechat-avatar { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: #f2f4f7; }
.wechat-message-identity { display: inline-flex; align-items: center; gap: 9px; min-width: 150px; }
.wechat-message-avatar { position: relative; display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; overflow: hidden; border-radius: 10px; background: #eef3ff; color: #2455d6; font-size: 13px; font-weight: 800; }
.wechat-message-avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; background: #eef3ff; }
.table-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.table-actions button { padding: 7px 10px; font-size: 12px; }
.prompt-template-panel .table-actions { flex-wrap: nowrap; white-space: nowrap; }
.portal-login .login-aside { background: linear-gradient(145deg, #123b8f 0%, #245bdb 54%, #00bcd4 100%); }
.portal-login .brand-mark { background: linear-gradient(135deg, #2b6fff 0%, #00bcd4 100%); }
@media (max-width: 640px) {
  .portal-toolbar, .portal-toolbar .toolbar-left, .portal-toolbar .toolbar-right { display: grid; grid-template-columns: 1fr; }
  .wechat-login-panel { grid-template-columns: 1fr; }
  .wechat-qr-image { width: min(240px, 100%); height: auto; aspect-ratio: 1; }
  .portal-toolbar .search-input, .portal-toolbar .compact-select { min-width: 0; }
}

/* Platform admin compact operation-first layout */
.platform-admin .topbar { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #edf0f4; }
.platform-admin .topbar h1 { font-size: 26px; }
.platform-admin .topbar p { font-size: 12px; color: #9ca3af; }
.platform-admin .section-head { margin-bottom: 10px; }
.platform-admin .panel { padding: 18px; }
.platform-admin .empty-hint { padding: 16px; margin-top: 10px; }
.platform-admin .compact-empty span { color: #9ca3af; }
.platform-admin .card p { font-size: 12px; line-height: 1.5; }
.platform-admin .admin-toolbar { margin: 10px 0 14px; }
.platform-admin .module-tabs { margin: 10px 0 14px; }

/* Platform admin page frame: title -> tabs -> tab content */
.platform-admin .account-topbar { display: none; }
.account-meta { display: flex; align-items: center; gap: 12px; color: #6b7280; font-size: 13px; }
.page-title-card {
  border: 1px solid #edf0f4;
  border-radius: 18px;
  padding: 26px 30px;
  margin-bottom: 18px;
  background: linear-gradient(120deg, #ffffff 0%, #f8fbff 55%, #e7f6ff 100%);
  box-shadow: 0 10px 30px rgba(17,24,39,.04);
}
.page-title-card h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: -.03em; color: #111827; }
.page-title-card p { margin: 0; color: #4b5563; font-size: 14px; }
.tab-shell {
  border: 1px solid #edf0f4;
  border-radius: 18px;
  background: #fff;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(17,24,39,.035);
}
.tab-shell .module-tabs { margin: 0; }
.platform-admin .panel > .admin-toolbar { margin-top: 14px; }
.admin-toolbar { flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.admin-toolbar .toolbar-left, .admin-toolbar .toolbar-right { flex-wrap: nowrap; gap: 6px; flex: 0 0 auto; }
.admin-toolbar .search-input, .admin-toolbar .compact-select { min-width: 118px; width: 138px; padding: 7px 9px; border-radius: 8px; font-size: 12px; }
.admin-toolbar .search-input { width: 168px; }
.admin-toolbar button { padding: 7px 11px; border-radius: 8px; font-size: 12px; white-space: nowrap; }
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0 2px;
  color: #9ca3af;
  font-size: 13px;
}
.pagination-bar button[disabled] { opacity: .55; cursor: not-allowed; }
.sidebar-user {
  display: block;
  align-self: center;
  max-width: 190px;
  padding: 0;
  margin: 0 0 14px !important;
  background: transparent !important;
  color: #48638f !important;
  font-size: 13px !important;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.portal-sidebar-title {
  display: block;
  width: 100%;
  margin: 6px auto 20px !important;
  color: #4b5563 !important;
  font-size: 18px !important;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
}

.portal-main { padding-top: 24px; }
.portal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}
.portal-toolbar .toolbar-left,
.portal-toolbar .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.portal-toolbar .toolbar-left { flex: 1 1 auto; min-width: 0; }
.portal-toolbar .toolbar-right { flex: 0 0 auto; }
.portal-toolbar .search-input { flex: 1 1 260px; min-width: 220px; }
.portal-toolbar .compact-select { flex: 0 0 132px; }
.portal-toolbar[data-toolbar="messages"] .toolbar-left > .search-input[type="search"] { flex: 1 1 180px; min-width: 150px; }
.portal-toolbar[data-toolbar="messages"] .compact-select { flex: 0 0 116px; min-width: 116px; width: 116px; }
.portal-toolbar[data-toolbar="messages"] input[type="date"].search-input { flex: 0 0 132px; min-width: 132px; width: 132px; max-width: 132px; padding-inline: 8px; }
.portal-panel .section-head { margin-bottom: 12px; }
.portal-panel .section-head p { display: none; }
@media (max-width: 1180px) {
  .portal-toolbar[data-toolbar="messages"] { align-items: flex-start; flex-wrap: wrap; }
  .portal-toolbar[data-toolbar="messages"] .toolbar-left { flex-wrap: wrap; }
  .portal-toolbar[data-toolbar="messages"] .toolbar-right { margin-left: auto; }
}
@media (max-width: 900px) {
  .portal-toolbar { flex-wrap: wrap; }
  .portal-toolbar .toolbar-left, .portal-toolbar .toolbar-right { flex-wrap: wrap; }
}

.portal-sidebar nav { flex: 1; }
.portal-sidebar .sidebar-logout {
  margin-top: auto;
  margin-bottom: 0;
}

/* Menu icons: minimal enhancement on deployed UI baseline. */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: .86;
  object-fit: contain;
  display: block;
}
.nav-item span:not(.nav-icon) { min-width: 0; }
.nav-item.active .nav-icon { opacity: 1; }

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.4;
}
.required-mark {
  color: #dc2626;
  font-style: normal;
}
.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.permission-group {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.permission-group legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 600;
}
.permission-domains { display: grid; gap: 14px; }
.permission-domain {
  padding: 12px;
  border: 1px solid #e8ebf0;
  border-radius: 8px;
  background: #fafbfc;
}
.permission-domain-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.permission-domain-head span { display: flex; gap: 6px; }
.permission-group-action {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
}
.permission-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.check-option, .modal-form .check-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}
.check-option input, .modal-form .check-option input {
  width: 16px;
  height: 16px;
  margin: 0;
}
.permission-option { align-items: flex-start; }
.permission-option span { min-width: 0; }
.permission-option strong, .permission-option code, .permission-option small { display: block; }
.permission-option code { margin-top: 2px; color: #475569; font-size: 11px; overflow-wrap: anywhere; }
.permission-option small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
@media (max-width: 760px) {
  .permission-options { grid-template-columns: 1fr; }
  .permission-domain-head { align-items: flex-start; flex-direction: column; }
}

.load-error-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
  color: #991b1b;
}
.load-error-banner strong { font-size: 14px; }
.load-error-banner p {
  grid-column: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
.load-error-banner button {
  grid-column: 2;
  grid-row: 1 / span 2;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .load-error-banner { grid-template-columns: 1fr; }
  .load-error-banner button {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}

button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.wechat-account-section { margin-top: 18px; }
.wechat-account-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.wechat-account-head.action-only { justify-content: flex-end; }
.wechat-account-head h3 { margin: 0 0 5px; font-size: 20px; }
.wechat-account-head p, .wechat-access-disabled { margin: 0; color: #667085; font-size: 13px; }
.wechat-access-disabled { margin-bottom: 14px; color: #b54708; }
.wechat-account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.wechat-account-grid > .empty-hint { grid-column: 1 / -1; }
.wechat-account-card { display: grid; gap: 16px; min-width: 0; padding: 18px; border: 1px solid #e5eaf5; border-radius: 18px; background: #fbfdff; }
.wechat-account-card-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.wechat-account-card-head h4 { margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wechat-account-card-head p { margin: 0; overflow: hidden; color: #667085; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.wechat-account-avatar { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; background: #eef3ff; }
.wechat-account-avatar.placeholder { display: grid; place-items: center; color: #2455d6; font-weight: 800; }
.wechat-account-meta { display: grid; gap: 9px; margin: 0; }
.wechat-account-meta div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
.wechat-account-meta dt { color: #98a2b3; font-size: 12px; }
.wechat-account-meta dd { margin: 0; overflow-wrap: anywhere; color: #344054; font-size: 13px; }
.wechat-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wechat-account-actions button { padding: 7px 10px; font-size: 12px; }
.wechat-control-list-head, .wechat-message-list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0 12px; }
.wechat-control-list-head p, .wechat-message-list-head p { margin: 0; color: #667085; font-size: 13px; }
.wechat-access-panel .portal-toolbar .toolbar-left { flex: 0 1 760px; }
.wechat-access-panel .portal-toolbar .toolbar-right { margin-left: auto; }
.wechat-access-panel .portal-toolbar .search-input { width: min(420px, 36vw); min-width: 220px; flex: 0 1 420px; }
.wechat-access-panel .portal-toolbar .compact-select { width: 180px; flex: 0 0 180px; }
.wechat-access-panel .portal-toolbar[data-toolbar="wechat"] .toolbar-left { flex: 1 1 auto; flex-wrap: nowrap; }
.wechat-access-panel .portal-toolbar[data-toolbar="wechat"] .search-input { width: 170px; min-width: 120px; flex: 1 1 150px; }
.wechat-access-panel .portal-toolbar[data-toolbar="wechat"] input[type="date"] { width: 150px; min-width: 140px; flex: 0 0 150px; }
.wechat-access-panel .portal-toolbar[data-toolbar="wechat"] .compact-select { width: 130px; flex: 0 0 130px; }
.wechat-control-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.wechat-control-error button { flex: 0 0 auto; }
.wechat-control-identity { display: inline-flex; align-items: center; gap: 10px; min-width: 210px; }
.wechat-control-identity > span:last-child { display: grid; gap: 2px; min-width: 0; }
.wechat-control-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wechat-control-identity small { color: #667085; font-size: 11px; overflow-wrap: anywhere; }
.wechat-control-avatar { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 12px; background: #eef3ff; color: #2455d6; font-weight: 800; }
.wechat-control-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wechat-control-modal { width: min(840px, calc(100vw - 32px)); }
.wechat-control-switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.wechat-control-switch-grid label { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #e5eaf5; border-radius: 14px; background: #fff; }
.wechat-control-switch-grid input { width: 18px; height: 18px; margin-top: 2px; accent-color: #1f5eff; }
.wechat-control-switch-grid span { display: grid; gap: 4px; }
.wechat-control-switch-grid small { color: #667085; font-size: 12px; line-height: 1.5; }
.wechat-control-texts { margin-top: 0; }
.wechat-control-texts textarea:disabled { color: #344054; background: #f7f9fd; opacity: 1; }
.wechat-login-modal { width: min(680px, calc(100vw - 32px)); }
.wechat-login-modal form { display: grid; gap: 18px; }
.wechat-login-modal .wechat-qr-image { width: 300px; height: 300px; }
.wechat-operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wechat-operation-card { display: grid; gap: 8px; min-height: 128px; padding: 20px; text-align: left; border: 1px solid #d5deee; border-radius: 16px; background: #fff; color: #344054; }
.wechat-operation-card:hover:not(:disabled) { border-color: #7b9cff; box-shadow: 0 10px 24px rgba(36,85,214,.12); }
.wechat-operation-card strong { font-size: 18px; }
.wechat-operation-card span { color: #667085; font-size: 13px; line-height: 1.6; }
.wechat-replace-list { display: grid; gap: 10px; max-height: 360px; overflow-y: auto; }
.wechat-replace-option { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #d5deee; border-radius: 14px; background: #fff; cursor: pointer; }
.wechat-replace-option:has(input:checked) { border-color: #5277e8; background: #f4f7ff; }
.wechat-replace-option span { display: grid; gap: 4px; min-width: 0; }
.wechat-replace-option small { color: #667085; overflow-wrap: anywhere; }
.wechat-region-field { display: grid; gap: 8px; color: #344054; font-weight: 700; }
.wechat-region-field select { width: 100%; padding: 12px 14px; border: 1px solid #d5deee; border-radius: 14px; background: #fff; }
.wechat-login-note { margin: 0; color: #667085; font-size: 13px; line-height: 1.6; }
.wechat-login-progress { display: grid; justify-items: center; gap: 13px; padding: 8px 0 4px; text-align: center; }
.wechat-scan-prompt { margin: 0; color: #344054; font-weight: 700; }
.wechat-login-verification { display: grid; justify-items: center; gap: 10px; width: 100%; padding: 14px; border: 1px solid #f5c36b; border-radius: 14px; background: #fff8e8; color: #7a4b00; }
.wechat-login-verification span, .wechat-login-provider-message { margin: 0; color: #667085; font-size: 13px; line-height: 1.6; }
.wechat-login-countdown { color: #667085; font-size: 13px; }
.wechat-login-success { display: grid; justify-items: center; gap: 8px; padding: 42px 0 30px; }
.wechat-login-success strong { color: #067647; font-size: 28px; }
.wechat-login-success span { color: #667085; }
@media (max-width: 640px) {
  .wechat-account-head { align-items: stretch; flex-direction: column; }
  .wechat-account-head button { width: 100%; }
  .wechat-account-grid { grid-template-columns: 1fr; }
  .wechat-account-card-head { grid-template-columns: 48px minmax(0, 1fr); }
  .wechat-account-card-head .badge { grid-column: 2; justify-self: start; }
  .wechat-operation-grid, .wechat-control-switch-grid { grid-template-columns: 1fr; }
  .wechat-control-list-head, .wechat-message-list-head, .wechat-control-error { align-items: stretch; flex-direction: column; }
  .wechat-control-list-head button, .wechat-message-list-head button, .wechat-control-error button { width: 100%; }
  .wechat-login-modal, .wechat-control-modal { width: min(100%, calc(100vw - 24px)); padding: 18px; }
  .wechat-login-modal .wechat-qr-image { width: min(260px, 100%); height: auto; aspect-ratio: 1; }
}
.wi-sections .module-tab small { margin-left: 6px; color: var(--text-muted, #7b8794); font-size: 10px; }
.wi-segment-form { display: grid; grid-template-columns: 180px 1fr 2fr auto; gap: 12px; margin-bottom: 18px; }
.wi-person { display: flex; align-items: center; gap: 10px; }
.wi-person strong, .table-wrap td strong { color: #1f2937; font-size: 14px; line-height: 1.4; }
.wi-person img, .wi-member-list img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: #eef3f8; }
.wi-switch { display: inline-flex; align-items: center; gap: 4px; margin: 0 6px; white-space: nowrap; }
.wi-controls { display: inline-flex; flex-wrap: wrap; }
.wi-member-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.wi-member-list li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid #edf1f5; }
.wi-member-picker { display: grid; gap: 16px; }
.wi-picker-list { display: grid; gap: 8px; max-height: 62vh; overflow: auto; }
.wi-picker-list label { display: grid; grid-template-columns: 20px 34px 1fr auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid #e7edf3; border-radius: 10px; cursor: pointer; }
.wi-picker-list img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: #eef3f8; }
.wi-picker-toolbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 auto 10px; }
.wi-picker-toolbar label { display: inline-flex; align-items: center; flex-direction: row; gap: 8px; margin: 0; color: var(--ui-text-muted, #667085); font-size: var(--ui-font-sm, 13px); white-space: nowrap; }
.wi-picker-toolbar input { width: min(360px, 44vw); min-width: 220px; }
.wi-picker-search-actions { display: inline-flex; align-items: center; gap: 4px; }
.wi-picker-search-actions button { margin: 0; white-space: nowrap; }
.wi-picker-pagination { padding: 8px 0; }
.wi-picker-pagination b { color: var(--ui-text, #1f2937); font-weight: 700; }
.wi-member-picker-drawer,
.wi-like-friend-picker .action-modal-card,
.wi-portrait-friend-picker .action-modal-card { animation: none; }
.wi-picker-selection-summary { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 16px;padding:12px 14px;border:1px solid #d9e2f1;border-radius:10px;background:#f8faff;color:#475467; }
.wi-picker-selection-summary button { flex:0 0 auto; }
@media(max-width:640px){.wi-picker-selection-summary{align-items:stretch;flex-direction:column}.wi-picker-selection-summary button{width:100%}}
.wi-segment-count,
.wi-segment-count:hover,
.wi-segment-count:focus-visible { display: inline-flex; align-items: center; gap: 5px; min-width: 0; margin: 0; padding: 2px 4px; border: 0; background: transparent !important; box-shadow: none; color: #667085; }
.wi-segment-count svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wi-segment-count:hover { color: #344054; }
@media (max-width: 900px) { .wi-segment-form { grid-template-columns: 1fr; } }
.wi-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.wi-toolbar.action-only { justify-content: flex-end; }
.wi-toolbar > .wi-actions { display: flex; justify-content: flex-end; gap: 10px; min-width: 0; }
.wi-sync-action { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; }
.wi-sync-action small { color: var(--ui-muted); font-size: 11px; }
.wi-sync-confirm { width: min(620px, calc(100vw - 32px)); }
.wi-sync-notice { display: grid; gap: 9px; margin: 16px 0; padding: 14px 16px; border: 1px solid #dbe6f5; border-radius: 10px; background: #f7faff; }
.wi-sync-notice p { margin: 0; color: #475467; line-height: 1.55; }
.wi-moment-assets { display: grid; gap: 16px; }
.wi-moment-asset-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; min-height: 52px; }
.wi-moment-asset { position: relative; margin: 0; aspect-ratio: 1; border: 1px solid var(--ui-border); border-radius: 12px; overflow: visible; background: #f8fafc; }
.wi-moment-asset a, .wi-moment-asset img { display: block; width: 100%; height: 100%; border-radius: 12px; }
.wi-moment-asset img { object-fit: cover; }
.wi-moment-asset > button { position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; min-width: 26px; padding: 0; border-radius: 50%; background: #e5484d; color: #fff; box-shadow: 0 3px 10px rgba(180,35,24,.25); }
.wi-moment-review-table { min-width: 1260px !important; }
.wi-moment-list-content { min-width: 220px; max-width: 360px; white-space: pre-wrap; line-height: 1.6; }
.wi-moment-list-images { display: grid; grid-template-columns: repeat(3, 28px); gap: 4px; width: max-content; max-width: 92px; }
.wi-moment-list-images a { display: block; overflow: hidden; border: 1px solid var(--ui-border-soft, #e7ebf2); border-radius: 6px; background: #f5f7fa; }
.wi-moment-list-images img { display: block; width: 28px; height: 28px; object-fit: cover; }
.wi-moment-list-images.single { grid-template-columns: 72px; max-width: 72px; }
.wi-moment-list-images.single img { width: 72px; height: 72px; }
.wi-moment-list-images.medium { grid-template-columns: repeat(2, 38px); max-width: 80px; }
.wi-moment-list-images.medium img { width: 38px; height: 38px; }
.wi-moment-no-image { color: var(--ui-muted, #98a2b3); font-size: var(--ui-font-xs, 12px); white-space: nowrap; }
.wi-moment-upload-row { width: 100%; }
.wi-moment-network-row { display: grid; grid-template-columns: minmax(280px, 520px) auto minmax(120px, 1fr); align-items: start; gap: 12px; }
.wi-remote-image-row { display: grid; grid-template-columns: minmax(280px, 520px) auto minmax(96px, 1fr); align-items: end; gap: 12px; }
.wi-remote-image-row > label { min-width: 0; }
.wi-remote-image-preview { min-height: 48px; display: flex; align-items: center; color: var(--ui-text-muted, #667085); }
.wi-remote-image-preview img { width: 64px; height: 48px; object-fit: cover; border: 1px solid var(--ui-border, #d7deeb); border-radius: 8px; display: block; }
.wi-moment-network-field { min-width: 0; }
.wi-moment-network-row > button { margin-top: 27px; white-space: nowrap; }
.wi-moment-network-preview { display: flex; align-items: flex-start; min-height: 76px; padding-top: 27px; }
.wi-moment-network-preview a { display: block; width: 72px; height: 72px; border: 1px solid var(--ui-border); border-radius: 10px; overflow: hidden; background: #f8fafc; }
.wi-moment-network-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wi-moment-network-preview .error { align-self: center; font-size: var(--ui-font-xs); }
.wi-moment-ai-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(180px,.65fr); align-items: center; gap: 14px; }
.wi-moment-ai-row p { margin: 0; }
.wi-moment-account-picker[hidden] { display: none !important; }
[data-wi-like-random-settings][hidden], [data-wi-like-friend-targets][hidden], [data-wi-like-segment-targets][hidden] { display: none !important; }
[data-wi-like-month-days][hidden] { display: none !important; }
.wi-month-day-picker .form-hint { margin: 0 0 10px; }
.wi-month-day-grid { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 8px; }
.wi-month-day-grid label { position: relative; display: grid !important; place-items: center; min-height: 42px; padding: 0 !important; border: 1px solid var(--ui-border, #d7deeb); border-radius: 10px; background: #fff; color: #344054; cursor: pointer; }
.wi-month-day-grid label:has(input:checked) { border-color: #3867e8; background: #eef4ff; color: #2455d6; box-shadow: 0 0 0 2px rgba(56,103,232,.12); }
.wi-month-day-grid input { position: absolute; inline-size: 1px !important; block-size: 1px; opacity: 0; pointer-events: none; }
.wi-month-day-grid span { font-size: var(--ui-font-sm, 13px); font-weight: 700; }
.wi-moment-account-picker h3 { margin: 0 0 10px; font-size: var(--ui-font-sm); }
.wi-like-setting-row { width: 100%; }
.wi-like-setting-row > select,
.wi-like-setting-row > input { width: min(420px, 100%); }
.wi-like-more-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--ui-muted); font-size: var(--ui-font-xs); }
.wi-like-friend-picker { z-index: 1600; }
.wi-like-friend-picker .action-modal-card { width: min(760px, calc(100vw - 32px)); height: min(82vh, 760px); }
.wi-like-friend-picker-list { display: grid; gap: 7px; max-height: 52vh; margin: 14px 0; overflow-y: auto; }
.wi-like-friend-picker-list label { display: grid; grid-template-columns: 18px minmax(0, 1fr) minmax(120px, auto); align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--ui-border-soft); border-radius: 9px; cursor: pointer; }
.wi-like-friend-picker-list label:hover { border-color: #b8c7e2; background: #f8fbff; }
.wi-like-friend-picker-list code { color: var(--ui-muted); font-size: var(--ui-font-xs); overflow-wrap: anywhere; }
.wi-actions { min-width: 260px; }
.wi-broadcast-drawer { width: min(920px, 92vw); }
.wi-broadcast-form { display: grid; gap: 16px; padding-bottom: 28px; }
.wi-broadcast-form label { display: grid; gap: 7px; color: var(--text-muted, #667085); font-size: 13px; }
.wi-broadcast-form input, .wi-broadcast-form select, .wi-broadcast-form textarea { width: 100%; box-sizing: border-box; }
.wi-broadcast-form fieldset { border: 1px solid #e5e9f2; border-radius: 12px; padding: 14px; }
.wi-broadcast-form legend { padding: 0 8px; font-weight: 700; color: #25324b; }
.wi-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.wi-inline-check { display: flex !important; grid-template-columns: 20px 1fr; align-items: center; }
.wi-inline-check input { width: auto; }
.wi-target-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 14px; max-height: 170px; overflow: auto; margin-top: 10px; }
.wi-target-options label { display: flex; grid-template-columns: none; flex-direction: row; align-items: center; gap: 8px; color: #344054; }
.wi-target-options input { width: auto; }
.wi-broadcast-preview { padding: 12px 14px; border-radius: 10px; background: #f4f7fc; color: #475467; }
.drawer-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.status-badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #eef2f7; color: #475467; font-size: 12px; white-space: nowrap; }
.status-badge.running, .status-badge.success { background: #e8f8f1; color: #087553; }
.status-badge.pending { background: #fff5d9; color: #9a6700; }
.status-badge.paused, .status-badge.partial { background: #fff0e6; color: #b54708; }
.status-badge.failed, .status-badge.unknown { background: #feeeee; color: #b42318; }
.status-badge.pending_assignment, .status-badge.assigned { background:#fff5d9;color:#9a6700; }
.status-badge.processing { background:#eef4ff;color:#2455d6; }
.status-badge.resolved, .status-badge.closed { background:#e8f8f1;color:#087553; }
.status-badge.canceled { background:#f2f4f7;color:#667085; }
.ticket-center-page { display:grid; gap:16px; }
.ticket-page-header { margin-bottom:0; }
.ticket-page-header .eyebrow { font-size:12px; font-weight:700; color:var(--ui-muted); }
.ticket-status-tabs { margin:0; }
.ticket-list-card, .ticket-settings-card, .ticket-integration-card { margin:0; }
.ticket-setting-field { display:grid;gap:8px;margin-top:18px; }
.ticket-setting-field>strong { color:#25324b;font-size:15px; }
.ticket-setting-field>p { margin:0;color:var(--ui-muted);font-size:13px;line-height:1.6; }
.ticket-setting-field textarea { margin-top:0; }
.ticket-priority { display:inline-flex; min-width:42px; justify-content:center; padding:4px 8px; border-radius:999px; background:#f2f4f7; color:#475467; font-size:12px; }
.ticket-priority.high { background:#fff0e6;color:#b54708; }.ticket-priority.urgent { background:#feeeee;color:#b42318; }.ticket-priority.low { background:#eef4ff;color:#2455d6; }
.ticket-check-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px; }
.ticket-check-grid label { display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--ui-border);border-radius:10px;background:#f8fafc; }
.ticket-check-grid input { width:auto; }
.ticket-detail-summary { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px; }
.ticket-detail-summary span { padding:10px 12px;border-radius:10px;background:#f5f8fc;color:#475467; }
.ticket-problem { padding:14px 16px;border:1px solid var(--ui-border);border-radius:12px; }
.ticket-problem h3,.ticket-problem p { margin:0; }.ticket-problem p { margin-top:8px;white-space:pre-wrap;line-height:1.65; }
.ticket-attachments { display:flex;gap:10px;flex-wrap:wrap;margin-top:14px; }.ticket-attachments a { display:grid;gap:4px;color:var(--ui-muted);text-decoration:none; }.ticket-attachments img { width:96px;height:96px;object-fit:cover;border:1px solid var(--ui-border);border-radius:10px; }.ticket-attachments small { max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ticket-upload-previews { display:flex;flex-wrap:wrap;gap:10px;margin-top:10px; }
.ticket-upload-previews button { display:grid;gap:5px;width:104px;padding:4px;border:1px solid var(--ui-border);border-radius:10px;background:#fff;color:var(--ui-muted); }
.ticket-upload-previews img { width:94px;height:94px;border-radius:7px;object-fit:cover; }
.ticket-upload-previews small { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ticket-image-lightbox { position:fixed;inset:0;z-index:1600;display:grid;place-items:center;padding:48px;background:rgba(15,23,42,.76); }
.ticket-image-lightbox[hidden] { display:none; }
.ticket-image-lightbox img { max-width:min(1100px,90vw);max-height:84vh;border-radius:12px;box-shadow:0 18px 60px rgba(0,0,0,.4); }
.ticket-image-lightbox button { position:absolute;top:24px;right:28px;width:44px;height:44px;padding:0;border-radius:50%;font-size:28px; }
.ticket-category-table { max-height:300px;margin-bottom:18px;overflow:auto; }
.ticket-category-save { margin-top:18px;padding-top:16px;border-top:1px solid var(--ui-border); }
.knowledge-center-page { display:grid;gap:16px; }
.knowledge-page-header,.knowledge-card { margin:0; }
.knowledge-toolbar { min-height:52px;flex-wrap:nowrap; }
.knowledge-filters { display:flex;align-items:flex-end;gap:8px;min-width:0;flex-wrap:nowrap; }
.knowledge-filters input { width:210px;min-width:160px; }
.knowledge-filters select { width:auto;min-width:120px; }
.knowledge-filters button[data-knowledge-search] { width:auto;min-width:64px;height:40px;padding:0 14px;white-space:nowrap; }
.knowledge-upload-list { display:grid;gap:6px;margin-top:8px; }
.knowledge-upload-list span { padding:8px 10px;border-radius:8px;background:#f5f8fc;color:#475467;font-size:13px; }
.knowledge-stage-empty { display:grid;place-items:center;min-height:280px;text-align:center;color:var(--ui-muted); }
.knowledge-stage-empty strong { color:#25324b;font-size:18px; }
.knowledge-stage-empty p { margin:8px 0 0; }
.knowledge-detail-json { max-height:60vh;overflow:auto;padding:16px;border-radius:12px;background:#111a2d;color:#e5edf8;white-space:pre-wrap;word-break:break-word; }
.knowledge-version-content,.knowledge-diff-table{max-height:65vh;overflow:auto}.knowledge-version-content pre,.knowledge-diff-table pre{margin:0;white-space:pre-wrap;word-break:break-word;font:inherit}.knowledge-diff-added{background:#eefbf4}.knowledge-diff-removed{background:#fff2f1}.knowledge-diff-added td:nth-child(3){color:#138a4b;font-weight:700}.knowledge-diff-removed td:nth-child(3){color:#c33b32;font-weight:700}
.knowledge-detail-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}.knowledge-detail-list>div,.knowledge-detail-section,.knowledge-query-hit,.knowledge-query-summary{padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:#fff}.knowledge-detail-list dt{color:var(--muted);font-size:13px}.knowledge-detail-list dd{margin:5px 0 0;color:var(--text);font-weight:600;word-break:break-word}.knowledge-detail-section h3,.knowledge-query-hit h3{margin:0 0 8px}.knowledge-detail-section p,.knowledge-query-hit p{margin:0;white-space:pre-wrap;word-break:break-word}.knowledge-query-hit{margin-top:12px}.knowledge-query-hit small{display:block;margin-top:10px;color:var(--muted)}@media(max-width:760px){.knowledge-detail-list{grid-template-columns:1fr}}
.knowledge-source-list{display:grid;gap:10px}.knowledge-source-list article{display:grid;grid-template-columns:1fr auto;gap:6px 14px;padding:12px;border-radius:10px;background:#f7f9fc}.knowledge-source-list small{display:block;margin-top:4px;color:var(--muted)}.knowledge-source-list span{color:#2455d6;font-weight:700}.knowledge-source-list p{grid-column:1/-1;color:#46546a}
.knowledge-source-list article.low-confidence{border:1px solid #f0b15c;background:#fff8ec}.knowledge-source-list article.low-confidence>span{color:#a65b00}.knowledge-source-list .knowledge-source-warning{grid-column:1/-1;color:#9a5400;font-weight:600}
.knowledge-query-citations{display:grid;gap:4px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}.knowledge-query-citations strong{font-size:13px;color:var(--text)}.knowledge-query-citations small{margin-top:0}
.knowledge-answer-card{margin-bottom:16px;padding:18px;border:1px solid #cfe0ff;border-radius:16px;background:linear-gradient(135deg,#f4f8ff,#f2fbff)}.knowledge-answer-card>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.knowledge-answer-card h3,.knowledge-answer-card p{margin:0}.knowledge-answer-card span,.knowledge-answer-card small{color:#526581;font-size:13px}.knowledge-answer-card p{margin-top:12px;color:#1f2a44;line-height:1.8;white-space:pre-wrap}
.knowledge-tag-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin-top:10px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft,#f8fafc); }
.knowledge-tag-grid .wi-inline-check { margin:0;justify-content:flex-start; }
.knowledge-space-filter { display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:14px;color:#5f6b7e; }
.knowledge-space-filter select { min-width:180px; }
.knowledge-pager { display:flex;align-items:center;justify-content:flex-end;gap:16px;white-space:nowrap;padding:14px 0 0; }
.knowledge-pager>div { display:flex;gap:8px; }
.knowledge-pager button { min-height:36px;padding:6px 10px; }
.knowledge-pager small { color:var(--muted); }
.knowledge-asset-title { padding-left:calc(var(--knowledge-depth, 0) * 18px); }
.knowledge-asset-title strong { display:block; }
.knowledge-form-grid { display:grid;gap:14px;align-items:start; }
.knowledge-form-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.knowledge-form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.knowledge-form-grid .wide { grid-column:1/-1; }
.knowledge-form-grid label { min-width:0; }
.knowledge-form-grid small { display:block;margin-top:5px;color:var(--ui-muted);font-weight:400;line-height:1.45; }
.knowledge-relation-tabs { margin:0 0 14px; }
.standalone-tabs { display:flex; gap:10px; margin:0 0 14px; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.standalone-tabs button { min-width:116px; border:1px solid #cfdcf4; background:#f7faff; color:#27436f; }
.standalone-tabs button.active { border-color:transparent; background:linear-gradient(135deg,#3978f6,#55c7d9); color:#fff; }
.knowledge-help-button { display:inline-grid;place-items:center;width:20px;height:20px;min-height:20px;padding:0;border-radius:50%;font-size:12px;vertical-align:middle; }
.knowledge-example-link { align-self:start; }
.knowledge-modal-intro { display:flex;align-items:center;gap:10px;flex-wrap:wrap; }
.knowledge-modal-intro p { margin:4px 0 0; }
.knowledge-modal-intro .knowledge-example-link { padding:3px 0; }
.knowledge-help-modal { position:fixed;inset:0;z-index:1800;display:grid;place-items:center;padding:24px;background:rgba(15,23,42,.55); }
.knowledge-help-modal[hidden] { display:none; }
.knowledge-help-modal section { width:min(560px,calc(100vw - 40px));padding:22px;border-radius:16px;background:#fff;box-shadow:var(--ui-shadow); }
.knowledge-help-modal p { line-height:1.7; }
.knowledge-settings-page { display:grid;gap:20px; }
.knowledge-settings-page form { display:grid;gap:16px; }
.knowledge-settings-actions { display:flex;justify-content:flex-end;min-height:0; }
.knowledge-settings-block { display:grid;gap:14px;padding:18px;border:1px solid var(--ui-border-soft);border-radius:12px;background:#fbfcfe; }
.knowledge-settings-block-head h2,.knowledge-settings-block-head p,.knowledge-type-guide h2,.knowledge-type-guide p { margin:0; }
.knowledge-settings-block-head p,.knowledge-type-guide p { margin-top:5px;color:var(--ui-muted); }
.knowledge-type-link { display:inline; width:auto; min-width:0; min-height:0; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:var(--ui-primary); box-shadow:none; font:inherit; font-weight:700; vertical-align:baseline; }
.knowledge-type-link:hover { background:transparent; color:#164fc9; filter:none; text-decoration:underline; }
.knowledge-type-drawer .form-hint { margin:0 0 16px; }
.knowledge-settings-block>label { display:grid;gap:8px;color:#344054;font-weight:650; }
.knowledge-type-guide { display:grid;gap:14px;padding-top:20px;border-top:1px solid var(--ui-border); }
.knowledge-upload-auto-process { width:100% !important;padding-top:12px;border-top:1px solid var(--ui-border-soft); }
.knowledge-entity-detail { display:grid;gap:14px; }
.knowledge-entity-summary { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;border-radius:12px;background:#f5f8ff; }
.knowledge-entity-summary div { display:grid;gap:4px; }
.knowledge-entity-summary span:not(.status-badge) { color:var(--ui-muted);font-size:12px; }
.knowledge-entity-summary strong { font-size:20px; }
.knowledge-attribute-list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0; }
.knowledge-attribute-list>div { padding:10px 12px;border:1px solid var(--ui-border-soft);border-radius:9px;background:#f8fafc; }
.knowledge-attribute-list dt { color:var(--ui-muted);font-size:12px; }
.knowledge-attribute-list dd { margin:4px 0 0;font-weight:600; }
.knowledge-space-detail-hero { align-items:flex-start; }
.knowledge-space-detail-hero>div { min-width:0; }
.knowledge-space-detail-hero p { line-height:1.6; }
.knowledge-space-hero-icon { display:grid;place-items:center;width:58px;height:58px;flex:0 0 58px;border-radius:16px;background:#eaf1ff;color:#2455d6;font-size:22px;font-weight:800; }
@media(max-width:900px){.knowledge-form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.knowledge-toolbar{align-items:stretch;flex-direction:column}.knowledge-filters{flex-wrap:wrap}.knowledge-toolbar .wi-actions{justify-content:flex-end}}
@media(max-width:620px){.knowledge-form-grid.three,.knowledge-form-grid.two{grid-template-columns:1fr}.knowledge-filters input{width:100%}.knowledge-pager{justify-content:space-between}}
.platform-admin #route-content > .panel > .section-head:not(:has(button, form)) { display:none; }
.platform-admin #route-content > .panel > .section-head:has(button, form) > h2,
.platform-admin #route-content > .panel > .section-head:has(button, form) > div:first-child { display:none; }
.message-route-strategy-tabs { margin-bottom:18px; }
.message-route-strategy-tabs button:hover { color:#fff; }
.platform-admin #route-content > .message-route-strategy-panel > .section-head { display:flex !important;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px; }
.platform-admin #route-content > .message-route-semantic-settings > .section-head { flex-direction:column;gap:0; }
.message-route-strategy-panel > .section-head h2 { margin:0 0 6px;font-size:20px; }
.message-route-strategy-panel > .section-head p { margin:0;line-height:1.65; }
.message-route-strategy-form { gap:20px;margin-top:0; }
.message-route-setting-block { align-content:start;gap:10px !important;padding:18px;border:1px solid var(--ui-border-soft);border-radius:12px;background:#fbfcfe; }
.message-route-setting-block .field-label { color:#25324a;font-size:15px; }
.message-route-setting-block .field-hint { margin:0 0 4px;line-height:1.6; }
.message-route-strategy-actions { justify-content:center !important;align-items:center;margin-top:4px;padding-top:4px; }
.message-route-response-form { grid-template-columns:1fr; }
.message-route-response-form textarea { min-height:116px; }
.message-route-candidates-panel { margin-top:0; }
@media(max-width:720px){.message-route-setting-block{padding:14px}.message-route-strategy-actions{align-items:stretch;flex-direction:column}.message-route-strategy-actions button{width:100%}}

/* 企业消息与会话 */
.message-row-actions { display:flex;align-items:center;gap:8px;white-space:nowrap; }
.message-center-pager { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;color:#64748b;font-size:13px; }
.message-center-pager > div { display:flex;gap:8px; }
.message-center-pager button { min-width:76px; }
.message-center-modal { z-index:76; }
.message-center-modal-card { width:min(920px,calc(100vw - 40px));max-height:min(86vh,860px);overflow:auto; }
.session-message-card { width:min(1120px,calc(100vw - 40px)); }
.message-detail-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 18px; }
.message-detail-grid > div { min-width:0;padding:13px 14px;border:1px solid #e6ebf2;border-radius:12px;background:#f8fafc; }
.message-detail-grid .wide { grid-column:1/-1; }
.message-detail-grid span { display:block;margin-bottom:5px;color:#64748b;font-size:12px; }
.message-detail-grid strong,.message-detail-grid p { margin:0;color:#1e293b;line-height:1.65;overflow-wrap:anywhere; }
.message-modal-loading { display:grid;place-items:center;min-height:220px;color:#64748b; }
@media(max-width:640px){.message-center-pager{align-items:flex-start;flex-direction:column}.message-detail-grid{grid-template-columns:1fr}.message-detail-grid .wide{grid-column:auto}.message-center-modal-card,.session-message-card{width:calc(100vw - 24px)}}

.runtime-application-banner { display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;padding:20px;border:1px solid #dce7f6;border-radius:16px;background:linear-gradient(135deg,#f8fbff,#f1f8ff); }
.runtime-application-banner span:first-child { display:block;margin-bottom:4px;color:#6b7c93;font-size:12px; }
.runtime-application-banner strong { display:block;color:#18243a;font-size:22px; }

/* 企业工作台驾驶舱 */
.nav-direct .nav-direct-button { width:100%; }
.nav-direct .nav-direct-button::after { content:'›';margin-left:auto;color:#8293ad;font-size:22px;line-height:1; }
.workbench-cockpit { position:relative;min-height:calc(100vh - 48px);padding:26px;border:1px solid #e2e8f0;border-radius:24px;overflow:hidden;color:#334155;background:radial-gradient(circle at 82% -8%,rgba(59,130,246,.1),transparent 32%),radial-gradient(circle at 5% 42%,rgba(14,165,233,.06),transparent 28%),linear-gradient(145deg,#f8fafc 0%,#f3f7fc 58%,#f8fafc 100%);box-shadow:0 18px 48px rgba(15,23,42,.08); }
.workbench-cockpit::before { content:'';position:absolute;inset:0;pointer-events:none;opacity:.42;background-image:linear-gradient(rgba(148,163,184,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(148,163,184,.08) 1px,transparent 1px);background-size:38px 38px;mask-image:linear-gradient(to bottom,#000,transparent 72%); }
.workbench-cockpit > * { position:relative;z-index:1; }
.workbench-cockpit:fullscreen { width:100vw;height:100vh;padding:32px;border:0;border-radius:0;overflow:auto; }
.workbench-header { display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:22px; }
.workbench-header h1 { margin:2px 0 5px;color:#172033;font-size:30px;letter-spacing:.02em; }
.workbench-header p { margin:0;color:#64748b;font-size:13px; }
.workbench-kicker { color:#2563eb !important;font-size:10px !important;font-weight:800;letter-spacing:.22em; }
.workbench-controls { display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap; }
.workbench-range { display:flex;padding:4px;border:1px solid #dbe4f0;border-radius:12px;background:rgba(255,255,255,.9);box-shadow:0 2px 8px rgba(15,23,42,.04); }
.workbench-range button,.workbench-icon-button { min-height:34px;border:0;box-shadow:none;color:#64748b;background:transparent;font-size:12px; }
.workbench-range button { padding:7px 13px;border-radius:9px; }
.workbench-range button:hover,.workbench-range button.active { color:#fff;background:linear-gradient(135deg,#3b82f6,#0ea5e9); }
.workbench-icon-button { width:36px;padding:0;border:1px solid #dbe4f0;border-radius:10px;background:rgba(255,255,255,.9);font-size:18px;box-shadow:0 2px 8px rgba(15,23,42,.04); }
.workbench-icon-button:hover { color:#2563eb;border-color:#93c5fd;transform:none; }
.workbench-updated { width:100%;color:#94a3b8;font-size:11px;text-align:right; }
.workbench-section-errors { display:flex;align-items:center;gap:10px;margin:-4px 0 14px;padding:9px 12px;border:1px solid #fed7aa;border-radius:11px;color:#64748b;background:#fff7ed;font-size:11px; }.workbench-section-errors strong{color:#d97706;white-space:nowrap}
.workbench-metrics { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:14px; }
.workbench-metric { position:relative;display:block;min-width:0;min-height:132px;padding:17px 17px 12px;border:1px solid #e2e8f0;border-radius:17px;overflow:hidden;color:inherit;text-align:left;background:rgba(255,255,255,.94);box-shadow:0 5px 18px rgba(15,23,42,.055); }
.workbench-metric::before { content:'';position:absolute;inset:0 0 auto;height:2px;opacity:.8;background:linear-gradient(90deg,#3b82f6,transparent 72%); }
.workbench-metric::after { content:'';position:absolute;right:-30px;top:-40px;width:90px;height:90px;border-radius:50%;background:rgba(59,130,246,.08);filter:blur(4px); }
.workbench-metric.warning::before { background:linear-gradient(90deg,#ffb454,transparent 72%); }
.workbench-metric.warning::after { background:rgba(255,180,84,.1); }
.workbench-metric .metric-label { display:block;margin-bottom:11px;color:#64748b;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.workbench-metric > strong { display:block;color:#172033;font-size:28px;font-weight:760;line-height:1;letter-spacing:-.03em; }
.workbench-metric > div { display:flex;align-items:center;gap:7px;margin-top:9px; }
.metric-change { font-size:10px;font-weight:700; }.metric-change.up{color:#059669}.metric-change.down{color:#e11d48}.metric-period{color:#94a3b8;font-size:10px}
.metric-sparkline { position:absolute;right:10px;bottom:7px;width:74px;height:29px;opacity:.58; }
.metric-sparkline polyline { fill:none;stroke:#3b82f6;stroke-width:2;vector-effect:non-scaling-stroke; }
.workbench-main-grid { display:grid;grid-template-columns:minmax(0,1.75fr) minmax(310px,.75fr);gap:14px; }
.cockpit-panel,.workbench-app-card { border:1px solid #e2e8f0;border-radius:19px;background:rgba(255,255,255,.96);box-shadow:0 6px 22px rgba(15,23,42,.055); }
.cockpit-panel { min-width:0;padding:20px; }
.cockpit-panel-head,.app-card-head { display:flex;align-items:flex-start;justify-content:space-between;gap:14px; }
.cockpit-panel-head span,.app-card-head span,.workbench-section-title span { color:#94a3b8;font-size:10px;font-weight:750;letter-spacing:.15em;text-transform:uppercase; }
.cockpit-panel-head h2,.workbench-section-title h2 { margin:4px 0 0;color:#1e293b;font-size:18px; }
.cockpit-panel-head > span { padding-top:4px;letter-spacing:0;text-transform:none; }
.cockpit-panel-head > strong { padding:5px 9px;border-radius:999px;font-size:11px; }.cockpit-panel-head > strong.healthy{color:#047857;background:#ecfdf5}.cockpit-panel-head > strong.warning{color:#b45309;background:#fff7ed}
.workbench-chart { margin-top:8px; }.workbench-chart svg{display:block;width:100%;height:auto;max-height:300px;overflow:visible}.workbench-chart-grid line{stroke:rgba(148,163,184,.22);stroke-width:1}.workbench-chart-grid text{fill:#94a3b8;font-size:9px}.workbench-chart-line{fill:none;stroke-width:2.25;vector-effect:non-scaling-stroke;filter:drop-shadow(0 2px 3px currentColor)}
.workbench-legend { display:flex;justify-content:flex-end;gap:15px;min-height:18px; }.workbench-legend span{display:flex;align-items:center;gap:6px;color:#64748b;font-size:10px}.workbench-legend i,.attention-groups i{width:7px;height:7px;border-radius:50%;background:var(--series-color)}
.workbench-chart-empty,.app-mini-empty { display:grid;place-items:center;min-height:230px;color:#94a3b8;font-size:12px; }
.attention-summary { display:flex;align-items:center;gap:22px;margin:24px 0 18px; }
.attention-donut { display:grid;place-items:center;width:126px;height:126px;flex:0 0 auto;border-radius:50%;filter:drop-shadow(0 0 17px rgba(90,109,255,.15)); }
.attention-donut > div { display:flex;align-items:center;justify-content:center;flex-direction:column;width:82px;height:82px;border-radius:50%;background:#fff;box-shadow:inset 0 0 18px rgba(59,130,246,.08),0 2px 8px rgba(15,23,42,.06); }.attention-donut strong{color:#1e293b;font-size:27px}.attention-donut span{color:#94a3b8;font-size:10px}
.attention-groups { display:grid;gap:8px;min-width:0;flex:1; }.attention-groups span{display:grid;grid-template-columns:8px 1fr auto;align-items:center;gap:7px;color:#64748b;font-size:11px}.attention-groups i{background:var(--group-color)}.attention-groups b{color:#334155}
.attention-list { display:grid;gap:6px; }.attention-item{display:grid;grid-template-columns:7px minmax(0,1fr);align-items:center;gap:10px;width:100%;padding:9px 6px;border-top:1px solid #edf2f7;color:inherit}.attention-list span{min-width:0}.attention-list strong{display:block;color:#334155;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.attention-list small{display:block;margin-top:3px;color:#94a3b8;font-size:9px}.priority{width:6px;height:6px;border-radius:50%;background:#94a3b8}.priority.urgent{background:#e11d48;box-shadow:0 0 7px rgba(225,29,72,.3)}.priority.high{background:#f59e0b}.priority.normal{background:#3b82f6}
.attention-healthy { display:flex;align-items:center;justify-content:center;min-height:280px;flex-direction:column;text-align:center; }.attention-healthy>span{display:grid;place-items:center;width:68px;height:68px;margin-bottom:13px;border:1px solid #a7f3d0;border-radius:50%;color:#059669;background:#ecfdf5;font-size:28px;box-shadow:0 0 24px rgba(16,185,129,.08)}.attention-healthy strong{color:#334155}.attention-healthy p{margin:5px 0;color:#94a3b8;font-size:11px}
.workbench-applications { margin-top:24px; }.workbench-section-title{margin-bottom:12px}.workbench-app-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.workbench-app-card { display:block;width:100%;padding:19px;color:inherit;text-align:left;box-shadow:0 6px 22px rgba(15,23,42,.055); }.app-card-head h3{margin:4px 0;color:#1e293b;font-size:17px}
.app-card-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:17px 0; }.app-card-metrics div{min-width:0;padding:9px 10px;border-left:2px solid #93c5fd;background:#f8fbff}.app-card-metrics div.warning{border-left-color:#fbbf24}.app-card-metrics span{display:block;color:#94a3b8;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-card-metrics strong{display:block;margin-top:4px;color:#334155;font-size:16px}
.app-mini-line { display:block;width:100%;height:72px;opacity:.82; }.app-mini-line polyline{fill:none;stroke-width:2;vector-effect:non-scaling-stroke}
.app-mini-bars{display:grid;gap:8px}.app-mini-bars>div{display:grid;grid-template-columns:72px 1fr 30px;align-items:center;gap:9px}.app-mini-bars span{color:#94a3b8;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-mini-bars i{height:5px;border-radius:99px;overflow:hidden;background:#eaf0f7}.app-mini-bars i b{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#3b82f6,#0ea5e9)}.app-mini-bars strong{color:#64748b;font-size:10px;text-align:right}
.workbench-state { display:flex;align-items:center;justify-content:center;min-height:60vh;flex-direction:column;color:#64748b;text-align:center; }.workbench-state span{display:grid;place-items:center;width:62px;height:62px;border:1px solid #fecdd3;border-radius:50%;color:#e11d48;background:#fff1f2;font-size:25px}.workbench-state h2{margin:16px 0 4px;color:#334155}.workbench-state p{margin:0 0 18px}.workbench-state.compact{min-height:180px}.workbench-state button{background:linear-gradient(135deg,#3b82f6,#0ea5e9)}
.workbench-skeleton { min-height:120px;border-radius:17px;background:linear-gradient(100deg,#edf2f7 25%,#f8fafc 40%,#edf2f7 60%);background-size:220% 100%;animation:workbench-shimmer 1.5s infinite}.workbench-skeleton.wide{min-height:76px;margin-bottom:14px}.workbench-skeleton.chart{min-height:360px}.workbench-skeleton-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:14px}@keyframes workbench-shimmer{to{background-position-x:-220%}}
@media(max-width:1280px){.workbench-metrics{grid-template-columns:repeat(3,1fr)}.workbench-skeleton-grid{grid-template-columns:repeat(3,1fr)}.workbench-main-grid{grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr)}.app-card-metrics{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.workbench-cockpit{padding:18px;border-radius:18px}.workbench-header{flex-direction:column}.workbench-controls{justify-content:flex-start}.workbench-updated{text-align:left}.workbench-main-grid,.workbench-app-grid{grid-template-columns:1fr}.workbench-metrics{grid-template-columns:repeat(2,1fr)}.workbench-attention{min-height:auto}}
@media(max-width:560px){.workbench-metrics,.workbench-skeleton-grid{grid-template-columns:1fr}.workbench-range{width:100%}.workbench-range button{flex:1}.workbench-metric{min-height:118px}.attention-summary{align-items:flex-start;flex-direction:column}.app-card-metrics{grid-template-columns:1fr 1fr}}
@media(prefers-reduced-motion:reduce){.workbench-skeleton{animation:none}.workbench-metric,.workbench-app-card{transition:none}}
.runtime-application-banner p { margin:6px 0 0;color:#64748b; }
.runtime-state { flex:0 0 auto;padding:7px 12px;border-radius:999px;background:#eef2f7;color:#475569;font-size:13px;font-weight:700; }
.runtime-state-running { background:#e7f8ef;color:#16744a; }
.runtime-state-dispatch_paused { background:#fff5dc;color:#986400; }
.runtime-state-emergency_paused { background:#ffebec;color:#b4232d; }
.runtime-control-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0; }
.runtime-control-card { padding:20px;border:1px solid #dfe7f1;border-radius:14px;background:#fbfcff; }
.runtime-control-card h3 { margin:0 0 8px;color:#1f2a44; }
.runtime-control-card p { min-height:44px;margin:0 0 14px;color:#65748b;line-height:1.6; }
.runtime-control-card strong { color:#245ac7; }
.runtime-control-danger { border-color:#f2d5d8;background:#fffafb; }
.runtime-control-danger strong { color:#b4232d; }
.runtime-control-form { display:grid;gap:14px;padding:20px;border:1px solid #dfe7f1;border-radius:14px;background:#fff; }
.runtime-control-form label { display:grid;gap:8px; }
.runtime-control-form textarea { min-height:96px; }
.runtime-control-actions { display:flex;justify-content:center;gap:12px; }
.runtime-control-audit { display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:16px;padding:14px 16px;border-radius:12px;background:#f6f8fb;color:#66758a;font-size:13px; }
.runtime-issue-tabs button:hover { color:#fff; }
@media(max-width:720px){.runtime-application-banner{align-items:flex-start;flex-direction:column}.runtime-control-grid{grid-template-columns:1fr}.runtime-control-actions{align-items:stretch;flex-direction:column}.runtime-control-actions button{width:100%}}
.ticket-timeline { list-style:none;padding:0;margin:18px 0;display:grid;gap:0; }
.ticket-timeline li { position:relative;display:grid;grid-template-columns:18px 1fr;gap:10px;padding-bottom:18px; }
.ticket-timeline li>span { width:10px;height:10px;margin-top:5px;border-radius:50%;background:#3867e8;box-shadow:0 0 0 4px #eef4ff; }
.ticket-timeline li:not(:last-child)::after { content:"";position:absolute;left:4px;top:17px;bottom:2px;width:2px;background:#e4eaf3; }
.ticket-timeline strong,.ticket-timeline small { display:block; }.ticket-timeline small { margin-top:3px;color:var(--ui-muted); }.ticket-timeline p { margin:7px 0 0;white-space:pre-wrap; }
@media(max-width:760px){.ticket-detail-summary{grid-template-columns:1fr 1fr}.ticket-check-grid{grid-template-columns:1fr}}
.wi-report-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.wi-report-summary span { padding: 8px 12px; border-radius: 10px; background: #f4f7fc; color: #344054; }
.wi-portrait-report-drawer { width: min(1100px, calc(100vw - 40px)); }
.wi-portrait-results { display: grid; gap: 14px; }
.wi-portrait-results > h3 { margin: 0; }
.wi-portrait-result-card { display: grid; gap: 18px; padding: 18px; border: 1px solid #dfe7f1; border-radius: 16px; background: #fff; }
.wi-portrait-result-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wi-portrait-result-head .wi-person small { display: block; margin-top: 3px; color: #75839a; overflow-wrap: anywhere; }
.wi-portrait-result-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.wi-portrait-result-badges > strong { color: #2455d6; font-size: 14px; }
.wi-portrait-conclusion { padding: 14px 16px; border-left: 4px solid #3867e8; border-radius: 10px; background: #f6f9ff; }
.wi-portrait-conclusion h4, .wi-portrait-result-card h4 { margin: 0 0 8px; color: #25324b; }
.wi-portrait-conclusion p { margin: 0 0 8px; color: #1f2a3d; line-height: 1.7; }
.wi-portrait-conclusion small { color: #667085; line-height: 1.6; }
.wi-portrait-statistics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.wi-portrait-statistics div { padding: 12px; border-radius: 12px; background: #f6f8fb; text-align: center; }
.wi-portrait-statistics span { display: block; margin-bottom: 5px; color: #75839a; font-size: 12px; }
.wi-portrait-statistics strong { color: #25324b; font-size: 20px; }
.wi-portrait-dimensions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wi-portrait-dimension { padding: 12px; border: 1px solid #e1e7f0; border-radius: 12px; }
.wi-portrait-dimension > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.wi-portrait-dimension b { color: #2455d6; font-size: 13px; }
.wi-portrait-dimension small { color: #75839a; }
.wi-portrait-score { height: 6px; overflow: hidden; margin: 9px 0 7px; border-radius: 99px; background: #e8eef8; }
.wi-portrait-score span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3867ec, #43b7d9); }
.wi-portrait-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wi-portrait-tag { padding: 7px 10px; border: 1px solid #d9e4f7; border-radius: 10px; background: #f7faff; color: #53627a; font-size: 12px; }
.wi-portrait-tag strong { margin-right: 6px; color: #2455d6; }
.wi-portrait-advice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wi-portrait-advice section { padding: 14px; border-radius: 12px; background: #f8fafc; }
.wi-portrait-advice p, .wi-portrait-advice ul { margin: 0; color: #475467; line-height: 1.7; }
.wi-portrait-advice ul { padding-left: 20px; }
.wi-portrait-advice section h4:not(:first-child) { margin-top: 14px; }
@media (max-width: 760px) {
  .wi-portrait-report-drawer { width: calc(100vw - 24px); }
  .wi-portrait-result-head { align-items: flex-start; flex-direction: column; }
  .wi-portrait-result-badges { justify-content: flex-start; }
  .wi-portrait-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wi-portrait-dimensions, .wi-portrait-advice { grid-template-columns: 1fr; }
}
.wi-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 8px 0 16px; }
.wi-check-card { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border: 1px solid #d9e2f1; border-radius: 10px; background: #fff; font-weight: 500 !important; }
.wi-check-card input { width: 16px !important; height: 16px; margin: 0; flex: 0 0 auto; }
.wi-progress { width: 120px; height: 8px; overflow: hidden; margin-bottom: 4px; border-radius: 999px; background: #e8eef8; }
.wi-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3867ec, #43b7d9); }
.wi-cell-note { display: block; margin-top: 4px; color: #7a8699; }
.wi-detail-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 16px; border: 1px solid #e5ebf4; border-radius: 16px; background: #f8fbff; }
.wi-detail-hero img { width: 58px; height: 58px; border-radius: 16px; object-fit: cover; background: #eaf0f8; }
.wi-detail-hero h3 { margin: 0 0 5px; color: #172033; font-size: 20px; }
.wi-detail-hero p { margin: 0; color: #667085; overflow-wrap: anywhere; }
.wi-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.wi-detail-grid div { min-width: 0; padding: 12px 0; border-bottom: 1px solid #e8edf4; }
.wi-detail-grid dt { margin-bottom: 5px; color: #75839a; font-size: 12px; }
.wi-detail-grid dd { margin: 0; color: #1f2a3d; font-weight: 650; overflow-wrap: anywhere; }
.wi-detail-section { margin-top: 20px; padding: 16px; border: 1px solid #e5ebf4; border-radius: 14px; background: #fff; }
.wi-detail-section h3 { margin: 0 0 12px; color: #26344d; font-size: 16px; }
.wi-message-preview { margin: 0; color: #344054; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.wi-asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.wi-asset-grid img { width: 100%; aspect-ratio: 1; border-radius: 12px; object-fit: cover; background: #eef3f8; }
.wi-subline { display: block; margin-top: 5px; color: var(--text-muted, #7b8794); font-size: 12px; font-weight: 400; }
.wi-moment-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.wi-moment-rule-card { padding: 18px; border: 1px solid #e6ebf2; border-radius: 16px; background: linear-gradient(145deg, #fff, #f8fbff); box-shadow: 0 8px 24px rgba(25, 45, 85, .06); }
.wi-moment-rule-card > .status-badge { float: right; margin-top: -34px; }
.wi-moment-rule-card dl { display: grid; gap: 9px; margin: 18px 0; }
.wi-moment-rule-card dl div { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px dashed #e5eaf1; padding-bottom: 7px; }
.wi-moment-rule-card dt { color: var(--text-muted, #7b8794); }
.wi-moment-rule-card dd { margin: 0; color: #25324b; font-weight: 600; text-align: right; }
@media (max-width: 760px) { .drawer { width: 100%; max-width: none; padding: 18px; } .drawer-header { top: -18px; margin: -18px -18px 18px; padding: 18px; } .wi-toolbar { align-items: stretch; flex-direction: column; } .wi-toolbar > .wi-actions { justify-content: stretch; } .wi-toolbar > .wi-actions button { flex: 1; } .wi-picker-toolbar { align-items: stretch; flex-direction: column; } .wi-picker-toolbar label { align-items: stretch; flex-direction: column; white-space: normal; } .wi-picker-toolbar input { width: 100%; min-width: 0; } .wi-picker-search-actions { justify-content: center; } .wi-target-options, .wi-detail-grid, .wi-moment-network-row, .wi-moment-ai-row, .wi-remote-image-row { grid-template-columns: 1fr; } .wi-moment-network-row > button, .wi-moment-network-preview { margin-top: 0; padding-top: 0; } .wi-like-more-row { align-items: stretch; flex-direction: column; } .wi-like-friend-picker-list label { grid-template-columns: 18px minmax(0,1fr); } .wi-like-friend-picker-list code { grid-column: 2; } }

.enterprise-integration-page { display: grid; gap: 18px; }
.integration-page-header { margin-bottom: 0; }
.integration-list-card { margin: 0; }
.integration-list-card code { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; }
.integration-modal { width: min(1080px, calc(100vw - 40px)); }
.integration-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.integration-form-grid > label,
.integration-mapping-grid > label,
.integration-operation-select,
.integration-secret > label { display: grid; align-content: start; gap: 7px; color: #344054; font-size: var(--ui-font-sm); font-weight: 700; }
.integration-form-grid input,
.integration-form-grid select,
.integration-mapping-grid input,
.integration-mapping-grid select,
.integration-operation-select select,
.integration-secret input,
.integration-secret textarea,
.integration-field-row input,
.integration-field-row select { width: 100%; min-height: 42px; border: 1px solid var(--ui-border); border-radius: 8px; background: #fff; padding: 9px 11px; color: var(--ui-text); }
.integration-form-grid small,
.integration-mapping-grid small,
.integration-operation-select small { min-height: 38px; color: var(--ui-muted); font-weight: 500; line-height: 1.45; }
.integration-form-block { margin-top: 20px; padding: 18px; border: 1px solid var(--ui-border-soft); border-radius: 12px; background: #fbfcfe; }
.integration-form-block > h3 { margin: 0 0 6px; }
.integration-form-block > p { margin: 0 0 14px; color: var(--ui-muted); }
.integration-operation-hint { margin-top: 18px; }
.integration-operation-hint p,
.integration-form-block .hint-box p { margin: 5px 0 0; }
.integration-field-list { display: grid; gap: 10px; }
.integration-field-row { display: grid; grid-template-columns: minmax(130px,1fr) minmax(130px,1fr) 120px 86px 110px 74px; align-items: end; gap: 10px; padding: 12px; border: 1px solid var(--ui-border-soft); border-radius: 10px; background: #fff; }
.integration-field-row > label:not(.integration-check) { display: grid; gap: 6px; color: #344054; font-size: var(--ui-font-sm); font-weight: 700; }
.integration-check,
.integration-inline-check { display: flex; align-items: center; gap: 7px; min-height: 42px; color: #344054; font-weight: 600; }
.integration-check input,
.integration-inline-check input { width: 17px; height: 17px; min-height: 0; }
.integration-mapping-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.subscription-mapping-list { overflow: hidden; border: 1px solid var(--ui-border); border-radius: 10px; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.subscription-mapping-head,
.subscription-mapping-row { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(280px, 1.1fr); gap: 20px; align-items: center; padding: 12px 16px; }
.subscription-mapping-head { background: #f2f6fb; color: #52637a; font-size: 13px; font-weight: 700; }
.subscription-mapping-row + .subscription-mapping-row { border-top: 1px solid var(--ui-border-soft); }
.subscription-mapping-row > div { display: grid; gap: 4px; }
.subscription-mapping-row strong { color: var(--ui-text); font-size: 14px; }
.subscription-mapping-row small { color: var(--ui-muted); }
.subscription-mapping-row label { display: block; }
.subscription-mapping-row input { width: 100%; min-height: 42px; border: 1px solid var(--ui-border); border-radius: 8px; background: #fff; padding: 9px 11px; color: var(--ui-text); }
.integration-secret { display: grid; gap: 14px; }
.integration-secret textarea { resize: none; }

@media (max-width: 980px) {
  .integration-form-grid,
  .integration-mapping-grid { grid-template-columns: 1fr 1fr; }
  .integration-field-row { grid-template-columns: 1fr 1fr 120px; }
}
@media (max-width: 680px) {
  .integration-form-grid,
  .integration-mapping-grid,
  .subscription-mapping-head,
  .subscription-mapping-row,
  .integration-field-row { grid-template-columns: 1fr; }
  .subscription-mapping-head span:first-child { display: none; }
}
.identity-definition-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:18px}.identity-definition-card,.identity-config-card{background:#fff;border:1px solid #e3eaf2;border-radius:14px;padding:20px;box-shadow:0 8px 24px rgba(30,64,100,.05)}.identity-definition-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.identity-binding-layout{display:grid;grid-template-columns:minmax(320px,.75fr) minmax(480px,1.25fr);gap:18px}.identity-binding-layout>.wide{grid-column:1/-1}.identity-config-card h3{margin:0 0 12px}.inline-create-form{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;margin:14px 0}.chip-list{display:flex;flex-wrap:wrap;gap:8px}.identity-chip{display:inline-grid;grid-template-columns:auto auto;gap:4px 8px;align-items:center;padding:8px 11px;border:1px solid #d7e5f2;border-radius:10px;background:#f7fbff;color:#375169}.identity-chip strong{color:#0d78a8}.identity-chip small{grid-column:1/-1;color:#8191a3}@media(max-width:900px){.identity-binding-layout{grid-template-columns:1fr}.identity-binding-layout>.wide{grid-column:auto}.inline-create-form{grid-template-columns:1fr}.identity-definition-grid{grid-template-columns:1fr}}
.identity-account-configs{display:grid;gap:10px}.identity-account-config{display:grid;grid-template-columns:minmax(160px,1.3fr) repeat(6,minmax(110px,auto)) auto;align-items:center;gap:10px;padding:12px;border:1px solid #e5edf5;border-radius:10px;background:#fbfdff}.identity-account-config label{display:flex;align-items:center;gap:5px;font-size:13px}@media(max-width:1100px){.identity-account-config{grid-template-columns:repeat(2,1fr)}}
.identity-binding-list{display:grid;gap:18px}.identity-list-section{min-width:0;background:#fff;border:1px solid #e3eaf2;border-radius:14px;padding:20px;box-shadow:0 8px 24px rgba(30,64,100,.05)}.identity-list-section .section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.identity-list-section .section-head h2{margin:0 0 6px;font-size:20px}.identity-list-section .section-head p{margin:0;color:#728197}.identity-modal-card{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:auto}.identity-settings-form{display:grid;gap:20px}.identity-review-options{display:grid;gap:10px}.identity-review-options h3{margin:0;font-size:14px;color:#344054}.modal-check-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.modal-check-grid label{display:flex;align-items:center;gap:8px;padding:12px;border:1px solid #e3eaf2;border-radius:10px;background:#f8fbfe}.identity-list-section .table-wrap{max-width:100%;overflow:auto}@media(max-width:720px){.identity-list-section{padding:14px}.identity-list-section .section-head{align-items:stretch;flex-direction:column}.modal-check-grid{grid-template-columns:1fr}}
[data-external-verification-fields][hidden] { display: none !important; }

/* System UI v2 — shared console component baseline */
:root {
  --ui-primary: #2563eb;
  --ui-primary-hover: #1d4ed8;
  --ui-bg: #f5f7fb;
  --ui-surface: #ffffff;
  --ui-border: #dbe2ec;
  --ui-border-soft: #e9edf3;
  --ui-text: #172033;
  --ui-muted: #667085;
  --ui-radius: 12px;
  --ui-shadow: 0 18px 48px rgba(16, 24, 40, .16);
  --ui-font-xs: 12px;
  --ui-font-sm: 13px;
  --ui-font-md: 14px;
  --ui-font-lg: 16px;
  --ui-font-title: 20px;
  --ui-font-page: 28px;
}
body, .main-panel, .portal-main { background: var(--ui-bg); color: var(--ui-text); font-size: var(--ui-font-md); line-height: 1.5; }
h1 { font-size: var(--ui-font-page); line-height: 1.25; }
h2 { font-size: var(--ui-font-title); line-height: 1.3; }
h3 { font-size: var(--ui-font-lg); line-height: 1.4; }
p, li, dd, dt { font-size: var(--ui-font-md); }
button { border-radius: 9px; background: var(--ui-primary); padding: 9px 14px; box-shadow: none; font-size: 13px; font-weight: 700; }
button:hover { background: var(--ui-primary-hover); filter: none; }
button.secondary { border: 1px solid #cbd5e1; background: #fff; color: #344054; box-shadow: none; }
button.secondary:hover { border-color: #93a4bd; background: #f8fafc; color: #1f2937; }
.card, .panel, .identity-list-section, .identity-definition-card, .identity-config-card { border-color: var(--ui-border-soft); border-radius: 14px; background: var(--ui-surface); box-shadow: 0 4px 16px rgba(16,24,40,.04); }
.page-header, .page-title-card { border: 1px solid var(--ui-border-soft); border-radius: 14px; background: #fff; box-shadow: 0 4px 16px rgba(16,24,40,.04); }
.page-header { padding: 22px 24px; margin-bottom: 18px; }
.page-header h1 { margin: 3px 0 6px; font-size: 26px; }
.page-header p { margin: 0; color: var(--ui-muted); }
.portal-panel .section-head p { display: block; }
.section-head > div { min-width: 0; }
.card strong, .panel strong { display: inline; color: var(--ui-text); font-size: var(--ui-font-md); letter-spacing: normal; }
.cards > .card > strong, .portal-chain .chain-card strong { display: block; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; }
.form-hint, small, .wi-subline { font-size: var(--ui-font-xs); }
.form-grid label, .login-form label, .wi-broadcast-form label { font-size: var(--ui-font-sm); }

/* Hierarchical enterprise navigation */
.nav-tree-list { display: grid !important; align-content: start; gap: 3px !important; }
.nav-tree { display: grid; gap: 3px; }
.nav-parent { position: relative; display: grid; grid-template-columns: 18px minmax(0,1fr) 18px; width: 100%; }
.nav-parent.active { background: #eef4ff !important; color: #1d4ed8 !important; box-shadow: none !important; }
.nav-chevron { justify-self: end; color: #8a98ad; font-size: 20px; line-height: 16px; transition: transform .16s ease; }
.nav-tree.expanded .nav-chevron { transform: rotate(90deg); }
.nav-children { display: grid; gap: 2px; margin: 0 0 5px 28px; padding-left: 10px; border-left: 1px solid #dce4f0; }
.nav-children[hidden] { display: none; }
.nav-child { width: 100%; padding: 8px 11px; border-radius: 8px; background: transparent; color: #667085; box-shadow: none; text-align: left; font-size: 13px; font-weight: 600; }
.nav-child:hover { background: #f1f5fb; color: #1d4ed8; }
.nav-child.active { background: #2563eb; color: #fff; }
.portal-sidebar .sidebar-logout { border-radius: 9px; background: #eef2f7; color: #475467; }
.portal-sidebar .sidebar-logout:hover { background: #e2e8f0; }

/* Unified form controls */
input:not([type="checkbox"]):not([type="radio"]), select, textarea, .search-input, .compact-select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--ui-border);
  border-radius: 9px;
  background: #fff;
  color: var(--ui-text);
  padding: 9px 11px;
  outline: none;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 92px; resize: vertical; }
input:not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus, .search-input:focus, .compact-select:focus { border-color: #6b92f7; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
input::placeholder, textarea::placeholder { color: #98a2b3; }
input[type="checkbox"], input[type="radio"] { width: 16px !important; height: 16px !important; min-width: 16px; margin: 0; padding: 0; accent-color: var(--ui-primary); flex: 0 0 16px; }
.wi-switch, .wi-inline-check, .wi-target-options label, .modal-check-grid label, .identity-account-config label { display: inline-flex !important; align-items: center !important; justify-content: flex-start; gap: 8px !important; width: auto; }
.wi-switch { margin: 3px 12px 3px 0; }
.modal-check-grid label { width: 100%; }
.wi-controls { gap: 2px 10px; }
.wi-broadcast-form label { color: #344054; font-weight: 650; }
.wi-broadcast-form fieldset { border-color: var(--ui-border); background: #fbfcfe; }

/* Every modal/drawer is a centered, scroll-safe dialog */
.action-modal, .modal-mask, .drawer-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(15,23,42,.44); backdrop-filter: blur(5px); }
.action-modal-card, .modal-card, .drawer { width: min(760px, calc(100vw - 40px)); height: auto; max-height: calc(100vh - 48px); overflow-y: auto; border: 1px solid rgba(255,255,255,.7); border-radius: 16px; background: #fff; box-shadow: var(--ui-shadow); padding: 22px; animation: modal-enter .16s ease-out; }
.action-modal-card-wide, .wi-broadcast-drawer { width: min(960px, calc(100vw - 40px)); }
.drawer-header { position: sticky; top: -22px; margin: -22px -22px 20px; padding: 18px 22px; border-bottom: 1px solid var(--ui-border-soft); background: rgba(255,255,255,.97); }
.drawer-header h2, .drawer-head h2 { font-size: 20px; }
.drawer-header button, .icon-button { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--ui-border); border-radius: 8px; background: #fff; color: #667085; }
@keyframes modal-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* Balanced, readable tables */
.table-wrap { width: 100%; max-width: 100%; overflow: auto; border: 1px solid var(--ui-border-soft); border-radius: 10px; }
.table-wrap > table, .data-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: auto; }
.table-wrap th, .table-wrap td, .data-table th, .data-table td { display: table-cell !important; padding: 11px 13px; border-bottom: 1px solid var(--ui-border-soft); text-align: left; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.table-wrap th, .data-table th { background: #f8fafc; color: #475467; font-size: 12px; font-weight: 700; white-space: nowrap; }
.table-wrap td, .data-table td { color: #344054; font-size: 13px; line-height: 1.5; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:last-child, .data-table td:last-child { min-width: 150px; white-space: normal; }
.table-wrap td:last-child button, .data-table td:last-child button { display: inline-flex; align-items: center; margin: 2px 5px 2px 0; padding: 6px 9px; white-space: nowrap; }
.wi-actions { min-width: 180px; }
.platform-admin .admin-toolbar { max-width: 100%; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.platform-admin .admin-toolbar .toolbar-left, .platform-admin .admin-toolbar .toolbar-right { flex-wrap: nowrap; flex: 0 0 auto; }
.platform-admin .admin-toolbar .search-input { width: 176px; min-width: 148px; }
.platform-admin .admin-toolbar .toolbar-date-input { width: 142px; min-width: 142px; max-width: 142px; flex: 0 0 142px; }
.platform-admin .admin-toolbar .compact-select { width: auto; min-width: 128px; }
.platform-admin .admin-toolbar .toolbar-right button { min-height: 42px; padding: 9px 17px; font-size: 14px; }
.message-chain-actions { flex-wrap: nowrap; white-space: nowrap; min-width: max-content; }
.session-messages-modal { z-index: 70; }
.message-chain-modal { z-index: 80; }
.message-record-detail-modal { z-index: 90; }
.session-messages-modal .table-wrap { max-height: min(58vh, 560px); }
@media (min-width: 981px) {
  .platform-admin .sidebar { overflow: hidden; }
  .platform-admin .nav-tree-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; }
  .platform-admin .sidebar-logout { flex: 0 0 auto; margin-top: 12px; }
}
.platform-admin .ai-list-toolbar { justify-content: flex-end; overflow: visible; }
.platform-admin .ai-usage-summary-panel { padding: 18px; }
.platform-admin .ai-usage-cards { margin: 0; }
.platform-admin .ai-usage-list-panel .admin-toolbar { margin-top: 0; }
.secret-status-cell, .secret-input-wrap { display: flex; align-items: center; gap: 8px; }
.secret-status-cell .secret-eye { width: 34px; height: 34px; min-width: 34px; padding: 0; }
.secret-status-cell .secret-eye { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.secret-status-cell .secret-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.provider-balance-cell { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.provider-balance-cell .link-button { padding: 4px 7px !important; margin: 0 !important; }
.secret-input-wrap input { flex: 1; min-width: 0; }
.sensitive-secret-panel { display: grid; gap: 16px; }
.sensitive-warning { margin: 0; padding: 12px 14px; border: 1px solid #f2c36b; border-radius: 10px; color: #7a4d00; background: #fff8e8; }
.model-capability-field { margin:0; padding:14px; border:1px solid var(--ui-border); border-radius:10px; }
.model-capability-field legend { padding:0 6px; color:#344054; font-size:13px; font-weight:700; }
.model-capability-options { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px; }
.model-capability-options .wi-inline-check { margin:0; }

@media (max-width: 980px) {
  .portal-sidebar { max-height: none; }
  .action-modal, .modal-mask, .drawer-backdrop { padding: 12px; }
  .action-modal-card, .modal-card, .drawer, .action-modal-card-wide, .wi-broadcast-drawer { width: min(100%, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px; }
  .drawer-header { top: -18px; margin: -18px -18px 18px; padding: 15px 18px; }
}

/* WeChat console interaction fixes */
.drawer-backdrop {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}
.drawer-backdrop > .drawer {
  position: relative !important;
  inset: auto !important;
  margin: auto !important;
  height: auto !important;
  max-height: calc(100vh - 48px) !important;
  overflow-y: auto !important;
}
.module-tab:hover,
.module-tab:focus-visible,
.module-tab.active:hover {
  border-color: var(--ui-primary) !important;
  background: var(--ui-primary) !important;
  color: #fff !important;
}
.module-tab:hover small,
.module-tab:focus-visible small,
.module-tab.active:hover small { color: #fff !important; }
.wi-broadcast-form .wi-select-all {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: auto !important;
  gap: 8px !important;
}
.wi-broadcast-form .wi-select-all input[type="checkbox"] { width: 16px !important; }
.wechat-access-panel > .section-head { margin-bottom: 18px; }
.wechat-access-panel > .section-head h2 { margin: 0 0 6px; }
.wechat-access-panel > .section-head p { margin: 0; color: var(--ui-muted); }
.identity-binding-layout-tabs { display: grid; gap: 18px; min-width: 0; }
.identity-binding-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.identity-binding-list .identity-list-section { padding: 0; border: 0; box-shadow: none; }

@media (max-width: 980px) {
  .drawer-backdrop { padding: 12px !important; }
  .drawer-backdrop > .drawer { width: calc(100vw - 24px) !important; max-height: calc(100vh - 24px) !important; }
}

/* Compact list-first layout for WeChat access and interaction pages. */
.wechat-access-page-header,
.wechat-interaction-page > .wi-page-header {
  padding: 12px 18px;
  margin-bottom: 10px;
}
.wechat-access-page-header .eyebrow,
.wechat-interaction-page > .wi-page-header .eyebrow {
  margin: 0;
  font-size: 10px;
  line-height: 1.25;
}
.wechat-access-page-header h1,
.wechat-interaction-page > .wi-page-header h1 {
  margin: 2px 0 3px;
  font-size: 22px;
  line-height: 1.2;
}
.wechat-access-page-header p:last-child,
.wechat-interaction-page > .wi-page-header p:last-child {
  font-size: 13px;
  line-height: 1.4;
}
.wechat-access-panel,
.wechat-interaction-page > .card {
  padding: 14px 16px;
  margin-bottom: 12px;
}
.wechat-interaction-page > .card > .wi-toolbar {
  min-height: 36px;
  margin-bottom: 10px;
}
.wechat-interaction-page > .card > .wi-toolbar:only-child { margin-bottom: 0; }
.wechat-interaction-page > .card > .wi-toolbar h2 { margin: 0 0 2px; font-size: 17px; }
.wechat-interaction-page > .card > .wi-toolbar p { margin: 0; line-height: 1.4; }
.wechat-access-panel > .portal-toolbar { margin: 0 0 10px; padding: 8px 10px; }
.wechat-access-panel > .table-wrap,
.wechat-interaction-page > .card > .table-wrap { margin-top: 8px; }

@media (max-width: 760px) {
  .wechat-access-page-header,
  .wechat-interaction-page > .wi-page-header { padding: 11px 14px; }
  .wechat-access-panel,
  .wechat-interaction-page > .card { padding: 12px; }
}
