:root {
  --bg: #070a0f; --panel: #0d131b; --line: rgba(255,255,255,.09);
  --text: #ece7db; --muted: #828b88; --gold: #d4b475; --gold2: #f0d79c;
  --green: #77d36d; --red: #e15d5d; --mono: "Cascadia Mono", Consolas, monospace;
  --sans: "Inter", "Microsoft YaHei", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background:
    radial-gradient(900px 560px at 35% 0%, rgba(57, 72, 55, .22), transparent 65%),
    radial-gradient(700px 500px at 100% 100%, rgba(51, 70, 93, .14), transparent 70%),
    var(--bg);
  color: var(--text); font: 13px/1.45 var(--sans); -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.import-app { min-height: 100dvh; display: flex; flex-direction: column; }
.import-top {
  height: 70px; flex: 0 0 70px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 34px; border-bottom: 1px solid rgba(212,180,117,.16);
  background: linear-gradient(180deg, rgba(16,22,30,.98), rgba(8,12,17,.96));
}
.import-brand { display: flex; align-items: center; gap: 12px; }
.import-mark { width: 34px; height: 34px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(212,180,117,.28)); }
.import-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; }
.import-mark svg path:last-child { fill: currentColor; stroke: none; }
.import-kicker { font: 700 8px/1 var(--sans); letter-spacing: .18em; color: #868e89; }
.import-name { margin-top: 3px; font-size: 15px; font-weight: 650; color: #f1eadc; }
.import-status-dot { display: flex; align-items: center; gap: 7px; color: #aeb6b0; font: 8px/1 var(--mono); letter-spacing: .12em; }
.import-status-dot i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(119,211,109,.7); }
.import-main {
  flex: 1; width: min(1220px, calc(100% - 48px)); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.8fr);
  gap: 36px; padding: 48px 0 38px;
}
.import-hero { min-width: 0; }
.hero-kicker { font: 700 8px/1 var(--sans); letter-spacing: .2em; color: #7e8884; }
.import-hero h1 { margin: 12px 0 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; letter-spacing: -.035em; font-weight: 680; color: #f0e9db; }
.import-hero h1 span { color: #b9b19f; font-weight: 440; }
.import-hero > p { max-width: 660px; margin: 18px 0 0; color: #8d9692; font-size: 12px; line-height: 1.7; }
.import-form { margin-top: 26px; max-width: 760px; }
.import-form label { display: block; font: 700 8px/1 var(--sans); letter-spacing: .14em; color: #7a8481; text-transform: uppercase; margin-bottom: 7px; }
.url-row { display: flex; gap: 7px; }
#wclUrl {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.13); border-radius: 3px;
  background: #090e14; color: #e4ddcf; font: 11px/1 var(--mono); outline: 0;
}
#wclUrl:focus { border-color: rgba(212,180,117,.55); box-shadow: 0 0 0 3px rgba(212,180,117,.07); }
#importBtn {
  height: 46px; min-width: 126px; padding: 0 14px; border: 1px solid #d8ba7c; border-radius: 3px;
  background: linear-gradient(180deg, #ead6a4, #c9a65f); color: #16190f;
  font-size: 11px; font-weight: 700; cursor: pointer; transition: filter .15s, transform .15s;
}
#importBtn:hover { filter: brightness(1.06); transform: translateY(-1px); }
#importBtn:disabled { opacity: .55; cursor: wait; transform: none; }
#importBtn span { margin-left: 7px; font-size: 14px; }
.form-hint { margin-top: 6px; color: #687370; font-size: 8.5px; }
.form-hint .mono { color: #9a917d; }
.job-box {
  margin-top: 24px; max-width: 760px; padding: 13px;
  border: 1px solid rgba(212,180,117,.2); border-radius: 4px;
  background: linear-gradient(180deg, rgba(18,25,34,.9), rgba(9,14,20,.94));
}
.job-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.job-kicker { font: 700 7.5px/1 var(--sans); letter-spacing: .17em; color: #8c8370; }
.job-title { margin-top: 3px; font-size: 13px; font-weight: 620; color: #eee7d8; }
.job-percent { color: var(--gold2); font-size: 12px; }
.job-track { height: 3px; margin-top: 11px; background: rgba(255,255,255,.08); overflow: hidden; }
#jobFill { height: 100%; width: 0; background: linear-gradient(90deg, #9c7a45, #f0d79c); box-shadow: 0 0 9px rgba(240,215,156,.35); transition: width .25s; }
.job-steps { display: flex; gap: 5px; margin-top: 10px; flex-wrap: wrap; }
.job-step { padding: 3px 6px; border: 1px solid rgba(255,255,255,.08); border-radius: 2px; color: #65706d; font-size: 8px; }
.job-step.done { color: #9ac78f; border-color: rgba(119,211,109,.2); }
.job-step.active { color: var(--gold2); border-color: rgba(212,180,117,.35); background: rgba(212,180,117,.07); }
.job-message { margin-top: 8px; color: #7f8985; font-size: 9px; min-height: 13px; }
.job-error { margin-top: 8px; padding: 7px 8px; border: 1px solid rgba(225,93,93,.3); background: rgba(225,93,93,.08); color: #e5a09a; font-size: 9.5px; white-space: pre-wrap; }
.local-import {
  margin-top: 28px; max-width: 760px; padding: 15px;
  border: 1px solid rgba(212,180,117,.22); border-radius: 4px;
  background: linear-gradient(180deg, rgba(18,25,34,.86), rgba(9,14,20,.92));
}
.local-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.local-head h2 { margin: 5px 0 0; font-size: 20px; font-weight: 650; color: #eee7d8; }
.local-badge { font: 8px/1 var(--mono); color: #9ac78f; border: 1px solid rgba(119,211,109,.22); padding: 4px 6px; border-radius: 2px; }
.local-desc { margin: 9px 0 0; color: #7f8985; font-size: 9.5px; line-height: 1.6; }
.local-drop {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 12px; padding: 18px 14px; border: 1px dashed rgba(212,180,117,.35);
  border-radius: 4px; background: rgba(212,180,117,.035); color: #858f8a; font-size: 9.5px;
  transition: border-color .15s, background .15s;
}
.local-drop.dragging { border-color: rgba(240,215,156,.8); background: rgba(212,180,117,.12); }
.local-drop b { color: #b9ad91; font-weight: 600; }
#localChooseBtn {
  height: 32px; padding: 0 12px; border: 1px solid rgba(212,180,117,.45);
  border-radius: 3px; background: rgba(212,180,117,.1); color: #dfc48b;
  font-size: 9.5px; font-weight: 650; cursor: pointer;
}
.local-path-row { display: flex; gap: 7px; margin-top: 8px; }
#localPath {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px;
  border: 1px solid rgba(255,255,255,.13); border-radius: 3px;
  background: #090e14; color: #e4ddcf; font: 9px/1 var(--mono); outline: 0;
}
#localPath:focus { border-color: rgba(212,180,117,.55); }
#localScanBtn {
  height: 38px; padding: 0 12px; border: 1px solid rgba(212,180,117,.5); border-radius: 3px;
  background: rgba(212,180,117,.1); color: #e4cb91; font-size: 9.5px; font-weight: 650; cursor: pointer;
}
#localScanBtn:disabled { opacity: .5; cursor: wait; }
.local-status { margin-top: 9px; color: #9aa49f; font-size: 9px; white-space: pre-wrap; }
.local-status.error { color: #e5a09a; }
.local-runs { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.local-run {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 3px; background: rgba(255,255,255,.02);
}
.local-run-main { min-width: 0; }
.local-run-title { color: #d8d0bf; font-size: 10.5px; font-weight: 600; }
.local-run-meta { margin-top: 3px; color: #78827e; font: 8px/1.4 var(--mono); }
.local-run-bosses { margin-top: 3px; color: #8f875f; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.local-build-btn {
  flex: 0 0 auto; height: 30px; padding: 0 9px; border: 1px solid rgba(212,180,117,.4);
  border-radius: 2px; background: rgba(212,180,117,.08); color: #d9c28d; font-size: 9px; cursor: pointer;
}
.local-build-btn:disabled { opacity: .5; cursor: wait; }
.import-side { display: flex; flex-direction: column; gap: 10px; }
.side-card { padding: 13px; border: 1px solid var(--line); border-radius: 3px; background: rgba(13,19,27,.7); }
.side-kicker { font: 700 8px/1 var(--sans); letter-spacing: .16em; color: #7e8883; margin-bottom: 9px; }
.side-card ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.side-card li { display: grid; grid-template-columns: 18px 1fr; gap: 7px; font-size: 9.5px; }
.side-card li::before { content: counter(list-item, decimal-leading-zero); color: var(--gold); font: 8px/1.5 var(--mono); grid-row: 1 / 3; }
.side-card li b { color: #cfc8b9; font-weight: 550; }
.side-card li span { color: #79837f; font-size: 8.5px; }
.side-stat { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 9px; color: #7b8581; }
.side-stat:last-child { border-bottom: 0; }
.side-stat b { color: #bdb6a7; font-weight: 500; }
.publish-card { border-color: rgba(212,180,117,.28); background: linear-gradient(180deg, rgba(212,180,117,.07), rgba(13,19,27,.75)); }
.publish-desc { margin: 0 0 10px; color: #8a948f; font-size: 9px; line-height: 1.6; }
#publishBtn {
  width: 100%; height: 34px; border: 1px solid rgba(212,180,117,.5); border-radius: 3px;
  background: rgba(212,180,117,.14); color: #e4cb91; font-size: 10px; font-weight: 650; cursor: pointer;
}
#publishBtn:hover { background: rgba(212,180,117,.22); }
#publishBtn:disabled { opacity: .5; cursor: wait; }
.publish-status { margin-top: 9px; color: #9aa49f; font-size: 8.5px; line-height: 1.5; word-break: break-all; }
.publish-status.error { color: #e5a09a; }
.publish-status a { color: #dfc48b; text-decoration: underline; }
.publish-copy { margin-left: 4px; padding: 0; border: 0; background: none; color: #b9ad91; font-size: 8px; cursor: pointer; text-decoration: underline; }
.report-list { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow: auto; }
.report-item { display: block; padding: 7px 8px; border: 1px solid rgba(255,255,255,.07); border-radius: 2px; background: rgba(255,255,255,.018); }
.report-item:hover { border-color: rgba(212,180,117,.3); background: rgba(212,180,117,.05); }
.report-title { font-size: 9.5px; color: #d4cdbd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-meta { margin-top: 2px; font: 8px/1 var(--mono); color: #737e7a; display: flex; justify-content: space-between; gap: 8px; }
.empty { padding: 12px 0; color: #65706d; font-size: 9px; }
.import-foot { flex: 0 0 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; border-top: 1px solid rgba(255,255,255,.06); color: #616c68; font-size: 8px; }
.import-foot a { color: #b8a77f; }
@media (max-width: 900px) {
  .import-main { grid-template-columns: 1fr; width: calc(100% - 28px); padding-top: 30px; gap: 22px; }
  .import-top, .import-foot { padding-left: 16px; padding-right: 16px; }
  .import-hero h1 { font-size: 34px; }
}
