/* 页面容器 */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding, 1.5rem);
  min-height: calc(100vh - 3.5rem);
}

/* 页面标题 */
.page-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--od-text-primary);
  margin-bottom: 2rem;
}

/* 卡片样式 */
.card-section {
  background: var(--od-surface);
  border: 1px solid var(--od-border);
  border-radius: var(--card-radius, 0.75rem);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow, 0 1px 3px 0 rgba(0, 0, 0, 0.1));
}

.card-header {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--od-text-primary);
  margin-bottom: 1rem;
}

/* 表单样式 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--od-text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--od-background);
  border: 1px solid var(--od-border);
  border-radius: 0.375rem;
  color: var(--od-text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--od-primary);
}

.form-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 按钮样式 */
.btn-primary {
  padding: 0.5rem 1rem;
  background: var(--od-primary);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--od-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--od-text-primary);
  border: 1px solid var(--od-border);
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--od-surface);
}

/* 信息行 */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--od-border);
}

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

.info-label {
  color: var(--od-text-secondary);
  font-size: 0.875rem;
}

.info-value {
  color: var(--od-text-primary);
  font-weight: 500;
}

/* 页面标题区域 */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--od-border);
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--od-text-primary);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--od-text-secondary);
  font-size: 0.875rem;
}

/* 加载和错误状态 */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--od-border);
  border-top: 2px solid var(--od-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-state {
  padding: 2rem;
  text-align: center;
}

.error-card {
  background: var(--od-surface);
  border: 1px solid var(--od-error);
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 400px;
  margin: 0 auto;
}

.error-card h3 {
  color: var(--od-error);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.error-card p {
  color: var(--od-text-secondary);
  margin-bottom: 1.5rem;
}

/* 表单增强样式 */
.form-vertical {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--od-background);
  border: 1px solid var(--od-border);
  border-radius: 0.375rem;
  color: var(--od-text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s;
  resize: vertical;
  min-height: 100px;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--od-primary);
}

.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--od-background);
  border: 1px solid var(--od-border);
  border-radius: 0.375rem;
  color: var(--od-text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-select:focus {
  outline: none;
  border-color: var(--od-primary);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--od-border);
}

/* 标签页样式 */
.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--od-border);
  margin-bottom: 2rem;
}

.tab-button {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--od-text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-button:hover {
  color: var(--od-text-primary);
  background: var(--od-surface-secondary);
}

.tab-button.active {
  color: var(--od-primary);
  border-bottom-color: var(--od-primary);
}

.tab-content {
  min-height: 400px;
}

.tab-panel {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 内容包装器 */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.content-with-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 节标题 */
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--od-text-primary);
  margin-bottom: 1.5rem;
}

.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--od-text-primary);
  margin-bottom: 1rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .page-container {
    padding: var(--container-padding-mobile, 1rem);
  }
  
  .card-section {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .card-header {
    font-size: 1.125rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .tab-button {
    white-space: nowrap;
    min-width: fit-content;
  }
}