:root {
  --site-navy: #365f58;
  --site-blue: #356d65;
  --site-teal: #2f6b61;
  --site-amber: #b99355;
  --site-ink: #24312e;
  --site-muted: #687771;
  --site-line: #d8e0db;
  --site-paper: #ffffff;
  --site-bg: #f1f4f1;
  --blue: #356d65;
  --bg: #f1f4f1;
  --line: #d8e0db;
  --text: #24312e;
  --muted: #687771;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { letter-spacing: 0; }

.institution-bar {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 16px;
  background: #fff;
  border-bottom: 1px solid var(--site-line);
}
.institution-lockup { min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.institution-lockup img { display: block; width: auto; object-fit: contain; }
.institution-scut { height: 27px; max-width: min(33vw, 280px); }
.institution-gzic { height: 25px; max-width: min(29vw, 255px); }
.institution-divider { width: 1px; height: 23px; background: #b9c7d5; }
.institution-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; color: #5d6f69; font-size: 12px; }
.institution-meta b { padding: 2px 6px; border: 1px solid #b9cadd; color: var(--site-navy); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 18px;
  border-top: 1px solid var(--site-line);
  background: #fff;
  color: var(--site-muted);
  font-size: 12px;
  line-height: 1.5;
}

body.operational-page {
  --bg: #f1f4f1;
  --panel: #fff;
  --line: #d8e0db;
  --line-strong: #93a69f;
  --text: #24312e;
  --muted: #687771;
  --blue: #356d65;
  --green: #14785a;
  --amber: #916d31;
  --red: #b83b34;
  --shadow: 0 5px 16px rgba(39, 65, 58, .07);
}
body.operational-page .system-header { background: var(--site-navy); border-bottom-color: var(--site-amber); }
body.operational-page .app { min-height: calc(100vh - 102px); }
body.operational-page .sidebar,
body.operational-page .inspector,
body.operational-page .main { max-height: calc(100vh - 102px); }
body.operational-page .section { border-radius: 3px; }
body.operational-page .system-header h1 { font-size: 20px; }
body.operational-page .brand-subtitle { color: #e7efeb; }
body.operational-page .sidebar-edge-toggle { border-color: var(--site-navy); background: var(--site-blue); box-shadow: 0 5px 18px rgba(42,75,68,.2); }
body.operational-page .sidebar-edge-toggle:hover { background: var(--site-navy); }
body.operational-page .entry-panel { border-top-color: var(--site-blue); }
body.operational-page .entry-panel-toggle { border-color: var(--site-blue); color: var(--site-navy); box-shadow: 0 4px 10px rgba(42,75,68,.14); }
body.operational-page .entry-panel-toggle:hover { background: #edf4f0; }
body.operational-page .parse-row { border-color: #d8e2dc; background: #f3f6f3; }
body.operational-page .link-button,
body.operational-page .collapsible > summary::after,
body.operational-page .selection-count { color: var(--site-blue); }
body.operational-page .modal { border-top-color: var(--site-blue); }
body.operational-page .multi-select-bar { border-color: #bfd3ca; background: #eef5f1; }
body.operational-page .transfer-note { border-left-color: var(--site-blue); background: #eef5f1; color: #405e57; }
body.operational-page .cloud-nav-button { border-color: #d3e0da; color: var(--site-navy); }
body.operational-page .request-item { border-left-color: var(--site-blue); background: #f2f7f4; }
body.operational-page .request-import-btn { border-color: var(--site-navy); background: var(--site-navy); }
.header-title-compact { display: none; }

.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--site-bg);
  color: var(--site-ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
.login-layout { flex: 1 1 auto; min-height: 620px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(420px, .8fr); }
.login-cover { position: relative; min-height: 620px; overflow: hidden; isolation: isolate; color: var(--site-ink); background: #f5f5ef; border-right: 1px solid var(--site-line); }
.login-cover-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.login-cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(249, 249, 244, .08); }
.login-cover-content { width: min(760px, 86%); height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 58px 6vw; }
.cover-kicker { margin-bottom: 22px; color: #4f6e67; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.cover-kicker::before { content: ""; display: inline-block; width: 36px; height: 2px; margin: 0 10px 3px 0; background: var(--site-amber); }
.login-cover h1 { max-width: 720px; margin: 0; color: #284b45; font: 700 46px/1.22 "Songti SC", "STSong", "SimSun", serif; }
.cover-subtitle { margin: 12px 0 0; color: #536963; font: 600 20px/1.45 Georgia, "Times New Roman", serif; }
.cover-purpose { max-width: 680px; margin: 34px 0 20px; padding-top: 22px; border-top: 1px solid #c5d0ca; color: #435a54; font-size: 16px; line-height: 1.8; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tags span { padding: 6px 9px; border: 1px solid #b8c8c1; border-radius: 6px; background: rgba(247,250,247,.72); color: #365952; font-size: 13px; }

.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 54px clamp(36px, 6vw, 92px); background: #fafbf8; }
.login-version { color: var(--site-muted); font-size: 12px; font-weight: 700; }
.login-panel h2 { margin: 28px 0 8px; color: var(--site-navy); font: 700 32px/1.25 "Songti SC", "STSong", "SimSun", serif; }
.login-prompt { margin: 0 0 28px; color: #5b6e68; line-height: 1.7; }
.login-form label { display: block; margin: 0 0 7px; color: #344741; font-size: 13px; font-weight: 800; }
.login-form input { width: 100%; min-height: 48px; margin-bottom: 17px; padding: 10px 12px; border: 1px solid #bdcbc5; border-radius: 6px; background: #fff; font: inherit; }
.login-form input:focus { outline: 3px solid rgba(53,109,101,.16); border-color: var(--site-blue); }
.login-submit { width: 100%; min-height: 48px; border: 1px solid var(--site-blue); border-radius: 6px; background: var(--site-blue); color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.login-submit:disabled { background: #74899c; border-color: #74899c; cursor: default; }
.login-error { margin-bottom: 18px; padding: 11px 12px; border-left: 4px solid #b83b34; background: #fff0ee; color: #a52f29; font-size: 13px; line-height: 1.55; }
.login-disclaimer { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--site-line); color: var(--site-muted); font-size: 12px; line-height: 1.7; }
.preview-ribbon { padding: 9px 16px; background: #fff3cf; border-bottom: 1px solid #e2c16d; color: #6c4a08; text-align: center; font-size: 13px; font-weight: 800; }
.preview-ribbon a { margin-left: 10px; color: #124f7c; }

.portal-page, .secondary-page, .content-admin-page {
  margin: 0;
  min-height: 100vh;
  background: var(--site-bg);
  color: var(--site-ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
.portal-page .hero, .secondary-page > header { background: var(--site-navy); border-bottom: 4px solid var(--site-amber); }
.portal-page h2, .secondary-page h2 { color: var(--site-navy); }
.portal-page .panel, .portal-page .course,
.secondary-page .panel, .secondary-page .bar, .secondary-page .item { border-color: var(--site-line); }
.portal-page .course { background: #fbfcfa; }
.portal-page .segment { border-left-color: #79a79c; background: #f0f6f3; }
.portal-page .badge, .portal-page .state { background: #e7f0eb; color: var(--site-navy); }
.portal-page .history-item strong { color: var(--site-navy); }
.secondary-page th { background: #edf3ef; color: var(--site-navy); }
.content-shell { width: min(1180px, calc(100% - 28px)); margin: 18px auto 30px; }
.content-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 20px; background: var(--site-navy); color: #fff; border-bottom: 4px solid var(--site-amber); }
.content-header h1 { margin: 0; font-size: 22px; }
.content-header p { margin: 4px 0 0; color: #dce8ef; font-size: 13px; }
.content-header a { color: #fff; }
.content-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.content-status { padding: 12px 14px; border: 1px solid var(--site-line); background: #fff; }
.content-status span { display: block; color: var(--site-muted); font-size: 12px; }
.content-status strong { display: block; margin-top: 4px; color: var(--site-navy); }
.content-section { padding: 18px; border: 1px solid var(--site-line); background: #fff; }
.content-section + .content-section { margin-top: 12px; }
.content-section h2 { margin: 0 0 5px; color: var(--site-navy); font-size: 18px; }
.section-note { margin: 0 0 15px; color: var(--site-muted); font-size: 12px; line-height: 1.6; }
.content-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.content-field { display: block; min-width: 0; color: #34495c; font-size: 12px; font-weight: 800; }
.content-field.full { grid-column: 1 / -1; }
.content-field input, .content-field textarea, .content-field select { width: 100%; min-height: 42px; margin-top: 6px; padding: 9px 10px; border: 1px solid #c7d3df; background: #fff; color: var(--site-ink); font: inherit; font-weight: 400; }
.content-field textarea { min-height: 86px; resize: vertical; line-height: 1.6; }
.cover-editor { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.cover-preview { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #b9c7c1; background: #f4f5ef; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-preview span { position: absolute; left: 12px; bottom: 12px; padding: 5px 7px; background: rgba(8,37,57,.84); color: #fff; font-size: 12px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-choice { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 7px 9px; border: 1px solid var(--site-line); background: #fff; font-size: 13px; cursor: pointer; }
.theme-swatch { width: 19px; height: 19px; border: 1px solid rgba(0,0,0,.18); }
.theme-swatch.navy { background: #365f58; }
.theme-swatch.teal { background: #4b766d; }
.theme-swatch.graphite { background: #38434d; }
.content-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding: 12px; border: 1px solid var(--site-line); background: rgba(255,255,255,.96); box-shadow: 0 -5px 20px rgba(19,49,73,.09); }
.content-actions button, .content-actions a, .content-button { min-height: 40px; padding: 8px 13px; border: 1px solid #b8c7d5; background: #fff; color: var(--site-ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.content-actions .primary, .content-button.primary { background: var(--site-blue); border-color: var(--site-blue); color: #fff; }
.content-actions .publish { background: var(--site-teal); border-color: var(--site-teal); color: #fff; }
.content-toast { position: fixed; z-index: 100; top: 54px; left: 50%; transform: translate(-50%,-12px); min-width: 280px; padding: 12px 18px; background: var(--site-teal); color: #fff; text-align: center; font-weight: 900; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.content-toast.show { opacity: 1; transform: translate(-50%,0); }
.content-message { color: var(--site-muted); font-size: 12px; }

body.site-theme-teal .login-submit,
body.site-theme-teal .content-header,
body.site-theme-teal.secondary-page > header,
body.site-theme-teal.portal-page .hero { background: #4b766d; border-color: #b99355; }
body.site-theme-teal.operational-page .system-header { background: #4b766d; }
body.site-theme-graphite .login-submit,
body.site-theme-graphite .content-header,
body.site-theme-graphite.secondary-page > header,
body.site-theme-graphite.portal-page .hero { background: #38434d; border-color: #d6a23c; }
body.site-theme-graphite.operational-page .system-header { background: #38434d; }

@media (max-width: 980px) {
  body.operational-page .sidebar { top: 102px; }
  .login-layout { grid-template-columns: 1fr; min-height: 0; }
  .login-cover { min-height: 470px; }
  .login-panel { min-height: 540px; }
  .cover-editor { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .system-title-block { flex: 0 1 155px; min-width: 120px; }
  .header-title-full, body.operational-page .brand-subtitle { display: none; }
  .header-title-compact { display: inline; }
  body.operational-page .cloud-account-bar { min-width: 0; flex-wrap: nowrap; overflow-x: auto; }
  body.operational-page .cloud-account-bar > * { flex: 0 0 auto; }
}
@media (max-width: 700px) {
  .institution-bar { height: auto; min-height: 42px; padding: 6px 9px; }
  .institution-lockup { gap: 6px; }
  .institution-scut { height: 24px; max-width: 44vw; }
  .institution-gzic { height: 22px; max-width: 37vw; }
  .institution-meta span, .institution-divider { display: none; }
  .login-cover { min-height: 420px; }
  .login-cover-content { width: 100%; padding: 42px 24px; }
  .login-cover h1 { font-size: 34px; }
  .cover-subtitle { font-size: 16px; }
  .cover-purpose { margin-top: 24px; }
  .login-panel { min-height: 500px; padding: 42px 24px; }
  .site-footer { flex-direction: column; gap: 4px; }
  .content-fields, .content-status-grid { grid-template-columns: 1fr; }
  .content-field.full { grid-column: auto; }
  .theme-options { grid-template-columns: 1fr; }
  .content-header { align-items: flex-start; flex-direction: column; }
}
