﻿/* Neo-Brutalist Soft锛氱洿瑙掋€?px 娣辩伆纭竟銆佸崐閫忔槑纭槾褰便€乭over 闃村奖娑堝け鍔犱綅绉汇€?   閰嶈壊涓烘煍鍜岄┈鍗￠緳锛涙枃瀛楀姣斿害鍧囪揪 WCAG AA锛堣 docs/楠屾敹璁板綍.md锛夈€?*/

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-soft: #4b5563;
  --line: #d4d4d4;

  --pink: #f472b6;
  --pink-soft: #fce7f3;
  --lime: #a3e635;
  --lime-soft: #ecfccb;
  --sky: #38bdf8;
  --sky-soft: #e0f2fe;
  --amber: #fbbf24;
  --amber-soft: #fef3c7;
  --emerald-ink: #047857;
  --emerald-soft: #d1fae5;
  --rose-ink: #be123c;
  --rose-soft: #ffe4e6;
  --slate-ink: #0369a1;
  --olive-ink: #4d7c0f;

  --hard-1: 3px 3px 0 rgba(0, 0, 0, 0.15);
  --hard-2: 4px 4px 0 rgba(0, 0, 0, 0.2);
  --hard-3: 6px 6px 0 rgba(0, 0, 0, 0.2);
  --hard-focus: 4px 4px 0 rgba(56, 189, 248, 0.3);

  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Sarasa Mono SC", "Noto Sans Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100dvh;
}

h1, h2, h3, .brand, .btn, .step, summary, .skip-link {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pink);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* 鈹€鈹€ 甯冨眬锛氭闈晶鏍忥紝绐勫睆椤舵爮 鈹€鈹€ */
.layout { display: flex; min-height: 100dvh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  padding: 24px 16px 32px;
  background: var(--surface);
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 18px;
  height: 18px;
  background: var(--pink);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-1);
  flex: none;
}

.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sidebar ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--hard-1);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out;
}
.sidebar ul a:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
  background: var(--lime-soft);
}
.sidebar ul a:active { transform: translate(3px, 3px); }
.sidebar ul a[aria-current="page"] { background: var(--sky); }

.sidebar-note { margin-top: auto; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.content {
  flex: 1;
  min-width: 0;
  max-width: 1104px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.content:focus { outline: none; }

.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 30px; line-height: 1.25; margin: 0 0 8px; }
.page-head h1:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.page-sub { color: var(--ink-soft); margin: 0; max-width: 70ch; }

/* 鈹€鈹€ 鍗＄墖 鈹€鈹€ */
.card {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-2);
  padding: 16px;
  margin-bottom: 24px;
}
.card:last-child { margin-bottom: 0; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.card h2 { font-size: 20px; margin: 0 0 16px; }
.card-head h2 { margin: 0; }
.card h3 { font-size: 16px; margin: 24px 0 12px; color: var(--ink); }

.view[hidden], .panel-step[hidden] { display: none; }

/* 鈹€鈹€ 姝ラ鏉?鈹€鈹€ */
.steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 24px;
  font-size: 14px;
}
.step-status {
  margin: -12px 0 24px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background: var(--sky-soft);
  color: var(--slate-ink);
  box-shadow: var(--hard-1);
  font-family: var(--sans);
  font-weight: 700;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  background: var(--surface);
  box-shadow: var(--hard-1);
}
.step span {
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  background: var(--bg);
  font-size: 12px;
  font-weight: 700;
}
.step.active { background: var(--pink); }
.step.done { background: var(--lime-soft); }
.step.done span { background: var(--lime); }

/* 鈹€鈹€ 琛ㄥ崟 鈹€鈹€ */
.field { margin-bottom: 20px; }
.field > label { display: block; margin-bottom: 8px; font-family: var(--sans); font-weight: 700; }

.field input[type="text"],
.field textarea,
.filter-label select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-1);
  transition: box-shadow 200ms ease-out;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus,
.filter-label select:focus {
  outline: none;
  box-shadow: var(--hard-focus);
}
.field input:disabled,
.field textarea:disabled {
  background: #ebebeb;
  color: var(--ink-soft);
  box-shadow: none;
}

.field-hint { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; max-width: 70ch; }
.field-error {
  font-size: 14px;
  color: var(--rose-ink);
  margin: 8px 0 0;
  padding: 8px 10px;
  background: var(--rose-soft);
  border: 2px solid var(--rose-ink);
}
.field-error:empty { display: none; }
.field-status { font-size: 14px; color: var(--ink-soft); margin: 8px 0 0; }

.field-check { display: flex; align-items: flex-start; gap: 10px; }
.field-check label { font-family: var(--sans); font-weight: 600; margin: 0; }
.field-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--ink);
}

/* 鈹€鈹€ 鎸夐挳 鈹€鈹€ */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.actions-inline { margin-top: 12px; }

.btn {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-2);
  cursor: pointer;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out, background-color 200ms ease-out;
}
.btn:hover:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.btn:active:not(:disabled) { transform: translate(3px, 3px); }
.btn-primary { background: var(--pink); }
.btn-primary:hover:not(:disabled) { background: var(--lime); }
.btn-attention {
  background: var(--amber);
  color: var(--ink);
  min-width: 148px;
  font-weight: 800;
}
.btn-attention:hover:not(:disabled) { background: var(--lime); }

.btn-ghost { background: var(--surface); }
.btn-ghost:hover:not(:disabled) { background: var(--sky-soft); }
.btn:disabled {
  background: #e4e4e4;
  color: var(--ink-soft);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* 鈹€鈹€ 鎽樿涓庢彁绀?鈹€鈹€ */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}
.summary > div { border: 2px solid var(--ink); padding: 10px 12px; }
.summary dt { font-size: 13px; color: var(--ink-soft); font-family: var(--sans); }
.summary dd { margin: 4px 0 0; font-weight: 700; word-break: break-all; }

.next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding: 14px;
  border: 3px solid var(--ink);
  box-shadow: var(--hard-2);
}
.next-action strong { display: block; font-family: var(--sans); font-size: 17px; }
.next-action p { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }
.next-action-attention { background: var(--amber-soft); }
.alert { border: 2px solid var(--ink); padding: 12px 14px; margin: 0 0 20px; font-size: 14px; box-shadow: var(--hard-1); }
.alert-warn { background: var(--amber-soft); color: var(--ink); }
.alert-warn[hidden] { display: none; }

/* 鈹€鈹€ 鐘舵€侊細鏂囧瓧 + 棰滆壊锛屼笉闈犻鑹插崟鐙〃鎰?鈹€鈹€ */
.status-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
}
.status-pill.success { background: var(--emerald-soft); color: var(--emerald-ink); }
.status-pill.fail { background: var(--rose-soft); color: var(--rose-ink); }
.status-pill.warning { background: var(--amber-soft); color: #b45309; }
.status-pill.neutral { background: var(--lime-soft); color: var(--olive-ink); }
.status-pill.processing { background: var(--sky-soft); color: var(--slate-ink); }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { border: 2px solid var(--ink); padding: 10px 12px; background: var(--surface); }
.timeline strong { display: block; font-family: var(--sans); font-size: 14px; }
.timeline span { font-size: 13px; color: var(--ink-soft); }

/* 鈹€鈹€ 鎵归噺鏌ヨ 鈹€鈹€ */
.filter-label { font-size: 14px; font-family: var(--sans); font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.filter-label select { min-width: 132px; background: var(--surface); }

.progress { height: 16px; margin-top: 20px; background: var(--bg); border: 2px solid var(--ink); }
.progress-fill { height: 100%; width: 0; background: var(--lime); }

.table-wrap { overflow-x: auto; }
.batch-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.batch-table th, .batch-table td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); vertical-align: top; }
.batch-table th { font-family: var(--sans); font-weight: 700; white-space: nowrap; }
.batch-table td { word-break: break-all; }
.batch-table .empty-row { color: var(--ink-soft); text-align: center; }

/* 鈹€鈹€ 甯姪 鈹€鈹€ */
details { border: 2px solid var(--ink); background: var(--surface); margin-bottom: 12px; padding: 0 14px; }
details:last-of-type { margin-bottom: 0; }
summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
}
details[open] summary { border-bottom: 2px solid var(--ink); margin-bottom: 12px; }
details p { color: var(--ink-soft); margin: 0 0 12px; max-width: 70ch; }
code { background: var(--lime-soft); border: 2px solid var(--ink); padding: 1px 6px; font-family: var(--mono); }

/* 鈹€鈹€ 瀵硅瘽妗?鈹€鈹€ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-mask[hidden] { display: none; }
.modal {
  background: var(--surface);
  border: 2px solid var(--ink);
  box-shadow: var(--hard-3);
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 85dvh;
  overflow-y: auto;
}
.modal h2 { margin: 0 0 16px; font-size: 20px; }
.modal-steps { margin: 0 0 16px; padding-left: 22px; color: var(--ink-soft); }
.modal .field-check { margin: 16px 0; }

/* 鈹€鈹€ 绐勫睆 鈹€鈹€ */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: none;
    gap: 16px;
    padding: 16px;
    border-right: none;
    border-bottom: 2px solid var(--ink);
  }
  .sidebar ul { display: flex; flex-wrap: wrap; gap: 10px; }
  .sidebar-note { margin-top: 0; }
  .content { padding: 24px 16px 56px; }
  .page-head h1 { font-size: 26px; }
  .next-action { align-items: stretch; flex-direction: column; gap: 12px; }
  .btn-attention { width: 100%; }

  /* 鎵归噺琛ㄦ牸 鈫?缁撴灉鍗＄墖锛屽瓧娈靛叏閮ㄤ繚鐣?*/
  .batch-table, .batch-table tbody, .batch-table tr, .batch-table td { display: block; width: 100%; }
  .batch-table thead { display: none; }
  .batch-table tr {
    border: 2px solid var(--ink);
    box-shadow: var(--hard-1);
    padding: 12px;
    margin-bottom: 12px;
  }
  .batch-table td { border-bottom: none; padding: 4px 0; }
  .batch-table td[data-label]::before {
    content: attr(data-label) "锛?;
    color: var(--ink-soft);
    font-size: 13px;
    margin-right: 6px;
  }
  .batch-table .empty-row { text-align: center; color: var(--ink-soft); }
  .batch-table .empty-row::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
