: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;
}

body.auth-locked {
  min-height: 100vh;
  background: #eef3f7;
}

body.auth-locked .app-shell {
  display: none;
}

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(246, 250, 253, 0.96), rgba(231, 239, 247, 0.96)),
    linear-gradient(135deg, rgba(20, 40, 58, 0.08), rgba(11, 149, 239, 0.08));
}

body:not(.auth-locked) .login-screen {
  display: none;
}

.login-card {
  display: grid;
  gap: 22px;
  width: min(430px, 100%);
  border: 1px solid #dfe7ef;
  border-radius: 10px;
  padding: 34px 36px 38px;
  background: #fff;
  box-shadow: 0 24px 54px rgba(20, 36, 52, 0.12);
}

.login-brand {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.login-brand img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.login-card h1 {
  margin: 0;
  color: #172433;
  font-size: 22px;
  font-weight: 760;
  text-align: center;
  letter-spacing: 0;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  color: #435061;
  font-weight: 700;
}

.login-submit {
  width: 100%;
  height: 42px;
}

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-width: 228px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  object-position: left center;
}

.fixed-logo {
  height: 44px;
  padding: 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;
}

.form-hint {
  margin: 12px 0 0;
  color: #8791a0;
  font-size: 13px;
}

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);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #9eb7ca;
  box-shadow: none;
}

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

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

.submit-success-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 126px);
  padding: 34px;
  gap: 34px;
}

.success-result {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 285px;
  gap: 26px;
  padding: 54px 36px;
  border-top: 1px solid #e4ebf2;
  border-bottom: 1px solid #e4ebf2;
  background:
    linear-gradient(180deg, #f8fbff 0%, #ffffff 48%, #f3f6fa 100%),
    radial-gradient(circle at 50% 0%, rgba(19, 152, 239, 0.08), transparent 48%);
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #21b26f;
  color: #fff;
  font-size: 42px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(33, 178, 111, 0.2);
}

.success-copy {
  min-width: 0;
}

.success-copy h1 {
  margin: 0;
  color: #121957;
  font-size: 34px;
  font-weight: 760;
  line-height: 1.32;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.success-copy p {
  margin: 14px 0 0;
  color: #5e6876;
  font-size: 24px;
  line-height: 1.35;
  text-align: center;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.list-card {
  padding: 0 0 26px;
}

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

.list-header h1 {
  margin: 0;
  color: #171d26;
  font-size: 24px;
  font-weight: 760;
}

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

.list-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.source-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid #d8e2ec;
  border-radius: 6px;
  padding: 3px;
  background: #f6f9fc;
}

.source-switch button {
  height: 31px;
  border: 0;
  border-radius: 4px;
  padding: 0 12px;
  background: transparent;
  color: #607083;
  font-size: 13px;
  font-weight: 700;
}

.source-switch button.active {
  background: #fff;
  color: #0878c8;
  box-shadow: 0 4px 10px rgba(20, 36, 52, 0.08);
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 220px auto;
  align-items: end;
  gap: 14px;
  padding: 20px 34px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}

.search-field,
.filter-field {
  display: grid;
  gap: 7px;
}

.search-field span,
.filter-field span {
  color: #4c5663;
  font-weight: 650;
}

.table-wrap {
  margin: 0 34px;
  overflow: auto;
}

.crm-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  color: #36404c;
}

.application-table {
  min-width: 0;
  table-layout: fixed;
}

.source-label { color: #617082; font-size: 13px; white-space: nowrap; }
.operation-menu { position: fixed; z-index: 80; width: 148px; padding: 5px; border: 1px solid #dfe5eb; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px #17243326; }
.operation-menu[hidden] { display: none; }
.operation-menu button { display: block; width: 100%; padding: 11px 14px; text-align: left; border: 0; border-radius: 4px; color: #263343; background: transparent; font-size: 14px; cursor: pointer; }
.operation-menu button:hover, .operation-menu button:focus { background: #edf5fc; outline: none; }
#staff-operation-menu { width: 176px; }
.staff-table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid #e5edf5; border-radius: 6px; }
.staff-table { min-width: 740px; width: 100%; table-layout: fixed; }
.staff-table th:nth-child(1) { width: 21%; }
.staff-table th:nth-child(2) { width: 41%; }
.staff-table th:nth-child(3) { width: 12%; }
.staff-table th:nth-child(4) { width: 11%; }
.staff-table th:nth-child(5) { width: 15%; }
.staff-table td { padding: 16px 12px; }
.staff-name-input { width: 100%; min-width: 0; height: 38px; padding: 7px 8px; border: 1px solid transparent; border-radius: 4px; color: #273343; background: transparent; font: inherit; }
.staff-name-input:hover { border-color: #dbe3eb; }
.staff-name-input:focus { outline: 2px solid #dbeeff; border-color: #48a9e8; background: #fff; }
.staff-public-link { display: block; color: #1373ad; white-space: normal; overflow-wrap: anywhere; line-height: 1.6; font-size: 13px; }
.staff-status { padding: 4px 8px; border-radius: 4px; color: #147343; background: #edf8f1; font-size: 12px; white-space: nowrap; }
.staff-status[data-enabled="false"] { color: #697582; background: #edf0f4; }
.compact-modal { max-width: 500px; }
.compact-modal-body { display: grid; gap: 18px; padding: 24px; }
.compact-modal footer, .application-detail-modal footer { justify-content: flex-end; }
.application-detail-modal { max-width: 980px; }
.application-detail-body { padding: 24px 28px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.answer-group h4 { margin: 0 0 12px; color: #243445; font-size: 15px; }
.approval-flow .flow-step-status { margin-left: 8px; font-size: 12px; font-weight: 500; color: #687384; white-space: nowrap; }
.approval-flow blockquote { white-space: pre-wrap; overflow-wrap: anywhere; }
.application-detail-body section + section { border-top: 1px solid #e8edf2; margin-top: 24px; padding-top: 24px; }
.application-detail-body h3 { margin: 0 0 20px; font-size: 17px; color: #243445; }
.application-detail-body .detail-grid { gap: 12px 28px; }
.application-detail-body .detail-item { min-width: 0; }
.application-detail-body strong { overflow-wrap: anywhere; }
.qr-modal-body { display: grid; justify-items: center; gap: 16px; padding: 24px; }
.qr-modal-body img { width: 220px; height: 220px; object-fit: contain; }
.qr-modal-body p { color: #697582; font-size: 13px; }
.qr-modal-body a { max-width: 100%; color: #1373ad; overflow-wrap: anywhere; text-align: center; line-height: 1.6; font-size: 13px; }
.approval-origin { grid-column: 1 / -1; color: #657385; padding: 0 0 12px; font-size: 13px; }
.status-modal { max-width: 520px; }
.status-modal-body { padding: 24px; }
.status-modal-body p { color: #b42318; font-size: 13px; line-height: 1.6; }
.status-modal footer { justify-content: flex-end; }
.approval-flow li:not([data-status="已完成"]) .check { background: #e7ebef; color: #788393; }
.approval-flow li[data-status="未通过"] .check, .approval-flow li[data-status="退回"] .check { color: #b42318; background: #fff0ed; }
#page-approval-list .application-table th:nth-child(1), #page-approval-list .application-table td:nth-child(1) { width: 21%; }
#page-approval-list .application-table th:nth-child(2), #page-approval-list .application-table td:nth-child(2) { width: 9%; }
#page-approval-list .application-table th:nth-child(3), #page-approval-list .application-table td:nth-child(3) { width: 13%; }
#page-approval-list .application-table th:nth-child(4), #page-approval-list .application-table td:nth-child(4) { width: 19%; }
#page-approval-list .application-table th:nth-child(5), #page-approval-list .application-table td:nth-child(5) { width: 15%; }
#page-approval-list .application-table th:nth-child(6), #page-approval-list .application-table td:nth-child(6) { width: 13%; }
#page-approval-list .application-table th:nth-child(7), #page-approval-list .application-table td:nth-child(7) { width: 10%; white-space: normal; }
#page-project-list .application-table td:nth-child(5), #page-approval-list .application-table td:nth-child(5) { overflow-wrap: anywhere; white-space: normal; line-height: 1.6; }
#page-project-list .application-table td:nth-child(2), #page-approval-list .application-table td:nth-child(2) { overflow-wrap: anywhere; white-space: normal; }
#page-project-list .application-table th:nth-child(1), #page-project-list .application-table td:nth-child(1) { width: 19%; }
#page-project-list .application-table th:nth-child(3), #page-project-list .application-table td:nth-child(3) { width: 12%; }
#page-project-list .application-table th:nth-child(5), #page-project-list .application-table td:nth-child(5) { width: 10%; }
#page-project-list .application-table th:nth-child(7), #page-project-list .application-table td:nth-child(7) { width: 10%; }
#page-project-list .application-table th:nth-child(8), #page-project-list .application-table td:nth-child(8) { width: 10%; white-space: normal; }
#page-project-list .application-table th:nth-child(9), #page-project-list .application-table td:nth-child(9) { width: 7%; }
.application-table .status-pill { max-width: 100%; height: auto; min-height: 28px; padding: 4px 8px; white-space: normal; text-align: center; font-size: 12px; }

.crm-table th,
.crm-table td {
  border-bottom: 1px solid #edf1f5;
  padding: 15px 16px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.crm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
  color: #687384;
  font-size: 13px;
  font-weight: 750;
}

.crm-table td {
  background: #fff;
  font-size: 14px;
}

.application-table th,
.application-table td {
  padding: 14px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.application-table th:nth-child(1),
.application-table td:nth-child(1) {
  width: 16%;
}

.application-table th:nth-child(2),
.application-table td:nth-child(2) {
  width: 7%;
}

.application-table th:nth-child(3),
.application-table td:nth-child(3) {
  width: 9%;
}

.application-table th:nth-child(4),
.application-table td:nth-child(4) {
  width: 17%;
}

.application-table th:nth-child(5),
.application-table td:nth-child(5) {
  width: 9%;
}

.application-table th:nth-child(6),
.application-table td:nth-child(6) {
  width: 8%;
}

.application-table th:nth-child(7),
.application-table td:nth-child(7) {
  width: 8%;
  overflow: visible;
}

.application-table th:nth-child(8),
.application-table td:nth-child(8) {
  width: 14%;
}

.application-table th:nth-child(9),
.application-table td:nth-child(9) {
  width: 12%;
  overflow: visible;
  text-align: right;
}

.crm-table tbody tr:hover td {
  background: #f8fbff;
}

.empty-cell {
  height: 128px;
  color: #8893a2;
  text-align: center !important;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 28px;
  border: 1px solid rgba(22, 163, 74, 0.28);
  border-radius: 999px;
  padding: 0 12px;
  background: #ecfdf3;
  color: #15803d;
  font-weight: 750;
}

.status-pill[data-status="未提交"] {
  border-color: rgba(239, 68, 68, 0.24);
  background: #fff7ed;
  color: #d9480f;
}

.status-pill[data-status="资料已提交"],
.status-badge[data-status="资料已提交"] {
  border-color: rgba(14, 116, 144, 0.24);
  background: #ecfeff;
  color: #0e7490;
}

.status-pill[data-status="审核中"],
.status-badge[data-status="审核中"] {
  border-color: rgba(37, 99, 235, 0.24);
  background: #eff6ff;
  color: #1d4ed8;
}

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

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

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

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.table-actions button,
.table-primary {
  height: 30px;
  border: 1px solid #cfe2f3;
  border-radius: 4px;
  padding: 0 10px;
  background: #f5fbff;
  color: #0b79c8;
  font-weight: 650;
}

.table-actions button:hover,
.table-primary:hover {
  border-color: #9ccdf2;
  background: #eef8ff;
}

.review-card {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.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;
}

#review-source-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 10px;
  background: #eef8ff;
  color: #0b79c8;
  font-size: 13px;
}

.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) minmax(420px, 34%);
  align-items: start;
  gap: 22px;
  padding: 22px 34px 24px;
}

.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: block;
  overflow: hidden;
}

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

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

.customer-master-detail {
  background: #fbfdff;
}

.answer-list {
  display: grid;
  gap: 10px;
}

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

.answer-list dl {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.answer-list dl:last-child {
  border-bottom: 0;
}

.answer-list dt {
  color: #7b8490;
  font-size: 13px;
  font-weight: 650;
}

.answer-list dd {
  margin: 0;
  color: #313b46;
  font-size: 14px;
  font-weight: 620;
  overflow-wrap: anywhere;
}

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

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

.approval-panel {
  min-width: 0;
  height: fit-content;
  padding: 22px 24px 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: 24px;
  margin: 0;
  padding: 0 0 0 15px;
  list-style: none;
}

.approval-flow::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 15px;
  bottom: 30px;
  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-update-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

body:not(.customer-master-mode) .customer-master-detail,
body:not(.customer-master-mode) .review-update-section {
  display: none;
}

.review-update-section .field {
  margin-bottom: 14px;
}

.review-update-section textarea {
  min-height: 96px;
  resize: vertical;
}

.review-save-button {
  width: 100%;
}

.review-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  gap: 14px;
  margin: 0 34px 24px;
  padding: 16px 0 0;
  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));
  }

  .list-toolbar {
    grid-template-columns: minmax(320px, 1fr) 200px auto;
  }

  .crm-table {
    min-width: 920px;
  }

  .submit-success-card {
    padding: 26px;
  }

  .success-copy h1 {
    font-size: 30px;
  }

  .success-copy p {
    font-size: 22px;
  }

  .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,
  .list-header,
  .list-toolbar,
  .table-wrap {
    margin-left: 18px;
    margin-right: 18px;
  }

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

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

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

  .list-toolbar {
    grid-template-columns: 1fr;
    padding: 18px 0;
  }

  .table-wrap {
    margin-top: 0;
  }

  .crm-table {
    min-width: 860px;
  }

  .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;
  }

  .submit-success-card {
    min-height: 420px;
    padding: 18px;
  }

  .success-result {
    flex-direction: column;
    min-height: 260px;
    padding: 36px 18px;
    text-align: center;
  }

  .success-icon {
    width: 58px;
    height: 58px;
    font-size: 36px;
  }

  .success-copy h1 {
    font-size: 24px;
  }

  .success-copy p {
    font-size: 18px;
  }

  .success-actions {
    flex-wrap: wrap;
  }

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

}

.role-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 700;
}

body[data-role="staff"] .admin-only,
body[data-role="staff"] .admin-only-page {
  display: none !important;
}

.dashboard-card {
  padding-bottom: 30px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  padding: 24px 34px 10px;
}

.metric-card {
  display: grid;
  gap: 10px;
  min-height: 108px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(20, 36, 52, 0.045);
}

.metric-card span {
  color: #6d7684;
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  color: #172433;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.quick-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 34px 0;
  border: 1px solid #dfe8f2;
  border-radius: 8px;
  padding: 22px 24px;
  background: #fbfdff;
}

.quick-panel h2 {
  margin: 0 0 8px;
  color: #1d2733;
  font-size: 18px;
}

.quick-panel p {
  margin: 0;
  color: #6b7583;
  line-height: 1.65;
}

.quick-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.two-col-toolbar {
  grid-template-columns: minmax(360px, 1fr);
}

.customer-table { min-width: 920px; }
.customer-table .selection-column { width: 42px; padding-left: 14px; padding-right: 8px; }
.selection-column input { width: 16px; height: 16px; accent-color: #078ce5; }
.customer-table .table-primary { white-space: nowrap; }
.danger-button { border: 1px solid #dcaaaa; background: #fff; color: #b42324; border-radius: 4px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.danger-button:hover:not(:disabled) { background: #fff1f1; border-color: #b42324; }
.danger-button:disabled { opacity: .45; cursor: not-allowed; }
.customer-delete-body { padding: 20px 24px; display: grid; gap: 16px; color: #4b5563; line-height: 1.6; }
.customer-delete-body p { margin: 0; }
#customer-delete-summary { color: #942221; font-weight: 600; }
#customer-delete-list { margin: 0; padding-left: 22px; max-height: 160px; overflow: auto; }
.customer-history-field { display: grid; gap: 8px; margin-bottom: 22px; }
.customer-history-field select { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #d2dce6; border-radius: 4px; background: #fff; font: inherit; }
.answer-list dd, .detail-item strong { overflow-wrap: anywhere; white-space: pre-wrap; }

.inline-create {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.field-config-list {
  display: grid;
  gap: 10px;
}

.field-config-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(220px, 1.5fr) 84px 84px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5edf5;
  border-radius: 6px;
  background: #fbfdff;
}

.field-config-name {
  display: grid;
  gap: 3px;
}

.field-config-name strong {
  color: #172433;
}

.field-config-name span,
.field-config-default span,
.switch-line span {
  color: #7a8798;
  font-size: 12px;
}

.field-config-default {
  display: grid;
  gap: 5px;
}

.field-config-default input {
  width: 100%;
  height: 34px;
  border: 1px solid #d8e1ea;
  border-radius: 4px;
  padding: 0 10px;
  color: #253244;
  background: #fff;
}

.field-config-default input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

.switch-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
}

.switch-line input {
  width: 16px;
  height: 16px;
  accent-color: #0b94e9;
}

.link-card,
.empty-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfdff;
  padding: 16px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.link-card div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.link-card span {
  color: #738092;
  font-size: 13px;
  font-weight: 700;
}

.link-card strong {
  color: #1d2733;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.link-card img {
  width: 116px;
  height: 116px;
  border: 1px solid #e0e8f1;
  border-radius: 6px;
  padding: 6px;
  background: #fff;
  object-fit: contain;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 33, 49, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.approval-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 33, 49, 0.28);
  overflow: hidden;
}

.approval-modal > header,
.approval-modal > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  background: #fbfdff;
  border-bottom: 1px solid var(--line-soft);
}

.approval-modal > footer {
  border-top: 1px solid var(--line-soft);
  border-bottom: 0;
}

.approval-modal h2 {
  margin: 0;
  color: #182332;
  font-size: 22px;
}

.approval-modal p {
  margin: 7px 0 0;
  color: #748092;
}

.approval-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 22px 24px;
  overflow: auto;
}

.approval-edit-grid fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  margin: 0;
  padding: 16px;
  background: #fff;
}

.approval-edit-grid legend {
  padding: 0 8px;
  color: #1d3448;
  font-weight: 800;
}

.approval-edit-grid textarea { min-height: 96px; width: 100%; resize: vertical; }

.signature-preview {
  margin: 14px 0 0;
  border: 1px solid #e2e9f1;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.signature-preview figcaption {
  margin-bottom: 8px;
  color: #687384;
  font-size: 13px;
  font-weight: 700;
}

.signature-preview img {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  border: 1px solid #edf1f5;
  background: #fff;
}

.public-root {
  min-width: 0;
  background: #eef3f8;
}

body.public-page {
  min-height: 100vh;
  background: #eef3f8;
  font-size: 15px;
}

.public-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px 14px 30px;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  border-radius: 10px;
  padding: 10px 14px;
  background: rgba(15, 33, 49, 0.96);
  box-shadow: 0 12px 28px rgba(15, 33, 49, 0.12);
}

.public-header img {
  width: 210px;
  max-width: 66%;
  height: auto;
  object-fit: contain;
}

.public-query-button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  padding: 0 13px;
  background: transparent;
  color: #fff;
  font-weight: 700;
}

.public-card {
  margin-top: 14px;
  border: 1px solid #dfe8f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(20, 36, 52, 0.08);
  overflow: hidden;
}

.public-hero {
  background: #e9f2fb;
}

.public-hero img {
  display: block;
  width: 100%;
  height: auto;
}

.public-title {
  padding: 22px 20px 4px;
}

.public-title span {
  display: inline-flex;
  height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef8ff;
  color: #0b79c8;
  font-size: 12px;
  font-weight: 800;
}

.public-title h1 {
  margin: 12px 0 8px;
  color: #172433;
  font-size: 24px;
  line-height: 1.25;
}

.public-title p {
  margin: 0;
  color: #6d7684;
  line-height: 1.65;
}

.public-form {
  padding: 8px 20px 22px;
}

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

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

.public-form h2 {
  position: relative;
  margin: 0 0 14px;
  padding-left: 12px;
  color: #26313e;
  font-size: 18px;
}

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

.public-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.signature-pad-wrap {
  display: grid;
  gap: 12px;
}

#signature-pad {
  width: 100%;
  height: 220px;
  border: 1px solid #cfdbe8;
  border-radius: 8px;
  background:
    linear-gradient(#fff, #fff),
    repeating-linear-gradient(0deg, transparent, transparent 31px, #f4f7fb 32px);
  touch-action: none;
}

.public-agreement {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  color: #505b68;
  line-height: 1.55;
}

.public-agreement input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.public-state {
  min-height: 24px;
  margin: 4px 0 0;
  color: #d9480f;
  font-weight: 700;
}

.public-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
}

.public-result-card,
.public-query-card {
  padding: 22px;
}

.public-result-meta,
.public-status-meta {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 18px 0 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfdff;
}

.public-result-meta dt,
.public-status-meta dt {
  color: #718095;
  font-weight: 700;
}

.public-result-meta dd,
.public-status-meta dd {
  margin: 0;
  color: #1d2733;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.public-query-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
}

.empty-status {
  margin: 18px 0 0;
  border: 1px dashed #cbd8e5;
  border-radius: 8px;
  padding: 18px;
  color: #718095;
  background: #fbfdff;
  text-align: center;
}

.public-status-card {
  margin-top: 18px;
  border: 1px solid #dfe8f2;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.public-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.public-status-head div {
  display: grid;
  gap: 5px;
}

.public-status-head span {
  color: #718095;
  font-size: 13px;
  font-weight: 700;
}

.public-status-head strong {
  color: #172433;
  font-size: 18px;
}

.public-status-head b {
  flex: 0 0 auto;
  border: 1px solid rgba(22, 163, 74, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
  background: #ecfdf3;
  color: #15803d;
}

.public-flow {
  position: relative;
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
  padding-left: 14px;
  list-style: none;
}

.public-flow::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: #d8e2ec;
}

.public-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
}

.public-flow li > span {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px #eef8ff;
}

.public-flow h3 {
  margin: 0 0 6px;
  color: #273343;
  font-size: 15px;
}

.public-flow p {
  margin: 0 0 6px;
  color: #6d7684;
}

.public-flow strong {
  color: #15803d;
}

@media (max-width: 1380px) {
  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .metric-grid,
  .field-config-row,
  .approval-edit-grid,
  .public-grid,
  .public-query-form {
    grid-template-columns: 1fr;
  }

  .quick-panel,
  .link-card,
  .public-status-head {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-create {
    grid-template-columns: 1fr;
  }

  .approval-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .public-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .public-actions button {
    flex: 1;
  }
}
/* Questionnaire editor is scoped away from the approval progress layout. */
.account-banner picture { display: contents; }
#survey-editor { padding: 24px 28px 0; }
#survey-editor .button-row { flex-wrap: wrap; gap: 10px; }
#survey-editor .button-row button, #survey-editor .survey-options-header button, #survey-editor .survey-dialog-body > button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
#survey-editor button img { flex: 0 0 16px; }
#survey-editor .primary-button img { filter: brightness(0) invert(1); }
.survey-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; }
.survey-editor-header strong { font-size: 17px; font-weight: 600; }
.survey-editor-header p { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 0; color: #7a838c; font-size: 13px; }
.survey-page-tabs { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid #e3e7ec; margin-bottom: 8px; }
.survey-page-tabs button { min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 14px; color: #647080; padding: 8px 0; }
.survey-page-tabs button.active { color: #1677ce; border-color: #1677ce; }
.survey-table-wrap { overflow-x: auto; }
.survey-question-table { min-width: 760px; table-layout: fixed; }
.survey-question-table th:nth-child(1) { width: 60px; }
.survey-question-table th:nth-child(3) { width: 108px; }
.survey-question-table th:nth-child(4) { width: 105px; }
.survey-question-table th:nth-child(5) { width: 65px; }
.survey-question-table th:nth-child(6) { width: 174px; }
.survey-question-table td { white-space: normal; overflow-wrap: anywhere; padding-top: 15px; padding-bottom: 15px; }
.survey-question-table td:nth-child(3) { white-space: nowrap; }
#operations-title { letter-spacing: 0; }
.survey-question-table td strong { font-size: 14px; font-weight: 500; }
.survey-question-table td p { font-size: 12px; color: #87919d; line-height: 1.5; margin: 5px 0 0; }
.survey-question-table td p:empty { display: none; }
.survey-core-label, .survey-hidden-label { display: inline-block; margin-left: 8px; padding: 1px 5px; font-size: 10px; color: #51738d; background: #eef4f8; border-radius: 3px; }
.survey-hidden-label { color: #888; background: #f0f0f0; }
.survey-row-tools { display: flex; gap: 4px; }
.survey-icon-button { display: inline-flex; flex: 0 0 32px; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 4px; background: none; padding: 6px; cursor: pointer; }
.survey-icon-button:hover { background: #f1f5fa; border-color: #dce4ef; }
.survey-icon-button:disabled { opacity: .22; cursor: not-allowed; }
.survey-editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid #e6eaf0; margin-top: 8px; }
.survey-editor-footer > p { margin: 0; font-size: 13px; color: #737f8b; max-width: 460px; overflow-wrap: anywhere; }
.survey-editor-footer .error { color: #b22222; }
.survey-dialog { border: 1px solid #dce2e9; border-radius: 8px; padding: 0; width: min(620px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); color: #27313c; background: #fff; overflow: auto; }
.survey-dialog::backdrop { background: #12203066; }
.survey-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 24px; border-bottom: 1px solid #e5e9ed; }
.survey-dialog h2 { margin: 0; font-size: 18px; font-weight: 600; }
.survey-dialog-body { padding: 22px 24px; }
.survey-dialog-body > label, .survey-edit-grid > label { display: grid; gap: 8px; margin-bottom: 20px; font-size: 13px; color: #657080; }
.survey-dialog input:not([type=checkbox]), .survey-dialog select, .survey-dialog textarea { display: block; width: 100%; min-width: 0; border: 1px solid #cdd5df; border-radius: 4px; min-height: 40px; padding: 8px 10px; color: #27313c; background: white; font: inherit; }
.survey-dialog input:focus, .survey-dialog textarea:focus, .survey-dialog select:focus { outline: 2px solid #1677ce25; border-color: #1677ce; }
.survey-dialog textarea { resize: vertical; }
.survey-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.survey-checks { display: flex; gap: 26px; font-size: 14px; margin-bottom: 24px; }
.survey-checks label { display: flex; align-items: center; gap: 8px; }
.survey-checks input { width: 16px; height: 16px; accent-color: #1677ce; }
.survey-options-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 14px; }
.survey-option-row { display: flex; gap: 6px; align-items: center; margin: 10px 0; }
.survey-option-row > span { flex: 0 0 24px; font-size: 12px; color: #8b929a; }
.survey-page-row { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.survey-page-row > span { flex: 0 0 18px; color: #999; }
.survey-page-row > small { flex: 0 0 40px; font-size: 12px; color: #888; }
.survey-dialog footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid #e5e9ed; }
#question-edit-error, #pages-edit-error { margin-top: 12px; color: #b22222; font-size: 13px; }
.survey-preview-dialog { width: min(530px, calc(100vw - 40px)); }
.survey-preview-dialog.desktop-preview { width: min(1040px, calc(100vw - 40px)); }
.survey-preview-dialog header { padding: 14px 16px; }
.survey-preview-dialog h2 { font-size: 15px; }
.survey-preview-modes { display: flex; align-items: center; gap: 6px; }
.survey-preview-modes button { padding: 5px 9px; min-width: 0; }
.survey-preview-dialog iframe { display: block; margin: 0 auto; border: 0; width: 390px; max-width: 100%; height: min(730px, calc(100dvh - 140px)); background: #981b1c; }
.survey-preview-dialog.desktop-preview iframe { width: 100%; }
@media (max-width: 1100px) { .survey-editor-header { align-items: flex-start; flex-direction: column; } }
