/* =============================================================================
   风格 A · 暖色教育  ·  主题样式
   亲和、温暖、专业，参考"得到/课程类"产品的暖色调
   ========================================================================== */
:root {
  --bg: #FDF6EE;
  --bg-soft: #FBEFE0;
  --surface: #FFFFFF;
  --surface-2: #FFFBF5;
  --primary: #F08322;          /* 主橙 */
  --primary-d: #E06D11;
  --primary-l: #FBE3C8;
  --accent: #E8552E;           /* 强调红橙 */
  --gold: #E0A92E;
  --green: #4BA877;
  --green-l: #E3F4EA;
  --blue: #3F7FD0;
  --purple: #9B6DD6;
  --ink: #3A2E25;              /* 主文字 */
  --ink-2: #6B5A4A;           /* 次文字 */
  --ink-3: #9A8876;           /* 弱文字 */
  --line: #F0E2D0;
  --line-2: #EAD9C3;
  --danger: #E5544B;
  --warn: #E0A92E;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 6px 24px rgba(196, 130, 60, 0.10);
  --shadow-s: 0 2px 8px rgba(196, 130, 60, 0.08);
  --shadow-h: 0 12px 36px rgba(196, 130, 60, 0.16);
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-d); text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--primary-l); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #E8D3BB; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #DCC0A0; }

/* ---- 顶部导航 ---- */
.topbar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: rgba(255,251,245,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
}
.brand { height: 80%; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: 18px; box-shadow: var(--shadow-s);
}
.brand small { font-weight: 500; font-size: 11px; color: var(--ink-3); letter-spacing: 2px; }
/* .nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a { padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-size: 14px; }
.nav-links a:hover, .nav-links a.active { background: var(--primary-l); color: var(--primary-d); } */

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s; font-family: var(--font);
  background: var(--surface); color: var(--ink); white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: #fff; box-shadow: 0 4px 14px rgba(240,131,34,.32); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(240,131,34,.42); }
.btn-accent { background: linear-gradient(135deg, var(--accent), #d4421d); color: #fff; box-shadow: 0 4px 14px rgba(232,85,46,.32); }
.btn-green { background: linear-gradient(135deg, #54B585, var(--green)); color: #fff; box-shadow: 0 4px 14px rgba(75,168,119,.3); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-d); }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---- 卡片 ---- */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 22px;
}
.card-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.card-title .ic { color: var(--primary); }

/* ---- 表单 ---- */
label.field { display: block; margin-bottom: 14px; }
.field-label { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  font-size: 14px; font-family: var(--font); color: var(--ink); background: var(--surface-2); transition: all .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-l); }
textarea { resize: vertical; min-height: 70px; }

/* ---- 徽章/标签 ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-orange { background: var(--primary-l); color: var(--primary-d); }
.badge-green { background: var(--green-l); color: var(--green); }
.badge-red { background: #FBE3E0; color: var(--danger); }
.badge-gold { background: #FBF0D5; color: #B8860B; }
.badge-gray { background: #EFE7DC; color: var(--ink-3); }
.badge-blue { background: #E2EDF9; color: var(--blue); }

/* 风格 tag 小药丸 */
.style-tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--bg-soft); color: var(--ink-2); }

/* ---- 网格 ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 28px; }
.grid { display: grid; gap: 18px; }

/* ---- 头像 ---- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--bg-soft); border: 2px solid #fff; box-shadow: var(--shadow-s); }
.avatar-ring { box-shadow: 0 0 0 3px var(--primary-l); }

/* ---- toast ---- */
#toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-h); animation: toastIn .25s; }
.toast.ok { background: linear-gradient(135deg, #54B585, var(--green)); }
.toast.err { background: linear-gradient(135deg, var(--accent), #d4421d); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

/* ---- modal ---- */
.modal-mask { position: fixed; inset: 0; background: rgba(58,46,37,.45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 200; animation: fade .2s; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-h); width: min(560px, 92vw); max-height: 88vh; overflow: auto; padding: 26px; position: relative; }
.modal-lg { width: min(860px, 94vw); }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: none; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-3); font-size: 16px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: all .15s; z-index: 1;
}
.modal-close:hover { background: var(--primary-l); color: var(--primary-d); }
@keyframes fade { from { opacity: 0; } }

/* ---- 工具类 ---- */
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.center { text-align: center; }
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}
.hidden { display: none !important; }
.spacer { flex: 1; }
hr.soft { border: none; border-top: 1px solid var(--line); margin: 18px 0; }

/* spinner */
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--primary-l); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dots::after { content: ''; animation: dots 1.4s steps(4,end) infinite; }
@keyframes dots { 0%{content:''}25%{content:'·'}50%{content:'··'}75%{content:'···'} }
