/* 设置页表单、卡片与开关样式，供 SettingsView 及子面板 scoped 引入 */

.settings-card {
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 16px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01), 0 10px 24px rgba(0, 0, 0, 0.04);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  margin: 0;
}

.settings-card > *:not(.card-head) {
  padding-left: 24px;
  padding-right: 24px;
  margin-top: 24px;
}

.settings-card > *:not(.card-head):last-child {
  margin-bottom: 24px;
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.card-head h4 {
  margin: 0;
  padding: 0;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.card-head p {
  margin: 4px 0 0 0;
  padding: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.compact-grid {
  margin-bottom: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-wide {
  grid-column: span 2;
}

.field-full {
  grid-column: 1 / -1;
}

.field span {
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
}

.field em {
  margin-right: 4px;
  color: #ef4444;
  font-style: normal;
}

.field input,
.field :deep(.el-select__wrapper) {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  transition: all 0.2s ease;
}

.field input::placeholder {
  color: #94a3b8;
}

.field input:focus,
.field :deep(.el-select__wrapper.is-focused) {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px var(--theme-focus-ring);
  background: #ffffff;
}

.switch-group {
  display: grid;
  gap: 12px;
}

.switch-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  text-align: left;
  transition: all 0.25s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
  cursor: pointer;
}

.switch-row:hover {
  border-color: rgba(var(--theme-primary-rgb, 58, 124, 165), 0.25);
  background: linear-gradient(180deg, #ffffff 0%, rgba(var(--theme-primary-rgb, 58, 124, 165), 0.02) 100%);
  box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb, 58, 124, 165), 0.04);
  transform: translateY(-1px);
}

.switch-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.switch-copy strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.switch-copy small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

/* Switch Toggle Buttons */
.switch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 26px;
  padding: 3px;
  border: none;
  border-radius: 99px;
  background: #cbd5e1;
  cursor: pointer;
  outline: none;
  transition: background-color 0.25s ease;
}

.switch-btn i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.switch-btn.active {
  background-color: var(--theme-primary);
}

.switch-btn.active i {
  transform: translateX(22px);
}

.switch-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Mini Switch */
.switch-btn.mini {
  width: 38px;
  height: 20px;
  padding: 2px;
}

.switch-btn.mini i {
  width: 16px;
  height: 16px;
}

.switch-btn.mini.active i {
  transform: translateX(18px);
}
