﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  color: #333;
  font-size: 14px;
}

/* 登录页 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00b578 0%, #00a06a 100%);
}

.login-box {
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  width: 400px;
}

.login-title {
  text-align: center;
  color: #00b578;
  font-size: 24px;
  margin-bottom: 8px;
}

.login-subtitle {
  text-align: center;
  color: #999;
  font-size: 14px;
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #666;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00b578;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: #00b578;
  color: #fff;
}

.btn-primary:hover {
  background: #00a06a;
}

.btn-danger {
  background: #ff4d4f;
  color: #fff;
}

.btn-danger:hover {
  background: #ff7875;
}

.btn-default {
  background: #fff;
  color: #666;
  border: 1px solid #ddd;
}

.btn-default:hover {
  border-color: #00b578;
  color: #00b578;
}

.btn-sm {
  padding: 6px 16px;
  font-size: 12px;
}

.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 10px;
}

/* 主布局 */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #001529;
  color: #fff;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #1f3a5c;
}

.sidebar-logo h2 {
  color: #00b578;
  font-size: 18px;
}

.sidebar-menu {
  padding: 10px 0;
}

.menu-item {
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  color: #a0aec0;
  text-decoration: none;
}

.menu-item:hover {
  background: #1f3a5c;
  color: #fff;
}

.menu-item.active {
  background: #00b578;
  color: #fff;
}

.menu-item .icon {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.main-content {
  margin-left: 220px;
  flex: 1;
  min-height: 100vh;
}

.header {
  background: #fff;
  padding: 16px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user span {
  color: #666;
}

.logout-btn {
  color: #ff4d4f;
  cursor: pointer;
  text-decoration: none;
}

.content {
  padding: 24px;
}

/* 卡片 */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-card .label {
  color: #999;
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 32px;
  font-weight: 600;
  color: #00b578;
}

/* 表格 */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #fafafa;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
}

tr:hover {
  background: #f9f9f9;
}

/* 搜索栏 */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-bar input,
.search-bar select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  width: 200px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination button {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.pagination button.active {
  background: #00b578;
  color: #fff;
  border-color: #00b578;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-pending {
  background: #fff7e6;
  color: #fa8c16;
}

.status-confirmed {
  background: #e6f7ff;
  color: #1890ff;
}

.status-completed {
  background: #f6ffed;
  color: #52c41a;
}

.status-cancelled {
  background: #fff1f0;
  color: #ff4d4f;
}

/* 头像 */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
}

.avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

/* 操作按钮组 */
.action-buttons {
  display: flex;
  gap: 8px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* 提示消息 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  color: #fff;
  z-index: 2000;
  animation: slideDown 0.3s;
}

.toast-success {
  background: #52c41a;
}

.toast-error {
  background: #ff4d4f;
}

.toast-info {
  background: #1890ff;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* 两列布局 */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* 图片上传预览 */
.upload-preview {
  width: 100px;
  height: 100px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview .plus {
  font-size: 32px;
  color: #ddd;
}

/* ========== 首页模板样式 ========== */
.home-stats-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}
.home-stat-card {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 20px 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
  min-height: 90px;
}
.home-stat-accent {
  border-left: 4px solid;
}
.accent-orange { border-left-color: #fa8c16; }
.accent-purple { border-left-color: #722ed1; }

.home-stat-num {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  line-height: 1.2;
}
.home-stat-label {
  font-size: 14px;
  color: #999;
  margin-top: 8px;
}
.home-stat-icon {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.icon-blue { background: #1890ff; }
.icon-green { background: #52c41a; }
.icon-orange { background: #fa8c16; }
.icon-red { background: #f5222d; }
.icon-purple { background: #722ed1; }

.home-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  overflow: hidden;
}
.home-panel-title {
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.home-panel-body {
  padding: 20px;
}

.home-table {
  width: 100%;
  border-collapse: collapse;
}
.home-table th, .home-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.home-table th {
  background: #fafafa;
  font-weight: 600;
  color: #666;
}
.home-table tr:last-child td {
  border-bottom: none;
}
.home-table tr:hover {
  background: #f9f9f9;
}

.home-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
}
.home-badge-pending { background: #fff7e6; color: #fa8c16; }
.home-badge-confirmed { background: #e6f7ff; color: #1890ff; }
.home-badge-completed { background: #f6ffed; color: #52c41a; }
.home-badge-cancelled { background: #fff1f0; color: #f5222d; }

.home-sys-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.home-sys-item {
  font-size: 14px;
}
.home-sys-label {
  color: #999;
}
.home-sys-value {
  color: #333;
}

.home-text-center { text-align: center; }
.home-text-muted { color: #999; }

@media (max-width: 1200px) {
  .home-stats-row {
    flex-wrap: wrap;
  }
  .home-stat-card {
    flex: 0 0 calc(50% - 10px);
  }
}


/* ===== 响应式适配-手机端 ===== */
.menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; margin-right: 8px; color: #333; line-height: 1; padding: 2px 6px; }
.sidebar-overlay { display: none; }
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; z-index: 1001; width: 230px; box-shadow: 2px 0 10px rgba(0,0,0,.3); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; width: 100%; }
  .header { padding: 12px 14px; }
  .header-user span { display: none; }
  .content { padding: 12px !important; }
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-container table { min-width: 620px; }
  .search-bar { flex-wrap: wrap; }
  .search-bar input, .search-bar select { width: 100%; margin-bottom: 8px; min-width: 0 !important; }
  .card-title { flex-wrap: wrap; gap: 8px; }
  .modal { width: 92% !important; max-width: 92% !important; }
  .btn-sm { padding: 4px 8px; font-size: 12px; }
  .action-buttons { flex-wrap: nowrap; }
  .pagination { flex-wrap: wrap; gap: 6px; }
  .status-tabs { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  .stat-grid { grid-template-columns: repeat(2,1fr) !important; }
  .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; }
}
