:root {
  --blue: #1a4b8c;
  --blue-dark: #12396f;
  --blue-soft: #eaf2ff;
  --bg: #f4f7fb;
  --card: #fff;
  --border: #e3e9f2;
  --muted: #7a8290;
  --text: #1f2733;
  --shadow: 0 14px 34px rgba(15, 35, 70, .08);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(90deg, #12396f 0%, #1a4b8c 70%, #245ea8 100%);
  color: #fff;
  padding: 10px 26px;
  min-height: 64px;
  box-shadow: 0 6px 20px rgba(12, 31, 61, .16);
}
.topbar a { color: #fff; text-decoration: none; }
.brand--site {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand__logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}
.brand__text strong { font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.brand__text small { font-size: 12px; opacity: .86; }
.topbar nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar nav a,
.linkbtn { color: #fff; font-size: 14px; opacity: .94; }
.topbar nav a:hover,
.linkbtn:hover { opacity: 1; }
.who { opacity: .9; font-size: 14px; }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: none; cursor: pointer; font: inherit; padding: 0; }
.container { max-width: 1080px; margin: 24px auto; padding: 0 16px 36px; }
h1 { font-size: 24px; }
h2 { font-size: 19px; margin-top: 28px; }
.muted { color: var(--muted); font-weight: 400; font-size: 14px; }
.crumb { font-size: 14px; color: var(--muted); }
.crumb a { color: var(--blue); }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 14px 0;
}
.card.narrow { max-width: 360px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.course-card { text-decoration: none; color: inherit; display: block; transition: box-shadow .15s; }
.course-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.course-card h2 { margin: 0 0 4px; color: var(--blue); }
.list { list-style: none; padding: 0; }
.list li {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; margin: 8px 0; display: flex; align-items: center; gap: 12px;
}
.list li a { color: var(--blue); text-decoration: none; font-weight: 500; }
label { display: block; margin: 12px 0 5px; font-size: 14px; font-weight: 600; color: #334155; }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(26, 75, 140, .45);
  box-shadow: 0 0 0 4px rgba(26, 75, 140, .10);
}
input[type=file] { border: none; padding-left: 0; }
.signin input { width: auto; }
.btn {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}
.btn:hover { opacity: .92; }
.btn-wide { width: 100%; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; }
.tag-live { background: #ffe9e6; color: #c0392b; }
.tag-ok { background: #e6f6ec; color: #1e7e46; }
.msg { padding: 10px 14px; border-radius: 8px; margin: 10px 0; font-size: 14px; }
.msg-success, .msg-info { background: #e6f6ec; color: #1e7e46; }
.msg-error { background: #ffe9e6; color: #c0392b; }
.slides-wrap { position: relative; padding-top: 60%; margin: 14px 0; }
.slides-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 1px solid var(--border); border-radius: 10px;
}

/* 顶部账户设置菜单 */
.account-menu { position: relative; display: inline-block; margin-left: 2px; }
.account-summary { list-style: none; color: #fff; cursor: pointer; padding: 2px 4px; user-select: none; font-size: 14px; }
.account-summary::-webkit-details-marker { display: none; }
.account-summary:hover { opacity: .9; }
.account-panel {
  position: absolute; right: 0; top: calc(100% + 12px); min-width: 210px;
  background: #fff; color: #1f2733; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16); padding: 8px; z-index: 3000;
}
.account-panel::before {
  content: ""; position: absolute; top: -8px; right: 18px;
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid #fff;
}
.topbar .account-panel a {
  display: block; color: var(--blue); margin: 0; padding: 8px 10px; border-radius: 8px; text-decoration: none;
}
.topbar .account-panel a:hover { background: #f3f6fb; }
.account-panel-head { border-bottom: 1px solid var(--border); padding: 6px 10px 8px; margin-bottom: 4px; }
.account-panel-head strong { display: block; color: #111827; font-size: 14px; }
.account-panel-head span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.account-card { max-width: 560px; margin: 28px auto; }
.account-readonly { background: #f6f7f9; color: #6b7280; cursor: not-allowed; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.btn-secondary {
  display: inline-block; border: 1px solid var(--border); background: #fff; color: var(--blue);
  border-radius: 8px; padding: 9px 16px; text-decoration: none;
}
.btn-secondary:hover { background: #f3f6fb; }

/* Polished public homepage */
.landing-body {
  background:
    radial-gradient(circle at 12% 10%, rgba(26, 75, 140, .14), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(36, 94, 168, .12), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, #edf3f8 100%);
}
.landing-container {
  max-width: 1180px;
  margin-top: 30px;
}
.landing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 380px;
  gap: 22px;
  align-items: stretch;
}
.landing-card,
.portrait-card,
.login-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(218, 228, 241, .9);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.landing-main { display: grid; gap: 18px; }
.landing-intro {
  min-height: 400px;
  padding: 38px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(247, 251, 255, .98) 100%);
  position: relative;
  overflow: hidden;
}
.landing-intro::after {
  content: "";
  position: absolute;
  right: -110px;
  top: -130px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(26, 75, 140, .07);
}
.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.landing-kicker img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; }
.landing-intro h1 {
  font-size: 56px;
  line-height: 1;
  margin: 0 0 18px;
  color: #10233f;
  letter-spacing: -.02em;
  position: relative;
  z-index: 1;
}
.landing-subtitle {
  max-width: 680px;
  margin: 0;
  color: #4f6175;
  font-size: 18px;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}
.landing-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}
.landing-info-grid div {
  background: #f8fbff;
  border: 1px solid #e7eef7;
  border-radius: 16px;
  padding: 16px 18px;
}
.landing-info-grid strong {
  display: block;
  color: var(--blue-dark);
  font-size: 16px;
  margin-bottom: 5px;
}
.landing-info-grid span {
  display: block;
  color: #5d6b7b;
  font-size: 14px;
}
.landing-note {
  padding: 22px 24px;
}
.landing-note h2 {
  color: #10233f;
  margin: 0 0 8px;
  font-size: 20px;
}
.landing-note p {
  margin: 0;
  color: #5a6878;
}
.landing-side {
  display: grid;
  gap: 18px;
  grid-template-rows: 1fr auto;
}
.portrait-card {
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.portrait-img {
  width: 100%;
  flex: 1 1 0;
  min-height: 310px;
  height: auto;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 18px;
  display: block;
  background: #e5ebf3;
}
.portrait-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 4px 2px;
}
.portrait-caption strong { color: #10233f; font-size: 16px; }
.portrait-caption span { color: var(--muted); font-size: 13px; }
.login-panel {
  padding: 26px 24px 24px;
}
.login-panel-head h2 {
  margin: 0;
  color: #10233f;
  font-size: 28px;
  line-height: 1.1;
}
.login-panel-head p {
  margin: 5px 0 14px;
  color: var(--muted);
}
.login-form label { margin-top: 13px; }
.login-form input { background: #fbfdff; }
.login-form .btn { margin-top: 18px; padding: 12px 18px; }

.landing-help {
  padding: 24px 26px;
}
.landing-help-title {
  color: #10233f;
  margin: 0 0 14px;
  font-size: 20px;
  position: relative;
  padding-left: 14px;
}
.landing-help-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1a4b8c 0%, #245ea8 100%);
}
.landing-help-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 13px 0;
}
.landing-help-item + .landing-help-item {
  border-top: 1px solid #eef2f8;
}
.landing-help-tag {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: #1a4b8c;
  background: var(--blue-soft);
  border: 1px solid #dbe7f8;
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.landing-help-tag--guest {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.landing-help-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #5a6878;
}
.landing-help code {
  background: #eef3fb;
  color: #12396f;
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 13px;
  font-weight: 700;
}

/* Dashboard */
.dashboard-head {
  padding: 22px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.dashboard-eyebrow {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.kt-term-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:4px 0 20px; }
.kt-term-bar .lbl { color:#6b7280; font-size:14px; margin-right:4px; }
.kt-term-pill {
  display:inline-block; padding:6px 12px; border-radius:999px; font-size:13px;
  text-decoration:none; border:1px solid #e5e7eb; color:#374151; background:#fff;
}
.kt-term-pill.active { background:#1e3a8a; border-color:#1e3a8a; color:#fff; }
.kt-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }
.kt-off-card {
  display:block; text-decoration:none; background:#fff; border:1px solid #e5e7eb;
  border-radius:16px; padding:18px 18px 16px; box-shadow:0 10px 24px rgba(15,23,42,.06);
  transition:box-shadow .15s, transform .15s;
}
.kt-off-card:hover { box-shadow:0 16px 34px rgba(15,23,42,.12); transform:translateY(-2px); }
.kt-off-card h2 { margin:0 0 8px; font-size:18px; color:#111827; }
.kt-class-badge {
  display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px;
  background:#eef2ff; color:#3730a3; margin-bottom:10px; font-weight:600;
}
.kt-off-meta { color:#6b7280; font-size:13px; line-height:1.7; }
.kt-off-meta .k { color:#9ca3af; }

@media (max-width: 980px) {
  .landing-layout { grid-template-columns: 1fr; }
  .landing-side { grid-template-columns: minmax(260px, 360px) minmax(300px, 1fr); align-items: stretch; }
  .portrait-img { height: 300px; }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
  .topbar nav { justify-content: flex-start; }
  .brand__text strong { font-size: 18px; }
  .brand__text small { white-space: normal; }
  .container { margin: 18px auto; padding: 0 14px 28px; }
  .landing-intro { min-height: 0; padding: 28px 22px; }
  .landing-intro h1 { font-size: 40px; }
  .landing-subtitle { font-size: 16px; }
  .landing-info-grid { grid-template-columns: 1fr; }
  .landing-side { grid-template-columns: 1fr; }
}

/* Render-confirmed layout adjustments */
.topbar nav { flex-wrap: nowrap; }
.topbar nav a,
.topbar .linkbtn { white-space: nowrap; }
.login-form .btn-wide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  line-height: 1.2;
  padding: 12px 18px;
}
.login-panel { min-height: 300px; }
