/* XYHCZ Operations UI — the shared visual contract for every group subsystem. */
html[data-group-ui="operations"] {
  color-scheme: light;
  --group-canvas: #f4f6fb;
  --group-panel: #ffffff;
  --group-panel-soft: #f8f9fc;
  --group-text: #1f2a3d;
  --group-muted: #737e92;
  --group-line: #e3e7ef;
  --group-line-strong: #ccd3df;
  --group-primary: #3f6fe5;
  --group-primary-hover: #345fd0;
  --group-primary-soft: #eef3ff;
  --group-success: #42a45b;
  --group-warning: #d57722;
  --group-danger: #d64c4c;
  --group-radius: 12px;
  --group-shadow: 0 2px 10px rgba(30, 42, 68, .045);

  /* Compatible aliases used by the existing subsystem styles. */
  --bg: var(--group-canvas);
  --surface: var(--group-panel);
  --panel: var(--group-panel);
  --panel-soft: var(--group-panel-soft);
  --text: var(--group-text);
  --muted: var(--group-muted);
  --text-muted: var(--group-muted);
  --text-faint: #919bad;
  --line: var(--group-line);
  --border: var(--group-line);
  --line-strong: var(--group-line-strong);
  --primary: var(--group-primary);
  --primary-dark: #3159bf;
  --primary-soft: var(--group-primary-soft);
  --accent: var(--group-primary);
  --blue: var(--group-primary);
  --blue-soft: var(--group-primary-soft);
  --shadow: var(--group-shadow);
}

html[data-group-ui="operations"],
html[data-group-ui="operations"] body {
  min-width: 320px;
  background: var(--group-canvas);
  color: var(--group-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

html[data-group-ui="operations"] :is(button, input, select, textarea) { font: inherit; letter-spacing: 0; }
html[data-group-ui="operations"] :is(button, a) { -webkit-tap-highlight-color: transparent; }
html[data-group-ui="operations"] :is(input, select, textarea):focus-visible {
  border-color: var(--group-primary) !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(63, 111, 229, .14) !important;
}
html[data-group-ui="operations"] main[tabindex="-1"]:focus { outline: none; }

/* Shared application canvas and top bars. */
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell, .workspace, .app-main, .private-main, .logs-system-main) {
  background: var(--group-canvas);
}
html[data-group-ui="operations"] :is(.topbar, .app-topbar, .private-topbar, .logs-system-topbar) {
  border-bottom-color: var(--group-line) !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--group-text) !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px);
}
html[data-group-ui="operations"] :is(.topbar, .app-topbar, .private-topbar, .logs-system-topbar) :is(h1, h2, strong) { color: var(--group-text); }
html[data-group-ui="operations"] :is(.topbar, .app-topbar, .private-topbar, .logs-system-topbar) :is(p, small, span:not(.badge):not(.status-pill)) { color: var(--group-muted); }

/* The Workbench-style light navigation rail. Only direct application rails are targeted. */
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) {
  border-right: 1px solid var(--group-line) !important;
  background: #fff !important;
  color: var(--group-text) !important;
  box-shadow: none !important;
}
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) :is(.sidebar-brand, .side-heading, .private-brand, .logs-system-brand, .brand) {
  border-color: var(--group-line) !important;
  background: #fff !important;
  color: var(--group-text) !important;
}
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) :is(.sidebar-brand, .side-heading, .private-brand, .logs-system-brand, .brand) strong { color: var(--group-text) !important; }
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) :is(.sidebar-brand, .side-heading, .private-brand, .logs-system-brand, .brand) :is(span, small) { color: #99a2b3 !important; }
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) :is(.sidebar-brand, .side-heading, .private-brand, .logs-system-brand, .brand) strong > span { color: var(--group-text) !important; }
html[data-group-ui="operations"] :is(.sidebar-nav-label, .side-nav-label, .private-nav section > p) {
  color: #a0a8b7 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
}
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) nav :is(button, a, .nav-item) {
  border-color: transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #626d7f !important;
  box-shadow: none !important;
}
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) nav :is(button, a, .nav-item):hover {
  background: #f5f6fa !important;
  color: #3f4a5d !important;
}
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) nav :is(button.active, button.is-active, a.active, .nav-item.active, .nav-item.is-active, [aria-current="page"]) {
  background: var(--group-primary-soft) !important;
  color: var(--group-primary) !important;
  font-weight: 700 !important;
}
html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) > :is(.app-sidebar, .sidebar, .side-nav, .private-sidebar, .logs-system-sidebar) nav :is(button.active, button.is-active, a.active, .nav-item.active, .nav-item.is-active, [aria-current="page"]) :is(span, svg) { color: var(--group-primary) !important; }
html[data-group-ui="operations"] .group-local-nav-icon {
  display: inline-grid !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  flex: 0 0 20px !important;
  place-items: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #7d8798 !important;
  font-size: 0 !important;
  box-shadow: none !important;
}
html[data-group-ui="operations"] .group-local-nav-icon::before,
html[data-group-ui="operations"] .group-local-nav-icon::after { content: none !important; }
html[data-group-ui="operations"] .group-local-nav-icon svg {
  display: block;
  width: 18px !important;
  height: 18px !important;
  color: inherit !important;
  stroke: currentColor;
}
html[data-group-ui="operations"] nav :is(button.active, button.is-active, .nav-item.active, .nav-item.is-active, [aria-current="page"]) > .group-local-nav-icon { color: var(--group-primary) !important; }

/* Finance and HR historically retained a dark nested brand/menu skin. */
html[data-group-ui="operations"] .app-sidebar .sidebar-toggle {
  border-color: #d8dee8 !important;
  background: #fff !important;
  color: #768196 !important;
}
html[data-group-ui="operations"] .app-sidebar .nav-section {
  border-color: var(--group-line) !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-group-ui="operations"] .app-sidebar .nav-toggle {
  background: transparent !important;
  color: #536176 !important;
}
html[data-group-ui="operations"] .app-sidebar .nav-toggle:hover { background: #f5f6fa !important; color: #3f4a5d !important; }
html[data-group-ui="operations"] .app-sidebar .nav-toggle > i { color: #98a3b5 !important; }
html[data-group-ui="operations"] .app-sidebar .nav-subgroup { border-color: #e2e7ef !important; }
html[data-group-ui="operations"] .app-sidebar .tabs button {
  gap: 9px !important;
  padding-left: 11px !important;
  color: #626d7f !important;
}
html[data-group-ui="operations"] .app-sidebar .nav-subtoggle { padding-left: 11px !important; color: #6f7a8d !important; }
html[data-group-ui="operations"] .app-sidebar .nav-subchildren button { padding-left: 20px !important; }
html[data-group-ui="operations"] .app-sidebar .tabs button.active::before { background: var(--group-primary) !important; }

/* Audit centre icons must stay line icons rather than inheriting the old black tiles. */
html[data-group-ui="operations"] .logs-system-sidebar .group-local-nav-icon {
  background: transparent !important;
  color: #7d8798 !important;
}
html[data-group-ui="operations"] .logs-system-sidebar nav button.active > .group-local-nav-icon { color: var(--group-primary) !important; }
html[data-group-ui="operations"] :is(.brand-mark, .side-mark, .sidebar-brand-mark, .group-system-mark) {
  border-color: transparent !important;
  background: linear-gradient(145deg, #5f78ef, #7545d8) !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(79, 70, 229, .20) !important;
}

/* Panels, tables, fields and action hierarchy. */
html[data-group-ui="operations"] :is(.panel, .table-panel, .metric-card, .summary-card, .stat-card, .account-directory, .account-editor, .filter-bar, .card, .module-card, .logs-table-wrap, .logs-release-overview, .group-system-card, .panel-block) {
  border-color: var(--group-line) !important;
  border-radius: var(--group-radius) !important;
  background: #fff;
  box-shadow: var(--group-shadow) !important;
}
html[data-group-ui="operations"] :is(.panel-header, .panel-head, .panel-heading, .table-header, .panel-title-row) { border-color: var(--group-line) !important; }
html[data-group-ui="operations"] :is(.panel-header, .panel-head, .panel-heading, .table-header, .panel-title-row) :is(h2, h3, strong) { color: var(--group-text); }
html[data-group-ui="operations"] :is(.table-wrap, .table-scroll) { scrollbar-color: #cbd3e1 transparent; }
html[data-group-ui="operations"] table { color: var(--group-text); }
html[data-group-ui="operations"] thead, html[data-group-ui="operations"] th { background: #f8f9fc !important; color: #687386 !important; }
html[data-group-ui="operations"] :is(th, td) { border-color: #e8ebf1 !important; }
html[data-group-ui="operations"] tbody tr:hover { background: #f8faff; }
html[data-group-ui="operations"] :is(input, select, textarea) {
  border-color: #cfd6e2;
  border-radius: 8px;
  background: #fff;
  color: var(--group-text);
}
html[data-group-ui="operations"] :is(.button.primary, .primary-button, button.primary, button[type="submit"]:not(.danger):not(.secondary-button)) {
  border-color: var(--group-primary) !important;
  background: var(--group-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 10px rgba(63, 111, 229, .16) !important;
}
html[data-group-ui="operations"] :is(.button.primary, .primary-button, button.primary, button[type="submit"]:not(.danger):not(.secondary-button)):hover {
  border-color: var(--group-primary-hover) !important;
  background: var(--group-primary-hover) !important;
}
html[data-group-ui="operations"] :is(.secondary-button, .button.secondary, .button-secondary) {
  border-color: #d4dae4 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #445064 !important;
  box-shadow: none !important;
}
html[data-group-ui="operations"] :is(.tab.active, .tab.is-active, .tabs button.active, .tabs button.is-active) {
  border-color: var(--group-primary) !important;
  color: var(--group-primary) !important;
}
html[data-group-ui="operations"] :is(.eyebrow, .kicker, [class$="-kicker"]) { color: var(--group-primary) !important; }
html[data-group-ui="operations"] :is(.hero, .hero-strip) {
  border: 1px solid var(--group-line) !important;
  background: linear-gradient(135deg, #fff 0%, #f3f7ff 100%) !important;
  color: var(--group-text) !important;
  box-shadow: var(--group-shadow) !important;
}
html[data-group-ui="operations"] :is(.hero, .hero-strip) :is(h1, h2, h3, strong, b) { color: var(--group-text) !important; }
html[data-group-ui="operations"] :is(.hero, .hero-strip) :is(p, small, span) { color: var(--group-muted); }
html[data-group-ui="operations"] :is(.hero, .hero-strip) :is(.eyebrow, [class$="-kicker"]) { color: var(--group-primary) !important; }
html[data-group-ui="operations"] :is(.hero, .hero-strip) :is(.hero-flow div, .hero-rule div, .hero-stats > div) {
  border-color: #d9e2f3 !important;
  background: rgba(255, 255, 255, .72);
  color: #526074 !important;
}
html[data-group-ui="operations"] :is(.hero, .hero-strip) :is(.hero-flow div, .hero-rule div, .hero-stats > div) :is(strong, span) { color: #526074 !important; }

/* Portal: one sober operations dashboard instead of per-system colour bands. */
html[data-group-ui="operations"] .group-portal-topbar {
  border-bottom: 1px solid var(--group-line) !important;
  background: rgba(255, 255, 255, .97) !important;
  box-shadow: none !important;
}
html[data-group-ui="operations"] .group-portal-main { width: min(100%, 1440px); }
html[data-group-ui="operations"] .group-portal-heading { border-radius: 14px; background: linear-gradient(135deg, #fff 0%, #f5f8ff 100%); box-shadow: var(--group-shadow); }
html[data-group-ui="operations"] .group-portal-heading > div:first-child > span { color: var(--group-primary) !important; }
html[data-group-ui="operations"] .group-portal-stat { border-color: #dfe7fb !important; background: var(--group-primary-soft) !important; }
html[data-group-ui="operations"] .group-portal-stat strong { color: var(--group-primary) !important; }
html[data-group-ui="operations"] .group-system-card {
  border-top: 1px solid var(--group-line) !important;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
html[data-group-ui="operations"] .group-system-card:hover { border-color: #c5cede !important; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(30, 42, 68, .08) !important; }
html[data-group-ui="operations"] .group-system-card .group-system-mark { background: linear-gradient(145deg, #5f78ef, #7545d8) !important; }
html[data-group-ui="operations"] .group-system-card-action { color: var(--group-primary) !important; }
html[data-group-ui="operations"] .group-portal-security { border-color: #dfe7fb !important; border-radius: 12px; background: #f8faff !important; }
html[data-group-ui="operations"] .login-brand-panel { background: linear-gradient(145deg, #253969, #3f6fe5) !important; }
html[data-group-ui="operations"] .login-form-panel { background: #fff; }

/* Product/performance used a desktop min-width that forced the entire WeCom document sideways. */
@media (max-width: 760px) {
  html[data-group-ui="operations"], html[data-group-ui="operations"] body { width: 100%; min-width: 320px !important; overflow-x: clip; }
  html[data-group-ui="operations"] :is(.app-shell, .private-shell, .logs-system-shell) { min-width: 0 !important; }
  html[data-group-ui="operations"] :is(.workspace, .app-main, .private-main, .logs-system-main, .content-shell, main) { min-width: 0; }
  html[data-group-ui="operations"] :is(.table-wrap, .table-scroll) { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
  html[data-group-ui="operations"] :is(.panel, .table-panel, .card, .group-system-card) { border-radius: 11px !important; }
  html[data-group-ui="operations"] .group-portal-topbar { padding-left: 14px; padding-right: 14px; }
  html[data-group-ui="operations"] .group-portal-brand div span { display: none; }
  html[data-group-ui="operations"] .group-portal-account { gap: 7px; }
  html[data-group-ui="operations"] .group-portal-user div { display: none; }
  html[data-group-ui="operations"] .group-portal-main { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-group-ui="operations"] *, html[data-group-ui="operations"] *::before, html[data-group-ui="operations"] *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
