:root {
  --primary: #1668dc;
  --primary2: #38b6ff;
  --teal: #10b981;
  --amber: #f59e0b;
  --danger: #dc2626;
  --text: #16233a;
  --text2: #4a5a72;
  --text3: #93a1b8;
  --bg: #f4f6fb;
  --border: #e2ebf6;
  --card: #ffffff;
  --navy: #0b2545;
  --shadow: 0 6px 20px rgba(11, 37, 69, .06);
  --shadow-lg: 0 18px 46px rgba(11, 37, 69, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 22px;
  height: 66px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(22, 104, 220, .25);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: .5px; }
.brand-text small { font-size: 9px; color: var(--text3); letter-spacing: .6px; }
.nav-links { display: flex; gap: 4px; align-items: center; flex: 1; overflow-x: auto; }
.nav-links a {
  padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--text2);
  white-space: nowrap; transition: .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: #eef5ff; }
.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: 10px; padding: 10px 20px; font-size: 14px; font-weight: 600;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; box-shadow: 0 6px 16px rgba(22, 104, 220, .22); }
.btn-primary:hover { box-shadow: 0 10px 22px rgba(22, 104, 220, .3); }
.btn-ghost { background: #f4f9ff; color: var(--primary); border: 1px solid #d8e6f8; }
.btn-ghost:hover { background: #e8f2ff; }
.btn-light { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.btn-light:hover { background: rgba(255, 255, 255, .25); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.nav-user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
}
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; font-weight: 700; font-size: 13px;
}
.nav-user-name { font-size: 13px; font-weight: 600; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user-menu { position: relative; }
.nav-user-dropdown {
  position: absolute; right: 0; top: 44px; min-width: 190px; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 120;
}
.nav-user-dropdown a, .nav-user-dropdown button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text2); font-size: 13px;
}
.nav-user-dropdown a:hover, .nav-user-dropdown button:hover { background: #f2f7ff; color: var(--primary); }
.nav-user-dropdown .nu-quit { color: var(--danger); }
.nu-divider { height: 1px; background: var(--border); margin: 5px 4px; }

/* ---------- search ---------- */
.search-panel {
  position: fixed; inset: 66px 0 auto 0; z-index: 90; padding: 16px 22px;
  background: rgba(244, 246, 251, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.search-panel-inner {
  max-width: 1160px; margin: 0 auto; background: #fff; border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 20px 24px 24px; position: relative;
}
.search-panel-title { font-weight: 700; font-size: 16px; }
.search-panel-title::before {
  content: ''; display: inline-block; width: 5px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary2)); margin-right: 9px; vertical-align: -3px;
}
.search-panel-close {
  position: absolute; right: 18px; top: 16px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #f1f5fb; color: var(--text2); font-size: 20px;
}
.search-box { display: flex; gap: 10px; max-width: 760px; margin: 18px auto 0; background: #fff; padding: 8px; border-radius: 14px; box-shadow: 0 10px 30px rgba(11, 37, 69, .08); }
.search-box-inline { margin: 16px 0 0; max-width: none; border: 1px solid var(--border); }
.search-box select { border: 0; outline: 0; padding: 0 12px; background: transparent; color: var(--text2); border-right: 1px solid var(--border); }
.search-box input { flex: 1; border: 0; outline: 0; padding: 8px 12px; background: transparent; min-width: 0; }
.search-box button { padding: 10px 26px; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; font-weight: 600; }
.search-results { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-height: 340px; overflow: auto; }
.search-result { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.search-result:hover { border-color: var(--primary); background: #f8fbff; }
.search-result .sr-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: #eef5ff; font-size: 18px; }
.search-result strong { display: block; font-size: 13px; }
.search-result small { color: var(--text3); }

/* ---------- view & hero ---------- */
.view { max-width: 1200px; margin: 0 auto; padding: 28px 22px 70px; min-height: calc(100vh - 260px); }
.hero {
  margin: -28px -22px 30px; padding: 62px 22px 74px; position: relative; overflow: hidden;
  background: linear-gradient(140deg, #0b2545, #0d3a6e 42%, #1668dc); color: #fff;
}
.hero::after {
  content: ''; position: absolute; width: 620px; height: 620px; right: -210px; top: -320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 182, 255, .38), transparent 70%);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .5;
}
.hero-inner { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; margin-bottom: 18px; }
.hero h1 { font-size: 38px; line-height: 1.3; margin: 0 0 12px; font-weight: 800; letter-spacing: .5px; }
.hero p { font-size: 16px; color: rgba(255, 255, 255, .82); margin: 0 0 26px; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 26px; line-height: 1.2; }
.hero-stat span { font-size: 12px; color: rgba(255, 255, 255, .7); }
.hero-search { margin-top: 26px; max-width: 760px; }

/* ---------- sections & cards ---------- */
.section { margin-top: 34px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { font-size: 21px; margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.section-title::before { content: ''; width: 6px; height: 24px; border-radius: 3px; background: linear-gradient(180deg, var(--primary), var(--primary2)); }
.section-sub { margin: 6px 0 0 16px; color: var(--text2); font-size: 13px; }
.section-extra { color: var(--primary); font-size: 13px; font-weight: 600; white-space: nowrap; }
.section-extra:hover { text-decoration: underline; }

.cat-row { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; }
.cat {
  padding: 8px 17px; border-radius: 999px; background: #fff; border: 1px solid var(--border);
  color: var(--text2); font-size: 13px; transition: .2s;
}
.cat:hover, .cat.active { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; border-color: transparent; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid rgba(226, 235, 246, .8); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-cover {
  height: 128px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0b2545, #1668dc); color: #fff;
  display: grid; place-items: center; font-size: 48px;
}
.card-cover::after { content: ''; position: absolute; width: 180px; height: 180px; right: -60px; top: -80px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.card-tag { position: absolute; left: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; font-size: 11px; background: rgba(0, 0, 0, .35); color: #fff; z-index: 2; }
.card-body { padding: 15px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card-title { font-size: 15px; font-weight: 700; margin: 0 0 6px; line-height: 1.45; }
.card-desc { font-size: 12.5px; color: var(--text2); margin: 0 0 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text3); }
.card-meta strong { color: var(--amber); }
.card-foot { display: flex; gap: 8px; padding: 0 16px 16px; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; }
.panel + .panel { margin-top: 18px; }
.panel-title { font-size: 16px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.panel-title small { font-weight: 400; color: var(--text3); font-size: 12px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.pill-blue { background: #eef5ff; color: var(--primary); }
.pill-green { background: #e8f8f1; color: #0f9d72; }
.pill-amber { background: #fff5e5; color: #b97908; }
.pill-red { background: #fdeeee; color: var(--danger); }
.pill-gray { background: #f1f4f8; color: var(--text2); }

/* ---------- layout helpers ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .two-col, .three-col { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--text2); }
.tiny { font-size: 12px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea, input.input, textarea.input, select.input {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  background: #fff; color: var(--text); outline: 0; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus, input.input:focus, textarea.input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 104, 220, .1);
}
.field textarea { resize: vertical; min-height: 84px; }
.field-error { color: var(--danger); font-size: 12px; margin: -8px 0 12px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.inline-form .field { margin: 0; }

/* ---------- course detail ---------- */
.crumb { font-size: 12px; color: var(--text3); margin-bottom: 14px; }
.crumb a:hover { color: var(--primary); }
.course-hero { background: linear-gradient(135deg, #0b2545, #1668dc); color: #fff; border-radius: 18px; padding: 26px 28px; position: relative; overflow: hidden; }
.course-hero h1 { margin: 6px 0 8px; font-size: 27px; }
.course-hero p { margin: 0; color: rgba(255, 255, 255, .8); max-width: 720px; }
.course-hero .row { margin-top: 16px; font-size: 13px; }
.chapter-list { display: flex; flex-direction: column; gap: 8px; }
.chapter {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 11px; cursor: pointer; transition: .2s; background: #fff;
}
.chapter:hover { border-color: var(--primary); background: #f8fbff; }
.chapter.active { border-color: var(--primary); background: #eef5ff; }
.chapter-no { width: 28px; height: 28px; border-radius: 8px; background: #eef5ff; color: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.chapter.done .chapter-no { background: #e8f8f1; color: #0f9d72; }
.chapter strong { font-size: 14px; flex: 1; }
.chapter small { color: var(--text3); }
.video-stage {
  background: linear-gradient(135deg, #0b2545, #123b6b); color: #fff; border-radius: 14px;
  min-height: 280px; display: grid; place-items: center; text-align: center; padding: 20px; position: relative;
}
.video-stage .play { width: 66px; height: 66px; border-radius: 50%; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .4); display: grid; place-items: center; font-size: 26px; margin: 0 auto 14px; }
.video-stage small { color: rgba(255, 255, 255, .65); }

.note-item, .qa-item { border: 1px solid var(--border); border-radius: 12px; padding: 13px 15px; background: #fff; }
.note-item + .note-item, .qa-item + .qa-item { margin-top: 10px; }
.note-item .spread, .qa-item .spread { font-size: 12px; color: var(--text3); }
.qa-reply { margin-left: 28px; border-left: 2px solid var(--primary); padding-left: 14px; margin-top: 10px; font-size: 13px; color: var(--text2); }
.link-danger { color: var(--danger); font-size: 12px; background: none; border: 0; padding: 0; }
.link-primary { color: var(--primary); font-size: 13px; background: none; border: 0; padding: 0; font-weight: 600; }

/* ---------- exam ---------- */
.exam-grid { display: grid; grid-template-columns: minmax(0, 1fr) 218px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .exam-grid { grid-template-columns: 1fr; } }
.exam-timer {
  position: sticky; top: 82px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; box-shadow: var(--shadow);
}
.exam-timer strong { font-size: 28px; font-variant-numeric: tabular-nums; display: block; text-align: center; margin: 6px 0; }
.exam-timer.danger strong { color: var(--danger); }
.question-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; background: #fff; margin-bottom: 14px; }
.question-card h3 { font-size: 15px; margin: 0 0 12px; line-height: 1.6; }
.option {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: .15s;
}
.option:hover { background: #f8fbff; }
.option.selected { border-color: var(--primary); background: #eef5ff; }
.option.correct { border-color: #10b981; background: #e8f8f1; }
.option.wrong { border-color: #dc2626; background: #fdeeee; }
.option input { margin-top: 4px; }
.number-grid { display: flex; gap: 7px; flex-wrap: wrap; }
.number-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: #fff; font-size: 13px; }
.number-btn.answered { background: var(--primary); color: #fff; border-color: var(--primary); }
.number-btn.flagged { border-color: var(--amber); color: var(--amber); }
.result-hero { background: linear-gradient(135deg, #0b2545, #1668dc); color: #fff; border-radius: 18px; padding: 28px; text-align: center; }
.result-hero .score { font-size: 54px; font-weight: 800; line-height: 1; }
.anti-banner { background: #fff8e8; border: 1px solid #f5dfa8; color: #8a6200; border-radius: 10px; padding: 9px 13px; font-size: 12px; }
.violation-log { font-size: 12px; color: var(--danger); margin-top: 8px; }

/* ---------- resource ---------- */
.format-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #eef5ff; color: var(--primary); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-box { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.stat-box strong { display: block; font-size: 25px; color: var(--primary); }
.stat-box span { font-size: 12px; color: var(--text2); }
.upload-zone { border: 2px dashed #cbdcf2; border-radius: 14px; padding: 24px; text-align: center; background: #f8fbff; color: var(--text2); }
.upload-zone:hover { border-color: var(--primary); }
.upload-zone input { display: none; }

/* ---------- boutique template ---------- */
.template-head { border-radius: 18px 18px 0 0; background: linear-gradient(130deg, #0b2545, #1668dc); color: #fff; padding: 30px; }
.template-head h1 { margin: 8px 0; font-size: 28px; }
.template-body { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 18px 18px; background: #fff; padding: 24px 28px; }
.template-nav { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 18px; }
.template-nav button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--text2); }
.template-nav button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.template-section { display: none; }
.template-section.active { display: block; }
.template-label { font-size: 12px; color: var(--primary); font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }

/* ---------- analytics ---------- */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 58px; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.bar-track { height: 10px; background: #edf2f9; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--primary2)); }
.bar-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.donut-wrap { display: grid; place-items: center; padding: 8px; }
.donut { width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; }
.donut-hole { width: 108px; height: 108px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; }
.donut-hole strong { font-size: 30px; line-height: 1; }
.donut-hole span { font-size: 11px; color: var(--text3); }
.advice-box { white-space: pre-wrap; font-size: 14px; line-height: 1.8; color: var(--text2); background: #f8fbff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }

/* ---------- chat ---------- */
.chat-drawer {
  position: fixed; right: 20px; bottom: 20px; width: 380px; height: 520px; z-index: 130;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, #0b2545, #1668dc); color: #fff; }
.chat-head strong { display: block; font-size: 15px; }
.chat-head span { font-size: 11px; color: rgba(255, 255, 255, .75); }
.chat-head .modal-close { color: #fff; }
.chat-messages { flex: 1; overflow: auto; padding: 14px; background: #f8fafd; }
.msg { margin-bottom: 12px; max-width: 90%; }
.msg.user { margin-left: auto; }
.msg .bubble { padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.7; background: #fff; border: 1px solid var(--border); white-space: pre-wrap; }
.msg.user .bubble { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; border-color: transparent; }
.msg .who { font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.chat-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-input-row textarea { flex: 1; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; resize: none; outline: 0; }

/* ---------- modal / toast ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 40, .55); backdrop-filter: blur(3px); }
.modal-card { position: relative; z-index: 2; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 30px; }
.modal-close { position: absolute; right: 14px; top: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f1f5fb; color: var(--text2); font-size: 20px; }
.auth-card .auth-head { text-align: center; margin-bottom: 18px; }
.auth-icon { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; font-size: 26px; }
.auth-head h3 { margin: 0 0 4px; font-size: 19px; }
.auth-head p { margin: 0; color: var(--text2); font-size: 12.5px; }
.auth-tabs { display: flex; gap: 6px; background: #f1f5fb; padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.auth-tab { flex: 1; border: 0; border-radius: 8px; padding: 8px; background: transparent; font-size: 13px; color: var(--text2); }
.auth-tab.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 2px 8px rgba(11, 37, 69, .08); }
.auth-note { font-size: 11.5px; color: var(--text3); text-align: center; margin: 12px 0 0; }
.wechat-box { text-align: center; }
.wechat-icon { width: 76px; height: 76px; border-radius: 20px; margin: 0 auto 12px; background: #07c160; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.wechat-box small { display: block; margin-top: 12px; color: var(--text3); font-size: 11px; line-height: 1.6; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #16233a; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13px;
  box-shadow: var(--shadow-lg); z-index: 300; transition: .25s; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: #b91c1c; }
.toast-warn { background: #b97908; }
.toast-success { background: #0f9d72; }

.loading-state, .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 46px 20px; color: var(--text3); font-size: 13px; }
.empty-icon { font-size: 30px; }
.empty-state strong { color: var(--text2); font-size: 15px; }
.spinner { width: 22px; height: 22px; border: 3px solid #dbe7f5; border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: rgba(255, 255, 255, .65); padding: 40px 0 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 22px; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 26px; }
.footer-brand strong { color: #fff; font-size: 18px; }
.footer-brand p { font-size: 12px; line-height: 1.9; margin: 8px 0 0; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.footer-col h4 { color: #fff; font-size: 13px; margin: 0 0 4px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 28px auto 0; padding: 16px 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 11px; text-align: center; }

@media (max-width: 720px) {
  .nav-inner { gap: 10px; padding: 0 12px; }
  .brand-text small, #search-toggle { display: none; }
  .nav-links a { padding: 7px 9px; font-size: 12px; }
  .hero { padding: 44px 18px 54px; margin: -28px -12px 26px; }
  .hero h1 { font-size: 27px; }
  .view { padding: 28px 12px 60px; }
  .view .hero { margin-left: -12px; margin-right: -12px; }
  .bar-row { grid-template-columns: 92px minmax(0, 1fr) 46px; }
  .chat-drawer { width: calc(100vw - 24px); right: 12px; bottom: 12px; height: 70vh; }
}
