:root {
  color-scheme: light;
  --ink: #17191b;
  --muted: #687078;
  --line: #dfe3e6;
  --surface: #ffffff;
  --canvas: #f3f5f6;
  --brand: #111315;
  --accent: #087f5b;
  --accent-strong: #056c4d;
  --warning: #a45b00;
  --danger: #b42318;
  --radius: 7px;
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 58px;
  padding: 0 max(16px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand, .account { display: flex; align-items: center; gap: 9px; }
.brand { font-weight: 800; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.account { color: var(--muted); font-size: 14px; }
.account form { margin: 0; }
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.page-shell {
  width: min(760px, 100%);
  min-height: calc(100vh - 58px);
  margin: 0 auto;
  padding: 20px 16px calc(92px + env(safe-area-inset-bottom));
}
.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding-bottom: 20px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; line-height: 1.25; }
h2 { margin-bottom: 0; font-size: 17px; }
.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-panel {
  width: min(390px, 100%);
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.login-logo { width: 56px; height: 56px; border-radius: 12px; }
.login-panel h1 { margin: 14px 0 3px; }
.login-panel > p { color: var(--muted); margin-bottom: 22px; }

.stack-form { display: grid; gap: 15px; }
.stack-form label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
}
.content-form {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #bcc3c8;
  border-radius: 5px;
  outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, .12);
}
.required { color: var(--danger); margin-left: 3px; }

.primary-button {
  min-height: 46px;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 5px;
  font-weight: 800;
  cursor: pointer;
}
.primary-button:hover { background: #303438; }
.primary-button.compact { min-height: 40px; white-space: nowrap; }
.full-button { width: 100%; margin-top: 16px; }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.quick-actions a {
  min-height: 96px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.quick-actions a:nth-child(2) { border-left-color: #315b8a; }
.quick-actions span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stats-strip div { padding: 13px 10px; text-align: center; }
.stats-strip div + div { border-left: 1px solid var(--line); }
.stats-strip strong { display: block; font-size: 22px; }
.stats-strip span { color: var(--muted); font-size: 11px; }

.section-heading {
  margin: 22px 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-heading a { color: var(--accent); font-size: 13px; font-weight: 700; }
.record-list {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.record-row {
  min-height: 68px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.record-row + .record-row { border-top: 1px solid var(--line); }
.record-row > div { min-width: 0; display: grid; gap: 4px; }
.record-row strong, .record-row span { overflow-wrap: anywhere; }
.record-row span { color: var(--muted); font-size: 12px; }
.record-row.static { cursor: default; }
.empty-state { padding: 28px 16px; color: var(--muted); text-align: center; }

.status {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: #41484d;
  background: #edf0f2;
  border-radius: 4px;
  font-size: 11px;
  font-style: normal;
}
.status.待处理 { color: #744600; background: #fff2cf; }
.status.需补充 { color: var(--danger); background: #fee4e2; }
.status.已转正式 { color: #05603f; background: #dff7eb; }

.detail-list {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.detail-list div {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 12px;
}
.detail-list div + div { border-top: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 13px; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-list a { color: var(--accent); font-weight: 700; }

.alert {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-left: 4px solid;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.5;
}
.alert.error { color: #7a271a; border-color: var(--danger); background: #fff1f0; }
.alert.warning { color: #714300; border-color: var(--warning); background: #fff7e7; }
.context-bar {
  margin-bottom: 12px;
  padding: 10px 12px;
  color: #175c46;
  background: #e5f6ef;
  border-left: 4px solid var(--accent);
  font-size: 13px;
}

.file-picker {
  min-height: 112px;
  padding: 18px;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed #89939a;
  border-radius: var(--radius);
  background: #f8fafb;
}
.file-picker input { min-height: auto; padding: 8px; border: 0; background: transparent; }
.file-preview { color: var(--muted); font-size: 13px; }
.file-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  margin-top: 8px;
  object-fit: contain;
  background: #eceff1;
  border-radius: var(--radius);
}
.progress-wrap p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.progress-track { height: 8px; overflow: hidden; background: #dfe4e7; border-radius: 4px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .15s; }

.search-bar { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 14px; }
.search-bar button {
  padding: 0 18px;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 5px;
  font-weight: 800;
}
.message-panel { padding: 26px 20px; background: var(--surface); border: 1px solid var(--line); }
.message-panel p { color: var(--muted); margin: 10px 0 20px; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 64px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bottom-nav a {
  padding: 9px 4px;
  color: var(--muted);
  border-radius: 5px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.bottom-nav a.active { color: var(--ink); background: #edf0f2; }

@media (min-width: 720px) {
  .page-shell { padding-top: 30px; }
  .bottom-nav { left: 50%; width: 760px; transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

@media (max-width: 390px) {
  .quick-actions { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .detail-list div { grid-template-columns: 82px 1fr; }
}

