/* 汕运出行包车报备系统 — 品牌视觉（深绿 #0B6435 / 浅绿 #75BE59，取自汕运logo） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --brand: #0B6435;
  --brand2: #0E7A40;
  --light: #75BE59;
  --tint: #EFF6EC;
  --line: #E2EDE0;
  --ink: #1F2A24;
  --sub: #7C8A80;
}
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--tint); color: var(--ink); font-size: 17px; }
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--tint); padding-bottom: 32px; }

/* 顶栏：白底大通栏（约占屏幕1/5高）+ logo左上角 + 系统名 */
.topbar { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 2px solid var(--light); padding: 14px 16px; min-height: clamp(100px, 16.5vh, 150px); display: flex; align-items: center; gap: 10px; }
.topbar .brand-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .brand-logo { height: 42px; flex: none; }
.topbar .tname { color: var(--brand); font-size: 18px; font-weight: 700; letter-spacing: .5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .tname small { display: block; font-weight: 600; font-size: 10.5px; color: var(--light); letter-spacing: 2.5px; }
.topbar .tright { margin-left: auto; flex: none; }
.topbar .sub { font-size: 12px; font-weight: 400; color: var(--sub); }
.topbar button.back { background: #EAF3DE; border: none; color: var(--brand); font-size: 24px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 0 2px 0; line-height: 1; flex: none; font-weight: 700; }

.card { background: #fff; border-radius: 14px; margin: 12px; padding: 18px 16px; box-shadow: 0 2px 8px rgba(11,100,53,.06); }
.card h3 { font-size: 18px; margin-bottom: 12px; color: var(--brand); display: flex; align-items: center; gap: 7px; }
.card h3::before { content: ''; width: 5px; height: 17px; border-radius: 2px; background: var(--light); display: inline-block; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 15px; color: #55655B; margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 2px solid var(--line); border-radius: 10px; padding: 13px 14px; font-size: 18px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--light); background: #FBFDF9; }
.field textarea { min-height: 80px; resize: vertical; }
.row2 { display: flex; gap: 10px; }
.row2 .field { flex: 1; }

.btn { display: block; width: 100%; border: none; border-radius: 12px; padding: 15px; font-size: 19px; font-weight: 700; cursor: pointer; margin-top: 10px; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; box-shadow: 0 5px 12px rgba(11,100,53,.25); }
.btn.green { background: #4E9450; color: #fff; }
.btn.red { background: #d5493f; color: #fff; }
.btn.purple { background: #6a52c7; color: #fff; }
.btn.plain { background: #F0F5EE; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { width: auto; padding: 9px 18px; font-size: 16px; border-radius: 10px; margin: 0; display: inline-block; }
.btn:disabled { opacity: .5; }

.tabs { display: flex; margin: 16px 12px 0; background: #E4EEE1; border-radius: 12px; padding: 4px; }
.tabs button { flex: 1; border: none; background: none; padding: 12px; border-radius: 9px; font-size: 17px; color: var(--sub); }
.tabs button.on { background: #fff; color: var(--brand); font-weight: 600; }

.list-item { background: #fff; border-radius: 14px; margin: 10px 12px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(11,100,53,.06); }
.list-item .t1 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.list-item .t1 b { font-size: 18px; }
.list-item .t2 { font-size: 15px; color: #55655B; line-height: 1.7; }

/* 状态标签：绿=批准 橙=待审 灰=作废 红=驳回 */
.badge { font-size: 14px; padding: 4px 12px; border-radius: 20px; white-space: nowrap; font-weight: 600; }
.b-pending_leader { background: #FFF4DC; color: #B07A1E; }
.b-pending_production { background: #FFF0E3; color: #A86400; }
.b-approved { background: #E3F3DF; color: var(--brand); }
.b-rejected { background: #fcebeb; color: #c0392b; }
.b-revoked { background: #efeaf9; color: #6a52c7; }
.b-pending_void { background: #FFF4DC; color: #B07A1E; }
.b-pending_void_production { background: #FDEEDA; color: #9A5B00; }
.b-voided { background: #ECEFF3; color: #77808A; }
.b-pending_end { background: #FDEEDA; color: #9A5B00; }
.b-ended_early { background: #E8F0E6; color: #4A7C43; }

.seg { display: flex; gap: 8px; margin: 12px; overflow-x: auto; padding-bottom: 2px; }
.seg button { border: none; background: #fff; border-radius: 22px; padding: 10px 18px; font-size: 16px; color: #55655B; white-space: nowrap; box-shadow: 0 1px 4px rgba(11,100,53,.08); }
.seg button.on { background: var(--brand); color: #fff; }

.kv { display: flex; padding: 9px 0; border-bottom: 1px dashed #E7EFE4; font-size: 17px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 118px; color: #55655B; flex-shrink: 0; }
.kv .v { flex: 1; word-break: break-all; font-weight: 600; }

.sec-title { margin: 16px 12px 4px; font-size: 16px; color: #55655B; font-weight: 600; }
.dtable { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.dtable th, .dtable td { border: 1px solid #E4EDE1; padding: 9px 6px; text-align: center; word-break: break-all; }
.dtable th { background: #F4F9F2; color: var(--brand); font-weight: 600; }

.tl { margin-top: 8px; }
.tl-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #E7EFE4; font-size: 15px; }
.tl-item:last-child { border-bottom: none; }
.tl-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--light); margin-top: 8px; flex-shrink: 0; }
.tl-item .body { flex: 1; }
.tl-item .meta { color: #55655B; font-size: 14px; margin-top: 2px; }
.tl-item .cmt { color: #5A675E; margin-top: 2px; }

.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.item-head b { font-size: 16px; color: var(--brand); }
.mini-btn { border: none; background: #F0F5EE; color: #55655B; border-radius: 8px; padding: 7px 14px; font-size: 14px; }

.fab { position: fixed; bottom: 28px; right: 20px; width: 66px; height: 66px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; font-size: 36px; border: none; box-shadow: 0 5px 14px rgba(11,100,53,.35); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(31,42,36,.88); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 16px; z-index: 99; max-width: 85%; text-align: center; }
.empty { text-align: center; color: #A9B6AC; padding: 60px 0; font-size: 16px; }
.hint { font-size: 14px; color: #55655B; line-height: 1.6; margin-top: 6px; }
.link { color: var(--brand); text-decoration: underline; }
.logout { background: none; border: 1.5px solid rgba(11,100,53,.4); color: var(--brand); border-radius: 8px; padding: 6px 14px; font-size: 14px; font-weight: 600; }

/* 注册身份选择 */
.role-pick { display: flex; gap: 10px; }
.role-pick .rp { flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 8px; text-align: center; cursor: pointer; }
.role-pick .rp b { display: block; font-size: 16px; color: var(--ink); }
.role-pick .rp span { display: block; font-size: 12px; color: var(--sub); margin-top: 4px; }
.role-pick .rp.on { border-color: var(--light); background: #F4FAF1; }
.role-pick .rp.on b { color: var(--brand); }

/* 用户首页 */
.hello { font-size: 20px; font-weight: 700; color: var(--brand); margin: 16px 16px 2px; }
.sub2 { font-size: 14px; color: #55655B; margin: 0 16px 10px; }
.hero-card { background: linear-gradient(135deg, var(--brand) 0%, var(--brand2) 100%); border-radius: 16px; margin: 4px 12px 16px; padding: 26px 20px; text-align: center; color: #fff; box-shadow: 0 8px 18px rgba(11,100,53,.28); }
.hero-txt { font-size: 20px; font-weight: 700; margin-bottom: 18px; color: #fff; }
.hero-btn { background: #fff; color: var(--brand); font-size: 23px; padding: 19px; border-radius: 14px; margin-top: 0; font-weight: 700; }
.hero-tip { font-size: 14px; color: #CFE8CE; margin-top: 12px; }

/* 用户首页底部标签栏 */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 640px; background: #fff; border-top: 1px solid var(--line); display: flex; padding: 8px 0 12px; z-index: 20; }
.tabbar .tb { flex: 1; text-align: center; font-size: 13px; color: #55655B; cursor: pointer; }
.tabbar .tb.on { color: var(--brand); font-weight: 700; }
.tabbar .ic { font-size: 22px; display: block; margin-bottom: 3px; }
body.with-tabbar #app { padding-bottom: 84px; }

/* 待分配提示 */
.warn-card { background: #FFF8E8; border: 1px solid #F0D9A0; color: #8A6100; font-size: 14px; line-height: 1.6; }

/* 用户大字表单 + 分步向导 */
.op-mode .field label { font-size: 16px; color: #44554A; margin-bottom: 7px; }
.op-mode .field input, .op-mode .field select, .op-mode .field textarea { font-size: 20px; padding: 15px 15px; border-radius: 10px; }
.op-mode .card h3 { font-size: 19px; }
.op-mode .btn.primary { font-size: 21px; padding: 17px; }
.op-mode .sec-title { font-size: 16px; color: #44554A; font-weight: 700; }
.steps-hint { margin: 14px 16px 2px; font-size: 15px; color: var(--brand); font-weight: 700; }
.steps-hint::after { content: ''; display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--light), #DCEED4); margin-top: 6px; }
.wbtns { display: flex; gap: 10px; margin: 16px 12px; }
.wbtns .btn { margin-top: 0; }
.plate-pre { display: flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 17px; font-weight: 700; flex: none; }

/* 手写签名 */
.sig-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sig-panel { background: #fff; width: 100%; max-width: 640px; border-radius: 18px 18px 0 0; padding: 14px 14px calc(16px + env(safe-area-inset-bottom)); }
.sig-head { display: flex; justify-content: space-between; align-items: center; font-size: 17px; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
#sigCanvas { width: 100%; height: 280px; border: 2px dashed var(--light); border-radius: 10px; background: #fff; touch-action: none; display: block; }
.sig-btns { display: flex; gap: 10px; margin-top: 10px; }
.sig-btns .btn { margin-top: 0; }
.sig-box { border: 2px dashed var(--light); border-radius: 10px; background: #F4FAF1; text-align: center; color: var(--brand); font-size: 17px; font-weight: 700; padding: 12px; cursor: pointer; }
.sig-box img { max-width: 100%; max-height: 90px; display: block; margin: 0 auto; }
.sig-item { border-bottom: 1px dashed #E7EFE4; padding: 8px 0; }
.sig-item:last-child { border-bottom: none; }
.sig-item img { max-height: 60px; display: block; margin: 4px 0; border: 1px solid #E7EFE4; border-radius: 6px; background: #fff; }
.sig-item .meta { font-size: 12px; color: var(--sub); }
