:root {
  --ink: #182335;
  --muted: #667085;
  --line: #dfe5ec;
  --soft: #f4f7f9;
  --paper: #ffffff;
  --navy: #183d5d;
  --navy-deep: #102d47;
  --teal: #147d78;
  --teal-soft: #e9f5f3;
  --amber: #b66a18;
  --red: #bc3f3f;
  --shadow: 0 18px 48px rgba(24, 61, 93, 0.11);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #eef3f6;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }

.site-header {
  height: 76px;
  background: var(--paper);
  border-bottom: 1px solid rgba(24, 61, 93, 0.1);
  display: flex;
  align-items: center;
}
.header-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--navy); color: white; border-radius: 11px 11px 11px 3px;
  font: 700 20px/1 "Microsoft YaHei", sans-serif;
}
.brand strong { display: block; font-size: 16px; letter-spacing: 0.03em; }
.brand small { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.secure-pill { color: #4f6477; font-size: 12px; display: flex; align-items: center; gap: 7px; }
.secure-dot { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 4px var(--teal-soft); }
.user-button { border: 1px solid var(--line); background: white; color: var(--navy); border-radius: 999px; padding: 7px 13px; font-weight: 700; }

.hero-shell {
  min-height: 270px;
  background: var(--navy-deep);
  color: white;
  padding: 48px max(20px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 56px;
  position: relative;
  overflow: hidden;
}
.hero-shell::after {
  content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%;
  border: 72px solid rgba(255,255,255,0.035); right: -95px; top: -160px;
}
.eyebrow { color: #82c9c3; font-size: 11px; letter-spacing: 0.2em; font-weight: 700; }
.hero-copy h1 { margin: 10px 0 12px; font-size: clamp(29px, 3vw, 43px); line-height: 1.2; letter-spacing: 0.04em; }
.hero-copy p { margin: 0; max-width: 710px; color: #ced9e2; font-size: 15px; }
.hero-notice { border-left: 1px solid rgba(255,255,255,0.24); padding-left: 28px; position: relative; z-index: 1; }
.notice-index { display: inline-block; color: #8ed0ca; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.hero-notice p { margin: 0; color: #dbe5eb; font-size: 13px; }

.workspace-shell {
  width: min(1180px, calc(100% - 40px));
  margin: -26px auto 64px;
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  position: relative;
  z-index: 2;
}
.process-panel, .form-panel { background: var(--paper); border: 1px solid #e5eaef; box-shadow: var(--shadow); border-radius: var(--radius); }
.process-panel { padding: 28px 24px; position: sticky; top: 20px; }
.panel-kicker { color: var(--muted); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 20px; }
.step-list { list-style: none; margin: 0; padding: 0; }
.step-item { position: relative; display: flex; gap: 14px; min-height: 80px; color: #8993a0; }
.step-item:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 7px; width: 1px; background: #d9e0e6; }
.step-item > span { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border: 1px solid #cbd4dd; border-radius: 50%; font-size: 10px; font-weight: 700; background: white; z-index: 1; }
.step-item strong, .step-item small { display: block; }
.step-item strong { font-size: 14px; color: #677483; margin-top: 3px; }
.step-item small { font-size: 11px; margin-top: 2px; }
.step-item.active > span, .step-item.done > span { border-color: var(--teal); background: var(--teal); color: white; }
.step-item.active strong, .step-item.done strong { color: var(--ink); }
.rule-card { background: #f3f7f9; border: 1px solid #e0e8ed; border-radius: 12px; padding: 16px; margin-top: 12px; }
.rule-card strong { font-size: 12px; color: var(--navy); }
.rule-card p { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.history-card { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.history-title { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.history-title button { border: 0; color: var(--teal); background: transparent; font-size: 11px; }
.history-list { margin-top: 10px; display: grid; gap: 9px; }
.history-item { background: #fafbfc; border-radius: 9px; padding: 9px 10px; font-size: 10px; }
.history-item strong { display: block; font-size: 11px; color: var(--ink); }
.history-item span { color: var(--muted); }

.form-panel { padding: clamp(24px, 4vw, 46px); min-height: 540px; }
.login-gate { min-height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; max-width: 430px; margin: auto; }
.wechat-badge { width: 62px; height: 62px; display: grid; place-items: center; background: #19a868; color: white; font-size: 28px; font-weight: 700; border-radius: 18px; box-shadow: 0 12px 30px rgba(25,168,104,.22); }
.login-gate h2 { margin: 20px 0 6px; font-size: 24px; }
.login-gate > p { color: var(--muted); margin: 0 0 20px; }
.demo-login-fields { width: 100%; text-align: left; margin-bottom: 14px; }
.field-label { display: block; font-weight: 700; margin-bottom: 7px; }
.primary-button { border: 0; background: var(--navy); color: white; padding: 12px 24px; border-radius: 9px; font-weight: 700; min-width: 132px; box-shadow: 0 8px 18px rgba(24,61,93,.18); }
.primary-button:hover { background: #225375; }
.primary-button:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.wechat-button { background: #168f5a; width: 100%; }
.wechat-button:hover { background: #117b4d; }
.mode-hint { font-size: 11px; margin-top: 12px !important; color: #8a95a1 !important; }

.form-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.form-heading > div { display: flex; align-items: center; gap: 12px; }
.form-heading h2 { margin: 0; font-size: 21px; }
.form-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.section-number { color: var(--teal); font: 700 12px/1 Arial, sans-serif; border-bottom: 2px solid var(--teal); padding-bottom: 4px; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.type-card { min-height: 118px; border: 1px solid var(--line); background: white; border-radius: 13px; padding: 18px; display: grid; grid-template-columns: 43px 1fr auto; align-items: center; gap: 13px; text-align: left; color: var(--ink); }
.type-card:hover { border-color: #93aabd; }
.type-card.active { background: #f1f8f7; border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.type-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: #eef2f5; color: var(--navy); font-size: 18px; font-weight: 700; }
.type-card.active .type-icon { background: var(--teal); color: white; }
.type-card strong, .type-card small { display: block; }
.type-card strong { font-size: 15px; }
.type-card small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.type-card i { color: var(--teal); font-style: normal; font-size: 10px; }
.section-divider { height: 1px; background: var(--line); margin: 34px 0; }
.detail-heading { margin-bottom: 22px; }
.required-mark, .field-group b { color: var(--red); font-weight: 500; }

.appeal-form { display: grid; gap: 20px; }
.field-group label { display: block; font-weight: 700; margin-bottom: 7px; font-size: 13px; }
.field-tip, .char-count { float: right; font-size: 10px; font-weight: 400; color: #8b96a3; }
.text-input, textarea, select {
  width: 100%; border: 1px solid #ccd6df; background: white; color: var(--ink);
  border-radius: 9px; padding: 11px 13px; outline: none; transition: .18s ease;
}
textarea { resize: vertical; min-height: 98px; }
.text-input:focus, textarea:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20,125,120,.1); }
.text-input::placeholder, textarea::placeholder { color: #a5adb6; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.upload-zone { border: 1px dashed #b8c6d2; border-radius: 11px; padding: 13px; min-height: 114px; display: flex; gap: 12px; flex-wrap: wrap; transition: .18s ease; }
.upload-zone.dragover { border-color: var(--teal); background: var(--teal-soft); }
.upload-trigger { width: 126px; min-height: 86px; border: 0; border-radius: 8px; background: #f2f5f7; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.upload-trigger span { color: var(--teal); font-size: 22px; line-height: 1; }
.upload-trigger strong { color: var(--ink); font-size: 11px; margin-top: 4px; }
.upload-trigger small { font-size: 9px; margin-top: 2px; }
.preview-list { display: flex; gap: 10px; flex-wrap: wrap; }
.preview-item { width: 86px; height: 86px; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item button { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(15,28,40,.75); color: white; padding: 0; line-height: 20px; }

.submit-bar { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 22px; }
.agreement { display: flex; gap: 9px; color: var(--muted); font-size: 11px; align-items: flex-start; }
.agreement input { margin-top: 4px; accent-color: var(--teal); }
.submit-actions { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-top: 20px; }
.submit-actions > span { color: var(--muted); font-size: 11px; }

.site-footer { width: min(1180px, calc(100% - 40px)); margin: -32px auto 28px; display: flex; justify-content: space-between; color: #7d8995; font-size: 11px; }
.site-footer a { color: var(--navy); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(12,28,42,.56); display: grid; place-items: center; padding: 20px; }
.modal-card { width: min(430px, 100%); background: white; border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.24); padding: 38px; }
.success-card { text-align: center; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--teal); color: white; border-radius: 50%; font-size: 28px; }
.modal-kicker { color: var(--teal); font: 700 10px/1 Arial, sans-serif; letter-spacing: .18em; }
.modal-card h2 { margin: 10px 0 6px; font-size: 25px; }
.modal-card p { margin: 0; color: var(--muted); }
.case-number { background: #f3f6f8; border-radius: 10px; padding: 13px; margin: 22px 0; }
.case-number span, .case-number strong { display: block; }
.case-number span { font-size: 10px; color: var(--muted); }
.case-number strong { color: var(--navy); letter-spacing: .04em; margin-top: 3px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 32px; transform: translateX(-50%); background: #172636; color: white; padding: 11px 17px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: min(460px, calc(100% - 32px)); text-align: center; }

/* Admin */
.admin-page { background: #f2f5f7; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0,1fr); }
.admin-sidebar { background: var(--navy-deep); color: white; padding: 27px 20px; position: fixed; inset: 0 auto 0 0; width: 224px; }
.admin-brand { display: flex; gap: 10px; align-items: center; padding: 0 7px 27px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-brand .brand-mark { width: 36px; height: 36px; font-size: 17px; background: #2a617f; }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand strong { font-size: 13px; }
.admin-brand small { color: #9db2c3; font-size: 9px; }
.admin-nav { margin-top: 26px; display: grid; gap: 8px; }
.admin-nav a { color: #adc0cf; text-decoration: none; padding: 10px 12px; border-radius: 8px; font-size: 12px; }
.admin-nav a.active { color: white; background: rgba(255,255,255,.11); }
.admin-sidebar-footer { position: absolute; bottom: 24px; left: 27px; right: 27px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 17px; color: #8ea5b7; font-size: 10px; }
.admin-main { grid-column: 2; padding: 26px 30px 44px; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-topbar h1 { margin: 0; font-size: 23px; }
.admin-topbar p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.operator-chip { background: white; border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; color: var(--navy); font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { background: white; border: 1px solid #e2e7ec; border-radius: 12px; padding: 18px; }
.stat-card span { color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin-top: 4px; color: var(--navy); font: 700 28px/1.2 Arial, sans-serif; }
.table-card { background: white; border: 1px solid #e2e7ec; border-radius: 13px; margin-top: 16px; overflow: hidden; }
.filter-bar { display: grid; grid-template-columns: minmax(220px,1fr) 150px 150px 150px auto; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.filter-bar input, .filter-bar select { padding: 9px 10px; font-size: 11px; }
.secondary-button { border: 1px solid #c8d3dc; background: white; color: var(--navy); border-radius: 8px; padding: 9px 14px; font-weight: 700; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f7f9fa; color: #75818d; font-size: 10px; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #edf0f3; font-size: 11px; vertical-align: middle; }
.data-table tr:hover td { background: #fbfcfd; }
.cell-main { display: block; font-weight: 700; color: var(--ink); }
.cell-sub { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.status-badge { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-pending { color: #89531b; background: #fff4df; }
.status-ok { color: #146c50; background: #e5f5ee; }
.status-bad { color: #9d3434; background: #fbeaea; }
.status-info { color: #365c83; background: #eaf1f8; }
.link-button { border: 0; background: transparent; color: var(--teal); font-weight: 700; padding: 3px; }
.empty-row { text-align: center; color: var(--muted); padding: 42px !important; }
.table-footer { padding: 12px 16px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }

.admin-login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: white; }
.admin-login-art { background: var(--navy-deep); color: white; padding: 8vw; display: flex; flex-direction: column; justify-content: center; }
.admin-login-art .eyebrow { margin-bottom: 12px; }
.admin-login-art h1 { font-size: clamp(32px,4vw,52px); line-height: 1.18; margin: 0 0 18px; max-width: 620px; }
.admin-login-art p { color: #b8c8d4; max-width: 530px; }
.admin-login-panel { display: grid; place-items: center; padding: 40px; }
.login-box { width: min(390px,100%); }
.login-box h2 { font-size: 26px; margin: 0 0 4px; }
.login-box > p { color: var(--muted); margin: 0 0 24px; }
.login-box .field-group { margin-bottom: 16px; }
.login-box .primary-button { width: 100%; margin-top: 6px; }
.demo-credential { background: #f4f7f9; border-radius: 9px; padding: 10px 12px; color: var(--muted); font-size: 10px; margin-top: 16px; }

.detail-drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(12,28,42,.42); display: flex; justify-content: flex-end; }
.detail-drawer { width: min(720px, 94vw); height: 100%; background: #f5f7f9; overflow-y: auto; box-shadow: -18px 0 50px rgba(12,28,42,.18); }
.drawer-header { position: sticky; top: 0; z-index: 3; background: white; padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-header h2 { margin: 0; font-size: 18px; }
.drawer-header p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: white; border-radius: 8px; color: var(--ink); }
.drawer-body { padding: 18px; display: grid; gap: 14px; }
.detail-card { background: white; border: 1px solid #e2e7ec; border-radius: 11px; padding: 18px; }
.detail-card h3 { margin: 0 0 15px; font-size: 14px; }
.meta-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px 20px; }
.meta-item span { display: block; color: var(--muted); font-size: 9px; }
.meta-item strong { display: block; font-size: 11px; margin-top: 2px; word-break: break-all; }
.detail-field { margin-top: 14px; }
.detail-field > span { display: block; color: var(--muted); font-size: 9px; }
.detail-field > p { margin: 3px 0 0; white-space: pre-wrap; word-break: break-word; font-size: 11px; }
.image-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 7px; }
.image-grid a { aspect-ratio: 1; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); }
.image-grid img { width: 100%; height: 100%; object-fit: cover; }
.operation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.operation-grid .full { grid-column: 1 / -1; }
.operation-grid label { display: block; font-size: 10px; font-weight: 700; margin-bottom: 5px; }
.operation-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.timeline { display: grid; gap: 11px; }
.timeline-item { border-left: 2px solid #c9d7df; padding-left: 12px; }
.timeline-item p { margin: 0; font-size: 11px; white-space: pre-wrap; }
.timeline-item span { color: var(--muted); font-size: 9px; }

@media (max-width: 920px) {
  .workspace-shell { grid-template-columns: 1fr; }
  .process-panel { position: static; }
  .step-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
  .step-item { min-height: auto; }
  .step-item::after { display: none; }
  .rule-card { margin-top: 20px; }
  .hero-shell { grid-template-columns: 1fr; gap: 22px; }
  .hero-notice { border-left: 0; border-top: 1px solid rgba(255,255,255,.2); padding: 15px 0 0; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; width: auto; height: auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
  .admin-brand { padding: 0; border: 0; }
  .admin-nav { margin: 0; display: flex; }
  .admin-sidebar-footer { display: none; }
  .admin-main { grid-column: 1; padding: 22px 18px; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-header { height: 66px; }
  .header-inner, .workspace-shell, .site-footer { width: min(100% - 24px, 1180px); }
  .secure-pill { display: none; }
  .hero-shell { padding: 36px 18px 52px; min-height: auto; }
  .hero-copy h1 { font-size: 28px; }
  .workspace-shell { margin-top: -18px; }
  .process-panel { padding: 20px; }
  .step-list { grid-template-columns: 1fr; }
  .step-item { min-height: 52px; }
  .form-panel { padding: 22px 17px; }
  .form-heading { align-items: flex-start; }
  .type-grid, .two-columns, .meta-grid, .operation-grid { grid-template-columns: 1fr; }
  .operation-grid .full { grid-column: auto; }
  .type-card { min-height: 100px; }
  .submit-actions { justify-content: space-between; }
  .site-footer { flex-direction: column; gap: 4px; }
  .admin-login-page { grid-template-columns: 1fr; }
  .admin-login-art { padding: 42px 26px; }
  .admin-login-panel { padding: 38px 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .table-scroll { overflow-x: auto; }
  .data-table { min-width: 760px; }
  .admin-topbar { align-items: flex-start; }
  .image-grid { grid-template-columns: repeat(3,1fr); }
}
