:root {
  --bg: #ffffff;
  --soft: #f5f9fd;
  --soft-2: #eaf4fb;
  --ink: #13243a;
  --muted: #627189;
  --line: #d7e5f0;
  --brand: #0b5cad;
  --brand-2: #12324a;
  --accent: #22b8a8;
  --gold: #ffb020;
  --ok: #1f8a56;
  --shadow: 0 18px 46px rgba(18, 50, 74, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

.nav-inner,
.container,
.footer-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(215, 229, 240, 0.9);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 310px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--accent));
  border-radius: 8px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(11, 92, 173, 0.22);
}

.brand-title {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--brand-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav button {
  min-height: 38px;
  padding: 0 12px;
  background: transparent;
  color: #1f2a3d;
  border-radius: 4px;
  font-size: 15px;
}

.nav button:hover,
.nav button.active {
  background: #e9f7fb;
  color: var(--brand);
}

.hero {
  position: relative;
  height: clamp(360px, 44vw, 560px);
  overflow: hidden;
  background: #0b5cad;
}

.hero-carousel,
.hero-slide,
.hero-slide picture,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.45s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide picture {
  display: block;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(8, 38, 68, 0.84) 0%, rgba(8, 38, 68, 0.42) 39%, rgba(8, 38, 68, 0.02) 78%),
    linear-gradient(0deg, rgba(11, 92, 173, 0.18), rgba(11, 92, 173, 0.02));
}

.hero-title {
  position: absolute;
  z-index: 2;
  display: block;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: clamp(104px, 12vw, 154px);
  width: min(650px, calc(100% - 48px));
  color: #fff;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.12;
  font-weight: 800;
  text-shadow: 0 12px 32px rgba(0, 24, 50, 0.24);
}

.hero-copy {
  position: absolute;
  z-index: 2;
  display: block;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: clamp(58px, 7vw, 96px);
  width: min(620px, calc(100% - 48px));
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.75;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 28px;
  display: flex;
  gap: 9px;
}

.hero-dots button {
  width: 28px;
  height: 4px;
  padding: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.52);
}

.hero-dots button.active {
  background: var(--gold);
}

.pillar-band {
  position: relative;
  z-index: 2;
  margin-top: -38px;
  padding-bottom: 24px;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pillar-card {
  min-height: 138px;
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(215, 229, 240, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: left;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pillar-card:hover,
.pillar-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(34, 184, 168, 0.6);
  box-shadow: 0 22px 48px rgba(18, 50, 74, 0.14);
  outline: none;
}

.pillar-index {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent);
  font-weight: 900;
  font-size: 13px;
}

.pillar-card h3 {
  margin: 0 0 8px;
  color: var(--brand-2);
  font-size: 21px;
}

.pillar-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.admin-note {
  padding: 12px 14px;
  margin-bottom: 16px;
  color: #38506a;
  background: #f0f8fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.7;
}

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

.sub-panel {
  box-shadow: none;
  background: #fbfdff;
}

.sub-panel h4 {
  margin: 0 0 14px;
  color: var(--brand-2);
  font-size: 16px;
}

.hero-actions,
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #1177c8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.btn:hover {
  background: linear-gradient(135deg, #084f96, #0969b8);
}

.btn.secondary {
  color: var(--brand);
  background: #e8f6fb;
}

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.64);
  background: transparent;
}

.btn.danger {
  background: var(--accent);
}

.btn.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.section {
  padding: 60px 0;
}

.section.alt {
  background: linear-gradient(180deg, var(--soft), #fff);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: 30px;
  color: var(--brand-2);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.compact-head {
  align-items: center;
  margin-bottom: 16px;
}

.compact-head h2 {
  font-size: 24px;
}

.feature-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
}

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

.two-col {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.card,
.news-row,
.admin-panel,
.form-panel,
.lesson-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 50, 74, 0.06);
}

.course-card {
  overflow: hidden;
}

.thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #dbe8f6, #f5f8fc);
  position: relative;
  overflow: hidden;
}

.card-thumb-link {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  text-align: inherit;
}

.card-title-link,
.news-row-title-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-title-link:hover,
.news-row-title-link:hover {
  color: var(--brand);
}

.card-thumb-link:focus-visible,
.card-title-link:focus-visible,
.news-row-title-link:focus-visible {
  outline: 3px solid rgba(34, 184, 168, 0.55);
  outline-offset: 3px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-card .thumb::after {
  content: "课程视频";
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(11, 74, 134, 0.88);
  border-radius: 3px;
  font-size: 12px;
}

.news-thumb::after {
  display: none;
}

.content-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.content-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 184, 168, 0.45);
  box-shadow: 0 18px 40px rgba(18, 50, 74, 0.12);
}

.content-card-live,
.news-row-live {
  border-color: rgba(31, 138, 86, 0.32);
  background: linear-gradient(180deg, #f1fff8, #fff);
}

.content-card .meta {
  margin-bottom: 8px;
}

.content-card h3 {
  min-height: 54px;
}

.content-card-text {
  border-top: 4px solid var(--accent);
}

.content-card-text .card-body {
  min-height: 230px;
  display: flex;
  flex-direction: column;
}

.content-card-text .summary {
  flex: 1;
}

.content-card-text .btn {
  align-self: flex-start;
}

.race-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e3f7ed;
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
  white-space: nowrap;
}

.equipment-card .price {
  font-size: 13px;
}

.thumb:not(:has(img))::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./public/hero-youth-competition.png") center / cover no-repeat;
  opacity: 0.42;
}

.card-body {
  padding: 18px;
}

.card h3,
.news-row h3,
.admin-panel h3,
.form-panel h3 {
  margin: 0 0 10px;
  color: #16233a;
  font-size: 19px;
  line-height: 1.4;
}

.meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.summary {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 16px;
}

.price {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.price.is-free {
  color: #d43f2f;
}

.price.is-paid {
  color: var(--brand);
}

.progress-line {
  height: 7px;
  background: #e8eef5;
  border-radius: 99px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-line span {
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--ok);
}

.news-list {
  display: grid;
  gap: 14px;
}

.news-row {
  padding: 18px;
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 18px;
  align-items: center;
}

.date-box {
  height: 76px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: #e8f6fb;
  border-radius: 6px;
  text-align: center;
}

.date-box strong {
  display: block;
  font-size: 26px;
}

.date-box span {
  font-size: 13px;
}

.sidebar {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}

.hot-sidebar {
  background: #fff;
  border-color: transparent;
  padding: 10px 0;
}

.sidebar h3 {
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--brand-2);
}

.side-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: #2e3b50;
  line-height: 1.55;
  background: transparent;
  border-radius: 0;
}

.hot-sidebar .side-link {
  background: transparent !important;
  border-top-color: rgba(217, 226, 238, 0.7);
}

.side-link.active {
  color: var(--brand);
  font-weight: 700;
  background: transparent !important;
}

.article {
  background: #fff;
  border-top: 4px solid var(--accent);
  padding: 32px;
}

.article h1 {
  margin: 0 0 16px;
  font-size: 32px;
  color: var(--brand-2);
  line-height: 1.35;
}

.article-content {
  color: #2a3447;
  line-height: 2;
  font-size: 16px;
  white-space: normal;
}

.article-document-images {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 24px 0 28px;
  overflow: hidden;
  background: #fff;
}

.article-document-images img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  background: #fff;
}

.official-source {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.7;
}

.official-source strong {
  flex: 0 0 auto;
  color: var(--brand-2);
}

.official-source a {
  color: var(--brand);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-sidebar .side-link {
  display: grid;
  gap: 4px;
}

.related-sidebar .side-link strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.related-content-type {
  color: #168f83;
  font-size: 12px;
  font-weight: 700;
}

.related-content-empty {
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.article-pdf {
  width: 100%;
  margin: 24px 0 28px;
}

.pdf-document-pages {
  display: grid;
  gap: 18px;
}

.pdf-document-page {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d7e0ea;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 50, 74, 0.09);
}

.pdf-document-page img,
.pdf-document-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  background: #fff;
}

.pdf-document-page img {
  width: 100%;
}

.pdf-document-page.is-rendering {
  min-height: 180px;
}

.pdf-document-page.is-rendering canvas {
  opacity: 0;
}

.pdf-page-status,
.pdf-document-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

.pdf-page-status {
  position: absolute;
  inset: 0;
}

.pdf-document-loading {
  min-height: 116px;
  padding: 20px;
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  background: #f7fafc;
}

.pdf-loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(34, 184, 168, 0.12);
  animation: pdf-loading-pulse 1.3s ease-in-out infinite;
}

@keyframes pdf-loading-pulse {
  50% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

.pdf-inline-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d7e0ea;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  color: #40546c;
  background: #f7fafc;
}

.article-content p,
.article-content div,
.course-detail-content p,
.course-detail-content div {
  margin: 0 0 14px;
}

.article-content h2,
.article-content h3,
.course-detail-content h2,
.course-detail-content h3 {
  margin: 24px 0 12px;
  color: var(--brand-2);
  line-height: 1.45;
}

.article-content blockquote,
.course-detail-content blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 3px solid #27a89b;
  color: #52647a;
  background: #f4faf9;
}

.article-content ul,
.article-content ol,
.course-detail-content ul,
.course-detail-content ol {
  padding-left: 24px;
}

.article-content a,
.inline-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.topic-page {
  background: linear-gradient(180deg, #eef7fb 0, #f7fafc 300px, #fff 300px);
}

.topic-page-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 24px;
  padding: 30px;
  border: 1px solid #cfe1ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 50, 74, 0.08);
}

.topic-count-block {
  min-height: 126px;
  display: grid;
  place-content: center;
  text-align: center;
  border-right: 1px solid var(--line);
}

.topic-count-block strong {
  color: #fff;
  font-size: 54px;
  line-height: 1;
}

.topic-count-block span,
.topic-kicker {
  color: #168f83;
  font-size: 13px;
  font-weight: 800;
}

.topic-page-head h1 {
  margin: 8px 0 10px;
  color: var(--brand-2);
  font-size: 32px;
}

.topic-page-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.topic-competition-section {
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 50, 74, 0.06);
  overflow-x: auto;
}

.topic-list-head,
.topic-competition-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) minmax(180px, 1fr) minmax(130px, 0.7fr) minmax(210px, 0.9fr);
  gap: 18px;
  align-items: center;
}

.topic-list-head.extended,
.topic-competition-row.extended {
  grid-template-columns: minmax(250px, 1.65fr) minmax(110px, 0.7fr) minmax(125px, 0.75fr) minmax(190px, 1fr) minmax(220px, 1.35fr) minmax(190px, 0.9fr);
  gap: 14px;
  min-width: 1160px;
}

.topic-list-head {
  min-height: 48px;
  padding: 0 22px;
  color: #31415a;
  background: #eef4f8;
  font-size: 13px;
  font-weight: 800;
}

.topic-competition-row {
  min-height: 76px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  color: #334157;
  font-size: 14px;
}

.topic-competition-row:hover {
  background: #f8fcfd;
}

.topic-competition-name {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #14263f;
}

.topic-row-number {
  color: #11a99a;
  font-size: 12px;
  font-weight: 800;
}

.topic-category {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #0b6f67;
  background: #e5f7f3;
  font-size: 12px;
  font-weight: 700;
}

.topic-level {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.topic-level.national {
  color: #9b4a00;
  background: #fff0d8;
}

.topic-level.provincial {
  color: #0b5f96;
  background: #e3f2fb;
}

.topic-resource-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-resource-links button,
.topic-resource-links span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #bdd6e6;
  border-radius: 4px;
  color: var(--brand);
  background: #fff;
  font-size: 12px;
}

.topic-resource-links span {
  color: #8793a5;
  border-style: dashed;
}

.topic-article {
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
}

.registration-home-section {
  background: linear-gradient(180deg, #eff9f7, #f7fbfd);
  border-top: 1px solid #d6ebe8;
  border-bottom: 1px solid #d6ebe8;
}

.registration-card-grid {
  align-items: stretch;
}

.registration-card {
  overflow: hidden;
  border-top: 3px solid #13a897;
}

.registration-card .thumb::after {
  content: "参赛入口";
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 3px;
  color: #fff;
  background: rgba(8, 61, 91, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.registration-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.registration-state,
.registration-mode {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.registration-state.open {
  color: #087267;
  background: #dff7f1;
}

.registration-state.closed {
  color: #67758a;
  background: #edf1f5;
}

.registration-mode {
  color: #a65300;
  background: #fff0d8;
}

.registration-time {
  min-height: 42px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.registration-empty-entry {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px dashed #a9d6cf;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.registration-empty-entry strong {
  color: var(--brand-2);
}

.registration-empty-entry span {
  flex: 1;
  color: var(--muted);
}

.registration-page {
  min-height: 560px;
  background: linear-gradient(180deg, #eef8fb 0, #fff 360px);
}

.registration-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
  padding: 28px 30px;
  border: 1px solid #cfe1ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(18, 50, 74, 0.07);
}

.registration-page-head h1 {
  margin: 6px 0 8px;
  color: var(--brand-2);
  font-size: 32px;
}

.registration-page-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.registration-page-stat {
  min-width: 120px;
  display: grid;
  justify-items: center;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.registration-page-stat strong {
  color: #0e9f91;
  font-size: 44px;
  line-height: 1;
}

.registration-page-stat span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.registration-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  gap: 26px;
  align-items: start;
}

.registration-detail-info {
  border-radius: 8px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
}

.registration-cover {
  margin: -32px -32px 24px;
  overflow: hidden;
  border-radius: 5px 5px 0 0;
}

.registration-cover img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.registration-form-panel {
  position: sticky;
  top: 86px;
}

.registration-dynamic-form {
  display: grid;
  gap: 14px;
}

.registration-dynamic-form em,
.registration-radio-field em {
  margin-left: 4px;
  color: #c83a35;
  font-style: normal;
}

.registration-radio-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.registration-radio-field legend {
  margin-bottom: 8px;
  color: #31415a;
  font-size: 14px;
  font-weight: 700;
}

.registration-radio-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.registration-radio-options label,
.registration-consent {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #435268;
  font-size: 13px;
  line-height: 1.65;
}

.registration-radio-options label {
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.registration-radio-options input,
.registration-consent input {
  width: auto;
  margin-top: 3px;
}

.registration-success {
  padding: 20px;
  border: 1px solid #b7dfd6;
  border-radius: 6px;
  color: #26675f;
  background: #effbf8;
}

.registration-success strong {
  color: #087267;
  font-size: 18px;
}

.contact-shell {
  display: grid;
  gap: 24px;
}

.contact-image-frame {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef4fa;
  box-shadow: var(--shadow);
}

.contact-image-frame img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  object-fit: cover;
}

.contact-map-card {
  position: relative;
  min-height: 360px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 36px;
  color: var(--brand-2);
  text-align: center;
  text-decoration: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.98) 0 20%, rgba(255, 255, 255, 0.62) 20.3% 20.8%, transparent 21.1%),
    linear-gradient(135deg, rgba(51, 145, 219, 0.17), rgba(255, 255, 255, 0.92) 47%, rgba(26, 113, 189, 0.14)),
    #eaf4fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-map-card::before,
.contact-map-card::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(19, 109, 183, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.contact-map-card::before {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -62%);
}

.contact-map-card::after {
  width: 250px;
  height: 250px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
}

.contact-map-card:hover,
.contact-map-card:focus-visible {
  color: var(--brand-2);
  border-color: rgba(11, 92, 173, 0.42);
  box-shadow: 0 18px 38px rgba(15, 78, 130, 0.16);
  transform: translateY(-3px);
}

.contact-map-card:focus-visible {
  outline: 3px solid rgba(11, 92, 173, 0.24);
  outline-offset: 3px;
}

.contact-map-card > * {
  position: relative;
  z-index: 1;
}

.contact-map-icon {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1475bf, #0b4a86);
  border: 6px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 10px 22px rgba(11, 74, 134, 0.25);
  transform: rotate(-45deg);
}

.contact-map-icon i {
  width: 23px;
  height: 23px;
  display: block;
  background: #fff;
  border-radius: 50%;
}

.contact-map-label {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.contact-map-card strong {
  max-width: 330px;
  font-size: 21px;
  line-height: 1.45;
}

.contact-map-action {
  color: #557089;
  font-size: 14px;
}

.contact-map-action b {
  margin-left: 5px;
  color: var(--brand);
  font-size: 17px;
}

.empty-image {
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(11, 74, 134, 0.12), rgba(181, 29, 42, 0.05)),
    #eef4fa;
}

.empty-image strong {
  display: block;
  color: var(--brand-2);
  font-size: 22px;
}

.empty-image p {
  margin: 10px 0 0;
  color: var(--muted);
}

.contact-info {
  border-top-color: var(--accent);
}

.admin-image-preview {
  width: min(360px, 100%);
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--soft);
}

.admin-image-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pdf-upload-field {
  align-self: start;
}

.admin-pdf-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #cfe1ec;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #f5fafc;
}

.admin-pdf-current > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-pdf-current strong {
  overflow: hidden;
  color: var(--brand-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-pdf-current span {
  color: var(--muted);
  font-size: 12px;
}

.admin-pdf-current a {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.admin-pdf-current a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-pdf-remove {
  min-height: auto;
  margin: 0 0 10px;
  font-size: 13px;
}

.content-image-upload-field,
.related-content-editor {
  align-self: start;
}

.content-image-admin-list,
.related-content-admin-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.content-image-admin-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfd;
}

.content-image-admin-row img {
  display: block;
  width: 92px;
  height: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #dbe5ee;
  border-radius: 4px;
}

.content-image-admin-row > div:nth-child(2),
.related-content-admin-row > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.content-image-admin-row span,
.related-content-admin-row small {
  color: var(--muted);
  font-size: 12px;
}

.content-image-admin-actions,
.related-content-admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.related-content-admin-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfd;
}

.related-content-admin-row > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--brand);
  background: #e8f6fb;
  font-size: 12px;
  font-weight: 800;
}

.related-content-admin-row strong {
  overflow: hidden;
  color: var(--brand-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-content-picker {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .65fr) minmax(0, 1.35fr) auto;
  gap: 10px;
  align-items: end;
}

.detail-sidebar-stack {
  display: grid;
  align-content: start;
  gap: 18px;
}

.home-featured-tabs {
  display: flex;
  flex-wrap: wrap;
}

.home-featured-picker {
  margin-top: 18px;
}

.table-thumb {
  width: 116px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.course-detail {
  display: grid;
  gap: 22px;
}

.course-detail > h1 {
  margin: 0;
  color: #18243a;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.2;
}

.course-cover {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
}

.course-cover img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.course-meta-line {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.course-meta-line .price {
  font-size: 14px;
}

.course-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.course-tabs button {
  min-height: 58px;
  color: #1f2d42;
  background: #fff;
  border: 0;
  border-bottom: 3px solid transparent;
  font-size: 18px;
  font-weight: 600;
}

.course-tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 800;
}

.course-tab-panel {
  display: grid;
  gap: 18px;
}

.course-tab-panel > h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
}

.course-detail-content {
  display: grid;
  gap: 18px;
  margin: 0;
  color: #39465a;
  line-height: 1.85;
  white-space: pre-line;
}

.course-detail-content img {
  width: min(760px, 100%);
  display: block;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.learning-status {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
}

.learning-status.compact {
  margin-top: 0;
}

.learning-status strong {
  color: var(--brand-2);
}

.learning-status .progress-line {
  min-width: 180px;
  margin: 0;
}

.lesson-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
}

.lesson-row h3 {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 8px;
  color: #172033;
  font-size: 18px;
}

.lesson-row h3 span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.status {
  display: inline-flex;
  min-height: 26px;
  padding: 0 9px;
  align-items: center;
  border-radius: 3px;
  font-size: 12px;
  color: var(--brand);
  background: #e9f2fb;
}

.status.done {
  color: var(--ok);
  background: #e8f6ee;
}

.status.learning {
  color: #8a5b00;
  background: #fff4d8;
}

.status.idle {
  color: #667085;
  background: #f2f5f8;
}

.status.danger {
  color: #b42318;
  background: #fff0ed;
}

.profile-block {
  margin-top: 22px;
}

.profile-notice {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid #f7d48b;
  border-radius: 6px;
  color: #7a4b00;
  background: #fff8e7;
  font-size: 14px;
  line-height: 1.65;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.filter-pills button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
}

.filter-pills button.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.homework-table td {
  vertical-align: top;
}

.homework-detail h3 {
  margin: 18px 0 10px;
  color: var(--brand-2);
}

.homework-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.review-box {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfe;
}

.review-box p + p {
  margin-top: 8px;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
}

.content-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.content-list-search {
  display: flex;
  flex: 1;
  max-width: 620px;
  gap: 8px;
}

.content-list-toolbar.content-list-toolbar-search-only {
  display: block;
  width: fit-content;
  max-width: 100%;
  background: transparent;
}

.content-list-toolbar-search-only .content-list-search {
  width: min(620px, 100%);
  max-width: none;
}

.content-list-search input {
  min-width: 0;
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.content-list-search input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.12);
}

.content-list-pagination {
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.content-list-page-numbers,
.content-list-jump,
.content-list-jump label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.content-list-page-number {
  min-width: 36px;
  justify-content: center;
}

.content-list-page-number.is-current {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.content-list-ellipsis {
  min-width: 18px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

.content-list-jump input {
  width: 54px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.admin-homework-filters {
  margin: 12px 0 16px;
}

.check-line {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
}

.check-line input {
  width: auto;
}

.confirm-dialog {
  max-width: 420px;
}

.floating-tools {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 70;
  display: grid;
  gap: 8px;
}

.floating-tools button {
  width: 52px;
  height: 52px;
  padding: 0 6px;
  border: 1px solid rgba(11, 74, 134, 0.14);
  border-radius: 8px;
  color: var(--brand-2);
  background: #fff;
  box-shadow: 0 10px 24px rgba(13, 43, 76, 0.12);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.floating-tools button:hover {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.support-window {
  position: fixed;
  right: 84px;
  bottom: 88px;
  z-index: 75;
  width: min(390px, calc(100vw - 116px));
  overflow: hidden;
  border: 1px solid rgba(11, 74, 134, 0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(14, 43, 74, 0.18);
}

.support-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, #0b4a86, #0b7fb3);
}

.support-head strong,
.support-head span {
  display: block;
}

.support-head span {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.84;
}

.support-head button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.support-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.support-tabs button {
  min-height: 42px;
  border: 0;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.support-tabs button.active {
  color: var(--brand);
  background: #f4f8fc;
}

.support-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.support-chat {
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 4px;
}

.support-msg {
  max-width: 86%;
  padding: 9px 11px;
  border-radius: 8px;
  line-height: 1.55;
  font-size: 13px;
}

.support-msg.assistant {
  justify-self: start;
  color: #23344d;
  background: #f1f6fb;
}

.support-msg.user {
  justify-self: end;
  color: #fff;
  background: var(--brand);
}

.support-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.support-input-row input,
.support-body textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
}

.support-body textarea {
  min-height: 132px;
  resize: vertical;
}

.support-tip {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

body.preview-mobile #app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(13, 43, 76, 0.16);
}

body.preview-desktop #app {
  max-width: none;
  box-shadow: none;
}

.empty-service-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-height: 210px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
  text-align: left;
}

.empty-service-state strong {
  color: var(--brand-2);
  font-size: 22px;
}

.empty-service-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.activation-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.filter-dropdown {
  position: relative;
}

.filter-dropdown summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #26364e;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.filter-dropdown summary::-webkit-details-marker {
  display: none;
}

.filter-dropdown summary::after {
  content: "⌄";
  margin-left: auto;
  color: var(--muted);
}

.filter-dropdown-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 230px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 38, 70, 0.12);
}

.filter-dropdown-menu label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  color: #26364e;
  white-space: nowrap;
}

.filter-dropdown-menu label:hover {
  background: #f4f8fc;
}

.filter-dropdown-menu input {
  width: auto;
}

.admin-action-row {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.admin-counts {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0a315a, #0d5e98);
  border-radius: 6px;
  margin-bottom: 22px;
}

.lesson-page {
  display: grid;
  gap: 18px;
}

.lesson-page .video-box {
  margin-bottom: 0;
}

.video-box-native {
  background: #081827;
  overflow: hidden;
}

.video-box video,
.lesson-player-video,
.tcp-skin {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.video-watermark-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: var(--watermark-opacity, 0.16);
  background-size: var(--watermark-density, 220px) calc(var(--watermark-density, 220px) * 0.46);
  background-repeat: repeat;
  transform: rotate(var(--watermark-angle, -24deg)) scale(1.45);
  transform-origin: center;
  mix-blend-mode: screen;
}

.video-watermark-admin-preview {
  position: relative;
  min-height: 220px;
  margin-top: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(135deg, #081827, #12324a);
  border-radius: 8px;
  border: 1px solid rgba(215, 229, 240, 0.7);
}

.video-watermark-admin-preview span {
  position: relative;
  z-index: 6;
  font-weight: 700;
}

.player-loading {
  padding: 24px;
  text-align: center;
}

.video-note {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.video-error-note {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 4px;
  color: #fff;
  background: rgba(177, 38, 30, 0.86);
}

.lesson-work-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.lesson-work-panel h3 {
  margin-bottom: 10px;
  color: var(--brand-2);
  font-size: 20px;
}

.video-box .play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 32px;
}

.activity-image {
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #f5f8fb;
}

.activity-image img {
  width: 100%;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

.signup-panel {
  align-self: start;
  display: grid;
  gap: 14px;
}

.auth-section {
  min-height: 460px;
  display: grid;
  align-items: start;
  padding-top: 38px;
}

.auth-card {
  position: relative;
  width: min(360px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 26px 28px 28px;
  background: #fff;
  border: 1px solid rgba(11, 74, 134, 0.1);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 43, 74, 0.08);
}

.auth-brand,
.auth-title {
  margin-bottom: 20px;
  text-align: center;
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
}

.auth-title {
  margin-bottom: 18px;
}

.auth-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 22px;
}

.auth-tabs button {
  border: 0;
  background: transparent;
  color: #4b5565;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.auth-tabs button.active {
  color: var(--brand);
  font-weight: 700;
}

.auth-tabs span {
  width: 1px;
  height: 20px;
  background: #dcdfe5;
}

.auth-fields {
  display: grid;
  gap: 12px;
}

.auth-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  column-gap: 8px;
  padding: 0 12px;
  border: 1px solid #dce4ee;
  border-radius: 6px;
  background: #fff;
}

.auth-row label {
  color: #26364e;
  font-size: 14px;
  font-weight: 700;
}

.auth-row input,
.auth-row select {
  min-width: 0;
  width: 100%;
  height: 42px;
  border: 0;
  outline: none;
  color: #1f2937;
  font-size: 14px;
  background: transparent;
}

.auth-row input::placeholder {
  color: #b6bcc5;
}

.register-phone-code-row {
  grid-template-columns: 54px minmax(0, 1fr) minmax(0, 1fr) auto;
}

.register-phone-code-row label {
  white-space: nowrap;
}

.register-phone-code-row input {
  padding: 0 4px;
}

.auth-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.auth-link.disabled,
.auth-link:disabled {
  color: #98a4b3;
  cursor: not-allowed;
}

.cover-crop-status {
  display: block;
  margin-top: 8px;
  color: var(--ok);
  font-size: 13px;
}

.cover-crop-modal {
  position: fixed;
  z-index: 220;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(13, 29, 48, 0.72);
}

.cover-crop-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(3, 18, 37, 0.38);
}

.cover-crop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.cover-crop-head h3 {
  margin: 0 0 6px;
  color: var(--brand-2);
}

.cover-crop-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.cover-crop-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #3d4c62;
  background: #edf3f8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.cover-crop-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #172536;
  cursor: grab;
  touch-action: none;
}

.cover-crop-stage:active {
  cursor: grabbing;
}

.cover-crop-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  user-select: none;
  pointer-events: none;
  will-change: transform;
}

.cover-crop-frame {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(8, 34, 61, 0.35), inset 0 0 30px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.cover-crop-controls,
.cover-crop-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.cover-crop-controls {
  justify-content: space-between;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.cover-crop-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.cover-crop-controls input {
  width: min(280px, 46vw);
  accent-color: var(--brand);
}

.cover-crop-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.captcha-row {
  grid-template-columns: 76px minmax(0, 1fr) 106px;
}

.captcha-image-btn {
  width: 100px;
  height: 34px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d5e1ed;
  border-radius: 4px;
  background: #f6f9fc;
  cursor: pointer;
}

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

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

.auth-eye-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.auth-eye-btn::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 9px;
  width: 17px;
  height: 9px;
  border: 1.5px solid #7890a8;
  border-radius: 50% / 60%;
  background: transparent;
}

.auth-eye-btn::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7890a8;
}

.auth-eye-btn.active::before {
  border-color: var(--brand);
}

.auth-eye-btn.active::after {
  background: var(--brand);
}

.auth-forgot {
  margin-top: 9px;
  text-align: right;
}

.auth-forgot button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.auth-register,
.auth-submit {
  height: 40px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-register {
  color: #111827;
  background: #fff;
  border: 1px solid #dfe4ea;
}

.auth-submit {
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
}

.auth-submit:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
}

.form-panel,
.admin-panel {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #31415a;
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.admin-editor-meta .field {
  min-width: 0;
}

.admin-editor-meta input[type="date"],
.admin-editor-meta input[type="datetime-local"] {
  min-width: 0;
  height: 42px;
  line-height: 1.2;
}

.admin-form-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.admin-toolbar + .admin-form-section {
  border-top: 0;
  padding-top: 4px;
}

.admin-section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-section-title h4 {
  margin: 0;
  color: var(--brand-2);
  font-size: 17px;
}

.admin-section-title span {
  color: var(--muted);
  font-size: 13px;
}

.admin-body-section {
  padding-bottom: 6px;
}

.admin-editor-draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 14px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--soft) 72%, var(--surface));
}

.admin-editor-draft-bar > div {
  display: grid;
  gap: 3px;
}

.admin-editor-draft-bar strong {
  color: var(--brand-2);
  font-size: 14px;
}

.admin-editor-draft-bar span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-editor-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.admin-editor-tabs button {
  min-height: 38px;
  padding: 0 17px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.admin-editor-tabs button:hover {
  color: var(--brand);
}

.admin-editor-tabs button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 5px 12px color-mix(in srgb, var(--brand) 22%, transparent);
}

.admin-editor-tabs button:active {
  transform: translateY(1px) scale(0.99);
}

.admin-editor-tab-panel[hidden] {
  display: none;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue, #0c649e);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.text-action:hover {
  text-decoration: underline;
}

.admin-tag-create {
  align-items: end;
  margin: 16px 0;
}

.admin-tag-create-action {
  display: flex;
  align-items: end;
}

@media (max-width: 620px) {
  .admin-editor-draft-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-editor-draft-bar .btn {
    width: 100%;
  }

  .admin-editor-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .admin-editor-tabs button:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }
}

.rich-editor-field {
  min-width: 0;
}

.rich-editor-shell {
  overflow: hidden;
  border: 1px solid #cfd8e5;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.rich-editor-shell:focus-within {
  border-color: #2477ba;
  box-shadow: 0 0 0 3px rgba(36, 119, 186, 0.12);
}

.rich-editor-toolbar {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 9px;
  border-bottom: 1px solid #dce4ee;
  background: #f5f8fc;
}

.rich-editor-toolbar select,
.rich-editor-toolbar button {
  min-height: 30px;
  border: 1px solid #cfd8e5;
  border-radius: 4px;
  color: #26364e;
  background: #fff;
  font-size: 13px;
}

.rich-editor-toolbar select {
  width: auto;
  min-width: 108px;
  padding: 0 28px 0 9px;
}

.rich-editor-toolbar button {
  min-width: 32px;
  padding: 0 9px;
}

.rich-editor-toolbar button:hover {
  color: var(--brand);
  border-color: #8fb8d8;
  background: #eef7ff;
}

.rich-editor-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.rich-editor-input {
  min-height: 320px;
  padding: 20px;
  color: var(--ink);
  background: #fff;
  line-height: 1.8;
  overflow-wrap: anywhere;
  outline: none;
}

.rich-editor-input p,
.rich-editor-input div {
  margin: 0 0 12px;
}

.rich-editor-input h2,
.rich-editor-input h3 {
  margin: 20px 0 10px;
  color: var(--brand-2);
}

.rich-editor-input blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid #27a89b;
  color: #53647a;
  background: #f4faf9;
}

.admin-content-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eaf0f7;
}

.admin-content-tabs button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 4px;
  color: #42546c;
  background: transparent;
  font-weight: 700;
}

.admin-content-tabs button.active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(15, 75, 125, 0.18);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: #2f4058;
  background: #fff;
  border-radius: 4px;
}

.tabs button.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.admin-main {
  min-height: 100vh;
  background: #f4f7fb;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: #f4f7fb;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 20px 16px;
  background: #10233f;
  color: #fff;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0;
  color: #fff;
  background: transparent;
  text-align: left;
  font-size: 18px;
  font-weight: 800;
}

.admin-content {
  min-width: 0;
  padding: 24px;
}

.admin-topbar {
  margin-bottom: 18px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(18, 50, 74, 0.06);
}

.admin-topbar h2 {
  margin: 0;
  color: var(--brand-2);
  font-size: 24px;
}

.admin-topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-toolbar h3 {
  margin-bottom: 0;
}

.topic-admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.topic-admin-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.topic-admin-heading h4 {
  margin: 0;
  color: var(--brand-2);
  font-size: 17px;
}

.topic-admin-heading span {
  color: var(--muted);
  font-size: 13px;
}

.topic-admin-list {
  display: grid;
  gap: 10px;
}

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

.registration-field-builder {
  margin-top: 18px;
}

.registration-field-add {
  display: flex;
  gap: 8px;
}

.registration-field-add select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

.registration-field-rows {
  display: grid;
  gap: 10px;
}

.registration-field-row {
  display: grid;
  grid-template-columns: 34px minmax(150px, 1.1fr) minmax(130px, 0.8fr) minmax(190px, 1.2fr) minmax(150px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.registration-field-index {
  align-self: center;
  color: #0e9f91;
  font-size: 12px;
  font-weight: 800;
}

.registration-field-checks,
.registration-field-actions {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.registration-field-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: #3d4c62;
  font-size: 13px;
}

.registration-field-checks input {
  width: auto;
}

.registration-subpanel {
  margin-top: 18px;
}

.registration-code-generator {
  grid-template-columns: 1.25fr 0.55fr 1fr;
}

.registration-batch-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.registration-batch summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 1fr) 100px 180px;
  gap: 12px;
  align-items: center;
  color: #25374f;
}

.registration-batch summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.registration-batch-content {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.registration-batch-content textarea {
  min-height: 180px;
  font-family: Consolas, monospace;
  line-height: 1.65;
}

.compact-table {
  margin-top: 6px;
}

.registration-answer-list {
  min-width: 280px;
  display: grid;
  gap: 5px;
  line-height: 1.55;
}

.registration-answer-list strong {
  color: #31415a;
}

.text-button {
  margin-left: 7px;
  padding: 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  text-decoration: underline;
  font-size: 12px;
}

.topic-admin-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.topic-admin-row.extended {
  grid-template-columns: 34px minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.75fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.topic-admin-row input,
.topic-admin-row select {
  min-width: 0;
}

.topic-admin-row select[multiple] {
  min-height: 132px;
  padding: 6px;
}

.topic-resource-select small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.topic-admin-index {
  align-self: center;
  color: #0e9f91;
  font-size: 12px;
  font-weight: 800;
}

.topic-remove-button {
  margin-bottom: 1px;
}

.topic-content-field,
.topic-image-field {
  margin-top: 22px;
}

.topic-content-field textarea {
  min-height: 260px;
}

.admin-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

@media (max-width: 1280px) {
  .topic-admin-row,
  .topic-admin-row.extended {
    grid-template-columns: 34px repeat(2, minmax(0, 1fr));
  }

  .topic-admin-index {
    grid-row: 1 / span 4;
  }

  .topic-remove-button {
    justify-self: start;
  }

  .registration-field-row {
    grid-template-columns: 34px repeat(2, minmax(0, 1fr));
  }

  .registration-field-index {
    grid-row: 1 / span 3;
  }

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

  .certificate-preview-column {
    position: static;
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .nav-inner {
    gap: 16px;
  }

  .brand {
    min-width: 270px;
  }

  .brand-title {
    font-size: 18px;
  }

  .nav button {
    padding: 0 8px;
    font-size: 14px;
  }
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

details {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-publish-button.is-publishing {
  min-width: 108px;
  color: #fff;
  background: #8b98a8;
  border-color: #8b98a8;
}

.admin-input-invalid {
  border-color: #d94747 !important;
  box-shadow: 0 0 0 3px rgba(217, 71, 71, 0.14);
}

.filters select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  background: #fff;
}

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

.admin-captcha input {
  min-width: 0;
}

.admin-captcha .captcha-image-btn {
  width: 120px;
  height: 40px;
}

.admin-menu {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-menu button {
  min-height: 40px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-align: left;
  padding: 0 14px;
}

.admin-menu button.active {
  color: #10233f;
  background: #fff;
  border-color: #fff;
  font-weight: 800;
}

.admin-menu button:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
}

.admin-logout {
  min-height: 40px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, max-content));
  gap: 8px;
}

.permission-grid label {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #26364e;
  white-space: nowrap;
  font-size: 13px;
}

.permission-grid input {
  width: auto;
}

.security-tabs {
  margin-top: 6px;
}

.security-table td {
  max-width: 280px;
  word-break: break-word;
}

.security-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.security-status.ok {
  color: #15803d;
  background: #dcfce7;
}

.security-status.bad {
  color: #b42318;
  background: #fee4e2;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

.security-blacklist-form {
  margin-bottom: 4px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

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

.table th {
  color: #26364e;
  background: #f1f5fa;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 6px;
}

.footer {
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 184, 168, 0.22), transparent 32%),
    linear-gradient(135deg, #082d50, #0b3d6a 54%, #07304f);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 34px 0;
  line-height: 1.8;
  font-size: 14px;
}

.footer h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.footer p {
  margin: 0;
}

.footer a {
  display: block;
  color: rgba(255, 255, 255, 0.78);
}

.footer a.inline-link {
  display: inline;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.beian-icon {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  vertical-align: -5px;
}

.field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(17, 31, 49, 0.94);
  padding: 10px 16px;
  border-radius: 4px;
  z-index: 30;
  box-shadow: var(--shadow);
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 24, 39, 0.48);
}

.payment-dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 8px;
  text-align: center;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 24, 39, 0.22);
}

.payment-dialog h3 {
  margin: 0 0 10px;
  color: var(--brand-2);
  font-size: 24px;
}

.payment-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #475467;
  background: transparent;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.payment-close:hover {
  background: #f2f5f8;
}

.payment-amount {
  margin: 14px 0;
  color: #0b8f4d;
  font-size: 26px;
  font-weight: 800;
}

.payment-qr {
  width: 240px;
  min-height: 240px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-qr canvas {
  width: 220px;
  height: 220px;
}

.payment-status {
  min-height: 24px;
  color: #566176;
  font-size: 14px;
}

.payment-actions {
  justify-content: center;
  margin-top: 16px;
}

/* Certificate issuance and private PDF download */
.certificate-page {
  min-height: 560px;
  background: #f5f8fb;
}

.certificate-page-head {
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.certificate-center-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 720px;
  margin: 0 0 24px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eaf0f7;
}

.certificate-center-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  color: #42546c;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
}

.certificate-center-tabs button.active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 5px 14px rgba(15, 75, 125, 0.18);
}

.certificate-center-intro {
  margin-bottom: 20px;
}

.certificate-center-intro h2 {
  margin: 0 0 7px;
  color: var(--brand-2);
  font-size: 23px;
}

.certificate-center-intro p {
  margin: 0;
  color: var(--muted);
}

.certificate-page-head h1,
.certificate-query-heading h1 {
  margin: 7px 0 0;
  color: var(--brand-2);
  font-size: 30px;
}

.certificate-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.certificate-card {
  position: relative;
  min-height: 238px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  overflow: hidden;
  border-top: 3px solid #12a99b;
}

.certificate-card-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #0b4d78, #0a3559);
  font-family: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
  font-size: 30px;
  font-weight: 800;
}

.certificate-card .card-body {
  min-width: 0;
  padding: 22px;
}

.certificate-card h3 {
  margin: 12px 0 7px;
  color: var(--brand-2);
  font-size: 19px;
  line-height: 1.45;
}

.certificate-available {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  color: #087a6f;
  background: #dcf7f2;
  font-size: 12px;
  font-weight: 800;
}

.certificate-batch-name {
  margin: 0 0 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.certificate-period {
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.certificate-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
}

.certificate-query-page {
  min-height: 620px;
  background: #f3f7fa;
}

.certificate-query-shell {
  width: min(760px, calc(100% - 32px));
}

.certificate-query-heading {
  margin-bottom: 18px;
}

.certificate-query-heading .text-button {
  display: block;
  margin-bottom: 24px;
}

.certificate-query-heading .certificate-available {
  margin-bottom: 4px;
}

.certificate-query-heading > p {
  margin: 8px 0 0;
  color: #475467;
  font-size: 16px;
}

.certificate-query-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 3px solid #12a99b;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 54, 86, 0.08);
}

.certificate-archive-query-card {
  max-width: 820px;
}

.certificate-query-intro h2 {
  margin: 0 0 8px;
  color: var(--brand-2);
  font-size: 22px;
}

.certificate-query-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.certificate-archive-query-card .certificate-query-fields {
  grid-template-columns: 1fr;
}

.certificate-query-fields .captcha-field,
.certificate-query-fields .captcha-row {
  grid-column: 1 / -1;
}

.certificate-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0;
  color: #475467;
  line-height: 1.5;
  font-size: 13px;
}

.certificate-consent input {
  width: auto;
  margin-top: 3px;
}

.certificate-query-submit {
  width: 100%;
  min-height: 44px;
}

.certificate-query-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid;
  border-radius: 6px;
}

.certificate-query-result strong {
  display: block;
  margin-bottom: 3px;
}

.certificate-query-result p {
  margin: 0;
  color: inherit;
  font-size: 13px;
}

.certificate-query-result.success {
  color: #11663c;
  border-color: #a6e3c2;
  background: #ecfdf3;
}

.certificate-query-result.generating {
  justify-content: flex-start;
  color: #175d87;
  border-color: #b6d8eb;
  background: #edf7fc;
}

.certificate-query-result.error {
  color: #a32d25;
  border-color: #efb8b2;
  background: #fff2f0;
}

.certificate-archive-results {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.certificate-archive-result-message {
  margin-top: 0;
}

.certificate-archive-result-card {
  overflow: hidden;
  border: 1px solid #cfdce7;
  border-radius: 7px;
  background: #fff;
}

.certificate-archive-result-head {
  padding: 18px 20px;
  border-bottom: 1px solid #e6edf3;
  background: #f7fafc;
}

.certificate-archive-result-head h3 {
  margin: 9px 0 3px;
  color: var(--brand-2);
  font-size: 19px;
}

.certificate-archive-result-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.certificate-archive-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 8px 20px 16px;
}

.certificate-archive-fields > div {
  min-width: 0;
  padding: 12px 12px 10px 0;
  border-bottom: 1px dashed #e4ebf1;
}

.certificate-archive-fields dt {
  margin-bottom: 4px;
  color: #667085;
  font-size: 12px;
}

.certificate-archive-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #1d2939;
  font-weight: 700;
}

.certificate-spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 3px solid #c8dfeb;
  border-top-color: #1574a8;
  border-radius: 50%;
  animation: certificate-spin 0.8s linear infinite;
}

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

.admin-toolbar-actions,
.certificate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.certificate-batch-table {
  min-width: 1040px;
}

.certificate-batch-table td:nth-child(1) {
  min-width: 190px;
}

.certificate-archive-table {
  min-width: 980px;
}

.certificate-query-field-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.certificate-query-field-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #dce5ed;
  border-radius: 6px;
  background: #f8fafc;
}

.certificate-query-field-row .check-line {
  margin: 0;
}

.certificate-query-field-row input[type="text"] {
  min-height: 38px;
}

.certificate-progress {
  width: 150px;
  height: 7px;
  margin: 3px 0 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e5ebf1;
}

.certificate-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #10a899;
  transition: width 0.3s ease;
}

.certificate-error-text {
  display: block;
  max-width: 230px;
  margin-top: 4px;
  color: #b42318;
  line-height: 1.4;
}

.certificate-editor-page {
  padding-bottom: 24px;
}

.certificate-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.certificate-upload-box {
  position: relative;
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 18px;
  overflow: hidden;
  border: 1px dashed #aab9c7;
  border-radius: 6px;
  color: #344054;
  background: #f8fafc;
  cursor: pointer;
}

.certificate-upload-box::before {
  content: "+";
  position: absolute;
  top: 10px;
  right: 12px;
  color: #0d8f82;
  font-size: 22px;
  font-weight: 400;
}

.certificate-upload-box:hover,
.certificate-upload-box.has-file {
  border-color: #13a99b;
  background: #f0fbf9;
}

.certificate-upload-box strong {
  color: var(--brand-2);
  font-size: 15px;
}

.certificate-upload-box span {
  padding-right: 18px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 12px;
}

.certificate-upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.certificate-remove-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: #8e372e;
  font-size: 13px;
}

.certificate-remove-seal input {
  width: auto;
}

.certificate-identity-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.certificate-designer-layout {
  display: grid;
  grid-template-columns: minmax(370px, 0.72fr) minmax(520px, 1.28fr);
  gap: 18px;
  align-items: start;
}

.certificate-designer-controls {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.certificate-control-head,
.certificate-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.certificate-control-head > span,
.certificate-preview-toolbar small {
  color: var(--muted);
  font-size: 12px;
}

.certificate-mapping-list {
  display: grid;
  gap: 10px;
}

.certificate-mapping-row,
.certificate-seal-controls {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.certificate-mapping-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.certificate-mapping-row-head strong {
  min-width: 0;
  overflow: hidden;
  color: #20344e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-mapping-row-head button {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid #e2b6b0;
  border-radius: 4px;
  color: #a52c23;
  background: #fff;
  cursor: pointer;
  font-size: 19px;
}

.certificate-mapping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.certificate-mapping-grid label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 11px;
  white-space: nowrap;
}

.certificate-mapping-grid input,
.certificate-mapping-grid select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  color: #24364e;
  background: #fff;
  font-size: 12px;
}

.certificate-mapping-grid input[type="color"] {
  padding: 3px;
}

.certificate-seal-controls {
  display: grid;
  gap: 10px;
  border-color: #ebc3bd;
  background: #fff8f7;
}

.certificate-preview-column {
  min-width: 0;
  position: sticky;
  top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef3f7;
}

.certificate-preview-toolbar {
  margin-bottom: 10px;
}

.certificate-preview-toolbar > span {
  color: var(--brand-2);
  font-weight: 800;
}

.certificate-designer {
  position: relative;
  width: 100%;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid #c8d3dc;
  background: #fff;
  box-shadow: 0 8px 28px rgba(20, 49, 74, 0.08);
  user-select: none;
}

.certificate-background-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.certificate-preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 12px, #f2f5f8 12px, #f2f5f8 24px);
}

.certificate-text-overlay {
  position: absolute;
  z-index: 2;
  padding: 0;
  border: 1px dashed transparent;
  overflow: hidden;
  overflow-wrap: normal;
  word-break: break-all;
  cursor: move;
}

@font-face {
  font-family: "HB Certificate Serif";
  src: url("/api/admin/certificates/fonts/noto-serif-sc") format("opentype");
  font-display: block;
}

@font-face {
  font-family: "HB Certificate Serif Bold";
  src: url("/api/admin/certificates/fonts/noto-serif-sc-bold") format("opentype");
  font-display: block;
}

@font-face {
  font-family: "HB Certificate Sans";
  src: url("/api/admin/certificates/fonts/noto-sans-sc") format("opentype");
  font-display: block;
}

@font-face {
  font-family: "HB Certificate Sans Bold";
  src: url("/api/admin/certificates/fonts/noto-sans-sc-bold") format("opentype");
  font-display: block;
}

.certificate-text-overlay:hover {
  border-color: #159c91;
  background: rgba(226, 250, 246, 0.42);
}

.certificate-seal-overlay {
  position: absolute;
  z-index: 3;
  object-fit: contain;
  cursor: move;
}

.certificate-seal-overlay:hover {
  outline: 1px dashed #c84637;
  outline-offset: 2px;
}

.certificate-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  margin: 18px -24px -24px;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 24px rgba(22, 48, 70, 0.06);
  backdrop-filter: blur(8px);
}

@media (max-width: 900px) {
  .floating-tools {
    right: 10px;
    bottom: 10px;
    grid-auto-flow: column;
    gap: 6px;
  }

  .floating-tools button {
    width: 46px;
    height: 42px;
  }

  .support-window {
    right: 10px;
    bottom: 62px;
    width: min(390px, calc(100vw - 20px));
  }

  .nav-inner,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
  }

  .brand-title {
    font-size: 18px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
    row-gap: 4px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    font-size: 14px;
  }

  .grid,
  .pillar-grid,
  .two-col,
  .feature-columns,
  .admin-shell,
  .admin-layout,
  .quick-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto;
  }

  .admin-content {
    padding: 16px;
  }

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

  .news-row {
    grid-template-columns: 1fr;
  }

  .content-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .content-list-search {
    max-width: none;
    flex-wrap: wrap;
  }

  .content-list-search input {
    flex-basis: 100%;
  }

  .content-list-pagination {
    justify-content: center;
  }

  .hero {
    height: 360px;
  }

  .hero-title {
    bottom: 106px;
    left: 20px;
    width: calc(100% - 40px);
    font-size: 22px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-copy {
    left: 20px;
    width: calc(100% - 40px);
    bottom: 58px;
    font-size: 15px;
  }

  .pillar-band {
    margin-top: 0;
    padding-top: 18px;
  }

  .pillar-card {
    min-height: auto;
  }

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

  .course-cover img {
    aspect-ratio: 16 / 10;
  }

  .article {
    padding: 22px;
  }

  .topic-page-head {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .topic-count-block {
    min-height: 90px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
  }

  .topic-list-head,
  .topic-list-head.extended {
    display: none;
  }

  .topic-competition-row,
  .topic-competition-row.extended {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
    min-width: 0;
  }

  .topic-competition-row > div:not(.topic-competition-name)::before {
    content: attr(data-topic-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .topic-admin-row,
  .topic-admin-row.extended {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .topic-admin-index {
    grid-row: 1 / span 8;
  }

  .topic-admin-heading,
  .admin-form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .registration-empty-entry,
  .registration-page-head,
  .registration-field-add {
    align-items: flex-start;
    flex-direction: column;
  }

  .registration-page-stat {
    min-width: 0;
    justify-items: start;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .registration-detail-shell,
  .registration-code-generator {
    grid-template-columns: 1fr;
  }

  .registration-form-panel {
    position: static;
  }

  .registration-cover {
    margin: -22px -22px 20px;
  }

  .registration-field-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .registration-field-index {
    grid-row: 1 / span 5;
  }

  .registration-batch summary {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .contact-image-frame {
    min-height: 300px;
  }

  .contact-image-frame img {
    min-height: 300px;
  }

  .contact-map-card {
    min-height: 300px;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    justify-content: flex-start;
  }

  .auth-section {
    padding-top: 28px;
  }

  .auth-tabs {
    gap: 18px;
  }

  .auth-row {
    grid-template-columns: 72px 1fr auto;
    padding: 0 10px;
  }

  .auth-actions {
    gap: 10px;
  }

  .certificate-grid,
  .certificate-query-fields,
  .certificate-upload-grid,
  .certificate-identity-columns,
  .certificate-designer-layout,
  .certificate-archive-fields,
  .certificate-query-field-row {
    grid-template-columns: 1fr;
  }

  .certificate-card {
    min-height: 210px;
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .certificate-card-mark {
    font-size: 24px;
  }

  .certificate-page-head h1,
  .certificate-query-heading h1 {
    font-size: 25px;
  }

  .certificate-query-shell {
    width: min(100%, calc(100% - 24px));
  }

  .certificate-query-card {
    padding: 20px;
  }

  .certificate-query-fields .captcha-field,
  .certificate-query-fields .captcha-row {
    grid-column: auto;
  }

  .certificate-query-result {
    align-items: flex-start;
    flex-direction: column;
  }

  .certificate-designer-layout {
    min-width: 0;
  }

  .certificate-preview-column {
    position: static;
    padding: 8px;
  }

  .certificate-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .certificate-designer {
    min-height: 220px;
  }

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

  .certificate-editor-actions {
    position: static;
    margin: 18px 0 0;
    padding: 14px 0 0;
    box-shadow: none;
  }
}

@media (max-width: 520px) {
  .certificate-center-tabs button {
    padding: 0 8px;
    font-size: 14px;
  }

  .certificate-mapping-grid {
    grid-template-columns: 1fr;
  }

  .certificate-card .card-body {
    padding: 18px 16px;
  }
}

/* School service workspace */
.school-service-page {
  min-height: calc(100vh - 74px);
  padding: 22px 0 48px;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 184, 168, 0.1), transparent 30%),
    linear-gradient(180deg, #eaf4fb 0%, #f4f8fe 50%, #edf4ff 100%);
}

.school-service-page .school-workspace-header,
.school-service-page .school-shell {
  width: min(1440px, calc(100% - 40px));
  margin-inline: auto;
}

.school-service-page .school-workspace-header {
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  margin-bottom: 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(215, 229, 240, 0.94);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(18, 50, 74, 0.08);
  backdrop-filter: blur(14px);
}

.school-service-page .school-workspace-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-2);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.school-service-page .school-workspace-brand strong,
.school-service-page .school-workspace-brand small,
.school-service-page .school-sidebar-title strong,
.school-service-page .school-sidebar-title span {
  display: block;
}

.school-service-page .school-workspace-brand small,
.school-service-page .school-sidebar-title span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.school-service-page .school-workspace-brand::before {
  content: "校";
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--accent));
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(11, 92, 173, 0.2);
}

.school-service-page .school-workspace-tabs {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.school-service-page .school-workspace-tabs::-webkit-scrollbar,
.school-service-page .school-sidebar-list::-webkit-scrollbar {
  display: none;
}

.school-service-page .school-workspace-tabs button,
.school-service-page .school-workspace-tabs a {
  position: relative;
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.school-service-page .school-workspace-tabs button:hover,
.school-service-page .school-workspace-tabs button.active,
.school-service-page .school-workspace-tabs a:hover,
.school-service-page .school-workspace-tabs a.active {
  color: var(--brand);
  background: #edf6ff;
}

.school-service-page .school-workspace-tabs button.active::after,
.school-service-page .school-workspace-tabs a.active::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 2px;
  left: 14px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 99px;
}

.school-service-page .school-workspace-tabs button:focus-visible,
.school-service-page .school-workspace-tabs a:focus-visible,
.school-service-page .school-sidebar-list button:focus-visible,
.school-service-page .school-sidebar-list a:focus-visible {
  outline: 3px solid rgba(11, 92, 173, 0.2);
  outline-offset: 2px;
}

.school-service-page .school-identity {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: 280px;
  padding: 8px 12px;
  color: var(--brand-2);
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-service-page .school-shell {
  min-height: 680px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(215, 229, 240, 0.92);
  border-radius: 22px;
  box-shadow: 0 22px 56px rgba(18, 50, 74, 0.11);
}

.school-service-page .school-sidebar {
  min-width: 0;
  padding: 28px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 22%),
    linear-gradient(160deg, #eaf6ff 0%, #e7efff 62%, #eff7ff 100%);
  border-right: 1px solid rgba(215, 229, 240, 0.98);
}

.school-service-page .school-sidebar-title {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 23px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.school-service-page .school-sidebar-search,
.school-service-page .school-sidebar-search input {
  width: 100%;
  min-height: 40px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(199, 216, 233, 0.98);
  border-radius: 9px;
}

.school-service-page input.school-sidebar-search,
.school-service-page .school-sidebar-search input {
  padding: 0 13px;
  outline: none;
}

.school-service-page .school-sidebar-search:focus,
.school-service-page .school-sidebar-search:focus-within {
  border-color: rgba(11, 92, 173, 0.58);
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.1);
}

.school-service-page .school-sidebar-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.school-service-page .school-sidebar-list button,
.school-service-page .school-sidebar-list a {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  color: #334a63;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.school-service-page .school-sidebar-list button:hover,
.school-service-page .school-sidebar-list button.active,
.school-service-page .school-sidebar-list a:hover,
.school-service-page .school-sidebar-list a.active {
  color: var(--brand);
  background: #fff;
  border-color: rgba(90, 139, 255, 0.58);
  box-shadow: 0 8px 20px rgba(11, 92, 173, 0.08);
  transform: translateY(-1px);
}

.school-service-page .school-content {
  min-width: 0;
  padding: 28px 30px 36px;
  background: rgba(255, 255, 255, 0.98);
}

.school-service-page .school-content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.school-service-page .school-content-head h1,
.school-service-page .school-content-head h2,
.school-service-page .school-content-head h3 {
  margin: 0;
  color: var(--brand-2);
}

.school-service-page .school-content-head p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.school-service-page .school-course-grid,
.school-service-page .school-event-grid,
.school-service-page .school-manager-grid,
.school-service-page .school-stat-grid,
.school-service-page .school-account-grid {
  display: grid;
  gap: 18px;
}

.school-service-page .school-course-grid,
.school-service-page .school-event-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.school-service-page .school-manager-grid,
.school-service-page .school-account-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.school-service-page .school-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.school-service-page .school-course-card,
.school-service-page .school-event-card,
.school-service-page .school-class-card,
.school-service-page .school-stat-card,
.school-service-page .school-admin-section,
.school-service-page .school-account-grid > article,
.school-service-page .school-account-grid > div {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 9px 24px rgba(18, 50, 74, 0.07);
}

.school-service-page .school-course-card,
.school-service-page .school-event-card,
.school-service-page .school-class-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.school-service-page .school-course-card:hover,
.school-service-page .school-event-card:hover,
.school-service-page .school-class-card:hover {
  border-color: rgba(11, 92, 173, 0.28);
  box-shadow: 0 16px 34px rgba(18, 50, 74, 0.11);
  transform: translateY(-3px);
}

.school-service-page .school-course-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11, 92, 173, 0.92), rgba(34, 184, 168, 0.74)),
    var(--soft-2);
}

.school-service-page .school-course-cover::after {
  content: "";
  position: absolute;
  inset: auto -8% -46% 22%;
  height: 76%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}

.school-service-page .school-course-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.school-service-page .school-course-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.school-service-page .school-course-body h3,
.school-service-page .school-event-card h3,
.school-service-page .school-class-card h3,
.school-service-page .school-admin-section h3 {
  margin: 0;
  color: var(--brand-2);
  line-height: 1.45;
}

.school-service-page .school-course-body p,
.school-service-page .school-event-card p,
.school-service-page .school-class-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.school-service-page .school-placeholder {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 28px;
  color: var(--brand-2);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 184, 168, 0.14), transparent 46%),
    linear-gradient(145deg, #f7fbff, #edf5ff);
  border: 1px dashed rgba(11, 92, 173, 0.32);
  border-radius: 16px;
  text-align: center;
}

.school-service-page .school-course-grid > .school-placeholder,
.school-service-page .school-event-grid > .school-placeholder {
  grid-column: 1 / -1;
}

.school-service-page .school-placeholder h2,
.school-service-page .school-placeholder h3 {
  margin: 0;
  color: var(--brand-2);
}

.school-service-page .school-placeholder-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--accent));
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(11, 92, 173, 0.2);
  font-size: 28px;
  font-weight: 800;
}

.school-service-page .school-event-card {
  padding: 20px;
}

.school-service-page .school-event-card > img {
  width: calc(100% + 40px);
  height: 168px;
  display: block;
  margin: -20px -20px 18px;
  object-fit: cover;
}

.school-service-page .school-event-meta,
.school-service-page .school-table-actions,
.admin-school-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.school-service-page .school-event-meta {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.school-service-page .school-stat-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border-top: 4px solid var(--accent);
}

.school-service-page .school-stat-card strong {
  color: var(--brand);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.school-service-page .school-stat-card span,
.school-service-page .school-stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.school-service-page .school-class-card {
  padding: 20px;
  color: inherit;
  text-align: left;
}

.school-service-page .school-roster {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.school-service-page .school-roster > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.school-service-page .school-roster > span:last-child {
  border-bottom: 0;
}

.school-service-page .school-roster > span small {
  color: var(--muted);
}

.school-service-page .school-roster table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.school-service-page .school-roster th,
.school-service-page .school-roster td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.school-service-page .school-roster th {
  color: var(--brand-2);
  background: var(--soft);
  font-size: 13px;
}

.school-service-page .school-roster tr:last-child td {
  border-bottom: 0;
}

.school-service-page .school-admin-section {
  padding: 22px;
  margin-bottom: 18px;
}

.school-service-page .school-admin-section + .school-admin-section {
  margin-top: 18px;
}

.school-service-page .school-import-note {
  margin: 14px 0;
  padding: 13px 15px;
  color: #31516f;
  background: #eef8ff;
  border: 1px solid #d4e9f8;
  border-left: 4px solid var(--accent);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.7;
}

.school-service-page .school-account-grid > article,
.school-service-page .school-account-grid > div {
  padding: 18px;
}

.school-service-page .school-table-actions {
  justify-content: flex-end;
}

.school-service-page .school-access-card {
  width: min(560px, calc(100% - 32px));
  margin: clamp(28px, 8vh, 90px) auto 0;
  padding: clamp(26px, 4vw, 42px);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}

.school-service-page .school-access-card h1,
.school-service-page .school-access-card h2,
.school-service-page .school-access-card h3 {
  margin: 0 0 10px;
  color: var(--brand-2);
}

.school-service-page .school-access-card p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.75;
}

.school-service-page .auth-actions.single-action {
  grid-template-columns: 1fr;
}

/* School service login */
.school-service-page.auth-section {
  min-height: calc(100vh - 74px);
  padding: clamp(28px, 5vw, 64px) 0;
}

.school-login-layout {
  width: min(1080px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  margin: 0 auto;
}

.school-login-visual {
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background: #dff2ff;
  box-shadow: 0 22px 52px rgba(28, 74, 122, 0.16);
}

.school-login-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.school-login-layout .auth-card {
  width: 100%;
  margin: 0;
}

.school-login-layout .school-login-subtitle {
  margin: -6px 0 30px;
  font-size: 13px;
  line-height: 1.75;
}

.school-login-layout .school-login-code-note {
  margin-top: 12px;
}

.school-login-layout .school-login-footnote {
  margin-top: 18px;
}

/* Platform-admin school cards */
.admin-school-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.admin-school-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(18, 50, 74, 0.07);
}

.admin-school-card h3,
.admin-school-card h4 {
  margin: 0;
  color: var(--brand-2);
}

.admin-school-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-school-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.admin-school-course-grid > * {
  min-width: 0;
  padding: 9px 10px;
  color: #31516f;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.admin-school-meta {
  color: var(--muted);
  font-size: 13px;
}

.admin-school-meta > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .school-service-page {
    min-height: calc(100vh - 110px);
    padding: 16px 0 32px;
  }

  .school-service-page .school-workspace-header,
  .school-service-page .school-shell {
    width: min(1440px, calc(100% - 32px));
  }

  .school-service-page .school-workspace-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    padding: 12px 16px;
  }

  .school-service-page .school-workspace-tabs {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  .school-service-page .school-shell {
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .school-service-page .school-sidebar {
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .school-service-page .school-sidebar-title {
    margin-bottom: 12px;
    font-size: 20px;
  }

  .school-service-page .school-sidebar-list {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .school-service-page .school-sidebar-list button,
  .school-service-page .school-sidebar-list a {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .school-service-page .school-content {
    padding: 24px 22px 30px;
  }

  .school-service-page .school-course-grid,
  .school-service-page .school-event-grid,
  .school-service-page .school-manager-grid,
  .school-service-page .school-stat-grid,
  .school-service-page .school-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-login-layout {
    width: min(760px, calc(100vw - 40px));
    grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
    gap: 28px;
  }

  .school-login-visual {
    min-height: 500px;
  }

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

@media (max-width: 620px) {
  .school-service-page .school-workspace-header,
  .school-service-page .school-shell {
    width: calc(100% - 24px);
  }

  .school-service-page .school-workspace-header {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .school-service-page .school-workspace-brand {
    font-size: 16px;
  }

  .school-service-page .school-workspace-brand::before {
    width: 36px;
    height: 36px;
  }

  .school-service-page .school-workspace-tabs {
    grid-column: auto;
    margin-inline: -4px;
  }

  .school-service-page .school-identity {
    max-width: 100%;
    justify-self: start;
  }

  .school-service-page .school-shell {
    border-radius: 14px;
  }

  .school-service-page .school-sidebar,
  .school-service-page .school-content {
    padding: 18px 16px 22px;
  }

  .school-service-page .school-content-head {
    align-items: stretch;
    flex-direction: column;
  }

  .school-service-page .school-course-grid,
  .school-service-page .school-event-grid,
  .school-service-page .school-manager-grid,
  .school-service-page .school-stat-grid,
  .school-service-page .school-account-grid {
    grid-template-columns: 1fr;
  }

  .school-service-page .school-placeholder {
    min-height: 170px;
    padding: 22px 18px;
  }

  .school-service-page .school-table-actions {
    justify-content: flex-start;
  }

  .school-service-page .school-access-card {
    width: calc(100% - 24px);
    margin-top: 24px;
    padding: 26px 20px;
  }

  .school-service-page.auth-section {
    padding: 20px 0 32px;
  }

  .school-login-layout {
    width: min(460px, calc(100vw - 28px));
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .school-login-visual {
    min-height: 210px;
    max-height: 270px;
    border-radius: 16px;
  }

  .admin-school-card {
    padding: 16px;
  }

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

@media (max-width: 620px) {
  .article-document-images {
    margin: 18px 0 22px;
  }

  .official-source {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .content-image-admin-row,
  .related-content-admin-row {
    grid-template-columns: 1fr;
  }

  .content-image-admin-row img {
    width: 100%;
    height: auto;
    max-height: 220px;
  }

  .content-image-admin-actions,
  .related-content-admin-actions {
    justify-content: flex-start;
  }

  .related-content-picker {
    grid-template-columns: 1fr;
  }

  .article-pdf {
    margin: 18px 0 22px;
  }

  .pdf-document-pages {
    gap: 10px;
  }

  .pdf-document-page {
    border-radius: 2px;
    box-shadow: 0 6px 18px rgba(18, 50, 74, 0.08);
  }

  .pdf-inline-fallback,
  .admin-pdf-current {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-card-text .card-body {
    min-height: 0;
  }
}

/* 2026-07 content-service redesign
   Shape system: containers 16px, controls 10px, semantic status labels may use pills. */
:root {
  --bg: #f3f6f8;
  --soft: #eaf0f4;
  --soft-2: #dce8ef;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #102638;
  --muted: #5b6f7f;
  --line: #ccd8e1;
  --brand: #0b5688;
  --brand-2: #0b3558;
  --accent: #0b5688;
  --gold: #0b5688;
  --ok: #19704b;
  --danger: #a33b3b;
  --shadow: 0 18px 54px rgba(20, 57, 82, 0.1);
  --shadow-soft: 0 10px 30px rgba(20, 57, 82, 0.07);
  --radius-container: 16px;
  --radius-control: 10px;
  --content-width: 1380px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08141e;
    --soft: #0d1e2a;
    --soft-2: #132a39;
    --surface: #0d1b26;
    --surface-raised: #122431;
    --ink: #e8f0f5;
    --muted: #a4b4bf;
    --line: #294353;
    --brand: #67add2;
    --brand-2: #d6eaf5;
    --accent: #67add2;
    --ok: #69b891;
    --danger: #e28b8b;
    --shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.18);
  }
}

html {
  background: var(--bg);
  scroll-padding-top: 84px;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 92% 6%, rgba(11, 86, 136, 0.07), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 58%, transparent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--brand-2);
  color: #f7fbfd;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.nav-inner,
.container,
.footer-inner,
.footer-bottom {
  width: min(var(--content-width), calc(100% - 64px));
}

.site-header {
  z-index: 30;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  box-shadow: 0 5px 24px rgba(20, 57, 82, 0.05);
  backdrop-filter: blur(18px) saturate(125%);
}

.nav-inner {
  min-height: 76px;
  gap: 32px;
}

.brand {
  min-width: 350px;
  gap: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: var(--brand-2);
  box-shadow: 0 10px 24px rgba(11, 53, 88, 0.2);
  font-size: 17px;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-title {
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.nav {
  min-width: 0;
  flex: 1;
  flex-wrap: nowrap;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav button {
  position: relative;
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 11px;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav button:hover,
.nav button.active {
  background: var(--soft);
  color: var(--brand-2);
}

.nav button:active,
.btn:active,
.service-map-list button:active {
  transform: translateY(1px) scale(0.99);
}

.hero {
  min-height: clamp(520px, 68dvh, 700px);
  height: auto;
  isolation: isolate;
  background: #0b3558;
}

.hero-carousel,
.hero-slide,
.hero-slide picture,
.hero-slide img,
.hero-shade {
  min-height: 100%;
}

.hero-slide {
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide img {
  object-position: center 42%;
  transform: scale(1.015);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(6, 28, 45, 0.93) 0%, rgba(6, 35, 58, 0.78) 38%, rgba(6, 35, 58, 0.32) 72%, rgba(6, 35, 58, 0.14) 100%),
    linear-gradient(0deg, rgba(6, 25, 41, 0.52), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: clamp(520px, 68dvh, 700px);
  padding-top: clamp(70px, 10vh, 104px);
  padding-bottom: 92px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}

.hero-kicker,
.section-label,
.pillar-type {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-kicker {
  color: #b9d8e9;
}

.hero-content h1 {
  max-width: 770px;
  margin: 20px 0 20px;
  color: #f4f9fb;
  font-size: clamp(42px, 5.2vw, 72px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-content > p {
  max-width: 570px;
  margin: 0;
  color: rgba(237, 246, 250, 0.86);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-content .hero-actions {
  margin-top: 30px;
  pointer-events: auto;
}

.btn {
  min-height: 44px;
  padding: 0 19px;
  border-radius: var(--radius-control);
  background: var(--brand);
  color: #f7fbfd;
  box-shadow: none;
  font-weight: 700;
  line-height: 1.2;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.btn:hover {
  background: color-mix(in srgb, var(--brand) 84%, #052b45);
}

.btn.secondary {
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  background: var(--surface);
  color: var(--brand);
}

.btn.secondary:hover {
  border-color: var(--brand);
  background: var(--soft);
}

.hero-primary {
  min-height: 50px;
  padding-inline: 23px;
  background: #f2f7fa;
  color: #0b3558;
}

.hero-primary:hover {
  background: #ffffff;
}

.hero-secondary {
  min-height: 50px;
  border: 1px solid rgba(239, 247, 251, 0.5);
  background: rgba(8, 39, 63, 0.4);
  color: #f2f7fa;
  backdrop-filter: blur(8px);
}

.hero-secondary:hover {
  background: rgba(8, 39, 63, 0.72);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 28px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-dots {
  position: static;
  pointer-events: auto;
}

.hero-dots button {
  width: 34px;
  height: 4px;
  border-radius: 2px;
}

.hero-dots button.active {
  background: #f2f7fa;
}

.trust-strip {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.trust-strip-inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(520px, 1.4fr);
  align-items: center;
  gap: 52px;
  min-height: 116px;
  padding-block: 20px;
}

.trust-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.trust-strip-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.trust-strip-stat {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 10px;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: color 180ms ease, transform 180ms ease;
}

.trust-strip-stat:hover .trust-strip-number,
.trust-strip-stat:focus-visible .trust-strip-number {
  color: var(--brand);
}

.trust-strip-stat:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 44%, transparent);
  outline-offset: 5px;
}

.trust-strip-number {
  color: var(--brand-2);
  font-size: 34px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.trust-strip-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.pillar-band {
  z-index: auto;
  margin: 0;
  padding: 88px 0 24px;
}

.pillar-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.pillar-card {
  position: relative;
  min-height: 212px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
  box-shadow: none;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.pillar-card-1,
.pillar-card-4 {
  grid-column: span 7;
}

.pillar-card-2,
.pillar-card-3 {
  grid-column: span 5;
}

.pillar-card-1 {
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface) 72%, transparent)),
    url("./public/scheme1-hero-whitelist.png") center 42% / cover;
}

.pillar-card-4 {
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--surface) 70%, transparent)),
    url("./public/scheme1-event-cover.png") center / cover;
}

.pillar-card:hover,
.pillar-card:focus-visible {
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.pillar-type {
  display: inline-block;
  margin-bottom: 34px;
}

.pillar-card h3 {
  max-width: 520px;
  margin-bottom: 10px;
  color: var(--brand-2);
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.03em;
}

.pillar-card p {
  max-width: 500px;
  color: var(--muted);
  font-size: 15px;
}

.pillar-card > b {
  position: absolute;
  right: 24px;
  bottom: 22px;
  color: var(--brand);
  font-size: 22px;
  font-weight: 500;
}

.section {
  padding: clamp(72px, 8vw, 118px) 0;
}

.section.alt {
  background: var(--soft);
}

.section-head {
  align-items: flex-end;
  margin-bottom: 30px;
}

.section-head h2,
.service-map-copy h2 {
  color: var(--brand-2);
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 740;
  line-height: 1.15;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-head p,
.service-map-copy p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.8;
  text-wrap: pretty;
}

.section-head p {
  margin-top: 11px;
}

.compact-head {
  align-items: flex-end;
}

.compact-head h2 {
  font-size: 30px;
}

.compact-head p {
  font-size: 14px;
}

.registration-home-section {
  background: var(--bg);
}

.registration-empty-entry {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
  box-shadow: none;
}

.service-map-section {
  overflow: hidden;
  background: #f2f6f9;
}

.service-map-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(540px, 1.22fr);
  gap: clamp(52px, 8vw, 112px);
  align-items: start;
}

.service-map-copy {
  position: sticky;
  top: 120px;
}

.service-map-copy h2 {
  margin: 18px 0;
}

.service-map-visual {
  width: min(100%, 440px);
  margin: 34px 0 0;
  overflow: visible;
}

.service-map-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.service-map-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}

.service-map-list li {
  position: relative;
}

.service-map-list li:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 70px;
  bottom: -25px;
  left: 25px;
  width: 1px;
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  content: "";
}

.service-map-list button {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  grid-template-columns: 52px minmax(0, 1fr) minmax(108px, auto);
  align-items: center;
  gap: 22px;
  min-height: 112px;
  padding: 20px 14px 20px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background 180ms ease, color 180ms ease, padding 180ms ease;
}

.service-map-list button:hover {
  padding-inline: 10px 18px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  color: var(--brand);
}

.service-step-number {
  position: relative;
  z-index: 2;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 26%, transparent);
  border-radius: 50%;
  background: #f2f6f9;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.service-map-list button:hover .service-step-number {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.service-step-copy {
  display: grid;
  gap: 8px;
}

.service-step-copy strong {
  font-size: 18px;
}

.service-step-copy > span {
  color: var(--muted);
  line-height: 1.65;
}

.service-step-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--brand-2);
  white-space: nowrap;
}

.service-step-action small {
  font-size: 13px;
  font-weight: 650;
}

.service-step-action b {
  font-size: 22px;
  font-weight: 500;
}

.service-step-action b {
  transition: transform 180ms ease;
}

.service-map-list button:hover .service-step-action b {
  transform: translateX(5px);
}

.feature-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.home-event-files-section .content-grid {
  gap: clamp(24px, 4vw, 56px);
}

.card,
.news-row,
.admin-panel,
.form-panel,
.lesson-row,
.article,
.sidebar,
.auth-card {
  border-color: var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
  box-shadow: none;
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.course-grid,
.equipment-grid,
.registration-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.content-card,
.course-card,
.equipment-card,
.registration-card {
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.content-card:hover,
.course-card:hover,
.equipment-card:hover,
.registration-card:hover {
  border-color: color-mix(in srgb, var(--brand) 56%, var(--line));
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.card-body {
  padding: 24px;
}

.card h3,
.news-row h3,
.admin-panel h3,
.form-panel h3 {
  color: var(--ink);
}

.content-card h3 {
  min-height: 0;
}

.content-card-text {
  border-top: 0;
}

.content-card-text .card-body {
  min-height: 250px;
  padding-top: 28px;
  border-top: 4px solid var(--brand);
}

.thumb {
  background: var(--soft-2);
}

.thumb img {
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .thumb img {
  transform: scale(1.025);
}

.course-card .thumb::after {
  left: 16px;
  bottom: 14px;
  border-radius: 6px;
  background: rgba(7, 50, 80, 0.84);
}

.news-list {
  border-top: 1px solid var(--line);
  gap: 0;
}

.news-row {
  grid-template-columns: 92px 1fr auto;
  gap: 24px;
  padding: 24px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.news-row:hover {
  background: color-mix(in srgb, var(--surface) 58%, transparent);
}

.date-box {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.page-masthead,
.registration-page-head,
.topic-page-head {
  margin-bottom: 42px;
  padding: clamp(32px, 4vw, 58px);
  border-radius: var(--radius-container);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--brand-2) 96%, transparent), color-mix(in srgb, var(--brand) 86%, transparent)),
    url("./public/scheme1-service-cover.png") center / cover;
  color: #eef7fb;
}

.page-masthead h1,
.registration-page-head h1,
.topic-page-head h1 {
  max-width: 850px;
  margin: 18px 0 14px;
  color: #f3f9fb;
  font-size: clamp(38px, 4.5vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.page-masthead p,
.registration-page-head p,
.topic-page-head p {
  max-width: 65ch;
  margin: 0;
  color: rgba(239, 247, 251, 0.82);
  line-height: 1.75;
}

.page-masthead .section-label,
.registration-page-head .topic-kicker,
.topic-page-head .topic-kicker {
  color: #b9d8e9;
}

.registration-page-stat,
.topic-count-block {
  border-color: rgba(238, 247, 251, 0.3);
  background: rgba(7, 39, 62, 0.36);
  color: #f3f9fb;
  backdrop-filter: blur(8px);
}

.article {
  padding: clamp(28px, 4vw, 52px);
}

.article h1,
.course-detail > h1,
.contact-info h1 {
  color: var(--brand-2);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.18;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.article-content {
  color: var(--ink);
  line-height: 1.95;
}

.article-content p,
.article-content li {
  max-width: 72ch;
}

.two-col {
  grid-template-columns: minmax(0, 1.58fr) minmax(280px, 0.72fr);
  gap: 32px;
}

.sidebar,
.form-panel {
  padding: 24px;
}

.topic-competition-section {
  border-radius: var(--radius-container);
  background: var(--surface);
}

.topic-competition-row {
  background: transparent;
}

.topic-competition-row:hover {
  background: var(--soft);
}

.content-list-toolbar,
.course-tabs,
.certificate-center-tabs,
.auth-tabs,
.filter-pills,
.admin-content-tabs {
  border-color: var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

input,
select,
textarea,
.rich-editor-input {
  border-color: var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

.auth-section {
  min-height: calc(100dvh - 76px);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--bg) 88%, transparent), var(--bg)),
    url("./public/scheme1-service-cover.png") center / cover;
}

.auth-card {
  box-shadow: var(--shadow);
}

.auth-brand,
.auth-title {
  color: var(--brand-2);
  letter-spacing: -0.03em;
}

.footer {
  padding: 66px 0 0;
  border-top: 1px solid var(--line);
  background: #092538;
  color: #e5f0f5;
}

.footer-inner {
  grid-template-columns: 1.35fr 0.65fr 0.8fr;
  gap: clamp(36px, 6vw, 90px);
  padding-bottom: 48px;
}

.footer h3 {
  color: #f1f7fa;
}

.footer p,
.footer a,
.footer button,
.footer div {
  color: rgba(229, 240, 245, 0.76);
}

.footer-statement {
  max-width: 48ch;
  line-height: 1.75;
}

.footer-service-links {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-service-links button,
.footer-service-links a {
  width: max-content;
  padding: 3px 0;
  background: transparent;
  text-align: left;
}

.footer a:hover,
.footer button:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 0 26px;
  border-top: 1px solid rgba(229, 240, 245, 0.14);
}

.footer-bottom p {
  max-width: 78ch;
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.footer-bottom > div {
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
  font-size: 12px;
}

.floating-tools {
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.floating-tools button {
  min-width: 58px;
  min-height: 42px;
  padding: 0 12px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.floating-tools button:last-child {
  border-right: 0;
}

.support-window {
  border-color: var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.not-found-page {
  min-height: calc(100dvh - 76px);
  display: grid;
  place-items: center;
}

.not-found-shell {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(36px, 6vw, 80px);
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
}

.not-found-code {
  color: var(--brand);
  font-size: clamp(58px, 10vw, 120px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.08em;
}

.not-found-shell h1 {
  margin: 0 0 12px;
  color: var(--brand-2);
  font-size: clamp(30px, 4vw, 48px);
}

.not-found-shell p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

/* Product surfaces keep their existing information architecture with the same tokens. */
.school-service-page,
.admin-main {
  background: var(--bg);
  color: var(--ink);
}

.school-service-page .school-workspace-header,
.school-service-page .school-shell,
.school-service-page .school-course-card,
.school-service-page .school-event-card,
.school-service-page .school-class-card,
.school-service-page .school-stat-card,
.school-service-page .school-admin-section,
.admin-shell,
.admin-panel {
  border-color: var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
  box-shadow: none;
}

.school-service-page .school-workspace-header,
.admin-sidebar {
  background: #0b3558;
}

.school-service-page .school-content-head h1,
.school-service-page .school-content-head h2,
.admin-topbar h2,
.admin-toolbar h3 {
  color: var(--brand-2);
  letter-spacing: -0.035em;
}

.admin-menu button {
  border-radius: var(--radius-control);
}

.admin-menu button.active,
.admin-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1180px) {
  .nav-inner,
  .container,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 40px, var(--content-width));
  }

  .nav-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 12px;
  }

  .brand {
    min-width: 0;
    padding-bottom: 10px;
  }

  .nav {
    width: 100%;
    padding-bottom: 8px;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .trust-strip-inner,
  .service-map-layout {
    grid-template-columns: 1fr;
  }

  .trust-strip-inner {
    gap: 24px;
  }

  .service-map-copy {
    position: static;
  }

  .service-map-visual {
    width: min(100%, 520px);
  }

  .pillar-card-1,
  .pillar-card-2,
  .pillar-card-3,
  .pillar-card-4 {
    grid-column: span 6;
  }

  .course-grid,
  .equipment-grid,
  .registration-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-columns,
  .footer-inner,
  .two-col {
    grid-template-columns: 1fr;
  }

  .home-event-files-section .content-grid {
    grid-template-columns: 1fr;
  }

  .not-found-shell {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .nav-inner,
  .container,
  .footer-inner,
  .footer-bottom {
    width: calc(100% - 28px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand-title {
    max-width: 260px;
    font-size: 15px;
  }

  .brand-subtitle {
    display: none;
  }

  .nav button {
    padding-inline: 10px;
    font-size: 13px;
  }

  .hero,
  .hero-content {
    min-height: 590px;
  }

  .hero-content {
    padding-top: 58px;
    padding-bottom: 86px;
    justify-content: flex-end;
  }

  .hero-content h1 {
    margin-block: 16px;
    font-size: clamp(30px, 8.2vw, 34px);
    line-height: 1.12;
    letter-spacing: -0.06em;
  }

  .hero-content > p {
    font-size: 15px;
    line-height: 1.65;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 150px;
  }

  .trust-strip-inner {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 18px;
    padding-block: 24px;
  }

  .trust-strip-stat {
    grid-template-columns: 1fr;
    gap: 4px;
    padding-left: 14px;
  }

  .trust-strip-stat:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .trust-strip-number {
    font-size: 30px;
  }

  .trust-strip-label {
    line-height: 1.45;
  }

  .pillar-band,
  .section {
    padding-top: 68px;
    padding-bottom: 76px;
  }

  .pillar-card-1,
  .pillar-card-2,
  .pillar-card-3,
  .pillar-card-4 {
    grid-column: 1 / -1;
  }

  .pillar-card {
    min-height: 190px;
    padding: 24px;
  }

  .content-grid,
  .course-grid,
  .equipment-grid,
  .registration-card-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .compact-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head .btn,
  .compact-head .btn {
    width: 100%;
  }

  .service-map-list button {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 14px;
    min-height: 116px;
    padding-block: 20px;
  }

  .service-step-number {
    width: 46px;
    height: 46px;
  }

  .service-map-list li:not(:last-child)::after {
    top: 66px;
    left: 22px;
  }

  .service-step-action small {
    display: none;
  }

  .page-masthead,
  .registration-page-head,
  .topic-page-head {
    padding: 28px 22px;
  }

  .news-row {
    grid-template-columns: 68px 1fr;
    gap: 16px;
  }

  .news-row > .btn {
    grid-column: 2;
    width: max-content;
  }

  .article {
    padding: 24px 20px;
  }

  .footer-bottom > div {
    flex-wrap: wrap;
  }

  .floating-tools button[data-device-mode] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Full-site product surface pass
   Extends the public-service visual system to every route and role workspace. */
.site-main {
  min-height: 60dvh;
  background: var(--bg);
}

.site-main > .section,
.admin-main > .section {
  position: relative;
}

.btn,
.auth-submit,
.auth-register,
.admin-logout,
.detail-back-link,
.text-button {
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn:active,
.auth-submit:active,
.auth-register:active,
.admin-logout:active,
.detail-back-link:active,
.text-button:active {
  transform: translateY(1px) scale(0.985);
}

.detail-back-link {
  display: inline-flex;
  align-items: center;
  margin: 0 0 26px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.detail-back-link:hover {
  color: var(--brand-2);
  transform: translateX(-3px);
}

.empty {
  min-height: 132px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 28px;
  border: 1px dashed color-mix(in srgb, var(--brand) 32%, var(--line));
  border-radius: var(--radius-container);
  background: color-mix(in srgb, var(--soft) 62%, var(--surface));
  color: var(--muted);
  line-height: 1.7;
}

.empty::before {
  content: "";
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--brand);
}

.empty strong {
  color: var(--ink);
  font-size: 18px;
}

.empty p {
  margin: 0;
}

.table-scroll {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  scrollbar-width: thin;
}

.table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--soft) 70%, var(--surface));
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-align: left;
}

.table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.65;
  vertical-align: top;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: color-mix(in srgb, var(--soft) 42%, transparent);
}

.compact-table-scroll .table {
  min-width: 620px;
}

/* Authentication and account setup */
.auth-section {
  display: grid;
  align-items: center;
  padding-block: clamp(52px, 8vw, 110px);
}

.auth-page-layout,
.admin-auth-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(390px, 0.92fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
}

.auth-context-panel,
.admin-auth-context {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(34px, 5vw, 66px);
  border-radius: var(--radius-container);
  background:
    linear-gradient(180deg, rgba(6, 36, 58, 0.08), rgba(6, 36, 58, 0.94)),
    url("./public/school-service-login-illustration.png") center / cover;
  color: #eef7fb;
  box-shadow: var(--shadow);
}

.auth-context-kicker,
.admin-auth-context > span {
  margin-bottom: 16px;
  color: #b9d8e9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.auth-context-panel h2,
.admin-auth-context h1 {
  max-width: 12ch;
  margin: 0 0 18px;
  color: #f5fafc;
  font-size: clamp(36px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.auth-context-panel > p,
.admin-auth-context > p {
  max-width: 52ch;
  margin: 0;
  color: rgba(238, 247, 251, 0.8);
  line-height: 1.8;
}

.auth-context-points {
  display: grid;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid rgba(238, 247, 251, 0.22);
}

.auth-context-points span {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(238, 247, 251, 0.16);
  color: rgba(238, 247, 251, 0.9);
}

.auth-context-points b {
  color: #89bed7;
  font-size: 12px;
}

.auth-context-home {
  width: max-content;
  margin-top: 26px;
  padding: 0;
  background: transparent;
  color: #eef7fb;
  font-weight: 750;
}

.auth-context-home:hover {
  color: #b9d8e9;
}

body:has(.page-profile .auth-section) .floating-tools button[data-device-mode],
body:has(.page-school .auth-section) .floating-tools button[data-device-mode] {
  display: none;
}

.auth-card,
.admin-login-card {
  width: 100%;
  max-width: 560px;
  margin: 0;
  padding: clamp(30px, 4vw, 50px);
}

.auth-card::before,
.admin-login-card::before {
  content: "";
  display: block;
  width: 42px;
  height: 5px;
  margin-bottom: 28px;
  border-radius: 3px;
  background: var(--brand);
}

.auth-brand,
.auth-title,
.admin-login-card h3 {
  margin-top: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}

.auth-row,
.field {
  gap: 8px;
}

.auth-row label,
.field label,
.field legend {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.auth-row input,
.auth-row select,
.field input,
.field select,
.field textarea {
  min-height: 46px;
}

.auth-tabs {
  padding: 5px;
}

.auth-tabs button {
  min-height: 40px;
  border-radius: 7px;
}

.auth-tabs button.active {
  background: var(--brand);
  color: #fff;
}

.auth-actions {
  gap: 10px;
}

.auth-submit,
.auth-register {
  min-height: 48px;
  border-radius: var(--radius-control);
}

/* Public detail and service routes */
.page-registrations .section,
.page-event-files .section,
.page-file-insights .section,
.page-news .section,
.page-activities .section,
.page-equipment .section,
.page-courses .section,
.page-certificates .section,
.page-join .section,
.page-profile .section {
  background: var(--bg);
}

.article {
  position: relative;
  overflow: hidden;
}

.article::before,
.course-detail::before,
.certificate-query-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--brand);
}

.article > h1,
.course-detail > h1 {
  max-width: 18ch;
  margin-top: 0;
}

.article > .meta,
.course-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 20px 0 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.activity-image,
.registration-cover,
.course-cover {
  overflow: hidden;
  margin: 28px 0;
  border-radius: 12px;
  background: var(--soft);
}

.activity-image img,
.registration-cover img,
.course-cover img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.sidebar,
.detail-sidebar-stack > .form-panel {
  position: sticky;
  top: 108px;
}

.detail-sidebar-stack {
  display: grid;
  align-content: start;
  gap: 20px;
}

.detail-sidebar-stack > * + * {
  position: static;
}

.sidebar h3,
.form-panel h3 {
  margin: 0 0 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
}

.side-link {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  line-height: 1.5;
  text-align: left;
}

.side-link:hover,
.side-link.active {
  color: var(--brand);
  transform: translateX(3px);
}

.registration-detail-shell,
.certificate-query-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(320px, 0.62fr);
  gap: 32px;
  align-items: start;
}

.registration-detail-info {
  min-width: 0;
}

.registration-form-panel,
.signup-panel {
  padding: 28px;
}

.registration-state,
.registration-mode,
.certificate-available,
.status {
  font-weight: 750;
}

.registration-card .registration-time {
  margin-top: auto;
  padding-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.registration-card .card-body,
.course-card .card-body,
.equipment-card .card-body {
  display: flex;
  flex-direction: column;
}

.registration-card .btn,
.course-card .btn,
.equipment-card .btn,
.content-card .btn {
  width: max-content;
  margin-top: auto;
}

.course-detail {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
}

.course-tabs,
.certificate-center-tabs,
.admin-content-tabs,
.filter-pills {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  padding: 5px;
  overflow-x: auto;
}

.course-tabs button,
.certificate-center-tabs button,
.admin-content-tabs button,
.filter-pills button {
  min-height: 38px;
  padding-inline: 16px;
  border-radius: 7px;
  white-space: nowrap;
}

.course-tabs button.active,
.certificate-center-tabs button.active,
.admin-content-tabs button.active,
.filter-pills button.active {
  background: var(--brand);
  color: #fff;
}

.course-tab-panel {
  padding-top: 30px;
}

.lesson-row {
  padding: 22px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, var(--soft));
}

.lesson-row + .lesson-row {
  margin-top: 12px;
}

.lesson-row h3 span {
  color: var(--brand);
}

.lesson-page .video-box {
  overflow: hidden;
  border-radius: 12px;
  background: #061b2a;
  box-shadow: 0 22px 50px rgba(6, 37, 56, 0.22);
}

.lesson-work-panel,
.review-box,
.learning-status {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}

.certificate-page-head,
.certificate-query-heading {
  padding: clamp(34px, 5vw, 64px);
  border-radius: var(--radius-container);
  background:
    radial-gradient(circle at 86% 10%, rgba(134, 192, 218, 0.3), transparent 32%),
    #092f4b;
  color: #eef7fb;
}

.certificate-page-head h1,
.certificate-query-heading h1 {
  margin: 12px 0 0;
  color: #fff;
  font-size: clamp(42px, 5vw, 66px);
  letter-spacing: -0.055em;
}

.certificate-page .certificate-center-tabs {
  margin: -22px 28px 34px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-soft);
}

.certificate-center-intro {
  margin-bottom: 28px;
}

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

.certificate-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  overflow: hidden;
}

.certificate-card-mark {
  display: grid;
  place-items: center;
  background: var(--brand-2);
  color: rgba(255, 255, 255, 0.92);
  font-size: 32px;
  font-weight: 800;
}

.certificate-query-shell {
  grid-template-columns: 1fr;
  max-width: 980px;
}

.certificate-query-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
}

.certificate-query-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-shell {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: stretch;
}

.contact-map-card {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(32px, 5vw, 54px);
  border-radius: var(--radius-container);
  background:
    linear-gradient(180deg, rgba(5, 38, 60, 0.08), rgba(5, 38, 60, 0.92)),
    url("./public/scheme1-service-cover.png") center / cover;
  color: #eef7fb;
}

.contact-map-card strong {
  max-width: 14ch;
  margin: 14px 0;
  color: #fff;
  font-size: clamp(30px, 3.5vw, 48px);
  line-height: 1.15;
}

.contact-map-action {
  color: #b9d8e9;
  font-weight: 700;
}

.topic-competition-section {
  overflow-x: auto;
}

.topic-list-head,
.topic-competition-row {
  min-width: 880px;
}

.topic-article {
  margin-top: 28px;
}

/* Personal center */
.profile-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(34px, 5vw, 62px);
  border-radius: var(--radius-container);
  background:
    radial-gradient(circle at 88% 12%, rgba(151, 204, 226, 0.26), transparent 34%),
    #0a3555;
  color: #eaf5fa;
}

.profile-identity h1 {
  max-width: 16ch;
  margin: 12px 0;
  color: #fff;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.profile-identity > p {
  margin: 0;
  color: rgba(234, 245, 250, 0.78);
}

.profile-identity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.profile-identity-tags span {
  padding: 8px 11px;
  border: 1px solid rgba(234, 245, 250, 0.22);
  border-radius: 8px;
  color: rgba(234, 245, 250, 0.88);
  font-size: 12px;
}

.profile-hero .btn.secondary {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--line);
}

.profile-stat-grid button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 18px;
  padding: 24px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.profile-stat-grid button:hover {
  background: var(--soft);
}

.profile-stat-grid strong {
  grid-row: span 2;
  color: var(--brand);
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}

.profile-stat-grid small {
  color: var(--muted);
}

.profile-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.45fr);
  gap: 22px;
}

.profile-block,
.profile-quick-panel {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-container);
  background: var(--surface);
}

.profile-course-block {
  margin: 0;
}

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

.profile-quick-panel h2 {
  margin: 10px 0 20px;
}

.profile-quick-panel > button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  width: 100%;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.profile-quick-panel > button span {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.profile-quick-panel > button b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--brand);
}

.profile-data-block,
.profile-activity-grid {
  margin-top: 22px;
}

.profile-activity-grid {
  align-items: stretch;
}

/* School workspace */
.school-workspace-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(420px, 1.4fr) minmax(180px, 0.58fr);
  align-items: center;
  gap: 20px;
  padding: 12px clamp(20px, 3vw, 42px);
  border-radius: 0 !important;
  color: #eef7fb;
}

.school-workspace-brand strong,
.school-identity strong {
  color: #fff;
}

.school-workspace-brand small,
.school-identity span {
  display: block;
  margin-top: 3px;
  color: rgba(238, 247, 251, 0.66);
  font-size: 12px;
}

.school-workspace-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
}

.school-workspace-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  color: rgba(238, 247, 251, 0.76);
  white-space: nowrap;
}

.school-workspace-tabs button:hover,
.school-workspace-tabs button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.school-identity {
  text-align: right;
}

.school-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: min(100% - 40px, 1500px);
  min-height: calc(100dvh - 118px);
  margin: 20px auto;
  overflow: hidden;
}

.school-sidebar {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--soft) 72%, var(--surface));
}

.school-sidebar-title {
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--line);
}

.school-sidebar-title strong,
.school-sidebar-title span {
  display: block;
}

.school-sidebar-title span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.school-sidebar-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.school-sidebar-list button {
  display: flex;
  justify-content: space-between;
  padding: 13px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-align: left;
}

.school-sidebar-list button:hover,
.school-sidebar-list button.active {
  background: var(--surface);
  color: var(--brand);
}

.school-content {
  min-width: 0;
  padding: clamp(28px, 4vw, 52px);
  background: var(--surface);
}

.school-content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.school-content-head h1 {
  margin: 8px 0;
  font-size: clamp(34px, 4vw, 52px);
}

.school-content-head p {
  max-width: 64ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.school-course-grid,
.school-event-grid,
.school-manager-grid,
.school-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.school-stat-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
}

.school-stat-card {
  padding: 22px;
}

.school-stat-card span,
.school-stat-card strong {
  display: block;
}

.school-stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.school-stat-card strong {
  margin-top: 8px;
  color: var(--brand);
  font-size: 36px;
}

.school-course-card,
.school-event-card,
.school-class-card,
.school-admin-section {
  overflow: hidden;
  padding: 24px;
}

.school-course-card:hover,
.school-event-card:hover,
.school-class-card:hover {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  transform: translateY(-2px);
}

.school-course-cover {
  min-height: 190px;
  margin: -24px -24px 22px;
  overflow: hidden;
  background: var(--soft-2);
}

.school-course-cover img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.school-admin-section {
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--soft) 60%, var(--surface));
}

.school-placeholder,
.school-access-card {
  min-height: 260px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px dashed color-mix(in srgb, var(--brand) 34%, var(--line));
  border-radius: var(--radius-container);
  background: var(--soft);
  text-align: center;
}

.school-placeholder p,
.school-access-card p {
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.75;
}

/* Administration workspace */
.admin-main {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
}

.admin-auth-section {
  min-height: 100dvh;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 12% 15%, rgba(71, 132, 165, 0.14), transparent 32%),
    var(--bg);
}

.admin-auth-context {
  background:
    linear-gradient(180deg, rgba(4, 31, 49, 0.1), rgba(4, 31, 49, 0.95)),
    url("./public/scheme1-service-cover.png") center / cover;
}

.admin-auth-context > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.admin-auth-context > div b {
  padding: 8px 10px;
  border: 1px solid rgba(238, 247, 251, 0.2);
  border-radius: 7px;
  color: rgba(238, 247, 251, 0.85);
  font-size: 12px;
}

.admin-loading-state {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-loading-state > span {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: adminSpin 800ms linear infinite;
}

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

.admin-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  border: 0;
  border-radius: 0;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  border-radius: 0;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 24px;
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  text-align: left;
}

.admin-menu {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  scrollbar-width: thin;
}

.admin-menu button {
  min-height: 40px;
  padding: 0 13px;
  color: rgba(238, 247, 251, 0.72);
  text-align: left;
}

.admin-menu button.active,
.admin-menu button:hover {
  color: #fff;
}

.admin-logout {
  min-height: 42px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}

.admin-content {
  min-width: 0;
  padding: 0 clamp(22px, 3.5vw, 52px) 54px;
  background: var(--bg);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 96px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}

.admin-topbar h2 {
  margin: 0 0 6px;
  font-size: clamp(26px, 3vw, 38px);
}

.admin-topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-panel {
  min-width: 0;
  overflow-x: auto;
  padding: clamp(22px, 3vw, 34px);
}

.admin-panel + .admin-panel {
  margin-top: 18px;
}

.admin-panel > h3:first-child {
  margin-top: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 23px;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-toolbar h3 {
  margin: 0;
  font-size: 23px;
}

.admin-toolbar .summary {
  display: block;
  max-width: 66ch;
  margin-top: 7px;
  line-height: 1.65;
}

.admin-panel > .table {
  min-width: 860px;
}

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

.quick-grid .btn {
  min-height: 64px;
  justify-content: flex-start;
  text-align: left;
}

.admin-note {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--brand);
  border-radius: 0 8px 8px 0;
  background: var(--soft);
  color: var(--muted);
  line-height: 1.7;
}

.form-grid {
  gap: 18px;
}

.pagination {
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .auth-page-layout,
  .admin-auth-layout,
  .contact-shell,
  .profile-dashboard-grid,
  .registration-detail-shell {
    grid-template-columns: 1fr;
  }

  .auth-context-panel,
  .admin-auth-context {
    min-height: 420px;
  }

  .auth-card,
  .admin-login-card {
    max-width: none;
  }

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

  .school-workspace-header {
    grid-template-columns: 1fr auto;
  }

  .school-workspace-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

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

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

  .sidebar,
  .detail-sidebar-stack > .form-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: sticky;
    z-index: 30;
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
  }

  .admin-brand {
    padding: 0;
  }

  .admin-brand .brand-mark {
    width: 34px;
    height: 34px;
  }

  .admin-menu {
    display: flex;
    padding: 0;
    overflow-x: auto;
    border-top: 0;
  }

  .admin-menu button {
    white-space: nowrap;
  }

  .admin-logout {
    min-height: 36px;
    margin: 0;
    padding-inline: 10px;
  }

  .admin-content {
    padding: 0 16px 36px;
  }

  .admin-topbar {
    min-height: 82px;
  }

  .school-shell {
    display: block;
  }

  .school-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .school-sidebar-list {
    display: flex;
    overflow-x: auto;
  }

  .school-sidebar-list button {
    min-width: 180px;
  }

  .school-course-grid,
  .school-event-grid,
  .school-manager-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .auth-context-panel,
  .admin-auth-context {
    min-height: 360px;
    padding: 28px 24px;
  }

  .auth-context-panel h2,
  .admin-auth-context h1 {
    font-size: 34px;
  }

  .auth-card,
  .admin-login-card,
  .profile-block,
  .profile-quick-panel,
  .admin-panel,
  .school-content {
    padding: 24px 20px;
  }

  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-hero .actions,
  .profile-hero .btn {
    width: 100%;
  }

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

  .profile-course-block .course-grid,
  .certificate-query-fields,
  .school-stat-grid {
    grid-template-columns: 1fr;
  }

  .certificate-card {
    grid-template-columns: 1fr;
  }

  .certificate-card-mark {
    min-height: 72px;
  }

  .certificate-page .certificate-center-tabs {
    margin-inline: 14px;
  }

  .contact-map-card {
    min-height: 420px;
  }

  .school-workspace-header {
    grid-template-columns: 1fr;
  }

  .school-identity {
    display: none;
  }

  .school-workspace-tabs {
    grid-column: 1;
  }

  .school-shell {
    width: calc(100% - 20px);
    margin-block: 10px;
  }

  .school-content-head,
  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .school-content-head .btn,
  .admin-toolbar .btn {
    width: 100%;
  }

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