:root {
  --ink: #101d33;
  --muted: #5b6b85;
  --subtle: #8b9ab2;
  --line: #e3eaf4;
  --line-soft: #eef3fa;
  --surface: #ffffff;
  --canvas: #f4f7fc;
  --sidebar: #0a1730;
  --sidebar-muted: #8fa5c7;
  --green: #2b6fff;
  --green-dark: #1355e0;
  --green-soft: #ebf1ff;
  --cyan: #12b8d6;
  --cyan-soft: #e5faff;
  --amber: #9a6410;
  --amber-soft: #fff4dc;
  --red: #c24842;
  --red-soft: #fdeeed;
  --shadow: 0 18px 44px rgba(20, 51, 105, .13);
  --shadow-card: 0 1px 2px rgba(16, 42, 90, .04), 0 6px 20px -8px rgba(16, 42, 90, .08);
  --shadow-card-hover: 0 2px 4px rgba(16, 42, 90, .05), 0 14px 32px -10px rgba(16, 42, 90, .16);
  --sidebar-width: 232px;
  --control-height: 40px;
  --content-gap: 20px;
  --panel-radius: 14px;
  --control-radius: 9px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); background-image: radial-gradient(1100px 480px at 82% -180px, rgba(43, 111, 255, .055), transparent 68%), radial-gradient(900px 420px at -140px 12%, rgba(18, 184, 214, .05), transparent 66%); background-attachment: fixed; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; letter-spacing: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
button:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
input, select, textarea { width: 100%; border: 1px solid #d3ddec; border-radius: var(--control-radius); color: var(--ink); background: #fbfcfe; outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
input, select { height: var(--control-height); padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; line-height: 1.6; }
input:hover, select:hover, textarea:hover { border-color: #b9c9df; }
input:focus, select:focus, textarea:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3.5px rgba(43, 111, 255, .13); }
input::placeholder, textarea::placeholder { color: #9dabc1; }
h1, h2, h3, p { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th { height: 44px; padding: 0 16px; color: var(--subtle); background: #f8fafd; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; font-weight: 650; letter-spacing: .05em; white-space: nowrap; }
.sortable-heading { display: inline-flex; align-items: center; gap: 6px; }
.sort-arrows { display: inline-grid; gap: 0; line-height: 1; }
.sort-arrows button { width: 15px; height: 11px; padding: 0; border: 0; color: #aeb8c8; background: transparent; font-size: 8px; line-height: 11px; cursor: pointer; transition: color .15s, transform .15s; }
.sort-arrows button:hover { color: #5277b8; transform: scale(1.12); }
.sort-arrows button.is-active { color: var(--green); }
td { min-height: 58px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .14s; }
tbody tr:hover td { background: #f6f9fe; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.secondary-cell code, td > code { padding: 1px 6px; border-radius: 5px; background: #eef3fa; color: #4a5d7c; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .13em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: #fff; border: 1px solid #ecdffd; box-shadow: 0 10px 26px rgba(168, 85, 247, .26); isolation: isolate; }
.brand-mark img { width: 72%; height: 72%; object-fit: contain; }
.brand-mark::before { content: ""; position: absolute; inset: -5px; z-index: -1; border: 1px solid rgba(196, 132, 252, .55); border-radius: 17px; animation: brand-orbit 4.6s ease-in-out infinite; }
.brand-mark::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: #d8b4fe; box-shadow: 0 0 0 4px rgba(216, 180, 254, .22), 0 0 16px rgba(192, 132, 252, .9); animation: status-pulse 2s ease-in-out infinite; }
.brand-mark-small { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 4px 14px rgba(168, 85, 247, .45); }

.login-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 42%) 1fr; background: #fff; }
.login-panel { width: min(390px, calc(100vw - 48px)); margin: auto; padding: 48px 0; }
.login-panel .brand-mark { margin-bottom: 34px; }
.login-panel h1 { margin-top: 8px; font-size: 32px; font-weight: 760; letter-spacing: -.01em; }
.login-copy { margin-top: 9px; color: var(--muted); }
.login-form { display: grid; gap: 19px; margin-top: 34px; }
.login-form label, .dialog-field, .settings-form label, .service-form label { display: grid; gap: 7px; }
.login-form label > span, .dialog-field > span, .settings-form label > span, .service-form label > span { font-size: 13px; font-weight: 650; }
.login-form input { height: 46px; border-radius: 10px; }
.captcha-row { display: grid; grid-template-columns: 1fr 124px; gap: 9px; }
.captcha-button { height: 46px; padding: 0; overflow: hidden; border: 1px solid #d3ddec; border-radius: 10px; background: #f5f9ff; transition: border-color .18s; }
.captcha-button:hover { border-color: var(--green); }
.captcha-button img { width: 100%; height: 100%; object-fit: cover; }
.captcha-button span { color: var(--muted); font-size: 12px; }
.form-error { min-height: 18px; margin-top: -5px; color: var(--red); font-size: 12px; }
.login-aside { position: relative; min-height: 100vh; overflow: hidden; background: linear-gradient(135deg, #061633 0%, #092953 54%, #0b5a89 100%); }
.login-aside::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom right, transparent 8%, #000 72%); }
.login-aside::after { content: ""; position: absolute; width: 460px; height: 460px; right: -170px; bottom: -170px; border: 92px solid rgba(37, 164, 255, .14); border-radius: 50%; animation: orbit-drift 9s ease-in-out infinite reverse; }
.login-aside-content { position: absolute; left: 11%; bottom: 13%; z-index: 1; color: #fff; }
.login-aside-content::before { content: ""; position: absolute; left: -38px; top: -30px; width: 94px; height: 94px; border: 1px solid rgba(102, 213, 255, .35); border-radius: 50%; box-shadow: 0 0 28px rgba(39, 182, 255, .18); animation: orbit-drift 7s ease-in-out infinite; }
.login-aside-content p { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 17px; color: #b4cbe8; }
.login-aside-content strong { display: block; max-width: 520px; font-size: clamp(28px, 3vw, 48px); line-height: 1.3; font-weight: 680; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #49d7ff; box-shadow: 0 0 0 4px rgba(73, 215, 255, .15), 0 0 14px rgba(73, 215, 255, .55); animation: status-pulse 2s ease-in-out infinite; }

.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-width); display: flex; flex-direction: column; color: #fff; background: linear-gradient(180deg, #081a38 0%, #0a2450 56%, #071730 100%); box-shadow: 10px 0 36px rgba(6, 26, 54, .18); transition: width .22s ease, transform .22s ease; }
.sidebar::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 1px; height: 100%; background: linear-gradient(180deg, rgba(88, 174, 255, .22), rgba(88, 174, 255, .02) 60%); pointer-events: none; }
.sidebar-brand { height: 76px; padding: 0 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand strong { display: block; font-size: 15px; letter-spacing: .01em; }
.sidebar-brand small { display: block; margin-top: 3px; color: var(--sidebar-muted); font-size: 9px; letter-spacing: .14em; }
.sidebar-collapse-button { position: absolute; top: 23px; right: -14px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(110, 151, 213, .45); border-radius: 8px; color: #d7e8ff; background: #0b2856; box-shadow: 0 5px 15px rgba(3, 16, 39, .3); font-size: 18px; line-height: 1; cursor: pointer; transition: color .15s, background .15s, transform .15s; }
.sidebar-collapse-button:hover { color: #fff; background: #174786; transform: translateX(1px); }
.main-nav { display: grid; gap: 5px; padding: 20px 14px; }
.nav-item { position: relative; height: 43px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 10px; color: #a9bdda; background: transparent; text-align: left; font-weight: 550; transition: color .18s, background .18s; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.is-active { color: #fff; background: linear-gradient(92deg, rgba(43, 128, 255, .32), rgba(18, 184, 214, .12)); box-shadow: inset 0 0 0 1px rgba(103, 190, 255, .22), 0 6px 16px -6px rgba(20, 110, 255, .45); font-weight: 650; }
.nav-item.is-active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #4dd6ff, #2b6fff); box-shadow: 0 0 10px rgba(77, 214, 255, .8); }
.nav-icon { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: #d4e3f8; font-size: 10px; font-weight: 700; background: rgba(255,255,255,.03); }
.nav-item.is-active .nav-icon { color: #67dcff; border-color: rgba(103,220,255,.58); background: rgba(38, 138, 255, .18); box-shadow: 0 0 0 3px rgba(60, 180, 255, .10); animation: icon-pulse 2.4s ease-in-out infinite; }
.sidebar-footer { margin-top: auto; margin-inline: 12px; margin-bottom: 14px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.04); color: var(--sidebar-muted); }
.service-state { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; color: #cfe0f6; font-size: 12px; }
.sidebar-footer small { font-size: 11px; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-width); transition: margin-left .22s ease; }
.topbar { position: sticky; top: 0; z-index: 20; height: 76px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: rgba(250, 252, 255, .88); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar h2 { font-size: 20px; font-weight: 720; letter-spacing: -.01em; }
.topbar p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-balances { display: flex; align-items: center; gap: 8px; }

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 7px;
  border: 1px solid rgba(216, 228, 244, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  user-select: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.balance-pill:hover {
  background: #ffffff;
  border-color: rgba(43, 111, 255, 0.35);
  box-shadow: 0 4px 12px rgba(43, 111, 255, 0.09);
  transform: translateY(-1px);
}
.balance-pill:active {
  transform: translateY(0);
}

.balance-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.volc-icon {
  color: #ea580c;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid rgba(234, 88, 12, 0.2);
}
.relay-icon {
  color: #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.balance-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.balance-label {
  font-size: 10px;
  font-weight: 550;
  color: var(--subtle, #64748b);
  letter-spacing: 0.02em;
}
.balance-val {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.balance-pill.is-error .balance-val {
  color: #e11d48;
}

.balance-refresh-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: all .18s ease;
}
.balance-refresh-btn:hover {
  color: #2563eb;
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}
.balance-refresh-btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}
.balance-refresh-btn.is-loading .balance-refresh-icon {
  animation: balance-spin 0.75s linear infinite;
}

@keyframes balance-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.user-menu { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border: 1px solid transparent; border-radius: 12px; transition: border-color .18s, background .18s; }
.user-menu:hover { border-color: var(--line); background: #fff; }
.user-menu strong, .user-menu small { display: block; }
.user-menu strong { max-width: 130px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.user-menu small { margin-top: 2px; color: var(--subtle); font-size: 10px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #2b6fff, #16a9d8); font-size: 13px; font-weight: 700; box-shadow: 0 4px 10px rgba(43, 111, 255, .28); }
.menu-button { display: none !important; }

@media (min-width: 901px) {
  .app.is-sidebar-collapsed { --sidebar-width: 92px; }
  .app.is-sidebar-collapsed .sidebar-brand { justify-content: center; padding-inline: 10px; }
  .app.is-sidebar-collapsed .sidebar-brand-copy,
  .app.is-sidebar-collapsed .nav-label,
  .app.is-sidebar-collapsed .sidebar-footer { display: none; }
  .app.is-sidebar-collapsed .main-nav { gap: 9px; padding: 22px 13px; }
  .app.is-sidebar-collapsed .nav-item { height: 50px; justify-content: center; gap: 0; padding-inline: 0; border-radius: 12px; }
  .app.is-sidebar-collapsed .nav-item.is-active { background: linear-gradient(135deg, rgba(43, 128, 255, .46), rgba(18, 184, 214, .22)); box-shadow: inset 0 0 0 1px rgba(103, 220, 255, .38), 0 8px 20px -7px rgba(20, 132, 255, .72); }
  .app.is-sidebar-collapsed .nav-item.is-active::before { left: -13px; top: 10px; bottom: 10px; width: 4px; }
  .app.is-sidebar-collapsed .nav-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; border-color: rgba(180, 211, 255, .34); background: rgba(255, 255, 255, .065); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025); }
  .app.is-sidebar-collapsed .nav-icon::before { font-size: 19px; text-shadow: 0 0 10px rgba(108, 203, 255, .38); }
  .app.is-sidebar-collapsed .nav-item[data-nav-icon="ai-records"] .nav-icon::before,
  .app.is-sidebar-collapsed .nav-item[data-nav-icon="tk-daily-report"] .nav-icon::before { font-size: 13px; }
  .app.is-sidebar-collapsed .nav-item[data-nav-icon="trend-selection"] .nav-icon::before { font-size: 15px; }
  .app.is-sidebar-collapsed .nav-item[data-nav-icon="restricted-brands"] .nav-icon::before,
  .app.is-sidebar-collapsed .nav-item[data-nav-icon="brand-whitelist"] .nav-icon::before { font-size: 17px; }
  .app.is-sidebar-collapsed .nav-item[data-nav-icon="plugin-releases"] .nav-icon::before,
  .app.is-sidebar-collapsed .nav-item[data-nav-icon="old-control"] .nav-icon::before { font-size: 17px; }
  .app.is-sidebar-collapsed .nav-submenu { display: none; }
  .app.is-sidebar-collapsed .nav-chevron { display: none; }
  .app.is-sidebar-collapsed .nav-item.is-active .nav-icon { border-color: rgba(103, 220, 255, .78); background: rgba(20, 126, 236, .3); box-shadow: 0 0 0 3px rgba(60, 180, 255, .14), 0 0 18px rgba(49, 181, 255, .32); }
  .app.is-sidebar-collapsed .nav-item.is-active .nav-icon::before { color: #91eaff; text-shadow: 0 0 12px rgba(82, 215, 255, .72); }
}
.content { max-width: 1600px; margin: 0 auto; padding: 26px 28px 44px; }
.view { display: none; }
.view.is-active { display: block; animation: view-in .22s ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.is-loading { position: relative; }
.is-loading > * { opacity: .55; filter: saturate(.7); transition: opacity .2s, filter .2s; }
.view-toolbar { min-height: var(--control-height); margin-bottom: var(--content-gap); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.control-toolbar { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius); box-shadow: var(--shadow-card); }
.button { min-height: var(--control-height); padding: 0 16px; border: 1px solid transparent; border-radius: var(--control-radius); font-size: 13px; font-weight: 630; white-space: nowrap; transition: background .18s, border-color .18s, box-shadow .18s, transform .08s; }
button.is-busy { position: relative; color: transparent !important; }
button.is-busy::before { content: ""; position: absolute; top: 50%; left: 50%; width: 13px; height: 13px; margin: -8px 0 0 -8px; border: 2px solid rgba(12, 27, 51, .22); border-top-color: var(--green); border-radius: 50%; animation: spin .7s linear infinite; }
button.button-primary.is-busy::before { border-color: rgba(255, 255, 255, .45); border-top-color: #fff; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: linear-gradient(135deg, #3d7dff, #1c63f2 60%, #1157e6); border-color: rgba(17, 87, 230, .9); box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 8px 18px -6px rgba(28, 99, 242, .5); }
.button-primary:hover { background: linear-gradient(135deg, #2f70fa, #1355e0 60%, #0c4bd2); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 10px 22px -6px rgba(28, 99, 242, .58); }
.button-secondary { color: #33496a; background: #fff; border-color: #d3ddec; box-shadow: 0 1px 2px rgba(16, 42, 90, .05); }
.button-secondary:hover { border-color: #a9bdd9; background: #f7faff; }
.button-danger { color: var(--red); background: #fff; border-color: #ecc6c3; box-shadow: 0 1px 2px rgba(140, 40, 30, .05); }
.button-danger:hover { border-color: #dfa19c; background: #fdf6f5; }
.button-quiet { min-height: 32px; padding: 0 10px; color: var(--muted); background: transparent; border-color: transparent; }
.button-quiet:hover { color: var(--ink); background: #edf3fb; }
.button-block { width: 100%; min-height: 46px; border-radius: 10px; font-size: 14px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 21px; transition: color .15s, background .15s; }
.icon-button:hover { color: var(--ink); background: #edf3fb; }
.link-button { padding: 4px 0; border: 0; color: var(--green); background: transparent; font-size: 12px; font-weight: 650; }
.link-button:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 3px; }
.date-presets, .segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: #f2f6fc; }
.preset { min-height: 32px; padding: 0 13px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; transition: color .15s, background .15s, box-shadow .15s; }
.preset:hover { color: var(--ink); }
.preset.is-active { color: var(--green-dark); background: #fff; font-weight: 650; box-shadow: 0 1px 3px rgba(16, 42, 90, .12), 0 0 0 1px rgba(43, 111, 255, .14); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius); box-shadow: var(--shadow-card); }
.panel-heading { min-height: 70px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.panel-heading h3 { font-size: 15px; font-weight: 700; letter-spacing: -.005em; }
.panel-heading p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: var(--content-gap); }
.metric-grid-compact { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.consumption-panel { margin-bottom: var(--content-gap); }
.consumption-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 16px 20px 0; }
.consumption-note { margin: 8px 20px 14px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cost-meta { display: block; max-width: 290px; white-space: normal; margin-top: 5px; color: var(--muted); font-size: 11px; }
.cost-error { color: #b45309; }
.project-subtotal td { font-weight: 700; background: #f3f6fa; }
@media (max-width: 680px) { .consumption-cards { grid-template-columns: 1fr; } }
.metric-card { position: relative; min-height: 118px; padding: 18px 20px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--panel-radius); box-shadow: var(--shadow-card); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--metric-color, var(--green)) 32%, var(--line)); box-shadow: var(--shadow-card-hover); }
.metric-card::before { content: ""; position: absolute; top: -46px; right: -46px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--metric-color, var(--green)) 14%, transparent), transparent); pointer-events: none; }
.metric-card::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--metric-color, var(--green)), color-mix(in srgb, var(--metric-color, var(--green)) 20%, transparent)); opacity: .85; }
.metric-card.metric-info { --metric-color: var(--cyan); }
.metric-card.metric-warning { --metric-color: #d98a12; }
.metric-card.metric-danger { --metric-color: var(--red); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 550; }
.metric-value { display: block; margin-top: 14px; font-size: 28px; line-height: 1; font-weight: 760; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric-note { display: block; margin-top: 10px; color: var(--subtle); font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--content-gap); }
.bar-list { min-height: 300px; padding: 14px 20px 20px; display: grid; align-content: start; gap: 16px; }
.bar-item { display: grid; grid-template-columns: minmax(100px, 160px) 1fr 42px; align-items: center; gap: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.bar-track { height: 9px; overflow: hidden; border-radius: 5px; background: #ecf2fa; box-shadow: inset 0 1px 2px rgba(16, 42, 90, .06); }
.bar-fill { height: 100%; min-width: 3px; border-radius: 5px; background: linear-gradient(90deg, var(--green), var(--cyan)); background-size: 180% 100%; box-shadow: 0 1px 4px rgba(43, 111, 255, .35); animation: gradient-flow 3.8s linear infinite; }
.bar-value { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; }
.activity-list { min-height: 300px; padding: 4px 20px 10px; }
.activity-item { width: 100%; min-height: 63px; padding: 0 6px; margin: 0 -6px; display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 8px; background: transparent; text-align: left; transition: background .15s; }
.activity-item:hover { background: #f5f9fe; }
.activity-item:last-child { border-bottom: 0; }
.activity-item .activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.activity-item.failed .activity-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.activity-item.partial_success .activity-dot { background: #d98a12; box-shadow: 0 0 0 3px var(--amber-soft); }
.activity-item strong { display: block; font-size: 12px; font-weight: 650; }
.activity-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.activity-item time { color: var(--subtle); font-size: 10px; white-space: nowrap; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 780px; }
.align-right { text-align: right; }
td.align-right { white-space: nowrap; }
.primary-cell { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 640; }
.secondary-cell { display: block; max-width: 280px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11px; white-space: nowrap; }
.log-version-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-prompt-cell { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: 12px; white-space: nowrap; }
.log-prompt-empty { color: var(--muted); }
.log-prompt-tooltip { position: fixed; z-index: 50; max-width: 420px; max-height: 260px; padding: 10px 12px; overflow: auto; border-radius: 8px; color: #fff; background: #0b1f3f; box-shadow: 0 10px 28px rgba(6, 26, 54, .28); font-size: 12px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
.log-prompt-tooltip.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.number-cell { font-variant-numeric: tabular-nums; font-weight: 650; }
.empty-row td { height: 190px; color: var(--muted); text-align: center; }
.empty-row:hover td { background: transparent; }
.empty-message { display: block; }
.badge { display: inline-flex; min-height: 24px; padding: 0 10px; align-items: center; gap: 6px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge-success { color: #0b5ac2; background: var(--green-soft); }
.badge-failed { color: #ab352f; background: var(--red-soft); }
.badge-warning { color: #8a570a; background: var(--amber-soft); }
.badge-neutral { color: #5c6f89; background: #edf2f9; }
.badge-info { color: #12657c; background: var(--cyan-soft); }
.inline-actions { display: inline-flex; justify-content: flex-end; gap: 7px; }
.table-panel tbody .button, .inline-actions .button { min-height: 30px; padding: 0 11px; border-radius: 7px; font-size: 11px; }
.panel-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.shop-selection-cell { width: 48px; min-width: 48px; padding-inline: 16px; text-align: center; }
.table-checkbox { width: 16px; height: 16px; padding: 0; vertical-align: middle; accent-color: var(--green); cursor: pointer; }
.table-checkbox:focus { box-shadow: 0 0 0 3px rgba(43, 111, 255, .13); }
.table-panel tbody tr.is-selected td { background: #eef5ff; }
.shop-bulk-actions { min-height: 52px; padding: 9px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #cfe0f7; background: #f3f7ff; }
.shop-bulk-actions > strong { color: var(--green-dark); font-size: 12px; }
.shop-bulk-actions > span:not(.inline-actions) { color: var(--muted); font-size: 11px; }
.shop-bulk-actions .inline-actions { margin-left: auto; }
.pagination { min-height: 56px; padding: 10px 16px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-soft); background: #fafcfe; color: var(--muted); font-size: 11px; }
.pagination-size { margin-right: auto; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pagination-size select { width: 88px; height: 32px; padding: 0 9px; color: var(--ink); background-color: #fff; font-size: 11px; }
.pagination-summary { white-space: nowrap; }
.pagination-jump { margin: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pagination-jump input { width: 62px; height: 32px; padding: 0 7px; text-align: center; background: #fff; font-size: 11px; }
.pagination-jump button { padding-inline: 9px; font-size: 11px; }
.pagination button { min-width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; transition: border-color .15s, color .15s, box-shadow .15s; }
.pagination button:hover:not(:disabled) { border-color: var(--green); color: var(--green); box-shadow: 0 2px 6px rgba(43, 111, 255, .16); }
.filter-bar { margin-bottom: var(--content-gap); padding: 15px 16px; display: grid; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius); box-shadow: var(--shadow-card); }
.filter-main-row { display: flex; align-items: flex-end; gap: 10px; }
.filter-bar label { width: 160px; display: grid; gap: 6px; }
.filter-bar label > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.filter-bar .filter-grow { width: auto; min-width: 180px; flex: 1; }
.filter-submit, .filter-reset { min-width: 68px; flex: 0 0 auto; }
.filter-bar-simple { grid-template-columns: minmax(0, 760px) 1fr; align-items: end; }
.filter-bar-simple .filter-main-row { grid-column: 1; }
.filter-note { grid-column: 2; align-self: end; padding: 0 2px 12px; color: var(--muted); font-size: 11px; text-align: right; }
.filter-advanced { border-top: 1px dashed var(--line); padding-top: 11px; }
.filter-advanced summary { width: fit-content; cursor: pointer; color: var(--green-dark); font-size: 12px; font-weight: 650; list-style-position: inside; transition: color .15s; }
.filter-advanced summary:hover { color: var(--green); }
.filter-advanced summary span { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.filter-advanced-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 11px 12px; padding-top: 13px; }
.log-action-field { position: relative; width: 100%; min-width: 0; display: grid; gap: 6px; align-content: start; }
.log-action-field > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.log-action-toggle { width: 100%; height: var(--control-height); padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #d3ddec; border-radius: var(--control-radius); color: var(--ink); background: #fbfcfe; text-align: left; }
.log-action-toggle:hover { border-color: #b9c9df; }
.log-action-toggle[aria-expanded="true"] { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3.5px rgba(43, 111, 255, .13); }
#log-module-label, #log-action-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.log-action-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; width: min(460px, calc(100vw - 58px)); min-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: var(--control-radius); background: var(--surface); box-shadow: var(--shadow); }
#log-module-menu { left: 0; right: auto; }
.log-action-options { max-height: 280px; max-height: min(280px, 40vh); margin-top: 6px; overflow-y: auto; overscroll-behavior: contain; }
.log-action-option { padding: 9px 10px; border-radius: 6px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.log-action-option:hover, .log-action-option.is-active { background: var(--green-soft); }
.log-action-option[aria-selected="true"] { color: var(--green-dark); font-weight: 600; }
.log-action-empty { padding: 12px 10px; color: var(--muted); font-size: 12px; }
.shop-filter-bar .filter-main-row { flex-wrap: wrap; }
.shop-search-field { width: 160px; flex: 0 0 auto; }
.shop-search-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shop-search-field .log-action-menu { left: 0; right: auto; width: 100%; }
.shop-filter-note { color: var(--muted); font-size: 11px; }
.settings-tabs { margin-bottom: var(--content-gap); padding: 5px; display: flex; gap: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--panel-radius); background: linear-gradient(180deg, #f8fbff, #f1f6fd); box-shadow: var(--shadow-card); scrollbar-width: thin; }
.settings-tab { min-height: 40px; padding: 0 18px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 650; transition: color .16s, background .16s, border-color .16s, box-shadow .16s; }
.settings-tab:hover { color: var(--green-dark); background: rgba(255,255,255,.68); }
.settings-tab.is-active { color: #1558cc; border-color: #c8d9f2; background: #fff; box-shadow: 0 3px 10px rgba(28, 83, 160, .12), inset 0 -2px 0 #2b6fff; }
.view-tabs { margin-bottom: var(--content-gap); padding: 6px; display: flex; gap: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--panel-radius); background: linear-gradient(180deg, #f8fbff, #f1f6fd); box-shadow: var(--shadow-card); scrollbar-width: thin; }
.view-tab { min-height: 36px; padding: 2px; display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 9px; color: var(--muted); background: transparent; transition: color .16s, background .16s, border-color .16s, box-shadow .16s; }
.view-tab:hover { background: rgba(255,255,255,.68); }
.view-tab.is-active { border-color: #c8d9f2; background: #fff; box-shadow: 0 3px 10px rgba(28, 83, 160, .12), inset 0 -2px 0 #2b6fff; }
.view-tab-label { min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; transition: color .16s; }
.view-tab:hover .view-tab-label, .view-tab-label:hover { color: var(--green-dark); }
.view-tab.is-active .view-tab-label { color: #1558cc; }
.view-tab-close { width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 14px; line-height: 1; cursor: pointer; transition: color .14s, background .14s; }
.view-tab-close:hover { color: var(--red); background: var(--red-soft); }
.settings-panel { overflow: hidden; }
.settings-tab-panel { margin-top: 0; }
.general-settings-form { gap: 14px; }
.local-ai-settings-panel { margin-top: var(--content-gap); }
.content-maintenance-panel { margin-top: var(--content-gap); overflow: hidden; }
.local-ai-form { gap: 0; }
.settings-subsection { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.settings-subsection:first-child { padding-top: 0; }
.settings-subsection:last-of-type { border-bottom: 0; }
.settings-subheading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; }
.settings-subheading strong { position: relative; padding-left: 11px; font-size: 13px; }
.settings-subheading strong::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 13px; transform: translateY(-50%); border-radius: 2px; background: linear-gradient(180deg, var(--green), var(--cyan)); }
.settings-subheading span { color: var(--muted); font-size: 11px; }
.settings-subheading .button { min-height: 32px; padding: 0 11px; font-size: 12px; }
.local-ai-form .form-actions { padding-top: 18px; }
.settings-form { display: grid; gap: 14px; padding: 20px; }
.settings-form textarea { min-height: 280px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-hint { color: var(--muted); font-size: 11px; }
.service-fields { display: grid; grid-template-columns: 1.3fr .8fr; gap: 12px; }
.service-fields .span-two { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; width: 40px; height: 23px; border-radius: 12px; background: #c9d8ea; transition: background .18s, box-shadow .18s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform .18s; }
.switch input:checked + .switch-track { background: linear-gradient(135deg, #3d7dff, #1355e0); box-shadow: 0 2px 8px rgba(43, 111, 255, .35); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }
.switch-label { color: var(--muted); font-size: 11px; }
.action-points-panel { margin-top: var(--content-gap); }
.provider-maintenance-panel { margin-top: var(--content-gap); overflow: hidden; }
[data-tkl="fastmoss"] label[hidden] { display: none; }
.provider-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.provider-group { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--line-soft); }
.provider-group:last-child { border-right: 0; }
.provider-group-heading { min-height: 40px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.provider-group-heading strong { display: block; font-size: 13px; }
.provider-group-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.provider-list { display: grid; gap: 10px; }
.provider-list .empty-block { min-height: 140px; border: 1px dashed #c8d6e8; border-radius: 10px; background: #fafcff; }
.provider-card { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(180deg, #fcfdff, #f8fbff); box-shadow: 0 1px 2px rgba(16, 42, 90, .04); transition: border-color .18s, box-shadow .18s; }
.provider-card:hover { border-color: #c4d5ec; box-shadow: 0 4px 14px -4px rgba(16, 42, 90, .12); }
.provider-card-heading { display: flex; align-items: center; gap: 10px; }
.provider-card-heading > input { min-width: 0; flex: 1; height: 36px; font-weight: 650; }
.provider-card-heading .switch { flex: 0 0 auto; }
.provider-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.provider-fields label { min-width: 0; display: grid; gap: 5px; }
.provider-fields label > span { color: var(--muted); font-size: 10px; font-weight: 600; }
.provider-fields input, .provider-fields select { height: 36px; font-size: 12px; }
.provider-fields .span-two { grid-column: 1 / -1; }
.provider-card-actions { margin-top: 10px; display: flex; justify-content: flex-end; gap: 6px; }
.provider-card-actions .button, .provider-group-heading .button { min-height: 30px; padding: 0 10px; border-radius: 7px; font-size: 11px; }
.provider-capabilities { padding: 18px 20px; }
.provider-capabilities .settings-subheading { margin-bottom: 12px; }
.provider-capabilities td select { min-width: 220px; }
.provider-capabilities tbody .button { min-height: 30px; padding: 0 11px; border-radius: 7px; font-size: 11px; }
.provider-footer { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line-soft); background: #fafcfe; }
.maintenance-pane { padding: 16px 20px 20px; }
.maintenance-toolbar { display: flex; align-items: flex-end; gap: 11px; margin-bottom: 14px; }
.maintenance-toolbar label { min-width: 180px; display: grid; gap: 6px; }
.maintenance-toolbar label > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.maintenance-toolbar .maintenance-search { flex: 1; }
.maintenance-hint { display: block; margin: -4px 0 14px; }
.prompt-settings-panel { margin-top: var(--content-gap); }
.prompt-workspace { display: grid; grid-template-columns: minmax(320px, .78fr) minmax(520px, 1.5fr); gap: 14px; align-items: stretch; }
.prompt-library-card, .prompt-editor-card { min-width: 0; min-height: 650px; overflow: hidden; }
.prompt-library-card { display: flex; flex-direction: column; }
.prompt-editor-card { display: flex; flex-direction: column; }
.prompt-card-heading { min-height: 72px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.prompt-card-heading h3 { font-size: 16px; font-weight: 720; }
.prompt-card-heading p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.prompt-card-heading-actions, .prompt-editor-actions, .prompt-editor-title { display: flex; align-items: center; gap: 9px; }
.prompt-card-heading-actions .button { min-height: 36px; padding-inline: 12px; }
.prompt-kind-tabs { padding: 0 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line-soft); }
.prompt-kind-tab { position: relative; min-width: 0; height: 52px; padding: 0 5px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; color: var(--muted); background: transparent; font-size: 12px; white-space: nowrap; transition: color .16s, background .16s; }
.prompt-kind-tab:hover { color: var(--ink); background: #f7faff; }
.prompt-kind-tab strong { min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; color: #6c7c95; background: #eef3fa; font-size: 10px; font-weight: 700; }
.prompt-kind-tab::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--green); opacity: 0; transform: scaleX(.5); transition: opacity .16s, transform .16s; }
.prompt-kind-tab.is-active { color: var(--green-dark); font-weight: 700; }
.prompt-kind-tab.is-active strong { color: var(--green-dark); background: var(--green-soft); }
.prompt-kind-tab.is-active::after { opacity: 1; transform: scaleX(1); }
.prompt-library-filters { padding: 14px 16px 12px; display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 9px; }
.prompt-library-filters input, .prompt-library-filters select { height: 38px; font-size: 12px; }
.prompt-search-field { position: relative; }
.prompt-search-field::before { content: "⌕"; position: absolute; z-index: 1; left: 12px; top: 7px; color: #8796ad; font-size: 20px; line-height: 22px; pointer-events: none; }
.prompt-search-field input { padding-left: 36px; }
.prompt-library-list { min-height: 0; max-height: 515px; padding: 0 16px 16px; overflow-y: auto; display: grid; align-content: start; gap: 9px; scrollbar-width: thin; scrollbar-color: #cbd6e5 transparent; }
.prompt-library-item { width: 100%; min-height: 98px; padding: 13px 14px; display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 1px 2px rgba(16, 42, 90, .025); transition: border-color .16s, background .16s, box-shadow .16s, transform .12s; }
.prompt-library-item:hover { border-color: #b9cbe4; background: #fbfdff; box-shadow: 0 7px 18px -10px rgba(16, 66, 145, .3); transform: translateY(-1px); }
.prompt-library-item.is-active { border-color: #73a5ff; background: linear-gradient(145deg, #f8fbff, #eef5ff); box-shadow: 0 0 0 2px rgba(43, 111, 255, .08), 0 8px 20px -12px rgba(43, 111, 255, .45); }
.prompt-library-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prompt-library-item-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.prompt-order { flex: 0 0 auto; color: #54657e; font-size: 11px; font-variant-numeric: tabular-nums; }
.prompt-library-item-meta { min-height: 22px; margin-top: 6px; display: flex; align-items: center; }
.prompt-category-badge { max-width: 120px; height: 21px; padding: 0 7px; display: inline-flex; align-items: center; overflow: hidden; border-radius: 6px; color: #3271cf; background: #eaf2ff; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.prompt-library-item-content { margin-top: 6px; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.prompt-list-empty, .prompt-editor-empty { display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.prompt-list-empty { min-height: 260px; border: 1px dashed #cdd9e9; border-radius: 11px; background: #fafcff; }
.prompt-list-empty strong, .prompt-editor-empty strong { color: #3b4f6e; font-size: 13px; }
.prompt-list-empty span, .prompt-editor-empty span { font-size: 11px; }
.prompt-editor-heading { flex: 0 0 auto; }
.prompt-editor-actions .button, .prompt-more-menu > summary { min-height: 36px; padding-inline: 14px; }
.prompt-more-menu { position: relative; }
.prompt-more-menu > summary { display: inline-flex; align-items: center; list-style: none; user-select: none; }
.prompt-more-menu > summary::-webkit-details-marker { display: none; }
.prompt-more-menu.is-disabled > summary { pointer-events: none; opacity: .58; }
.prompt-more-popover { position: absolute; z-index: 5; top: calc(100% + 7px); right: 0; width: 132px; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(16, 42, 90, .18); }
.prompt-more-popover .button { width: 100%; min-height: 34px; padding: 0 10px; }
.prompt-editor-tip { margin: 14px 18px 0; min-height: 42px; padding: 10px 13px; display: flex; align-items: center; gap: 8px; border-radius: 8px; color: #2868c7; background: linear-gradient(90deg, #eef6ff, #e9f3ff); font-size: 12px; }
.prompt-editor-empty { flex: 1; min-height: 400px; margin: 18px; border: 1px dashed #cdd9e9; border-radius: 11px; background: #fafcff; }
.prompt-editor-form { min-height: 0; flex: 1; padding: 18px 18px 0; display: flex; flex-direction: column; }
.prompt-editor-form label { display: grid; gap: 7px; }
.prompt-editor-form label > span { color: #263955; font-size: 12px; font-weight: 650; }
.prompt-editor-form input, .prompt-editor-form textarea { background: #fff; }
.prompt-editor-meta-fields { margin-top: 15px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .48fr); gap: 14px; }
.prompt-content-field { position: relative; min-height: 0; flex: 1; margin-top: 15px; }
.prompt-content-field textarea { min-height: 255px; height: 100%; padding-bottom: 34px; resize: none; font-size: 13px; line-height: 1.75; }
.prompt-content-field small { position: absolute; right: 12px; bottom: 11px; padding-left: 14px; color: var(--subtle); background: linear-gradient(90deg, transparent, #fff 20%); font-size: 10px; font-variant-numeric: tabular-nums; }
.prompt-editor-footer { min-height: 72px; margin: 18px -18px 0; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line-soft); background: #fbfcfe; }
.prompt-editor-footer > div { display: flex; gap: 9px; }
.prompt-editor-footer .button { min-width: 116px; }
.watermark-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.watermark-admin-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fbfdff; transition: border-color .18s, box-shadow .18s, transform .18s; }
.watermark-admin-card:hover { border-color: #c4d5ec; transform: translateY(-2px); box-shadow: 0 8px 18px -6px rgba(16, 42, 90, .16); }
.watermark-admin-preview { height: 120px; display: grid; place-items: center; padding: 10px; background: repeating-conic-gradient(#eef3f9 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.watermark-admin-preview img { max-width: 100%; max-height: 100px; object-fit: contain; }
.watermark-admin-body { padding: 10px; }
.watermark-admin-fields { display: grid; grid-template-columns: 1fr 72px; gap: 7px; }
.watermark-admin-body input { height: 34px; }
.watermark-admin-meta { margin: 6px 0 9px; color: var(--muted); font-size: 10px; }
.watermark-admin-actions { display: flex; justify-content: flex-end; gap: 6px; }
.watermark-admin-actions .button { min-height: 28px; padding: 0 10px; border-radius: 7px; font-size: 11px; }
.file-picker input { padding: 7px 8px; height: 40px; }
.restricted-brand-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px 0; }
.restricted-brand-actions .file-picker { display: inline-flex; align-items: center; gap: 8px; }
.restricted-brand-actions .file-picker span { color: var(--muted); font-size: 11px; font-weight: 600; }
.restricted-brand-manual { display: inline-flex; align-items: center; gap: 8px; }
.restricted-brand-manual span { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.restricted-brand-manual input { width: 210px; }
.restricted-brand-import-panel > .field-hint { display: block; margin: 10px 20px 18px; }
.restricted-brand-import-panel .panel-heading { margin-bottom: 0; }
.restricted-brand-import-panel .panel-heading p { max-width: 680px; }
.points-input { width: 88px; height: 34px; text-align: center; }
#material-refresh-billing > tr:first-child > td { border-top: 1px solid var(--line-soft); }
.material-refresh-notes { line-height: 1.7; }
.material-refresh-notes > p:empty { display: none; }
.material-refresh-notes details { margin-top: 10px; }
.material-refresh-notes summary { cursor: pointer; font-weight: 640; }
.material-refresh-notes .maintenance-toolbar { margin-top: 14px; }

.dialog { width: min(92vw, 560px); max-height: 88vh; padding: 0; overflow: hidden; border: 0; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 32px 80px rgba(10, 25, 55, .3); }
.dialog::backdrop { background: rgba(10, 22, 42, .5); backdrop-filter: blur(4px); }
.dialog[open] { animation: dialog-in .2s ease-out; }
.dialog-wide { width: min(94vw, 980px); }
.dialog-heading { min-height: 82px; padding: 18px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fafcff, #fff); }
.dialog-heading h3 { margin-top: 5px; font-size: 18px; letter-spacing: -.01em; }
.dialog-heading p:last-child { margin-top: 5px; color: var(--muted); font-size: 11px; }
.dialog-small form { padding-bottom: 18px; }
.dialog-small .segmented { margin: 18px 22px 0; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented span { min-width: 90px; height: 32px; padding: 0 14px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); transition: color .15s, background .15s, box-shadow .15s; }
.segmented input:checked + span { color: var(--green-dark); background: #fff; font-weight: 650; box-shadow: 0 1px 3px rgba(16, 42, 90, .12), 0 0 0 1px rgba(43, 111, 255, .14); }
.dialog-field { margin: 16px 22px 0; }
.dialog-actions { margin: 20px 22px 0; display: flex; justify-content: flex-end; gap: 8px; }
#shop-template-download { margin-right: auto; }
.shop-import-hint { margin: 12px 22px 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.shop-import-result { margin: 14px 22px 0; padding: 11px 12px; border: 1px solid #cfe0f7; border-radius: 8px; background: #f3f7ff; }
.shop-import-result strong { display: block; color: var(--green-dark); font-size: 12px; }
.shop-import-result p { margin-top: 5px; color: #33496a; font-size: 11px; }
.shop-import-result small { display: block; max-height: 64px; margin-top: 5px; overflow: auto; color: var(--muted); font-size: 10px; line-height: 1.5; }
.dialog-wide > .table-scroll { max-height: 62vh; }
#ledger-dialog { width: min(95vw, 1140px); overflow: visible; }
#ledger-dialog > .dialog-heading { border-radius: 16px 16px 0 0; }
#ledger-dialog > #ledger-pagination { border-radius: 0 0 16px 16px; }
.ledger-filter-bar { position: relative; z-index: 20; padding: 14px 22px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--line-soft); background: #fff; }
.ledger-filter-bar label.ledger-date-field { width: 142px; flex: 0 0 auto; display: grid; gap: 6px; }
.ledger-filter-bar label > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.ledger-multi-field { width: 158px; flex: 0 0 auto; }
.ledger-multi-field.is-hidden { display: none; }
.ledger-multi-menu { left: 0; right: auto; width: 256px; max-width: calc(100vw - 44px); }
.ledger-type-menu { width: 280px; }
.ledger-multi-toolbar { margin-top: 6px; padding: 0 2px 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line-soft); }
.ledger-multi-toolbar .link-button { font-size: 11px; padding: 2px 4px; }
.ledger-multi-options { max-height: min(240px, 36vh); display: grid; gap: 2px; }
.ledger-check-option { padding: 7px 8px; display: flex; align-items: center; gap: 8px; border-radius: 6px; font-size: 12px; line-height: 1.4; cursor: pointer; user-select: none; }
.ledger-check-option:hover { background: var(--green-soft); }
.ledger-check-option input[type="checkbox"] { width: 15px; height: 15px; margin: 0; flex: 0 0 15px; accent-color: var(--green); cursor: pointer; }
.ledger-check-option > span { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.ledger-check-option > small { flex: 0 0 auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.ledger-type-presets { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.ledger-preset-chip { height: 26px; padding: 0 9px; border: 1px solid #d3ddec; border-radius: 999px; background: #f7faff; color: #344968; font-size: 11px; font-weight: 600; cursor: pointer; transition: color .14s, background .14s, border-color .14s; }
.ledger-preset-chip:hover { border-color: #aac2e6; background: #eef4ff; }
.ledger-preset-chip.is-active { color: #fff; background: var(--green); border-color: var(--green); }
.ledger-filter-actions { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; }
.ledger-filter-bar .button { min-width: 68px; }
.ledger-filter-bar .ledger-export { margin-left: auto; }
.dialog-wide > .ledger-table-scroll { max-height: 48vh; }
.detail-summary { padding: 14px 22px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; border-bottom: 1px solid var(--line-soft); background: #f8fafd; }
.detail-summary div { min-width: 0; }
.detail-summary span { display: block; color: var(--muted); font-size: 10px; }
.detail-summary strong { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.detail-pane { display: none; max-height: 52vh; overflow: auto; padding: 18px 22px; }
.detail-pane.is-active { display: block; }
.detail-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-soft); }
.detail-actions:empty { display: none; }
.detail-card { margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fcfdff; }
.detail-card:last-child { margin-bottom: 0; }
.detail-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-card-header strong { font-size: 12px; }
.detail-meta { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 11px; }
.code-block { max-height: 220px; margin-top: 12px; padding: 13px 14px; overflow: auto; border-radius: 9px; color: #d6e8ff; background: linear-gradient(160deg, #0a1b38, #0c2347); border: 1px solid rgba(88, 156, 255, .16); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-readable-result { margin-top: 11px; color: #22324d; font-size: 13px; line-height: 1.65; }
.detail-readable-error { margin-top: 11px; padding: 9px 11px; border-radius: 8px; color: #a73333; background: #fff3f3; font-size: 12px; line-height: 1.6; }
.detail-core-metrics { margin-top: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.detail-core-metrics span { padding: 10px 11px; border-radius: 8px; background: #f5f8fc; }
.detail-core-metrics small { display: block; color: var(--muted); font-size: 10px; }
.detail-core-metrics strong { display: block; margin-top: 4px; color: #172844; font-size: 12px; }
.detail-disclosure { margin-top: 13px; border-top: 1px solid var(--line-soft); }
.detail-disclosure-standalone { margin: 0 0 12px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.detail-disclosure summary { padding: 12px 0; cursor: pointer; color: #315eaa; font-size: 12px; font-weight: 650; list-style-position: inside; }
.detail-disclosure summary::after { content: "（点击展开）"; margin-left: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }
.detail-disclosure[open] summary::after { content: "（点击收起）"; }
.detail-disclosure-body { padding: 0 0 14px; }
.detail-disclosure-body h4 { margin: 14px 0 0; color: #34445e; font-size: 11px; }
.detail-technical-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.detail-disclosure .code-block { max-height: 280px; }
.delta-positive { color: #1a7f37; }
.delta-negative { color: var(--red); }
.toast-region { position: fixed; top: 88px; right: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { width: min(360px, calc(100vw - 40px)); padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 11px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: var(--shadow); animation: toast-in .22s cubic-bezier(.2, .9, .3, 1.2); }
.toast.is-error { border-left-color: var(--red); }
.toast strong { display: block; font-size: 12px; }
.toast p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.empty-block { min-height: 180px; display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes status-pulse { 0%, 100% { transform: scale(.88); opacity: .72; } 50% { transform: scale(1.16); opacity: 1; } }
@keyframes icon-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
@keyframes brand-orbit { 0%, 100% { transform: rotate(0deg) scale(.98); opacity: .58; } 50% { transform: rotate(180deg) scale(1.04); opacity: 1; } }
@keyframes orbit-drift { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: .45; } 50% { transform: translate3d(12px, -10px, 0) rotate(180deg); opacity: .95; } }
@keyframes gradient-flow { to { background-position: -180% 0; } }

/* 科技感动态图标：按导航语义绑定，避免新增菜单项后 nth-child 错位。 */
.nav-icon { position: relative; color: transparent; overflow: visible; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.nav-icon::before { position: absolute; inset: 0; display: grid; place-items: center; color: #cfe1ff; font-size: 12px; font-weight: 800; line-height: 1; transition: transform .2s ease, color .2s ease; }
.nav-item[data-nav-icon="overview"] .nav-icon::before { content: "✦"; }
.nav-item[data-nav-icon="shops"] .nav-icon::before { content: "▣"; }
.nav-item[data-nav-icon="operations"] .nav-icon::before { content: "营"; }
.nav-item[data-nav-icon="tk-daily-report"] .nav-icon::before { content: "TK"; font-size: 9px; }
.nav-item[data-nav-icon="trend-selection"] .nav-icon::before { content: "趋"; font-size: 10px; }
.nav-item[data-nav-icon="operators"] .nav-icon::before { content: "◉"; }
.nav-item[data-nav-icon="logs"] .nav-icon::before { content: "≋"; }
.nav-item[data-nav-icon="ai-records"] .nav-icon::before { content: "AI"; font-size: 9px; }
.nav-item[data-nav-icon="stats"] .nav-icon::before { content: "◒"; }
.nav-item[data-nav-icon="product-review"] .nav-icon::before { content: "✓"; }
.nav-item[data-nav-icon="restricted-brands"] .nav-icon::before { content: "⚠"; font-size: 11px; }
.nav-item[data-nav-icon="brand-whitelist"] .nav-icon::before { content: "◇"; font-size: 13px; }
.nav-item[data-nav-icon="settings"] .nav-icon::before { content: "⚙"; font-size: 11px; }
.nav-item[data-nav-icon="plugin-releases"] .nav-icon::before { content: "▤"; font-size: 12px; }
.nav-item[data-nav-icon="message-center"] .nav-icon::before { content: "✉"; }
.nav-item[data-nav-icon="roles"] .nav-icon::before { content: "⚿"; }
.nav-item[data-nav-icon="old-control"] .nav-icon::before { content: "↗"; font-size: 14px; }
.nav-item:hover .nav-icon::before { color: #73ddff; transform: scale(1.16) rotate(8deg); }
.nav-item.is-active .nav-icon { color: transparent; }
.nav-item.is-active .nav-icon::before { color: #67dcff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
.sidebar-scrim { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 2026 enterprise visual pass: preserve the existing DOM and behavior while
   tightening hierarchy, density, and interaction affordances. */
.content { max-width: 1680px; }
.topbar { box-shadow: 0 1px 0 rgba(16, 42, 90, .02), 0 8px 24px -18px rgba(16, 42, 90, .32); }
.topbar h2 { color: #0b1b36; }
.control-toolbar { background: rgba(255, 255, 255, .94); }
.view-toolbar .date-presets { box-shadow: inset 0 1px 2px rgba(16, 42, 90, .04); }

.metric-card { min-height: 126px; }
.metric-label { position: relative; z-index: 1; }
.metric-value, .metric-note { position: relative; z-index: 1; }

.overview-grid > .panel { min-height: 360px; }
.bar-list, .activity-list { min-height: 314px; }
.panel-heading { background: linear-gradient(180deg, rgba(250, 252, 255, .92), #fff); }
.panel-heading h3 { color: #0b1b36; }

.filter-bar { background: rgba(255, 255, 255, .96); }
.filter-bar label > span { letter-spacing: .01em; }
.filter-advanced { margin-top: 1px; }
.filter-advanced[open] { padding-bottom: 2px; }

.table-panel table { font-size: 12px; }
.table-panel tbody tr:hover td { background: linear-gradient(90deg, #f6f9fe, #fbfdff); }
.table-panel .secondary-cell { color: #6f7f98; }
.table-panel .stats-attribution { max-width: 320px; color: #536784; }
.pagination { background: linear-gradient(180deg, #fbfdff, #f7faff); }

/* Provider maintenance is a long-form configuration surface: stack the
   service groups and let each group use a readable two-column card grid. */
.provider-groups { grid-template-columns: 1fr; }
.provider-group { padding: 20px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
.provider-group:last-child { border-bottom: 0; }
.provider-group-heading { min-height: 44px; margin-bottom: 14px; }
.provider-group-heading strong { font-size: 14px; letter-spacing: .01em; }
.provider-group-heading small { font-size: 11px; }
.provider-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.provider-card { padding: 15px; background: linear-gradient(180deg, #fff, #f9fbff); border-radius: 12px; }
.provider-card-heading > input { height: 38px; border-color: transparent; background: transparent; font-size: 14px; }
.provider-card-heading > input:hover { border-color: #d3ddec; background: #fbfcfe; }
.provider-fields { gap: 10px; margin-top: 11px; }
.provider-fields label > span { font-size: 11px; }
.provider-fields input, .provider-fields select { height: 38px; }
.provider-fields textarea { min-height: 88px; font-size: 11px; }
.provider-card-actions { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.provider-capabilities { padding: 20px; background: #fff; }
.provider-capabilities .settings-subheading { min-height: 32px; align-items: center; }
.provider-capabilities td select { min-width: 240px; background: #fbfcfe; }
.provider-footer { padding: 16px 20px; background: linear-gradient(180deg, #fbfdff, #f5f9fe); }

/* Restricted-brand management needs a clear replace/clear hierarchy and a
   calmer risk treatment so the destructive action remains unmistakable. */
.restricted-brand-import-panel { overflow: hidden; background: linear-gradient(180deg, #fff, #fbfdff); }
.restricted-brand-import-panel .panel-heading { padding-top: 18px; padding-bottom: 18px; }
.restricted-brand-import-panel .panel-heading > div:first-child { position: relative; padding-left: 14px; }
.restricted-brand-import-panel .panel-heading > div:first-child::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #f2b84b, #dc8b16); }
.restricted-brand-import-panel .panel-heading h3 { font-size: 17px; }
.restricted-brand-import-panel .badge { min-height: 28px; padding-inline: 12px; }
.restricted-brand-actions { padding-top: 18px; padding-bottom: 2px; }
.restricted-brand-actions .file-picker { flex: 1 1 260px; min-width: 240px; }
.restricted-brand-actions .file-picker input { min-width: 0; background: #fbfcfe; }
.restricted-brand-import-panel > .field-hint { margin-top: 11px; padding: 10px 12px; border: 1px dashed #d8e3f1; border-radius: 9px; background: #f8fbff; }
.restricted-brand-platform-tabs { display: inline-flex; gap: 6px; padding: 16px 20px 0; }
.restricted-brand-platform-tab { appearance: none; border: 1px solid #d8e3f1; background: #f8fbff; color: #5b6b84; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.restricted-brand-platform-tab:hover { background: #eef4fc; color: #0b1b36; }
.restricted-brand-platform-tab.is-active { background: #0f2f5c; border-color: #0f2f5c; color: #fff; }
#view-restricted-brands > .filter-bar { margin-top: var(--content-gap); }
#view-restricted-brands .table-panel { border-color: #dfe7f2; }
#view-restricted-brands .table-panel th { background: #f7faff; }

.brand-whitelist-import-panel { overflow: hidden; background: linear-gradient(180deg, #fff, #fbfdff); }
.brand-whitelist-import-panel .panel-heading { padding-top: 18px; padding-bottom: 18px; }
.brand-whitelist-import-panel .panel-heading > div:first-child { position: relative; padding-left: 14px; }
.brand-whitelist-import-panel .panel-heading > div:first-child::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, #10b981, #059669); }
.brand-whitelist-import-panel .panel-heading h3 { font-size: 17px; }
.brand-whitelist-import-panel .badge { min-height: 28px; padding-inline: 12px; }
.brand-whitelist-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 20px 2px; }
.brand-whitelist-actions .file-picker { flex: 1 1 260px; min-width: 240px; display: inline-flex; align-items: center; gap: 8px; }
.brand-whitelist-actions .file-picker span { color: var(--muted); font-size: 11px; font-weight: 600; }
.brand-whitelist-actions .file-picker input { min-width: 0; background: #fbfcfe; }
.brand-whitelist-manual { display: inline-flex; align-items: center; gap: 8px; }
.brand-whitelist-manual span { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.brand-whitelist-manual input { width: 260px; }
.brand-whitelist-remark { display: inline-flex; align-items: center; gap: 8px; }
.brand-whitelist-remark span { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.brand-whitelist-remark input { width: 160px; }
.brand-whitelist-import-panel > .field-hint { display: block; margin: 11px 20px 18px; padding: 10px 12px; border: 1px dashed #d8e3f1; border-radius: 9px; background: #f8fbff; }
.brand-whitelist-platform-tabs { display: inline-flex; gap: 6px; padding: 16px 20px 0; }
.brand-whitelist-platform-tab { appearance: none; border: 1px solid #d8e3f1; background: #f8fbff; color: #5b6b84; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.brand-whitelist-platform-tab:hover { background: #eef4fc; color: #0b1b36; }
.brand-whitelist-platform-tab.is-active { background: #0f2f5c; border-color: #0f2f5c; color: #fff; }
#view-brand-whitelist > .filter-bar { margin-top: var(--content-gap); }
#view-brand-whitelist .table-panel { border-color: #dfe7f2; }
#view-brand-whitelist .table-panel th { background: #f7faff; }

/* Detail dialogs are dense operational tools: keep the summary visible and
   make object-level cards easier to scan without changing their content. */
.dialog-wide { width: min(94vw, 1040px); }
.detail-summary { background: linear-gradient(180deg, #f7faff, #fbfdff); }
.detail-summary strong { color: #0b1b36; }
.detail-card { background: #fff; box-shadow: 0 3px 12px -8px rgba(16, 42, 90, .28); }
.detail-card:hover { border-color: #c4d5ec; }

@media (max-width: 760px) {
  .provider-list { grid-template-columns: 1fr; }
  .restricted-brand-actions .file-picker { flex-basis: 100%; }
  .detail-core-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
  .metric-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .provider-groups { grid-template-columns: 1fr; }
  .provider-group { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .provider-group:last-child { border-bottom: 0; }
  .prompt-workspace { grid-template-columns: minmax(290px, .78fr) minmax(430px, 1.35fr); }
  .prompt-card-heading { align-items: flex-start; }
  .prompt-card-heading-actions { align-items: flex-end; flex-direction: column; }
  .prompt-kind-tab { font-size: 11px; }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 224px; }
  .app.is-sidebar-collapsed { --sidebar-width: 224px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .menu-button { display: grid !important; }
  .sidebar-collapse-button { display: none; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(6,22,51,.44); backdrop-filter: blur(2px); }
  .sidebar-scrim.is-visible { display: block; }
  .login-screen { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .filter-main-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-main-row label, .filter-bar label { width: 100%; min-width: 0; }
  .filter-bar .filter-grow { width: 100%; min-width: 0; grid-column: 1 / -1; }
  .filter-submit, .filter-reset { width: 100%; }
  .shop-filter-bar .filter-main-row { display: grid; }
  .shop-search-field { width: 100%; }
  .filter-bar-simple { grid-template-columns: 1fr; }
  .filter-note { grid-column: 1; padding: 0 2px; text-align: left; }
  .filter-advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prompt-workspace { grid-template-columns: 1fr; }
  .prompt-library-card, .prompt-editor-card { min-height: auto; }
  .prompt-library-list { max-height: 430px; }
  .prompt-editor-form { min-height: 530px; }
}
@media (max-width: 640px) {
  .topbar { height: 68px; padding: 0 14px; }
  .topbar p, .user-menu > div, .user-menu .avatar { display: none; }
  .topbar-right { gap: 8px; }
  .topbar-balances { gap: 6px; }
  .balance-pill { padding: 4px 8px 4px 6px; gap: 5px; }
  .balance-label { display: none; }
  .balance-val { font-size: 11px; }
  .content { padding: 16px 12px 28px; }
  .view-toolbar { align-items: stretch; flex-direction: column; }
  .control-toolbar .button { width: 100%; }
  .date-presets { width: 100%; }
  .preset { flex: 1; padding: 0 5px; font-size: 11px; }
  .metric-grid, .metric-grid-compact { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 102px; padding: 14px; }
  .metric-value { margin-top: 12px; font-size: 23px; }
  .metric-note { margin-top: 7px; }
  .filter-advanced-grid { grid-template-columns: 1fr; }
  #view-shops .panel-heading { align-items: stretch; flex-direction: column; }
  .panel-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .panel-actions .button { width: 100%; min-width: 0; padding-inline: 10px; }
  #shop-create { grid-column: 1 / -1; }
  .shop-bulk-actions { align-items: flex-start; flex-wrap: wrap; }
  .shop-bulk-actions .inline-actions { width: 100%; margin-left: 0; justify-content: flex-start; flex-wrap: wrap; }
  .pagination { flex-wrap: wrap; }
  .pagination-size { width: 100%; margin-right: 0; }
  #ai-pagination .pagination-jump { margin-right: auto; }
  .empty-row td { text-align: left; }
  .empty-message { position: sticky; left: 0; width: calc(100vw - 40px); text-align: center; }
  .settings-form { padding: 14px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .provider-footer { align-items: stretch; flex-direction: column; }
  .service-fields { grid-template-columns: 1fr; }
  .service-fields .span-two { grid-column: auto; }
  .maintenance-toolbar { align-items: stretch; flex-direction: column; }
  .maintenance-toolbar label { width: 100%; min-width: 0; }
  .prompt-workspace { gap: 12px; }
  .prompt-card-heading { align-items: stretch; flex-direction: column; }
  .prompt-card-heading-actions { align-items: stretch; flex-direction: row; justify-content: space-between; }
  .prompt-kind-tabs { padding: 0 5px; }
  .prompt-kind-tab { height: 48px; gap: 3px; font-size: 10px; }
  .prompt-kind-tab strong { min-width: 17px; height: 17px; padding-inline: 4px; font-size: 9px; }
  .prompt-library-filters { grid-template-columns: 1fr; }
  .prompt-library-list { max-height: 390px; }
  .prompt-editor-heading { align-items: flex-start; }
  .prompt-editor-actions { width: 100%; }
  .prompt-editor-actions > .button, .prompt-more-menu { flex: 1; }
  .prompt-more-menu > summary { width: 100%; justify-content: center; }
  .prompt-editor-meta-fields { grid-template-columns: 1fr; }
  .prompt-editor-form { min-height: 600px; }
  .prompt-content-field textarea { min-height: 300px; }
  .prompt-editor-footer { align-items: stretch; flex-direction: column; }
  .prompt-editor-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .prompt-editor-footer .button { min-width: 0; width: 100%; }
  .watermark-admin-fields { grid-template-columns: 1fr; }
  .detail-summary { grid-template-columns: 1fr 1fr; }
  .dialog { width: calc(100vw - 20px); max-height: 92vh; }
  #shop-import-form .dialog-actions { align-items: stretch; flex-wrap: wrap; }
  #shop-import-form .dialog-actions .button { min-width: calc(50% - 4px); flex: 1; }
  #shop-template-download { width: 100%; margin-right: 0; flex-basis: 100% !important; }
  .ledger-filter-bar { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 14px; }
  .ledger-filter-bar label.ledger-date-field, .ledger-multi-field { width: 100%; }
  .ledger-multi-menu, .ledger-type-menu { width: min(280px, calc(100vw - 48px)); }
  .ledger-filter-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ledger-filter-bar .button { width: 100%; }
  .ledger-filter-bar .ledger-export { margin-left: 0; grid-column: 1 / -1; }
  .bar-item { grid-template-columns: 100px 1fr 34px; }
}

/* 旧中控后台：侧边栏可折叠子菜单 */
.nav-item-toggle .nav-label { flex: 1 1 auto; }
.nav-chevron { margin-left: auto; width: 8px; height: 8px; flex: 0 0 8px; border-right: 2px solid #7f9ac2; border-bottom: 2px solid #7f9ac2; transform: rotate(-45deg); transition: transform .18s; }
.nav-item-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(45deg); }
.nav-submenu { margin-inline: 12px 12px; padding: 2px 0 6px 12px; display: grid; gap: 2px; border-left: 1px solid rgba(255,255,255,.09); }
.nav-submenu[hidden] { display: none; }
.nav-submenu-link { min-height: 32px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border-radius: 8px; color: #9fb3d4; font-size: 12px; text-decoration: none; transition: color .15s, background .15s; }
.nav-submenu-link:hover, .nav-submenu-summary:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-submenu-summary { min-height: 32px; padding: 0 10px; display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; border-radius: 8px; color: #b9c9e4; font-size: 12px; font-weight: 600; transition: color .15s, background .15s; }
.nav-submenu-summary::-webkit-details-marker { display: none; }
.nav-submenu-summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; flex: 0 0 7px; border-right: 2px solid #7f9ac2; border-bottom: 2px solid #7f9ac2; transform: rotate(-45deg); transition: transform .18s; }
.nav-submenu-group[open] > .nav-submenu-summary::after { transform: rotate(45deg); }
.nav-submenu-children { margin-left: 12px; padding-left: 10px; border-left: 1px dashed rgba(255,255,255,.09); display: grid; gap: 2px; }

/* 旧中控内嵌页 */
.old-control-frame { position: fixed; top: 76px; right: 0; bottom: 0; left: var(--sidebar-width); z-index: 22; display: flex; flex-direction: column; background: var(--surface); box-shadow: 0 12px 32px -18px rgba(16, 42, 90, .35); }
.old-control-frame[hidden] { display: none; }
.old-control-frame-bar { min-height: 52px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(250, 252, 255, .94); }
.old-control-tabs { flex: 1 1 auto; min-width: 0; margin-bottom: 0; padding: 6px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.old-control-frame-close { flex: 0 0 auto; }
.old-control-panels { flex: 1 1 auto; display: flex; overflow: hidden; }
.old-control-panel { flex: 1 1 100%; display: none; min-width: 0; }
.old-control-panel.is-active { display: flex; }
.old-control-frame-iframe { flex: 1 1 auto; width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 900px) {
  .old-control-frame { left: 0; }
}
@media (max-width: 640px) {
  .old-control-frame { top: 68px; }
}
/* Product review statistics reuse the existing panels, tables and metrics. */
#review-records-form { grid-template-columns: minmax(0, 1fr); }
#review-records-form .filter-main-row { flex-wrap: wrap; }
#review-records-form .filter-note { grid-column: 1; text-align: left; padding: 0; line-height: 1.6; }
#review-records-table .review-full-text { min-width: 240px; max-width: 620px; }
.review-full-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font: inherit; }
.review-result-section { border-top: 1px solid var(--border-color, #e2e8f0); margin-top: 18px; padding-top: 14px; }
.review-result-section h4 { margin: 0 0 12px; }
.review-source-note { color: var(--text-secondary, #64748b); font-size: 13px; line-height: 1.6; }


/* Shared message-center administration; all source text is rendered as text nodes. */
.mc-admin {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.mc-admin .mc-panel {
  padding: 22px;
  min-width: 0;
}
.mc-admin summary {
  cursor: pointer;
  font-weight: 650;
  line-height: 1.8;
}
.mc-admin .mc-settings {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.mc-admin .mc-form-grid,
.mc-admin .mc-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.mc-admin label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.mc-admin .mc-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}
.mc-admin .mc-check input {
  width: 16px;
  height: 16px;
  padding: 0;
}
.mc-admin .mc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 18px 0;
}
.mc-admin .mc-toolbar label {
  min-width: 140px;
  flex: 1;
}
.mc-admin .mc-toolbar h3 {
  flex: 1;
  align-self: center;
}
.mc-admin .mc-muted {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 8px 0;
}
.mc-admin .mc-notice {
  padding: 12px 16px;
  border: 1px solid #bcd1f2;
  background: #edf4ff;
  color: #245aa2;
  border-radius: 8px;
  line-height: 1.7;
}
.mc-admin .mc-error {
  color: #a93635;
  background: #fff1f1;
  border-color: #efc7c7;
}
.mc-admin .mc-subsection {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin: 16px 0;
}
.mc-admin .mc-targets {
  margin: 16px 0;
}
.mc-admin .mc-targets small {
  font-size: 11px;
  color: var(--subtle);
}
.mc-admin .mc-report {
  scroll-margin-top: 20px;
}
.mc-admin .table-scroll {
  max-height: 640px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.mc-admin table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.mc-admin td {
  padding: 11px 13px;
  line-height: 1.65;
}
.mc-admin th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.mc-admin .metric-scroll { border-radius: 0; max-height: 570px; }
.mc-admin .mc-metrics {
  --group-width: 56px; --name-width: 176px; --rolling-width: 76px; --target-width: 56px;
  table-layout: fixed; width: calc(var(--group-width) + var(--name-width) + var(--rolling-width) + var(--target-width) + var(--metric-days) * 60px); min-width: calc(var(--group-width) + var(--name-width) + var(--rolling-width) + var(--target-width) + var(--metric-days) * 60px);
  border-top: 1px solid #bfbfbf; border-left: 1px solid #bfbfbf; color: #123756;
}
.mc-admin .mc-metrics th, .mc-admin .mc-metrics td { box-sizing: border-box; padding: 3px 2px; height: 29px; min-width: 0; border: 0; border-right: 1px solid #bfbfbf; border-bottom: 1px solid #bfbfbf; text-align: center; line-height: 1.25; white-space: nowrap; font-size: 12px; }
.mc-admin .mc-metrics th { height: 44px; color: #fff; background: #1f4e79; font-weight: 600; z-index: 4; }
.mc-admin .mc-metrics .metric-group { width: var(--group-width); position: sticky; left: 0; z-index: 3; background: #deebf7; white-space: normal; font-weight: 600; }
.mc-admin .mc-metrics .metric-name { width: var(--name-width); position: sticky; left: var(--group-width); z-index: 3; text-align: left; background: white; }
.mc-admin .mc-metrics .metric-rolling { width: var(--rolling-width); position: sticky; left: calc(var(--group-width) + var(--name-width)); z-index: 3; background: #f5f8fc; }
.mc-admin .mc-metrics .metric-target { width: var(--target-width); position: sticky; left: calc(var(--group-width) + var(--name-width) + var(--rolling-width)); z-index: 3; background: white; }
.mc-admin .mc-metrics th.metric-group, .mc-admin .mc-metrics th.metric-name, .mc-admin .mc-metrics th.metric-rolling, .mc-admin .mc-metrics th.metric-target { background: #1f4e79; z-index: 5; }
.mc-admin .mc-metrics th.metric-name { white-space: normal; overflow-wrap: anywhere; }
.mc-admin .mc-metrics .metric-total td { background: #bdd7ee; font-weight: 700; height: 32px; }
.mc-admin .mc-metrics td.metric-bonus { background: #e2efda; }
.mc-admin .mc-metrics td.metric-deduction { background: #fbdcdb; }
.mc-admin .mc-metrics td.mc-metric-value { position: relative; color: #123756; cursor: pointer; }
.mc-admin .mc-metrics td.mc-metric-value.better { background: #ff6363; color: #123756; }
.mc-admin .mc-metrics td.mc-metric-value.worse { background: #92d050; color: #123756; }
.mc-admin .mc-metrics td.mc-metric-value.missing { background: #f0f1f3; color: #78838d; }
.mc-admin .mc-metrics .has-note::after { content: ""; position: absolute; right: 1px; top: 1px; width: 12px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 1.5h6l2 2v9H3zM9 1.5v3h2M5 7h4M5 9.5h4' fill='white' stroke='%239c241f' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.mc-admin .mc-metrics .has-note { padding-right: 12px; }
.mc-admin .mc-metrics .mc-metric-value:focus-visible { outline: 2px solid #184c8e; outline-offset: -2px; }
.mc-admin .metric-section { position: relative; }
.mc-admin .metric-note-tooltip { position: absolute; z-index: 20; box-sizing: border-box; width: max-content; max-width: min(420px, calc(100vw - 24px)); max-height: min(360px, calc(100vh - 24px)); overflow: auto; padding: 10px 12px; border: 1px solid #bacbd9; border-radius: 5px; background: #fff; color: #123756; box-shadow: 0 4px 16px #12375626; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.5; }
.mc-admin .metric-detail { font-size: 12px; line-height: 1.5; min-height: 36px; margin: 7px 0; overflow-wrap: anywhere; }
.mc-admin .latest-score { font-weight: 600; margin: 8px 0; }
.mc-admin .metric-note-dialog { width: min(660px, calc(100vw - 40px)); max-height: 85vh; overflow: auto; padding: 20px; border: 1px solid #bfcbd5; border-radius: 8px; }
.mc-admin .metric-note-dialog textarea { width: 100%; box-sizing: border-box; min-height: 100px; }
.mc-admin .metric-note-dialog button { margin: 6px 8px 6px 0; }
.mc-admin .mc-experience-details { width: min(1000px, calc(100vw - 40px)); }
.mc-admin .mc-experience-details section { border-top: 1px solid #d9e1e7; margin-top: 14px; padding-top: 8px; }
.mc-admin .mc-experience-details .table-scroll { max-height: 45vh; }
.mc-admin .mc-experience-details-table td { vertical-align: top; overflow-wrap: anywhere; }
.mc-admin .mc-experience-product { display: flex; gap: 8px; min-width: 180px; }
.mc-admin .mc-experience-product img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.mc-admin .metric-note-entry { border-top: 1px solid #d9e1e7; padding-top: 10px; margin-top: 10px; font-size: 12px; }
.mc-admin .metric-note-entry p { white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-admin .mc-better {
  color: #b8313d;
}
.mc-admin .mc-worse {
  color: #18724c;
}
.mc-admin .mc-checks td:last-child {
  min-width: 220px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mc-admin .mc-checks td {
  white-space: nowrap;
}
.mc-admin .mc-text-button {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--green);
  font: inherit;
}
.mc-admin .mc-warning-text {
  color: #956317;
  font-size: 11px;
}
.mc-admin .mc-trend {
  width: 100%;
  height: 160px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 14px 0;
}
.mc-admin [hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  .mc-admin .mc-targets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .mc-admin .mc-panel {
    padding: 16px;
  }
  .mc-admin .mc-form-grid,
  .mc-admin .mc-targets {
    grid-template-columns: 1fr;
  }
  .mc-admin .mc-toolbar label {
    min-width: 120px;
  }
}

#review-filter-draft:empty { display: none; }
.review-project-group { color: #34598b; }
.review-statistics-note { padding: 0 16px 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
#review-statistics-panel .inline-actions { align-items: center; white-space: nowrap; }
#review-statistics-table td:not(:first-child) { font-variant-numeric: tabular-nums; }

.mc-admin .metric-detail { padding: 10px 12px; background: #f5f8fc; border: 1px solid #d4dee7; border-radius: 4px; white-space: pre-wrap; font-size: 13px; }
.mc-admin .mc-metrics .metric-total .equal { background: #fff; }
.mc-admin .mc-metrics .metric-summary-label { position: sticky; left: 0; z-index: 3; background: #1f4e79; white-space: normal; }
.mc-admin .mc-metrics .reward-day { padding: 2px; min-width: 0; border: 0; background: transparent; color: #164878; text-decoration: underline; font-size: 12px; }
.mc-admin .reward-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; border: 1px solid #d4dee7; padding: 14px; margin: 12px 0; }
.mc-admin .reward-fields p { grid-column: 1 / -1; margin: 0; }
.mc-admin .reward-fields input { width: 100%; box-sizing: border-box; }
.mc-admin .reward-section { margin: 18px 0; }
.mc-admin .reward-totals { font-weight: 600; }
.mc-admin .reward-list { max-height: 260px; }
.mc-admin .reward-version { border-top: 1px solid #d4dee7; padding: 12px 0; }
.mc-admin .reward-version summary { cursor: pointer; font-weight: 600; }
.mc-admin .reward-dialog p { overflow-wrap: anywhere; }

@media (max-width: 680px) {
  .mc-admin .mc-metrics .metric-rolling, .mc-admin .mc-metrics .metric-target { left: auto; z-index: 2; }
  .mc-admin .mc-metrics .metric-summary-label { position: static; }
}

.mc-admin .reward-status { padding: 10px 12px; background: #f5f8fc; border: 1px solid #d4dee7; border-radius: 4px; line-height: 1.6; overflow-wrap: anywhere; }
.mc-admin .global-reward-fields .mc-check { grid-column: 1 / -1; }
.mc-admin .global-reward-fields .mc-check input { width: auto; }

.mc-admin .mc-metrics .metric-group-name { display: block; }
.mc-admin .mc-metrics .metric-group-score { display: block; margin-top: 3px; font-size: 16px; line-height: 1.15; }

.mc-admin .mc-daily-scroll { max-height: 620px; border-radius: 0; border: 1px solid #000; }
.mc-admin .mc-daily-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; color: #000; }
.mc-admin .mc-daily-table th, .mc-admin .mc-daily-table td { box-sizing: border-box; min-width: 44px; height: 20px; padding: 2px 3px; border: 0; border-right: 1px solid #000; border-bottom: 1px solid #000; text-align: center; color: #000; font-size: 11px; line-height: 15px; white-space: nowrap; font-weight: 400; }
.mc-admin .mc-daily-table thead th { position: sticky; z-index: 4; background: #7cded7; color: #000; height: 22px; }
.mc-admin .mc-daily-table thead tr:first-child th { top: 0; background: #fff; }
.mc-admin .mc-daily-table thead tr:nth-child(2) th { top: 22px; }
.mc-admin .mc-daily-table thead tr:nth-child(3) th { top: 44px; }
.mc-admin .mc-daily-table .mc-daily-date { position: sticky; left: 0; min-width: 88px; background: #d0cece; z-index: 3; }
.mc-admin .mc-daily-table tbody th, .mc-admin .mc-daily-table tfoot th { top: auto; }
.mc-admin .mc-daily-table thead .mc-daily-date { z-index: 5; background: #7cded7; }
.mc-admin .mc-daily-table [data-band="gray"] { background: #d6dce4; }
.mc-admin .mc-daily-table [data-band="pink"] { background: #fadade; }
.mc-admin .mc-daily-table [data-band="orange"] { background: #fce4d3; }
.mc-admin .mc-daily-table .mc-daily-text { min-width: 50px; }
.mc-admin .mc-daily-table [data-column="C08"] { min-width: 145px; }
.mc-admin .mc-daily-table [data-column="C21"] { min-width: 88px; }
.mc-admin .mc-daily-table [data-column="C15"], .mc-admin .mc-daily-table [data-column="C16"] { min-width: 65px; }
.mc-admin .mc-daily-table small { display: block; color: #000; margin-top: 0; font-weight: 400; }
.mc-admin .mc-daily-table tfoot th, .mc-admin .mc-daily-table tfoot td { font-weight: 400; }
.mc-admin .mc-latest-penalties { margin: 16px 0 24px; padding: 16px; border: 1px solid #bed5df; border-radius: 8px; background: #f3f9fc; min-width: 0; overflow-wrap: anywhere; }
.mc-admin .mc-latest-penalties h3 { margin: 0 0 12px; }
.mc-admin .mc-latest-penalty-count, .mc-admin .mc-latest-penalty-status { font-weight: 600; }
.mc-admin .mc-latest-penalty-summary { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 12px 0; padding: 12px 14px; border-radius: 6px; background: #fff; border: 1px solid #d6e5ec; }
.mc-admin .mc-latest-penalty-figures { flex: 1 1 260px; min-width: 0; }
.mc-admin .mc-latest-penalty-meta { flex: 1 1 320px; min-width: 0; }
.mc-admin .mc-latest-penalty-summary p { margin: 2px 0; }
.mc-admin .mc-latest-penalty-summary .mc-latest-penalty-count { font-size: 16px; color: #1f3a4d; }
.mc-admin .mc-latest-penalty-details summary { cursor: pointer; line-height: 1.6; }
.mc-admin .mc-daily-penalties { margin: 20px 0; min-width: 0; }
.mc-admin .mc-daily-penalty-day { margin: 8px 0; padding: 12px; border: 1px solid #d2dce5; border-radius: 6px; overflow-wrap: anywhere; }
.mc-admin .mc-daily-penalty-day summary { cursor: pointer; line-height: 1.6; }
.mc-admin .mc-daily-penalty-ticket { margin: 12px 0; padding: 14px 16px; border: 1px solid #d2dce5; border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); min-width: 0; }
.mc-admin .mc-daily-penalty-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-bottom: 10px; border-bottom: 1px solid #e5ebf0; }
.mc-admin .mc-daily-penalty-ticket h4 { margin: 0; font-size: 15px; }
.mc-admin .mc-daily-penalty-actions h5, .mc-admin .mc-daily-penalty-images h5 { margin: 0 0 8px; font-size: 13px; }
.mc-admin .mc-daily-penalty-status { margin: 0; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; color: #475569; background: #e2e8f0; }
.mc-admin .mc-daily-penalty-status[data-tone="counted"] { color: #b42318; background: #fee4e2; }
.mc-admin .mc-daily-penalty-status[data-tone="excluded"] { color: #067647; background: #dcfae6; }
.mc-admin .mc-daily-penalty-time { margin: 0 0 0 auto; font-size: 12px; color: #64748b; }
.mc-admin .mc-daily-penalty-body { display: flex; gap: 16px; margin: 12px 0; min-width: 0; }
.mc-admin .mc-daily-penalty-info { flex: 1 1 auto; min-width: 0; margin: 0; }
.mc-admin .mc-daily-penalty-ticket dt { margin-top: 10px; font-size: 12px; color: #64748b; }
.mc-admin .mc-daily-penalty-ticket dt:first-child { margin-top: 0; }
.mc-admin .mc-daily-penalty-ticket dd { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-admin .mc-daily-penalty-images { flex: 0 0 280px; min-width: 0; }
.mc-admin .mc-daily-penalty-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mc-admin .mc-daily-penalty-image-grid a { display: block; color: #64748b; font-size: 12px; text-align: center; text-decoration: none; }
.mc-admin .mc-daily-penalty-image-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid #d2dce5; border-radius: 4px; background: #f1f5f9; }
.mc-admin .mc-daily-penalty-image-grid a:hover img, .mc-admin .mc-daily-penalty-image-grid a:focus-visible img { border-color: #2672ed; }
.mc-admin .mc-daily-penalty-image-grid a:focus-visible { outline: 2px solid #2672ed; outline-offset: 2px; }
.mc-admin .mc-daily-penalty-actions { padding: 10px 12px; border-left: 3px solid #f79009; border-radius: 0 6px 6px 0; background: #fffaeb; }
.mc-admin .mc-daily-penalty-actions p { margin: 6px 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-admin .mc-daily-penalty-actions p:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .mc-admin .mc-daily-penalty-body { flex-direction: column; }
  .mc-admin .mc-daily-penalty-images { flex-basis: auto; }
  .mc-admin .mc-daily-penalty-time { margin-left: 0; flex-basis: 100%; }
}
.mc-admin .mc-daily-inputs { margin: 18px 0; }
.mc-admin .mc-daily-inputs fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.mc-admin .mc-daily-input-grid { display: grid; grid-template-columns: auto; align-items: end; gap: 10px; margin-bottom: 8px; justify-content: start; }
.mc-admin .mc-daily-input-grid input { width: 100%; box-sizing: border-box; }
.mc-admin .mc-daily-table .mc-daily-input-cell { padding: 0; min-width: 76px; cursor: text; }
.mc-admin .mc-daily-table .mc-daily-input-cell input { display: block; box-sizing: border-box; width: 100%; min-width: 0; height: 25px; padding: 3px; border: 0; border-radius: 0; background: transparent; color: #000; font: inherit; text-align: center; }
.mc-admin .mc-daily-table .mc-daily-input-cell:focus-within { outline: 2px solid #2672ed; outline-offset: -2px; }
.mc-admin .mc-daily-table .mc-daily-input-cell input:focus { outline: 0; background: #fff; }
.mc-admin .mc-daily-table .mc-daily-input-cell input:disabled { opacity: 1; cursor: default; }
.mc-admin .mc-daily-input-status { min-height: 20px; margin: 8px 0; color: #9a3e19; }
.mc-admin .mc-daily-curve { margin: 24px 0 0; }
.mc-admin .mc-daily-curve figcaption { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.mc-admin .mc-daily-plot-scroll { overflow-x: auto; }
.mc-admin .mc-daily-curve svg { display: block; width: 100%; min-width: 900px; max-height: 280px; border: 1px solid #dce5eb; border-radius: 5px; background: #fff; }
.mc-admin .mc-daily-curve-values { display: flex; overflow-x: auto; border-bottom: 1px solid #dce5eb; padding: 8px 0; }
.mc-admin .mc-daily-curve-values > div { flex: 1 0 100px; text-align: center; font-size: 12px; }
.mc-admin .mc-daily-curve-values span, .mc-admin .mc-daily-curve-values strong { display: block; min-height: 22px; }
.mc-admin .mc-daily-curve-values span { color: #64748b; }
@media (max-width: 700px) {
  .mc-admin .mc-daily-input-grid { grid-template-columns: 1fr; }
}

.admin-roles { display: grid; gap: 16px; }
.admin-roles td input[type="checkbox"] { width: 16px; height: 16px; }
.admin-roles td input:not([type]) { width: 120px; }
.admin-roles-create { display: flex; align-items: center; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }

.scope-warning-banner { padding: 14px 20px; background: #fff3cd; border-bottom: 1px solid #d4a800; color: #856404; text-align: center; font-size: 14px; }
.scope-warning-banner.is-hidden { display: none; }

#admin-scope-dialog[open] { display: flex; flex-direction: column; }
#admin-scope-dialog .dialog-heading { flex-shrink: 0; }
#admin-scope-dialog .dialog-actions { flex-shrink: 0; margin: 0; padding: 16px 22px 20px; border-top: 1px solid var(--line-soft); }
.scope-dialog-body { display: flex; flex-direction: column; gap: 20px; min-height: 0; max-height: 60vh; overflow-y: auto; padding: 20px 22px; }
.scope-section { display: flex; flex-direction: column; gap: 8px; }
.scope-section-label { font-weight: 600; font-size: 14px; color: var(--ink); }
.scope-checklist { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding: 10px; border: 1px solid var(--line-soft); border-radius: 4px; background: #f9fafb; }
.scope-checklist label { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; cursor: pointer; }
.scope-checklist input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: var(--green); cursor: pointer; }
.scope-shops-search-form { display: flex; gap: 8px; }
.scope-shops-search-form input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 4px; font-size: 14px; }
.scope-shops-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; }
.pagination-info { font-size: 13px; color: var(--muted); }

/* Message-center sections share the existing reports and read-only snapshots. */
.mc-admin .mc-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mc-admin .mc-tabs [role="tab"] { flex: 1; max-width: 180px; min-width: 0; }
.mc-admin .mc-tabs [aria-selected="true"] { color: #fff; background: #245aa2; border-color: #245aa2; }
.mc-admin .mc-tabs [role="tab"]:focus-visible, .mc-admin .mc-reason:focus-visible, .mc-admin .mc-attention-count:focus-visible { outline: 3px solid #3879c9; outline-offset: 3px; }
.mc-admin .mc-tab-panel { display: grid; gap: 20px; min-width: 0; }
.mc-admin .mc-attention-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.mc-admin .mc-attention-count { padding: 10px 12px; border: 1px solid #cbd8e7; border-radius: 7px; background: #f5f8fc; color: #294c75; font: inherit; cursor: pointer; }
.mc-admin .mc-attention-count[aria-pressed="true"] { border-color: #245aa2; background: #e9f1fc; font-weight: 600; }
.mc-admin .mc-reason { display: block; max-width: 240px; border: 1px solid #e3caba; color: #864219; background: #fff5ed; border-radius: 5px; padding: 5px 8px; margin: 3px 0; white-space: normal; overflow-wrap: anywhere; text-align: left; cursor: pointer; }
.mc-admin .mc-shop-penalties { min-width: 175px; }
.mc-admin .mc-message-record { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.mc-admin .mc-message-record p { white-space: pre-wrap; line-height: 1.65; }
.mc-admin .mc-tk-violation-picker { min-width: 0; }
.mc-admin .mc-tk-violation-picker select { width: 100%; min-width: 0; }
.mc-admin .mc-tk-violation-table td { max-width: 520px; overflow-wrap: anywhere; }
.mc-admin .mc-tk-violation-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(640px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 16px 0 0 16px;
  overflow-y: auto;
}
.mc-admin .mc-tk-violation-drawer .dialog-heading { align-items: center; flex-wrap: wrap; }
.mc-admin .mc-tk-violation-drawer .dialog-heading h3 { min-width: 0; overflow-wrap: anywhere; }
.mc-admin .mc-tk-violation-drawer .mc-toolbar { margin: 0; }
.mc-admin .mc-tk-violation-body { padding: 4px 22px 24px; overflow-wrap: anywhere; }
.mc-admin .mc-tk-violation-body p, .mc-admin .mc-tk-violation-body li { white-space: pre-wrap; }
.mc-admin .mc-tk-violation-body ul { padding-inline-start: 1.4em; }
.mc-admin .mc-tk-violation-facts { margin: 12px 0; }
.mc-admin .mc-tk-violation-facts dt { font-weight: 650; }
.mc-admin .mc-tk-violation-facts dd { margin: 2px 0 10px; white-space: pre-wrap; }
@media (max-width: 600px) {
  .mc-admin .mc-tabs [role="tab"] { padding: 10px 8px; }
  .mc-admin .mc-attention-count { flex: 1 1 130px; }
  .mc-admin .mc-toolbar > button { max-width: 100%; }
  .mc-admin .mc-toolbar input, .mc-admin .mc-toolbar select { width: 100%; min-width: 0; box-sizing: border-box; }
}

.balance-alerts-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
#balance-alerts-panel .field-hint { line-height: 1.7; }

/* TK profit rules: 4 fixed presets editor + live calculator. */
#tk-listing-settings [hidden], .tk-profit-settings[hidden] { display: none !important; }
#tk-listing-settings > [data-tkl="tabs"] { margin: 16px 20px 0; }
.tk-profit-settings { gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line-soft); }
.tk-profit-settings h3, .tk-profit-settings h4, .tk-profit-settings p { margin: 0; }
.tk-profit-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tk-profit-preset-tabs { flex: 1 1 auto; }
.tk-profit-topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-profit-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr); gap: 14px; align-items: start; }
.tk-profit-editor-pane { display: grid; gap: 12px; min-width: 0; }
.tk-profit-card { display: grid; gap: 10px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface); }
.tk-profit-card h4 { font-size: 13px; font-weight: 600; }
.tk-profit-settings .tk-profit-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tk-profit-settings .tk-profit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 12px; min-width: 0; }
.tk-profit-settings .tk-profit-grid label, .tk-profit-tester-inputs label { display: grid; min-width: 0; gap: 4px; }
.tk-profit-settings .tk-profit-grid label > span, .tk-profit-tester-inputs label > span { font-size: 11px; font-weight: 600; color: var(--muted); }
.tk-profit-settings input, .tk-profit-settings select { width: 100%; min-width: 0; height: 32px; padding: 4px 7px; font-size: 12px; }
.tk-profit-settings .button { min-height: 30px; padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.tk-profit-settings .tk-profit-table th, .tk-profit-settings .tk-profit-table td { padding: 5px 7px; font-size: 11px; }
.tk-profit-settings .tk-profit-table input { min-width: 60px; }
.tk-profit-range { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.tk-profit-tester { position: sticky; top: 12px; }
.tk-profit-tester-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; min-width: 0; }
.tk-profit-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 0; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.tk-profit-kpis > div { display: grid; gap: 2px; min-width: 0; }
.tk-profit-kpis dt { font-size: 11px; color: var(--muted); }
.tk-profit-kpis dd { margin: 0; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-word; }
.tk-kpi-strong { color: var(--accent, #2563eb); }
.tk-profit-roi-table th { text-align: left; white-space: nowrap; }
.tk-profit-roi-table td { font-variant-numeric: tabular-nums; }
.tk-profit-settings [data-profit-status]:empty { display: none; }
@media (max-width: 1000px) {
  .tk-profit-layout { grid-template-columns: 1fr; }
  .tk-profit-tester { position: static; }
  .tk-profit-settings .tk-profit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  #tk-listing-settings > [data-tkl="tabs"] { margin: 12px 12px 0; }
  .tk-profit-settings { padding: 12px; }
  .tk-profit-settings .tk-profit-grid, .tk-profit-tester-inputs, .tk-profit-kpis { grid-template-columns: 1fr; }
}
#balance-alerts-panel label.switch { display: flex; flex-direction: row; align-items: center; }

/* The read-only operating report uses the workspace width for its 35 columns. */
.shop-operations-active .content { max-width: none; padding: 16px; }
#shop-operations-frame { display: block; width: 100%; height: max(560px, calc(100dvh - 205px)); border: 1px solid var(--line); border-radius: var(--panel-radius); background: #fff; }
.trend-selection-active .content, .content:has(> #view-trend-selection.is-active) { max-width: none; padding: 14px 16px; }
.trend-group-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--panel-radius); background: #fff; }
.trend-group-bar.is-hidden { display: none; }
.trend-group-label { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
#trend-selection-group-select { width: auto; min-width: 180px; max-width: 280px; height: 32px; padding: 0 10px; border: 1px solid #d3ddec; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; }
#trend-selection-group-reload { width: auto; height: 32px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
.trend-group-hint { font-size: 12px; color: var(--muted); }
.trend-frame-host { width: 100%; height: calc(100dvh - 184px); min-height: 480px; }
.trend-frame-host.has-group-bar { height: calc(100dvh - 252px); min-height: 440px; }
#trend-selection-frame { display: block; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: var(--panel-radius); background: #fff; }
.shop-operations-error { padding: 20px 0; color: var(--red); }

/* TK content promo settings: 4 sub-tabs + style presets split editor. */
#tk-content-promo-panel[hidden], #tk-content-promo-panel [hidden] { display: none !important; }
.tk-cp-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tk-cp-topbar { padding: 14px 20px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tk-cp-subtabs { flex: 1 1 auto; margin-bottom: 0; }
.tk-cp-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tk-cp-status { padding: 10px 20px 0; margin: 0; }
.tk-cp-status:empty { display: none; }
.tk-cp-status.is-error { color: var(--red); font-weight: 600; }
.tk-cp-body { padding: 16px 20px 20px; }
.tk-cp-subpanel { display: grid; gap: 12px; min-width: 0; }
.tk-cp-section-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tk-cp-section-header h4 { margin: 0 0 3px; font-size: 14px; font-weight: 700; }
.tk-cp-callout { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8fbff; font-size: 12px; line-height: 1.6; }
.tk-cp-callout strong { font-size: 12px; color: var(--ink); }
.tk-cp-callout p { color: var(--muted); }
.tk-cp-field { display: grid; gap: 6px; min-width: 0; }
.tk-cp-field > span { font-size: 12px; font-weight: 650; }
.tk-cp-field textarea { min-height: 240px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.6; }
.tk-cp-styles-layout { display: grid; grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.35fr); gap: 14px; align-items: start; }
.tk-cp-style-list-pane { display: grid; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fafcfe; }
.tk-cp-style-list { display: grid; gap: 8px; max-height: 640px; overflow-y: auto; }
.tk-cp-style-item { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; transition: border-color .16s, box-shadow .16s, background .16s; }
.tk-cp-style-item:hover { border-color: #b9c9df; }
.tk-cp-style-item.is-selected { border-color: var(--green); background: #f5f9ff; box-shadow: 0 0 0 2px rgba(43, 111, 255, .12); }
.tk-cp-style-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tk-cp-style-item-title { display: grid; gap: 2px; min-width: 0; }
.tk-cp-style-item-title strong { font-size: 13px; overflow-wrap: anywhere; }
.tk-cp-style-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; flex: 0 0 auto; }
.tk-cp-style-item-actions, .tk-cp-style-editor-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.button-xs { min-height: 26px; padding: 0 8px; border-radius: 6px; font-size: 11px; }
.tk-cp-style-editor { display: grid; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.tk-cp-style-editor-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.tk-cp-style-editor-title { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.tk-cp-style-editor-title strong { font-size: 13px; overflow-wrap: anywhere; }
.tk-cp-style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; min-width: 0; }
.tk-cp-style-grid label:not(.switch) { display: grid; gap: 5px; min-width: 0; }
.tk-cp-style-grid label:not(.switch) > span { font-size: 11px; font-weight: 650; color: var(--muted); }
.tk-cp-style-grid label.switch { display: inline-flex; flex-direction: row; align-items: center; }
.tk-cp-style-grid .span-two { grid-column: 1 / -1; }
.tk-cp-style-grid input:not([type="checkbox"]), .tk-cp-style-grid textarea { font-size: 12px; }
.tk-cp-style-grid input:not([type="checkbox"]) { height: 34px; }
@media (max-width: 960px) {
  .tk-cp-styles-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tk-cp-topbar { padding: 12px 12px 0; }
  .tk-cp-status { padding: 8px 12px 0; }
  .tk-cp-body { padding: 12px; }
  .tk-cp-style-grid { grid-template-columns: 1fr; }
}
