/* admin-web/css/style.css
 * 凯达汽车精洗 · 管理后台高级质感主题
 * 深空蓝 + 渐变光效 + 玻璃拟态，统一所有既有类名
 */
:root {
  --primary: #2563EB;
  --primary-2: #3B82F6;
  --primary-3: #60A5FA;
  --primary-dark: #1D4ED8;
  --primary-grad: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  --accent: #F97316;
  --accent-2: #FB923C;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  --bg: #EEF2F7;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #94A3B8;
  --line: #E8EDF3;
  --line-strong: #DCE3EC;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .06);
  --shadow-pop: 0 8px 18px rgba(15, 23, 42, .08), 0 20px 50px rgba(15, 23, 42, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-bg: linear-gradient(180deg, #0B1220 0%, #0F1C33 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg); font-size: 14px; color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C6D0DD; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9AA8BC; }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
 * 登录页（深色渐变 + 动态光斑 + 玻璃卡片）
 * ========================================================= */
#loginOverlay {
  position: fixed; inset: 0; z-index: 1000;
  background: linear-gradient(150deg, #0A0F1E 0%, #0E1830 45%, #132548 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.login-bg { position: absolute; inset: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.blob-1 { width: 480px; height: 480px; left: -120px; top: -140px; background: radial-gradient(circle, #2563EB, transparent 70%); animation: float1 14s ease-in-out infinite; }
.blob-2 { width: 420px; height: 420px; right: -100px; bottom: -120px; background: radial-gradient(circle, #F97316, transparent 70%); animation: float2 18s ease-in-out infinite; }
.blob-3 { width: 380px; height: 380px; right: 18%; top: -160px; background: radial-gradient(circle, #7C3AED, transparent 70%); opacity: .4; animation: float1 22s ease-in-out infinite reverse; }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 50px) scale(1.08); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, -30px) scale(1.1); } }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.login-box {
  position: relative; z-index: 2;
  width: 420px; border-radius: 20px; padding: 42px 40px 26px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: loginIn .5s ease;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.login-logo { text-align: center; margin-bottom: 26px; }
.login-logo-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px;
  background: var(--primary-grad); display: flex; align-items: center; justify-content: center;
  font-size: 30px; box-shadow: 0 10px 26px rgba(37, 99, 235, .45);
  border: 1px solid rgba(255, 255, 255, .25);
}
.login-brand { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: 2px; }
.login-subtitle { font-size: 12.5px; color: rgba(226, 232, 240, .72); margin-top: 8px; letter-spacing: 1px; }
.login-error { color: #FDA4AF; font-size: 13px; min-height: 20px; margin-bottom: 6px; text-align: center; }
.login-box .form-group { margin-bottom: 18px; }
.login-box label { display: block; margin-bottom: 8px; color: rgba(226, 232, 240, .85); font-size: 13px; letter-spacing: .5px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .7; pointer-events: none; }
.login-box input {
  width: 100%; padding: 13px 16px 13px 42px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px; font-size: 14px; color: #fff;
  transition: all .2s;
}
.login-box input::placeholder { color: rgba(203, 213, 225, .55); }
.login-box input:focus {
  outline: none; border-color: var(--primary-3);
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .18);
}
.login-box button {
  width: 100%; padding: 14px; margin-top: 8px;
  background: var(--primary-grad); color: #fff; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700; letter-spacing: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, .4);
  transition: all .2s;
}
.login-box button:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 99, 235, .5); }
.login-box button:active { transform: translateY(0); }
.btn-arrow { letter-spacing: 0; transition: transform .2s; }
.login-box button:hover .btn-arrow { transform: translateX(4px); }
.login-foot { text-align: center; margin-top: 24px; font-size: 11.5px; color: rgba(148, 163, 184, .6); }

/* =========================================================
 * 布局：侧边栏 + 主区
 * ========================================================= */
#app { display: none; }
#app.show { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  background: var(--sidebar-bg); color: #fff;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-logo-icon {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: var(--primary-grad); display: flex; align-items: center; justify-content: center;
  font-size: 21px; box-shadow: 0 6px 16px rgba(37, 99, 235, .45);
  border: 1px solid rgba(255, 255, 255, .2);
}
.sidebar-logo-name { font-size: 16px; font-weight: 800; letter-spacing: 1px; }
.sidebar-logo-sub { font-size: 11px; color: rgba(148, 163, 184, .85); margin-top: 3px; letter-spacing: .5px; }

.sidebar-admin {
  display: flex; align-items: center; gap: 11px;
  margin: 14px 14px 4px; padding: 11px 13px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
}
.admin-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary-2), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  border: 2px solid rgba(255, 255, 255, .25);
  box-shadow: 0 4px 12px rgba(37, 99, 235, .4);
}
.admin-meta { display: flex; flex-direction: column; min-width: 0; }
.admin-name { font-size: 13px; font-weight: 600; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-role { font-size: 11px; color: rgba(148, 163, 184, .85); margin-top: 2px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 10px 14px; }
.nav-group { margin-bottom: 8px; }
.nav-group-title {
  font-size: 11px; font-weight: 600; letter-spacing: 2px; color: rgba(148, 163, 184, .55);
  padding: 14px 10px 6px; text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; margin-bottom: 2px;
  border-radius: 10px; cursor: pointer;
  color: #93A4BC; font-size: 13.5px;
  transition: all .18s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #E2E8F0; }
.nav-item .nav-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; opacity: .85; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, .85), rgba(59, 130, 246, .45));
  color: #fff; font-weight: 600;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, var(--primary-3), var(--primary));
}
.sidebar-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 12px 14px 16px; padding: 11px;
  border-radius: 10px; cursor: pointer;
  color: #FDA4AF; font-size: 13px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .18);
  transition: all .18s;
}
.sidebar-logout:hover { background: rgba(239, 68, 68, .16); color: #FECACA; }
.logout-icon { font-size: 14px; }

.main { flex: 1; padding: 28px 32px 40px; overflow-x: hidden; }
.page { display: none; }
.page.active { display: block; }
.page-title {
  font-size: 22px; font-weight: 800; color: var(--text);
  margin-bottom: 20px; letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px;
}
.page-title::before {
  content: ''; width: 4px; height: 20px; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--primary-3), var(--primary));
  box-shadow: 0 2px 8px rgba(37, 99, 235, .4);
}
#pageContent > * { animation: pageIn .28s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 卡片 / 表格 ===== */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 22px; margin-bottom: 20px;
  border: 1px solid rgba(15, 23, 42, .05);
  box-shadow: var(--shadow-card);
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--text); }

table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
th {
  background: #F7F9FC; color: var(--text-2); font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--line-strong);
}
th:first-child { border-radius: 8px 0 0 8px; }
th:last-child { border-radius: 0 8px 8px 0; }
tbody tr { transition: background .15s; }
tbody tr:hover td { background: #F7FAFF; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 18px; border: none; border-radius: 9px; cursor: pointer;
  font-size: 13px; margin-right: 6px; font-weight: 500;
  transition: all .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.btn-primary:hover { box-shadow: 0 8px 18px rgba(37, 99, 235, .4); }
.btn-success { background: linear-gradient(135deg, #10B981, #059669); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, .3); }
.btn-warning { background: linear-gradient(135deg, #F59E0B, #D97706); color: #fff; box-shadow: 0 4px 12px rgba(245, 158, 11, .3); }
.btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: #fff; box-shadow: 0 4px 12px rgba(239, 68, 68, .3); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-xs { padding: 3px 9px; font-size: 12px; line-height: 1; border-radius: 6px; }
.btn-xs:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost {
  background: #fff; color: var(--text-2);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--primary-3); color: var(--primary); background: #F7FAFF; }
.btn-top { margin-bottom: 14px; }

/* ===== 表单 ===== */
.form-row { display: flex; align-items: center; margin-bottom: 16px; }
.form-row.form-row-block { flex-direction: column; align-items: stretch; }
.form-row.form-row-block > label { width: 100%; color: var(--text-2); flex-shrink: 0; margin-bottom: 10px; font-weight: 600; }
.form-row > label { width: 124px; color: var(--text-2); flex-shrink: 0; font-weight: 500; }
.form-row > input, .form-row > select, .form-row > textarea,
.form-row-block > input, .form-row-block > select, .form-row-block > textarea {
  flex: 1; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 9px;
  font-size: 13px; color: var(--text); background: #FBFCFE; transition: all .18s;
}
.form-row > input:focus, .form-row > select:focus, .form-row > textarea:focus,
.form-row-block > input:focus, .form-row-block > select:focus, .form-row-block > textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.form-row > textarea { resize: vertical; min-height: 60px; }
.form-checkbox {
  display: inline-flex; align-items: center; margin: 0 10px 10px 0;
  font-size: 13px; padding: 6px 12px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: #FAFBFD; cursor: pointer; transition: all .15s;
  user-select: none;
}
.form-checkbox:hover { border-color: var(--primary-3); background: #F0F6FF; }
.form-checkbox input { margin-right: 6px; accent-color: var(--primary); }
.permission-grid { display: flex; flex-wrap: wrap; gap: 0; }

/* ===== 服务管理：多图上传 ===== */
.svc-imgs { position: relative; display: inline-flex; align-items: center; }
.svc-empty-cover {
  width: 80px; height: 80px; border-radius: 10px; background: #F3F6FB; border: 1px dashed #D5DEE8;
  display: flex; align-items: center; justify-content: center; font-size: 30px; color: #9AA8BB;
}
.svc-more {
  position: absolute; right: -6px; bottom: -6px; background: var(--primary-grad); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .4);
}
.svc-img-panel {
  border: 1px solid var(--line); background: #FBFCFE; border-radius: 12px; padding: 14px;
}
.svc-upload-tip {
  color: #8A97A8; font-size: 13px; text-align: center;
  padding: 30px 0; background: #fff; border: 1px dashed #D5DEE8; border-radius: 10px;
}
#svcImgList { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.svc-img-item {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: box-shadow .18s;
}
.svc-img-item:hover { box-shadow: var(--shadow-card); }
.svc-img-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; background: #F2F4F8; }
.svc-img-idx { font-size: 12px; color: #5A6A80; font-weight: 600; }
.svc-img-ops { display: flex; gap: 4px; width: 100%; justify-content: center; }
.svc-img-add {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.svc-img-add > input[type="text"] {
  flex: 1; min-width: 200px; padding: 8px 11px; border: 1px solid var(--line-strong);
  border-radius: 8px; font-size: 13px; transition: all .18s;
}
.svc-img-add > input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.svc-img-add input[type="file"] { font-size: 12px; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 16px; width: 620px; max-height: 88vh; overflow-y: auto;
  padding: 26px 30px; border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: var(--shadow-pop);
  animation: modalIn .24s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 20px; font-size: 17px; font-weight: 700; }
.modal .btn-row { display: flex; justify-content: flex-end; margin-top: 12px; gap: 8px; }

/* 分组标题（弹窗内把"活动配置"和"优惠券信息"分开） */
.panel-title {
  font-size: 14px; font-weight: 700; color: var(--primary);
  margin: 6px 0 14px; padding-left: 10px;
  border-left: 3px solid var(--primary);
}

/* ===== 轮播图：选图裁剪上传 ===== */
.banner-preview {
  width: 100%; height: 150px; overflow: hidden;
  border: 1px dashed #d5dbe8; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc;
}
.banner-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.banner-preview-empty { color: #94a3b8; font-size: 13px; }

/* 奖品图标（1:1 方形）预览 */
.prize-preview {
  width: 96px; height: 96px; overflow: hidden;
  border: 1px dashed #d5dbe8; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc;
}
.prize-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prize-preview-empty { color: #94a3b8; font-size: 12px; }
.prize-preview-emoji { font-size: 46px; line-height: 1; }

/* 预设图标选择器 */
.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.icon-pick {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; line-height: 1;
  background: #f5f7fa;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-pick:hover { background: #eef2ff; transform: translateY(-1px); }
.icon-pick.active { border-color: #2563eb; background: #eef2ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18); }

.crop-tip { font-size: 12px; color: #64748b; margin-bottom: 12px; }
.crop-wrap {
  position: relative; margin: 0 auto; max-width: 100%;
  background: #0f172a; border-radius: 10px; overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
.crop-wrap img { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .2s; }
.crop-box {
  position: absolute; border: 2px solid #fff; cursor: move;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, .55);
  touch-action: none;
}
.crop-box::before, .crop-box::after {
  content: ''; position: absolute; background: rgba(255, 255, 255, .35); pointer-events: none;
}
.crop-box::before { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.crop-box::after { top: 33.33%; left: 0; right: 0; height: 1px; }
.crop-handle {
  position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px;
  background: var(--primary); border: 2px solid #fff; border-radius: 4px;
  cursor: nwse-resize;
}

/* ===== 状态标签（胶囊） ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.5;
}
.badge-green { background: #E7F8F0; color: #059669; }
.badge-red { background: #FEEFEF; color: #DC2626; }
.badge-gray { background: #F1F4F8; color: #64748B; }
.badge-blue { background: #EAF2FF; color: var(--primary); }
.badge-orange { background: #FFF3E4; color: #D97706; }

/* ===== 工具 ===== */
.text-muted { color: var(--text-3); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.empty-tip { text-align: center; color: var(--text-3); padding: 44px 0; font-size: 13px; }
.tip-box {
  background: #F0F7FF; border: 1px solid #D6E9FF; color: #4A7DB5;
  font-size: 13px; border-radius: 10px; padding: 11px 15px; line-height: 1.7;
}

/* ===== 品牌 Logo 上传（门店信息管理） ===== */
.logo-uploader { display: flex; gap: 16px; align-items: flex-start; }
.logo-preview {
  width: 130px; height: 130px; border-radius: 16px;
  border: 2px dashed #C9D6E4; background: #F8FAFC;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; flex-shrink: 0;
  transition: all .2s;
}
.logo-preview:hover { border-color: var(--primary); background: #F0F7FF; box-shadow: 0 0 0 4px rgba(37, 99, 235, .08); }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-placeholder { display: flex; flex-direction: column; align-items: center; color: #93A1B3; }
.logo-plus { font-size: 40px; font-weight: 300; color: #B6C2D1; line-height: 1; }
.logo-hint { font-size: 12px; margin-top: 8px; }
.logo-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.logo-side .btn { margin-right: 0; }
.logo-tip { font-size: 12px; color: #93A1B3; line-height: 1.7; }

/* ===== 品牌 Logo 裁剪弹窗 ===== */
.crop-stage {
  position: relative; margin: 0 auto 14px;
  background-color: #F0F2F5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Crect width='20' height='20' fill='%23f5f7fa'/%3E%3Crect width='10' height='10' fill='%23e6ebf1'/%3E%3Crect x='10' y='10' width='10' height='10' fill='%23e6ebf1'/%3E%3C/svg%3E");
  border-radius: 12px; overflow: hidden; border: 1px solid #E5EAF0;
  cursor: grab; touch-action: none;
}
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.crop-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border: 2px solid #fff; border-radius: 12px; box-sizing: border-box; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(17, 24, 39, .5);
}
.crop-controls { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 10px; }
.crop-controls input[type="range"] { flex: 1; max-width: 220px; accent-color: var(--primary); }
.crop-ctrl-label { font-size: 13px; color: var(--text-2); }
.crop-tip { text-align: center; color: #93A1B3; font-size: 12px; margin-bottom: 6px; }

/* ===== Toast ===== */
#toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 1200;
  background: #0F172A; color: #fff; padding: 12px 26px; border-radius: 12px; opacity: 0;
  pointer-events: none; max-width: 80%;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .3);
  font-size: 14px; font-weight: 500;
  transition: opacity .25s ease, transform .25s ease;
  transform: translate(-50%, -14px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.toast-success { background: linear-gradient(135deg, #10B981, #059669); }
#toast.toast-error { background: linear-gradient(135deg, #EF4444, #DC2626); }
#toast.toast-warning { background: linear-gradient(135deg, #F59E0B, #D97706); }

/* =========================================================
 * 数据中心
 * ========================================================= */
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dash-header .page-title { margin-bottom: 0; }
.dash-date {
  font-size: 13px; color: var(--text-2); background: #fff;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .05);
  box-shadow: var(--shadow-card);
}

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  position: relative; background: #fff; border-radius: 16px; padding: 20px 20px 16px;
  border: 1px solid rgba(15, 23, 42, .05); box-shadow: var(--shadow-card);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c1, var(--primary)), var(--c2, var(--primary-3)));
}
.stat-card::after {
  content: ''; position: absolute; right: -36px; top: -36px; width: 110px; height: 110px;
  border-radius: 50%; opacity: .07; pointer-events: none;
  background: radial-gradient(circle, var(--c1, var(--primary)), transparent 70%);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(15, 23, 42, .12); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 23px;
  background: linear-gradient(135deg, var(--c1, var(--primary)), var(--c2, var(--primary-3)));
  box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
}
.stat-value {
  font-size: 27px; font-weight: 800; color: var(--text); line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.5px;
}
.stat-label { font-size: 13px; color: var(--text-3); margin-top: 5px; font-weight: 500; }
.stat-sub {
  display: inline-block; font-size: 12px; margin-top: 10px; padding: 4px 11px; border-radius: 999px;
  background: #F4F7FB; color: var(--text-2);
}
.stat-sub .up { color: var(--success); font-weight: 600; }

/* 图表区 */
.dash-row { display: grid; grid-template-columns: 1.8fr 1fr; gap: 16px; margin-bottom: 22px; }
.dash-card {
  background: #fff; border-radius: 16px; padding: 22px 24px;
  border: 1px solid rgba(15, 23, 42, .05); box-shadow: var(--shadow-card);
}
.dash-card-title {
  font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 18px;
  display: flex; justify-content: flex-start; align-items: center;
}
.dash-card-title::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px; margin-right: 9px;
  background: linear-gradient(180deg, var(--primary-3), var(--primary));
}
.dash-card-title .hint { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 400; }

.bar-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 210px; padding: 6px 4px 0; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; cursor: default; }
.bar-value { font-size: 12px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; margin-bottom: 6px; opacity: 0; transition: opacity .2s; }
.bar-item:hover .bar-value { opacity: 1; }
.bar-track { width: 100%; max-width: 40px; height: 150px; background: #F2F5F9; border-radius: 9px; display: flex; align-items: flex-end; overflow: hidden; }
.bar { width: 100%; min-height: 3px; background: linear-gradient(180deg, var(--primary-3), var(--primary)); border-radius: 9px 9px 0 0; transition: height .4s ease, background .2s; }
.bar-item:hover .bar { background: linear-gradient(180deg, #7AB4FF, var(--primary-dark)); }
.bar-label { font-size: 12px; color: var(--text-3); white-space: nowrap; margin-top: 10px; }
.bar-item.today .bar-label { color: var(--primary); font-weight: 700; }

/* 热门服务排行 */
.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-radius: 10px; transition: background .15s; }
.rank-item + .rank-item { border-top: 1px solid #F2F5F9; }
.rank-item:hover { background: #F7FAFF; }
.rank-no {
  width: 26px; height: 26px; border-radius: 8px; background: #EEF1F6; color: #7A8699;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rank-no.top1 { background: linear-gradient(135deg, #FFD666, #FFA940); color: #fff; box-shadow: 0 3px 8px rgba(255, 169, 64, .4); }
.rank-no.top2 { background: linear-gradient(135deg, #D9E2EC, #B0BEC5); color: #fff; }
.rank-no.top3 { background: linear-gradient(135deg, #FFBB96, #FF9C6E); color: #fff; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: 14px; color: var(--text); font-weight: 600; }
.rank-bar { height: 5px; background: #EEF1F6; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.rank-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary-3), var(--primary)); border-radius: 3px; }
.rank-meta { font-size: 12px; color: var(--text-3); white-space: nowrap; text-align: right; line-height: 1.4; }
.rank-meta b { color: var(--text); font-weight: 700; font-size: 15px; }

/* 数据明细 */
.table-card { padding: 0; overflow: hidden; }
.table-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.table-head .card-title { margin-bottom: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; }
.table-head .card-title::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px; margin-right: 9px;
  background: linear-gradient(180deg, var(--primary-3), var(--primary));
}
.table-count { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.table-tools { display: flex; align-items: center; gap: 14px; }
.search-box { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 13px; font-size: 13px; color: #B0BCCC; pointer-events: none; }
.search-box input {
  width: 230px; padding: 9px 30px 9px 36px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 13px; background: #F7F9FC; transition: all .2s;
}
.search-box input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.search-box input::placeholder { color: #B0BCCC; }
.search-clear {
  position: absolute; right: 10px; width: 18px; height: 18px; border-radius: 50%;
  background: #D0D8E2; color: #fff; font-size: 11px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; visibility: hidden;
}
.search-clear:hover { background: var(--primary); }
.seg-tabs { display: flex; padding: 16px 24px 0; gap: 6px; flex-wrap: wrap; }
.seg-tab {
  padding: 8px 16px; border: none; background: transparent; border-radius: 9px;
  font-size: 13px; color: #6B7A8D; cursor: pointer; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.seg-tab:hover { color: var(--primary); background: #F0F6FF; }
.seg-tab.active { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .35); }
.table-body { padding: 16px 24px 24px; overflow-x: auto; }
.table-body table { border-collapse: separate; border-spacing: 0; min-width: 720px; }
.table-body thead th { background: #F7F9FC; color: var(--text-2); font-weight: 600; font-size: 12px; letter-spacing: .4px; border-bottom: none; padding: 12px 14px; white-space: nowrap; }
.table-body thead th:first-child { border-radius: 8px 0 0 8px; }
.table-body thead th:last-child { border-radius: 0 8px 8px 0; }
.table-body tbody td { padding: 13px 14px; border-bottom: 1px solid #F2F5F9; font-size: 13px; color: #34404D; white-space: nowrap; }
.table-body tbody td.wrap { white-space: normal; }
.table-body tbody tr:last-child td { border-bottom: none; }
.table-body tbody tr { transition: background .15s; }
.table-body tbody tr:hover td { background: #F7FAFF; }

.amount-strong { color: #EF4444; font-weight: 700; font-variant-numeric: tabular-nums; }
.amount-rev { color: var(--success); font-weight: 700; font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; font-size: 12.5px; color: #6B7A8D; }

/* ===== 表格头像 ===== */
.table-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  display: inline-block; vertical-align: middle; background: #F0F2F5;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(15, 23, 42, .14);
}
.table-avatar-fallback {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-2), var(--primary-dark));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; vertical-align: middle;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(37, 99, 235, .3);
}
td.avatar-cell { width: 52px; padding: 10px 8px !important; text-align: center; vertical-align: middle; }

/* ===== 行内链接按钮 ===== */
.link-btn {
  background: none; border: none; color: var(--primary); cursor: pointer;
  font-size: 13px; padding: 3px 7px; border-radius: 6px; transition: all .15s;
}
.link-btn:hover { background: #EAF2FF; text-decoration: underline; }

/* =========================================================
 * 用户详情弹窗
 * ========================================================= */
.modal { width: 760px; max-width: 94vw; max-height: 90vh; }
.modal-title {
  font-size: 16px; font-weight: 700; margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px;
}
.modal-actions {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px;
}

.user-detail-title { gap: 10px; }
.ud-avatar-wrap { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
img.ud-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: inline-block; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); background: #F0F2F5; vertical-align: middle; }
.ud-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; border: 2px solid #fff; vertical-align: middle;
}
.ud-avatar-fallback { background: linear-gradient(135deg, var(--primary-2), var(--primary-dark)); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .3); }
.ud-avatar-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, .25); }
.ud-id { font-size: 12px; color: #999; font-weight: 400; margin-left: auto; font-variant-numeric: tabular-nums; }

.ud-stats {
  display: flex; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 12px; padding: 18px 0; margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}
.ud-stat { flex: 1; text-align: center; color: #fff; border-right: 1px solid rgba(255, 255, 255, .2); }
.ud-stat:last-child { border-right: none; }
.ud-stat b { display: block; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.ud-stat span { font-size: 12px; opacity: .8; }

.ud-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px;
  padding: 14px 16px; background: #F8FAFD; border-radius: 10px; margin-bottom: 16px;
}
.ud-info-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.ud-info-row span { color: #999; }
.ud-info-row b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.ud-info-row.ud-info-wide { grid-column: 1 / -1; }

.ud-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.ud-tab {
  background: none; border: none; padding: 11px 16px; font-size: 13px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  white-space: nowrap; transition: all .15s;
}
.ud-tab:hover { color: var(--primary); }
.ud-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.ud-content { max-height: 400px; overflow-y: auto; }
.ud-section { margin-bottom: 18px; }
.ud-section-title {
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px;
  padding-left: 8px; border-left: 3px solid var(--primary);
}
.ud-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: #F8FAFD; border-radius: 8px; margin-bottom: 6px; font-size: 13px;
}
.ud-row > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ud-row b { font-variant-numeric: tabular-nums; font-weight: 600; color: #EF4444; margin-left: 8px; }
.ud-empty { text-align: center; color: #BBB; padding: 30px 0; font-size: 13px; }

/* 用户详情 - 会员tab */
.ud-member-cur {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; color: #fff;
  box-shadow: 0 8px 20px rgba(249, 115, 22, .25);
}
.ud-member-cur-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.ud-member-grid { display: flex; gap: 8px; }
.ud-member-cell { flex: 1; background: rgba(255, 255, 255, .16); border-radius: 9px; padding: 10px; text-align: center; min-width: 0; }
.ud-member-cell span { display: block; font-size: 12px; opacity: .85; margin-bottom: 6px; }
.ud-member-cell b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-member-cell b.hot { color: #FFF7ED; }

/* 用户详情 - 绑定车辆卡（蓝色，与会员橙色卡区分） */
.ud-member-veh { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); box-shadow: 0 8px 20px rgba(59, 130, 246, .25); }

/* 详情弹窗内的ud-tag（和badge风格一致但更紧凑） */
.ud-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; margin: 0 2px; }
.ud-tag.green { background: #E7F8F0; color: #059669; }
.ud-tag.blue { background: #EAF2FF; color: var(--primary); }
.ud-tag.orange { background: #FFF3E4; color: #D97706; }
.ud-tag.gray { background: #F1F4F8; color: #64748B; }

/* 详情弹窗内表格 */
.ud-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ud-table th { background: #F8FAFD; padding: 8px 10px; text-align: left; font-weight: 600; color: #64748B; border-bottom: 1px solid #EEE; white-space: nowrap; }
.ud-table td { padding: 9px 10px; border-bottom: 1px solid #F5F5F5; color: #34404D; white-space: nowrap; }
.ud-table tr:last-child td { border-bottom: none; }
.ud-table tr:hover td { background: #FAFBFD; }
.ud-table td.mono { color: #6B7A8D; }

@media (max-width: 1100px) {
  .dash-row { grid-template-columns: 1fr; }
}
