/* ===== ourline · 公共基础样式 ===== */

:root {
  --bg: #FBF7F2;
  --bg-soft: #F5EEE6;
  --card: #FFFDFA;
  --ink: #3B332E;
  --ink-soft: #5F554E;
  --ink-faint: #61564F;
  --line: #EAE0D5;
  --line-strong: #DCCFC1;
  --accent: #955C43;
  --accent-deep: #9E6248;
  --accent-soft: #F1E0D4;
  --rose: #9A5B63;
  --ok: #6E8F6B;
  --warn: #B5893F;
  --danger: #A9564A;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -30px rgba(92, 68, 52, .45);
  --shadow-soft: 0 8px 24px -20px rgba(92, 68, 52, .5);
  --shadow-hover: 0 26px 50px -34px rgba(92, 68, 52, .5);

  /* —— 主题扩展令牌（前台 warm 为默认值，其余主题见 theme.css） —— */
  --field-bg: #FFFDFB;
  --btn-fg: #FFF9F4;
  --ring: rgba(183, 122, 94, .13);
  --accent-shadow: rgba(158, 98, 72, .9);
  --rose-line: #EBD8D8;
  --ok-soft: #F3F8F1;
  --ok-line: #CFE0C9;
  --ok-ink: #55704F;
  --warn-soft: #FBF5E7;
  --warn-line: #EBDCB8;
  --warn-ink: #8A6A2C;
  --danger-soft: #FCEFEB;
  --danger-line: #E5C7C0;
  --danger-ink: #93463B;
  --head-bg: rgba(251, 247, 242, .78);
  --head-bg-solid: rgba(251, 247, 242, .94);
  --head-line: rgba(234, 224, 213, .7);
  --hero-glow: #FDF3E9;
  --tl-line: rgba(220, 207, 193, .95);
  --tl-ring: rgba(220, 207, 193, .6);
  --overlay: rgba(59, 51, 46, .94);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2361564F' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --serif: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: .01em; }
p { margin: 0; }
ul { margin: 0; padding-left: 1.1em; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- 按钮 ---------- */

.btn-primary,
.btn-ghost,
.btn-danger-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--btn-fg);
  box-shadow: 0 10px 22px -14px var(--accent-shadow);
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); background: var(--card); }

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-line);
}
.btn-danger-ghost:hover { background: var(--danger-soft); }

/* ---------- 提示条 ---------- */

.notice {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
}
.notice-ok { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok-ink); }
.notice-warn { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn-ink); }
.notice-err { border-color: var(--danger-line); background: var(--danger-soft); color: var(--danger-ink); }
.notice ul { margin: 0; padding-left: 1.1em; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(8px);
  background: var(--overlay);
  color: #FFF8F2;
  font-size: 13.5px;
  padding: 9px 18px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 200;
  pointer-events: none;
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 表单基础 ---------- */

input[type="text"],
input[type="search"],
input[type="date"],
textarea,
select {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14.5px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

/* 日期时间选择（datetime-local）：与其它输入框统一外观，保留原生选择器 */
input[type="datetime-local"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--field-bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  min-height: 40px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input[type="datetime-local"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: .5;
  cursor: pointer;
  margin-left: 2px;
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: .85; }
textarea { resize: vertical; line-height: 1.8; }
select {
  padding-right: 30px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .04em;
}
.field > em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-faint);
}
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 240px; }
.field-sm { flex: 0 0 170px !important; }
.field-lg { flex: 1 1 320px !important; }

.only-admin {
  font-weight: 400;
  font-size: 11px;
  color: var(--rose);
  border: 1px solid var(--rose-line);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 4px;
}

/* ---------- 页脚 ---------- */

.site-foot {
  margin-top: 64px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 12.5px;
  letter-spacing: .06em;
  text-align: center;
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  body { font-size: 14.5px; }
}
