:root {
  --navy-950: #071b2b;
  --navy-900: #0b2538;
  --navy-800: #12364c;
  --navy-700: #1c4d68;
  --teal-600: #0d877f;
  --teal-500: #16a096;
  --teal-100: #e5f5f3;
  --gold-500: #e9a23b;
  --gold-100: #fff5df;
  --ink: #102c3d;
  --muted: #687c88;
  --line: #dfe7e9;
  --paper: #ffffff;
  --surface: #f2f6f6;
  --danger: #b34237;
  --shadow: 0 18px 48px rgba(8, 35, 52, .09);
  --shadow-soft: 0 8px 24px rgba(8, 35, 52, .06);
}

* { box-sizing: border-box; }
html { color: var(--ink); background: var(--surface); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 88% 5%, rgba(22, 160, 150, .07), transparent 24%), var(--surface); }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 20; color: #fff; background: rgba(7, 27, 43, .97); border-bottom: 1px solid rgba(120, 155, 208, .18); box-shadow: 0 10px 28px rgba(7, 27, 43, .16); backdrop-filter: blur(14px); }
.topbar-inner { width: min(1240px, 92vw); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo-shell { display: flex; align-items: center; }
.brand-logo { display: block; width: clamp(205px, 18vw, 245px); height: auto; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.system-state { display: inline-flex; align-items: center; gap: 8px; color: #bdd0da; font-size: 12px; }
.system-state i { width: 7px; height: 7px; border-radius: 50%; background: #24a475; box-shadow: 0 0 0 4px rgba(36,164,117,.11); }
.language-switch { min-height: 34px; padding: 0 13px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #f2f8fa; background: rgba(255,255,255,.06); font-size: 11px; font-weight: 800; cursor: pointer; transition: .2s ease; }
.language-switch:hover { border-color: rgba(255,255,255,.44); color: #fff; background: rgba(255,255,255,.12); }
.nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; color: #f2f8fa; background: rgba(255,255,255,.07); font-size: 12px; font-weight: 700; transition: .2s ease; }
.nav-link:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.13); }

.shell { width: min(1240px, 92vw); margin: 0 auto; padding: 42px 0 64px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 50px; margin-bottom: 28px; }
.intro-copy { max-width: 760px; }
.eyebrow, .section-kicker { margin: 0 0 11px; color: var(--teal-600); font-size: 10px; font-weight: 900; letter-spacing: .2em; }
.intro h1 { max-width: 760px; margin: 0; color: var(--navy-950); font-size: clamp(34px, 4.3vw, 58px); line-height: 1.07; letter-spacing: -.045em; }
.intro-copy > p:last-child { max-width: 680px; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.intro-stats { min-width: 315px; display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.76); box-shadow: var(--shadow-soft); }
.intro-stats div { display: grid; justify-items: center; padding: 18px 14px; }
.intro-stats div + div { border-left: 1px solid var(--line); }
.intro-stats strong { color: var(--navy-900); font-size: 23px; line-height: 1; }
.intro-stats span { margin-top: 8px; color: var(--muted); font-size: 11px; }

.route-map { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center; margin-bottom: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); }
.route-stage { min-width: 0; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; }
.route-stage.active { color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); }
.stage-no { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-100); color: var(--teal-600); font-size: 11px; font-weight: 900; }
.route-stage.active .stage-no { background: var(--gold-500); color: var(--navy-950); }
.route-stage small { display: block; margin-bottom: 2px; color: #8b9aa3; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.route-stage.active small { color: #89b2c3; }
.route-stage strong { display: block; font-size: 14px; }
.route-stage p { margin: 4px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.route-stage.active p { color: #c5d8e0; }
.route-arrow { color: #9eb0b9; font-size: 17px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(350px, .75fr); gap: 22px; align-items: start; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 2px 0 0; font-size: 23px; letter-spacing: -.02em; }
.panel-head p { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 11px; }
.required-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-500); }
.panel-body { padding: 4px 26px 26px; }
.form-section { padding: 22px 0; border-top: 1px solid #edf1f2; }
.form-section.first { border-top: 0; }
.form-section-title { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.form-section-title > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--navy-900); color: #fff; font-size: 11px; font-weight: 800; }
.form-section-title div { display: grid; gap: 2px; }
.form-section-title strong { font-size: 14px; }
.form-section-title small { color: var(--muted); font-size: 10px; }
.grid-2, .grid-3 { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { color: #435b69; font-size: 11px; font-weight: 800; }
label em { color: var(--gold-500); font-style: normal; }
input, select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d5dfe2; border-radius: 10px; background: #fbfcfc; color: var(--ink); outline: none; transition: .18s ease; }
input::placeholder { color: #a1aeb5; }
input:hover, select:hover { border-color: #b8c9ce; }
input:focus, select:focus { border-color: var(--teal-500); background: #fff; box-shadow: 0 0 0 3px rgba(22, 160, 150, .1); }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 66px; display: grid; align-content: center; gap: 5px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfc; cursor: pointer; transition: .18s ease; }
.segmented b { color: var(--navy-800); font-size: 13px; }
.segmented small { color: var(--muted); font-size: 10px; font-weight: 500; }
.segmented input:checked + span { border-color: var(--teal-500); background: var(--teal-100); box-shadow: inset 4px 0 0 var(--teal-500); }
.segmented input:checked + span b { color: var(--teal-600); }
.advanced { margin: 0 0 4px; border: 1px dashed #cbd9dc; border-radius: 11px; background: #fafcfc; }
.advanced summary { padding: 14px 16px; color: var(--navy-700); font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary span { margin-right: 7px; color: var(--teal-500); }
.advanced summary small { margin-left: 8px; color: var(--muted); font-weight: 500; }
.advanced summary b { font-size: inherit; }
.advanced-grid { padding: 0 16px 16px; }
.check-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 12px; border-radius: 9px; background: #fff; }
.check-row input { width: 15px; min-height: auto; }
.btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; transition: .2s ease; }
.btn-primary { color: #fff; background: var(--teal-600); }
.btn-primary:hover { background: #08726c; transform: translateY(-1px); }
.btn-secondary { color: var(--navy-800); background: #e8eff1; }
.btn-secondary:hover { background: #dce7ea; }
.btn-danger { color: #fff; background: var(--danger); }
.quote-button { width: 100%; margin-top: 22px; display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 19px 0 22px; }
.quote-button b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.15); }
.export-full-button { width: 100%; margin-top: 9px; display: flex; align-items: center; justify-content: space-between; }
.export-full-button b, .btn-export-current b { font-size: 16px; }
.btn-export-current { width: calc(100% - 44px); margin: 0 22px 22px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #b9d9d5; color: var(--teal-600); background: var(--teal-100); }
.btn-export-current:hover { border-color: var(--teal-500); background: #d7efec; }
.btn:disabled { cursor: wait; opacity: .6; transform: none; }
.status { min-height: 18px; margin-top: 9px; color: var(--danger); font-size: 11px; }

.result-wrap { position: sticky; top: 90px; display: grid; gap: 14px; }
.result-topline { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.09); color: #bdd0d9; background: var(--navy-950); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.result-topline i { padding: 5px 8px; border-radius: 999px; color: #aee5d7; background: rgba(63,195,148,.1); font-size: 9px; font-style: normal; letter-spacing: 0; }
.price-box { padding: 28px 24px 26px; color: #fff; background: linear-gradient(145deg, var(--navy-900), #125a66); }
.price-label { color: #a9c3cd; font-size: 11px; }
.price { margin: 8px 0 4px; font-size: clamp(38px, 4.4vw, 58px); font-weight: 880; letter-spacing: -.055em; white-space: nowrap; }
.price-unit { color: #d1e1e5; font-size: 12px; }
.result-list { display: grid; padding: 7px 22px 14px; }
.result-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.result-row span:first-child { color: var(--muted); }
.result-row strong { text-align: right; }
.notice { margin: 0 22px 22px; padding: 12px 14px; border-left: 3px solid var(--gold-500); border-radius: 6px 9px 9px 6px; background: var(--gold-100); color: #775727; font-size: 10px; line-height: 1.65; }
.empty { min-height: 300px; display: grid; align-content: center; justify-items: center; padding: 40px 28px; text-align: center; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid #c9e7e3; border-radius: 18px; color: var(--teal-600); background: var(--teal-100); font-size: 25px; font-weight: 800; }
.empty strong { font-size: 15px; }
.empty p { max-width: 260px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.scope-note { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--line); box-shadow: var(--shadow-soft); }
.scope-note > div { display: grid; grid-template-columns: 42px 1fr; gap: 11px; align-items: start; padding: 13px 15px; background: rgba(255,255,255,.94); }
.scope-note span { padding: 4px 6px; border-radius: 5px; color: var(--teal-600); background: var(--teal-100); font-size: 9px; font-weight: 900; text-align: center; }
.scope-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.scope-note strong { color: var(--ink); }

footer { width: min(1240px, 92vw); margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
footer span { color: var(--navy-800); font-weight: 900; }
footer p { margin: 0; }

html[lang="en"] .intro-copy { max-width: 830px; }
html[lang="en"] .intro h1 { max-width: 830px; font-size: clamp(34px, 4vw, 54px); letter-spacing: -.035em; }
html[lang="en"] .route-stage strong { font-size: 13px; }
html[lang="en"] .segmented span { min-height: 76px; }
html[lang="en"] .field label { line-height: 1.35; }

.login-layout { width: min(1060px, 92vw); min-height: calc(100vh - 68px); margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: center; padding: 60px 0; }
.login-intro h1 { margin: 0; color: var(--navy-950); font-size: clamp(38px, 5vw, 62px); line-height: 1.08; letter-spacing: -.05em; }
.login-intro > p:nth-of-type(2) { max-width: 550px; margin: 20px 0 0; color: var(--muted); line-height: 1.8; }
.login-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 28px; }
.login-points span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy-700); background: rgba(255,255,255,.8); font-size: 11px; font-weight: 700; }
.login-card { padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.lock-mark { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 12px; color: var(--gold-500); background: var(--navy-950); }
.login-card h2 { margin: 0; font-size: 25px; }
.login-card > p:not(.section-kicker) { margin: 10px 0 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-card .btn { width: 100%; margin-top: 17px; display: flex; align-items: center; justify-content: space-between; }

.admin-shell { width: min(1280px, 94vw); margin: 0 auto; padding: 40px 0 70px; }
.admin-hero { display: flex; justify-content: space-between; align-items: end; gap: 26px; margin-bottom: 20px; }
.admin-hero h1 { margin: 0; color: var(--navy-950); font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; }
.admin-hero p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar .btn { min-height: 40px; font-size: 11px; }
.toolbar .btn-primary { margin: 0; width: auto; }
.admin-tip { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 16px; border: 1px solid #eedcaf; border-radius: 12px; background: var(--gold-100); }
.admin-tip > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--gold-500); font-size: 11px; font-weight: 900; }
.admin-tip p { margin: 0; color: #785b2d; font-size: 11px; }
.admin-tip strong { margin-right: 8px; color: #5b431e; }
.parameter-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.param-card { padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); }
.param-card h2 { margin: 0 0 17px; padding-bottom: 13px; border-bottom: 1px solid var(--line); font-size: 15px; }
.param-description { margin: -7px 0 17px; padding: 10px 12px; border-left: 3px solid var(--teal-500); border-radius: 5px 8px 8px 5px; color: #536d7a; background: #f3faf9; font-size: 10px; line-height: 1.7; }
.param-grid { display: grid; grid-template-columns: 1fr 145px; gap: 10px 13px; align-items: center; }
.param-grid label { font-weight: 650; }
.param-grid input { min-height: 38px; border-color: #ead79b; background: #fff9e7; color: #075996; font-size: 12px; text-align: right; }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 13px 17px; border-radius: 10px; color: #fff; background: var(--navy-900); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: none; }
.meta { color: var(--muted); font-size: 10px; }

@media (max-width: 980px) {
  .intro { align-items: start; flex-direction: column; gap: 24px; }
  .intro-stats { width: 100%; }
  .workspace { grid-template-columns: 1fr; }
  .result-wrap { position: static; }
  .route-map { grid-template-columns: 1fr; }
  .route-arrow { display: none; }
  .login-layout { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 700px) {
  .topbar-inner { width: calc(100% - 32px); }
  .system-state { display: none; }
  .top-actions { gap: 8px; }
  .shell { width: calc(100% - 28px); padding-top: 28px; }
  .intro h1 { font-size: 36px; }
  .intro-copy > p:last-child { font-size: 13px; }
  .intro-stats strong { font-size: 20px; }
  .route-map { padding: 10px; }
  .grid-2, .grid-3, .parameter-sections { grid-template-columns: 1fr; }
  .field.full, .check-row { grid-column: auto; }
  .panel-head { align-items: start; }
  .panel-head, .panel-body { padding-left: 18px; padding-right: 18px; }
  .segmented { grid-template-columns: 1fr; }
  .price { font-size: 43px; }
  footer { align-items: start; flex-direction: column; }
  .admin-hero { align-items: start; flex-direction: column; }
  .param-grid { grid-template-columns: 1fr; }
  .login-layout { width: calc(100% - 28px); padding: 34px 0; }
  .login-intro h1 { font-size: 40px; }
  .brand-logo { width: 180px; }
}

@media (max-width: 430px) {
  .brand-logo { width: 142px; }
  .nav-link { padding: 8px 10px; }
  .intro-stats div { padding: 15px 8px; }
  .intro-stats span { font-size: 9px; }
  .route-stage p { white-space: normal; }
  .panel-head p { display: none; }
}
