/* Campus print shop — mobile-first, dependency-free styles. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --ok: #15803d;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --err: #b91c1c;
  --err-bg: #fee2e2;
  --ok-bg: #dcfce7;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 14px 48px; }
.wrap.wide { max-width: 860px; }
h1 { font-size: 22px; margin: 6px 0 2px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.subtitle { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.banner {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}
.banner.warn { background: var(--warn-bg); color: #78350f; border: 1px solid #fcd34d; }
.banner.err { background: var(--err-bg); color: #7f1d1d; border: 1px solid #fca5a5; }
.banner.ok { background: var(--ok-bg); color: #14532d; border: 1px solid #86efac; }
.banner.hidden, .hidden { display: none !important; }

label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
label:first-child { margin-top: 0; }
input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
input[type="file"] { width: 100%; font-size: 15px; }
.filebox {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}
.filebox.dragover { border-color: var(--accent); color: var(--accent); }
.filebox .filename { color: var(--text); font-weight: 600; word-break: break-all; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1;
  padding: 10px 6px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.seg button.active { border-color: var(--accent); color: var(--accent); background: #eff6ff; font-weight: 700; }
.row { display: flex; gap: 10px; align-items: end; }
.row > div { flex: 1; }
.bigbtn {
  width: 100%;
  padding: 13px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 14px;
}
.bigbtn:disabled { background: #9ca3af; cursor: not-allowed; }
.bigbtn.secondary { background: #fff; color: var(--accent); border: 1.5px solid var(--accent); }
.smallbtn {
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.smallbtn.danger { color: var(--err); border-color: #fca5a5; }
.smallbtn.primary { color: var(--accent); border-color: var(--accent); }
.price-line { font-size: 16px; margin: 6px 0; }
.price-line b { font-size: 20px; color: var(--accent); }
.kv { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.status-pill.converting, .status-pill.queued { background: #dbeafe; color: #1e40af; }
.status-pill.printing { background: #fef3c7; color: #92400e; }
.status-pill.done { background: var(--ok-bg); color: var(--ok); }
.status-pill.error, .status-pill.cancelled { background: var(--err-bg); color: var(--err); }
.pickup { font-size: 34px; font-weight: 800; letter-spacing: 4px; text-align: center; margin: 8px 0; }
.disc-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.disc-row input { width: 90px; flex: none; }
.disc-row .lbl { font-size: 14px; white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 13px; }
.inkbar { margin: 8px 0; }
.inkbar .lbl { display: flex; justify-content: space-between; font-size: 13px; }
.inkbar .track { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin-top: 3px; }
.inkbar .fill { height: 100%; background: var(--accent); }
.inkbar .fill.low { background: var(--warn); }
.inkbar .fill.empty { background: var(--err); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 6px; }
footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }
footer a { color: var(--muted); }
@media (max-width: 640px) {
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { border-bottom: 2px solid var(--line); padding: 6px 0; }
  td { border: none; padding: 3px 6px; }
  td::before { content: attr(data-l); color: var(--muted); font-size: 12px; display: block; }
}
