* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f5f6fa;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

#app {
  max-width: 750px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: #f5f6fa;
}

.page {
  display: none;
  min-height: 100vh;
  padding-bottom: 60px;
}

.page.active {
  display: block;
}

.tab-page {
  display: none;
  padding-bottom: 70px;
}

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

/* 登录页 */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-logo {
  text-align: center;
  margin-bottom: 50px;
}

.logo-icon {
  font-size: 60px;
  margin-bottom: 15px;
}

.login-logo h1 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 8px;
}

.login-logo p {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

.login-form {
  background: #fff;
  border-radius: 16px;
  padding: 30px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

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

.form-group label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #667eea;
}

.form-group textarea {
  resize: vertical;
  font-family: inherit;
}

.login-links {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.login-links a {
  color: #667eea;
  font-size: 13px;
  text-decoration: none;
}

/* 按钮 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn-primary:active {
  opacity: 0.8;
}

.btn-default {
  background: #f5f5f5;
  color: #666;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.btn-danger {
  background: #ff4d4f;
  color: #fff;
}

.btn-success {
  background: #52c41a;
  color: #fff;
}

.btn-warning {
  background: #faad14;
  color: #fff;
}

/* 页面头部 */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-header h2 {
  font-size: 18px;
  font-weight: 500;
}

.back-btn {
  font-size: 20px;
  cursor: pointer;
  padding: 5px 10px 5px 0;
}

.header-btn {
  font-size: 14px;
  cursor: pointer;
  padding: 5px 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
}

.page-content {
  padding: 15px;
}

/* 首页 */
.home-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 20px 16px 40px;
}

.user-info {
  display: flex;
  align-items: center;
}

.avatar {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 12px;
}

.user-detail h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.user-detail p {
  font-size: 13px;
  opacity: 0.8;
}

/* 统计卡片 */
.stats-cards {
  display: flex;
  gap: 12px;
  margin-top: -25px;
  margin-bottom: 20px;
}

.stat-card {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 18px 15px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #999;
}

/* 快捷操作 */
.section-title {
  font-size: 15px;
  font-weight: 500;
  margin: 20px 0 12px;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.action-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 8px;
}

.action-item span {
  font-size: 12px;
  color: #666;
}

/* 列表 */
.list-container {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.list-item {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:active {
  background: #f9f9f9;
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.list-item-title {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.status-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-pending {
  background: #fff7e6;
  color: #fa8c16;
}

.status-approved {
  background: #f6ffed;
  color: #52c41a;
}

.status-rejected {
  background: #fff1f0;
  color: #ff4d4f;
}

.status-completed {
  background: #e6f7ff;
  color: #1890ff;
}

.list-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #999;
}

.list-item-meta span {
  display: flex;
  align-items: center;
}

.points-tag {
  color: #667eea;
  font-weight: 500;
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  gap: 10px;
  padding: 10px 15px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.filter-bar select,
.filter-bar input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.filter-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.filter-tab.active {
  background: #667eea;
  color: #fff;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 750px;
  background: #fff;
  display: flex;
  border-top: 1px solid #eee;
  padding: 8px 0;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: #999;
  font-size: 11px;
}

.nav-item.active {
  color: #667eea;
}

.nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 750px;
  max-height: 85vh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 500;
}

.close-btn {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 12px;
}

.modal-footer .btn {
  flex: 1;
}

/* 薪资卡片 */
.salary-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 25px 20px;
  color: #fff;
  margin-bottom: 20px;
}

.salary-total {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.salary-amount {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 6px;
}

.salary-label {
  font-size: 14px;
  opacity: 0.8;
}

.salary-detail {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.salary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

/* 个人中心 */
.profile-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 25px 20px;
  color: #fff;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-right: 15px;
}

.profile-info h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.profile-info p {
  font-size: 14px;
  opacity: 0.8;
}

.menu-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.menu-item {
  padding: 16px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: #f9f9f9;
}

.arrow {
  color: #ccc;
  font-size: 18px;
}

.app-info {
  text-align: center;
  margin-top: 30px;
  color: #999;
  font-size: 12px;
}

/* 空状态 */
.empty-state {
  padding: 50px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* 表单卡片 */
.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.form-tip {
  text-align: center;
  color: #999;
  font-size: 12px;
  margin-top: 15px;
}

/* 配置页 */
.config-section {
  margin-bottom: 25px;
}

.config-item {
  padding: 15px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.config-item:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.config-item:first-child {
  border-radius: 12px 12px 0 0;
}

.config-item-info h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.config-item-info p {
  font-size: 12px;
  color: #999;
}

.config-item-actions {
  display: flex;
  gap: 8px;
}

.config-item-actions .btn {
  padding: 5px 10px;
  font-size: 12px;
}

/* 详情内容 */
.detail-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  width: 90px;
  color: #999;
  font-size: 14px;
}

.detail-value {
  flex: 1;
  color: #333;
  font-size: 14px;
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 15px;
  color: #999;
  font-size: 13px;
}

/* 响应式 */
@media (min-width: 750px) {
  .modal-content {
    border-radius: 16px;
    max-height: 80vh;
    margin-bottom: auto;
    margin-top: 50px;
  }
  
  .modal {
    align-items: flex-start;
  }
}
