:root {
  --bg: #08111e;
  --surface: #0e1a2b;
  --surface-2: #12233a;
  --surface-3: #172941;
  --line: rgba(157, 172, 197, .18);
  --line-strong: rgba(41, 210, 186, .38);
  --text: #edf5ff;
  --sub: #a8b7cc;
  --muted: #77869b;
  --cyan: #31c6f4;
  --green: #27d8a2;
  --amber: #f4b84a;
  --red: #f06d7f;
  --violet: #9b8cff;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(0, 0, 0, .25);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 30px 20px 90px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
}

.site-footer span:last-child { display: flex; gap: 12px; flex-wrap: wrap; }
.site-footer button, .site-footer a { border: 0; padding: 0; color: #73dbe8; background: none; cursor: pointer; text-decoration: none; }
.agreement-box {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
}
.form label.agreement-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid rgba(125, 155, 188, .22);
  border-radius: 11px;
  color: var(--sub);
  background: rgba(10, 29, 46, .56);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
.form label.agreement-item:hover {
  border-color: rgba(60, 211, 219, .56);
  background: rgba(30, 82, 98, .24);
}
.form label.agreement-item:has(input:checked) {
  border-color: rgba(52, 211, 180, .72);
  color: var(--text);
  background: linear-gradient(135deg, rgba(47, 197, 225, .14), rgba(45, 211, 164, .1));
  box-shadow: inset 0 0 0 1px rgba(52, 211, 180, .08), 0 7px 20px rgba(0, 0, 0, .12);
}
.agreement-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid rgba(154, 181, 208, .72);
  border-radius: 7px;
  background: rgba(4, 17, 30, .7);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.agreement-item input[type="checkbox"]:hover { border-color: #4bdde1; }
.agreement-item input[type="checkbox"]:checked {
  border-color: transparent;
  background-color: #39d6bd;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23051b27' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4' d='m3.1 8.2 3 3 6.8-7'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 15px;
  box-shadow: 0 0 0 4px rgba(57, 214, 189, .13), 0 4px 12px rgba(57, 214, 189, .18);
  transform: scale(1.03);
}
.agreement-item input[type="checkbox"]:focus-visible {
  outline: 2px solid #74eef0;
  outline-offset: 3px;
}
.agreement-copy { min-width: 0; line-height: 1.55; }
.agreement-copy a { color: #4adcf2; font-weight: 800; text-decoration: none; }
.agreement-copy a:hover { color: #91f4ff; text-decoration: underline; text-underline-offset: 3px; }
.legal-modal { max-width: 760px; }
.legal-content { padding: 4px 22px 24px; color: var(--text); line-height: 1.85; }
.legal-content p { margin: 0 0 14px; }
.danger-note { padding: 12px; border: 1px solid rgba(255,90,100,.45); border-radius: 12px; color: #ff9aa2; background: rgba(255,80,90,.08); }
.ai-generated-label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid rgba(45,210,180,.35); border-radius: 12px; background: rgba(45,210,180,.07); color: #9be7dc; }
.ai-generated-label strong { color: #35ddbd; }
.ai-generated-label span { font-size: 12px; }
.privacy-center .mini-actions { justify-content: flex-start; }

.upload-levels {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(43, 204, 190, .28);
  border-radius: 12px;
  background: rgba(30, 196, 184, .045);
}

.course-tree {
  gap: 12px;
}

.course-tree-chapter {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.course-tree-heading {
  display: grid;
  gap: 4px;
  padding: 2px 4px 10px;
}

.course-tree-heading span,
.course-tree-section span {
  color: var(--sub);
  font-size: 12px;
}

.course-tree-sections {
  display: grid;
  gap: 8px;
}

.course-tree-section {
  width: 100%;
  text-align: left;
}

.chapter-section-admin-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border-left: 2px solid rgba(43, 204, 190, .35);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(49, 198, 244, .08), transparent 270px),
    linear-gradient(128deg, rgba(39, 216, 162, .07), transparent 460px),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .72;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(8, 15, 27, .9);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin-bottom: 16px;
  width: 100%;
  border: 0;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  transition: background .18s ease, transform .18s ease;
}
.brand:hover { background: rgba(55, 213, 218, .08); }
.brand:active { transform: translateY(1px); }
.brand:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #03111a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 12px 36px rgba(49, 198, 244, .22);
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--sub);
  font-size: 12px;
}

.nav-group {
  margin-top: 18px;
}

.nav-title {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.nav-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--sub);
  background: transparent;
  text-align: left;
  transition: .16s ease;
}

.nav-btn:hover,
.nav-btn.active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(49, 198, 244, .10);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(49, 198, 244, .10);
  font-size: 12px;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 18px;
}

.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 15, 27, .94);
  backdrop-filter: blur(16px);
}

.mobile-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mobile-scroll .btn {
  white-space: nowrap;
}

.mobile-tabbar,
.mobile-admin-strip,
.mobile-filter-row {
  display: none;
}

.mobile-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  border-top: 1px solid var(--line);
  background: rgba(8, 15, 27, .96);
  backdrop-filter: blur(18px);
}

.mobile-tabbar .nav-btn {
  min-height: 52px;
  justify-content: center;
  padding: 6px 4px;
  font-size: 12px;
  text-align: center;
}

.mobile-tabbar .nav-left {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.mobile-tabbar .nav-icon {
  width: 24px;
  height: 24px;
}

.mobile-admin-strip {
  gap: 8px;
  margin: 10px 0 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mobile-admin-strip .btn {
  white-space: nowrap;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 22, 38, .88);
  backdrop-filter: blur(18px);
}

.search-wrap {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 7px 5px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--sub);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .026)),
    rgba(255, 255, 255, .035);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.search:focus-within,
.search.active {
  border-color: rgba(39, 216, 162, .52);
  box-shadow: 0 0 0 2px rgba(39, 216, 162, .09);
  background: rgba(15, 30, 48, .90);
}

.search-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  position: relative;
  border: 2px solid rgba(168, 183, 204, .78);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  width: 6px;
  height: 2px;
  position: absolute;
  right: -5px;
  bottom: -2px;
  border-radius: 2px;
  background: rgba(168, 183, 204, .78);
  transform: rotate(45deg);
  transform-origin: left center;
}

.search:focus-within .search-icon,
.search.active .search-icon {
  border-color: var(--green);
}

.search:focus-within .search-icon::after,
.search.active .search-icon::after {
  background: var(--green);
}

.search input {
  width: 100%;
  min-width: 80px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search input::placeholder {
  color: rgba(168, 183, 204, .68);
}

.search-clear {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--sub);
  background: rgba(255, 255, 255, .04);
  font-size: 19px;
  line-height: 1;
  transition: opacity .16s ease, border-color .16s ease, color .16s ease, background .16s ease;
}

.search:not(.active) .search-clear {
  opacity: 0;
  pointer-events: none;
}

.search-clear:hover {
  color: var(--text);
  border-color: rgba(39, 216, 162, .42);
  background: rgba(39, 216, 162, .10);
}

.search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  padding: 8px;
  border: 1px solid rgba(49, 198, 244, .24);
  border-radius: var(--radius);
  background: rgba(10, 19, 34, .98);
  box-shadow: 0 24px 58px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
}

.search-item {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.search-item:hover,
.search-item.keyboard-active {
  border-color: rgba(49, 198, 244, .30);
  background: rgba(49, 198, 244, .10);
}

.search-item.keyboard-active {
  border-color: rgba(39, 216, 162, .58);
  box-shadow: inset 3px 0 0 var(--green), 0 0 0 1px rgba(39, 216, 162, .08);
}

.search-type {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  border: 1px solid rgba(39, 216, 162, .28);
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  background: rgba(39, 216, 162, .08);
}

.search-copy {
  min-width: 0;
}

.search-copy strong,
.search-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-copy strong {
  font-size: 14px;
}

.search-copy em {
  margin-top: 3px;
  color: var(--sub);
  font-size: 12px;
  font-style: normal;
}

.search-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.search-empty {
  padding: 12px;
  color: var(--sub);
  text-align: center;
}

.search-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: -6px 0 14px;
  padding: 8px 10px;
  border: 1px solid rgba(49, 198, 244, .22);
  border-radius: var(--radius);
  color: var(--sub);
  background: rgba(49, 198, 244, .07);
  font-size: 13px;
}

.search-summary strong {
  color: var(--text);
}

.search-summary span {
  color: var(--green);
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page {
  padding: 18px 0 44px;
}

.page-head {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 12px 0 18px;
}

.page-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.page-head p {
  margin: 7px 0 0;
  color: var(--sub);
  line-height: 1.55;
}

.product-status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 16px;
  border: 1px solid rgba(49, 198, 244, .24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(49, 198, 244, .10), rgba(39, 216, 162, .055));
  box-shadow: var(--shadow);
}

.product-status-panel.warn,
.product-status-panel.guest {
  border-color: rgba(245, 174, 75, .28);
  background: linear-gradient(135deg, rgba(245, 174, 75, .10), rgba(49, 198, 244, .045));
}

.product-status-panel h2 {
  margin: 10px 0 6px;
  font-size: 22px;
  line-height: 1.25;
}

.product-status-panel p {
  margin: 0;
  color: var(--sub);
  line-height: 1.6;
}

.status-actions,
.next-step-list {
  display: grid;
  gap: 9px;
}

.status-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.next-step {
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,.035);
  text-align: left;
}

.next-step strong,
.next-step span {
  display: block;
}

.next-step span {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.btn {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  transition: .16s ease;
}

.btn:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.btn.primary {
  border-color: transparent;
  color: #03111a;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.btn.danger {
  color: #ffe2e7;
  border-color: rgba(240, 109, 127, .38);
  background: rgba(240, 109, 127, .12);
}

.btn.small {
  min-height: 31px;
  padding: 6px 10px;
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 14px;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr);
  gap: 14px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .046), rgba(255, 255, 255, .024));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lift-card {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.lift-card:hover {
  transform: translateY(-6px);
  border-color: rgba(49, 198, 244, .42);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .34), 0 0 0 1px rgba(49, 198, 244, .08);
}

.lift-card:active {
  transform: translateY(-2px) scale(.992);
}

.card-body {
  padding: 15px;
}

.metric {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.metric .num {
  font-size: 27px;
  font-weight: 900;
}

.metric .label {
  margin-top: 4px;
  color: var(--sub);
  font-size: 13px;
}

.trend,
.pill,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sub);
  background: rgba(255, 255, 255, .035);
  font-size: 12px;
}

.trend,
.status.ok,
.pill.ok {
  color: var(--green);
  border-color: rgba(39, 216, 162, .28);
  background: rgba(39, 216, 162, .08);
}

.status.warn,
.pill.warn {
  color: var(--amber);
  border-color: rgba(244, 184, 74, .3);
  background: rgba(244, 184, 74, .09);
}

.status.bad,
.pill.bad {
  color: var(--red);
  border-color: rgba(240, 109, 127, .32);
  background: rgba(240, 109, 127, .1);
}

.title {
  margin: 0 0 8px;
  font-size: 17px;
}

.text {
  margin: 0;
  color: var(--sub);
  line-height: 1.58;
  font-size: 14px;
}

.summary-text {
  min-height: 44px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cover {
  min-height: 150px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    linear-gradient(135deg, rgba(49, 198, 244, .22), rgba(155, 140, 255, .13)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 24px);
}

.cover strong {
  font-size: 22px;
}

.image-cover {
  overflow: hidden;
}

.image-cover img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform .22s ease, filter .22s ease;
}

.workflow-demo {
  aspect-ratio: 16 / 9;
  min-height: 150px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, .98), rgba(18, 31, 51, .94)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 24px);
}

.workflow-demo-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
  transition: transform .22s ease, filter .22s ease, opacity .22s ease;
}

.workflow-demo:not(.ready) .workflow-demo-video {
  opacity: .58;
  filter: brightness(.74) saturate(.9);
}

.lift-card:hover .workflow-demo-video {
  transform: scale(1.025);
}

.workflow-demo-play {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: 92px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: #03111a;
  background: linear-gradient(135deg, rgba(49, 198, 244, .96), rgba(43, 214, 158, .92));
  box-shadow: 0 14px 32px rgba(0, 0, 0, .36);
  font-weight: 900;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 3;
}

.workflow-demo-play:disabled {
  cursor: progress;
  opacity: .78;
}

.course-video-card:hover .image-cover img {
  transform: scale(1.045);
  filter: brightness(.92);
}

.cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  color: #03111a;
  background: linear-gradient(135deg, rgba(49, 198, 244, .92), rgba(43, 214, 158, .9));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
  transform: translate(-50%, -50%) scale(.9);
  opacity: .88;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 2;
}

.course-video-card:hover .cover-play {
  transform: translate(-50%, -50%) scale(1.06);
  opacity: 1;
}

.watermark {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: rgba(237, 245, 255, .46);
  font-size: 12px;
  font-weight: 800;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.028);
}

.filter-bar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--sub);
  font-size: 12px;
}

.compact-select {
  min-width: 118px;
}

.admin-filter-bar {
  margin-top: 14px;
}

.mobile-filter-row {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
}

.mobile-filter-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  align-items: end;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(8px);
}

.mobile-filter-sheet {
  max-height: min(78vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: #0d1929;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .44);
}

.mobile-filter-body {
  padding: 4px 14px 0;
}

.mobile-filter-controls {
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
}

.mobile-filter-controls label {
  width: 100%;
  justify-content: space-between;
}

.loading-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(49, 198, 244, .24);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(49, 198, 244, .07);
  font-size: 13px;
}

.loading-block span {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(49, 198, 244, .26);
  border-top-color: var(--cyan);
  border-radius: 999px;
  animation: spin .8s linear infinite;
}

.mini-progress {
  height: 7px;
  overflow: hidden;
  margin-top: 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.progress-copy {
  margin-top: 6px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
}

.course-progress-card {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(49, 198, 244, .2);
  border-radius: var(--radius);
  background: rgba(49, 198, 244, .055);
}

.course-progress-card strong,
.course-progress-card span {
  display: block;
}

.course-progress-card span {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
}

.inline-alert {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 174, 75, .32);
  border-radius: var(--radius);
  color: #ffe1a8;
  background: rgba(245, 174, 75, .09);
  line-height: 1.5;
  font-size: 13px;
}

.inline-alert.bad {
  border-color: rgba(240, 109, 127, .34);
  color: #ffd6dc;
  background: rgba(240, 109, 127, .10);
}

.usage-guide {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius);
  background: rgba(255,255,255,.026);
}

.usage-guide strong,
.usage-guide span {
  display: block;
}

.usage-guide strong {
  color: var(--text);
  font-size: 12px;
}

.usage-guide span {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
}

.expanded-guide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  background: rgba(255,255,255,.032);
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-title-row .title,
.panel-title-row .text {
  margin: 0;
}

.learning-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.learning-stats div,
.certificate-meta {
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  background: rgba(7, 16, 29, .36);
}

.learning-stats strong,
.learning-stats span,
.certificate-meta span {
  display: block;
}

.learning-stats strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.learning-stats span,
.certificate-meta span {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
}

.certificate-meta {
  display: grid;
  gap: 6px;
}

.discussion-panel {
  overflow: hidden;
}

.discussion-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discussion-heading-icon,
.discussion-empty > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(53, 209, 196, .28);
  border-radius: 13px;
  color: #70e7dd;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(145deg, rgba(42, 191, 222, .17), rgba(43, 211, 164, .08));
}

.discussion-count {
  padding: 6px 11px;
  border: 1px solid rgba(125, 153, 190, .2);
  border-radius: 999px;
  color: var(--sub);
  font-size: 12px;
  background: rgba(15, 28, 45, .65);
}

.discussion-composer {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(72, 206, 213, .18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 39, 59, .78), rgba(10, 23, 38, .76));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.discussion-composer-head,
.discussion-composer-footer,
.discussion-item-head,
.discussion-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.discussion-type-field {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--sub);
  font-size: 12px;
}

.discussion-type-field .select {
  min-width: 126px;
  height: 38px;
  border-color: rgba(69, 207, 213, .22);
  background-color: rgba(10, 22, 37, .82);
}

.discussion-chapter-tag {
  overflow: hidden;
  max-width: 62%;
  padding: 6px 10px;
  border-radius: 9px;
  color: #a8b9d0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255,255,255,.035);
}

.discussion-textarea {
  min-height: 104px;
  resize: vertical;
  border-color: rgba(115, 146, 184, .24);
  background: rgba(7, 16, 29, .62);
}

.discussion-textarea:focus {
  border-color: rgba(42, 207, 211, .7);
  box-shadow: 0 0 0 3px rgba(42, 207, 211, .08);
}

.discussion-composer-footer {
  color: var(--sub);
  font-size: 12px;
}

.discussion-composer-footer b {
  color: #79ddd8;
  font-weight: 700;
}

.discussion-submit {
  min-width: 112px;
  height: 40px;
  border-radius: 11px;
}

.discussion-verify-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px dashed rgba(235, 181, 73, .28);
  border-radius: 12px;
  background: rgba(235, 181, 73, .055);
}

.discussion-verify-tip strong,
.discussion-verify-tip span {
  display: block;
}

.discussion-verify-tip span {
  margin-top: 5px;
  color: var(--sub);
  font-size: 12px;
}

.discussion-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.discussion-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: rgba(7, 16, 29, .34);
}

.discussion-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #071421;
  font-weight: 900;
  background: linear-gradient(135deg, #38c9ee, #30d5a7);
}

.discussion-item-body {
  min-width: 0;
}

.discussion-item-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discussion-item-head time,
.discussion-item-foot,
.discussion-item-foot > span {
  color: var(--sub);
  font-size: 12px;
}

.discussion-type {
  padding: 2px 7px;
  border-radius: 999px;
  color: #58d8e8;
  font-size: 11px;
  background: rgba(49, 196, 226, .1);
}

.discussion-type.comment {
  color: #6be1b4;
  background: rgba(60, 215, 163, .1);
}

.discussion-item p {
  margin: 10px 0 12px;
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.discussion-link {
  border: 0;
  padding: 2px 4px;
  color: var(--sub);
  font-size: 12px;
  background: none;
  cursor: pointer;
}

.discussion-link:hover { color: #69e1dc; }
.discussion-link.danger:hover { color: var(--danger); }

.discussion-empty {
  display: grid;
  justify-items: center;
  padding: 28px 16px;
  border: 1px dashed rgba(118, 149, 184, .18);
  border-radius: 14px;
  color: var(--sub);
  text-align: center;
  background: rgba(7, 16, 29, .22);
}

.discussion-empty strong { margin-top: 10px; color: var(--text); }
.discussion-empty p { margin: 5px 0 0; font-size: 12px; }

.action-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-prompts {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--sub);
  font-size: 12px;
}

.tool-usage-hints {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tool-usage-hints > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.026);
}

.tool-usage-hints strong,
.tool-usage-hints span,
.tool-usage-hints code {
  display: block;
}

.tool-usage-hints strong {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 12px;
}

.tool-usage-hints span,
.tool-usage-hints code {
  color: var(--sub);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--sub);
  font-size: 13px;
}

.list {
  display: grid;
  gap: 9px;
}

.list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,.032);
  text-align: left;
}

.list-item strong {
  display: block;
  font-size: 14px;
}

.list-item span {
  display: block;
  color: var(--sub);
  font-size: 12px;
  margin-top: 4px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.profile-card {
  min-height: 100%;
}

.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-card-head h3 {
  margin: 0;
  font-size: 18px;
}

.profile-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
}

.profile-key {
  margin: 18px 0 8px;
  color: var(--text);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0;
}

.profile-tabs {
  display: flex;
  gap: 8px;
  margin: 14px 0;
  overflow-x: auto;
}

.profile-tab {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--sub);
  background: rgba(255, 255, 255, .035);
  font-weight: 800;
  white-space: nowrap;
}

.profile-tab.active {
  color: #03111a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.profile-tab-panel {
  margin-top: 0;
}

.profile-desktop-history {
  display: none;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.permission-item,
.profile-activity-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,.032);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.permission-item {
  min-height: 94px;
  padding: 12px;
}

.permission-item:hover,
.profile-activity-item:hover {
  transform: translateY(-4px);
  border-color: rgba(49, 198, 244, .38);
  background: rgba(49, 198, 244, .09);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}

.permission-item.enabled {
  border-color: rgba(43, 214, 158, .28);
}

.permission-item.disabled {
  border-color: rgba(245, 174, 75, .25);
  background: rgba(245, 174, 75, .045);
}

.permission-item strong,
.permission-item span,
.permission-item em {
  display: block;
}

.permission-item span {
  margin-top: 6px;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
}

.permission-item em {
  margin-top: 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.permission-item em.ok {
  color: var(--green);
}

.permission-item em.warn {
  color: var(--amber);
}

.profile-activity-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.profile-activity-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px;
}

.profile-activity-type {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  border: 1px solid rgba(39, 216, 162, .28);
  border-radius: 999px;
  color: var(--green);
  background: rgba(39, 216, 162, .08);
  font-size: 12px;
  font-weight: 800;
}

.profile-activity-item strong,
.profile-activity-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-activity-item em {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  font-style: normal;
}

.profile-activity-item b {
  color: var(--cyan);
  font-size: 12px;
  white-space: nowrap;
}

.video-player {
  aspect-ratio: 16 / 9;
  min-height: 320px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(2, 6, 23, .98), rgba(14, 25, 44, .94)),
    repeating-linear-gradient(0deg, rgba(49,198,244,.08) 0 1px, transparent 1px 28px);
}

.video-el {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: #020617;
}

.bilibili-player {
  display: block;
  border: 0;
}

.player-poster {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.player-poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, .04), rgba(2, 6, 23, .20));
  z-index: 1;
}

.video-player .watermark {
  z-index: 3;
}

.player-controls {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(120px, 1fr) auto auto;
  gap: 9px;
  align-items: center;
  padding: 12px 0 0;
  color: var(--sub);
  font-size: 12px;
}

.video-speed {
  min-width: 86px;
}

.seek {
  width: 100%;
  accent-color: var(--cyan);
}

.play-btn {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(255,255,255,.08);
  font-size: 26px;
  z-index: 4;
}

.console {
  min-height: 380px;
  display: grid;
  grid-template-rows: minmax(220px, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #07101d;
  overflow: hidden;
}

.console-log,
.codebox {
  padding: 15px;
  color: #c3d2e9;
  font-family: Consolas, Monaco, monospace;
  line-height: 1.65;
  font-size: 13px;
  white-space: pre-wrap;
  overflow: auto;
}

.agent-output pre {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.agent-images,
.agent-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.agent-images a,
.agent-media-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}

.agent-images img,
.agent-media-card img,
.agent-media-card video {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.agent-media-card .btn,
.agent-media-card .row {
  margin: 10px;
}

.agent-files {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.agent-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agent-call-modal {
  width: min(760px, calc(100vw - 32px));
}

.agent-call-output {
  min-height: 180px;
  max-height: 56vh;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 16, 29, .84);
}

.share-modal {
  width: min(560px, calc(100vw - 32px));
}

.share-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.share-link-box {
  padding: 12px;
  border: 1px solid rgba(49, 198, 244, .34);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(49, 198, 244, .08);
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.prompt-box {
  display: flex;
  gap: 9px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.035);
}

.field,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,.045);
  outline: none;
}

.field,
.select {
  height: 38px;
  padding: 0 11px;
}

.password-input-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-input-wrap .field {
  padding-right: 50px;
}

.password-input-wrap input::-ms-reveal,
.password-input-wrap input::-ms-clear {
  display: none;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 40px;
  height: 32px;
  padding: 0;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #9eb3cb;
  background: transparent;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.password-toggle:hover,
.password-toggle.is-visible {
  color: #79f2df;
  border-color: rgba(49, 198, 244, .28);
  background: rgba(49, 198, 244, .10);
}

.password-toggle:focus-visible {
  outline: none;
  color: #79f2df;
  border-color: rgba(121, 242, 223, .82);
  box-shadow: 0 0 0 3px rgba(39, 216, 162, .16);
}

.password-eye {
  position: absolute;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-eye-hide,
.password-toggle.is-visible .password-eye-show {
  display: none;
}

.password-toggle.is-visible .password-eye-hide {
  display: block;
}

/* Keep every native dropdown readable on Windows/Chromium and visually
   distinct from plain text inputs. The popup itself uses a light palette so
   native option text never becomes light-on-light. */
select.field,
select.select {
  color-scheme: light;
  appearance: none;
  -webkit-appearance: none;
  height: 42px;
  padding: 0 46px 0 14px;
  border-color: rgba(49, 198, 244, .68);
  color: #f7fbff;
  background-color: #123754;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5 7.5 5 5 5-5' stroke='%2379f2df' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(39, 216, 162, .08);
  font-weight: 650;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

select.field:hover,
select.select:hover {
  border-color: rgba(80, 229, 213, .9);
  background-color: #174464;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 3px rgba(49, 198, 244, .08);
}

select.field:focus,
select.select:focus,
select.field:focus-visible,
select.select:focus-visible {
  border-color: #55ead4;
  background-color: #174767;
  box-shadow: 0 0 0 3px rgba(39, 216, 162, .18), 0 8px 24px rgba(0, 0, 0, .2);
}

select.field option,
select.select option,
select.field optgroup,
select.select optgroup {
  color: #10283d;
  background: #f2fbff;
  -webkit-text-fill-color: #10283d;
  font-weight: 600;
}

select.field option:checked,
select.select option:checked {
  color: #063b3e;
  background: #bdf3e9;
  font-weight: 800;
}

select.field:disabled,
select.select:disabled {
  border-color: rgba(157, 172, 197, .28);
  color: #9fb1c6;
  background-color: #182b40;
  background-image: none;
  box-shadow: none;
  cursor: not-allowed;
  opacity: .78;
}

select.compact-select {
  height: 38px;
  padding-left: 12px;
}

.btn.danger {
  color: var(--red);
  border-color: rgba(240, 109, 127, .34);
  background: rgba(240, 109, 127, .10);
}

.textarea {
  min-height: 112px;
  padding: 10px 11px;
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  vertical-align: middle;
}

th {
  color: var(--sub);
  background: rgba(255,255,255,.035);
}

td {
  color: #dde8f8;
}

.table-wrap {
  overflow-x: auto;
}

.admin-user-sections {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.admin-overview {
  display: grid;
  gap: 14px;
}

.admin-tabs {
  position: sticky;
  top: 88px;
  z-index: 18;
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 19, 33, .94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
  backdrop-filter: blur(16px);
  scrollbar-width: thin;
}

.admin-tab {
  flex: 1 0 auto;
  min-width: 132px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--sub);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
}

.admin-tab:hover {
  color: #effaff;
  border-color: rgba(49, 198, 244, .26);
  background: rgba(49, 198, 244, .07);
}

.admin-tab.active {
  color: #061722;
  border-color: rgba(83, 232, 211, .72);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 8px 22px rgba(39, 216, 162, .18);
}

.admin-tab-count {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(49, 198, 244, .14);
  font-size: 12px;
}

.admin-tab-count.pending {
  color: #ffd38c;
  background: rgba(245, 174, 75, .16);
}

.admin-tab.active .admin-tab-count {
  color: #06202a;
  background: rgba(2, 20, 29, .16);
}

.admin-workspace {
  min-height: 560px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012));
}

.admin-module {
  display: grid;
  gap: 16px;
}

.admin-module-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-module-heading h2,
.admin-module-heading h3 {
  margin: 3px 0 0;
}

.admin-module-heading h2 {
  font-size: 23px;
}

.admin-module-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--sub);
  line-height: 1.55;
  text-align: right;
}

.admin-eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}

.admin-summary-grid {
  margin-top: 0;
}

.admin-todo-card {
  margin-top: 0;
}

.admin-todo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.admin-todo-item {
  min-height: 128px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 5px 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: #e8f4ff;
  background: rgba(255,255,255,.025);
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}

.admin-todo-item:hover {
  transform: translateY(-2px);
  border-color: rgba(49, 198, 244, .46);
  background: rgba(49, 198, 244, .06);
}

.admin-todo-item.is-pending {
  border-color: rgba(245, 174, 75, .4);
  background: linear-gradient(135deg, rgba(245, 174, 75, .09), rgba(255,255,255,.02));
}

.admin-todo-item span {
  font-weight: 800;
}

.admin-todo-item strong {
  grid-row: span 2;
  align-self: center;
  color: var(--cyan);
  font-size: 34px;
}

.admin-todo-item.is-pending strong {
  color: #ffc66e;
}

.admin-todo-item small {
  color: var(--sub);
  line-height: 1.45;
}

.admin-secondary-panel {
  margin-top: 2px;
}

.admin-operations-grid {
  align-items: start;
}

.admin-user-panel {
  border-color: rgba(255, 255, 255, .12);
}

.admin-user-panel.authorized {
  border-color: rgba(43, 214, 158, .28);
}

.admin-user-panel.pending {
  border-color: rgba(245, 174, 75, .28);
}

.admin-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.admin-panel-title strong {
  font-size: 16px;
}

.admin-panel-title span {
  min-width: 30px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(49, 198, 244, .12);
  font-weight: 800;
}

.authorized-row {
  background: rgba(43, 214, 158, .028);
}

.unauthorized-row {
  background: rgba(245, 174, 75, .026);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, .68);
  backdrop-filter: blur(10px);
}

.modal {
  width: min(430px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d1929;
  box-shadow: var(--shadow);
}

.field.invalid,
.field[aria-invalid="true"] {
  border-color: rgba(240, 109, 127, .82);
  box-shadow: 0 0 0 3px rgba(240, 109, 127, .12);
}

.field-error {
  min-height: 0;
  color: #ff9eac;
  font-size: 12px;
  line-height: 1.45;
}

.field-error:empty {
  display: none;
}

.registration-blocked {
  margin: 0;
}

.auth-modal .register-submit {
  position: sticky;
  bottom: 0;
  z-index: 1;
  box-shadow: 0 -10px 24px #0d1929, 0 10px 24px rgba(39, 216, 162, .12);
}

.captcha-field {
  display: grid;
  gap: 8px;
}

.captcha-field > label {
  color: var(--sub);
  font-size: 13px;
  font-weight: 700;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: stretch;
  gap: 10px;
}

.captcha-input {
  min-width: 0;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 17px;
  font-weight: 800;
}

.captcha-image-button {
  min-height: 52px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(65, 216, 211, .42);
  border-radius: 12px;
  background: #eaf9fa;
  color: #173d52;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.captcha-image-button:hover {
  border-color: #54e2d5;
  box-shadow: 0 0 0 3px rgba(53, 214, 204, .12);
  transform: translateY(-1px);
}

.captcha-image-button:focus-visible {
  outline: 3px solid rgba(63, 218, 209, .36);
  outline-offset: 2px;
}

.captcha-image-button:disabled {
  cursor: wait;
  opacity: .75;
}

.captcha-image-button img {
  display: block;
  width: 100%;
  height: 52px;
  object-fit: cover;
}

.captcha-image-button span {
  display: grid;
  min-height: 52px;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}

.guide-modal {
  width: min(760px, 100%);
}

.course-manager-modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.course-manager-body {
  display: grid;
  gap: 14px;
  padding: 15px;
}

.course-manager-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.course-manager-actions p {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
}

.chapter-admin-list {
  display: grid;
  gap: 9px;
}

.chapter-admin-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}

.chapter-admin-index {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.chapter-admin-main {
  min-width: 0;
}

.chapter-admin-main strong,
.chapter-admin-main span,
.chapter-admin-main em {
  display: block;
}

.chapter-admin-main span,
.chapter-admin-main em {
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
  font-style: normal;
}

.chapter-edit-backdrop {
  z-index: 90;
}

.chapter-edit-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-modal {
  transform-origin: center;
}

.auth-modal.auth-success {
  border-color: rgba(39, 216, 162, .48);
  box-shadow: 0 22px 70px rgba(39, 216, 162, .14), var(--shadow);
  animation: auth-confirm .62s cubic-bezier(.2, 1.1, .25, 1);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-head span {
  display: block;
  margin-top: 4px;
  color: var(--sub);
  font-size: 12px;
}

.guide-body {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.guide-body .usage-guide {
  margin-top: 0;
}

.guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.form {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.form label {
  display: grid;
  gap: 6px;
  color: var(--sub);
  font-size: 13px;
}

.form label.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px 2px;
  line-height: 1.5;
}

.form label.checkline input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--green);
}

.auth-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.text-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.password-reset-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

@media (max-width: 520px) {
  .password-reset-code-row {
    grid-template-columns: 1fr;
  }
}

.auth-feedback {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(39, 216, 162, .34);
  border-radius: var(--radius);
  color: var(--text);
  background: linear-gradient(135deg, rgba(39, 216, 162, .13), rgba(49, 198, 244, .08));
  animation: auth-feedback-in .26s ease-out;
}

.auth-feedback div {
  display: grid;
  gap: 2px;
}

.auth-feedback strong {
  font-size: 14px;
}

.auth-feedback span:last-child {
  color: var(--sub);
  font-size: 12px;
}

.auth-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #05131c;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-size: 12px;
  font-weight: 800;
  animation: auth-mark-pop .42s ease-out;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(49, 198, 244, .32);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(12, 22, 38, .96);
  box-shadow: var(--shadow);
}

.agent-task-progress {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(45, 212, 191, 0.38);
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.1);
}

.agent-task-progress strong { color: #5eead4; }
.agent-task-progress span { color: var(--muted); font-size: 13px; }
.agent-task-path { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; border-top: 1px solid rgba(94, 234, 212, 0.18); }
.agent-task-path b { color: #f8fafc; font-size: 14px; }
.agent-task-list { display: grid; gap: 12px; }
.agent-task-row { align-items: center; }
.agent-task-row > div:first-child { min-width: 0; display: grid; gap: 5px; }
.agent-task-row small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 720px) {
  .agent-task-path { align-items: stretch; flex-direction: column; }
  .agent-task-row { align-items: stretch; }
  .agent-task-row .mini-actions { width: 100%; }
  .agent-task-row .mini-actions .btn { flex: 1; }
}

@keyframes auth-confirm {
  0% { transform: scale(.985); }
  38% { transform: scale(1.018); }
  68% { transform: scale(.996); }
  100% { transform: scale(1); }
}

@keyframes auth-feedback-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-mark-pop {
  0% { transform: scale(.72); }
  58% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--sub);
  text-align: center;
}

.state-empty {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 132px;
}

.state-empty strong {
  color: var(--text);
  font-size: 15px;
}

.state-empty span {
  color: var(--sub);
  font-size: 13px;
}

.small-empty {
  padding: 10px;
  font-size: 12px;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.resource-rail {
  position: sticky;
  top: 96px;
}

.rail-head,
.resource-title,
.upload-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.resource-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.resource-title {
  margin-bottom: 9px;
  color: var(--sub);
  font-size: 13px;
}

.resource-title strong {
  color: var(--text);
  font-size: 14px;
}

.resource-title span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(49, 198, 244, .10);
  font-size: 12px;
}

.resource-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.resource-management-grid > .card {
  min-height: 260px;
}

.resource-management-grid > .resource-card-wide {
  grid-column: 1 / -1;
}

.resource-card-wide .resource-row strong {
  max-width: min(620px, 52vw);
}

.resource-card-wide .resource-row em {
  max-width: 760px;
}

.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}

.resource-row.with-cover {
  align-items: stretch;
  justify-content: flex-start;
}

.course-manage-row {
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.course-manage-row:hover,
.course-manage-row:focus-visible {
  border-color: rgba(49, 198, 244, .5);
  background: rgba(49, 198, 244, .06);
  outline: none;
}

.resource-row.with-cover > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.resource-cover {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: rgba(49, 198, 244, .08);
}

.resource-cover.placeholder {
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-weight: 900;
}

.resource-row strong {
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-row span {
  display: block;
  margin-top: 3px;
  color: var(--sub);
  font-size: 12px;
}

.resource-row em {
  display: block;
  max-width: 260px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.btn.warn {
  border-color: rgba(245, 174, 75, .48);
  color: #ffd08a;
  background: rgba(245, 174, 75, .08);
}

.btn.ok {
  border-color: rgba(43, 214, 158, .48);
  color: #7af1c5;
  background: rgba(43, 214, 158, .08);
}

.pending-delete-row {
  border-color: rgba(246, 91, 111, .42);
  background: rgba(246, 91, 111, .07);
}

.offline-resource-row {
  border-color: rgba(245, 174, 75, .32);
  background: rgba(245, 174, 75, .045);
  opacity: .82;
}

.confirm-backdrop {
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(8px);
}

.confirm-modal {
  width: min(440px, calc(100vw - 32px));
  border-color: rgba(49, 198, 244, .28);
  background:
    linear-gradient(180deg, rgba(18, 31, 51, .98), rgba(8, 16, 29, .98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52), 0 0 0 1px rgba(49, 198, 244, .08);
}

.confirm-text {
  padding: 0 18px 4px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
}

.upload-forms {
  grid-template-columns: 1fr;
}

.compact-grid {
  margin-top: 10px;
}

.compact-textarea {
  min-height: 86px;
  margin-top: 10px;
}

.upload-file-label {
  margin-top: 10px;
}

.mini-label {
  display: grid;
  gap: 6px;
  color: var(--sub);
  font-size: 12px;
}

.field-help {
  margin: 8px 0 0;
  color: var(--sub);
  font-size: 12px;
  line-height: 1.55;
}

.upload-file-saved {
  color: var(--green);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--sub);
  font-size: 13px;
}

.replace-check {
  padding: 9px 10px;
  border: 1px solid rgba(240, 184, 74, .28);
  border-radius: var(--radius);
  color: #f0c36a;
  background: rgba(240, 184, 74, .07);
}

.upload-status {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
}

.upload-status.ok {
  border-color: rgba(39, 216, 162, .28);
  background: rgba(39, 216, 162, .07);
}

.upload-status.warn {
  border-color: rgba(244, 184, 74, .30);
  background: rgba(244, 184, 74, .07);
}

.upload-status.bad {
  border-color: rgba(240, 109, 127, .32);
  background: rgba(240, 109, 127, .08);
}

.upload-status-line {
  margin-bottom: 8px;
  color: var(--sub);
  font-size: 12px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width .18s ease;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 12px 12px calc(94px + env(safe-area-inset-bottom));
  }

  .topbar {
    top: 0;
  }

  .mobile-tabbar {
    display: grid;
  }

  .mobile-admin-strip {
    display: flex;
  }

  .cols-4,
  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .upload-layout {
    grid-template-columns: 1fr;
  }

  .resource-rail {
    position: static;
  }

  .admin-filter-bar {
    align-items: stretch;
  }

  .admin-tabs {
    top: 82px;
  }

  .admin-tab {
    flex: 0 0 auto;
  }

  .admin-todo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .tool-usage-hints {
    grid-template-columns: 1fr;
  }
  html {
    -webkit-text-size-adjust: 100%;
  }

  .main {
    padding: 10px 10px 96px;
  }

  .page {
    padding-bottom: 28px;
  }

  .topbar,
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
  }

  .product-status-panel {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .product-status-panel h2 {
    font-size: 19px;
  }

  .status-actions {
    grid-template-columns: 1fr;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-actions .btn {
    width: 100%;
  }

  .top-actions .btn:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-actions .btn:nth-child(3) {
    grid-column: 1 / -1;
  }

  .field,
  .textarea,
  .select,
  .search input,
  input,
  textarea,
  select {
    font-size: 16px;
  }

  .btn,
  .btn.small {
    min-height: 44px;
    padding: 9px 12px;
  }

  .search-wrap {
    max-width: none;
  }

  .search {
    min-height: 52px;
  }

  .search-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .search-meta {
    display: none;
  }

  .cols-2,
  .cols-3,
  .cols-4 {
    grid-template-columns: 1fr;
  }

  .filter-inline {
    display: none;
  }

  .mobile-filter-row {
    display: flex;
  }

  .mobile-filter-backdrop {
    display: grid;
  }

  .filter-bar,
  .filter-bar label,
  .filter-bar .btn,
  .compact-select {
    width: 100%;
  }

  .filter-bar {
    align-items: stretch;
  }

  .admin-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .video-player {
    min-height: 220px;
  }

  .player-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .player-controls .seek {
    flex: 1 0 100%;
    order: -1;
  }

  .player-controls .btn {
    flex: 1 1 calc(33.333% - 8px);
  }

  .player-controls .video-speed {
    flex: 1 1 100%;
  }

  .expanded-guide,
  .learning-stats {
    grid-template-columns: 1fr;
  }

  .panel-title-row,
  .action-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .discussion-composer-head,
  .discussion-composer-footer,
  .discussion-verify-tip,
  .discussion-item-head,
  .discussion-item-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .discussion-chapter-tag {
    max-width: 100%;
  }

  .discussion-type-field {
    justify-content: space-between;
  }

  .discussion-submit,
  .discussion-verify-tip .btn {
    width: 100%;
  }

  .prompt-box {
    flex-direction: column;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .profile-activity-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .profile-activity-item b {
    display: none;
  }

  .profile-tabs {
    position: sticky;
    top: 82px;
    z-index: 18;
    margin-inline: -2px;
    padding: 4px 2px;
    background: rgba(7, 16, 29, .88);
    backdrop-filter: blur(14px);
  }

  .profile-tab {
    flex: 1 0 auto;
    text-align: center;
  }

  .profile-key {
    font-size: 28px;
  }

  .permission-item,
  .profile-activity-item {
    min-height: 72px;
  }

  .admin-user-panel {
    overflow: visible;
  }

  .admin-tabs {
    top: 78px;
    margin-inline: -2px;
    padding: 6px;
    border-radius: 12px;
  }

  .admin-tab {
    min-width: auto;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .admin-workspace {
    min-height: 0;
    padding: 12px;
    border-radius: 13px;
  }

  .admin-module-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .admin-module-heading p {
    text-align: left;
  }

  .admin-todo-item {
    min-height: 104px;
  }

  .admin-user-panel table,
  .admin-user-panel thead,
  .admin-user-panel tbody,
  .admin-user-panel tr,
  .admin-user-panel th,
  .admin-user-panel td {
    display: block;
    width: 100%;
  }

  .admin-user-panel thead {
    display: none;
  }

  .admin-user-panel tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .admin-user-panel tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .032);
    overflow: hidden;
  }

  .admin-user-panel td {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 36px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  .admin-user-panel td:last-child {
    border-bottom: 0;
  }

  .admin-user-panel td::before {
    content: attr(data-label);
    color: var(--sub);
    font-size: 12px;
    font-weight: 800;
  }

  .modal-backdrop {
    align-items: end;
    place-items: end stretch;
    padding: 0;
  }

  .modal,
  .share-modal,
  .agent-call-modal {
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 18px 18px 0 0;
  }

  .chapter-admin-row {
    grid-template-columns: 1fr auto;
  }

  .chapter-admin-index {
    grid-column: 1 / -1;
  }

  .course-manager-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .confirm-modal {
    width: 100%;
  }
}

/* Mobile-first usability pass: compact navigation, thumb-friendly controls,
   readable cards and bottom-sheet workflows on real phone widths. */
@media (max-width: 760px) {
  :root { --radius: 14px; --shadow: 0 10px 30px rgba(0, 0, 0, .22); }

  html, body {
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  body {
    background: radial-gradient(circle at 50% 0, rgba(49, 198, 244, .10), transparent 310px), var(--bg);
  }

  .main {
    width: 100%;
    padding: 0 12px calc(94px + env(safe-area-inset-bottom));
  }

  .captcha-row {
    grid-template-columns: minmax(0, 1fr) 138px;
    gap: 8px;
  }

  .captcha-image-button img,
  .captcha-image-button span {
    height: 50px;
    min-height: 50px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    margin-inline: -12px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 9px;
    border-width: 0 0 1px;
    border-radius: 0;
    background: rgba(7, 16, 29, .96);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
  }

  .search-wrap, .search { width: 100%; max-width: none; }
  .search { min-height: 46px; border-radius: 13px; }

  .search-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    top: calc(58px + env(safe-area-inset-top));
    max-height: min(62dvh, 520px);
    overflow-y: auto;
    border-radius: 16px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .topbar.user-session .top-actions { grid-template-columns: minmax(0, 1fr) 84px; }

  .top-actions .btn,
  .top-actions .btn:first-child,
  .top-actions .btn:nth-child(3) {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 7px 6px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-admin-strip {
    margin: 10px -12px 0;
    padding: 0 12px 4px;
    scrollbar-width: none;
  }

  .mobile-admin-strip::-webkit-scrollbar,
  .mobile-scroll::-webkit-scrollbar,
  .profile-tabs::-webkit-scrollbar,
  .chips::-webkit-scrollbar { display: none; }

  .page { padding: 18px 0 26px; }

  .page-head {
    gap: 12px;
    margin: 5px 0 16px;
  }

  .page-head h1 {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.18;
    letter-spacing: -.02em;
  }

  .page-head p {
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.65;
  }

  .page-head .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .page-head .toolbar:empty { display: none; }
  .page-head .toolbar .btn:only-child,
  .page-head .toolbar .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

  .grid, .split, .upload-layout, .resource-management-grid { gap: 12px; }
  .card { border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
  .card-body { padding: 14px; }
  .cover, .workflow-demo { min-height: 0; aspect-ratio: 16 / 9; }
  .cover strong { font-size: 19px; }
  .title { font-size: 17px; line-height: 1.4; }
  .text { font-size: 14px; line-height: 1.65; }

  .card-body > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  .card-body > .row > span:first-child { line-height: 1.55; }

  .card-body > .row .mini-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .card-body > .row .mini-actions .btn,
  .card-body > .row > .btn { width: 100%; }

  .chips {
    flex-wrap: nowrap;
    margin-inline: -2px;
    padding: 0 2px 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .chips > * { flex: 0 0 auto; }

  .mobile-filter-row {
    margin: 4px 0 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
  }

  .mobile-filter-row > span {
    min-width: 0;
    overflow: hidden;
    color: var(--sub);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-filter-backdrop { z-index: 90; align-items: end; }

  .mobile-filter-sheet {
    width: 100%;
    max-height: min(82dvh, 620px);
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 22px 22px 0 0;
  }

  .filter-bar { gap: 12px; margin: 0; padding: 4px 14px 16px; }

  .field, .select, select.field, select.select {
    min-height: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .textarea { min-height: 132px; border-radius: 12px; }

  .form label.checkline,
  .agreement-box .checkline {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 8px 4px;
    line-height: 1.55;
  }

  .form label.checkline input[type="checkbox"],
  .agreement-box input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin: 0;
    accent-color: var(--green);
  }

  .btn, .btn.small {
    min-height: 44px;
    border-radius: 12px;
    touch-action: manipulation;
  }

  .video-player {
    width: calc(100% + 24px);
    min-height: 0;
    margin-inline: -12px;
    border-inline: 0;
    border-radius: 0;
  }

  .player-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 10px;
  }

  .player-controls .seek {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 32px;
  }

  .player-controls #video-current,
  .player-controls #video-duration { display: none; }

  .player-controls .video-speed { grid-column: 1 / -1; width: 100%; }

  .course-tree-chapter { padding: 9px; border-radius: 14px; }
  .list-item, .course-tree-section { min-height: 68px; padding: 12px; border-radius: 12px; }

  .discussion-item {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .discussion-avatar { width: 34px; height: 34px; }

  .profile-tabs {
    position: static;
    margin-inline: -12px;
    padding: 2px 12px 5px;
    scroll-padding-inline: 12px;
    scrollbar-width: none;
  }

  .profile-tab { min-height: 44px; }
  .resource-management-grid > .card { min-height: 0; }

  .resource-card-wide .resource-row strong,
  .resource-card-wide .resource-row em,
  .resource-row strong,
  .resource-row em { max-width: none; }

  .resource-row.with-cover {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 11px;
    padding: 12px;
  }

  .resource-cover {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 12px;
  }

  .resource-row strong, .resource-row em {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .resource-row.with-cover > .mini-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding-top: 2px;
  }

  .resource-row.with-cover > .mini-actions .btn { width: 100%; }

  .chapter-admin-row { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .chapter-admin-index { grid-column: auto; }

  .chapter-admin-row .mini-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .modal-backdrop, .confirm-backdrop {
    align-items: end;
    place-items: end stretch;
    padding: 0;
  }

  .modal, .guide-modal, .course-manager-modal, .chapter-edit-modal,
  .legal-modal, .share-modal, .agent-call-modal, .confirm-modal {
    width: 100%;
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top)));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 13px 14px;
    background: rgba(13, 25, 41, .97);
    backdrop-filter: blur(16px);
  }

  .form, .guide-body, .course-manager-body,
  .share-body, .legal-content { padding-inline: 14px; }

  .confirm-actions, .share-actions, .guide-actions, .course-manager-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .confirm-actions .btn, .share-actions .btn,
  .guide-actions .btn, .course-manager-actions .btn { width: 100%; }

  .table-wrap {
    max-width: 100%;
    border-radius: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .log-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .log-table table, .log-table thead, .log-table tbody,
  .log-table tr, .log-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .log-table thead { display: none; }
  .log-table tbody { display: grid; gap: 10px; }

  .log-table tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
  }

  .log-table td {
    display: grid;
    grid-template-columns: minmax(86px, .34fr) minmax(0, 1fr);
    gap: 10px;
    min-height: 40px;
    padding: 9px 11px;
    overflow-wrap: anywhere;
  }

  .log-table td::before {
    content: attr(data-label);
    color: var(--sub);
    font-size: 12px;
    font-weight: 800;
  }

  .site-footer {
    display: grid;
    gap: 12px;
    margin: 24px 0 12px;
    padding: 18px 4px 8px;
    text-align: center;
  }

  .site-footer span:last-child { justify-content: center; gap: 10px 14px; }

  .mobile-tabbar {
    gap: 3px;
    padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
    border-color: rgba(157, 172, 197, .24);
    background: rgba(6, 14, 26, .97);
    box-shadow: 0 -10px 34px rgba(0, 0, 0, .32);
  }

  .mobile-tabbar .nav-btn {
    position: relative;
    min-height: 56px;
    padding: 6px 2px;
    border-radius: 12px;
    font-size: 11px;
  }

  .mobile-tabbar .nav-btn.active {
    border-color: rgba(49, 198, 244, .34);
    background: linear-gradient(180deg, rgba(49, 198, 244, .15), rgba(39, 216, 162, .07));
  }

  .mobile-tabbar .nav-btn.active::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 50%;
    width: 20px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    transform: translateX(-50%);
  }

  .mobile-tabbar .nav-icon { width: 25px; height: 25px; font-size: 11px; }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    max-width: none;
    border-radius: 14px;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .main { padding-inline: 9px; }
  .topbar { margin-inline: -9px; padding-inline: 9px; }
  .top-actions .btn,
  .top-actions .btn:first-child,
  .top-actions .btn:nth-child(3) { font-size: 11px; }
  .mobile-tabbar .nav-btn { font-size: 10px; }
  .card-body { padding: 12px; }
}

@media (hover: none) and (pointer: coarse) {
  .lift-card:hover, .permission-item:hover,
  .profile-activity-item:hover, .btn:hover { transform: none; }

  .btn:active, .nav-btn:active, .lift-card:active { transform: scale(.985); }
}
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 20px 0 4px;
  padding: 12px 16px;
  color: var(--muted);
}

.pagination-bar .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .pagination-bar {
    justify-content: space-between;
    gap: 8px;
    padding-inline: 0;
  }

  .pagination-bar span {
    font-size: 12px;
    text-align: center;
  }
}
