:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #edf2f2;
  --text: #172126;
  --muted: #66757f;
  --line: #dbe4e3;
  --primary: #0f766e;
  --primary-strong: #0b5f59;
  --primary-soft: #d9efec;
  --accent: #b45309;
  --accent-soft: #fdeccf;
  --blue: #2563eb;
  --blue-soft: #e1e9ff;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

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

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.public-site {
  background: #ffffff;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(219, 228, 227, 0.86);
  backdrop-filter: blur(16px);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-logo {
  display: block;
  width: clamp(128px, 13vw, 188px);
  height: auto;
  object-fit: contain;
}

.login-card .brand-logo {
  width: 220px;
}

.public-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #2687c8;
  color: #ffffff;
  letter-spacing: 0;
}

.public-nav nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #42545f;
  font-size: 14px;
  font-weight: 750;
}

.login-link {
  min-height: 40px;
  border: 1px solid #c9d9df;
  border-radius: 8px;
  background: #ffffff;
  color: #0f4d72;
  padding: 0 16px;
  font-weight: 800;
}

.public-hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #ffffff;
}

.public-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.public-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 25, 43, 0.82), rgba(10, 25, 43, 0.52) 45%, rgba(10, 25, 43, 0.22));
}

.public-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 860px;
  padding: clamp(72px, 12vw, 150px) clamp(24px, 7vw, 96px);
}

.public-hero-copy span,
.section-heading span,
.team-copy span,
.contact-section span {
  color: #2d91cf;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.public-hero-copy span {
  color: #e9f7ff;
}

.public-hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.98;
  letter-spacing: 0;
}

.public-hero p {
  max-width: 680px;
  margin: 0;
  color: #e9f0f4;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.public-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.public-actions .ghost-button {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
}

.public-section {
  padding: clamp(56px, 8vw, 100px) clamp(20px, 6vw, 80px);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 28px;
}

.section-heading h2,
.team-copy h2,
.contact-section h2 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.team-copy h3 {
  margin: 0 0 12px;
  color: #17344e;
  font-size: 22px;
}

.section-heading p,
.team-copy p,
.contact-section p {
  color: #52636d;
  font-size: 16px;
  line-height: 1.8;
}

.advantage-grid,
.process-grid,
.case-grid,
.placeholder-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.advantage-grid article,
.process-grid article,
.case-grid article {
  border: 1px solid #d8e6eb;
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
}

.advantage-grid strong,
.process-grid span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #d8eefb;
  color: #2687c8;
  font-weight: 900;
}

.advantage-grid h3,
.process-grid h3,
.case-grid h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.advantage-grid p,
.process-grid p,
.case-grid p {
  margin: 0;
  color: #52636d;
  line-height: 1.7;
}

.process-section {
  background: #f5f9fb;
}

.team-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  background: #ffffff;
}

.team-photo {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #d8e6eb;
  max-width: 420px;
}

.team-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  object-position: center top;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #102a3f;
  color: #ffffff;
}

.contact-section p {
  color: #e2edf3;
  margin: 6px 0;
}

.contact-section span {
  font-size: 22px;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: #ffffff;
  color: #17344e;
}

.qr-card img {
  display: block;
  width: 150px;
  aspect-ratio: 1;
  object-fit: cover;
}

.qr-card span {
  color: #17344e;
  font-size: 13px;
  font-weight: 850;
  text-transform: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(10, 25, 43, 0.82), rgba(10, 25, 43, 0.36)),
    url("./assets/brochure-cover.jpg") center / cover;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32);
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.form-error {
  display: none;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 750;
}

.form-error.is-active {
  display: block;
}

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

.sidebar {
  background: #102526;
  color: #f8fbfb;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 8px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: #f2b84b;
  color: #102526;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #aac0bf;
  font-size: 13px;
  margin-top: 3px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-group {
  color: #8fb0af;
  font-size: 12px;
  font-weight: 850;
  padding: 14px 12px 4px;
}

.nav-button {
  border: 0;
  color: #dce8e7;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  text-align: left;
}

.nav-button:hover,
.nav-button.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-button span:first-child {
  font-weight: 650;
}

.nav-count {
  color: #102526;
  background: #dff3f0;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  min-width: 24px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

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

.topbar,
.section-toolbar,
.panel-header,
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 22px;
}

.topbar h1,
.section-toolbar h2,
.panel h2,
.dialog-card h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 28px;
  line-height: 1.2;
}

.eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
  margin: 0 0 6px;
}

.muted,
.panel-header p {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 14px;
}

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

.user-chip {
  min-height: 40px;
  display: grid;
  align-content: center;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.user-chip span,
.user-chip small {
  line-height: 1.1;
}

.user-chip span {
  font-weight: 850;
}

.user-chip small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

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

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-width: 320px;
}

.search-box span {
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  border: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
}

.primary-button,
.ghost-button,
.text-button,
.icon-button {
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover {
  background: var(--primary-strong);
}

.ghost-button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.sidebar .ghost-button {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbfb;
  border-color: rgba(255, 255, 255, 0.16);
}

.text-button {
  background: transparent;
  color: var(--primary);
  padding: 0 6px;
}

.icon-button {
  width: 38px;
  padding: 0;
  background: var(--surface-2);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

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

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.metric strong {
  display: block;
  font-size: 28px;
  margin-top: 10px;
}

.metric small {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.wide {
  grid-column: 1 / -1;
}

.stack-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.list-card,
.student-card,
.task-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfdfd;
}

.list-card {
  display: grid;
  gap: 6px;
}

.list-card strong,
.student-card strong,
.task-card strong {
  display: block;
}

.list-card span,
.student-card span,
.task-card span {
  color: var(--muted);
  font-size: 13px;
}

.pipeline-board {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.pipeline-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.pipeline-track {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.pipeline-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.table-wrap {
  overflow: auto;
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: #f8fbfb;
}

td {
  font-size: 14px;
}

.main-table {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.main-table table {
  min-width: 920px;
}

.section-toolbar {
  margin-bottom: 16px;
}

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

.segment {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  min-height: 36px;
  padding: 0 12px;
  font-weight: 700;
}

.segment.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
}

.status-pill.green {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-pill.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-pill.amber {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  min-height: 30px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.student-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.student-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.student-card {
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.student-card.is-active {
  border-color: var(--primary);
  box-shadow: inset 4px 0 0 var(--primary);
}

.student-detail {
  min-height: 560px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.detail-header h2 {
  margin: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfdfd;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.subsection {
  margin-top: 22px;
}

.subsection h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

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

.task-column {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 420px;
  box-shadow: var(--shadow);
}

.task-column h2 {
  font-size: 16px;
  margin: 0 0 12px;
}

.task-card {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.permission-matrix {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(110px, 1fr));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.permission-matrix > div {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 110px;
}

.permission-matrix > div:nth-child(-n + 5) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  background: #f8fbfb;
}

.settings-grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

dialog {
  border: 0;
  padding: 0;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  max-width: min(760px, calc(100vw - 24px));
  width: 760px;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.dialog-card {
  background: var(--surface);
  padding: 20px;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 40px;
  padding: 9px 10px;
  background: #ffffff;
  color: var(--text);
}

textarea {
  resize: vertical;
}

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

menu {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: #fbfdfd;
}

@media (max-width: 1080px) {
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .public-nav nav {
    flex-wrap: wrap;
  }

  .advantage-grid,
  .process-grid,
  .case-grid,
  .team-section,
  .placeholder-grid,
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .metrics-grid,
  .dashboard-grid,
  .student-layout,
  .task-board {
    grid-template-columns: 1fr;
  }

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

  .topbar-actions,
  .toolbar-actions,
  .search-box {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .public-section,
  .public-hero-copy {
    padding-left: 18px;
    padding-right: 18px;
  }

  .public-nav nav {
    gap: 12px;
  }

  .advantage-grid,
  .process-grid,
  .case-grid,
  .team-section,
  .placeholder-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .main {
    padding: 18px;
  }

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

  .section-toolbar,
  .panel-header,
  .detail-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .full {
    grid-column: auto;
  }
}
