* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
a { text-decoration: none; color: #2563eb; }

/* 整体布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: #1f2937; color: #cbd5e1; flex-shrink: 0; }
.logo { height: 56px; line-height: 56px; text-align: center; color: #fff; font-size: 17px; font-weight: bold; background: #111827; }
.menu { padding: 12px 0; }
.menu-item { display: block; padding: 13px 24px; color: #cbd5e1; border-left: 3px solid transparent; }
.menu-item:hover { background: #374151; color: #fff; }
.menu-item.active { background: #374151; color: #fff; border-left-color: #2563eb; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.topbar-title { font-size: 16px; font-weight: bold; }
.topbar-right { display: flex; align-items: center; gap: 12px; color: #666; }
.topbar-right form { display: inline; }
.content { padding: 20px 24px; }

/* 卡片/表格 */
.card { background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; white-space: nowrap; }
th { background: #f8fafc; font-weight: 600; color: #475569; }
tr:hover td { background: #f8fafc; }
.table-wrap { background: #fff; border-radius: 8px; overflow: auto; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pagination { margin-top: 14px; }
.pagination nav { display: inline-block; }

/* 按钮 */
.btn { display: inline-block; padding: 7px 16px; border: 1px solid #d1d5db; background: #fff; color: #374151; border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1.4; }
.btn:hover { border-color: #2563eb; color: #2563eb; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-danger { color: #dc2626; border-color: #fca5a5; }
.btn-danger:hover { background: #fef2f2; color: #dc2626; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-light { background: #f3f4f6; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: #374151; }
.form-group .hint { font-weight: normal; color: #94a3b8; font-size: 12px; margin-left: 8px; }
.form-control { width: 100%; max-width: 420px; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
select.form-control { max-width: 200px; }
.form-control:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.error-text { color: #dc2626; font-size: 12px; margin-top: 4px; }
.form-actions { margin-top: 22px; display: flex; gap: 10px; }
.required::before { content: "* "; color: #dc2626; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 22px; transition: .2s; }
.slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: #16a34a; }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 提示条 */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* 颜色点 */
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.3); vertical-align: middle; margin-right: 6px; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.login-box { background: #fff; border-radius: 12px; padding: 34px 34px 28px; width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.login-box h1 { font-size: 19px; text-align: center; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: #94a3b8; font-size: 12px; margin-bottom: 22px; }
.login-box .form-control { max-width: none; }

/* 底图点选 */
.map-picker { margin-top: 8px; max-width: 560px; }
.map-picker img { width: 100%; display: block; border: 1px solid #d1d5db; border-radius: 6px; cursor: crosshair; }
.map-picker-tip { font-size: 12px; color: #64748b; margin-top: 6px; }
.coord-row { display: flex; gap: 16px; }
.coord-row .form-group { flex: 1; }
.coord-row .form-control { max-width: 200px; }
