/* 护航点单 · 俱乐部后台样式
   深色侧边栏 + 浅色内容区，浅蓝主题色（与前台 H5 同一套色板） */

:root {
  --brand: #1796f0;
  --brand-2: #5dbbff;
  --brand-dark: #0b7ed8;
  --brand-soft: #f2f7ff;
  --dark: #0f172e;
  --dark-2: #16213c;
  --dark-line: #243149;
  --bg: #f8fbff;
  --text: #10213a;
  --muted: #8291a8;
  --line: #dbeafe;
  --ok: #12b886;
  --warn: #f59f00;
  --danger: #e04040;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
img { max-width: 100%; display: block; }

/* ---------- 布局（外壳见 shell.css） ---------- */
.app { display: flex; min-height: 100vh; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.site-chip {
  background: #eef1ff; color: var(--brand); padding: 6px 12px; border-radius: 20px;
  font-size: 12.5px; font-weight: 600;
}
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px;
}

.content { padding: 22px; flex: 1; }

/* ---------- 卡片 / 统计 ---------- */
.card { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 2px 10px rgba(20, 30, 60, .05); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-head .desc { font-size: 12px; color: var(--muted); margin-top: 3px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat {
  background: #fff; border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(20,30,60,.05); position: relative; overflow: hidden;
}
.stat::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px;
  border-radius: 50%; background: rgba(77,107,254,.08);
}
.stat .label { font-size: 12.5px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: -.5px; }
.stat .value .unit { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat .foot { margin-top: 6px; font-size: 12px; color: var(--muted); }
.stat.brand .value { color: var(--brand); }
.stat.ok .value { color: var(--ok); }
.stat.warn .value { color: var(--warn); }

/* ---------- 表格 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }

.input, .select, .textarea {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 9px 12px; outline: none; transition: .16s; color: var(--text);
  height: 38px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(77,107,254,.12); }
.textarea { height: auto; min-height: 90px; resize: vertical; line-height: 1.7; }
.input-sm { height: 32px; padding: 6px 10px; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--text); cursor: pointer; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: #cfd7e8; background: #fafbff; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none; color: #fff; box-shadow: 0 6px 16px rgba(77,107,254,.3);
}
.btn-primary:hover { filter: brightness(1.05); background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.btn-danger { color: var(--danger); border-color: #ffdada; background: #fff5f5; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left; padding: 11px 12px; color: var(--muted); font-weight: 500;
  border-bottom: 1px solid var(--line); background: #fafbfe; white-space: nowrap;
}
table.table td { padding: 12px; border-bottom: 1px solid #f2f4f9; vertical-align: middle; }
table.table tbody tr:hover { background: #fafbff; }
table.table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: #4b556e; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; line-height: 18px; }
.badge-gray { background: #f1f3f8; color: #6b7590; }
.badge-blue { background: #eef1ff; color: var(--brand); }
.badge-green { background: #e6fbf3; color: #0ca678; }
.badge-orange { background: #fff4e6; color: #e8590c; }
.badge-red { background: #fff0f0; color: #e03131; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }
.pagination { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(12, 18, 34, .45);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 560px; max-width: 100%;
  max-height: 88vh; overflow: auto; box-shadow: 0 20px 60px rgba(10, 16, 33, .25);
}
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 15px; }
.modal-head .close { cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.form-row .input, .form-row .select, .form-row .textarea { width: 100%; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-tip { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- 提示 ---------- */
.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: rgba(20, 26, 44, .92); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: toastIn .2s ease;
}
.toast.err { background: rgba(224, 49, 49, .95); }
.toast.ok { background: rgba(12, 166, 120, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff;
}
.login-left {
  background: radial-gradient(120% 120% at 10% 10%, #25326b 0%, #131a35 45%, #0b0f1d 100%);
  color: #fff; padding: 56px 60px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.login-left::before, .login-left::after {
  content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(120,150,255,.22);
}
.login-left::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.login-left::after { width: 260px; height: 260px; right: -40px; bottom: -90px; background: rgba(109, 137, 255, .08); }
.login-left .badge-line { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: #93a4e8; margin-bottom: 22px; }
.login-left .badge-line span { width: 6px; height: 6px; border-radius: 50%; background: #6d89ff; box-shadow: 0 0 12px #6d89ff; }
.login-left h1 { font-size: 34px; letter-spacing: 1px; line-height: 1.35; }
.login-left p.desc { margin-top: 18px; font-size: 14.5px; color: #98a5c8; line-height: 1.9; max-width: 380px; }
.login-left .features { margin-top: 40px; display: flex; gap: 26px; position: relative; z-index: 2; }
.login-left .features div { font-size: 12.5px; color: #8b97ba; }
.login-left .features b { display: block; font-size: 22px; color: #fff; font-weight: 600; margin-bottom: 4px; }

.login-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-box { width: 360px; max-width: 100%; }
.login-box .hello { font-size: 24px; font-weight: 600; }
.login-box .hello-sub { font-size: 13px; color: var(--muted); margin-top: 8px; margin-bottom: 28px; }
.login-box .form-row label { color: #5b6479; font-size: 13px; }
.login-box .input { height: 44px; }
.login-box .btn-primary { width: 100%; height: 46px; margin-top: 6px; font-size: 15px; }
.login-foot { margin-top: 22px; font-size: 12px; color: #9aa3b8; text-align: center; }

/* 滑块验证码 */
.slider {
  position: relative; height: 40px; background: #f4f6fb; border-radius: 10px;
  border: 1px solid var(--line); overflow: hidden; user-select: none;
}
.slider .track-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #dbe3ff; }
.slider .handle {
  position: absolute; left: 0; top: 0; width: 46px; height: 38px; background: #fff;
  border-radius: 9px; box-shadow: 0 2px 8px rgba(20,30,60,.12); cursor: grab;
  display: flex; align-items: center; justify-content: center; color: var(--brand);
  border: 1px solid #e5eaf6;
}
.slider .hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: #9aa3b8; pointer-events: none; }
.slider.done .track-fill { background: #d3f9e9; }
.slider.done .hint { color: #0ca678; }

/* 拼图区 */
.cap-wrap {
  position: relative; width: 100%; border-radius: 10px; overflow: hidden;
  background: var(--brand-soft); border: 1px solid var(--line);
  margin-bottom: 10px; height: auto; aspect-ratio: 320 / 150;
}
.cap-img { width: 100%; height: auto; display: block; }
.cap-piece {
  position: absolute; left: 0; top: 0; width: 48px; height: 48px;
  pointer-events: none; filter: drop-shadow(0 3px 8px rgba(0,0,0,.4));
}
.cap-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--muted); background: rgba(242,247,255,.86); cursor: pointer;
}

/* ---------- 图表 -------------*/
.chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.chart .bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar { width: 60%; max-width: 26px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--brand-2), var(--brand)); min-height: 4px; transition: height .3s; }
.chart .bar-item span { font-size: 11px; color: var(--muted); }

/* ---------- 订单详情抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(12,18,34,.4); display: none; z-index: 90; }
.drawer-mask.show { display: block; }
.drawer {
  position: fixed; top: 0; right: -560px; width: 560px; max-width: 100%; height: 100vh;
  background: #fff; z-index: 91; transition: right .25s ease; display: flex; flex-direction: column;
}
.drawer.show { right: 0; }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.detail-row { display: flex; padding: 9px 0; border-bottom: 1px dashed #eef1f7; font-size: 13.5px; }
.detail-row .k { width: 92px; color: var(--muted); flex: 0 0 92px; }
.detail-row .v { flex: 1; word-break: break-all; }
.timeline { margin-top: 16px; padding-left: 6px; }
.timeline .item { position: relative; padding-left: 18px; padding-bottom: 16px; border-left: 1px solid #e8ecf4; }
.timeline .item:last-child { border-left-color: transparent; }
.timeline .item::before { content: ''; position: absolute; left: -4px; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.timeline .item .t { font-size: 12px; color: var(--muted); }
.timeline .item .c { font-size: 13px; margin-top: 3px; }

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .app { flex-direction: column; }
  .content { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
}

/* ============ 总平台主题（金色点缀，区分身份） ============ */
.theme-platform .site-chip { background: #fdf4e3; color: #a97516; }
.theme-platform .login-left { background: radial-gradient(120% 120% at 10% 10%, #3b3320 0%, #1d1a12 45%, #0c0b08 100%); }
.theme-platform .login-left .badge-line span { background: #e8b95e; box-shadow: 0 0 12px #e8b95e; }
.theme-platform .login-box .btn-primary { background: linear-gradient(135deg, #d9a441, #e8b95e); box-shadow: 0 6px 16px rgba(217,164,65,.3); }

