* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, "Microsoft YaHei", sans-serif; background: #f5f7fa; color: #303133; }
a { color: #409eff; text-decoration: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: #1f2d3d; color: #fff; }
.brand { font-size: 20px; font-weight: 700; }
.brand .sub { font-size: 12px; font-weight: 400; color: #9fb0c3; margin-left: 8px; }
.topbar .link { color: #cdd9e5; font-size: 13px; }
.userbox { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.userbox #who { color: #cdd9e5; }

/* landing */
.landing { max-width: 960px; margin: 48px auto; text-align: center; padding: 0 16px; }
.landing h1 { font-size: 30px; margin-bottom: 8px; }
.landing .desc { color: #606266; margin-bottom: 32px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.role-card { background: #fff; border-radius: 12px; padding: 28px 18px; box-shadow: 0 4px 20px rgba(0,0,0,.06); transition: .2s; color: #303133; }
.role-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.role-card .emoji { font-size: 40px; }
.role-card h2 { margin: 10px 0 6px; }
.role-card p { color: #909399; font-size: 13px; }
.foot { text-align: center; color: #a8abb2; font-size: 12px; padding: 28px; }

/* auth */
.auth { max-width: 380px; margin: 56px auto; background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.auth h1 { text-align: center; margin: 0 0 16px; }
.tabs { display: flex; margin-bottom: 16px; border-bottom: 1px solid #ebeef5; }
.tab { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; font-size: 15px; color: #909399; }
.tab.active { color: #409eff; border-bottom: 2px solid #409eff; font-weight: 600; }
.card-form label { display: block; margin: 12px 0; font-size: 13px; color: #606266; }
.card-form input, .card-form textarea, .formbox input, .formbox select, .formbox textarea {
  width: 100%; padding: 9px 10px; margin-top: 4px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.msg { min-height: 18px; font-size: 13px; }
.msg.err { color: #f56c6c; }
.hint { text-align: center; font-size: 13px; color: #909399; margin-top: 14px; }

/* buttons */
.btn { padding: 9px 16px; border: none; border-radius: 6px; background: #409eff; color: #fff; cursor: pointer; font-size: 14px; }
.btn:hover { opacity: .9; }
.btn.primary { background: #409eff; }
.btn.ghost { background: transparent; color: #409eff; border: 1px solid #409eff; }
.btn.danger { background: #f56c6c; }
.btn.sm { padding: 5px 10px; font-size: 12px; }

/* dashboard */
.dash { display: flex; max-width: 1100px; margin: 20px auto; gap: 16px; padding: 0 16px; align-items: flex-start; }
.side { width: 170px; flex: none; background: #fff; border-radius: 10px; padding: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.nav { display: block; width: 100%; text-align: left; padding: 11px 14px; margin: 4px 0; border: none; background: none; border-radius: 6px; cursor: pointer; font-size: 14px; color: #606266; }
.nav:hover { background: #ecf5ff; }
.nav.active { background: #409eff; color: #fff; }
.content { flex: 1; background: #fff; border-radius: 10px; padding: 22px; box-shadow: 0 4px 16px rgba(0,0,0,.05); min-height: 360px; }
.content h2 { margin-top: 0; }
.loading { color: #909399; }

.tbl { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid #ebeef5; padding: 10px 8px; text-align: left; }
.tbl th { background: #fafafa; color: #606266; font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; background: #ecf5ff; color: #409eff; border-radius: 4px; font-size: 12px; }
.formbox { background: #f7f9fc; border: 1px solid #ebeef5; border-radius: 8px; padding: 14px; margin: 14px 0; }
.formbox label { display: block; margin: 8px 0; font-size: 13px; }

.cards2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 14px; }
.rec-card { border: 1px solid #ebeef5; border-radius: 10px; padding: 14px; background: #fff; }
.rec-card h3 { margin: 8px 0; }
.rec-card p { font-size: 13px; color: #606266; margin: 6px 0; }
.rec-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); padding: 10px 18px; border-radius: 8px; color: #fff; z-index: 99; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.toast.ok { background: #67c23a; }
.toast.err { background: #f56c6c; }

/* bell + notifications */
.bell { position: relative; background: none; border: none; font-size: 20px; cursor: pointer; }
.bell .badge { position: absolute; top: -6px; right: -8px; background: #f56c6c; color: #fff; font-size: 11px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; padding: 0 4px; text-align: center; }
.notif-panel { position: fixed; top: 60px; right: 20px; width: 340px; max-height: 70vh; overflow: auto; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 50; padding: 8px; }
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-bottom: 1px solid #ebeef5; font-weight: 600; }
.np-item { padding: 10px 8px; border-bottom: 1px solid #f2f4f7; cursor: pointer; }
.np-item.unread { background: #f0f7ff; }
.np-type { font-size: 12px; color: #409eff; font-weight: 600; }
.np-text { font-size: 13px; margin: 4px 0; color: #303133; }
.np-time { font-size: 11px; color: #a8abb2; }
.np-empty { padding: 20px; text-align: center; color: #a8abb2; }

/* thumbnails / images */
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; display: inline-block; }
.thumb.noimg { width: 64px; height: 48px; background: #ebeef5; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #a8abb2; font-size: 12px; }
.imgprev { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.imgprev .ip { position: relative; }
.imgprev .ip img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; }
.imgprev .ip .btn { position: absolute; top: 2px; right: 2px; padding: 2px 6px; font-size: 11px; }

/* search bar */
.search-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search-bar input { width: 160px; }
.rec-card .thumb { width: 100%; height: 150px; margin-bottom: 6px; }

/* map modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal[hidden] { display: none; }
.modal-box { background: #fff; border-radius: 12px; width: 90%; max-width: 760px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #ebeef5; font-weight: 600; }
.modal-head .btn { font-size: 20px; line-height: 1; padding: 2px 8px; }
#mapWrap { height: 420px; width: 100%; background: #ebeef5; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid #ebeef5; }
.map-addr { flex: 1; font-size: 12px; color: #606266; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-btn { margin-left: 4px; font-size: 12px; padding: 4px 8px; }

