/* permit.css —— 作业票（2026-11-15）
 * 单独一份，不往 styles.css 里追加（那边另一条线在改）。
 * 变量沿用 styles.css 的 :root（--cyan / --ink / --line …），跟 patrol.css 同一套：
 * 浅灰底、白卡、圆角、主色蓝。类名一律 ptp- 前缀。
 */

.ptp-head { padding: 2px 0 10px; }
.ptp-head-bar { display: flex; align-items: flex-start; gap: 10px; }
.ptp-head-text { flex: 1 1 auto; min-width: 0; }
.ptp-head-top { display: flex; align-items: center; gap: 10px; }
.ptp-h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: .5px; color: var(--ink); }
.ptp-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.ptp-new { flex: 0 0 auto; margin-left: auto; padding: 8px 12px; border: 0; border-radius: 10px;
  background: var(--grad); color: #fff; font: inherit; font-size: 13px; font-weight: 600;
  white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.ptp-back { flex: 0 0 auto; margin-top: 2px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; font: inherit; font-size: 13px; color: var(--ink-2); }

.ptp-list { list-style: none; margin: 0; padding: 0; }
.ptp-card { margin: 0 0 10px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); box-shadow: var(--shadow-1); }
.ptp-card-top { display: flex; align-items: center; gap: 8px; }
.ptp-no { font-size: 16px; font-weight: 700; letter-spacing: .6px; color: var(--cyan);
  font-variant-numeric: tabular-nums; }
.ptp-tag { margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.ptp-tag.is-todo { background: #FFF6E5; color: var(--warn-text); }
.ptp-tag.is-doing { background: var(--cyan-soft); color: var(--cyan); }
.ptp-tag.is-witness { background: #EEF2FF; color: #4F46E5; }
.ptp-tag.is-done { background: #E7F8F0; color: #0F7A55; }
.ptp-title { margin: 6px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--ink); }
.ptp-meta { margin: 4px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }
.ptp-card-t { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.ptp-tip { margin: 6px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); }
.ptp-empty { margin: 14px 0; padding: 16px; border: 1px dashed var(--line); border-radius: 14px;
  background: #fff; text-align: center; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.ptp-empty-card { text-align: left; }
.ptp-empty-t { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--ink); }

.ptp-kv { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ptp-kv:last-child { border-bottom: 0; }
.ptp-k { flex: 0 0 84px; font-size: 12.5px; color: var(--ink-3); }
.ptp-v { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }

.ptp-btn { display: block; width: 100%; height: 44px; margin: 6px 0; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; font: inherit; font-size: 15px; font-weight: 600; color: var(--cyan);
  -webkit-tap-highlight-color: transparent; }
.ptp-btn.is-main { border-color: transparent; background: var(--grad); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(8,145,178,.8); }
.ptp-btn.is-ghost { color: var(--ink-2); }
.ptp-btn:active { transform: scale(.995); }
.ptp-btn[disabled] { opacity: .65; }

/* ---------- 新建表单浮层 ---------- */
.ptp-form { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(15, 23, 42, .45); }
.ptp-form-card { width: 100%; max-width: 340px; padding: 16px; border-radius: 16px;
  background: #fff; box-shadow: var(--shadow-1); }
.ptp-form-t { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--ink); }
.ptp-field { margin-bottom: 10px; }
.ptp-label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-3); }
.ptp-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; font: inherit; font-size: 14px; line-height: 1.5; color: var(--ink); }
.ptp-form-acts { display: flex; gap: 8px; margin-top: 4px; }
.ptp-form-acts .ptp-btn { flex: 1 1 0; }

/* ---------- 四个状态流转按钮 ---------- */
.ptp-steps-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 6px; }
.ptp-step { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2);
  -webkit-tap-highlight-color: transparent; }
.ptp-step.is-next { border-color: transparent; background: var(--grad); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(8,145,178,.8); }
.ptp-step.is-next:active { transform: scale(.98); }
.ptp-step.is-done { border-color: transparent; background: #E7F8F0; color: #0F7A55; }
.ptp-step[disabled] { opacity: .55; }
.ptp-step.is-done[disabled] { opacity: 1; }

/* ---------- 流水 ---------- */
.ptp-flow { list-style: none; margin: 0; padding: 0; }
.ptp-flow-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 0;
  border-bottom: 1px dashed var(--line); font-size: 13px; }
.ptp-flow-row:last-child { border-bottom: 0; }
.ptp-flow-name { min-width: 48px; font-weight: 700; color: var(--cyan); }
.ptp-flow-by { flex: 1 1 auto; color: var(--ink); }
.ptp-flow-at { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
