:root {
  --primary: #0c4a8a;
  --primary-deep: #083868;
  --primary-soft: #eaf2fb;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --line: #d7e1ee;
  --text: #16324f;
  --muted: #65788f;
  --ok-bg: #e7f6ee;
  --ok-text: #177245;
  --warn-bg: #fff2df;
  --warn-text: #b86a13;
  --shadow: 0 10px 30px rgba(17, 60, 108, 0.08);
  --radius: 14px;
  --font-main: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.wrap {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-topline {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.topline-inner,
.header-inner,
.topline-actions,
.site-nav,
.banner-inner,
.banner-actions,
.page-banner__inner,
.page-actions,
.compact-tabs,
.row-meta,
.row-actions,
.panel-head {
  display: flex;
  align-items: center;
}

.topline-inner,
.header-inner,
.page-banner__inner,
.panel-head {
  justify-content: space-between;
}

.topline-inner {
  min-height: 38px;
}

.topline-actions,
.site-nav,
.banner-actions,
.page-actions,
.compact-tabs,
.row-meta,
.row-actions {
  gap: 10px;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 82px;
  gap: 18px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.site-brand__mark img {
  display: block;
  width: 48px;
  height: 48px;
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-brand__text strong {
  font-size: 20px;
}

.site-brand__text span {
  font-size: 13px;
  color: var(--muted);
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 38px;
  padding: 0 14px;
  border-radius: 4px;
  color: var(--text);
}

.site-nav a.is-active,
.site-nav a:hover {
  background: var(--primary);
  color: #fff;
}

.banner {
  background:
    linear-gradient(90deg, rgba(7, 34, 72, 0.88) 0%, rgba(8, 47, 97, 0.7) 34%, rgba(10, 58, 120, 0.35) 60%, rgba(11, 63, 131, 0.18) 100%),
    url("../assets/banner/hero-physics-2.png") center/cover no-repeat;
  color: #fff;
}

.banner-inner {
  justify-content: space-between;
  gap: 20px;
  min-height: 320px;
  padding: 42px 0;
}

.banner-copy {
  max-width: 620px;
}

.banner-kicker,
.crumb {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.76);
}

.banner-copy h1,
.page-banner h1,
.section-title h2,
.panel-head h2 {
  margin: 0;
}

.banner-copy h1 {
  font-size: 40px;
  line-height: 1.15;
}

.banner-copy p,
.page-banner p,
.section-title p,
.demand-item p,
.equip-card p {
  margin: 14px 0 0;
  line-height: 1.7;
}

.primary-btn,
.ghost-btn,
.mini-btn,
.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 4px;
  white-space: nowrap;
}

.primary-btn,
.mini-btn {
  background: var(--primary);
  color: #fff;
}

.ghost-btn,
.mini-btn--ghost,
.tab-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.mini-btn {
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
}

.banner-panel,
.entry-grid,
.card-grid,
.card-list,
.admin-metric-grid,
.form-row {
  display: grid;
  gap: 14px;
}

.banner-panel {
  width: 280px;
}

.quick-metric,
.entry-card,
.list-panel,
.demand-item,
.equip-card,
.form-panel,
.metric-box,
.admin-table-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.quick-metric,
.metric-box {
  padding: 18px;
  border-radius: var(--radius);
}

.quick-metric strong,
.metric-box strong {
  display: block;
  font-size: 30px;
}

.quick-metric span,
.metric-box span,
.entry-card span,
.news-row span,
.file-row span,
.row-meta span,
.demand-item p,
.equip-card p {
  color: var(--muted);
}

.portal-section,
.page-section {
  padding: 28px 0 40px;
}

.section-title {
  margin-bottom: 16px;
}

.entry-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 18px 20px;
  border-radius: var(--radius);
}

.entry-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.entry-card strong {
  font-size: 18px;
}

.entry-card--accent {
  background: var(--primary);
  border-color: var(--primary);
}

.entry-card--accent strong,
.entry-card--accent span {
  color: #fff;
}

.page-main {
  min-height: calc(100vh - 120px);
}

.page-banner {
  background: linear-gradient(180deg, #edf4fc 0%, #f8fbff 100%);
  border-bottom: 1px solid var(--line);
}

.page-banner__inner {
  min-height: 190px;
  gap: 18px;
  padding: 24px 0;
}

.page-banner h1 {
  font-size: 34px;
}

.page-banner p,
.section-title p,
.crumb {
  color: var(--muted);
}

.compact-tabs {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tab-btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.list-panel,
.form-panel,
.admin-table-panel {
  border-radius: var(--radius);
  overflow: hidden;
}

.news-row,
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.news-row:last-child,
.file-row:last-child {
  border-bottom: 0;
}

.news-media-row {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.news-media-row:last-child {
  border-bottom: 0;
}

.media-row {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.media-row:last-child {
  border-bottom: 0;
}

.news-thumb {
  display: block;
  width: 184px;
  height: 112px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef3f9;
  flex-shrink: 0;
}

.news-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb {
  display: block;
  width: 184px;
  height: 112px;
  overflow: hidden;
  border-radius: 8px;
  background: #eef3f9;
  flex-shrink: 0;
}

.media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-body {
  min-width: 0;
}

.media-body {
  min-width: 0;
}

.news-body strong {
  display: block;
  font-size: 18px;
  line-height: 1.45;
}

.media-body strong {
  display: block;
  font-size: 18px;
  line-height: 1.45;
}

.news-body p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.65;
}

.media-body p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.65;
}

.news-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-row strong,
.file-row strong,
.demand-item strong,
.equip-card strong {
  font-size: 16px;
}

.news-row--featured {
  background: var(--primary-soft);
}

.tag,
.state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #edf1f6;
  color: var(--muted);
  font-size: 12px;
}

.state--ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.state--warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.card-list {
  grid-template-columns: 1fr;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.demand-item,
.equip-card {
  padding: 18px;
  border-radius: var(--radius);
}

.demand-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compact-form {
  padding: 18px;
}

.form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.compact-form label span {
  font-size: 13px;
  color: var(--muted);
}

.compact-form input,
.compact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  outline: none;
  min-height: 38px;
  padding: 0 12px;
}

.compact-form textarea {
  min-height: 110px;
  padding: 10px 12px;
  resize: vertical;
}

.admin-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.panel-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  display: grid;
  gap: 10px;
  z-index: 100;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 12px 14px;
  border-radius: 4px;
  background: rgba(12, 34, 58, 0.94);
  color: #fff;
  box-shadow: 0 10px 24px rgba(12, 34, 58, 0.22);
  animation: toast-in 160ms ease forwards;
}

.toast.is-leaving {
  animation: toast-out 160ms ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

@media (max-width: 1024px) {
  .entry-grid,
  .card-grid,
  .admin-metric-grid,
  .banner-inner {
    grid-template-columns: 1fr;
  }

  .banner-inner {
    display: grid;
  }

  .banner-panel {
    width: auto;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .page-banner__inner,
  .news-row,
  .file-row,
  .row-meta,
  .row-actions,
  .site-nav,
  .topline-inner {
    flex-wrap: wrap;
  }

  .form-row,
  .entry-grid,
  .card-grid,
  .admin-metric-grid {
    grid-template-columns: 1fr;
  }

  .news-media-row {
    grid-template-columns: 1fr;
  }

  .news-thumb {
    width: 100%;
    height: 180px;
  }

  .media-row {
    grid-template-columns: 1fr;
  }

  .media-thumb {
    width: 100%;
    height: 180px;
  }

  .site-nav {
    justify-content: flex-start;
  }
}
