/* DzScript 训练平台 —— 科技感深色主题 */
:root {
  --bg: #070b14;
  --panel: rgba(16, 24, 42, .82);
  --panel-solid: #101a2c;
  --line: rgba(64, 156, 255, .18);
  --line-strong: rgba(64, 156, 255, .45);
  --text: #d7e3f4;
  --muted: #7a8ba5;
  --accent: #3da5ff;
  --accent2: #22e0c0;
  --warn: #ffb020;
  --err: #ff5470;
  --ok: #35d07f;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); overflow-x: hidden;
}
#bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(61,165,255,.14), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(34,224,192,.10), transparent 60%),
    url("assets/bg.jpg") center / cover no-repeat,
    var(--bg);
}
#bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,11,20,.55), rgba(7,11,20,.9));
}

/* ---- 顶栏 ---- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 22px; border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 30, .75); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.brand { font-size: 18px; font-weight: 700; cursor: pointer; letter-spacing: 1px; }
.brand .logo { color: var(--accent); text-shadow: 0 0 12px var(--accent); }
.brand .thin { font-weight: 300; color: var(--muted); }
.top-right { display: flex; gap: 10px; align-items: center; }
.chip {
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; background: rgba(61,165,255,.06);
}

main { max-width: 1280px; margin: 0 auto; padding: 22px; }

/* ---- 通用 ---- */
.btn {
  border: 1px solid var(--line-strong); background: rgba(61,165,255,.12);
  color: var(--text); border-radius: 8px; padding: 8px 16px; cursor: pointer;
  font-size: 14px; transition: .15s;
}
.btn:hover { background: rgba(61,165,255,.25); box-shadow: 0 0 14px rgba(61,165,255,.25); }
.btn.primary { background: linear-gradient(135deg, #2b7fff, #22c8e0); border: none; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.15); }
.btn.danger { border-color: rgba(255,84,112,.5); background: rgba(255,84,112,.12); }
.btn.danger:hover { background: rgba(255,84,112,.3); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
input, select, textarea {
  background: rgba(8,14,26,.9); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 10px; font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--line-strong); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; backdrop-filter: blur(8px);
}
.grid { display: grid; gap: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
h2 { font-size: 20px; margin-bottom: 4px; }
h3 { font-size: 15px; color: var(--accent); margin-bottom: 10px; }

.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--accent); }
.tag.t-detect { color: #3da5ff; border-color: rgba(61,165,255,.5); }
.tag.t-classify { color: #22e0c0; border-color: rgba(34,224,192,.5); }
.tag.t-locate { color: #ffb020; border-color: rgba(255,176,32,.5); }
.tag.t-match { color: #b06cff; border-color: rgba(176,108,255,.5); }
.tag.t-ocr_det { color: #ff7a45; border-color: rgba(255,122,69,.5); }
.tag.t-ocr_rec { color: #5ad4e6; border-color: rgba(90,212,230,.5); }

/* ---- 项目列表 ---- */
.proj-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.proj-card { cursor: pointer; position: relative; transition: .15s; }
.proj-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.proj-card h4 { font-size: 16px; margin-bottom: 8px; }
.quota-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin: 10px 0 4px; overflow: hidden; }
.quota-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; }

/* ---- 弹窗 ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4,8,16,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 22px; min-width: 420px; max-width: 720px;
  max-height: 86vh; overflow: auto; box-shadow: 0 0 40px rgba(61,165,255,.15);
}
.modal h3 { margin-bottom: 14px; font-size: 17px; color: var(--text); }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 13px; color: var(--muted); }

#toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: rgba(16,26,44,.95); border: 1px solid var(--line-strong);
  padding: 10px 22px; border-radius: 10px; font-size: 14px; z-index: 200;
  opacity: 0; pointer-events: none; transition: .25s; max-width: 80vw;
}
#toast.show { opacity: 1; }

/* ---- 项目页布局 ---- */
.proj-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.proj-tabs .tab {
  padding: 9px 20px; cursor: pointer; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent;
}
.proj-tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- 样本网格 ---- */
.sample-view-toggle { display: inline-flex; gap: 4px; }
.sample-view-toggle .btn.active { border-color: var(--accent); background: rgba(61,165,255,.12); }
.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  align-items: start;
}
.sample-grid.view-text { display: flex; flex-direction: column; gap: 4px; }
.sample-text-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #0a1220;
  font-size: 13px;
}
.sample-text-item:hover { border-color: var(--accent); }
.sample-text-item .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample-text-item .st-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sample-text-item .meta { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.sample-text-cls {
  flex-shrink: 0; max-width: 120px; font-size: 11px; padding: 2px 8px; border-radius: 4px;
  color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sample-text-cls.neg { background: #666; }
.sample-cell {
  position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  cursor: pointer; background: #0a1220; display: flex; flex-direction: column;
  transition: border-color .15s, transform .15s;
}
.sample-cell:hover { border-color: var(--accent); transform: translateY(-1px); }
.sample-thumb {
  /* 按样本真实宽高比铺开（极端比例会钳制），混尺寸图不再被裁成方块或留大片空边 */
  position: relative; width: 100%; aspect-ratio: var(--ar, 1);
  flex-shrink: 0; background: #070d18; overflow: hidden;
}
.sample-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.sample-thumb img:not([src]) { opacity: 0; }
.sample-cell .badge {
  position: absolute; top: 4px; right: 4px; font-size: 10px; padding: 1px 6px;
  border-radius: 4px; background: rgba(0,0,0,.65); z-index: 2;
}
.sample-cell .st { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; z-index: 2; }
.st.labeled { background: var(--ok); } .st.unlabeled { background: var(--muted); } .st.skipped { background: var(--warn); }
.sample-foot {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px;
  font-size: 10px; line-height: 1.3; border-top: 1px solid var(--line);
  background: #0d1524; min-height: 26px;
}
.sample-foot .sample-fname {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted);
}
.sample-foot .sample-dim {
  flex-shrink: 0; color: var(--muted); opacity: .8; font-variant-numeric: tabular-nums;
}
.sample-foot .sample-foot-cls {
  flex-shrink: 0; max-width: 72px; padding: 1px 5px; border-radius: 3px;
  color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.anno-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
}
.anno-overlay .ab {
  position: absolute; border: 1.5px solid #3da5ff; box-sizing: border-box;
  border-radius: 1px;
}
.anno-overlay.svg-quad {
  width: 100%; height: 100%; display: block;
}
.anno-overlay.svg-quad polygon {
  fill: rgba(255,122,69,.18); stroke: #ff7a45; stroke-width: 0.008;
}
.sample-cls-bar {
  font-size: 11px; line-height: 1.35; padding: 4px 6px; text-align: center;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 0;
}
.sample-cls-bar.neg { background: #5a6478; }

/* ---- 标记器 ---- */
.anno-wrap { display: grid; grid-template-columns: 148px 1fr 280px; gap: 12px; align-items: start; }
.anno-list {
  max-height: 78vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(6,10,18,.6); padding: 6px;
}
.anno-list-head {
  position: sticky; top: 0; z-index: 2; background: #0a101c; padding: 6px 4px 8px;
  font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.anno-list-item {
  position: relative; border: 2px solid transparent; border-radius: 8px; margin-bottom: 6px;
  cursor: pointer; overflow: hidden; background: #060a12;
}
.anno-list-item:hover { border-color: rgba(61,165,255,.35); }
.anno-list-item.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(61,165,255,.35); }
.anno-list-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #111; }
.anno-list-item .st {
  position: absolute; right: 4px; bottom: 4px; width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.4);
}
.anno-list-item .badge {
  position: absolute; left: 4px; top: 4px; font-size: 10px; padding: 1px 4px;
  border-radius: 4px; background: rgba(0,0,0,.65); color: #fff;
}
.anno-list-item .idx {
  position: absolute; left: 4px; bottom: 4px; font-size: 10px; color: #fff;
  background: rgba(0,0,0,.55); padding: 0 4px; border-radius: 3px;
}
.anno-list-item.text-mode {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 32px;
}
.anno-list-item.text-mode img { display: none; }
.anno-list-item.text-mode .idx { position: static; background: transparent; color: var(--muted); padding: 0; flex-shrink: 0; }
.anno-list-item.text-mode .fname {
  flex: 1; min-width: 0; font-size: 11px; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.anno-list-item.text-mode .badge { position: static; font-size: 9px; padding: 0 3px; flex-shrink: 0; }
.anno-list-item.text-mode .st { position: static; flex-shrink: 0; }
.anno-list.view-text { width: 200px; }
.anno-wrap.list-text { grid-template-columns: 200px 1fr 280px; }
.anno-center { min-width: 0; }
.anno-ctx {
  position: fixed; z-index: 9999; min-width: 140px;
  background: #121a28; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45); padding: 4px; display: flex; flex-direction: column;
}
.anno-ctx button {
  all: unset; cursor: pointer; padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text);
}
.anno-ctx button:hover { background: rgba(61,165,255,.15); }
.anno-ctx button.danger { color: var(--err); }
.anno-ctx button.danger:hover { background: rgba(255,84,112,.12); }

.upload-progress-wrap { margin-top: 12px; }
.upload-progress-wrap .bar {
  height: 12px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden;
}
.upload-progress-wrap .bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .15s;
}
.upload-progress-wrap .meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.anno-stage { position: relative; background: #060a12; border: 1px solid var(--line); border-radius: 10px; overflow: auto; min-height: 480px; max-height: 74vh; display:flex; align-items:flex-start; justify-content:center; }
#annoCanvas { max-width: none; max-height: none; cursor: crosshair; display: block; }
.anno-side { display: flex; flex-direction: column; gap: 12px; }
.anno-side .card { padding: 12px; }
.hotkey-bar { font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hotkey-bar b { color: var(--text); background: rgba(255,255,255,.1); border-radius: 4px; padding: 0 6px; }
.cls-btn { display: block; width: 100%; text-align: left; margin-bottom: 6px; }
.cls-btn.active { background: linear-gradient(135deg,#2b7fff33,#22c8e033); border-color: var(--accent); }
.label-pick-list {
  display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: rgba(0,0,0,.2);
}
.label-pick-item {
  all: unset; cursor: pointer; display: block; padding: 8px 10px; border-radius: 6px;
  font-size: 13px; color: var(--text); border: 1px solid transparent;
}
.label-pick-item:hover { background: rgba(61,165,255,.12); }
.label-pick-item.sel { border-color: var(--accent); background: rgba(61,165,255,.18); }
.gif-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gif-bar input[type=range] { flex: 1; padding: 0; }
.box-item { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 4px; font-size: 12px; cursor: pointer; }
.box-item.sel { border-color: var(--accent); background: rgba(61,165,255,.12); }

/* ---- 训练页 ---- */
.train-grid { grid-template-columns: 340px 1fr; }
.param-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.param-row label { width: 130px; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.param-row input, .param-row select { flex: 1; min-width: 0; }
.qmark {
  display: inline-flex; width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid var(--muted); color: var(--muted); font-size: 11px;
  align-items: center; justify-content: center; cursor: help; flex-shrink: 0;
}
.qmark:hover { color: var(--accent); border-color: var(--accent); }
.machine-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
}
.machine-item.sel { border-color: var(--accent); background: rgba(61,165,255,.08); box-shadow: 0 0 12px rgba(61,165,255,.15); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.online { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.busy { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.offline { background: #555; }

/* ---- 任务监控 ---- */
.stage-flow { display: flex; gap: 4px; margin: 10px 0; flex-wrap: wrap; }
.stage-step {
  padding: 5px 12px; font-size: 12px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted);
}
.stage-step.act { color: #fff; border-color: var(--accent); background: rgba(61,165,255,.2); animation: pulse 1.6s infinite; }
.stage-step.done { color: var(--ok); border-color: rgba(53,208,127,.4); }
@keyframes pulse { 50% { box-shadow: 0 0 14px rgba(61,165,255,.5); } }
.hw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.hw-cell { border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.hw-cell .v { font-size: 20px; font-weight: 700; color: var(--accent2); }
.hw-cell .k { font-size: 11px; color: var(--muted); margin-top: 2px; }
.metric-canvas { width: 100%; height: 180px; background: rgba(6,10,18,.6); border-radius: 8px; }
.log-box {
  background: #04070d; border: 1px solid var(--line); border-radius: 8px;
  font-family: Consolas, monospace; font-size: 12px; padding: 10px;
  height: 160px; overflow-y: auto; white-space: pre-wrap;
}
.plot-strip { display: flex; gap: 10px; overflow-x: auto; }
.plot-strip img { height: 160px; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.progress-lg { height: 10px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-lg > div { height: 100%; background: linear-gradient(90deg,var(--accent),var(--accent2)); transition: width .4s; }

/* ---- 产物 ---- */
.artifact-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }

.guide-box { line-height: 1.9; font-size: 14px; }
.guide-box li { margin-left: 20px; margin-bottom: 6px; }

/* ---- 拖拽上传 ---- */
#sampleDropZone { position: relative; transition: border-color .15s, box-shadow .15s; }
#sampleDropZone.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61,165,255,.35), inset 0 0 40px rgba(61,165,255,.08);
}
.drop-hint {
  margin-top: 8px; padding: 10px; text-align: center; font-size: 12px;
  border: 1px dashed var(--line); border-radius: 8px;
}

/* ---- 匹配标记器 ---- */
.match-anno {
  display: grid; grid-template-columns: 260px 1fr; gap: 12px; min-height: 70vh;
}
.match-folders { max-height: 78vh; overflow: auto; }
.match-folder-list { display: flex; flex-direction: column; gap: 8px; }
.match-folder {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: .15s;
}
.match-folder:hover { border-color: var(--line-strong); }
.match-folder.active {
  border-color: var(--accent); background: rgba(61,165,255,.12);
  box-shadow: 0 0 0 1px rgba(61,165,255,.35);
}
.match-folder-icon {
  width: 48px; height: 48px; border-radius: 8px; overflow: hidden;
  background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.match-folder-icon img { width: 100%; height: 100%; object-fit: cover; }
.folder-emoji { font-size: 22px; }
.match-folder-meta .name { font-weight: 600; font-size: 14px; }
.match-loose { max-height: 78vh; overflow: auto; }
.match-loose-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px;
}
.match-loose-item {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: rgba(0,0,0,.25); position: relative;
  transition: transform .15s, opacity .15s;
}
.match-loose-item:hover { border-color: var(--accent); transform: scale(1.03); }
.match-loose-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.match-loose-item.placeholder {
  border-style: dashed; background: transparent; pointer-events: none; opacity: .35;
}
.match-loose-item.sucked { animation: none; }
.match-suck-ghost {
  position: fixed; z-index: 300; pointer-events: none; border-radius: 8px; overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.match-folder-preview {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  max-height: 220px; overflow: auto;
}

/* ---- 管理页机器看板 ---- */
.admin-machine-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px;
}
.admin-machine-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: rgba(0,0,0,.18);
}
.admin-machine-card.busy { border-color: rgba(255,176,32,.45); }
.admin-machine-card.offline { opacity: .72; }
.admin-machine-head {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px;
}
.admin-machine-head .meta { flex: 1; min-width: 0; }
.admin-machine-head .rev { text-align: right; white-space: nowrap; }
.admin-hw-mini {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0;
}
.admin-hw-mini .cell {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; text-align: center;
}
.admin-hw-mini .cell .v { font-size: 14px; font-weight: 700; color: var(--accent2); }
.admin-hw-mini .cell .k { font-size: 10px; color: var(--muted); }
.admin-job-chip, .admin-queue-item {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--line); background: rgba(255,255,255,.03);
  border-radius: 8px; padding: 8px 10px; margin-top: 6px; cursor: pointer;
  color: inherit; font: inherit;
}
.admin-job-chip:hover, .admin-queue-item:hover {
  border-color: var(--accent); background: rgba(61,165,255,.08);
}
.admin-queue-list { max-height: 180px; overflow: auto; margin-top: 4px; }
.admin-bar {
  height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 4px;
}
.admin-bar > i { display: block; height: 100%; background: var(--accent); width: 0%; }

/* ---- 登录 / 注册 ---- */
.auth-card {
  max-width: 420px; margin: 64px auto; padding: 28px 26px;
}
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-mark {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, #2b7fff, #22c8e0);
  box-shadow: 0 0 20px rgba(61,165,255,.35);
}
.auth-brand h2 { margin-bottom: 6px; }
.auth-form .form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.auth-form .form-row > input { width: 100%; }
.captcha-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.captcha-img {
  width: 120px; height: 40px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); background: #1a1d24; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.captcha-img svg { display: block; width: 120px; height: 40px; }
.captcha-row input { flex: 1; min-width: 100px; }
.auth-msg {
  color: var(--err); font-size: 13px; line-height: 1.5;
  margin: 4px 0 10px; padding: 8px 10px;
  border: 1px solid rgba(255,84,112,.35); border-radius: 8px;
  background: rgba(255,84,112,.08);
}
.auth-foot { text-align: center; margin-top: 16px; font-size: 13px; }
.auth-foot a { color: var(--accent); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .match-anno { grid-template-columns: 1fr; }
  .anno-wrap, .train-grid { grid-template-columns: 1fr; }
  .anno-list { max-height: 160px; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; }
  .anno-list-item { flex: 0 0 88px; margin-bottom: 0; }
}
