/* ================================================================
   Google Map Scraper — Design System v2
   风格：深色侧边栏 + 白色主区域，大气简洁
   作者：前端重构 2026-03-29
   ================================================================ */

/* ── CSS 变量 ─────────────────────────────────────────────────── */
:root {
  /* 主色调 */
  --primary:        #2563eb;
  --primary-hover:  #1d4ed8;
  --primary-light:  #eff6ff;
  --primary-muted:  #bfdbfe;

  /* 侧边栏（深色） */
  --sidebar-bg:     #0f172a;
  --sidebar-width:  220px;
  --sidebar-text:   #94a3b8;
  --sidebar-active: #ffffff;
  --sidebar-hover:  #1e293b;
  --sidebar-accent: #3b82f6;

  /* 内容区 */
  --body-bg:        #f1f5f9;
  --card-bg:        #ffffff;
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;

  /* 文字 */
  --text-heading:   #0f172a;
  --text-body:      #334155;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;

  /* 状态色 */
  --success:        #10b981;
  --success-bg:     #ecfdf5;
  --danger:         #ef4444;
  --danger-bg:      #fef2f2;
  --warning:        #f59e0b;
  --warning-bg:     #fffbeb;
  --info:           #06b6d4;
  --info-bg:        #ecfeff;

  /* 顶栏 */
  --topbar-height:  60px;

  /* 圆角 */
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12);

  /* 过渡 */
  --transition: all .18s cubic-bezier(.4,0,.2,1);
}

/* ── 全局重置 ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  background: var(--body-bg);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 13px; }

/* ================================================================
   侧边栏
   ================================================================ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}

/* Logo 区域 */
.sidebar-logo {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .2px;
  line-height: 1.2;
}
.sidebar-logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--sidebar-text);
  margin-top: 1px;
}

/* 导航 */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.sidebar-group {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sidebar-text);
  padding: 14px 20px 6px;
  opacity: .6;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--sidebar-text);
  transition: var(--transition);
  border-radius: 0;
  position: relative;
  white-space: nowrap;
}
.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-item.active {
  background: rgba(59,130,246,.15);
  color: #fff;
  font-weight: 500;
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--sidebar-accent);
  border-radius: 0 3px 3px 0;
}
.sidebar-item .nav-icon {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  opacity: .75;
}
.sidebar-item.active .nav-icon,
.sidebar-item:hover .nav-icon { opacity: 1; }

/* 菜单标签 */
.sidebar-item .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 权限锁菜单项样式 */
.sidebar-item.nav-locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.sidebar-item.nav-locked:hover {
  background: transparent;
  color: var(--sidebar-text);
}
.sidebar-item.nav-locked .nav-label {
  color: var(--sidebar-text);
}

/* 权限锁图标 */
.sidebar-item .nav-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 12px;
  color: #f59e0b;
  opacity: 1;
}
.sidebar-item.nav-locked .nav-lock {
  animation: lockPulse 2s ease-in-out infinite;
}

/* 公告未读气泡 */
.sidebar-item .nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  flex-shrink: 0;
}

@keyframes lockPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* 用户面板 */
.sidebar-user {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 16px;
  flex-shrink: 0;
}
.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.05);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: default;
}
.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.sidebar-username { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-userrole { font-size: 11px; color: var(--sidebar-text); }
.sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--sidebar-text);
  cursor: pointer;
  background: transparent;
  transition: var(--transition);
}
.sidebar-logout:hover {
  border-color: var(--danger);
  color: #ef4444;
  background: rgba(239,68,68,.08);
}

/* ================================================================
   顶栏
   ================================================================ */
.topbar {
  height: var(--topbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.topbar-breadcrumb .sep { color: var(--border); }
.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-heading);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ================================================================
   主布局
   ================================================================ */
.main-layout {
  display: flex;
  min-height: 100vh;
}
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-content {
  padding: 28px;
  flex: 1;
}

/* ================================================================
   页面标题
   ================================================================ */
.page-header {
  margin-bottom: 24px;
}
.page-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
  letter-spacing: -.3px;
}
.page-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ================================================================
   卡片
   ================================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  gap: 12px;
}
.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-body { padding: 20px; }
.card-body-flush { padding: 0; }

/* ================================================================
   统计卡片（仪表盘）
   ================================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: default;
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.stat-icon-blue   { background: #eff6ff; }
.stat-icon-green  { background: #f0fdf4; }
.stat-icon-orange { background: #fff7ed; }
.stat-icon-purple { background: #faf5ff; }
.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.stat-trend {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ================================================================
   表格工具栏
   ================================================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================================================================
   输入框 / 表单
   ================================================================ */
.input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-body);
  background: #fff;
  outline: none;
  transition: var(--transition);
  width: 100%;
}
.input:hover  { border-color: #c0cce0; }
.input:focus  { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.input::placeholder { color: var(--text-light); }

.input-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.input-search { width: 220px; padding-left: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px center; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.form-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { margin-bottom: 16px; }

select.input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }

/* ================================================================
   按钮
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.97); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(37,99,235,.3); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #d97706; }

.btn-outline {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}
.btn-ghost:hover:not(:disabled) { background: var(--border-light); color: var(--text-body); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 5px; }
.btn-lg { height: 42px; padding: 0 22px; font-size: 14px; border-radius: var(--radius); }
.btn-block { width: 100%; }

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}
.btn-icon-sm { width: 28px; height: 28px; font-size: 14px; }

/* ================================================================
   徽章
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
}
.badge-success { background: var(--success-bg); color: #059669; }
.badge-danger  { background: var(--danger-bg);  color: #dc2626; }
.badge-warning { background: var(--warning-bg); color: #d97706; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-info    { background: var(--info-bg); color: #0891b2; }
.badge-gray    { background: #f1f5f9; color: #64748b; }
.badge-dot::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
}

/* ================================================================
   数据表格
   ================================================================ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr {
  transition: background .12s;
}
.table tbody tr:hover td { background: #f8fafc; }
.table-empty {
  text-align: center;
  padding: 60px 20px !important;
  color: var(--text-light);
}
.table-empty-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
  opacity: .4;
}

/* 复选框列 */
.table .check-col { width: 40px; }
input[type="checkbox"] {
  width: 15px; height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ================================================================
   进度条
   ================================================================ */
.progress {
  background: #e2e8f0;
  border-radius: 20px;
  height: 6px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 20px;
  transition: width .4s ease;
}
.progress-bar-success { background: var(--success); }
.progress-bar-warning { background: var(--warning); }
.progress-bar-danger  { background: var(--danger); }

/* ================================================================
   标签 / Tag
   ================================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-muted);
  gap: 4px;
}
.tag-close {
  cursor: pointer;
  opacity: .6;
  font-size: 12px;
  line-height: 1;
}
.tag-close:hover { opacity: 1; }

/* ================================================================
   分页（layui laypage 美化）
   ================================================================ */
.layui-laypage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  gap: 4px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-muted);
}
.layui-laypage a,
.layui-laypage span {
  min-width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  padding: 0 8px;
  color: var(--text-body);
  font-size: 13px;
  transition: var(--transition);
  border: 1px solid transparent;
}
.layui-laypage a:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-muted); }
.layui-laypage .layui-laypage-curr em {
  background: var(--primary);
  color: #fff;
  border-radius: 5px;
  padding: 2px 6px;
}
.layui-laypage .layui-laypage-count { color: var(--text-muted); }

/* ================================================================
   配额卡片
   ================================================================ */
.quota-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.quota-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.quota-card:hover { box-shadow: var(--shadow); }
.quota-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.quota-nums {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}
.quota-used { font-size: 22px; font-weight: 700; color: var(--text-heading); }
.quota-total { font-size: 13px; color: var(--text-light); }
.quota-pct { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ================================================================
   套餐卡片
   ================================================================ */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.plan-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.plan-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.plan-card.current { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15), var(--shadow); }
.plan-badge-current {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.plan-tier {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
}
.plan-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 4px;
  letter-spacing: -1px;
}
.plan-price-unit { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.plan-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.plan-features { list-style: none; margin-bottom: 20px; }
.plan-features li {
  font-size: 13px;
  color: var(--text-body);
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.plan-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}
.plan-features li.na { color: var(--text-light); }
.plan-features li.na::before { content: '×'; color: var(--text-light); }

/* ================================================================
   弹窗表单增强
   ================================================================ */
.dialog-body { padding: 20px 24px; }
.dialog-form-item {
  margin-bottom: 16px;
}
.dialog-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ================================================================
   登录页
   ================================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* 背景装饰 */
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,.2) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,.15) 0%, transparent 70%);
  bottom: -50px; left: -50px;
  pointer-events: none;
}
.login-box {
  background: rgba(255,255,255,.98);
  border-radius: 20px;
  padding: 44px 40px;
  width: 420px;
  box-shadow: 0 25px 80px rgba(0,0,0,.4);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}
.login-logo-area {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(37,99,235,.35);
}
.login-logo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.login-logo-sub {
  font-size: 13px;
  color: var(--text-muted);
}
.login-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.login-input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; color: var(--text-body);
  outline: none;
  transition: var(--transition);
  background: #fff;
}
.login-input:hover  { border-color: #c0cce0; }
.login-input:focus  { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.login-input::placeholder { color: var(--text-light); }
.login-btn {
  width: 100%; height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  color: #fff; border: none;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 8px;
  transition: var(--transition);
  box-shadow: 0 6px 18px rgba(37,99,235,.3);
  letter-spacing: .3px;
}
.login-btn:hover { box-shadow: 0 8px 24px rgba(37,99,235,.45); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }

/* ================================================================
   提示/通知
   ================================================================ */
/* layui layer 覆盖 */
.layui-layer-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text-heading) !important;
}
.layui-layer-btn .layui-layer-btn0 {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.layui-layer-btn .layui-layer-btn0:hover {
  background: var(--primary-hover) !important;
}

/* ================================================================
   关键词标签
   ================================================================ */
.kw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.kw-tag {
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--primary-muted);
}

/* ================================================================
   空状态
   ================================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-light);
  text-align: center;
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: .35; }
.empty-state-text { font-size: 14px; margin-bottom: 4px; color: var(--text-muted); }
.empty-state-sub  { font-size: 12px; }

/* ================================================================
   代码块
   ================================================================ */
code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12px;
  background: #f1f5f9;
  color: #e2407b;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ================================================================
   工具类
   ================================================================ */
.flex       { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-0  { margin-top: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 12px; }
.text-xs    { font-size: 11px; }
.font-bold  { font-weight: 700; }
.w-full     { width: 100%; }
.hidden     { display: none; }

/* ================================================================
   顶栏菜单按钮（仅移动端显示）
   ================================================================ */
.topbar-menu-btn {
  display: none;
  width: 36px; height: 36px;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-body);
  font-size: 18px;
  align-items: center; justify-content: center;
  margin-right: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}
.topbar-menu-btn:hover { background: var(--border-light); }

/* 侧边栏遮罩（移动端点击关闭） */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .quota-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 平板：侧边栏缩窄 */
@media (max-width: 1024px) and (min-width: 769px) {
  :root { --sidebar-width: 200px; }
  .sidebar-logo-text span { display: none; }
  .page-content { padding: 20px; }
}

/* 手机端：侧边栏抽屉式 */
@media (max-width: 768px) {
  .topbar-menu-btn { display: inline-flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    z-index: 300;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.25);
  }

  .main-content { margin-left: 0; }

  .stat-grid { grid-template-columns: 1fr 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .quota-grid { grid-template-columns: 1fr; }

  .page-content { padding: 14px; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }

  /* 表格：横向滚动 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* 顶栏 */
  .topbar { padding: 0 14px; }
  .topbar-breadcrumb > span:first-child { display: none; }
  .topbar-breadcrumb .sep { display: none; }

  /* 工具栏 */
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .toolbar-right { justify-content: flex-end; }
  .input-search { width: 100%; }

  /* 卡片内边距缩小 */
  .card-header { padding: 12px 16px; }
  .card-body   { padding: 14px; }
}

/* 极小屏 */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 17px; }
  .btn { padding: 0 12px; font-size: 12px; }
}

/* ================================================================
   gms-badge（app.js planBadge / statusBadge / roleBadge 使用）
   ================================================================ */
.gms-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}
.gms-badge-success { background: var(--success-bg); color: #059669; }
.gms-badge-danger  { background: var(--danger-bg);  color: #dc2626; }
.gms-badge-warning { background: var(--warning-bg); color: #d97706; }
.gms-badge-primary { background: var(--primary-light); color: var(--primary); }
.gms-badge-info    { background: var(--info-bg); color: #0891b2; }
.gms-badge-gray    { background: #f1f5f9; color: #64748b; }

/* ================================================================
   面包屑：支持多级（管理后台 › 分销管理 › 分销报表）
   ================================================================ */
.topbar-breadcrumb > span:not(.topbar-title):not(.sep) {
  color: var(--text-muted);
  font-size: 13px;
}
.topbar-breadcrumb .sep {
  color: var(--border);
  margin: 0 2px;
}

/* ================================================================
   权限矩阵 table-wrap 横向溢出修复
   ================================================================ */
.perm-matrix-wrap { overflow-x: auto; }

