/**
 * OA模块公共样式
 * 用于统一OA页面的基础样式，减少重复代码
 */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body.oa-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
}

/* OA页面头部默认使用白色背景样式 */
body.oa-body .header {
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
  box-shadow: 0px 8px 36.8px 3.2px rgba(0, 0, 7, 0.08);
}

body.oa-body .header .header-logo img.logo1 {
  display: none;
}

body.oa-body .header .header-logo img.logo2 {
  display: block;
}

body.oa-body .header .nav-menu > li > a {
  color: #333;
}

body.oa-body .header .nav-menu > li > a:after {
  background: #0863c4;
}

body.oa-body .header .nav-button .language > a,
body.oa-body .header .nav-button .search-btn > a {
  color: #333;
}

body.oa-body .header .nav-button .language svg > path,
body.oa-body .header .nav-button .search-btn svg > path {
  stroke: #333;
}

/* OA页面用户信息样式 - 固定深色显示 */
body.oa-body .header .user-avatar-2025 {
  color: #333;
}

body.oa-body .header .user-avatar-2025 svg path {
  stroke: #333;
}

/* OA页面容器 */
.oa-page {
  padding-top: 80px;
}

.oa-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.oa-container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* OA功能导航 */
.oa-nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0;
}

.oa-nav .container {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
}

.oa-nav-item {
  padding: 15px 25px;
  color: #666;
  text-decoration: none;
  font-size: 15px;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.oa-nav-item:hover {
  color: #4CAF50;
  background: #f9f9f9;
}

.oa-nav-item.active {
  color: #4CAF50;
  border-bottom-color: #4CAF50;
  font-weight: 500;
}

/* 页面标题区 */
.oa-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #e8ecf1 0%, #f5f7fa 100%);
}

.oa-section-header {
  text-align: center;
  margin-bottom: 50px;
}

.oa-section-header h1 {
  font-size: 36px;
  color: #333;
  margin-bottom: 15px;
}

.oa-section-header .subtitle {
  color: #666;
  font-size: 16px;
}

/* 卡片样式 */
.oa-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.oa-card-lg {
  padding: 40px;
}

.oa-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* 表单样式 */
.oa-form-group {
  margin-bottom: 20px;
}

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

.oa-form-group .required::after {
  content: '*';
  color: #f44336;
  margin-left: 4px;
}

.oa-input,
.oa-select,
.oa-textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.oa-input:focus,
.oa-select:focus,
.oa-textarea:focus {
  border-color: #4CAF50;
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.oa-input::placeholder {
  color: #aaa;
}

.oa-input.error {
  border-color: #f44336;
}

/* 按钮样式 */
.oa-btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s;
}

.oa-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.oa-btn-primary {
  background: #4CAF50;
  color: #fff;
}

.oa-btn-primary:hover:not(:disabled) {
  background: #45a049;
}

.oa-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.oa-btn-secondary:hover:not(:disabled) {
  background: #e0e0e0;
}

.oa-btn-outline {
  background: transparent;
  border: 2px solid #4CAF50;
  color: #4CAF50;
}

.oa-btn-outline:hover:not(:disabled) {
  background: #4CAF50;
  color: #fff;
}

.oa-btn-block {
  display: block;
  width: 100%;
}

.oa-btn-lg {
  padding: 14px 30px;
  font-size: 16px;
}

.oa-btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* 价格显示 */
.oa-price {
  color: #4CAF50;
  font-weight: 700;
}

.oa-price-lg {
  font-size: 36px;
}

.oa-price-md {
  font-size: 24px;
}

.oa-price-sm {
  font-size: 18px;
}

.oa-price-original {
  color: #999;
  text-decoration: line-through;
  font-size: 14px;
  margin-left: 8px;
}

/* 状态徽章 */
.oa-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.oa-badge-success {
  background: #e8f5e9;
  color: #4CAF50;
}

.oa-badge-warning {
  background: #fff3e0;
  color: #ff9800;
}

.oa-badge-danger {
  background: #ffebee;
  color: #f44336;
}

.oa-badge-info {
  background: #e3f2fd;
  color: #2196F3;
}

.oa-badge-secondary {
  background: #f5f5f5;
  color: #757575;
}

/* 警告/提示框 */
.oa-alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.oa-alert-warning {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  color: #e65100;
}

.oa-alert-success {
  background: #e8f5e9;
  border-left: 4px solid #4CAF50;
  color: #2e7d32;
}

.oa-alert-danger {
  background: #ffebee;
  border-left: 4px solid #f44336;
  color: #c62828;
}

.oa-alert-info {
  background: #e3f2fd;
  border-left: 4px solid #2196F3;
  color: #1565c0;
}

/* 网格布局 */
.oa-grid {
  display: grid;
  gap: 20px;
}

.oa-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.oa-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.oa-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.oa-grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* 进度条 */
.oa-progress {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.oa-progress-bar {
  height: 100%;
  background: #4CAF50;
  border-radius: 4px;
  transition: width 0.3s;
}

.oa-progress-bar.warning {
  background: #ff9800;
}

.oa-progress-bar.danger {
  background: #f44336;
}

.oa-progress-text {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

/* 分隔线 */
.oa-divider {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 20px 0;
}

/* 空状态 */
.oa-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.oa-empty-icon {
  font-size: 60px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.oa-empty h3 {
  font-size: 20px;
  color: #666;
  margin-bottom: 10px;
}

.oa-empty p {
  margin-bottom: 20px;
}

/* 加载状态 */
.oa-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #4CAF50;
  border-radius: 50%;
  animation: oa-spin 1s linear infinite;
}

@keyframes oa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.oa-btn .oa-loading {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Toast提示 */
.oa-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 15px 30px;
  border-radius: 8px;
  z-index: 9999;
  display: none;
}

.oa-toast.show {
  display: block;
  animation: oa-fadeIn 0.3s;
}

@keyframes oa-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 表格样式 */
.oa-table {
  width: 100%;
  border-collapse: collapse;
}

.oa-table th,
.oa-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.oa-table th {
  background: #f9f9f9;
  font-weight: 500;
  color: #666;
}

.oa-table tr:hover {
  background: #f9f9f9;
}

/* 选项卡 */
.oa-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 30px;
}

.oa-tab {
  padding: 12px 24px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.oa-tab:hover {
  color: #4CAF50;
}

.oa-tab.active {
  color: #4CAF50;
  border-bottom-color: #4CAF50;
}

/* 套餐卡片特殊样式 */
.oa-package-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  border: 2px solid #eee;
  transition: all 0.3s;
  position: relative;
}

.oa-package-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

.oa-package-card.featured {
  border-color: #4CAF50;
}

.oa-package-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #4CAF50;
  color: #fff;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
}

.oa-package-name {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.oa-package-desc {
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
}

.oa-package-price {
  margin-bottom: 25px;
}

.oa-package-features {
  text-align: left;
  margin-bottom: 25px;
}

.oa-package-features li {
  padding: 8px 0;
  color: #666;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
}

.oa-package-features li::before {
  content: '✓';
  color: #4CAF50;
  margin-right: 10px;
  font-weight: bold;
}

/* 订单状态 */
.oa-order-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.oa-order-status.pending {
  background: #fff3e0;
  color: #e65100;
}

.oa-order-status.paid {
  background: #e3f2fd;
  color: #1565c0;
}

.oa-order-status.completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.oa-order-status.failed {
  background: #ffebee;
  color: #c62828;
}

.oa-order-status.cancelled {
  background: #f5f5f5;
  color: #757575;
}

/* 响应式 */
@media (max-width: 992px) {
  .oa-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .oa-section-header h1 {
    font-size: 28px;
  }

  .oa-grid-2,
  .oa-grid-3,
  .oa-grid-4 {
    grid-template-columns: 1fr;
  }

  .oa-nav .container {
    flex-wrap: wrap;
  }

  .oa-nav-item {
    padding: 12px 15px;
    font-size: 14px;
  }

  .oa-card {
    padding: 20px;
  }

  .oa-btn-block-mobile {
    display: block;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .oa-section {
    padding: 40px 0;
  }

  .oa-section-header h1 {
    font-size: 24px;
  }

  .oa-price-lg {
    font-size: 28px;
  }
}
