/* ============================================================
   我丢 (wodiu.com.cn) 全局样式
   简洁大气 · 深青绿 · 留白 · 精细排版
   ============================================================ */
:root {
  --brand: #16a34a;        /* 品牌绿(主色) */
  --brand-dark: #15803d;
  --brand-light: #dcfce7;  /* 浅绿 */
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f8f7;
  --card: #ffffff;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.04);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .1px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1,h2,h3,h4 { color: #0b1216; letter-spacing: -.2px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部栏 ---------- */
.topbar { background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; box-shadow: 0 4px 10px rgba(22,163,74,.25); }
.brand .brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.5px; color: #0b1216; }
.brand .tagline { font-size: 12px; color: var(--muted); margin-left: 2px; font-weight: 400; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 14px; border-radius: 9px; font-size: 15px; color: var(--muted); font-weight: 500; transition: .15s; }
.nav a:hover { color: var(--brand-dark); background: var(--brand-light); }
.nav a.active { background: var(--brand); color: #fff; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu .name { font-size: 14px; font-weight: 600; color: var(--ink); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; background-size: cover; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; transition: .16s; }
.btn:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,.22); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-danger { border-color: #fca5a5; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; }
.btn-white { background: #fff; color: var(--brand-dark); border: none; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 卡片 / 网格 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .grid.cols-3 { grid-template-columns: 1fr; } .grid.cols-2 { grid-template-columns: 1fr; } }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--muted); letter-spacing: .2px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font-size: 15px; background: #fff; font-family: inherit; transition: .15s; color: var(--ink); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
textarea { resize: vertical; min-height: 82px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 页头 ---------- */
.page-head { margin: 28px 0 20px; }
.page-head h1 { font-size: 24px; margin: 0 0 4px; font-weight: 800; }
.page-head p { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- 首页 hero ---------- */
.hero { background: linear-gradient(135deg, #16a34a, #15803d 62%, #166534); color: #fff; border-radius: 20px; padding: 48px 40px; margin: 22px 0 26px; position: relative; overflow: hidden; }
.hero:after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); }
.hero h1 { font-size: 34px; margin: 0 0 12px; font-weight: 800; letter-spacing: -.8px; color: #fff; }
.hero p { font-size: 16px; opacity: .9; margin: 0 0 24px; max-width: 540px; }
.hero .btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 特性 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 8px 0 24px; }
@media (max-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.step .num { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 15px; margin: 0 0 4px; }
.step p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- 列表项 ---------- */
.list-item { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 12px; transition: .15s; }
.list-item:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.list-item .icon { font-size: 26px; }
.list-item .title { font-weight: 600; font-size: 15px; color: var(--ink); }
.list-item .title:hover { color: var(--brand-dark); }
.list-item .sub { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta { font-size: 13px; color: var(--muted); margin-top: 5px; }
.list-item .body { flex: 1; min-width: 0; }

/* ---------- 状态标记 ---------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.badge.green { background: #dcfce7; color: #15803d; }
.badge.orange { background: #fef3c7; color: #b45309; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.gray { background: #f1f2f4; color: var(--muted); }
.badge.blue { background: #e0f0ff; color: #1d4ed8; }

.price { color: var(--danger); font-weight: 700; }
.amount { color: var(--danger); font-weight: 700; }

/* ---------- 提示/Toast ---------- */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 12px 22px; border-radius: 12px; background: rgba(16,24,40,.92); color: #fff; font-size: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.18); animation: slideIn .25s; backdrop-filter: blur(6px); }
.toast.ok { background: rgba(22,163,74,.94); }
.toast.err { background: rgba(239,68,68,.94); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 标签页 / 空状态 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 42px; opacity: .8; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; color: var(--muted); }
.tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(16,24,40,.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px); }
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 24px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
@media (min-width: 600px) { .modal-mask { align-items: center; } .modal { border-radius: 18px; } }
.modal h3 { margin: 0 0 16px; }
.close-x { float: right; cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }

/* ---------- 页脚 ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 44px; padding: 26px 0; color: var(--muted); font-size: 13px; text-align: center; }
.main { min-height: 60vh; }

/* ---------- 管理后台 ---------- */
.admin-body { display: flex; min-height: 100vh; }
.admin-sidebar { width: 232px; background: #0f172a; color: #cbd5e1; padding: 22px 0; flex-shrink: 0; }
.admin-sidebar .logo { font-size: 20px; font-weight: 800; color: #fff; padding: 0 22px 22px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; gap: 10px; align-items: center; }
.admin-sidebar .logo .logo-badge { width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.admin-sidebar .logo .en { font-size: 11px; color: #94a3b8; display: block; font-weight: 400; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 13px 22px; color: #94a3b8; font-size: 14px; }
.admin-nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.admin-nav a.active { background: rgba(22,163,74,.85); color: #fff; }
.admin-main { flex: 1; padding: 26px; overflow: auto; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-top h1 { font-size: 20px; margin: 0; }
@media (max-width: 760px) { .admin-sidebar { width: 64px; } .admin-sidebar .logo span.en, .admin-sidebar .logo .txt { display: none; } .admin-nav a { padding: 12px; justify-content: center; } .admin-nav a .lab { display: none; } }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border-radius: 14px; padding: 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 800; margin-top: 6px; }
.stat .value.green { color: var(--brand-dark); }
.stat .value.orange { color: #b45309; }

/* ---------- 表格 ---------- */
.table-wrap { background: #fff; border-radius: 14px; border: 1px solid var(--line); overflow: auto; box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: #fafbfc; font-weight: 600; color: var(--muted); font-size: 13px; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #fbfcfd; }
table.data td .btn { margin-right: 6px; }

/* ---------- 加载 ---------- */
.loading { text-align: center; color: var(--muted); padding: 44px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 路线规划（按楼聚合站点） ---------- */
.route-stop { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow); }
.stop-head { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--brand-light); border-bottom: 1px solid var(--line); }
.stop-no { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.stop-addr { flex: 1; min-width: 0; }
.stop-title { font-weight: 700; font-size: 15px; color: var(--ink); }
.stop-right { text-align: right; flex-shrink: 0; }
.stop-orders { padding: 6px 18px; }
.mini-order { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.mini-order:last-child { border-bottom: none; }
.mini-icon { font-size: 20px; }
.mini-info { font-size: 14px; color: var(--ink); }

/* ---------- 上门时段按钮 ---------- */
.slot-group { display: flex; gap: 10px; flex-wrap: wrap; }
.slot-btn { padding: 10px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 14px; cursor: pointer; transition: .15s; color: var(--muted); }
.slot-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.slot-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 工具类 ---------- */
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.section-title { font-size: 16px; font-weight: 700; margin: 26px 0 14px; color: var(--ink); }
.num { font-weight: 700; }

/* ---------- 移动端适配（手机） ---------- */
* { -webkit-tap-highlight-color: transparent; }
@media (max-width: 720px) {
  .brand .tagline { display: none; }
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 10px; }
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .nav a { white-space: nowrap; }
  .user-menu { order: 2; margin-left: auto; }
  .container { padding: 0 16px; }
  .page-head h1 { font-size: 21px; }
  .hero { padding: 32px 22px; } .hero h1 { font-size: 25px; }
  input, select, textarea { font-size: 16px !important; }
  .btn, .slot-btn { min-height: 42px; }
  .stop-head { flex-wrap: wrap; }
  .mini-info { font-size: 13px; }
  .admin-main { padding: 14px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  table.data th, table.data td { padding: 9px 10px; font-size: 13px; }
}
@media (max-width: 480px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
