/* ============================================
   时垒财富 - PC顾问后台布局
   ============================================ */

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex;
}
.login-left {
  flex: 1;
  background: linear-gradient(135deg, #0f1d3f 0%, #1a2b5f 40%, #2d4a8c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.login-left::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.login-brand {
  position: relative;
  z-index: 1;
  text-align: center;
}
.login-brand-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 40px;
}
.login-brand h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 6px;
  margin-bottom: 12px;
}
.login-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 4px;
}
.login-features {
  margin-top: 60px;
  position: relative;
  z-index: 1;
}
.login-features li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
}
.login-features li::before {
  content: '✓';
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(77,168,218,0.2);
  color: #4da8da;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.login-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #fff;
}
.login-form-wrapper {
  width: 100%;
  max-width: 360px;
}
.login-form-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}
.login-form-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.login-form .form-group {
  margin-bottom: 20px;
}
.login-form .form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.login-form .form-input {
  height: 48px;
  border-radius: 10px;
  font-size: 15px;
  padding: 0 16px;
}
.login-form .btn {
  height: 48px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
}
.login-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 13px;
}
.login-remember label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  cursor: pointer;
}
.login-remember a {
  color: var(--primary);
  font-size: 13px;
}
.login-footer-text {
  text-align: center;
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ============================================
   后台主布局
   ============================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: var(--primary-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: width 0.3s;
}
.sidebar-brand {
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.sidebar-brand-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
}
.sidebar-menu {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.menu-group-label {
  padding: 16px 20px 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.menu-item:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
}
.menu-item.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.menu-item-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}
.menu-item-text {
  flex: 1;
}
.menu-item-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ice-blue), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.sidebar-user-info {
  flex: 1;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
}
.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部栏 */
.top-bar {
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.page-breadcrumb a {
  color: var(--text-secondary);
}
.page-breadcrumb a:hover {
  color: var(--primary);
}
.page-breadcrumb .separator {
  color: var(--text-tertiary);
}
.page-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 500;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-bar-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  position: relative;
}
.top-bar-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
}
.top-bar-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  font-size: 9px;
  padding: 0 3px;
}

/* 页面内容 */
.page-content {
  flex: 1;
  padding: 24px;
}

/* 页面头部 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}
.page-title-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.page-actions {
  display: flex;
  gap: 10px;
}

/* 统计卡片网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.blue { background: #eef2ff; color: var(--primary); }
.stat-icon.green { background: #f0fdf4; color: var(--success); }
.stat-icon.amber { background: #fffbeb; color: var(--warning); }
.stat-icon.red { background: #fef2f2; color: var(--danger); }
.stat-icon.cyan { background: #ecfeff; color: #0891b2; }
.stat-icon.purple { background: #faf5ff; color: #9333ea; }
.stat-content { flex: 1; }
.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.stat-change {
  font-size: 12px;
  margin-top: 4px;
}

/* 搜索筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 14px;
}
.search-input-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-card);
}
.search-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,43,95,0.08);
}
.filter-select {
  height: 38px;
  padding: 0 32px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  color: var(--text-primary);
  cursor: pointer;
}

/* 操作日志表格样式 */
.log-action { font-size: 13px; }
.log-action.action-create { color: var(--success); }
.log-action.action-update { color: var(--info); }
.log-action.action-delete { color: var(--danger); }
.log-action.action-view { color: var(--text-secondary); }

/* 响应式 */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .main-content {
    margin-left: 0;
  }
}
