/* ============================================================
   学员端样式
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #4f6ef7;
  --primary-dark: #3a57e8;
  --primary-light:#eef0fe;
  --danger:       #f04747;
  --success:      #43b581;
  --warning:      #faa61a;
  --text:         #1a1d23;
  --text-sub:     #6b7280;
  --border:       #e5e7eb;
  --bg:           #f3f4f8;
  --white:        #ffffff;
  --radius:       10px;
  --shadow:       0 1px 4px rgba(0,0,0,.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,.12);
  --header-h:     60px;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
}
#app {
  width: 100%;
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ============================================================
   登录页
   ============================================================ */
.login-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #ffffff;
}

/* 顶部 Logo 栏 */
.login-topbar {
  height: auto;
  min-height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.login-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 32px;
}
.login-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-topbar-brand #s-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.login-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* logo + 标题（登录框上方，PC/移动端均显示） */
.login-mobile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 860px;
}
.login-mobile-logo {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  min-width: 0;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  display: block;
}
.login-mobile-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}


/* 主体 */
.login-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #f5f6fa;
}
.login-container {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 860px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,.08);
  overflow: hidden;
  min-height: 400px;
}

/* 左侧插图 */
.login-illustration {
  flex: 1;
  background: linear-gradient(135deg, #4f8ef7 0%, #1db8e8 100%);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  min-width: 0;
  overflow: hidden;
}
.login-illus-inner {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: stretch;
}
.login-illus-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 顶部品牌区块 */
.login-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-brand-text-logo {
  height: 36px;
  width: auto;
  display: block;
}
.login-brand-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  flex-shrink: 0;
}
.login-brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* 插图区头部（logo + 标题） */
.login-illus-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.login-illus-logo {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  display: block;
}
.login-illus-title {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  line-height: 1.5;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  margin-bottom: 0;
}
.login-illus-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* 右侧表单 */
.login-form-wrap {
  width: 340px;
  flex-shrink: 0;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-welcome {
  margin-bottom: 32px;
}
.login-welcome-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.login-welcome-sub {
  font-size: 13px;
  color: var(--text-sub);
}

/* 带图标 input */
.s-input-wrap {
  position: relative;
}
.s-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #9ca3af;
  pointer-events: none;
}
.s-input-icon-left {
  padding-left: 38px;
}

/* 登录页合并输入框组 */
.login-input-group {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--white);
  transition: border-color .15s;
}
.login-input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,110,247,.10);
}
.login-input-row {
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 0;
}
.login-input-row .s-input-icon {
  position: static;
  transform: none;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  color: #9ca3af;
  pointer-events: none;
  display: block;
  overflow: hidden;
}
.login-group-input {
  flex: 1;
  height: 48px;
  border: none;
  outline: none;
  padding: 0 10px;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  line-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}
.login-group-input::placeholder { color: #9ca3af; }
.login-input-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* 登录按钮（蓝色宽按钮） */
.s-btn-login {
  background: #29a8e8;
  color: #ffffff;
  border-color: #29a8e8;
  font-size: 16px;
  font-weight: 600;
  height: 46px;
  border-radius: 8px;
  margin-top: 12px;
  transition: background .15s, opacity .15s;
}
.s-btn-login:hover { background: #1b90cc; border-color: #1b90cc; }
.s-btn-login:disabled { opacity: .6; cursor: not-allowed; }

/* 底部版权 */
.login-footer {
  flex-shrink: 0;
  padding: 18px 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-sub);
  background: #f5f6fa;
  border-top: 1px solid var(--border);
}

.s-form-item { margin-bottom: 18px; }
.s-form-item label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }
.s-input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.s-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,110,247,.12); }

/* ============================================================
   按钮
   ============================================================ */
.s-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 18px; border-radius: 8px; font-size: 14px;
  font-weight: 500; cursor: pointer; transition: all .15s;
  border: 1.5px solid transparent; white-space: nowrap;
}
.s-btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.s-btn-primary:hover { background: var(--primary-dark); }
.s-btn-default { background: var(--white); color: var(--text); border-color: var(--border); }
.s-btn-default:hover { background: var(--bg); }
.s-btn-block { width: 100%; margin-top: 8px; height: 44px; font-size: 15px; }
.s-btn:disabled { opacity: .6; cursor: not-allowed; }
.s-btn svg { width: 16px; height: 16px; }
.s-btn-sm { padding: 5px 12px; font-size: 13px; }

/* ============================================================
   Header
   ============================================================ */
.s-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  box-shadow: var(--shadow);
}
.s-header-inner {
  max-width: 1100px; margin: 0 auto;
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 20px;
}
.s-header-left { display: flex; align-items: center; flex: 1; }
.s-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.s-header-brand-logo {
  height: 32px;
  max-height: 32px;
  width: auto;
  max-width: 160px;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.s-header-brand-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}
.s-site-title { font-size: 15px; font-weight: 600; color: var(--text-sub); white-space: nowrap; }

/* 导航 + 用户信息栏 */
.s-subnav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 99;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.s-subnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  height: 48px;
}
.s-subnav-nav {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}
.s-subnav-user {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.s-nav { display: flex; gap: 4px; flex: 1; }
.s-nav-item {
  padding: 6px 16px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: var(--text-sub); font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.s-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.s-nav-item:hover  { background: var(--bg); }

.s-header-right { display: flex; align-items: center; }
.s-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; overflow: hidden; flex-shrink: 0;
}
.s-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   主内容
   ============================================================ */
.s-main { max-width: 1100px; margin: 0 auto; padding: 28px 20px; }

/* ============================================================
   课程列表
   ============================================================ */
.s-page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.s-page-title { font-size: 20px; font-weight: 700; }

.s-search-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.s-search-input {
  height: 38px; border: 1.5px solid var(--border); border-radius: 8px;
  padding: 0 12px; font-size: 13.5px; background: var(--white);
  color: var(--text); outline: none; width: 220px;
  transition: border-color .15s;
}
.s-search-input:focus { border-color: var(--primary); }
select.s-search-input { cursor: pointer; }

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.course-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.course-card-cover {
  width: 100%; height: 160px; object-fit: cover; background: var(--bg);
  display: block;
}
.course-card-cover-placeholder {
  width: 100%; height: 160px; background: linear-gradient(135deg, #667eea22, #764ba222);
  display: flex; align-items: center; justify-content: center; color: #ccc;
}
.course-card-cover-placeholder svg { width: 40px; height: 40px; }
.course-card-body { padding: 14px 16px 16px; }
.course-card-cat  { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.course-card-title {
  font-size: 15px; font-weight: 700; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 8px;
}
.course-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-sub);
}
.course-card-progress { margin-top: 10px; }
.s-progress-bar { background: var(--border); border-radius: 4px; height: 4px; overflow: hidden; }
.s-progress-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s; }
.s-progress-label { font-size: 12px; color: var(--text-sub); margin-top: 4px; text-align: right; }
.course-expired-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
}
.course-card-wrap { position: relative; }
.expired-tag {
  background: var(--danger); color: white; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
}

/* ============================================================
   课程详情 / 视频播放
   ============================================================ */
.course-detail-header {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px;
  display: flex; gap: 24px;
}
.course-detail-cover {
  width: 220px; height: 140px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0; background: var(--bg);
}
.course-detail-info { flex: 1; min-width: 0; }
.course-detail-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.course-detail-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.course-detail-meta span { font-size: 12.5px; color: var(--text-sub); }
.course-desc { font-size: 14px; color: var(--text-sub); line-height: 1.6; margin-top: 10px; }

.course-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }

/* 视频播放器 */
.video-player-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.video-player-wrap {
  background: #000; position: relative;
  padding-bottom: 56.25%; /* 16:9 */
}
.video-player-wrap video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.no-video-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #fff; gap: 10px;
}
.no-video-placeholder svg { width: 48px; height: 48px; opacity: .5; }
.video-info-bar { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.video-title { font-size: 15px; font-weight: 600; }

/* 课程目录 */
.course-toc {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  max-height: calc(100vh - 120px); overflow-y: auto;
}
.toc-header { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 15px; }
.toc-chapter-title {
  padding: 10px 16px; background: var(--bg); font-size: 13px;
  font-weight: 600; color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border); position: sticky; top: 0; z-index: 1;
}
.toc-lesson {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.toc-lesson:hover { background: var(--primary-light); }
.toc-lesson.active { background: var(--primary-light); color: var(--primary); }
.toc-lesson-icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-sub); }
.toc-lesson.active .toc-lesson-icon { color: var(--primary); }
.toc-lesson-name { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-lesson-dur  { font-size: 12px; color: var(--text-sub); flex-shrink: 0; }
.toc-finish-mark {
  width: 16px; height: 16px; border-radius: 50%; background: var(--success);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.toc-finish-mark svg { width: 10px; height: 10px; color: white; }
.toc-free-tag { background: #d1fae5; color: #065f46; font-size: 11px; padding: 1px 5px; border-radius: 4px; }

/* ============================================================
   个人中心
   ============================================================ */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.profile-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; text-align: center;
}
.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 12px; cursor: pointer; }
.profile-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; overflow: hidden; margin: 0 auto;
  border: 3px solid var(--primary-light);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px; background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.profile-avatar-edit svg { width: 12px; height: 12px; color: white; }
.profile-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.profile-username { font-size: 13px; color: var(--text-sub); margin-bottom: 14px; }
.profile-expire {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 500;
}
.profile-expire.valid { background: #d1fae5; color: #065f46; }
.profile-expire.expired { background: #fee2e2; color: #991b1b; }
.profile-expire.forever { background: var(--primary-light); color: var(--primary); }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.profile-stat {
  background: var(--bg); border-radius: 8px; padding: 10px;
  text-align: center;
}
.profile-stat-value { font-size: 18px; font-weight: 700; color: var(--primary); }
.profile-stat-label { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

.info-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.info-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.info-card-title { font-size: 16px; font-weight: 700; }
.s-info-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: center; }
.s-info-row:last-child { border-bottom: none; }
.s-info-label { width: 90px; font-size: 13px; color: var(--text-sub); flex-shrink: 0; }
.s-info-value { flex: 1; font-size: 14px; }

/* 表单 */
.s-form-control {
  width: 100%; height: 38px; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 0 12px; font-size: 14px; color: var(--text);
  outline: none; transition: border-color .15s;
}
.s-form-control:focus { border-color: var(--primary); }
textarea.s-form-control { height: auto; padding: 8px 12px; resize: vertical; min-height: 80px; }
select.s-form-control  { cursor: pointer; }
.s-form-group { margin-bottom: 16px; }
.s-form-group label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }

/* ============================================================
   通用
   ============================================================ */
.s-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-default { background: var(--bg); color: var(--text-sub); }

.s-loading { display: flex; align-items: center; justify-content: center; height: 200px; }
.s-spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.s-empty { display: flex; flex-direction: column; align-items: center; padding: 60px 20px; color: var(--text-sub); }
.s-empty svg { width: 56px; height: 56px; opacity: .3; margin-bottom: 12px; }
.s-empty p { font-size: 15px; }

/* Modal */
.s-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 300; display: flex; align-items: center; justify-content: center;
}
.s-modal {
  background: var(--white); border-radius: 12px; width: 460px;
  max-width: 95vw; max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.s-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 700;
}
.s-modal-body   { padding: 20px; overflow-y: auto; flex: 1; }
.s-modal-footer {
  padding: 12px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.s-close-btn {
  width: 30px; height: 30px; border-radius: 6px; border: none; background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-sub); transition: background .15s;
}
.s-close-btn:hover { background: var(--bg); }
.s-close-btn svg { width: 18px; height: 18px; }

/* Toast */
#s-toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.s-toast { padding: 10px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 500; box-shadow: 0 4px 16px rgba(0,0,0,.15); color: white; animation: sSlideIn .25s ease; min-width: 200px; }
.s-toast-success { background: #43b581; }
.s-toast-error   { background: #f04747; }
.s-toast-warning { background: #faa61a; }
.s-toast-info    { background: #4f6ef7; }
@keyframes sSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 返回按钮 */
.s-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-sub); font-size: 13.5px; cursor: pointer;
  margin-bottom: 16px; transition: color .15s;
}
.s-back-btn:hover { color: var(--primary); }
.s-back-btn svg { width: 16px; height: 16px; }

/* 响应式 */
@media (max-width: 800px) {
  .course-layout { grid-template-columns: 1fr; }
  .profile-grid  { grid-template-columns: 1fr; }
  .course-detail-header { flex-direction: column; }
  .course-detail-cover { width: 100%; height: 200px; }
  .s-main { padding: 16px 12px; }

  /* 登录后主界面 header */
  .s-header-inner { padding: 0 16px; justify-content: center; }
  .s-header-brand-logo { height: 26px; max-height: 26px; max-width: 130px; }
  .s-header-brand-divider { height: 16px; }
  .s-site-title { font-size: 13px; }

  /* subnav */
  .s-subnav-inner { padding: 0 12px; height: 44px; }
  .s-nav-item { padding: 5px 12px; font-size: 13px; }

  /* 退出登录按钮适配 */
  #s-btn-logout { padding: 4px 10px; font-size: 12px; }

  /* 登录页移动端 */
  .login-page { background: #f5f6fa; }
  .login-body {
    padding: 20px 16px 24px;
    background: transparent;
    flex-direction: column;
    align-items: center;
  }
  .login-mobile-header {
    gap: 10px;
    margin-bottom: 20px;
    max-width: 420px;
  }
  .login-mobile-logo {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    display: block;
  }
  .login-mobile-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
  }
  .login-illustration { display: none; }
  .login-container {
    max-width: 100%;
    min-height: unset;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
  }
  .login-form-wrap {
    width: 100%;
    padding: 36px 28px;
    border-radius: 12px;
  }
  .login-topbar-inner {
    padding: 10px 20px;
    justify-content: center;
  }
  .login-brand-block { flex-wrap: nowrap; max-width: 100%; overflow: hidden; }
  .login-brand-text-logo { height: 30px; }
}

@media (max-width: 580px) {
  .course-grid { grid-template-columns: 1fr 1fr; }
  .s-search-input { width: 100%; }
  .s-search-bar { flex-direction: column; }
  .s-search-bar .s-btn { width: 100%; }

  /* 主界面 header 小屏 */
  .s-header-inner { padding: 0 12px; }
  .s-header-brand-logo { height: 22px; max-height: 22px; max-width: 110px; }
  .s-site-title { font-size: 12px; }

  /* subnav 小屏：用户名隐藏，只显示头像+退出按钮 */
  .s-subnav-inner { padding: 0 10px; height: 42px; }
  .s-nav-item { padding: 5px 10px; font-size: 13px; }
  #s-header-name { display: none; }
  #s-btn-logout { margin-left: 6px; padding: 4px 8px; font-size: 12px; }

  /* 登录页小屏 */
  .login-topbar-inner { padding: 8px 16px; min-height: 54px; justify-content: center; }
  .login-brand-text-logo { height: 26px; }
  .login-brand-divider { height: 16px; }
  .login-brand-name { font-size: 12px; }
  .login-body { padding: 12px 12px 20px; }
  .login-mobile-header { gap: 8px; margin-bottom: 16px; }
  .login-mobile-logo { width: 28px; height: 28px; max-width: 28px; max-height: 28px; }
  .login-mobile-title { font-size: 13px; }
  .login-form-wrap { padding: 28px 20px; }
  .login-welcome-title { font-size: 20px; }
  .login-welcome { margin-bottom: 24px; }
  /* 确保输入框图标严格约束 */
  .login-input-row .s-input-icon {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
  }
}

@media (max-width: 380px) {
  .course-grid { grid-template-columns: 1fr; }
  .login-form-wrap { padding: 24px 16px; }
  .login-brand-text-logo { height: 22px; }
}
/* iOS Safari / 安卓 WebView 兼容 */
@supports (-webkit-touch-callout: none) {
  html, body { height: -webkit-fill-available; }
  #app { min-height: -webkit-fill-available; }
  .login-page { min-height: -webkit-fill-available; }
}
