/* 陆生野生动物收容救助 - 移动优先响应式样式 */
:root {
  --green: #2e7d32; --green-d: #1b5e20; --green-l: #e8f5e9;
  --blue: #1565c0; --blue-l: #e3f2fd;
  --amber: #b26a00; --amber-l: #fff8e1;
  --red: #c62828; --red-l: #fdecea;
  --gray: #5f6368; --gray-l: #f1f3f4; --line: #e0e0e0;
  --text: #212121; --muted: #757575;
  --bg: #f7f8f7;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); }
#app { min-height: 100vh; }
a { color: var(--green); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 16px; color: var(--text); }
:focus { outline: 2px solid rgba(46,125,50,.4); outline-offset: 1px; }

/* 通用 */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; font-weight: 500; transition: opacity .15s; }
.btn:active { opacity: .75; }
.btn-primary { background: var(--green); color: #fff; }
.btn-outline { border: 1px solid var(--line); background: #fff; color: var(--text); }
.btn-danger { background: var(--red-l); color: var(--red); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.disabled { opacity: .5; pointer-events: none; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tool-row .btn { flex: 1; min-width: 120px; }

/* 布局与导航 */
.shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 14px; }
.topbar .menu-btn { font-size: 22px; width: 40px; height: 40px; border-radius: 10px; background: var(--green-l); color: var(--green-d); flex: none; }
.topbar .title { font-size: 17px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 14px; max-width: 1080px; margin: 0 auto; width: 100%; }
.page { display: flex; flex-direction: column; gap: 12px; }
.side { display: none; }
.mask { display: none; }
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 224px 1fr; grid-template-rows: auto 1fr; }
  .topbar { grid-column: 2; position: static; }
  .side { display: block; grid-row: 1 / 3; background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; }
  .side .inner { position: sticky; top: 0; display: flex; flex-direction: column; gap: 6px; }
  .side .brand h1 { font-size: 24px; color: var(--green-d); }
  .side .brand p { font-size: 12px; color: var(--muted); margin-top: 4px; }
  .main { grid-column: 2; padding: 20px; max-width: none; }
  .menu-btn { display: none; }
  .side-user { margin-top: auto; padding-top: 10px; }
}
/* 移动抽屉（桌面隐藏，仅手机滑出） */
.drawer { display: none; }
@media (max-width: 1023px) {
  .drawer { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: 78%; max-width: 300px; background: #fff; z-index: 110; transform: translateX(-102%); transition: transform .25s; padding: 18px 14px; overflow-y: auto; }
  .drawer.open { transform: translateX(0); box-shadow: 2px 0 18px rgba(0,0,0,.18); }
  .drawer .d-head h2 { font-size: 24px; color: var(--green-d); }
  .drawer .d-head p { font-size: 12px; color: var(--muted); margin: 4px 0 12px; }
  .mask { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 105; }
}
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--text); font-size: 15px; margin-bottom: 2px; cursor: pointer; }
.nav-item .ic { font-size: 18px; width: 24px; text-align: center; }
.nav-item:active { background: var(--green-l); }
.nav-item.active { background: var(--green-l); color: var(--green-d); font-weight: 600; }
.drawer .nav-item { font-size: 16px; }

/* 登录 */

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 4px; }
.field label { font-size: 13px; color: var(--gray); font-weight: 500; }
.field label.req::after { content: ' *'; color: var(--red); }
.field input, .field select, .field textarea, .search, .map-kw { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; }
.field input, .field select { min-height: 44px; }
.field textarea { min-height: 76px; padding: 10px 12px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 140px; }
.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.opt-btn { border: 1.5px solid var(--line); background: #fff; color: var(--text); border-radius: 10px; min-height: 48px; font-size: 16px; font-weight: 500; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 8px; }
.opt-btn.on { border-color: var(--green); background: var(--green); color: #fff; font-weight: 700; }
@media (max-width: 420px) { .opt-grid, .opt-grid4 { grid-template-columns: repeat(2, 1fr); } }

/* 列表头部与筛选 */
.list-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.search { flex: 1; min-width: 0; min-height: 44px; font-size: 15px; }
.ico-btn { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--green-l); font-size: 18px; display: flex; align-items: center; justify-content: center; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters select { flex: 1; min-width: 110px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font-size: 14px; background: #fff; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; }

/* 桌面表格 */
.table-lg { display: none; }
@media (min-width: 1024px) {
  .table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
  .table-lg { display: block; }
  .oc-mobile { display: none; }
  .tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
  .tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--gray-l); white-space: nowrap; }
  .tbl th { background: var(--gray-l); color: var(--gray); font-weight: 600; font-size: 13px; }
  .tbl tbody tr { cursor: pointer; }
  .tbl tbody tr:hover { background: var(--green-l); }
  .tbl tbody tr:last-child td { border-bottom: 0; }
}
/* 手机卡片列表 */
.order-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.order-card:active { background: var(--green-l); }
.oc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.oc-no { font-weight: 600; font-size: 15px; }
.oc-main { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.oc-sp { font-size: 15px; font-weight: 500; color: var(--green-d); min-width: 0; }
.oc-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.oc-count { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 状态徽章 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-s { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px; line-height: 1.6; vertical-align: 1px; }
.b-red { background: var(--red-l); color: var(--red); }
.b-amber { background: var(--amber-l); color: var(--amber); }
.b-blue { background: var(--blue-l); color: var(--blue); }
.b-green { background: var(--green-l); color: var(--green-d); }
.b-teal { background: #e0f2f1; color: #00695c; }
.b-gray { background: var(--gray-l); color: var(--gray); }

/* 图表卡 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat .v { font-size: 28px; font-weight: 700; line-height: 1.1; }
.stat .t { font-size: 13px; color: var(--muted); margin-top: 4px; }
.chart { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.c-h { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* 工单详情 */
.detail-head { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.dh-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dh-no { font-size: 18px; font-weight: 600; }
.dh-sp { font-size: 16px; font-weight: 500; color: var(--green-d); margin-top: 6px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; }
.dh-sub { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; gap: 10px 16px; flex-wrap: wrap; }
.sec { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--gray-l); font-weight: 600; font-size: 15px; }
.sec-h .step { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; margin-right: 6px; }
.sec-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.kv { display: flex; gap: 10px; padding: 3px 0; font-size: 14px; }
.kv .k { width: 76px; flex: none; color: var(--muted); font-size: 13px; padding-top: 1px; }
.kv .v { flex: 1; min-width: 0; }
.photo-del { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.3); }

/* 物种分组（列表折叠） */
.grp-head { display: flex; align-items: center; gap: 4px; padding: 11px 14px; cursor: pointer; background: var(--gray-l); border-bottom: 1px solid var(--line); user-select: none; }
.grp-item { display: flex; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.grp-item:last-child { border-bottom: 0; }
.sp-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.cat-chip { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 11px; background: var(--green-l); color: var(--green-d); }

/* 地图/物种搜索 */
.map-pick-btn { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--green-l); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.map-modal { max-height: 92vh; }
.map-kw { flex: 1; min-width: 0; min-height: 40px; padding: 0 10px; font-size: 15px; }
.map-result { padding: 8px 10px; border-bottom: 1px solid var(--gray-l); font-size: 14px; cursor: pointer; }
.map-result:active { background: var(--green-l); }
.sp-result { padding: 9px 12px; border-bottom: 1px solid var(--gray-l); font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sp-result:active { background: var(--green-l); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 16px; padding: 18px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { font-size: 16px; }
.modal-x { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-l); color: var(--gray); font-size: 14px; flex: none; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 300; background: rgba(33,33,33,.92); color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 999px; max-width: 86vw; text-align: center; pointer-events: none; }

/* ---- 收容物资（2026-09-06 合并） ---- */
.b-mtl{background:var(--green-l);color:var(--green-d)}
.stk{font-size:12px;padding:1px 9px;border-radius:999px;font-weight:500;margin-left:8px;flex:none;vertical-align:middle}
.stk-ok{background:var(--green-l);color:var(--green-d)}
.stk-0{background:var(--red-l);color:var(--red)}

/* ---- 导航栏底部版权/版本信息（2026-09-09） ---- */
.side .inner { min-height: calc(100vh - 32px); }
.side-copy, .d-copy { font-size: 11px; color: var(--muted); line-height: 1.8; text-align: center; }
.side-copy { padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 0; }
.d-copy { border-top: 1px solid var(--line); padding: 10px 14px 14px; }
/* 页脚备案号链接：随页脚配色，悬停下划线 */
.copy-icp { color: inherit; text-decoration: none; }
.copy-icp:hover { text-decoration: underline; }
/* 导航底部贴底细化：抽屉 flex 下各项不压缩、登录块占底部 */
.drawer > * { flex-shrink: 0; }
.drawer .side-user, .side .side-user { margin-top: auto; }
.side .inner { min-height: calc(100vh - 32px); justify-content: flex-start; }
.side-copy { border-top: 1px dashed var(--line); margin-top: 6px; }

/* ---- 导航品牌居中（2026-09-11）---- */
.side .brand { text-align: center; }
.drawer .d-head { text-align: center; }
