/* 璟白饮品管理系统 - 设计令牌严格对齐 UI 稿 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563EB; --success: #10B981; --warning: #F59E0B;
  --danger: #EF4444; --info: #3B82F6; --bg: #F5F7FA;
  --border: #E5E7EB; --text: #1F2937; --text-2: #6B7280;
  --sidebar: #1E293B; --sidebar-text: #CBD5E1;
}
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; }

/* 登录页 */
.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2563EB 0%, #1E293B 100%); }
.login-box { width: 380px; background: #fff; border-radius: 12px; padding: 40px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.login-box h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: var(--text-2); margin-bottom: 28px; font-size: 13px; }
.login-box input { width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 14px; margin-bottom: 16px; font-size: 14px; }
.login-box input:focus { outline: none; border-color: var(--primary); }
.login-box button { width: 100%; height: 44px; background: var(--primary); color: #fff;
  border: none; border-radius: 6px; font-size: 15px; cursor: pointer; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--sidebar); color: var(--sidebar-text);
  flex-shrink: 0; position: fixed; height: 100vh; overflow-y: auto; }
.logo { height: 72px; display: flex; align-items: center; gap: 12px; padding: 0 20px;
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.logo .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); }
.logo-icon { width: 34px; height: 34px; flex-shrink: 0; }
.logo-text { line-height: 1.25; }
.logo-title { font-size: 17px; font-weight: 600; }
.logo-sub { font-size: 12px; color: var(--sidebar-text); opacity: .7; margin-top: 2px; }
.menu { padding: 12px 0; }
.menu-item { height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  cursor: pointer; font-size: 14px; }
.menu-item:hover { background: rgba(255,255,255,.06); }
.menu-item.active { background: var(--primary); color: #fff; }
.menu-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-icon svg { width: 20px; height: 20px; display: block; }

.main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; }
.header { height: 64px; background: #fff; border-bottom: 1px solid #E5E7EB;
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.header .crumb { color: var(--text-2); }
.header .user { display: flex; align-items: center; gap: 8px; }
.header .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center; }
.content { padding: 24px; }

/* 卡片 */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card .label { color: var(--text-2); font-size: 13px; margin-bottom: 10px; }
.stat-card .value { font-size: 26px; font-weight: 700; }
.stat-card .delta { font-size: 12px; margin-top: 8px; color: var(--success); }
.row2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.panel { background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel h3 { font-size: 16px; font-weight: 600; margin-bottom: 18px; }

/* 表格 */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { height: 36px; border: 1px solid var(--border); border-radius: 6px;
  padding: 0 12px; font-size: 13px; }
.btn { height: 36px; padding: 0 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-default { background: #F3F4F6; color: #374151; border: 1px solid #D1D5DB; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 13px; padding: 0 6px; }
.btn-link.danger { color: var(--danger); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; background: #F9FAFB; color: var(--text-2); font-weight: 500;
  padding: 14px 12px; font-size: 13px; border-bottom: 1px solid #E5E7EB; }
td { padding: 14px 12px; border-bottom: 1px solid #F1F3F5; font-size: 13px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.tag-on { background: rgba(16,185,129,.12); color: var(--success); }
.tag-off { background: #F3F4F6; color: #6B7280; }
.tag-blue { background: rgba(37,99,235,.1); color: var(--primary); }
.tag-orange { background: rgba(245,158,11,.12); color: var(--warning); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex;
  align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 10px; width: 460px; padding: 24px; }
.modal h3 { margin-bottom: 18px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 13px; }
.form-item input, .form-item select { width: 100%; height: 38px; border: 1px solid var(--border);
  border-radius: 6px; padding: 0 12px; font-size: 13px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.qr-preview { text-align: center; }
.qr-preview img { width: 240px; height: 240px; }
.empty { text-align: center; color: var(--text-2); padding: 40px; }
.pagination { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; align-items: center; }
.pagination button { height: 32px; min-width: 32px; border: 1px solid var(--border);
  background: #fff; border-radius: 6px; cursor: pointer; }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
