/* =========================================================================
 * style.css — 素质综合测评计算器
 * ========================================================================= */

:root {
  --primary: #2f6fed;
  --primary-dark: #1e55c0;
  --danger: #d64545;
  --ok: #2e9e5b;
  --warn: #d97706;
  --bg: #f3f5f9;
  --card: #ffffff;
  --line: #e3e7ef;
  --text: #1f2937;
  --text-soft: #6b7280;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶栏 ---------- */
.topbar { background: linear-gradient(135deg, #1e55c0 0%, #2f6fed 100%); color: #fff; padding: 18px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { height: 48px; width: auto; flex: none; object-fit: contain; background: rgba(255,255,255,.18); border-radius: 10px; padding: 5px 12px; }
.brand-titles { min-width: 0; }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: .5px; }
.brand .sub { margin: 4px 0 0; font-size: 12px; opacity: .85; }
.profile { display: flex; gap: 8px; flex-wrap: wrap; }
.profile input {
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.15); color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 13px; width: 110px; outline: none;
}
.profile input::placeholder { color: rgba(255,255,255,.75); }
.profile input:focus { border-color: #fff; background: rgba(255,255,255,.25); }

/* ---------- Tab 导航 ---------- */
.tabs { display: flex; gap: 8px; padding-top: 16px; }
.tab-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text-soft);
  border-radius: 10px 10px 0 0; padding: 9px 18px; font-size: 14px; cursor: pointer;
  border-bottom: none; font-weight: 500;
}
.tab-btn.active { color: var(--primary); font-weight: 600; box-shadow: 0 -2px 0 var(--primary) inset; }
.tab-pane { display: none; padding: 16px 0 24px; }
.tab-pane.active { display: block; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card h3 { margin: 0; font-size: 14px; }
.tag {
  font-size: 11px; font-weight: 500; color: var(--primary);
  background: #eaf1fe; border: 1px solid #c9dcfb; border-radius: 999px; padding: 1px 8px;
}
.hint { color: var(--text-soft); font-size: 12.5px; margin: 4px 0 10px; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--primary); background: var(--primary); color: #fff;
  border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; transition: .15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: #eaf1fe; }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.danger.ghost { background: transparent; color: var(--danger); }
.btn.danger.ghost:hover { background: #fdecec; }
.btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 学年栏 ---------- */
.year-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.year-bar label { font-weight: 600; }
.year-bar select {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px;
  background: #fff; min-width: 180px;
}
.year-bar .btn { margin-left: 2px; }

/* ---------- 结果概览 ---------- */
.result-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px;
}
.result-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 14px; text-align: center;
}
.result-item .label { color: var(--text-soft); font-size: 12.5px; }
.result-item .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.result-item .extra { font-size: 11.5px; color: var(--text-soft); margin-top: 2px; }
.result-item.total { border-color: var(--primary); background: linear-gradient(180deg, #f4f8ff, #fff); }
.result-item.total .value { color: var(--primary); }
.down-badge {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 6px;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 600;
  vertical-align: middle; line-height: 1.6;
}
.result-item.warn { border-color: var(--warn); }
.result-item.warn .value { color: var(--warn); }
.result-item.bad { border-color: var(--danger); }
.result-item.bad .value { color: var(--danger); }

/* ---------- 三卡布局：C1、C3 叠左列，C2 独占右列整高（三卡等宽） ---------- */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "c1 c2"
    "c3 c2";
  gap: 16px;
}
#section-c1 { grid-area: c1; }
#section-c2 { grid-area: c2; }
#section-c3 { grid-area: c3; }
@media (max-width: 900px) {
  .cols {
    grid-template-columns: 1fr;
    grid-template-areas:
      "c1"
      "c2"
      "c3";
  }
}
.section .hint { margin-bottom: 12px; }

/* ---------- 加减分条目 ---------- */
.sub-block { margin-bottom: 14px; }
.sub-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mini-total { font-weight: 700; color: var(--ok); }
.mini-total.minus { color: var(--danger); }
.items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.item-row {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; background: #fafbfe;
}
.item-row .item-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.item-row .item-points { font-weight: 700; color: var(--ok); white-space: nowrap; }
.item-row.minus .item-points { color: var(--danger); }
.item-row .del {
  border: none; background: none; color: var(--text-soft); cursor: pointer; font-size: 15px;
  padding: 2px 6px; border-radius: 6px;
}
.item-row .del:hover { color: var(--danger); background: #fdecec; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.c2-onlyreq {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-soft);
  border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; background: #fafbfe; cursor: pointer;
  user-select: none;
}
.c2-onlyreq input { width: 14px; height: 14px; accent-color: var(--primary); }
.c2-onlyreq:hover { border-color: var(--primary); color: var(--text); }

/* 教务系统导入 */
#import-text {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-size: 12.5px; font-family: Consolas, "Courier New", monospace; resize: vertical; box-sizing: border-box;
}
#import-text:focus { outline: none; border-color: var(--primary); }
.import-result { margin-top: 8px; font-size: 12.5px; color: var(--danger); white-space: pre-wrap; }
.import-result.error { color: var(--danger); }


/* 豆包批量导入引导 */
.batch-help {
  margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfe;
  padding: 0;
}
.batch-help > summary {
  cursor: pointer; padding: 9px 12px; font-size: 13px; color: var(--primary-dark);
  font-weight: 600; user-select: none; list-style: none;
}
.batch-help > summary::before { content: "▸ "; color: var(--primary); }
.batch-help[open] > summary::before { content: "▾ "; }
.batch-help > summary:hover { background: #f2f5fb; border-radius: 10px; }
.batch-help-body { padding: 4px 12px 12px; border-top: 1px dashed var(--line); }
.batch-steps { margin: 8px 0 10px; padding-left: 20px; font-size: 13px; }
.batch-steps li { margin-bottom: 4px; }
.prompt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.prompt-text {
  background: #f6f8fc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: break-word;
  font-family: Consolas, "Courier New", monospace; max-height: 260px; overflow-y: auto;
}

/* ---------- 课程表 ---------- */
.course-table-wrap {
  max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 10px; scrollbar-width: thin; scrollbar-color: #c6ccd6 transparent;
}
.course-table-wrap::-webkit-scrollbar { width: 8px; }
.course-table-wrap::-webkit-scrollbar-thumb { background: #c6ccd6; border-radius: 4px; }
.course-table-wrap::-webkit-scrollbar-track { background: transparent; }
.course-table { width: 100%; border-collapse: collapse; }
.course-table thead th {
  position: sticky; top: 0; z-index: 1; background: #fff;
}
.course-table th, .course-table td {
  border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: middle;
}
.course-table th { font-size: 12.5px; color: var(--text-soft); }
.course-table th.num, .course-table td.num { width: 90px; }
.course-table th.op, .course-table td.op { width: 40px; text-align: center; }
.course-table th.scale-cell, .course-table td.scale-cell { width: 92px; }
.course-table th.type-cell, .course-table td.type-cell { width: 82px; }
.course-table input, .course-table select {
  width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-size: 13px;
  background: #fff;
}
.course-table input:focus, .course-table select:focus { outline: none; border-color: var(--primary); }
.course-table .del { border: none; background: none; color: var(--text-soft); cursor: pointer; font-size: 15px; }
.course-table .del:hover { color: var(--danger); }
.c2-stat { font-size: 12.5px; color: var(--text-soft); margin-top: 6px; }
.c2-stat b { color: var(--text); }

/* ---------- C3 分类 ---------- */
.c3-cat { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.c3-cat-head {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
  background: #fafbfe; cursor: pointer; user-select: none;
}
.c3-cat-head:hover { background: #f2f5fb; }
.c3-cat-head .cat-title { font-weight: 600; font-size: 14px; }
.c3-cat-head .cat-total { color: var(--ok); font-weight: 700; }
.c3-cat-body { padding: 10px 12px; border-top: 1px solid var(--line); }

/* ---------- 体测卡片（奖学金降档判定） ---------- */
.pe-card {
  border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  background: #fbfcff;
}
.pe-head { font-weight: 600; font-size: 13.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pe-row { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.pe-score-label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-soft); }
.pe-score-label input {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px; width: 130px;
}
.pe-score-label input:focus { outline: none; border-color: var(--primary); }
.pe-check { display: flex; align-items: center; gap: 6px; font-size: 13px; padding-bottom: 7px; cursor: pointer; user-select: none; }
.pe-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.pe-result { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pe-badge { display: inline-flex; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: normal; max-width: 100%; text-align: left; }
.pe-badge.down { background: #fdecec; color: var(--danger); border: 1px solid #f5b5b5; }
.pe-badge.ok { background: #e7f6ee; color: var(--ok); border: 1px solid #b5e3c8; }
.pe-badge.none { background: #f1f3f7; color: var(--text-soft); border: 1px solid var(--line); font-weight: 500; }
.pe-reason { font-size: 12px; color: var(--text-soft); }

/* ---------- 在校成绩 ---------- */
.overall-card h2 { margin-bottom: 8px; }
.overall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.overall-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-align: center; background: #fafbfe;
}
.overall-item .y-name { font-size: 12.5px; color: var(--text-soft); }
.overall-item .y-total { font-size: 20px; font-weight: 700; }
.overall-avg {
  margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.overall-avg .avg-value { font-size: 22px; font-weight: 800; color: var(--primary); }

/* ---------- 班级排名 ---------- */
.rank-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.rank-form input {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; width: 160px;
}
.rank-form input:focus { outline: none; border-color: var(--primary); }
.rank-table { width: 100%; border-collapse: collapse; }
.rank-table th, .rank-table td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.rank-table th { color: var(--text-soft); font-size: 12.5px; }
.rank-table td.num, .rank-table th.num { width: 90px; }
.rank-table td.op, .rank-table th.op { width: 50px; text-align: center; }
.rank-table tr.me td { background: #eef5ff; }
.rank-top { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; background: #9ca3af; }
.rank-top.r1 { background: #e6a23c; }
.rank-top.r2 { background: #a8b3c4; }
.rank-top.r3 { background: #c98a5e; }

/* ---------- 数据管理 ---------- */
.manage-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.file-label { display: inline-block; cursor: pointer; }
#manage-msg { color: var(--ok); }
#manage-msg.error { color: var(--danger); }
.formula-list { margin: 6px 0 0; padding-left: 20px; color: var(--text); }
.formula-list li { margin-bottom: 3px; }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto;
}
.modal-mask[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.2);
  width: 100%; max-width: 720px; max-height: calc(100vh - 96px); display: flex; flex-direction: column;
}
.modal.small { max-width: 420px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-close { border: none; background: none; font-size: 22px; line-height: 1; color: var(--text-soft); cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 14px 18px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }

/* 快选项列表 */
.quick-group { margin-bottom: 12px; }
.quick-group-title { font-weight: 600; font-size: 13.5px; margin: 0 0 4px; color: var(--text); }
.quick-group-title .q-hint { font-weight: 400; font-size: 12px; color: var(--text-soft); }
.quick-levels { display: flex; flex-wrap: wrap; gap: 6px; }
.q-btn {
  border: 1px solid var(--line); background: #fafbfe; border-radius: 8px; padding: 4px 10px;
  font-size: 12.5px; cursor: pointer; color: var(--text);
}
.q-btn:hover { border-color: var(--primary); color: var(--primary); background: #eaf1fe; }
.q-btn .pts { color: var(--ok); font-weight: 700; }
.matrix-table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: 12.5px; }
.matrix-table th, .matrix-table td { border: 1px solid var(--line); padding: 4px 6px; text-align: center; }
.matrix-table th { background: #f5f7fb; color: var(--text-soft); font-weight: 500; }
.matrix-table td:first-child { background: #fafbfe; font-weight: 600; text-align: left; white-space: nowrap; }
.matrix-table .q-btn { width: 100%; }

/* 字段 */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; min-width: 0; }
.field span { font-size: 12.5px; color: var(--text-soft); }
.field input {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px;
  width: 100%; min-width: 0;
}
.field input:focus { outline: none; border-color: var(--primary); }

.footer { text-align: center; color: var(--text-soft); font-size: 12px; padding: 8px 16px 24px; }
.footer .site-stat { margin-top: 4px; }
.footer .site-stat span { color: var(--primary); font-weight: 600; }

/* 手动填写：C2 成绩 / 学年总分 */
.manual-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 0; padding: 6px 10px; background: #f7f9fd;
  border: 1px dashed var(--line); border-radius: 8px; font-size: 12.5px;
}
.manual-row label { color: var(--text); font-weight: 600; white-space: nowrap; }
.manual-row input[type="number"] {
  width: 90px; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 8px; font-size: 13px;
}
.manual-row input[type="number"]:focus { outline: none; border-color: var(--primary); }
.manual-row .hint { color: var(--text-soft); }

/* 空状态 */
.empty-hint { color: var(--text-soft); font-size: 12.5px; font-style: italic; }

@media (max-width: 640px) {
  .result-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-inner { flex-direction: column; align-items: flex-start; }
  .brand .logo { height: 40px; }
}

/* ========== 转专业计算器页面 ========== */
a.tab-btn { text-decoration: none; display: inline-block; }
.tabs a.tab-btn { margin-left: auto; }

.top-link {
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.15); color: #fff;
  border-radius: 8px; padding: 6px 10px; font-size: 13px; text-decoration: none;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.top-link:hover { background: rgba(255,255,255,.25); border-color: #fff; }

.inline-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.inline-fields .field { flex: 1; min-width: 130px; }
.field.grow { flex: 2 !important; min-width: 220px; }
.field select {
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px; background: #fff;
  width: 100%; min-width: 0;
}
.field select:focus { outline: none; border-color: var(--primary); }

.input-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; }
.field-group {
  border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfcff;
  min-width: 0;
}
.field-group h3 {
  margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.field-group .field { margin-bottom: 0; }
.field-group .inline-fields .field { margin-bottom: 0; }

#qualify-line { margin-top: 8px; }

.detail-table-wrap { overflow-x: auto; }
.detail-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.detail-table th, .detail-table td {
  border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top;
}
.detail-table thead th { background: #f5f7fb; color: var(--text-soft); font-size: 12.5px; font-weight: 500; }
.detail-table th.num, .detail-table td.num { width: 70px; text-align: center; }
.detail-table td.strong { font-weight: 700; color: var(--primary); }
.detail-table td.cell-note { font-size: 12.5px; color: var(--text-soft); overflow-wrap: anywhere; word-break: break-word; }
.detail-table tr.total-row td { background: #f4f8ff; font-weight: 700; border-top: 2px solid var(--primary); }

.doc-list { margin: 4px 0 10px; padding-left: 20px; }
.doc-list li { margin-bottom: 4px; font-size: 13px; }
#doc-body h3 { margin: 12px 0 4px; }
#doc-body h3:first-child { margin-top: 0; }

.result-notes-list { margin: 8px 0 0; padding-left: 20px; }
.result-notes-list li.warn { color: var(--warn); font-size: 13px; margin-bottom: 3px; }

@media (max-width: 640px) {
  .input-grid { grid-template-columns: 1fr; }
}

/* 平板断点：转专业录入区单列、结果概览两列，避免长选项溢出 */
@media (max-width: 900px) {
  .input-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================================
 * 分段单选（本部 / 仁济 方案切换）与 个人档案卡
 * ========================================================================= */
.seg {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; padding: 3px; gap: 2px;
}
.seg-option { position: relative; display: inline-flex; }
.seg-option input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.seg-option span {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 16px; border-radius: 999px; font-size: 13px; line-height: 1.4;
  color: rgba(255,255,255,.85); cursor: pointer; white-space: nowrap; user-select: none;
  transition: color .15s, background .15s, box-shadow .15s;
}
.seg-option:hover span { color: #fff; }
.seg-option input:checked + span {
  background: #fff; color: var(--primary-dark); font-weight: 700;
  box-shadow: 0 1px 5px rgba(0,0,0,.2);
}
.seg-option input:focus-visible + span { outline: 2px solid #fff; outline-offset: 1px; }

.top-btn {
  border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.15); color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: .15s; font-family: inherit; line-height: 1.4;
}
.top-btn:hover { background: rgba(255,255,255,.28); border-color: #fff; }

/* 档案卡 */
.archive-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.archive-bar input {
  flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 13px; background: #fff;
}
.archive-bar input:focus { outline: none; border-color: var(--primary); }
.archive-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.archive-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfe;
}
.archive-item-main { min-width: 0; }
.archive-item-name { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.archive-item-meta { font-size: 12px; color: var(--text-soft); }
.archive-item-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.archive-msg { margin-top: 10px; color: var(--ok); }
.archive-msg.error { color: var(--danger); }
.archive-current {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-soft); margin: 0 0 10px;
}
.archive-current b { color: var(--text); }
.archive-item.current { border-color: var(--primary); background: #eef5ff; }

@media (max-width: 640px) {
  .archive-item { flex-direction: column; align-items: stretch; }
  .archive-item-actions { justify-content: flex-end; }
}
