/* ERP-029: shared type, contrast and visual hierarchy for both application shells. */
:root {
  --font-ui: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "PingFang SC", system-ui, sans-serif;
  --ink: #20392e;
  --muted: #52675b;
  --faint: #607267;
  --brand: #17624b;
  --brand-dark: #124d3b;
  --brand-light: #e8f3ed;
  --green: #17624b;
  --line: #d6e1da;
  --soft-line: #e5ece7;
  --bg: #f4f7f5;
  --surface: #fff;
  --radius: 12px;
  --shadow: 0 1px 3px #183b2c08, 0 6px 20px #183b2c04;
  --sidebar: 242px;
}
html { color-scheme: light; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: weight;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: var(--font-ui); }
button, a { -webkit-tap-highlight-color: transparent; }
input, select, textarea { color: var(--ink); line-height: 1.6; }
body :is(input, select, textarea):not([type=checkbox]):not([type=radio]) { font-size: 15px; }
input::placeholder, textarea::placeholder { color: #64756a; opacity: 1; }
input:disabled, select:disabled, textarea:disabled { color: #607267; opacity: 1; background: #f0f4f1; }
strong, b { font-weight: 700; }
.num, .metric-value, .amount, .ha-metrics strong, .rb-item-amount { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }

.content > .page-heading h1, .content > section > .page-heading h1,
.rb-page-heading h1, .hot-page-header h1, .hm-page-heading h1, .ha-page-heading h1,
.hr-hall-header h1 { font-size: clamp(26px, 1.9vw, 30px); font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.content h2 { font-weight: 700; letter-spacing: 0; line-height: 1.5; }
.content h3 { font-weight: 600; letter-spacing: 0; line-height: 1.5; }
.page-heading p, .panel-subtitle { color: var(--muted); line-height: 1.75; }
.page-heading { align-items: center; gap: 20px; }
.heading-actions, .page-heading > div:last-child { flex-wrap: wrap; }
.panel { border-color: var(--line); box-shadow: var(--shadow); }
.panel-header { gap: 16px; }
.panel-header h2 { font-size: 20px; }

.btn {
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  line-height: 1.45;
}
.btn.primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.rb-workspace .btn, .hot-workspace .btn, .hm-workspace .hm-button,
.ha-workspace .btn, .pw-search .btn { font-size: 14px; }
.btn.text { min-height: 34px; padding: 6px 8px; }
.btn:disabled { color: #607267; background: #edf2ef; border-color: #d7e0da; opacity: 1; cursor: not-allowed; box-shadow: none; }
.rb-workspace .btn:disabled, .hot-workspace .btn:disabled,
.ha-workspace .btn:disabled, .hm-workspace .hm-button:disabled {
  color: #607267;
  background: #edf2ef;
  border-color: #d7e0da;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #287c5d;
  outline-offset: 3px;
}
.btn:hover:not(:disabled) { box-shadow: 0 2px 7px #173b2c12; }
.sidebar .nav-item { font-size: 15px; font-weight: 600; min-height: 46px; line-height: 1.55; }
.sidebar .nav-item.active { color: #13583f; background: #e7f2eb; font-weight: 700; }
.breadcrumb { color: var(--muted); font-size: 14px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.sidebar .brand-sub { font-size: 12px; color: var(--muted); }
.sidebar .nav-title, .sidebar-foot { color: #607267; }
.user-copy { font-weight: 600; }
.user-copy small { font-weight: 500; }

.form-field > span, .form-field > label, .rb-field > span, .hm-field > span, .hot-field > span,
.pf-field > span, .ha-import-input label > span { font-weight: 600; line-height: 1.6; }
.form-field input:not([type=checkbox]):not([type=radio]), .form-field select,
.form-field textarea { font-size: 15px; border-color: #c4d3c9; }
.form-field input:not([type=checkbox]):not([type=radio]), .form-field select { min-height: 42px; }
.form-field textarea { min-height: 100px; }
.field-search { border-color: #c9d7ce; }
.field-search input { font-size: 15px; }
.filter-bar { gap: 14px; }

.data-table { font-size: 15px; line-height: 1.65; }
.data-table th { color: #435d4e; background: #f0f5f2; font-size: 14px; font-weight: 600; border-color: var(--line); }
.data-table td { color: #344e3f; border-bottom-color: #e0e8e3; }
.data-table strong, .data-table .link { font-weight: 600; }
.data-table .link { font-size: 15px; }
.data-table tbody tr:hover { background: #f0f7f3; }
.table-footer { color: var(--muted); font-size: 14px; }
.page-btn { min-width: 32px; min-height: 32px; font-weight: 600; }
.pill { font-size: 13px; font-weight: 600; line-height: 1.45; padding: 5px 9px; }
.pill.pending { color: #835c13; background: #fff4da; }
.pill.success { color: #1b6540; background: #e7f4eb; }
.pill.blue { color: #355e8b; background: #eaf1fb; }
.pill.purple { color: #665080; background: #f0ebf8; }
.pill.danger { color: #a03c32; background: #fff0ed; }
.metric { border-color: var(--line); box-shadow: var(--shadow); }
.metric-title { color: #4d6557; font-weight: 600; }
.metric-value { color: #183d2b; font-weight: 700; }
.metric-footer { flex-wrap: wrap; color: var(--muted); line-height: 1.65; }

.modal-header { border-bottom-color: var(--line); }
.modal-header h2, .modal-heading h2 { font-size: 22px; line-height: 1.45; font-weight: 700; }
.modal-content { color: #344e3f; line-height: 1.75; }
.modal-footer { gap: 10px; border-top-color: var(--line); }
.detail-grid dt { color: #536a5b; font-weight: 600; }
.detail-grid dd { color: #274b37; line-height: 1.75; }
.error-message, .form-error { color: #a53227; font-weight: 600; }
.connection-banner, .storage-banner, .demo-banner { line-height: 1.75; }
.rb-field small, .hm-field > small, .hot-field small { line-height: 1.75; }
.rb-item-toggle, .workspace-service-link, .hr-hall-service { transition: background .15s ease, border-color .15s ease; }
.rb-item-toggle:hover { background: #eef6f0; }
.rb-item-summary-meta, .rb-item-summary-title { row-gap: 6px; }
.pw-filter-tags small { font-size: 13px; color: #53675a; }
.rb-editor-nav > .btn i, .hot-editor-nav > .btn i {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  font-size: 13px;
  line-height: 1;
  color: #52675b;
  background: #f3f7f4;
  border-color: #cbdacf;
}
.rb-editor-nav > .btn.active i, .hot-editor-nav > .btn.active i {
  color: #fff;
  background: #17624b;
  border-color: #17624b;
}
.ha-day .ha-no-record { color: #617568; }
.sa-axis { fill: #536a5b; font-family: var(--font-ui); font-size: 14px; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
