/* ========== 基础重置 ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* hidden 属性兜底：防止后续 display 规则把它覆盖掉 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: #10241b;
  background: #f5f2ec;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

input,
select,
textarea {
  font: inherit;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========== 通用按钮 ========== */
.primary-btn {
  width: 100%;
  height: 56px;
  border-radius: 999px;
  background: #294b39;
  color: #fffdf7;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn-sm {
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: #294b39;
  color: #fffdf7;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn-sm:hover {
  opacity: 0.92;
}

.ghost-btn {
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid #ded7cc;
  background: #fff;
  color: #46594f;
  font-size: 14px;
  font-weight: 500;
}

.ghost-btn:hover {
  background: #f5f2ec;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ece5d6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.icon-btn:hover {
  background: #faf6ee;
}

/* ========== 通用表单字段 ========== */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  color: #46594f;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="url"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #ded7cc;
  background: #fff;
  color: #10241b;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  height: auto;
  padding: 12px 16px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #294b39;
  box-shadow: 0 0 0 3px rgba(41, 75, 57, 0.1);
}

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.field-aux {
  color: #d9795d;
  font-size: 12px;
}

.field-aux:hover {
  text-decoration: underline;
}

/* ========== 演示水印 ========== */
.demo-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #10241b;
  color: #fffdf7;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(16, 36, 27, 0.18);
  z-index: 200;
}

.demo-close {
  color: rgba(255, 253, 247, 0.6);
  font-size: 18px;
  line-height: 1;
}

.demo-close:hover {
  color: #fffdf7;
}

/* ========== 通用 Brand 标识 ========== */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1e8d2;
  color: #b6a67f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.brand-en {
  margin-top: 2px;
  color: #8d8a7e;
  font-size: 11px;
  letter-spacing: 2px;
}

/* ========== 错误/状态文案 ========== */
.form-error {
  margin: 4px 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(217, 90, 60, 0.08);
  color: #b95237;
  font-size: 13px;
}
