:root {
  --sapphire: #2357d6;
  --sapphire-hover: #1948bd;
  --teal: #009f8a;
  --teal-soft: #e5f7f4;
  --coral: #f25f4c;
  --ink: #101827;
  --muted: #667085;
  --soft: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #edf4fb;
  --line: #d8e2ed;
  --line-strong: #9fb0c2;
  --success: #168a56;
  --error: #d92d20;
  --shadow: 0 18px 48px rgba(15, 32, 56, 0.09);
  --shadow-soft: 0 10px 28px rgba(35, 87, 214, 0.06);
  --nav: 72px;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(16, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 24, 39, 0.03) 1px, transparent 1px),
    #f9fbfd;
  background-size: 48px 48px;
  font-family: Inter, "IBM Plex Sans", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

a { color: var(--sapphire); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.full { grid-column: 1 / -1; }
.muted { color: var(--muted); }

.topbar {
  min-height: var(--nav);
  border-bottom: 1px solid rgba(216, 226, 237, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 36px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(35, 87, 214, 0.22);
  box-shadow: var(--shadow-soft);
  flex: 0 0 auto;
  object-fit: contain;
  padding: 4px;
}
.brand-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 42px;
  padding: 10px 16px;
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0;
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--sapphire); color: #fff; box-shadow: 0 12px 24px rgba(35, 87, 214, 0.2); }
.btn-primary:hover { background: var(--sapphire-hover); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { border-color: var(--line-strong); background: #f8fbfe; }
.btn-danger { background: var(--error); color: #fff; }

.lang-toggle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  padding: 3px;
  min-width: 118px;
}
.lang-toggle button {
  border: 0;
  border-radius: 6px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 760;
}
.lang-toggle button.active { background: var(--ink); color: #fff; }

body.auth-mode {
  background: #fff;
}

body.auth-mode .topbar {
  position: absolute;
  inset: 0 0 auto;
  min-height: 64px;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  padding: 18px 36px;
}

body.auth-mode .brand {
  visibility: hidden;
}

body.auth-mode .top-actions {
  margin-left: auto;
}

body.auth-mode .top-actions .btn,
body.auth-mode .lang-toggle {
  box-shadow: 0 10px 24px rgba(24, 45, 91, 0.08);
}

.auth-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 96px clamp(28px, 5vw, 96px);
  background: #fff;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 23.6vh;
  height: min(480px, 52.5vh);
  background: linear-gradient(105deg, #4da1df 0%, #437ce1 48%, #3b49ea 100%);
}
.auth-stage {
  position: relative;
  z-index: 1;
  width: min(1680px, 100%);
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 430px;
  align-items: center;
  gap: clamp(56px, 8vw, 150px);
}
.auth-wrap.single { grid-template-columns: 1fr; }
.auth-panel {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-right: 0;
}
.auth-panel.center { align-items: center; }
.auth-aside {
  position: relative;
  overflow: visible;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-aside::before { display: none; }
.auth-aside > div { position: relative; z-index: 1; max-width: 760px; }
.auth-banner-img {
  display: block;
  width: min(620px, 100%);
  height: auto;
  filter: drop-shadow(0 18px 26px rgba(10, 40, 110, 0.08));
}
.auth-visual {
  position: relative;
  display: block;
  margin-bottom: 42px;
  max-width: 600px;
  padding: 0;
}
.auth-logo-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(216, 226, 237, 0.92);
  box-shadow: var(--shadow-soft);
}
.auth-logo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.auth-logo-card-dark {
  height: 150px;
  background: #02040a;
  padding: 28px 34px;
  border-color: rgba(16, 24, 39, 0.2);
  box-shadow: 0 26px 70px rgba(16, 24, 39, 0.22);
}
.auth-logo-card-light {
  height: 56px;
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 18px;
}
.auth-aside h1 { margin: 0 0 22px; font-size: clamp(40px, 4.6vw, 64px); font-weight: 760; line-height: 1.04; letter-spacing: 0; }
.auth-aside p { color: #475467; font-size: 18px; max-width: 620px; }
.auth-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), #fff 42%, #fdfefe),
    #fff;
  padding: 0;
  width: min(100%, 430px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 44px 90px rgba(20, 35, 88, 0.22),
    0 18px 34px rgba(20, 35, 88, 0.14),
    0 0 0 1px rgba(64, 83, 234, 0.08);
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), transparent 30%),
    radial-gradient(circle at 78% 8%, rgba(64, 83, 234, 0.13), transparent 30%),
    linear-gradient(90deg, rgba(77, 161, 223, 0.08), transparent 18%, transparent 82%, rgba(64, 83, 234, 0.12));
}
.auth-card > * {
  position: relative;
  z-index: 1;
}
.auth-card .grid.two { grid-template-columns: 1fr; }
.login-brand-strip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-card h1 {
  margin: 0;
  padding: 28px 34px 6px;
  color: #42464d;
  font-size: 31px;
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0;
}
.auth-card p { color: var(--muted); }
.auth-card-subtitle {
  width: fit-content;
  max-width: calc(100% - 64px);
  min-height: 30px;
  margin: 2px auto 20px;
  padding: 6px 13px;
  border: 1px solid rgba(64, 83, 234, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(77, 161, 223, 0.1), rgba(64, 83, 234, 0.08)),
    #fff;
  color: #40516f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.35;
  text-align: center;
}
.auth-card-subtitle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4da1df, #4053ea);
  box-shadow: 0 0 0 4px rgba(64, 83, 234, 0.08);
  flex: 0 0 auto;
}
.auth-form {
  flex: 1;
  display: grid;
  gap: 24px;
  padding: 0 26px 34px;
}
#loginForm {
  align-content: space-evenly;
  gap: 0;
  padding: 8px 26px 38px;
}
#registerForm {
  gap: 20px;
  padding-bottom: 30px;
}
.auth-field {
  gap: 9px;
  color: #8790a2;
  font-size: 14px;
  font-weight: 820;
}
.auth-field-control {
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  border: 1px solid #d8dde8;
  border-radius: 22px;
  background:
    linear-gradient(180deg, #f3f5f9, #e9edf4);
  padding: 0 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(160, 170, 190, 0.1);
}
.auth-field-control svg {
  width: 23px;
  height: 23px;
  color: #969ba5;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-field-control input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #323843;
  font-size: 14px;
  font-weight: 700;
}
.auth-field-control input::placeholder {
  color: #8e95a2;
  opacity: 1;
}
.auth-field-control:focus-within {
  border-color: rgba(59, 73, 234, 0.45);
  box-shadow: 0 0 0 3px rgba(59, 73, 234, 0.1);
}
.btn-auth-login {
  min-height: 46px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ff675b, #ff5448);
  color: #fff;
  font-size: 15px;
  font-weight: 820;
  box-shadow:
    0 12px 22px rgba(255, 95, 80, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}
.btn-auth-login:hover { background: #f25244; }
.auth-card-footer {
  margin-top: auto;
  border-top: 1px solid #dfe5ef;
  background:
    linear-gradient(180deg, #f5f7fb, #edf1f7);
  padding: 18px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.auth-switch-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: #3f4652;
  font-size: 15px;
  font-weight: 820;
}
.btn-auth-register {
  min-width: 164px;
  min-height: 42px;
  border-radius: 22px;
  background: #4053ea;
  color: #fff;
  font-size: 15px;
  font-weight: 820;
  box-shadow: none;
}
.btn-auth-register:hover {
  background: #3445d4;
  color: #fff;
}
.switch { text-align: center; margin-bottom: 0; }
.metrics {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.metrics div {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 22px rgba(16, 24, 39, 0.05);
}
.metrics strong { display: block; font-size: 30px; font-weight: 760; color: var(--sapphire); }
.metrics span { color: var(--muted); font-size: 12px; }

.grid { display: grid; gap: 18px; }
.grid.two, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label {
  display: grid;
  align-content: start;
  gap: 4px;
  font-size: 13px;
  font-weight: 720;
  min-width: 0;
}
.field-label {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--ink);
  line-height: 1.3;
}
.field-label em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 520;
}
.form-grid > label > .field-label,
.form-grid > div > label > .field-label {
  min-height: 52px;
  align-content: start;
}
.repeatable-grid > label > .field-label {
  min-height: 46px;
  align-content: start;
}
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 11px 13px;
  outline: 3px solid transparent;
  outline-offset: 0;
  transition: border-color 150ms ease, outline-color 150ms ease, box-shadow 150ms ease;
}
textarea { min-height: 118px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--sapphire); outline-color: rgba(35, 87, 214, 0.14); box-shadow: 0 0 0 1px rgba(35, 87, 214, 0.12); }
input[type="date"],
input[type="month"] {
  position: relative;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667685' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 18px 18px;
}
input[type="date"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit {
  pointer-events: none;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.auth-form .auth-field-control input {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  outline: 0;
  box-shadow: none;
}
.auth-form .auth-field-control input:hover,
.auth-form .auth-field-control input:focus {
  border-color: transparent;
  outline-color: transparent;
  box-shadow: none;
}
input[type="file"] { padding: 10px; background: #f9fbfd; }
small { color: var(--muted); font-weight: 450; line-height: 1.45; }
.required { color: var(--coral); margin-left: 3px; }

.portal {
  display: grid;
  grid-template-columns: clamp(232px, 18vw, 320px) minmax(0, 1fr);
  min-height: calc(100vh - var(--nav));
  background:
    linear-gradient(180deg, #f9fbfd 0, #fff 420px),
    #fff;
}
.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  padding: clamp(20px, 1.8vw, 30px) clamp(16px, 1.45vw, 24px);
  position: sticky;
  top: var(--nav);
  height: calc(100vh - var(--nav));
  overflow: auto;
}
.progress-title { font-size: 13px; font-weight: 820; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.progress-sub {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(0, 159, 138, 0.22);
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 12px;
  font-weight: 760;
  padding: 5px 10px;
  margin-bottom: 28px;
}
.step-list { display: grid; gap: 10px; }
.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  min-height: 66px;
  position: relative;
  color: var(--muted);
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  padding: 10px;
  text-align: left;
}
.step::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 45px;
  bottom: -12px;
  width: 1px;
  background: var(--line);
}
.step:last-child::before { display: none; }
.step-dot {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 820;
  z-index: 1;
}
.step.active {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.step.active .step-dot { background: var(--sapphire); border-color: var(--sapphire); color: #fff; }
.step-name { font-size: 13px; font-weight: 820; padding-top: 1px; color: inherit; }
.step-en { font-size: 11px; color: var(--muted); line-height: 1.35; }
.side-help {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}
.side-help p { margin-bottom: 0; color: var(--muted); }

.content {
  min-width: 0;
  background:
    linear-gradient(90deg, rgba(216, 226, 237, 0.45) 1px, transparent 1px),
    linear-gradient(180deg, rgba(216, 226, 237, 0.38) 1px, transparent 1px),
    linear-gradient(180deg, #fff 0, #f8fbfe 360px, #fff 680px);
  background-size: 48px 48px, 48px 48px, auto;
}
.content-head {
  min-height: 88px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 1.4vw, 24px) clamp(20px, 2.1vw, 40px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  position: sticky;
  top: var(--nav);
  z-index: 10;
}
.content-head h1 { margin: 0; font-size: clamp(25px, 2.2vw, 34px); font-weight: 800; letter-spacing: 0; }
.content-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 720px; }
.head-actions, .footer-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.form-wrap {
  padding: clamp(20px, 2.1vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 1.8vw, 32px);
  width: 100%;
  max-width: none;
}
.section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: calc(var(--nav) + 108px);
  overflow: hidden;
}
.section-header {
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(35, 87, 214, 0.08), transparent 42%),
    #fff;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.section-header h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: 0; }
.section-header p { margin: 7px 0 0; color: var(--muted); font-size: 13px; max-width: 760px; }
.section-title-alt { margin-top: 5px; color: var(--teal); font-size: 12px; font-weight: 760; }
.section-index {
  min-width: 44px;
  height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid rgba(35, 87, 214, 0.2);
  color: var(--sapphire);
  font-size: 12px;
  font-weight: 820;
}
.section-body { padding: 26px; min-width: 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(18px, 1.45vw, 26px) clamp(18px, 1.6vw, 30px);
}
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice {
  min-height: 46px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.choice:hover { border-color: rgba(35, 87, 214, 0.36); background: #f9fbff; }
.choice:focus-within {
  border-color: rgba(35, 87, 214, 0.52);
  background: #f9fbff;
  box-shadow: inset 0 0 0 1px rgba(35, 87, 214, 0.12);
}
.choice:has(input:checked) {
  border-color: rgba(35, 87, 214, 0.55);
  background: #f5f8ff;
}
.choice input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  flex: 0 0 16px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #9fb0c2;
  border-radius: 4px;
  background: #fff;
  outline: 0;
  box-shadow: none;
  cursor: pointer;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input:hover,
.choice input:focus,
.choice input:focus-visible {
  border-color: #9fb0c2;
  outline: 0;
  box-shadow: none;
}
.choice input:checked {
  border-color: var(--sapphire);
  background: var(--sapphire);
}
.choice input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 5px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
  margin-top: -1px;
}
.choice input[type="radio"]:checked::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}
.repeatable {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.repeatable-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.repeatable-title .field-label span {
  font-size: 15px;
  font-weight: 820;
}
.repeatable-add {
  min-height: 34px;
  padding: 7px 12px;
}
.repeatable-rows {
  display: grid;
  gap: 12px;
}
.repeatable-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  overflow: hidden;
}
.repeatable-row-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(35, 87, 214, 0.07), rgba(0, 159, 138, 0.05));
}
.repeatable-row-head strong {
  font-size: 13px;
  color: #344054;
}
.repeatable-remove {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--error);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 760;
}
.repeatable-remove:hover:not(:disabled) {
  border-color: rgba(217, 45, 32, 0.22);
  background: #fff4f2;
}
.repeatable-remove:disabled {
  color: #b9c3cf;
  cursor: not-allowed;
}
.repeatable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 14px;
  padding: 14px;
}
.repeatable-grid label {
  gap: 6px;
}
.repeatable-grid input,
.repeatable-grid select {
  min-height: 40px;
  padding: 9px 11px;
}
.financial-table, .upload-table, .data-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
th, td { border: 1px solid var(--line); padding: 12px; vertical-align: top; text-align: left; }
th { background: var(--surface-2); font-weight: 800; color: #344054; }
.table-scroll { overflow: auto; max-width: 100%; }
.financial-table input { min-height: 38px; background: #fff; }
.footer-actions {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  padding: 18px 34px;
  position: sticky;
  bottom: 0;
  z-index: 9;
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  padding: 14px 18px;
  min-width: 260px;
  box-shadow: var(--shadow);
  z-index: 100;
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1100px) {
  .auth-wrap, .portal { grid-template-columns: 1fr; }
  .auth-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  body.auth-mode .auth-panel { border-bottom: 0; }
  .auth-stage { grid-template-columns: minmax(0, 1fr) 390px; gap: 40px; }
  .auth-aside { min-height: 420px; }
  body.auth-mode .auth-aside { min-height: auto; }
  .sidebar { position: relative; top: 0; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step::before { display: none; }
}

@media (max-width: 760px) {
  :root { --nav: 132px; }
  body { background-size: 34px 34px; }
  .topbar { align-items: flex-start; padding: 14px 16px; flex-direction: column; }
  .brand-title, .brand-subtitle { white-space: normal; }
  .top-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .top-actions .btn { flex: 1 1 auto; }
  .auth-wrap { min-height: calc(100vh - var(--nav)); display: block; background: #f8fbfe; }
  .auth-panel { min-height: calc(100vh - var(--nav)); padding: 28px 16px; border-right: 0; }
  .auth-aside { display: none; }
  .auth-card { padding: 24px; width: 100%; }
  body.auth-mode .topbar {
    position: absolute;
    min-height: 58px;
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
  }
  body.auth-mode .brand { display: none; }
  body.auth-mode .top-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
  }
  body.auth-mode .top-actions .btn {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 12px;
  }
  body.auth-mode .lang-toggle { min-width: 96px; }
  body.auth-mode .lang-toggle button {
    min-height: 30px;
    padding: 0 8px;
  }
  body.auth-mode .auth-wrap {
    min-height: 100vh;
    display: flex;
    padding: 96px 16px 38px;
    background: #fff;
  }
  body.auth-mode .auth-wrap::before {
    top: 112px;
    height: 330px;
  }
  body.auth-mode .auth-stage {
    grid-template-columns: 1fr;
    gap: 18px;
    width: 100%;
  }
  body.auth-mode .auth-aside {
    display: flex;
    min-height: auto;
  }
  body.auth-mode .auth-banner-img {
    width: min(380px, 92vw);
  }
  body.auth-mode .auth-panel {
    min-height: auto;
    padding: 0;
  }
  body.auth-mode .auth-card {
    width: min(100%, 420px);
    min-height: auto;
    padding: 0;
  }
  body.auth-mode .auth-card h1 {
    padding: 24px 22px 6px;
    font-size: 26px;
  }
  body.auth-mode .auth-card-subtitle {
    max-width: calc(100% - 42px);
    margin-bottom: 16px;
    padding: 6px 10px;
    font-size: 12px;
  }
  body.auth-mode .auth-form {
    gap: 18px;
    padding: 0 20px 30px;
  }
  body.auth-mode .auth-card-footer {
    padding: 16px 18px;
  }
  body.auth-mode .auth-switch-row {
    gap: 10px;
    text-align: center;
  }
  .login-brand-strip { margin-bottom: 22px; }
  .grid.two, .form-grid, .choice-grid, .choice-grid.compact { grid-template-columns: 1fr; }
  .repeatable-title { align-items: stretch; flex-direction: column; }
  .repeatable-add { width: 100%; }
  .repeatable-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .sidebar { padding: 16px; }
  .progress-sub { margin-bottom: 12px; }
  .step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .step { min-height: 58px; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; padding: 8px; }
  .step-dot { width: 28px; height: 28px; font-size: 11px; }
  .step-name { font-size: 11px; }
  .step-en { font-size: 10px; }
  .side-help { display: none; }
  .content-head { top: var(--nav); flex-direction: column; align-items: stretch; padding: 18px 16px; }
  .content-head .head-actions { display: none; }
  .footer-actions .btn { flex: 1; }
  .form-wrap { padding: 16px; gap: 18px; }
  .section-body, .section-header { padding: 18px; }
  .section-header { display: grid; }
  .financial-table, .upload-table, .data-table { min-width: 680px; }
}

/* Legacy competition admin console */
.admin-body {
  background: #eef1f6;
  color: #000;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.35;
}

.admin-login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(84, 62, 160, 0.95), rgba(45, 117, 214, 0.88)),
    #4c39a0;
}

.admin-login-card {
  width: min(460px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid #c8d4e4;
  box-shadow: 0 18px 50px rgba(24, 33, 70, 0.28);
  padding: 30px;
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.admin-logo-mark,
.legacy-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex: 0 0 auto;
}

.admin-login-brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.admin-login-brand p {
  margin: 4px 0 0;
  color: #69778a;
}

.admin-login-form {
  display: grid;
  gap: 16px;
}

.admin-primary-btn,
.admin-danger-btn {
  min-height: 34px;
  border: 1px solid #126eb9;
  background: linear-gradient(#4db3ef, #1c87d1);
  color: #fff;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 600;
}

.admin-danger-btn {
  border-color: #b5332f;
  background: linear-gradient(#f26b61, #d83a33);
}

.legacy-admin {
  height: 100vh;
  overflow: hidden;
  background: #f4f6f9;
}

.legacy-header {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(255,255,255,.05) 0 10%, transparent 11% 34%, rgba(255,255,255,.07) 35% 47%, transparent 48%),
    linear-gradient(90deg, #6a56c3, #3d2b91);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 31, 66, 0.25);
}

.legacy-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 18px;
  min-width: 0;
}

.legacy-brand strong {
  font-size: 29px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.legacy-userbar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 18px;
  color: #ddd7ff;
  font-size: 13px;
}

.header-link,
.logout-icon {
  border: 0;
  background: transparent;
  color: #fff;
  min-height: 32px;
  padding: 0 10px;
  border-left: 1px solid rgba(255,255,255,.14);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #fff 0 24%, transparent 25%),
    radial-gradient(circle at 50% 82%, #fff 0 35%, #d5d7df 36%);
  border: 3px solid rgba(255,255,255,.5);
}

.legacy-shell {
  height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-width: 0;
}

.legacy-sidebar {
  background: #fff;
  border-right: 1px solid #d8e0ea;
  overflow-y: auto;
  padding: 10px;
}

.side-group.primary {
  background: #288ff1;
  border-radius: 3px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 1px 2px rgba(25, 75, 133, .18);
}

.side-title {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.2);
}

.side-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
  background: rgba(255,255,255,.92);
  border-radius: 6px;
  padding: 3px;
}

.side-item,
.side-folder {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  min-height: 38px;
  padding: 0 14px;
  color: inherit;
  font-size: 14px;
  font-weight: 600;
}

.side-item.active {
  min-height: 44px;
}

.side-item::before {
  content: "";
  display: inline-block;
  border-left: 6px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-right: 10px;
}

.side-item.active {
  background: #ff3d42;
}

.muted-menu {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.side-folder {
  color: #546172;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #edf1f5;
  padding: 0 12px 0 30px;
  position: relative;
}

.side-folder::before {
  content: "";
  position: absolute;
  left: 6px;
  width: 20px;
  height: 16px;
  border: 2px solid #a8b6c8;
}

.legacy-main {
  min-width: 0;
  overflow: auto;
  background: #fff;
  padding: 0 0 28px;
}

.contest-strip,
.search-strip {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #d7d7d7;
  background: #f7f7f7;
  font-size: 12px;
  overflow-x: auto;
}

.search-strip {
  justify-content: flex-end;
  background: #fff;
}

.contest-strip label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  white-space: nowrap;
  flex: 0 0 auto;
}

.contest-strip select,
.search-strip input {
  min-height: 25px;
  height: 25px;
  width: 176px;
  padding: 2px 8px;
  border: 1px solid #c7c7c7;
  border-radius: 0;
  background: #fff;
  font-size: 12px;
  outline: 0;
}

#industryFilter { width: 250px; }
#contestFilter { width: 200px; }

.legacy-query-btn,
.legacy-export-btn {
  min-height: 26px;
  border: 1px solid #b8c5d6;
  background: linear-gradient(#fff, #e8edf4);
  color: #24364c;
  padding: 3px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.legacy-query-btn::before { content: "🔍 "; }
.legacy-export-btn::before { content: "▣ "; color: #279247; }

.legacy-table-wrap {
  width: 100%;
  overflow: auto;
}

.legacy-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  min-width: 1460px;
}

.legacy-table th,
.legacy-table td {
  border: 1px solid #e4e4e4;
  border-left: 0;
  padding: 7px 10px;
  vertical-align: middle;
  background: #fff;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legacy-table th {
  height: 30px;
  background: #efefef;
  color: #45515f;
  font-weight: 700;
  border-color: #c9c9c9;
}

.legacy-table tbody tr:nth-child(even) td { background: #fafafa; }
.legacy-table tbody tr.selected td,
.legacy-table tbody tr:hover td { background: #c7e2f4; }

.legacy-table .col-id { width: 70px; }
.legacy-table th:nth-child(2) { width: 190px; }
.legacy-table th:nth-child(3) { width: 190px; }
.legacy-table th:nth-child(4) { width: 170px; }
.legacy-table th:nth-child(5) { width: 190px; }
.legacy-table th:nth-child(6) { width: 120px; }
.legacy-table th:nth-child(7) { width: 240px; }
.legacy-table th:nth-child(8) { width: 150px; }
.legacy-table th:nth-child(9) { width: 150px; }
.legacy-table th:nth-child(10) { width: 110px; }
.user-table { min-width: 980px; }
.user-table th:nth-child(1) { width: 70px; }
.user-table th:nth-child(2) { width: 260px; }
.user-table th:nth-child(3) { width: 150px; }
.user-table th:nth-child(4) { width: 150px; }
.user-table th:nth-child(5) { width: 110px; }
.user-table th:nth-child(6) { width: 140px; }
.user-table th:nth-child(7) { width: 180px; }
.user-table th:nth-child(8) { width: 130px; }
.id-cell { color: #45515f !important; font-weight: 700; }
.row-actions { white-space: nowrap; overflow: visible !important; text-overflow: clip !important; }
.row-actions button {
  border: 0;
  background: transparent;
  color: #0471d8;
  padding: 0 3px;
  min-height: auto;
  font-size: 13px;
}

.row-actions button:hover { text-decoration: underline; }

.status-label { color: #111; }
.status-label.approved { color: #198800; font-weight: 700; }
.status-label.pending { color: #000; }
.status-label.returned { color: #bd1f1f; }
.status-label.draft { color: #6b7280; }
.empty-row { text-align: center !important; color: #667085 !important; height: 80px; }

.account-toolbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-bottom: 1px solid #d7d7d7;
}

.account-toolbar h1 {
  margin: 0;
  font-size: 18px;
  color: #26384f;
}

.account-toolbar p {
  margin: 4px 0 0;
  color: #6a7480;
  font-size: 12px;
}

.account-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.account-search input {
  width: 260px;
  min-height: 26px;
  height: 26px;
  padding: 2px 8px;
  border: 1px solid #c7c7c7;
  border-radius: 0;
  background: #fff;
  font-size: 12px;
}

.password-state {
  color: #198800;
}

.password-window {
  width: min(520px, calc(100vw - 32px));
  background: #fff;
  border: 4px solid #2a97d9;
  box-shadow: 0 14px 42px rgba(19, 31, 56, .36);
}

.password-body {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.password-body p {
  margin: 0;
  font-weight: 700;
  color: #25364c;
}

.password-body input {
  border: 1px solid #9db2c7;
  background: #fff;
}

.password-note {
  padding: 10px 12px;
  background: #eef7ff;
  border: 1px solid #b9d8ef;
  color: #4b6075;
  font-size: 13px;
}

.password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.password-actions button[type="button"] {
  min-height: 34px;
  border: 1px solid #b8c5d6;
  background: linear-gradient(#fff, #e8edf4);
  padding: 7px 16px;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(37, 47, 68, 0.18);
  display: grid;
  place-items: center;
  padding: 28px;
}

.modal-window {
  width: min(1060px, calc(100vw - 64px));
  max-height: calc(100vh - 80px);
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr) 46px;
  background: #fff;
  border: 4px solid #2a97d9;
  box-shadow: 0 14px 42px rgba(19, 31, 56, .36);
}

.modal-titlebar {
  background: #2c97d8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.modal-titlebar button {
  border: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  color: #fff;
  font-size: 20px;
  line-height: 20px;
  padding: 0;
}

.modal-body {
  overflow: auto;
  padding: 12px 28px 28px;
  background: #fff;
}

.registration-report {
  width: min(980px, 100%);
  margin: 0 auto;
  color: #000;
  font-family: "SimSun", "Microsoft YaHei", serif;
}

.registration-report h1,
.registration-report h2,
.registration-report h3 {
  margin: 10px 0;
  text-align: center;
  line-height: 1.35;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.registration-report h1 { font-size: 29px; }
.registration-report h2 { font-size: 28px; }
.registration-report h3 { font-size: 27px; }

.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.report-table th,
.report-table td {
  border: 1px solid #333;
  padding: 8px 10px;
  min-height: 34px;
  vertical-align: middle;
  text-align: center;
  background: #fff;
  word-break: break-word;
}

.report-table th {
  width: 17%;
  background: #eeeeee;
  font-weight: 700;
}

.report-table td {
  width: 33%;
}

.report-section th {
  text-align: left;
  background: #eeeeee;
  font-size: 15px;
}
.report-subtable {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}
.report-subtable th,
.report-subtable td {
  border: 1px solid #777;
  padding: 6px 7px;
  text-align: center;
  background: #fff;
}
.report-subtable th {
  background: #f3f3f3;
  font-weight: 700;
}
.file-list {
  display: grid;
  gap: 10px;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}
.file-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #b9c7d6;
  background: #f8fbff;
  padding: 8px;
  text-align: left;
}
.file-card.is-previewable {
  cursor: pointer;
}
.file-card.is-previewable:hover {
  border-color: #1f6fa8;
  background: #eef7ff;
}
.file-card.is-previewable:focus-visible {
  outline: 2px solid #1f6fa8;
  outline-offset: 2px;
}
.file-thumb {
  width: 86px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #eef3f8;
  border: 1px solid #d3dde8;
}
.file-card.is-previewable:hover .file-thumb {
  border-color: #1f6fa8;
}
.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-thumb-error::after {
  content: "预览失败";
  color: #7a8797;
  font-size: 12px;
}
.file-icon {
  width: 56px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #9db2c7;
  background: #fff;
  color: #2b5f9f;
  font-size: 12px;
  font-weight: 800;
}
.file-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.file-meta strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.file-meta span {
  color: #667085;
  font-size: 12px;
}
.file-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.file-actions button {
  min-height: 28px;
  border: 1px solid #1f6fa8;
  background: linear-gradient(#fff, #e8edf4);
  color: #1f5d9a;
  padding: 4px 8px;
  font-size: 12px;
}

.review-box {
  margin-top: 18px;
  padding: 16px;
  background: #eef7ff;
  border: 1px solid #9ecbed;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.review-box label {
  font-weight: 700;
}

.review-box textarea {
  margin-top: 8px;
  border: 1px solid #9db2c7;
  background: #fff;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #cfe3f2;
}

.modal-actions button {
  min-height: 28px;
  border: 1px solid #1f6fa8;
  background: linear-gradient(#5ab6ed, #2187cf);
  color: #fff;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .legacy-admin { height: auto; overflow: visible; }
  .legacy-header { height: auto; min-height: 58px; align-items: flex-start; flex-direction: column; gap: 8px; padding: 10px 0; }
  .legacy-brand strong { font-size: 22px; white-space: normal; }
  .legacy-userbar { padding-left: 18px; flex-wrap: wrap; }
  .legacy-shell { height: auto; grid-template-columns: 1fr; }
  .legacy-sidebar { display: grid; grid-template-columns: 1fr; }
  .contest-strip, .search-strip, .legacy-table-wrap { min-width: 0; overflow-x: auto; justify-content: flex-start; }
  .account-toolbar { align-items: stretch; flex-direction: column; }
  .account-search { flex-wrap: wrap; }
  .account-search input { width: min(260px, 100%); }
  .contest-strip, .search-strip { align-items: stretch; }
  .legacy-table { min-width: 1120px; }
  .modal-window { width: calc(100vw - 24px); max-height: calc(100vh - 32px); }
  .modal-body { padding: 10px; }
}

@media print {
  body * { visibility: hidden; }
  #detailModal, #detailModal * { visibility: visible; }
  #detailModal {
    position: static;
    display: block;
    padding: 0;
    background: #fff;
  }
  .modal-window {
    width: 100%;
    max-height: none;
    border: 0;
    box-shadow: none;
    display: block;
  }
  .modal-titlebar,
  .modal-actions,
  .review-box { display: none; }
  .modal-body { overflow: visible; padding: 0; }
}
