
/* ============================================================
 * 浅色商务主题 — injected into every page via /api/common-css
 * The app already exposes a CSS variable system; we re-theme it.
 * ============================================================ */
:root {
  /* primary accent: business blue */
  --accent: var(--ui-primary, #3564ed);
  --accent-deep: var(--ui-primary-hover, #274fce);
  --accent-soft: var(--ui-primary-soft, #edf2ff);
  --accent-softer: var(--ui-subtle, #f8fafd);
  --primary: var(--ui-primary, #3564ed);

  /* surfaces */
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e6e9f0;
  --border-strong: #d4d9e3;

  /* text */
  --fg: #1f2430;
  --muted: #5b6474;
  --faint: #98a0b0;

  /* status colors — slightly desaturated, business-like */
  --success: #189a52;
  --success-soft: #e3f6ea;
  --warn: #d97c06;
  --warn-soft: #fdf1de;
  --danger: #dd3333;
  --danger-soft: #fdeaea;
  --live: #e0245e;
  --live-soft: #fde8ef;

  /* elevation — flatter, cleaner */
  --sh-1: 0 1px 2px rgba(31, 36, 48, .05);
  --sh-2: 0 2px 10px rgba(31, 36, 48, .07);
  --sh-3: 0 8px 28px rgba(31, 36, 48, .10);

  /* geometry */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

html { -webkit-font-smoothing: antialiased; }

/* ---------- hardcoded indigo remnants → business blue ---------- */
.el-button--primary { background-color: var(--accent) !important; border-color: var(--accent) !important; }
.el-button--primary:hover, .el-button--primary:focus { background-color: var(--accent-deep) !important; border-color: var(--accent-deep) !important; }
.el-checkbox__inner, .el-radio__inner { border-color: var(--border-strong); }
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-radio__input.is-checked .el-radio__inner { background-color: var(--accent) !important; border-color: var(--accent) !important; }
.el-tabs__active-bar, .el-slider__bar { background-color: var(--accent) !important; }
.el-slider__button { border-color: var(--accent) !important; }
.el-switch.is-checked .el-switch__core { background-color: var(--accent) !important; border-color: var(--accent) !important; }
.el-loading-text, .el-loading-spinner .path { color: var(--accent) !important; stroke: var(--accent) !important; }
a, .el-link.el-link--primary { color: var(--accent); }

/* ---------- sidebar: dark gradient → light ---------- */
.sidebar, .sub-sidebar, .live-header {
  background: #ffffff !important;
  box-shadow: none !important;
  border-right: 1px solid var(--border) !important;
}
.live-header { border-right: none !important; border-bottom: 1px solid var(--border) !important; }

/* sidebar text/icons flip to dark */
.sidebar-item, .sidebar-item-icon,
.sub-sidebar-item, .sub-sidebar-item-icon, .sub-sidebar-item-label,
.sidebar-logo-name, .sidebar-account-name, .sub-sidebar-back {
  color: var(--muted) !important;
}
.sidebar-item-label { color: var(--fg) !important; }
.sidebar-group, .sidebar-account-role, .sidebar-version {
  color: var(--faint) !important;
}

/* active nav item: soft accent pill instead of translucent white */
.sidebar-item--active, .sub-sidebar-item--active {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  backdrop-filter: none !important;
}
.sidebar-item--active .sidebar-item-icon,
.sidebar-item--active .sidebar-item-label,
.sub-sidebar-item--active .sub-sidebar-item-icon,
.sub-sidebar-item--active .sub-sidebar-item-label {
  color: var(--accent) !important;
}
.sidebar-item:hover, .sub-sidebar-item:hover {
  background: var(--accent-softer) !important;
}

/* ---------- global polish ---------- */
* { scrollbar-width: thin; scrollbar-color: #c9cdd4 transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: #c9cdd4; border-radius: 3px; }
*::-webkit-scrollbar-thumb:hover { background: #a8adb8; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }

/* cards: consistent radius + flat hover */
.live-item, .video-item, .uu-file-card, .el-card {
  border-radius: var(--r-md) !important;
  transition: box-shadow .18s ease, transform .18s ease;
}
.live-item:hover, .video-item:hover, .el-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-2) !important;
}

/* tables & dialogs */
.el-dialog, .el-message-box { border-radius: var(--r-lg) !important; }
.el-table th.el-table__cell { background: var(--surface-2) !important; color: var(--muted); font-weight: 600; }
.el-button { border-radius: var(--r-sm) !important; transition: all .15s ease; }
.el-input__inner, .el-textarea__inner { border-radius: var(--r-sm) !important; }
.el-pagination .el-pager li.active, .el-pagination .el-pager li:hover { color: var(--accent); }
.el-image__placeholder { background: var(--surface-2); }

/* three-end separation: management entries never render in the
 * user-facing client UI — admin/agent portals use their own URLs */
.admin-link { display: none !important; }

/* ---------- /gpt repurposed as the in-client status viewer ----------
 * the stock component iframes config.gptUrl (= /status.html); stretch
 * it to fill the content area so the status page feels native. */
iframe[src*="status.html"] {
  width: 100% !important;
  height: calc(100vh - 40px) !important;
  min-height: 560px;
  border: 0 !important;
  display: block;
  border-radius: var(--r-md);
  background: var(--bg);
}

/* ---------- page rhythm: calmer spacing, product typography ---------- */
body, .el-table, .el-form, .el-card, .el-dialog {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui,
    -apple-system, sans-serif;
}
.page, .container, .content { max-width: 1400px; }

/* section titles: consistent weight + accent tick */
h1, h2, .title, .page-title { font-weight: 600; color: var(--fg); }

/* form labels a touch quieter */
.el-form-item__label { color: var(--muted); font-weight: 500; }

/* primary text buttons keep accent on hover only */
.el-button--text { color: var(--accent); }

/* inputs: subtler border, cleaner focus */
.el-input__inner, .el-textarea__inner, .el-select .el-input__inner {
  border-color: var(--border-strong);
}
.el-input__inner:focus, .el-textarea__inner:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}

/* message box + notification corners */
.el-message { border-radius: var(--r-md) !important; box-shadow: var(--sh-2); }
.el-notification { border-radius: var(--r-md) !important; }

/* tags: softer business tones */
.el-tag { border-radius: 4px; }

/* empty states less stark */
.el-table__empty-block { color: var(--faint); }

/* login page: centered card, calmer background */
.login-bg, .login-container { background: var(--bg) !important; }
.login-card, .login-box {
  border-radius: var(--r-lg) !important;
  box-shadow: var(--sh-3) !important;
}
