/* 龙门镖局 LMBJ · 共享样式 */
:root {
  --red: #b91c1c; --red-d: #991b1b; --red-l: #fef2f2;
  --ink: #1a1a1a; --ink-2: #525252; --ink-3: #8a8a8a;
  --line: #e7e5e4; --bg: #faf9f7; --card: #ffffff;
  --ok: #15803d; --ok-l: #f0fdf4; --warn: #b45309; --warn-l: #fffbeb;
  --info: #1d4ed8; --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--red); text-decoration: none; }

/* 品牌印章 */
.lm-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; background: var(--red);
  color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -1px;
  box-shadow: var(--shadow);
}
.lm-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.lm-brand .sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }

/* 按钮 */
.btn { border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 14px; border-radius: 8px; font-weight: 550; transition: .12s; }
.btn:hover { border-color: #d6d3d1; background: #fafafa; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-d); border-color: var(--red-d); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }

/* 输入 */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff;
  color: var(--ink); outline: none; transition: .12s; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-l); }
textarea { resize: vertical; min-height: 90px; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); }
.card-pad { padding: 18px; }

/* 徽章/状态 */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; }
.b-submitted { background: #eff6ff; color: var(--info); }
.b-needs_review { background: var(--warn-l); color: var(--warn); }
.b-ready { background: var(--red-l); color: var(--red); }
.b-entered { background: var(--ok-l); color: var(--ok); }
.b-exported { background: #f5f3ff; color: #6d28d9; }
.b-cancelled { background: #f5f5f4; color: var(--ink-3); }

/* toast */
.lm-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.lm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.lm-toast.ok { background: var(--ok); } .lm-toast.err { background: var(--red); }

/* 登录页 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 500px at 50% -10%, #fff 0%, var(--bg) 60%); }
.login-card { width: 100%; max-width: 380px; padding: 30px 28px; }
.login-card h1 { font-size: 20px; margin: 14px 0 4px; }
.login-card .muted { color: var(--ink-3); font-size: 13px; margin-bottom: 22px; }

/* 顶栏 */
.topbar { height: 56px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 50; }
.topbar .who { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 12px; }

/* admin 布局 */
.shell { display: grid; grid-template-columns: 200px 1fr; min-height: calc(100vh - 56px); }
.side { background: var(--card); border-right: 1px solid var(--line); padding: 16px 10px; }
.side .nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 8px;
  color: var(--ink-2); font-weight: 550; cursor: pointer; margin-bottom: 2px; }
.side .nav-item:hover { background: #f5f5f4; }
.side .nav-item.active { background: var(--red-l); color: var(--red); }
.main { padding: 22px 26px; overflow: auto; }
.page-title { font-size: 18px; font-weight: 650; margin: 0 0 16px; }

/* 看板卡 */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { padding: 16px; }
.metric .n { font-size: 26px; font-weight: 700; }
.metric .l { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* 订单池工作台 */
.pool { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: end; }
.filters .field { min-width: 120px; }
.order-list { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 240px); overflow: auto; }
.date-sep { font-size: 12px; color: var(--ink-3); font-weight: 650; padding: 12px 4px 6px; position: sticky; top: 0; background: var(--bg); }
.order-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; cursor: pointer; transition: .1s; }
.order-row:hover { border-color: #d6d3d1; }
.order-row.sel { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-l); }
.order-row .main-info { flex: 1; min-width: 0; }
.order-row .ln1 { font-weight: 600; }
.order-row .ln2 { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 复制面板 */
.copy-panel { position: sticky; top: 78px; }
.copy-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f5f5f4; }
.copy-row .ck { width: 64px; font-size: 12px; color: var(--ink-3); flex: none; }
.copy-row .cv { flex: 1; min-width: 0; word-break: break-word; }
.copy-row .cv.empty { color: #d4d4d4; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }

/* 表格 */
table.lm { width: 100%; border-collapse: collapse; }
table.lm th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.lm td { padding: 11px 10px; border-bottom: 1px solid #f5f5f4; }
table.lm tr:hover td { background: #fafafa; }

/* 客户页 */
.cust-wrap { max-width: 720px; margin: 0 auto; padding: 24px 18px 60px; }
.paste-zone { border: 2px dashed var(--line); border-radius: 10px; min-height: 120px; padding: 14px;
  display: grid; place-items: center; text-align: center; color: var(--ink-3); cursor: pointer; background: #fff; }
.paste-zone.has { border-color: var(--ok); color: var(--ink-2); background: var(--ok-l); }
.paste-zone:focus { outline: none; border-color: var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; place-items: center; z-index: 200; padding: 20px; }
.modal.show { display: grid; }
.modal img { max-width: 90vw; max-height: 88vh; border-radius: 8px; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 20px; }
.hint { font-size: 12.5px; color: var(--ink-3); }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .pool { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
