:root {
  --navy: #14283a;
  --navy-deep: #0f2131;
  --navy-hover: #1d3448;
  --page: #f3f6fa;
  --card: #ffffff;
  --text: #30343b;
  --muted: #6d7684;
  --line: #d6dde5;
  --line-soft: #edf1f5;
  --blue: #1398ef;
  --blue-dark: #0878c8;
  --blue-soft: #eef8ff;
  --danger: #e60012;
  --button: #0b95ef;
  --shadow: 0 14px 34px rgba(20, 36, 52, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 1180px;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
}

.brand-area {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 16px;
  background: var(--navy-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-logo {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.brand-logo img {
  display: block;
  width: 100%;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.fixed-logo {
  height: 46px;
  padding: 4px 0;
}

.mark-shape {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 50%;
  background: #f5f8fb;
  transform: skewX(-12deg);
}

.mark-shape span {
  position: absolute;
  inset: 6px 17px;
  background: #177db3;
  border-left: 12px solid #1c587f;
  transform: skewX(12deg);
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-copy strong {
  color: #fff;
  font-size: 23px;
  letter-spacing: 1px;
  font-weight: 800;
}

.brand-copy em {
  color: #fff;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 1.4px;
  font-weight: 700;
}

.side-nav {
  padding-top: 28px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 46px;
  border: 0;
  padding: 0 20px 0 18px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item span {
  width: 17px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.nav-item b {
  margin-left: auto;
  font-size: 18px;
  font-weight: 500;
}

.nav-item.active {
  background: rgba(4, 156, 255, 0.1);
  color: #049cff;
}

.nav-item:hover {
  background: var(--navy-hover);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #049cff;
}

.nav-item.active span,
.nav-item.active b {
  color: #049cff;
}

.main-shell {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  background: var(--navy-deep);
  color: #fff;
}

.collapse-button,
.logout-button,
.text-button {
  border: 0;
  background: transparent;
  color: inherit;
}

.collapse-button {
  color: rgba(255, 255, 255, 0.55);
  font-size: 26px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.logo-action {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.logo-action input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.text-button {
  color: rgba(255, 255, 255, 0.72);
}

.user-name {
  font-weight: 700;
}

.divider {
  width: 1px;
  height: 25px;
  background: rgba(255, 255, 255, 0.58);
}

.logout-button {
  font-size: 27px;
  line-height: 1;
}

.workspace {
  padding: 18px 26px 28px;
}

.page {
  display: none;
}

.page-active {
  display: block;
}

.crumb {
  margin: 0 0 14px;
  color: #7b8490;
  font-size: 14px;
}

.crumb strong {
  color: #333942;
}

.content-card {
  min-height: calc(100vh - 126px);
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.apply-card {
  padding-bottom: 0;
}

.card-title-row {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  height: 64px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.card-title-row h1 {
  margin: 0;
  text-align: center;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: 10px;
  color: #171a1f;
}

.close-button {
  border: 0;
  background: transparent;
  color: #101010;
  font-size: 30px;
  line-height: 1;
}

.form-section {
  margin: 0 34px;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line-soft);
}

.form-section:last-of-type {
  border-bottom: 0;
}

.form-section h2,
.detail-section h2,
.flow-section h2 {
  position: relative;
  margin: 0 0 16px;
  padding-left: 12px;
  color: #2f3034;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.form-section h2::before,
.detail-section h2::before,
.flow-section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--blue);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  column-gap: 56px;
  row-gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field span,
.detail-item span {
  color: #353b44;
  font-size: 14px;
  font-weight: 650;
}

em {
  color: var(--danger);
  font-style: normal;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #3f4650;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input,
select {
  height: 38px;
  padding: 0 11px;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%);
  background-position: calc(100% - 18px) 16px, calc(100% - 12px) 16px;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #9ccdf2;
  box-shadow: 0 0 0 3px rgba(19, 152, 239, 0.12);
}

.danger-value {
  color: red;
  font-weight: 700;
}

textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.35;
}

.wide {
  grid-column: 1 / -1;
}

.grid-gap {
  display: block;
}

.other-section {
  padding-top: 20px;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9aa3af;
  font-size: 15px;
  flex-wrap: wrap;
}

.upload-row p,
.upload-row strong {
  margin: 0;
  font-weight: 500;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px;
  color: #73777f;
  background: #fff;
  cursor: pointer;
}

.upload-button input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.submit-zone {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
  margin-top: 10px;
  padding: 18px 34px 22px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.submit-zone p {
  margin: 0;
  color: #8c94a1;
  font-size: 16px;
  white-space: nowrap;
}

.button-row,
.review-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.plain-button,
.primary-button {
  min-width: 90px;
  height: 38px;
  border-radius: 5px;
  padding: 0 20px;
  font-weight: 600;
}

.plain-button {
  border: 1px solid var(--line);
  background: #fff;
  color: #5d6672;
}

.primary-button {
  border: 0;
  background: var(--button);
  color: #fff;
  box-shadow: 0 6px 14px rgba(11, 149, 239, 0.18);
}

.plain-button:hover {
  border-color: #b8c3cf;
  background: #f8fafc;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.review-card {
  position: relative;
  padding: 0;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 34px 22px;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,251,255,0.96) 100%),
    linear-gradient(90deg, rgba(19, 152, 239, 0.1), transparent 48%);
}

.review-header h1 {
  margin: 0;
  color: #171d26;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: 0;
}

.review-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.review-header p strong {
  color: #44505d;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 32px;
  border: 1px solid rgba(22, 163, 74, 0.28);
  border-radius: 999px;
  padding: 0 14px;
  background: #ecfdf3;
  color: #15803d;
  font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65);
}

.status-badge[data-status="退回"] {
  border-color: rgba(220, 38, 38, 0.28);
  background: #fef2f2;
  color: #b91c1c;
}

.status-badge[data-status="终止"] {
  border-color: rgba(100, 116, 139, 0.28);
  background: #f1f5f9;
  color: #475569;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 34px 0;
  border: 0;
  background: transparent;
}

.review-summary div {
  display: grid;
  gap: 7px;
  min-height: 78px;
  padding: 15px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 8px 20px rgba(20, 36, 52, 0.035);
}

.review-summary span {
  color: #7b8490;
  font-size: 13px;
  font-weight: 650;
}

.review-summary strong {
  color: #303944;
  font-size: 15px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  align-items: stretch;
  gap: 24px;
  padding: 24px 34px 30px;
}

.review-main {
  min-width: 0;
}

.detail-section {
  margin-top: 0;
}

.review-info-panel,
.approval-panel {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 36, 52, 0.045);
}

.review-info-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.review-info-section {
  padding: 20px 22px 24px;
}

.review-info-section + .review-info-section {
  border-top: 1px solid var(--line-soft);
}

.account-banner {
  margin: 20px 0 0;
  overflow: hidden;
  border: 1px solid #dce6f0;
  border-radius: 8px;
  background: #eef5fb;
  box-shadow: 0 10px 22px rgba(19, 77, 127, 0.1);
}

.account-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.approval-panel {
  min-width: 0;
  padding: 20px 20px 24px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  column-gap: 34px;
  row-gap: 18px;
}

.detail-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: baseline;
  min-height: 22px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f7;
}

.detail-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-item strong {
  min-width: 0;
  color: #454c56;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.muted-item {
  opacity: 0.42;
}

.flow-section {
  margin-top: 0;
}

.approval-flow {
  position: relative;
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0 0 0 15px;
  list-style: none;
}

.approval-flow::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 15px;
  bottom: 24px;
  width: 1px;
  background: #d8d8d8;
}

.approval-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: start;
}

.check {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.approval-flow h3 {
  margin: 0 0 8px;
  color: #333940;
  font-size: 14px;
  font-weight: 700;
}

.approval-flow p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  color: #6d737b;
}

.approval-flow strong,
.approval-flow time {
  font-size: 15px;
  font-weight: 500;
}

blockquote {
  margin: 0;
  border-radius: 4px;
  background: #f3f7fb;
  border: 1px solid #e8eef5;
  color: #59606a;
  line-height: 1.55;
  padding: 10px 18px;
}

.approval-flow li:nth-child(3) blockquote,
.approval-flow li:nth-child(4) blockquote {
  margin-top: 12px;
  padding: 14px 16px;
}

.approval-flow .system-name {
  color: #394b5f;
  font-weight: 750;
}

.review-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  gap: 14px;
  margin: 0;
  padding: 16px 34px 20px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.review-actions .plain-button,
.review-actions .primary-button {
  min-width: 88px;
  height: 35px;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1280px) {
  html {
    min-width: 1040px;
  }

  .app-shell {
    grid-template-columns: 244px minmax(0, 1fr);
  }

  .form-grid,
  .detail-grid {
    column-gap: 44px;
  }

  .review-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 18px;
  }

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

  .field span,
  .detail-item span {
    font-size: 16px;
  }
}

@media (max-width: 900px) {
  html {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .workspace {
    padding: 14px;
  }

  .content-card {
    min-height: auto;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .review-header,
  .review-summary,
  .review-layout {
    margin-left: 18px;
    margin-right: 18px;
  }

  .review-header {
    display: grid;
    padding: 22px 18px 18px;
  }

  .review-summary {
    grid-template-columns: 1fr;
  }

  .review-layout {
    grid-template-columns: 1fr;
    padding: 18px 0 24px;
  }

  .review-info-panel {
    grid-template-rows: auto;
  }

  .form-section {
    padding: 14px 18px 0;
  }

  .review-card {
    padding: 24px 18px;
  }

  .submit-zone,
  .review-actions {
    justify-content: stretch;
    padding: 20px 18px 0;
  }

  .button-row,
  .review-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

}
