/* =========================================================================
   政派 | 辰阳展会申报材料规范化系统 —— 网页版样式
   部署于 1Panel，纯静态前端，适配手机/平板/桌面
   ========================================================================= */
:root {
  --brand: #b8860b;
  --brand-dark: #8a6508;
  --line: #d8d0b8;
  --bg: #faf7ef;
  --panel: #fffdf6;
  --danger: #c0392b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  background: var(--bg); color: #333; padding: 14px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1600px; margin: 0 auto; }

/* 大标题（非页眉） */
h1.title {
  text-align: center; font-size: clamp(18px, 3.4vw, 26px); letter-spacing: 2px;
  color: var(--brand-dark); padding: 12px 0 4px;
  border-bottom: 2px solid var(--brand); margin-bottom: 16px; font-weight: 700;
}

.row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.field label { font-size: 12px; color: #777; }
.field input, .field select, .out-box select {
  border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 9px; font-size: 14px; background: #fff; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .out-box select:focus {
  border-color: var(--brand); box-shadow: 0 0 0 2px rgba(184,134,11,.15);
}
input[readonly] { background: #f3efe2; color: #555; }

.flex1 { flex: 1; }

.btn {
  border: 1px solid var(--brand); background: var(--panel); color: var(--brand-dark);
  padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 14px;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand); color: #fff; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.timebox {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff;
}
.timebox input {
  border: none; background: transparent; font-size: clamp(15px,2.6vw,17px); font-weight: 700;
  letter-spacing: 1px; color: var(--brand-dark); width: 10.5em; padding: 0;
}
.timebox input:focus { outline: none; box-shadow: none; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-group.right { justify-content: flex-end; }

/* 条目表格（横向可滚动） */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); -webkit-overflow-scrolling: touch; }
table.entries { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1400px; }
table.entries th {
  background: #efe8d3; color: #6b5510; padding: 8px 6px; font-weight: 600;
  border-bottom: 2px solid var(--brand); text-align: center; font-size: 12px;
}
table.entries td { padding: 6px; border-bottom: 1px solid #eee; vertical-align: middle; }
table.entries tr:last-child td { border-bottom: none; }
table.entries input[type=text] { width: 100%; padding: 6px 7px; border: 1px solid #eee; border-radius: 5px; font-size: 13px; }
table.entries input.txt-e1 { width: 52px; text-align: center; font-weight: 700; }
table.entries input:focus { border-color: var(--brand); outline: none; }
.del-btn { background: none; border: 1px solid #d8d0b8; color: #b03a2e; border-radius: 5px; padding: 5px 9px; cursor: pointer; font-size: 12px; }
.del-btn:hover { background: #b03a2e; color: #fff; border-color: #b03a2e; }

/* E7 源文件状态显示 */
.src-status { font-size: 12px; color: #888; display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.src-status.done { color: #1d8a3c; }
.src-status.err { color: var(--danger); }
.src-status .spinner { display:inline-block; width:10px; height:10px; border:2px solid #ccc; border-top-color:var(--brand); border-radius:50%; animation:spin .8s linear infinite; margin-right:4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.bar { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 12px; flex-wrap: wrap; }
.out-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; min-width: 260px; }
.out-box select { width: auto; }
.run-btn { font-size: 16px; padding: 12px 26px; }
.hint { font-size: 12.5px; color: #8a7a4a; margin-top: 8px; }
.foot { text-align: center; color: #b7ab8c; font-size: 12px; margin-top: 26px; }

/* 下载清单 */
.dl-section { margin-top: 18px; }
.dl-title { font-size: 18px; color: var(--brand-dark); margin-bottom: 10px; border-left: 4px solid var(--brand); padding-left: 10px; }
table.dltable { min-width: 700px; }
.dl-download { color: #1a5fa8; text-decoration: none; font-weight: 600; }
.dl-download:hover { text-decoration: underline; }
.dl-download.disabled { color: #b0a88c; cursor: not-allowed; text-decoration: none; }
.dl-reason { font-size: 12px; color: var(--danger); max-width: 320px; }
.dl-status-ok { color: #1d8a3c; }
.dl-status-lock { color: var(--danger); }
.dl-status-expired { color: #999; }
#refreshList { margin-top: 12px; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: #fff; padding: 11px 22px; border-radius: 8px;
  font-size: 14px; z-index: 999; display: none; max-width: 86vw; box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.toast.error { background: rgba(190,40,30,.93); }
.toast.ok { background: rgba(30,130,60,.93); }
.qty { font-size: 12px; color: #888; }

.banner {
  background: #fff7e0; border: 1px solid #e6c968; color: #7a5c00;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; line-height: 1.6; display: none;
}

@media (min-width: 900px) { body { padding: 22px; } }
