:root {
  --primary: #007AFF;
  --success: #34C759;
  --bg: #F8FAFF;
  --sidebar: #FFFFFF;
  --card: #FFFFFF;
  --text: #121212;
  --text-sub: #8E8E93;
  --border: #F2F2F7;
  --radius: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Login Page */
.login-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F8FAFF 0%, #E8F0FF 100%);
}

.login-card {
  width: 400px;
  background: #FFFFFF;
  padding: 48px;
  border-radius: 40px;
  box-shadow: 0 20px 60px rgba(0, 122, 255, 0.1);
  text-align: center;
}

.login-logo {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}

.login-title {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.login-input {
  width: 100%;
  height: 56px;
  background: #F2F2F7;
  border: none;
  border-radius: 16px;
  padding: 0 24px;
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
}

.login-input:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px var(--primary);
}

.captcha-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.captcha-input {
  flex: 1;
}

.captcha-img {
  width: 120px;
  height: 56px;
  background: #F2F2F7;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-img svg {
  width: 100%;
  height: 100%;
}

.login-btn {
  width: 100%;
  height: 56px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.3s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
}

.login-error {
  margin-top: 20px;
  color: #FF3B30;
  font-size: 14px;
  min-height: 20px;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260rpx;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  padding-left: 12px;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text-sub);
  border-radius: 16px;
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: 500;
}

.menu-item:hover {
  background: var(--bg);
  color: var(--primary);
}

.menu-item.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.2);
}

/* Content */
.content {
  flex: 1;
  margin-left: 260px;
  padding: 40px 48px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  padding: 8px 16px;
  border-radius: 40px;
  box-shadow: var(--shadow);
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.admin-name {
  font-size: 14px;
  font-weight: 500;
}

/* Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.stat-value {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-trend {
  font-size: 12px;
  color: var(--text-sub);
}

.stat-trend.up {
  color: var(--success);
}

/* Charts */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
}

.chart-placeholder {
  height: 240px;
  background: #F8F9FB;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-chart {
  width: 90%;
  height: 60%;
  background: linear-gradient(90deg, transparent 0%, rgba(0,122,255,0.05) 50%, transparent 100%);
  border-bottom: 2px solid var(--primary);
}

/* Table */
.card {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 16px;
  font-size: 13px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 20px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  background: #F2F2F7;
  color: var(--text-sub);
}

.badge.success {
  background: #E8F9EE;
  color: var(--success);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: #F2F2F7;
  color: var(--text-sub);
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.form-group-inline {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #FFFFFF;
  padding: 40px;
  border-radius: 32px;
  width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.modal-header {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.modal .login-input {
  margin-bottom: 12px;
}

.btn-more {
  background: var(--bg);
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-sub);
  cursor: pointer;
}

/* Page Switching */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.placeholder-content {
  padding: 100px 0;
  text-align: center;
  color: var(--text-sub);
  font-size: 16px;
  letter-spacing: 1px;
}
