﻿/* ============ 登录页与扫码绑定页 ============ */
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: radial-gradient(900px 500px at 50% 20%, rgba(2, 132, 199, 0.08), transparent 70%), var(--bg);
  position: relative;
  z-index: 1;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xl);
  padding: 40px 32px 36px;
  box-shadow: var(--shadow-lg) !important;
  position: relative;
}
body.theme-dark .login-card {
  background: rgba(13, 18, 31, 0.92) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.12) inset !important;
}
.login-card::before, .login-card::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--primary);
  pointer-events: none;
}
.login-card::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.login-card::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

.login-logo {
  width: 58px;
  height: 58px;
  background: var(--panel-raised) !important;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-sm);
  color: var(--primary);
}
.login-logo svg circle { fill: var(--primary) !important; }
.login-logo svg path { stroke: var(--primary) !important; }
.login-card h1 {
  font-size: 20px;
  text-align: center;
  font-weight: 700;
  color: var(--text) !important;
  letter-spacing: 0.5px;
}
.login-card .sub {
  text-align: center;
  color: var(--text-dim) !important;
  margin-bottom: 26px;
  font-size: 12px;
}
.login-card input {
  background: var(--panel-alt) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.login-card input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

/* ============ 主架构：侧边栏与主体 ============ */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* 侧边栏：沉稳深蓝黑双拼 */
.sidebar {
  width: 228px;
  background: var(--sidebar-bg) !important;
  border-right: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.sidebar .logo {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sidebar-border);
  background: rgba(255, 255, 255, 0.02);
}
.sidebar .logo .logo-icon {
  width: 34px;
  height: 34px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}
.sidebar .logo .logo-icon svg circle { fill: #38bdf8 !important; }
.sidebar .logo .logo-icon svg path { stroke: #38bdf8 !important; }
.sidebar .logo .logo-text {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.sidebar .logo .logo-sub {
  color: #64748b;
  font-size: 11px;
}

.nav-item {
  padding: 8px 12px 8px 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin: 2px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  position: relative;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: var(--sidebar-item-hover);
  color: var(--sidebar-text-hover);
}
.nav-item.active {
  background: var(--sidebar-active-bg) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  color: var(--sidebar-active-text) !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3.5px;
  height: 14px;
  border-radius: 4px;
  background: var(--sidebar-active-text);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}
.nav-home {
  font-weight: 600;
  color: #fff;
}

.nav-group-head {
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  letter-spacing: 0.5px;
  border-top: 1px solid var(--sidebar-border);
  margin: 6px 8px 2px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.nav-group-head:hover {
  background: var(--sidebar-item-hover);
  color: #cbd5e1;
}
.nav-group-head .ng-arrow {
  font-size: 11px;
  color: #64748b;
  transition: transform 0.18s ease;
}
.nav-group-body .nav-item {
  padding-left: 36px;
  font-size: 12.5px;
}

.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .avatar {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 13px;
  flex-shrink: 0;
}
.sidebar-user .name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.sidebar-user .phone {
  color: #64748b;
  font-size: 11px;
  font-family: var(--font-mono);
}

/* ============ 顶部导航栏 (Header) 与激光流光 ============ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 228px;
  position: relative;
  z-index: 1;
}

.header {
  height: 56px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border) !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.2s ease;
}

body.theme-dark .header {
  background: rgba(13, 18, 31, 0.85) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

/* 顶部激光流光束 */
.header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.4) 50%, transparent);
  pointer-events: none;
  animation: laser-sweep 8s linear infinite;
  background-size: 200% 100%;
}
body.theme-dark .header::after {
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6) 50%, transparent);
}

.header h2 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text) !important;
  letter-spacing: 0.3px;
}
.header .date {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}
.header .user {
  color: var(--text-muted);
  font-size: 13px;
}

/* 门店切换与工具按钮 */
.shop-switch-btn {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted) !important;
  background: var(--panel-raised) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.shop-switch-btn:hover {
  background: var(--panel-hover) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* 个人浮层菜单 */
#userMenu {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text) !important;
}
.um-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.um-item:hover {
  background: var(--panel-raised) !important;
  color: var(--primary) !important;
}
.um-item.um-danger { color: var(--red); }
.um-item.um-danger:hover { background: var(--red-bg) !important; }

/* 主内容区 */
.content {
  padding: 24px;
  overflow: auto;
  min-height: calc(100vh - 56px);
}

