/* 溢美荷花 · 网页管理后台（V2 墨绿侧栏 + 简笔荷花） */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #F3F7F4; color: #333; font-size: 14px; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: url(assets/lotus-line-faint.png) no-repeat center 10% / 460px,
  linear-gradient(165deg, #E7F3EB 0%, #F4FAF5 48%, #DCEDE2 100%); }
.login-card { background: #fff; border-radius: 16px; padding: 48px 44px; width: 400px; text-align: center;
  box-shadow: 0 16px 48px rgba(23, 90, 60, 0.16); }
.login-logo { display: flex; justify-content: center; margin-bottom: 4px; }
.login-card h1 { font-size: 22px; color: #177A5C; margin: 12px 0 6px; }
.login-sub { color: #8FA89B; font-size: 13px; margin-bottom: 28px; }
.login-card input { width: 100%; height: 46px; border: 1px solid #D8E8DD; border-radius: 23px;
  padding: 0 20px; outline: none; margin-bottom: 16px; }
.login-card input:focus { border-color: #1F9E78; }
.login-msg { color: #D9534F; font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ---------- 框架 ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: 208px; background: linear-gradient(180deg, #1E4A38 0%, #153325 100%); color: #B9D6C6;
  flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { padding: 22px 20px 16px; font-size: 17px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px; }
.side-brand span { display: block; font-size: 12px; font-weight: 400; color: #8FB8A0; margin-top: 4px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #A9C9B8; text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side nav a.on { background: rgba(168,213,176,.16); color: #fff; border-left-color: #9FD3B4; }
.side nav a .ico { width: 20px; text-align: center; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: #F3F7F4 url(assets/lotus-line-faint.png) no-repeat calc(100% - 16px) calc(100% - 12px) / 360px;
  background-attachment: fixed; }
.topbar { height: 58px; background: #fff; border-bottom: 1px solid #E2EEE6; display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 50; }
.page-title { font-size: 17px; font-weight: 700; color: #1E4A38; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.warn-badge { color: #D98E00; background: #FCF0D5; border-radius: 12px; padding: 4px 12px; font-size: 12px; }
.content { padding: 24px; }

/* ---------- 通用组件 ---------- */
.card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 18px; box-shadow: 0 4px 14px rgba(31,120,90,.07); }
.card h3 { font-size: 15px; margin-bottom: 14px; padding-left: 10px; border-left: 4px solid #177A5C; color: #1E4A38; }
.btn { border: none; border-radius: 8px; height: 38px; padding: 0 18px; font-size: 14px; }
.btn-red { background: linear-gradient(90deg,#27B086,#177A5C); color: #fff; }
.btn-teal { background: #1F9E78; color: #fff; }
.btn-blue { background: #2E7CF6; color: #fff; }
.btn-line { background: #fff; color: #177A5C; border: 1px solid #177A5C; }
.btn-gray { background: #eee; color: #666; }
.btn-yellow { background: #FCF0D5; color: #D98E00; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.login-card .btn { width: 100%; height: 46px; border-radius: 23px; font-size: 15px; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { height: 36px; border: 1px solid #D8E8DD; border-radius: 8px; padding: 0 12px; outline: none; background: #fff; }
.toolbar input:focus, .toolbar select:focus { border-color: #1F9E78; }
.toolbar .spacer { flex: 1; }

table.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #EDF4EF; font-size: 13px; vertical-align: middle; }
.tbl th { color: #6E8A7C; font-weight: 600; background: #F2F8F4; white-space: nowrap; }
.tbl tr:hover td { background: #F6FAF7; }
.tbl .ops { white-space: nowrap; }
.tbl .ops button { margin-right: 6px; }

.empty { text-align: center; color: #A3BDB0; padding: 42px 0; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; margin-right: 4px; }
.t-red { background: #FDE2E5; color: #D9534F; } .t-teal { background: #DDF3EC; color: #1F9E78; }
.t-yellow { background: #FCF0D5; color: #D98E00; } .t-blue { background: #DFEAFD; color: #2E7CF6; }
.t-green { background: #DFF2E3; color: #34A853; } .t-gray { background: #eee; color: #999; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: 12px; padding: 18px 20px; box-shadow: 0 4px 14px rgba(31,120,90,.07); }
.stat-card .num { font-size: 30px; font-weight: 700; color: #177A5C; }
.stat-card .lbl { color: #6E8A7C; font-size: 13px; margin-top: 4px; }
.stat-card.clickable { cursor: pointer; } .stat-card.clickable:hover { box-shadow: 0 8px 22px rgba(31,158,120,.2); }
/* 看板：待办高亮 + 分区标题副注 */
.stat-card.warn { border: 1px solid #F3C2C9; background: linear-gradient(180deg,#FFF5F6,#fff); }
.stat-card.warn .num { color: #D9303F; }
.dash-h3-sub { font-size: 12px; color: #9db4a7; font-weight: 400; margin-left: 10px; }
/* 类型申请审核：材料图片缩略图 */
.proof-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; margin-right: 6px; cursor: zoom-in; border: 1px solid #e3ece6; vertical-align: middle; }

.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tabs .tab { padding: 8px 20px; border-radius: 20px; background: #fff; color: #6E8A7C; cursor: pointer; font-size: 14px; border: 1px solid #DEEBE2; }
.tabs .tab.on { background: linear-gradient(90deg,#27B086,#177A5C); color: #fff; border-color: transparent; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,40,28,.45); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 14px; width: 640px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
.modal-head { padding: 16px 22px; border-bottom: 1px solid #EDF4EF; font-size: 16px; font-weight: 700; color: #1E4A38; display: flex; justify-content: space-between; align-items: center; }
.modal-head .x { cursor: pointer; color: #bbb; font-size: 20px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid #EDF4EF; display: flex; justify-content: flex-end; gap: 10px; }

.f-item { margin-bottom: 14px; }
.f-label { display: block; font-size: 13px; color: #56705F; margin-bottom: 6px; font-weight: 600; }
.f-label .req { color: #D9534F; }
.f-item input[type=text], .f-item input[type=number], .f-item input[type=password],
.f-item input[type=datetime-local], .f-item input[type=month], .f-item select, .f-item textarea {
  width: 100%; border: 1px solid #D8E8DD; border-radius: 8px; padding: 9px 12px; outline: none; background: #fff; }
.f-item textarea { min-height: 90px; resize: vertical; }
.f-item input:focus, .f-item textarea:focus, .f-item select:focus { border-color: #1F9E78; }
.f-checks { display: flex; gap: 14px; flex-wrap: wrap; }
.f-checks label { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.f-inline { display: flex; gap: 12px; } .f-inline > * { flex: 1; }

.toast { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); background: rgba(21,51,37,.92);
  color: #fff; padding: 10px 26px; border-radius: 22px; font-size: 14px; z-index: 300; opacity: 0; transition: opacity .25s; pointer-events: none; }
.toast.show { opacity: 1; }

.kv { display: grid; grid-template-columns: 110px 1fr; row-gap: 8px; font-size: 13px; }
.kv b { color: #6E8A7C; font-weight: 600; }
.diff-box { background: #F2F8F4; border-radius: 8px; padding: 14px; margin-top: 10px; font-size: 13px; }
.mono { font-family: Consolas, monospace; font-size: 12px; }
.link { color: #2E7CF6; cursor: pointer; text-decoration: underline; }

/* ---------- 看板 2x2 大字号 ---------- */
.stat-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-grid-2 .stat-card { padding: 26px 24px; }
.stat-grid-2 .stat-card .num { font-size: 44px; }
.stat-grid-2 .stat-card .lbl { font-size: 15px; margin-top: 8px; }

/* ---------- 快捷选择 chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { padding: 5px 14px; border-radius: 16px; background: #EDF5F0; color: #56705F; font-size: 12px;
  cursor: pointer; border: 1px solid transparent; user-select: none; }
.chip:hover { border-color: #1F9E78; color: #177A5C; }
.chip.on { background: #DDF3EC; color: #177A5C; border-color: #1F9E78; }

/* ---------- 图片选择器 ---------- */
.img-picker { border: 2px dashed #CBE2D4; border-radius: 10px; padding: 14px; text-align: center;
  color: #8FA89B; font-size: 13px; cursor: pointer; transition: border-color .2s; background: #FBFDFC; }
.img-picker:hover, .img-picker.drag { border-color: #1F9E78; color: #177A5C; }
.img-picker .thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; justify-content: flex-start; }
.img-picker .thumb { position: relative; width: 86px; height: 86px; border-radius: 8px; overflow: hidden; border: 1px solid #DEEBE2; }
.img-picker .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-picker .thumb .del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; }

/* ---------- 界面UI管理 ---------- */
.ui-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ui-slot { border: 1px solid #DEEBE2; border-radius: 12px; padding: 14px; background: #FBFDFC; }
.ui-slot-prev { height: 84px; border-radius: 8px; background: #EDF5F0; display: flex; align-items: center;
  justify-content: center; overflow: hidden; margin-bottom: 10px; }
.ui-slot-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ui-slot-def { color: #A3BDB0; font-size: 12px; }
.ui-slot-name { font-weight: 700; font-size: 14px; }
.ui-slot-where { color: #6E8A7C; font-size: 12px; margin-top: 4px; line-height: 1.5; }
.ui-slot-hint { color: #A3BDB0; font-size: 11px; margin-top: 2px; }
.ui-slot-ops { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.ui-slot-ops label { cursor: pointer; }
.img-picker .uping { font-size: 12px; color: #D98E00; margin-top: 8px; }

/* ---------- 文件拖入导入区 ---------- */
.drop-zone { border: 2px dashed #CBE2D4; border-radius: 12px; padding: 26px; text-align: center;
  color: #8FA89B; background: #FBFDFC; font-size: 14px; cursor: pointer; transition: all .2s; }
.drop-zone:hover, .drop-zone.drag { border-color: #1F9E78; background: #EFF8F2; color: #177A5C; }
.drop-zone .dz-ico { font-size: 30px; margin-bottom: 8px; }
.drop-zone small { display: block; margin-top: 8px; color: #A3BDB0; font-size: 12px; }

/* ---------- 时长与签到码 ---------- */
.dur-badge { display: inline-block; background: #DFEAFD; color: #2E7CF6; border-radius: 10px; padding: 2px 10px; font-size: 12px; }
.code-badge { display: inline-block; background: #173B2C; color: #CDE8D2; border-radius: 8px; padding: 2px 10px;
  font-family: Consolas, monospace; font-size: 15px; letter-spacing: 2px; }
.mode-note { background: #F2F8F4; border-left: 4px solid #1F9E78; border-radius: 8px; padding: 12px 14px;
  font-size: 13px; color: #56705F; margin-bottom: 14px; line-height: 1.8; }
.pt-input { width: 90px !important; display: inline-block !important; margin: 0 6px; }
.tbl .thumb-s { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 4px; border: 1px solid #DEEBE2; }

/* 地图选点标记 */
.map-pin { font-size: 28px; line-height: 28px; text-align: center; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
/* Leaflet 弹层层级（避免盖住后台弹窗按钮） */
.leaflet-pane, .leaflet-top, .leaflet-bottom { z-index: 1 !important; }

/* ===== 地图选点独立悬浮层（叠在表单弹窗 z-index:200 之上） ===== */
#map-modal-root .map-mask { position: fixed; inset: 0; background: rgba(15,40,28,.55); z-index: 400; }
#map-modal-root .map-panel { position: fixed; z-index: 401; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(760px, 94vw); background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.28); display: flex; flex-direction: column; }
#map-modal-root .map-head { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid #EDF4EF; font-size: 16px; color: #1E4A38; }
#map-modal-root .map-close { cursor: pointer; color: #999; font-size: 18px; padding: 2px 8px; }
#map-modal-root .map-close:hover { color: #333; }
#map-modal-root .map-search { position: relative; padding: 10px 14px; border-bottom: 1px solid #f5f5f5; }
#map-modal-root .map-search input { width: 100%; padding: 10px 12px; border: 1px solid #D8E8DD;
  border-radius: 8px; font-size: 14px; outline: none; box-sizing: border-box; }
#map-modal-root .map-search input:focus { border-color: #1F9E78; }
#map-modal-root .map-tips { position: absolute; left: 14px; right: 14px; top: 100%; z-index: 402;
  background: #fff; border: 1px solid #eee; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12);
  max-height: 260px; overflow: auto; }
#map-modal-root .map-tip { padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f6f6f6;
  display: flex; flex-direction: column; gap: 2px; }
#map-modal-root .map-tip:last-child { border-bottom: 0; }
#map-modal-root .map-tip:hover { background: #F2F8F4; }
#map-modal-root .map-tip b { font-size: 14px; color: #333; font-weight: 600; }
#map-modal-root .map-tip span { font-size: 12px; color: #999; }
#map-modal-root .map-addr { display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-top: 1px solid #EDF4EF; font-size: 14px; color: #333; }
#map-modal-root .map-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 10px 14px 14px; }
#map-modal-root .map-foot span { margin-right: auto; }

/* ---------- 政策内容预览（手机端效果） ---------- */
.pv-wrap { margin-top: 10px; }
.pv-title { font-size: 12px; color: #8FA89B; margin-bottom: 6px; }
.pv-box { background: #FBFDFC; border: 1px solid #DEEBE2; border-radius: 10px; padding: 18px 20px;
  max-height: 320px; overflow-y: auto; }
.pv-p { font-size: 14px; line-height: 1.9; color: #4a3f3a; margin-bottom: 14px; }
.pv-p:last-child { margin-bottom: 0; }
.pv-h { font-size: 15px; font-weight: 600; color: #177A5C; margin: 20px 0 10px; }
.pv-h:first-child { margin-top: 0; }
