/* ===== SHARK POKER · Design System v2 ===== */
/* Inspired by ardot design, adapted for full feature set */

/* ===== CSS Variables (Dark Theme - default) ===== */
:root {
  --font: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --serif: "Times New Roman", "Songti SC", Georgia, serif;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --blur: blur(24px);
  --blur-light: blur(16px);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bg: #0A0A12;
  --bg-radial: radial-gradient(ellipse 80% 60% at 20% -10%, rgba(67,158,255,0.12), transparent 60%);
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.12);
  --surface-subtle: rgba(255,255,255,0.04);
  --surface-solid: #1c1c1e;
  --border: rgba(255,255,255,0.06);
  --border-subtle: rgba(255,255,255,0.06);
  --text: #FFFFFF;
  --text-secondary: rgba(235,235,245,0.60);
  --text-tertiary: rgba(235,235,245,0.40);
  --text-muted: rgba(235,235,245,0.40);
  --accent: #0A84FF;
  --accent-hover: #409CFF;
  --green: #34D399;
  --green-solid: #34D399;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.30);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.40);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.50);
  /* Legacy compat */
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-solid: #1c1c1e;
  --bg-card-hover: rgba(255,255,255,0.12);
  --blue-bg: rgba(10,132,255,0.15);
  --red-bg: rgba(255,59,48,0.15);
  --green-bg: rgba(52,211,153,0.12);
  --orange-bg: rgba(245,158,11,0.12);
  --sidebar-bg: rgba(255,255,255,0.07);
  --sidebar-active: rgba(10,132,255,0.15);
  --submenu-bg: rgba(255,255,255,0.08);
  --fill: rgba(120,120,128,0.24);
  --secondary-fill: rgba(120,120,128,0.20);
  --tertiary-fill: rgba(118,118,128,0.18);
  --separator: rgba(255,255,255,0.08);
  --input-bg: rgba(118,118,128,0.24);
  --badge-bg: rgba(118,118,128,0.24);
  --modal-overlay: rgba(0,0,0,0.6);
  --table-header: rgba(255,255,255,0.04);
  --table-row-hover: rgba(255,255,255,0.04);
  --card-bg: rgba(255,255,255,0.03);
  --glass: rgba(28,28,30,0.72);
  --text-primary: #F5F5F7;
  --text-inverse: #000000;
  --text-placeholder: #636366;
  --bg-header: rgba(255,255,255,0.04);
  --bg-input-solid: #2C2C2E;
  --border-light: rgba(255,255,255,0.08);
  --success: #30D158;
  --success-bg: rgba(48,209,88,0.15);
  --warning: #FF9F0A;
  --warning-bg: rgba(255,159,10,0.15);
  --danger: #FF453A;
  --danger-bg: rgba(255,69,58,0.15);
  --info: #0A84FF;
  --info-bg: rgba(10,132,255,0.15);
  --gold: #FFD60A;
  --red: #FF453A;
}

/* Light theme — Daydream × Shark 瓷白 / 香槟金 */
[data-theme="light"],
html.light {
  --bg: #F4F2ED;
  --bg-radial: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(168,137,74,0.05), transparent 55%);
  --surface: #FFFFFF;
  --surface-hover: #FFFFFF;
  --surface-subtle: #F0EDE6;
  --surface-solid: #FFFFFF;
  --border: rgba(20, 22, 28, 0.08);
  --border-subtle: rgba(20, 22, 28, 0.08);
  --text: #141416;
  --text-secondary: rgba(20, 20, 22, 0.68);
  --text-tertiary: rgba(20, 20, 22, 0.48);
  --text-muted: rgba(20, 20, 22, 0.48);
  --accent: #A8894A;
  --accent-hover: #8F7340;
  --green: #1F9D55;
  --green-solid: #1F9D55;
  --shadow-sm: 0 1px 3px rgba(20,22,28,0.04);
  --card-shadow: 0 0 0 1px rgba(20,22,28,0.08), 0 10px 32px rgba(20,22,28,0.06);
  --shadow-md: 0 4px 16px rgba(20,22,28,0.06);
  --shadow-lg: 0 10px 32px rgba(20,22,28,0.08);
  --bg-card: #FFFFFF;
  --bg-card-solid: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --blue-bg: rgba(168,137,74,0.12);
  --red-bg: rgba(196,64,58,0.10);
  --green-bg: rgba(31,157,85,0.10);
  --sidebar-bg: #141416;
  --sidebar-active: rgba(242,240,235,0.12);
  --submenu-bg: rgba(255,255,255,0.06);
  --fill: rgba(20,22,28,0.06);
  --secondary-fill: rgba(20,22,28,0.05);
  --tertiary-fill: rgba(20,22,28,0.04);
  --separator: rgba(20,22,28,0.08);
  --input-bg: transparent;
  --badge-bg: rgba(20,22,28,0.06);
  --modal-overlay: rgba(20,22,28,0.35);
  --table-header: rgba(20,22,28,0.03);
  --table-row-hover: rgba(168,137,74,0.06);
  --card-bg: #FFFFFF;
  --glass: rgba(244,242,237,0.92);
  --hero-bg: rgba(168,137,74,0.08);
  --hero-border: rgba(168,137,74,0.16);
  --hero-glow: rgba(168,137,74,0.14);
  --hero-text: #A8894A;
  --text-primary: #141416;
  --text-inverse: #F4F2ED;
  --text-placeholder: rgba(20,20,22,0.36);
  
  /* 经营总览设计稿变量 */
  --line: rgba(20, 22, 28, 0.08);
  --line-2: rgba(20, 22, 28, 0.12);
  --line-3: rgba(20, 22, 28, 0.2);
  --t1: #141416;
  --t2: rgba(20, 20, 22, 0.68);
  --t3: rgba(20, 20, 22, 0.48);
  --t4: rgba(20, 20, 22, 0.28);
  --acc: #A8894A;
  --acc-dim: rgba(168, 137, 74, 0.14);
  --go: #1F9D55;
  --go-dim: rgba(31, 157, 85, 0.12);
  --no: #C4403A;
  --no-dim: rgba(196, 64, 58, 0.12);
  --bg-header: rgba(20,22,28,0.03);
  --bg-input-solid: transparent;
  --border-light: rgba(20,22,28,0.08);
  --success: #1F9D55;
  --success-bg: rgba(31,157,85,0.12);
  --warning: #A8894A;
  --warning-bg: rgba(168,137,74,0.12);
  --danger: #C4403A;
  --danger-bg: rgba(196,64,58,0.12);
  --info: #A8894A;
  --info-bg: rgba(168,137,74,0.12);
  --gold: #A8894A;
  --red: #C4403A;
}

/* ===== Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
/* Theme transition */
html, html body, html *, html *::before, html *::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background: var(--bg-radial);
  pointer-events: none; z-index: 0;
}
input, select, textarea, button { font-family: var(--font); }
input[type="text"], input[type="number"], input[type="password"], input[type="date"], input[type="file"] {
  border: none; outline: none; background: none; color: var(--text); font-size: 13px;
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 13px; }
th {
  font-weight: 600; color: var(--text-secondary); font-size: 12px; letter-spacing: 0.3px;
  background: var(--surface-subtle);
}
tr:not(:last-child) td { border-bottom: 1px solid var(--border-subtle); }
td { color: var(--text); font-size: 14px; }
tr:hover td { background: var(--table-row-hover); }
h1 { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
h2 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
h3 { font-size: 15px; font-weight: 600; color: var(--text); }
a { color: var(--accent); text-decoration: none; }

/* ===== App Layout ===== */
.app-layout {
  display: flex; min-height: 100vh; height: 100%; position: relative; z-index: 1;
  padding-top: var(--topbar-h);
}

/* ===== Top Bar ===== */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--glass);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-brand {
  display: flex; align-items: center; gap: 10px;
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #007AFF, #5636F0);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}
.brand-logo svg { width: 18px; height: 18px; }
.brand-logo img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.brand-sub { font-size: 10px; font-weight: 500; color: var(--text-tertiary); letter-spacing: 0.5px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 8px 14px; width: 260px;
  color: var(--text-secondary); transition: var(--transition);
}
.topbar-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.15); }
.topbar-search input { color: var(--text); width: 100%; }
.topbar-search input::placeholder { color: var(--text-tertiary); }
.topbar-search svg { stroke: var(--text-tertiary); fill: none; stroke-width: 1.5; flex-shrink: 0; }
.topbar-search kbd {
  font-size: 10px; background: var(--surface-hover); border: 1px solid var(--border-subtle);
  border-radius: 4px; padding: 2px 6px; font-family: var(--font); color: var(--text-tertiary);
  flex-shrink: 0;
}
.topbar-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 8px 14px; cursor: pointer;
  color: var(--text); font-size: 13px; font-weight: 500;
  transition: var(--transition);
}
.topbar-btn:hover { background: var(--surface-hover); }
.topbar-btn svg { stroke: var(--text-secondary); fill: none; stroke-width: 1.5; }
.topbar-divider { width: 1px; height: 24px; background: var(--border-subtle); }
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.topbar-user:hover { background: var(--surface-hover); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #007AFF, #5636F0);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 13px; font-weight: 600;
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-role { font-size: 10px; font-weight: 500; color: var(--text-secondary); line-height: 1.2; }
.user-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 100;
  background: var(--bg-card-solid, var(--surface)); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 6px; min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.user-dropdown.show { display: block; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text);
  transition: background 0.15s;
}
.user-dropdown-item:hover { background: var(--surface); }
.user-dropdown-divider { height: 1px; background: var(--border-subtle); margin: 4px 8px; }

/* Theme toggle in topbar */
.theme-toggle {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: 10px; padding: 8px 12px; cursor: pointer;
  font-size: 16px; line-height: 1; color: var(--text);
  transition: var(--transition); display: flex; align-items: center; gap: 6px;
}
.theme-toggle:hover { background: var(--surface-hover); }
.theme-toggle:active { transform: scale(0.95); }

/* ===== Sidebar ===== */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--glass);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto; padding: 16px 12px; z-index: 90;
  display: flex; flex-direction: column; gap: 2px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 2px; }

.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: var(--transition); border-radius: var(--radius-sm);
  user-select: none;
}
.sidebar-item:hover { background: var(--surface-hover); color: var(--text); }
.sidebar-item:active { background: var(--secondary-fill); }
.sidebar-item.active {
  background: var(--surface-hover); color: var(--text); font-weight: 600;
}
.sidebar-item .icon {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
}
.sidebar-item .icon svg { width: 16px; height: 16px; }
.sidebar-item.active .icon svg { stroke: currentColor; }

/* Sidebar nav label */
.nav-label {
  font-size: 11px; font-weight: 600; color: var(--text-tertiary);
  letter-spacing: 1px; padding: 12px 14px 6px; text-transform: uppercase;
}

/* ===== Sidebar Children (Accordion) ===== */
.sidebar-parent { position: relative; flex-wrap: wrap; }
.sidebar-children {
  flex-basis: 100%;
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  opacity: 0;
  padding-left: 20px;
}
.sidebar-parent.open .sidebar-children {
  max-height: 500px;
  opacity: 1;
}
.sidebar-child {
  padding: 9px 16px; font-size: 13px; cursor: pointer;
  color: var(--text-secondary); border-radius: var(--radius-sm);
  margin: 2px 0; font-weight: 500;
  transition: var(--transition);
}
.sidebar-child:hover { color: var(--text); background: var(--surface-hover); }
.sidebar-child.active {
  color: var(--accent); background: var(--surface-hover); font-weight: 600;
}
.sidebar-arrow {
  margin-left: auto; transition: transform 0.25s ease; display: flex; align-items: center;
}
.sidebar-parent.open .sidebar-arrow { transform: rotate(180deg); }

/* ===== Main Content ===== */
.main-content {
  margin-left: var(--sidebar-w); margin-top: 0;
  padding: 28px 32px; flex: 1; height: 100%; min-height: calc(100vh - var(--topbar-h));
  position: relative; z-index: 1;
}


/* ===== Tab Content ===== */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 20px;
}

/* ===== Bento Grid (Overview) ===== */
.bento-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

/* 左侧：两行卡片 */
.bento-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.bento-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.bento-row.top { flex: 0 0 auto; }
.bento-row.bot { flex: 1; }
.bento-row .bento-card { flex: 1; min-width: 0; }

/* 卡片样式 */
.bento-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: var(--transition);
  box-shadow: var(--card-shadow, none);
}
.bento-card:hover {
  background: var(--surface-hover);
}
.bento-row.bot .bento-card { padding: 12px 14px; }
.bento-label {
  font-size: 12px; font-weight: 500; color: #888;
  letter-spacing: 0.3px; margin-bottom: 8px;
}
.bento-row.bot .bento-label { font-size: 11px; margin-bottom: 4px; }
.bento-value {
  font-size: 28px; font-weight: 700; color: #D4A843;
  letter-spacing: -0.3px; line-height: 1.1;
}
.bento-row.bot .bento-value { font-size: 18px; }
.bento-value.green { color: var(--green); }
.bento-value.gold { color: var(--gold); }
.bento-value.red { color: var(--red); }
.bento-trend { font-size: 11px; margin-top: 4px; }
.bento-trend.up { color: #8ac44a; }
.bento-trend.down { color: #ff4444; }

/* 右侧英雄卡：跨两行 */
.bento-hero {
  width: 320px; flex-shrink: 0;
  background: var(--hero-bg, linear-gradient(135deg, rgba(230,198,90,0.12) 0%, rgba(230,198,90,0.04) 100%));
  border: 1px solid var(--hero-border, rgba(230,198,90,0.2));
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.bento-hero::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, var(--hero-glow, rgba(230,198,90,0.15)), transparent 70%);
  border-radius: 50%;
}
.bento-hero-label {
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  letter-spacing: 0.5px; margin-bottom: 12px;
}
.bento-hero-value {
  font-size: 42px; font-weight: 800; color: var(--hero-text, #e6c65a);
  letter-spacing: -1px; line-height: 1.1;
  text-shadow: 0 0 50px var(--hero-glow, rgba(230,198,90,0.18));
}
.bento-hero-sub {
  font-size: 12px; color: var(--text-tertiary); margin-top: 12px;
}

@media (max-width: 1100px) {
  .bento-hero { width: 260px; padding: 28px 24px; }
  .bento-hero-value { font-size: 36px; }
}
@media (max-width: 900px) {
  .bento-hero { width: 200px; padding: 22px 18px; }
  .bento-hero-value { font-size: 30px; }
}
@media (max-width: 700px) {
  .bento-grid { flex-direction: column; }
  .bento-row { flex-wrap: wrap; }
  .bento-row .bento-card { flex: 1 1 calc(50% - 6px); min-width: 0; }
  .bento-hero { width: 100%; }
  .bento-hero-value { font-size: 32px; }
}
.stat-card {
  background: var(--surface);
  backdrop-filter: var(--blur-light); -webkit-backdrop-filter: var(--blur-light);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--card-shadow, var(--shadow-sm));
  transition: var(--transition);
}
.stat-card:hover {
  background: var(--surface-hover);
}
.stat-card h3 {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 8px;
  font-weight: 500; display: flex; align-items: center; gap: 6px;
}
.stat-card .value {
  font-size: 32px; font-weight: 700; color: var(--text);
  letter-spacing: -0.5px; line-height: 1.1;
}

/* ===== Section Cards ===== */
.section {
  background: var(--surface);
  backdrop-filter: var(--blur-light); -webkit-backdrop-filter: var(--blur-light);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  transition: var(--transition);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-decoration: none;
  font-family: var(--font); line-height: 1.4;
  background: var(--surface); color: var(--text);
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent); color: white;
  box-shadow: 0 4px 12px rgba(0,122,255,0.3);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(0,122,255,0.25); }
.btn-gold {
  background: #D4A843; color: #111; border-radius: 20px;
  box-shadow: 0 4px 12px rgba(212,168,67,0.3);
}
.btn-gold:hover { box-shadow: 0 2px 8px rgba(212,168,67,0.25); }
.btn-green {
  background: linear-gradient(135deg, #34D399, #10B981); color: white;
  box-shadow: 0 4px 12px rgba(52,211,153,0.3);
}
.btn-green:hover { box-shadow: 0 2px 8px rgba(52,211,153,0.25); }
.btn-danger {
  background: linear-gradient(135deg, #FF3B30, #FF453A); color: white;
  box-shadow: 0 4px 12px rgba(255,59,48,0.3);
}
.btn-danger:hover { box-shadow: 0 2px 8px rgba(255,59,48,0.25); }
.btn-orange {
  background: linear-gradient(135deg, #FF7D00, #FF3B30); color: white;
  box-shadow: 0 4px 12px rgba(255,125,0,0.3);
}
.btn-outline {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-light);
  backdrop-filter: var(--blur-light); -webkit-backdrop-filter: var(--blur-light);
}
.btn-outline:hover { background: var(--surface-hover); }
.btn-gray {
  background: var(--fill); color: var(--text-secondary);
}
.btn-gray:hover { background: var(--secondary-fill); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ===== Inputs ===== */
.input-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.input-row input[type="text"],
.input-row input[type="number"],
.input-row input[type="password"],
.input-row input[type="date"] {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 9px 14px;
  color: var(--text); font-size: 13px;
  transition: var(--transition);
  backdrop-filter: var(--blur-light); -webkit-backdrop-filter: var(--blur-light);
}
.input-row input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
  outline: none;
}
.input-row select {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 9px 14px;
  color: var(--text); font-size: 13px; cursor: pointer;
  transition: var(--transition);
}
.input-row select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
  outline: none;
}

/* ===== Settings Groups ===== */
.settings-group {
  margin-bottom: 18px; padding: 0 0 4px;
}
.settings-group label {
  display: block; font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 8px;
}
.hint {
  font-size: 12px; color: var(--text-tertiary); margin-top: 6px;
  line-height: 1.5;
}
.save-msg {
  font-size: 12px; color: var(--green-solid); font-weight: 600;
  opacity: 0; transition: opacity 0.3s;
}
.save-msg.show { opacity: 1; }

/* ===== Form Groups (modals) ===== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 14px;
  background: var(--surface-solid); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  transition: var(--transition);
}
/* 新会员/编辑会员输入框：虚线框 */
#editMemberModal .form-group input[type="text"] {
  border: 1px dashed var(--border-subtle, rgba(255,255,255,0.22));
  background: transparent;
}
#editMemberModal .form-group input[type="text"]:focus {
  border-style: dashed;
  border-color: var(--accent);
}
/* 下拉框选项必须在深色主题下可见 */
select, select option {
  background-color: var(--surface-solid);
  color: var(--text);
}
select option:checked,
select option:hover {
  background-color: var(--accent);
  color: var(--text-inverse, #fff);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
  outline: none;
}

/* ===== Data Tables ===== */
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th {
  background: var(--surface-subtle); padding: 12px 16px;
  font-size: 12px; font-weight: 600; color: #666;
  letter-spacing: 0.3px; text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
  padding: 12px 16px; font-size: 14px; color: #ccc;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--table-row-hover); }

/* Regular tables inside sections */
.section table { border-radius: var(--radius-md); overflow: hidden; }
.section table th { background: var(--surface-subtle); }

/* ===== Loading & Empty States ===== */
.loading {
  text-align: center; padding: 40px 20px;
  color: var(--text-tertiary); font-size: 14px;
}
.loading::before {
  content: ''; display: block; width: 32px; height: 32px;
  margin: 0 auto 12px; border-radius: 50%;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-tertiary); font-size: 14px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: var(--modal-overlay);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px;
  width: 480px; max-width: 90vw; max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin-bottom: 20px; font-size: 18px; }

/* ===== Tags / Badges ===== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: var(--badge-bg); color: var(--text-secondary);
}
.tag-clickable { cursor: pointer; transition: var(--transition); }
.tag-clickable:hover { transform: scale(1.05); }

/* ===== Pagination ===== */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 16px;
}
.pagination button {
  padding: 6px 12px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font-size: 13px; cursor: pointer;
  transition: var(--transition);
}
.pagination button:hover { background: var(--surface-hover); }
.pagination button.active {
  background: var(--accent); color: white; border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,122,255,0.3);
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Collab Background ===== */
#collabBg {
  position: fixed; left: 50%; bottom: -50px; transform: translateX(-50%);
  width: 75%; height: 260px; background: center/contain no-repeat;
  filter: invert(1); mix-blend-mode: screen; opacity: 0.12;
  pointer-events: none; z-index: 0;
}
html.light #collabBg,
[data-theme="light"] #collabBg {
  filter: none; mix-blend-mode: multiply; opacity: 0.10;
}

/* ===== Misc Utilities ===== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-red { color: var(--red); }
.text-green { color: var(--green-solid); }
.text-gold { color: var(--gold); }
.text-blue { color: var(--accent); font-weight: 600; }
.text-dim { color: var(--text-secondary); }
.text-muted { color: var(--text-tertiary); }
.mg-btm-16 { margin-bottom: 16px; }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  background: var(--badge-bg); color: var(--text-secondary);
}
.badge-vip { background: rgba(232,163,61,0.2); color: var(--gold); }
.badge-black { background: rgba(100,100,100,0.3); color: var(--text-secondary); }
.badge-employee { background: rgba(232,163,61,0.2); color: var(--gold); }

/* ===== Gift Management ===== */
.gift-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border-subtle);
}
.gift-row:last-child { border-bottom: none; }
.gift-icon { font-size: 28px; width: 40px; text-align: center; flex-shrink: 0; }
.gift-name { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.gift-pts { font-size: 14px; font-weight: 700; color: var(--gold); min-width: 80px; text-align: right; }
.gift-actions { display: flex; gap: 8px; }

/* ===== Modal Actions ===== */
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px;
}

/* ===== Stat Labels ===== */
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--text); }

/* ===== Tag Color Button ===== */
.tag-color-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer;
  transition: var(--transition);
}
.tag-color-btn:hover { transform: scale(1.1); }
.tag-color-btn.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.tag-add-loading {
  text-align: center; padding: 20px;
  color: var(--text-tertiary); font-size: 13px;
}

/* Inline action buttons in tables */
.action-btns { display: inline-flex; gap: 8px; }
.abtn {
  display: inline-block; padding: 5px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  background: var(--surface-hover); border: 1px solid var(--border-subtle);
  color: var(--text); transition: var(--transition);
}
.abtn:hover { background: var(--surface); }
.abtn-blue { background: var(--accent); color: white; border: none; font-weight: 600; }
.abtn-blue:hover { background: var(--accent-hover); }
.abtn-red { background: var(--red-bg); color: var(--red); border: none; font-weight: 600; }
.abtn-red:hover { background: rgba(255,59,48,0.2); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

/* ===== Responsive adjustments ===== */
@media (max-width: 1200px) {
  .sidebar { width: 200px; }
  .main-content { margin-left: 200px; }


  :root { --sidebar-w: 200px; }
}

/* ===== Chart.js canvas fix ===== */
canvas { max-width: 100%; }

/* ===== Selection ===== */
::selection { background: rgba(0,122,255,0.3); color: var(--text); }

/* ===== Print ===== */
@media print {
  .sidebar, .top-bar { display: none !important; }
  .main-content { margin: 0 !important; padding: 0 !important; }
}

/* ===== Audit Log Rows ===== */
.audit-row {
  display: flex; gap: 12px; padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: flex-start;
  flex-wrap: nowrap;
}
#auditLogList { overflow-x: auto; }
.audit-time { min-width: 55px; font-size: 12px; color: var(--text-tertiary); flex-shrink: 0; }
.audit-action { min-width: 70px; flex-shrink: 0; }
.audit-admin { min-width: 50px; font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }
.audit-detail { flex: 1 1 0; font-size: 13px; color: var(--text); overflow-wrap: break-word; word-wrap: break-word; line-height: 1.6; min-width: 0; max-width: 500px; }
.audit-target { font-size: 12px; color: var(--text-tertiary); flex-shrink: 0; max-width: 160px; }

#giftImageUploadBox:hover { border-color: var(--accent); }

/* Gift Category Drag Rows */
.gift-cat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s, box-shadow 0.15s;
  background: transparent;
}
.gift-cat-handle {
  cursor: grab; color: var(--text-tertiary); padding: 4px 8px 4px 0;
  display: flex; align-items: center; flex-shrink: 0;
}
.gift-cat-handle:active { cursor: grabbing; }
.gift-cat-placeholder {
  background: var(--surface-hover) !important;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-sm);
  opacity: 0.5;
}
.gift-cat-ghost {
  background: var(--bg-card-solid, #fff);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  opacity: 0.95;
  transform: scale(1.02);
}

/* 盲注表格输入框 */
.blind-input {
  width: 100%; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; text-align: center;
  background: var(--bg-input-solid, rgba(0,0,0,0.2));
  color: var(--text); outline: none; transition: border-color 0.2s;
}
.blind-input:focus { border-color: var(--gold); }
.blind-input::placeholder { color: var(--text-tertiary); font-size: 12px; }

/* ===== 操作日志表格 ===== */
.log-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: transparent; }
.log-table th { background: transparent; font-weight: 600; font-size: 13px; color: var(--text-secondary); padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.log-table td { padding: 12px 16px; font-size: 14px; color: var(--text-primary); border-bottom: 1px solid var(--border); vertical-align: middle; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-table th:nth-child(1), .log-table td:nth-child(1) { width: 180px; }
.log-table th:nth-child(2), .log-table td:nth-child(2) { width: 100px; }
.log-table th:nth-child(3), .log-table td:nth-child(3) { width: 140px; }
.log-table th:nth-child(4), .log-table td:nth-child(4) { width: auto; }
.log-table th:nth-child(5), .log-table td:nth-child(5) { width: 160px; }
.log-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.log-tag.create { background: var(--success-bg); color: var(--success); }
.log-tag.update { background: var(--info-bg); color: var(--info); }
.log-tag.delete { background: var(--danger-bg); color: var(--danger); }
.log-tag.action { background: var(--warning-bg); color: var(--warning); }
.target-cell { color: var(--text-secondary); white-space: nowrap; }
.target-cell .arrow { margin-right: 4px; color: var(--text-placeholder); }
.target-cell .name { color: var(--text-primary); }

/* ============================================================
   Daydream × Shark — 壳层（浅瓷白 + 黑侧栏），不改业务结构
   ============================================================ */
:root {
  --sidebar-w: 168px;
  --topbar-h: 96px;
}
/* 与前台一致：168px 槽 + 132px 黑条 */
.sidebar {
  position: fixed !important;
  top: 12px !important;
  bottom: 12px !important;
  left: 18px !important;
  width: 132px !important;
  height: auto !important;
  margin: 0 !important;
  background: #141416 !important;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 32px rgba(20,22,28,0.18) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 12px 10px !important;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 4px !important;
  z-index: 90;
}
.sidebar::-webkit-scrollbar { display: none; width: 0; }
.sidebar .nav-label { display: none !important; }
.sidebar .icon { display: none !important; }
.sidebar .sidebar-arrow {
  opacity: 0.45;
  margin-left: 2px;
  flex-shrink: 0;
  display: flex !important;
}
.sidebar .sidebar-arrow svg { width: 10px; height: 10px; display: block; }

.sidebar-item,
.sidebar-item.sidebar-parent {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 6px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  color: rgba(242,240,235,0.48) !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  cursor: pointer;
  box-sizing: border-box;
}
.sidebar-item.sidebar-parent {
  flex-wrap: wrap !important;
  height: auto !important;
  min-height: 38px !important;
  padding: 0 !important;
  align-content: flex-start !important;
}
.sidebar-parent > .sidebar-children {
  flex-basis: 100% !important;
  width: 100% !important;
}
.sidebar-item:hover {
  color: #F2F0EB !important;
  background: rgba(255,255,255,0.08) !important;
}
.sidebar-item.active,
.sidebar-parent.active {
  color: #141416 !important;
  background: #F2F0EB !important;
}
.sidebar-parent.open:not(.active) {
  color: #F2F0EB !important;
  background: transparent !important;
}

.sidebar-children {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 4px 2px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
}
.sidebar-parent:not(.open) > .sidebar-children {
  display: none !important;
  max-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.sidebar-child {
  background: transparent !important;
  background-color: transparent !important;
  color: rgba(242,240,235,0.42) !important;
  border: 0 !important;
  border-radius: 9px !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
  height: 32px !important;
  min-height: 32px !important;
  line-height: 32px !important;
  display: block !important;
  width: 100% !important;
  padding: 0 6px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.sidebar-child:hover {
  color: #F2F0EB !important;
  background: rgba(255,255,255,0.06) !important;
}
.sidebar-child.active {
  color: #A8894A !important;
  background: rgba(168,137,74,0.14) !important;
  font-weight: 700 !important;
}

/* ============================================================
   设计稿侧栏结构（rail-shell / rail-item / subnav）— 与前台一致
   ============================================================ */
.app-layout { padding-top: 0 !important; }
#adminRail.rail {
  position: fixed !important;
  top: 28px !important;
  bottom: 18px !important;
  left: 18px !important; /* (168-132)/2，与前台 rail 居中一致 */
  width: 132px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  z-index: 90;
}
#adminRail .rail-shell {
  width: 132px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #141416 !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 32px rgba(20,22,28,0.18) !important;
  overflow: hidden !important;
  min-height: 0 !important;
  position: relative !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  backdrop-filter: none !important;
}
#adminRail .rail-logo {
  height: 52px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-top: 8px !important;
  margin: 0 !important;
  width: auto !important;
}
#adminRail .rail-logo img { width: 24px !important; height: auto !important; }
#adminRail .rail-inner {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important; /* 主项之间留呼吸，避免贴字 */
  padding: 6px 10px 14px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: none !important;
  width: auto !important;
  background: transparent !important;
  border: 0 !important;
  margin: 0 !important;
}
#adminRail .rail-inner::-webkit-scrollbar { display: none; width: 0; }
#adminRail .rail-fade-top { height: 10px; flex-shrink: 0; }
#adminRail .rail-fade-bot { height: 18px; flex-shrink: 0; }
/* 导航栏底部铃铛（与前台统一） */
#adminRail .rail-foot {
  flex-shrink: 0 !important;
  padding: 8px 10px 14px !important;
  border-top: 0 !important;
  display: flex !important;
  justify-content: center !important;
}
/* 铃铛动画（与前台一致） */
.notification-bell.has-notifications {
  animation: bell-shake 0.5s ease-in-out;
}
@keyframes bell-shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(-15deg); }
  75% { transform: rotate(10deg); }
}
/* 待处理面板：居中黑底，与前台一致 */
.chips-notify-panel {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.45) !important;
  z-index: 2000 !important;
  align-items: center !important;
  justify-content: center !important;
}
.chips-notify-panel.open {
  display: flex !important;
}
.chips-notify-card {
  width: 420px !important;
  max-width: 92vw !important;
  max-height: 600px !important;
  overflow: auto !important;
  background: #1D1D1F !important;
  border: 1px solid rgba(201, 168, 76, 0.3) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
}
.chips-notify-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 20px !important;
  border-bottom: 1px solid rgba(201, 168, 76, 0.1) !important;
}
.chips-notify-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: #F5F5F7 !important;
}
.chips-notify-close {
  background: none !important;
  border: none !important;
  color: #8E8E93 !important;
  font-size: 20px !important;
  cursor: pointer !important;
  padding: 4px !important;
  border-radius: 8px !important;
}
.chips-notify-close:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #F5F5F7 !important;
}
.chips-notify-list {
  max-height: 400px !important;
  overflow-y: auto !important;
  padding: 10px !important;
}
.chips-notify-empty {
  text-align: center !important;
  padding: 28px 12px !important;
  color: #8E8E93 !important;
  font-size: 13px !important;
}
.chips-notify-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px !important;
  padding: 14px !important;
  margin-bottom: 10px !important;
}
.chips-notify-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}
.chips-notify-item .nm {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #F5F5F7 !important;
}
.chips-notify-item .type {
  font-size: 12px !important;
  font-weight: 600 !important;
}
.chips-notify-item .type.dep { color: #2d8a5e !important; }
.chips-notify-item .type.wdr { color: #C4403A !important; }
.chips-notify-item .amt {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #C9A85E !important;
}
.chips-notify-item .tm {
  font-size: 12px !important;
  color: #8E8E93 !important;
}
.chips-act-btn {
  flex: 1 !important;
  height: 34px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
.chips-act-btn.confirm {
  border: none !important;
  background: #2d8a5e !important;
  color: #fff !important;
}
.chips-act-btn.reject {
  border: 1px solid #C4403A !important;
  background: transparent !important;
  color: #C4403A !important;
}
#adminRail .rail-foot .ri {
  position: relative !important;
  color: rgba(242,240,235,0.55) !important;
}
#adminRail .rail-foot .ri:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #F2F0EB !important;
}
/* 角标贴在铃铛图标右上角（与前台一致） */
.bell-icon-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 1 !important;
}
.notification-badge {
  position: absolute !important;
  top: -6px !important;
  right: -8px !important;
  background: #C4403A !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  min-width: 16px !important;
  height: 16px !important;
  border-radius: 8px !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
  box-sizing: border-box !important;
  line-height: 16px !important;
  overflow: visible !important;
  z-index: 2;
}
.notification-badge.on {
  display: flex !important;
}
#adminRail .rail-item {
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  width: 100% !important;
}
/* 彻底清掉旧 .sidebar-item 把框撑高、字不居中 */
#adminRail .sidebar-item,
#adminRail .sidebar-parent,
#adminRail button.ri {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
#adminRail .sidebar-parent {
  height: auto !important;
  max-height: none !important;
}
#adminRail .sidebar-parent > .ri {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
}
#adminRail .ri {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  color: rgba(242,240,235,0.45) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: background .15s, color .15s !important;
  position: relative !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  line-height: 38px !important;
  text-align: center !important;
  overflow: hidden !important;
}
#adminRail .ri:hover { background: rgba(255,255,255,0.08) !important; color: #F2F0EB !important; }
/* 白底只给当前页；展开的父级只亮字、不填白底 */
#adminRail .ri.on,
#adminRail .ri.active {
  background: #F2F0EB !important;
  background-color: #F2F0EB !important;
  color: #141416 !important;
}
#adminRail .rail-item.open > .ri.on,
#adminRail .rail-item.open > .ri.active:not(.home-current) {
  background: transparent !important;
  background-color: transparent !important;
  color: #F2F0EB !important;
}
#adminRail .ri.dim { opacity: .28 !important; pointer-events: none !important; }
/* 箭头靠右成一列（设计稿 absolute right） */
#adminRail .chev {
  position: absolute !important;
  right: 10px !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 9px !important;
  opacity: .55 !important;
  pointer-events: none !important;
  color: inherit !important;
  margin: 0 !important;
  line-height: 1 !important;
  width: auto !important;
}
#adminRail .rail-item.open > .ri .chev {
  transform: translateY(-50%) rotate(180deg) !important;
}
#adminRail .rail-item.open > .ri:not(.active):not(.on) {
  color: #F2F0EB !important;
  background: transparent !important;
  background-color: transparent !important;
}
#adminRail .subnav {
  display: grid !important;
  grid-template-rows: 0fr !important;
  transition: grid-template-rows .28s ease !important;
  margin-top: 2px !important;
  background: transparent !important;
  border: 0 !important;
}
#adminRail .rail-item.open > .subnav { grid-template-rows: 1fr !important; }
#adminRail .subnav-in {
  overflow: hidden !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 0 4px !important;
  background: transparent !important;
  border: 0 !important;
}
#adminRail .rail-item.open > .subnav > .subnav-in { padding: 4px 4px 8px !important; }
#adminRail .rc {
  height: 32px !important;
  border-radius: 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .01em !important;
  color: rgba(242,240,235,0.42) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  transition: background .15s, color .15s !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  cursor: pointer;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 6px !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  text-align: center !important;
}
#adminRail .rc:hover { background: rgba(255,255,255,0.06) !important; color: #F2F0EB !important; }
#adminRail .rc.on,
#adminRail .rc.active {
  color: #A8894A !important;
  background: rgba(168,137,74,0.12) !important;
}
#adminRail .rc.dim { opacity: .28 !important; pointer-events: none !important; }

/* 主内容与标题：设计稿 shell 168 + page/top padding 28 = 196 */
.main-content {
  margin-left: 196px !important;
  padding: 0 32px 48px 0 !important;
}
.top-bar {
  background: transparent !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 28px 28px 12px 196px !important;
  align-items: flex-start !important;
  height: auto !important;
  min-height: 96px;
  left: 0 !important;
  right: 0 !important;
}
/* 清掉旧 .sidebar-item 对 rail 的干扰 */
#adminRail .sidebar-item,
#adminRail .sidebar-parent {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 0 !important;
  margin: 0 !important;
}
#adminRail .rail-inner { gap: 4px !important; }
#adminRail .rail-item { margin: 0 !important; padding: 0 !important; }
#adminRail .rail-item + .rail-item { margin-top: 0 !important; }

/* 等级图例：名称左、数字右（设计稿 .tl） */
.ov-meta {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(220px, 1fr);
  gap: 40px;
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid rgba(20,22,28,0.08);
  align-items: start;
}
.ov-tier-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 2px 4px;
}
.ov-donut { width: 108px; height: 108px; flex-shrink: 0; }
.ov-tier-legend { flex: 1; min-width: 0; max-width: 200px; }
.ov-tl {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 7px 0 !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
}
.ov-tl .l {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: rgba(20,20,22,0.68) !important;
  min-width: 0 !important;
  white-space: nowrap;
}
.ov-tl .l i {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}
.ov-tl .n {
  margin-left: auto !important;
  font-family: 'SF Mono', Consolas, monospace !important;
  font-weight: 600 !important;
  color: #141416 !important;
  font-variant-numeric: tabular-nums !important;
  flex-shrink: 0 !important;
}
/* 右上角账号：对齐设计稿胶囊 */
.topbar-user {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 999px !important;
  background: transparent !important;
  border: 0 !important;
}
.topbar-user .user-avatar {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  background: #141416 !important;
  color: #F4F2ED !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
}
.topbar-user .user-name {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #141416 !important;
  line-height: 1.15 !important;
  text-align: left !important;
}
.topbar-user .user-role {
  font-size: 10px !important;
  color: rgba(20,20,22,0.68) !important;
  line-height: 1.15 !important;
  text-align: left !important;
}
.topbar-user:hover .user-name { color: #A8894A !important; }
/* 顶栏：标题与主内容左缘对齐 — 设计稿 shell168 + pad28 = 196 */
.top-bar {
  background: transparent !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 28px 28px 12px 196px !important;
  align-items: flex-start !important;
  height: auto !important;
  min-height: 96px;
  left: 0 !important;
  right: 0 !important;
}
.topbar-left {
  flex: 1;
  min-width: 0;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}
.brand-name {
  font-family: 'Times New Roman', 'Songti SC', Georgia, serif !important;
  font-size: 42px !important;
  font-weight: 400 !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  color: #141416 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}
.brand-sub {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .24em !important;
  margin-top: 6px !important;
  color: rgba(20,20,22,0.48) !important;
  display: block !important;
}
.app-layout { padding-top: 96px !important; margin-top: 0 !important; }
.main-content {
  margin-left: 196px !important;
  padding: 0 32px 48px 0 !important;
}
/* 正文块零额外左距，与标题同一左缘 */
.tab-content,
.ov-lower,
.ov-left,
.ov-pool {
  margin-left: 0 !important;
  padding-left: 0 !important;
}
.ov-pool { padding: 8px 0 0 !important; }
/* 白卡 */
.section,
.bento-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(20,22,28,0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 0 0 1px rgba(20,22,28,0.04), 0 10px 32px rgba(20,22,28,0.05) !important;
}
/* 会员管理页面透明背景 */
#tab-members .section {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 统一所有子页面字体规范 - 按照经营总览设计稿 */
.tab-content {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  padding: 28px 32px;
}

/* 会员表格样式优化 */
.member-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 4px 16px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}

.member-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev-2);
  letter-spacing: 0.04em;
}

.member-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--t1);
}

.member-table tr:last-child td {
  border-bottom: 0;
}

.member-table tr:hover {
  background: rgba(168,137,74,0.04);
}

/* 操作按钮样式 */
.action-buttons {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.action-buttons .btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.action-buttons .btn-outline {
  background: transparent !important;
  border: 0 !important;
  color: var(--t2) !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.action-buttons .btn-outline:hover {
  background: rgba(168,137,74,0.08) !important;
  color: var(--t1) !important;
}

.action-buttons .btn-danger {
  background: transparent !important;
  border: 0 !important;
  color: #FF453A !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.action-buttons .btn-danger:hover {
  background: rgba(255,69,58,0.08) !important;
  color: #FF6961 !important;
}

/* 员工内部号：列表行，不用 table，避免 overflow 裁切 */
.emp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.emp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line, rgba(255,255,255,0.08));
  border-radius: 10px;
  background: var(--bg-elev, transparent);
}
.emp-nick {
  flex: 1 1 160px;
  min-width: 120px;
  font-weight: 600;
}
.emp-tag {
  background: var(--gold);
  color: var(--bg-card-solid);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.emp-meta {
  flex: 0 0 110px;
  font-size: 12px;
  color: var(--text-dim);
}
.emp-chips {
  flex: 0 0 90px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}
.emp-chips.neg { color: var(--red, #FF453A); }
.emp-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
  align-items: center;
  margin-left: auto;
}

/* 通用表格样式 - 适用于所有子页面 */
.tab-content table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 4px 16px rgba(0,0,0,0.04);
  margin-bottom: 0;
}

.tab-content table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev-2);
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab-content table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--t1);
}

.tab-content table tr:last-child td {
  border-bottom: 0;
}

.tab-content table tr:hover {
  background: rgba(168,137,74,0.04);
}

/* 会员管理页面分页按钮 */
#memberPagination .btn {
  min-width: 80px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--t2);
  transition: all 0.2s ease;
}

#memberPagination .btn:hover {
  background: var(--bg-elev-2);
  border-color: var(--line-3);
  color: var(--t1);
}

#memberPagination .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-elev-2);
}

#memberPagination .btn.btn-gold {
  background: var(--t1);
  color: var(--bg);
  border-color: var(--t1);
}

#memberPagination .btn.btn-gold:hover {
  opacity: 0.9;
}

/* 会员管理页面特殊布局 - 只在激活时生效 */
.tab-content.members-page.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  overflow: hidden;
  padding: 28px 32px;
}

/* 固定区域：标题和搜索框 */
.members-header {
  flex-shrink: 0;
  overflow: hidden;
}

.members-header h2 {
  font-size: 28px;
  font-weight: 400;
  font-family: var(--serif);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

/* 可滚动区域：表格内容 */
.members-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* 固定区域：分页按钮 */
.members-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
  overflow: hidden;
}

/* 分页按钮样式 */
.members-footer .btn {
  min-width: 80px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--t2);
  transition: all 0.2s ease;
}

.members-footer .btn:hover {
  background: var(--bg-elev-2);
  border-color: var(--line-3);
  color: var(--t1);
}

.members-footer .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-elev-2);
}

.members-footer .btn.btn-gold {
  background: var(--t1);
  color: var(--bg);
  border-color: var(--t1);
}

.members-footer .btn.btn-gold:hover {
  opacity: 0.9;
}

/* 通用表单样式 */
.tab-content input[type="text"],
.tab-content input[type="number"],
.tab-content input[type="email"],
.tab-content input[type="tel"],
.tab-content select,
.tab-content textarea {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-elev);
  color: var(--t1);
  transition: all 0.2s ease;
}

.tab-content input[type="text"]:focus,
.tab-content input[type="number"]:focus,
.tab-content input[type="email"]:focus,
.tab-content input[type="tel"]:focus,
.tab-content select:focus,
.tab-content textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--acc-dim);
}

.tab-content textarea {
  height: auto;
  padding: 12px;
  resize: vertical;
  min-height: 80px;
}

/* 通用按钮样式优化 */
.tab-content .btn {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-content .btn-gold {
  background: var(--acc);
  border: 1px solid var(--acc);
  color: #fff;
}

.tab-content .btn-gold:hover {
  background: #8F7340;
  border-color: #8F7340;
  box-shadow: 0 2px 8px rgba(168,137,74,0.25);
}

.tab-content .btn-outline {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--t2);
}

.tab-content .btn-outline:hover {
  background: var(--bg-elev-2);
  border-color: var(--line-3);
  color: var(--t1);
}

.tab-content .btn-danger {
  background: #FF453A;
  border: 1px solid #FF453A;
  color: #fff;
}

.tab-content .btn-danger:hover {
  background: #FF6961;
  border-color: #FF6961;
}

.tab-content .btn-gray {
  background: var(--secondary-fill);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.tab-content .btn-gray:hover {
  background: var(--fill);
  color: var(--text);
}

/* 空状态样式 */
.tab-content .empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--t4);
  font-size: 14px;
  font-style: italic;
}

/* 加载状态样式 */
.tab-content .loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--t4);
  font-size: 14px;
}

/* 分页样式优化 */
.tab-content .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 16px 0;
}

.tab-content .pagination .btn {
  min-width: 80px;
}

.tab-content .pagination span {
  font-size: 13px;
  color: var(--t3);
  padding: 0 12px;
}

/* 标签样式优化 */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: transparent;
  border: 0;
}

.badge-normal {
  background: rgba(20,20,22,0.06);
  color: var(--t3);
}

.badge-vip {
  background: rgba(168,137,74,0.12);
  color: var(--acc);
}

.badge-black {
  background: rgba(168,137,74,0.08);
  color: var(--acc);
}

.badge-employee {
  background: rgba(168,137,74,0.15);
  color: var(--acc);
}

/* 搜索框样式优化 */
.tab-content .search-box {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.tab-content .search-box input {
  width: 280px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-elev);
}

.tab-content .search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--acc-dim);
}

/* 工具栏样式 */
.tab-content .toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.tab-content .toolbar-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tab-content .toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 统计卡片样式 */
.tab-content .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.tab-content .stat-card {
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: none;
}

.tab-content .stat-card h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.tab-content .stat-card .value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: -0.02em;
}

.tab-content .stat-card .change {
  font-size: 12px;
  color: var(--go);
  margin-top: 8px;
}

.tab-content .stat-card .change.down {
  color: var(--no);
}

/* 会员详情卡片样式 - 参考前台设计 */
.member-detail-card {
  background: transparent;
  border-radius: 16px;
  padding: 0;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.member-detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(168,137,74,0.08), transparent 70%);
  pointer-events: none;
}

.member-card-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.member-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), #C4A86A);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.avatar-text {
  font-size: 32px;
  color: white;
  position: relative;
  z-index: 1;
}

.avatar-halo {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,137,74,0.2), transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.member-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--t1);
  letter-spacing: -0.02em;
  margin: 0;
}

.member-level-badge,
.member-status-badge,
.member-employee-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.member-employee-badge {
  background: rgba(168,137,74,0.15);
  color: var(--acc);
}

.member-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 13px;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-note {
  font-size: 13px;
  color: var(--t2);
  padding: 12px;
  background: rgba(20,20,22,0.03);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.member-note:hover {
  background: rgba(20,20,22,0.06);
}

.member-note b {
  color: var(--t3);
  font-weight: 600;
  margin-right: 8px;
}

.member-note-edit {
  display: flex;
  gap: 8px;
  align-items: center;
}

.member-note-edit input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-elev);
}

.member-note-edit button {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.member-note-edit button:first-of-type {
  background: var(--acc);
  border: 0;
  color: white;
}

.member-note-edit button:first-of-type:hover {
  background: #8F7340;
}

.member-note-edit button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--t2);
}

.member-note-edit button.ghost:hover {
  background: rgba(20,20,22,0.03);
}

.member-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.member-actions .btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.member-actions .btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--t2);
}

.member-actions .btn-outline:hover {
  background: rgba(20,20,22,0.03);
  border-color: var(--line-3);
  color: var(--t1);
}

.member-actions .btn-danger {
  background: transparent;
  border: 0;
  color: #FF453A;
}

.member-actions .btn-danger:hover {
  background: rgba(255,69,58,0.08);
  color: #FF6961;
}

.member-points-section {
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
  background: rgba(168,137,74,0.04);
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.points-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--t3);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.points-value {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 600;
  color: var(--acc);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.points-hint {
  font-size: 12px;
  color: var(--t3);
}

.member-ops {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.op-btn {
  flex: 1;
  height: 48px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.op-btn.deposit {
  background: var(--t1);
  border: 0;
  color: var(--bg);
}

.op-btn.deposit:hover {
  opacity: 0.9;
}

.op-btn.redeem {
  background: transparent;
  border: 1px solid var(--acc);
  color: var(--acc);
}

.op-btn.redeem:hover {
  background: rgba(168,137,74,0.08);
}

.op-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.member-ops-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.op-btn-sub {
  background: transparent;
  border: 0;
  color: var(--t2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.op-btn-sub:hover {
  background: rgba(20,20,22,0.03);
  color: var(--t1);
}

.op-btn-sub.in {
  color: var(--go);
}

.op-btn-sub.in:hover {
  background: rgba(31,157,85,0.08);
}

.op-btn-sub.out {
  color: var(--no);
}

.op-btn-sub.out:hover {
  background: rgba(196,64,58,0.08);
}

.ops-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--t4);
}

/* 返回按钮链接样式 */
.btn-link {
  background: transparent !important;
  border: 0 !important;
  color: var(--t2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 0 !important;
  cursor: pointer;
  transition: color 0.2s ease;
  text-decoration: none;
}

.btn-link:hover {
  color: var(--t1) !important;
}

.tab-content h2 {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  color: var(--t1) !important;
  margin-bottom: 20px !important;
}

.tab-content h3 {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--t1) !important;
  margin-bottom: 16px !important;
}

.tab-content p,
.tab-content label,
.tab-content span {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 14px !important;
  color: var(--t2) !important;
  line-height: 1.5 !important;
}

.tab-content .btn {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.tab-content input,
.tab-content select,
.tab-content textarea {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 14px !important;
}

.tab-content table {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
}

.tab-content table th {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--t3) !important;
  letter-spacing: 0.04em !important;
}

.tab-content table td {
  font-size: 13px !important;
  color: var(--t1) !important;
}

.tab-content .loading,
.tab-content .empty {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
  font-size: 14px !important;
  color: var(--t4) !important;
}

.tab-content .section {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
}

/* 系统设置页面去掉白色背景 */
#tab-setting-shop .section,
#tab-setting-member .section,
#tab-setting-cashier .section,
#tab-setting-table .section,
#tab-setting-print .section,
#tab-setting-system .section {
  background: transparent !important;
  box-shadow: none !important;
}
/* 浅色画布（强制，不依赖 localStorage） */
body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(168,137,74,0.05), transparent 55%),
    #F4F2ED !important;
  color: #141416 !important;
}
/* 联名底图已关闭 */
#collabBg { display: none !important; opacity: 0 !important; }

/* ============================================================
   经营总览 — 对齐设计稿内容区
   ============================================================ */
.ov-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.72fr);
  gap: 36px;
  align-items: stretch;
  height: 100%;
  min-height: calc(100vh - 140px);
}
.ov-left { display: flex; flex-direction: column; min-width: 0; padding-top: 4px; }
.ov-ml {
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
  color: rgba(20,20,22,0.48); text-transform: uppercase;
  margin-bottom: 14px;
}
.ov-pool { padding: 8px 2px 0; }
.ov-pool-head { display: flex; justify-content: space-between; align-items: flex-start; }
.ov-pool-v {
  font-family: 'SF Mono', 'JetBrains Mono', Consolas, monospace;
  font-size: 52px; font-weight: 600; letter-spacing: -0.04em;
  color: #A8894A; line-height: 1; font-variant-numeric: tabular-nums;
}
.ov-pool-d { margin-top: 12px; font-size: 11px; color: rgba(20,20,22,0.48); }
.ov-chg {
  font-family: 'SF Mono', Consolas, monospace; font-size: 11px; font-weight: 600;
  color: #1F9D55; padding-top: 2px;
}
.ov-pool-chart { height: 92px; margin-top: 18px; }
.ov-pool-chart svg { width: 100%; height: 100%; display: block; }
.ov-kpis {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  margin: 28px 0 32px; padding: 4px 2px 0;
}
.ov-ic { padding: 10px 28px 10px 0; position: relative; }
.ov-ic + .ov-ic { padding-left: 28px; }
.ov-ic + .ov-ic::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 1px; background: rgba(20,22,28,0.12);
}
.ov-v {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 26px; font-weight: 600; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.ov-v.ov-dn { color: #C4403A; }
.ov-d { margin-top: 12px; font-size: 11px; color: rgba(20,20,22,0.48); }
.ov-meta {
  display: grid; grid-template-columns: minmax(280px, 340px) minmax(220px, 1fr);
  gap: 40px; margin-top: 8px; padding-top: 22px;
  border-top: 1px solid rgba(20,22,28,0.08);
  align-items: start;
}
.ov-bare-h {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px; padding: 0 2px;
}
.ov-bare-h h3 { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: rgba(20,20,22,0.68); }
.ov-more { font-size: 11px; font-weight: 600; color: #A8894A; text-decoration: none; }
.ov-more:hover { text-decoration: underline; }
.ov-tier-wrap { display: flex; align-items: center; gap: 22px; padding: 8px 2px; }
.ov-donut { width: 100px; height: 100px; flex-shrink: 0; }
.ov-tl {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 11px;
}
.ov-tl .l { display: flex; align-items: center; gap: 8px; color: rgba(20,20,22,0.68); }
.ov-tl .l i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ov-tl .n {
  font-family: 'SF Mono', Consolas, monospace; font-weight: 600; color: #141416;
}
.ov-rank-list {
  max-height: 320px; overflow-y: auto; overscroll-behavior: contain;
  padding-right: 4px;
}
.ov-rank-list::-webkit-scrollbar { width: 4px; }
.ov-rank-list::-webkit-scrollbar-thumb { background: rgba(20,20,22,0.28); border-radius: 2px; }
.ov-rank-list .loading,
.ov-rank-list .empty {
  padding: 16px 2px; font-size: 12px; color: rgba(20,20,22,0.48);
}
.ov-rk {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 12px; align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(20,22,28,0.08);
  cursor: default;
}
.ov-rk:last-child { border-bottom: 0; }
.ov-rk .no {
  font-family: 'SF Mono', Consolas, monospace; font-size: 11px;
  color: rgba(20,20,22,0.48); font-weight: 700;
}
.ov-rk.ov-top3 .no { color: #A8894A; }
.ov-rk .n { font-size: 13px; font-weight: 700; color: #141416; }
.ov-rk .m {
  font-family: 'SF Mono', Consolas, monospace; font-size: 10px;
  color: rgba(20,20,22,0.48); margin-top: 2px;
}
.ov-rk .pt {
  font-family: 'SF Mono', Consolas, monospace; font-size: 12px; font-weight: 700;
  color: #141416; font-variant-numeric: tabular-nums;
}
.ov-rk.ov-top3 .pt { color: #A8894A; }
.ov-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; min-height: 280px;
  height: 780px;
  margin-left: -10px;
  background: radial-gradient(ellipse 70% 55% at 48% 44%, rgba(168,137,74,0.12), transparent 70%);
  border: 0 !important; box-shadow: none !important;
}
.ov-stage-mark { position: relative; width: 120px; z-index: 1; }
.ov-stage-mark img { width: 100%; filter: drop-shadow(0 12px 28px rgba(20,22,28,0.12)); }
.ov-halo {
  position: absolute; inset: -28px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,107,0.2), transparent 68%);
  animation: ovHalo 5s ease-in-out infinite; pointer-events: none;
}
@keyframes ovHalo {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(1.06); }
}
.ov-stage-lock { position: relative; z-index: 1; text-align: center; }
.ov-stage-lock .dd {
  font-family: 'Times New Roman', Georgia, serif; font-style: italic;
  font-size: 28px; color: #A8894A;
}
.ov-stage-lock .x { margin: 8px 0; font-size: 11px; letter-spacing: .35em; color: rgba(20,20,22,0.28); }
.ov-stage-lock .sh {
  font-size: 12px; font-weight: 800; letter-spacing: .42em; color: #141416; text-indent: .42em;
}
.ov-stage-lock .cn { margin-top: 10px; font-size: 11px; color: rgba(20,20,22,0.68); letter-spacing: .18em; }
.ov-pulse {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px;
  margin-top: 6px; padding: 4px 0; color: inherit; text-decoration: none;
}
.ov-pulse .dots { display: inline-flex; gap: 3px; }
.ov-pulse .dots i {
  width: 5px; height: 5px; border-radius: 50%; background: #1F9D55;
  animation: ovBeat 1.6s ease-in-out infinite;
}
.ov-pulse .dots i:nth-child(2) { animation-delay: .2s; }
.ov-pulse .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes ovBeat {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.85); }
}
.ov-pulse .txt { font-size: 12px; font-weight: 600; color: rgba(20,20,22,0.68); }
.ov-pulse .txt em { font-style: normal; font-family: 'SF Mono', Consolas, monospace; font-weight: 700; color: #A8894A; }
.ov-pulse .go { font-size: 11px; font-weight: 600; color: rgba(20,20,22,0.48); }
.ov-pulse:hover .go { color: #A8894A; }

/* ============================================================
   输入 / 下拉：无白底、无金框（前后台统一）
   ============================================================ */
input, select, textarea {
  font-family: "Inter", "SF Pro Display", "PingFang SC", -apple-system, "Segoe UI", sans-serif !important;
}
.form-group input,
.form-group select,
.form-group textarea,
.input-row input,
.input-row select {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(20,22,28,0.12) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  color: #141416 !important;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.input-row input:focus,
.input-row select:focus,
.topbar-search:focus-within {
  border-color: rgba(20,22,28,0.28) !important;
  box-shadow: none !important;
  outline: none !important;
}
select, select option {
  background-color: #F4F2ED !important;
  color: #141416 !important;
}
select option:checked,
select option:hover {
  background-color: rgba(168,137,74,0.12) !important;
  color: #141416 !important;
}
.topbar-search {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.ov-stage-foot {
  position: absolute; bottom: 20px; left: 0; right: 0; text-align: center;
  font-size: 10px; letter-spacing: .2em; font-weight: 600; color: rgba(20,20,22,0.28);
}
@media (max-width: 1200px) {
  .ov-lower { grid-template-columns: 1fr; }
  .ov-meta { grid-template-columns: 1fr; gap: 24px; }
}

/* 前台客户详情卡样式 - 完全复制 */
.guest {
  position: relative; overflow: hidden;
  color: #F2F0EB; border-radius: 16px;
  padding: 20px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 12px; flex: 0 0 auto;
  width: 367px;
  min-height: 231px; height: 231px;
  background: linear-gradient(155deg, #1A1A1C 0%, #121214 48%, #0C0C0E 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
  transition: background .2s, box-shadow .2s, border-color .2s;
}

.guest::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #C9A86B 30%, #E5C581 50%, #C9A86B 70%, transparent);
  opacity: 0.55;
}

.guest::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168,137,74,0.1), transparent 70%);
  pointer-events: none;
}

.guest-mark {
  position: absolute; top: 22px; right: 22px;
  width: 28px; height: auto; opacity: 0.9;
  filter: brightness(0) invert(1); pointer-events: none;
}

.guest-id-row { display: flex; flex-direction: column; gap: 0; padding: 8px 50px 0 16px; }

.guest-name {
  font-family: var(--serif); font-size: 24px; font-weight: 400;
  letter-spacing: -0.03em; line-height: 1; color: #F5F5F7;
}

.guest-id {
  margin-top: 6px; font-family: var(--mono);
  font-size: 12px; color: rgba(242,240,235,0.62); letter-spacing: .06em;
}

.guest-lvl {
  margin-top: 4px; font-size: 12px; font-weight: 700;
  color: #D4B56A; letter-spacing: .08em;
}

.guest-note {
  margin-top: 6px; font-size: 13px; color: rgba(242,240,235,0.62);
  line-height: 1.45; cursor: pointer;
}

.guest-note b {
  font-weight: 700; color: rgba(242,240,235,0.78);
  letter-spacing: .06em; font-size: 11px; margin-right: 8px;
}

.guest-note-edit { display: none; gap: 6px; margin-top: 8px; }

.guest-note-edit.show { display: flex; }

.guest-note-edit input {
  flex: 1; height: 32px; border-radius: 8px; padding: 0 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #F2F0EB; font-size: 12px;
}

.guest-note-edit button {
  height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 11px; font-weight: 700;
  background: #F2F0EB; color: #141416;
}

.guest-note-edit button.ghost {
  background: transparent; color: rgba(242,240,235,0.5);
  border: 1px solid rgba(255,255,255,0.15);
}

.points-block { text-align: left; padding: 8px 0 4px 16px; cursor: default; }

.points-block .k {
  font-size: 10px; font-weight: 700; letter-spacing: .2em;
  color: rgba(242,240,235,0.55); margin-bottom: 4px;
}

.points-block .v {
  font-family: var(--mono); font-size: 28px; font-weight: 600;
  letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
  color: #E5C581; line-height: 1;
}

.points-block .hint {
  margin-top: 4px; font-size: 11px; color: rgba(242,240,235,0.5);
  letter-spacing: .04em;
}

/* 详情页Tab按钮样式 - 按照导航栏标准 */
.detail-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}

.detail-tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--t3);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.detail-tab:hover {
  color: var(--t2);
  background: rgba(168,137,74,0.04);
}

.detail-tab.active {
  color: var(--acc);
  border-bottom-color: var(--acc);
  background: rgba(168,137,74,0.06);
}

/* 详情页表格样式 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 4px 16px rgba(0,0,0,0.04);
}

.data-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev-2);
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--t1);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tr:hover {
  background: rgba(168,137,74,0.04);
}

/* 店铺设置卡片样式 */
.shop-settings-card {
  background: transparent;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}

.shop-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.shop-settings-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  margin: 0;
}

.shop-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.shop-info-item {
  min-width: 0;
}

.shop-info-item.full {
  grid-column: 1 / -1;
}

.shop-info-item label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-align: left;
}

.shop-info-value {
  font-size: 14px;
  color: var(--t1);
  font-weight: 500;
  display: block;
  text-align: left;
}

/* 店铺设置卡片样式 */
.shop-settings-card {
  background: transparent;
  border-radius: 0;
  padding: 0 0 16px 0;
  margin-bottom: 0;
}

.shop-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.shop-settings-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
  margin: 0;
}

/* 一行一行的布局 */
.shop-info-line {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 0;
  gap: 0;
}

.shop-info-label {
  width: 100px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--t3);
  text-align: left;
  padding-right: 16px;
}

.shop-info-value {
  flex: 1;
  font-size: 14px;
  color: var(--t1);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 未设置状态 - 淡灰色 */
.shop-info-value.not-set {
  color: var(--t3);
  font-weight: 400;
}

/* 店铺设置和营业时间设置之间的分界线 */
.business-settings-card {
  border-top: 1px solid var(--line-2);
  padding-top: 20px;
  margin-top: 8px;
}

.shop-info-value input[type="text"] {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-elev);
  color: var(--t1);
  transition: all 0.2s ease;
}

.shop-info-value input:focus {
  outline: none;
  border-color: var(--t3);
}

/* placeholder淡灰色 */
.shop-info-value input::placeholder {
  color: var(--t3);
  font-weight: 400;
}

.shop-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

/* 编辑模式下Logo可点击 */
#shopEditMode .shop-logo-img {
  cursor: pointer;
  transition: all 0.2s ease;
}

#shopEditMode .shop-logo-img:hover {
  border-color: var(--t3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 营业时间选择器样式 */
.shop-info-value select {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-elev);
  color: var(--t1);
  border: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
}

.shop-info-value select:focus {
  outline: none;
  border-color: var(--t3);
}

/* 模态框样式 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(244,242,237,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--bg-elev);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(20,22,28,0.15), 0 0 0 1px rgba(20,22,28,0.08);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  margin: 0;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px 20px;
  border-top: 0;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--t1);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--t3);
  box-shadow: none;
}

.form-group input::placeholder {
  color: var(--t4);
}

/* 会员详情统计卡片样式 - 去掉白色背景 */
#memberDetailStats .stat-card {
  background: transparent !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#memberDetailStats .stat-card:hover {
  background: rgba(168,137,74,0.04) !important;
}

/* 排行榜滚动条隐藏 */
#rankingsSharkLeaderboard::-webkit-scrollbar {
  display: none;
}

/* 赛事中心子页面背景透明 */
#tab-matches .section,
#tab-match-events .section,
#tab-blind-structures .section,
#tab-timer-settings .section,
#tab-prize-pool .section,
#tab-tickets .section,
#tab-verification .section {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 赛事中心子页面表格样式 */
#tab-matches table,
#tab-match-events table,
#tab-blind-structures table,
#tab-prize-pool table,
#tab-tickets table,
#tab-verification table {
  background: transparent !important;
}

#tab-matches table th,
#tab-match-events table th,
#tab-blind-structures table th,
#tab-prize-pool table th,
#tab-tickets table th,
#tab-verification table th {
  background: var(--bg-elev-2) !important;
}

/* 赛事中心子页面统计卡片 */
#tab-tickets .stat-card,
#tab-verification .stat-card {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}

/* ===== 会员等级整合配置面板样式 ===== */

/* 侧边面板遮罩层 */
.side-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.side-panel-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 侧边面板主体 */
.side-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: var(--bg);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.side-panel.active {
  right: 0;
}

/* 面板头部 */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.panel-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* 面板内容 */
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 面板底部 */
.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  bottom: 0;
}

/* 升级方式选择卡片 */
.upgrade-mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.mode-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
}

.mode-card:hover {
  border-color: var(--accent);
  background: rgba(168, 137, 74, 0.05);
}

.mode-card.selected {
  border-color: var(--accent);
  background: rgba(168, 137, 74, 0.1);
}

.mode-card .mode-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.mode-card .mode-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.mode-card .mode-unit {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* 等级列表样式 */
.level-list {
  margin-top: 20px;
}

.level-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.level-item:hover {
  box-shadow: var(--shadow-sm);
}

.level-order {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(168, 137, 74, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.level-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #2A2D36;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.level-info {
  flex: 1;
  min-width: 0;
}

.level-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.level-threshold {
  font-size: 12px;
  color: var(--text-tertiary);
}

.level-actions {
  display: flex;
  gap: 8px;
}

/* 图标按钮 */
.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-icon.danger:hover {
  background: rgba(196, 64, 58, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

/* 同步状态指示器 */
.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 16px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.sync-dot.pending {
  background: var(--accent);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 区块标题 */
.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title .badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(168, 137, 74, 0.1);
  color: var(--accent);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state .empty-text {
  font-size: 14px;
  margin-bottom: 8px;
}

.empty-state .empty-hint {
  font-size: 12px;
}

/* 加载状态 */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  min-width: 120px;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  overflow: hidden;
  transform: none !important;
  padding: 8px 16px !important;
}

.btn.loading:hover {
  filter: none !important;
}

.btn.loading:active {
  transform: none !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0;
  padding: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 600px) {
  .side-panel {
    width: 100%;
    right: -100%;
  }
  
  .upgrade-mode-cards {
    grid-template-columns: 1fr;
  }
}

/* 输入框样式 */
.input {
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  width: 100%;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group .input {
  flex: 1;
}

.input-suffix {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* 核销状态颜色 */
.data-table .verification-verified,
.verification-verified {
  color: var(--green) !important;
  font-weight: 500;
}

.data-table .verification-pending,
.verification-pending {
  color: var(--red) !important;
  font-weight: 500;
}

/* 开关胶囊样式 */
.toggle-capsule {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--fill);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s ease;
}

.toggle-capsule.active .toggle-track {
  background: var(--green);
}

.toggle-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-capsule.active .toggle-thumb {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.toggle-capsule.active .toggle-label {
  color: var(--green);
}


/* 顶栏标题随页面滚动，不固定吸顶 */
.top-bar {
  position: relative !important;
  top: auto !important;
  z-index: 10 !important;
}
.app-layout {
  padding-top: 0 !important;
}
.sidebar {
  top: 0 !important;
}
