:root {
  --bg: #f5f7f4;
  --panel: #ffffff;
  --ink: #18211d;
  --muted: #65706b;
  --line: #dfe5df;
  --nav: #22312a;
  --accent: #2f7d61;
  --accent-strong: #206149;
  --blue: #315f9b;
  --danger: #b94a48;
  --danger-strong: #973634;
  --warn: #a46721;
  --shadow: 0 18px 50px rgba(25, 39, 31, 0.08);
}

.partner-detail-panel {
  margin-top: 18px;
  overflow: hidden;
}

.partner-detail-actions {
  display: flex;
  gap: 8px;
}

.partner-detail-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  padding: 18px;
  background: #f8fbf8;
}

.partner-detail-stat {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

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

.partner-detail-stat strong {
  font-size: 20px;
}

.partner-detail-section {
  border-top: 1px solid var(--line);
}

.compact-head {
  min-height: 52px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.compact-head h3 {
  margin: 0;
}

.partner-account-form {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  align-items: end;
}

.partner-student-search {
  max-width: 280px;
}

.partner-account-table,
.partner-student-table {
  min-width: 920px;
}

@media (max-width: 920px) {
  .partner-detail-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

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

@media (max-width: 640px) {
  .partner-detail-actions,
  .compact-head {
    align-items: stretch;
    flex-direction: column;
  }

  .partner-detail-stats {
    grid-template-columns: 1fr;
  }

  .partner-student-search {
    max-width: none;
  }
}

/* 内容模块子页面：总览、任务、模板、AI和数据互不铺开。 */
.content-subnav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7faf8;
}

.content-subnav-item {
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 9px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.content-subnav-item:hover,
.content-subnav-item.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 1px 4px rgba(35, 71, 47, .08);
}

.content-subview {
  display: grid;
  gap: 18px;
}

.content-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 18px;
}

.content-dashboard-stats,
.content-data-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.content-dashboard-stat,
.content-data-stat {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 14px;
  text-align: left;
}

.content-dashboard-stat {
  cursor: pointer;
}

.content-dashboard-stat:hover {
  border-color: #a9cdb7;
  background: #f1f8f3;
}

.content-dashboard-stat strong,
.content-data-stat strong {
  color: var(--accent-strong);
  font-size: 22px;
}

.content-dashboard-stat span,
.content-data-stat span {
  color: var(--muted);
  font-size: 12px;
}

.content-dashboard-stat.danger strong {
  color: var(--danger-strong);
}

.content-dashboard-stat.warn strong {
  color: var(--warn);
}

.content-account-growth-grid {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.content-account-growth-card,
.content-account-strategy-form,
.content-account-snapshot-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 12px 14px;
}

.content-account-growth-head,
.content-account-strategy-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.content-account-growth-head span,
.content-account-strategy-head span,
.content-account-growth-card small,
.content-account-growth-meta {
  color: var(--muted);
  font-size: 11px;
}

.content-account-growth-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 4px;
}

.content-account-growth-main b {
  color: var(--accent-strong);
  font-size: 24px;
}

.content-account-growth-main span {
  color: var(--muted);
  font-size: 12px;
}

.content-account-growth-meta {
  margin-bottom: 5px;
}

.content-account-strategy-list {
  display: grid;
  gap: 12px;
  padding: 0 18px 12px;
}

.content-account-strategy-form .form-grid {
  padding: 10px 0;
}

.content-account-snapshot-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 9px;
  margin: 0 18px 18px;
}

.content-account-snapshot-form strong {
  flex-basis: 100%;
  color: var(--ink);
  font-size: 13px;
}

.content-account-snapshot-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.content-account-snapshot-form input,
.content-account-snapshot-form select {
  min-height: 34px;
}

.content-attention-list,
.content-ai-recent-list {
  display: grid;
  gap: 0;
  padding: 0 18px 12px;
}

.content-attention-item,
.content-ai-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  border-top: 1px solid #eef2ee;
  background: transparent;
  padding: 12px 0;
  text-align: left;
  cursor: pointer;
}

.content-attention-item:first-child,
.content-ai-recent-item:first-child {
  border-top: 0;
}

.content-attention-item:hover,
.content-ai-recent-item:hover {
  background: #fbfdfb;
}

.content-attention-main,
.content-ai-recent-item {
  display: grid;
  gap: 4px;
}

.content-attention-main strong,
.content-ai-recent-item strong {
  color: var(--ink);
  font-size: 13px;
}

.content-attention-main small,
.content-ai-recent-item span {
  color: var(--muted);
  font-size: 12px;
}

.content-attention-side {
  flex: 0 0 auto;
}

.attention-danger {
  color: var(--danger-strong);
  font-weight: 800;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
}

.content-template-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.content-template-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdfb;
  padding: 14px;
}

.content-template-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-template-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.content-template-card p,
.content-template-card small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.content-template-index {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: #e4f0e7;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.content-template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.content-template-tags span {
  border-radius: 999px;
  background: #eef5ef;
  padding: 3px 7px;
  color: #5f7164;
  font-size: 11px;
}

.content-ai-launcher {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 0 18px 18px;
}

.content-ai-launcher label {
  display: grid;
  flex: 1;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.content-ai-config {
  border: 1px solid #efd6a8;
  border-radius: 999px;
  background: #fff8e9;
  padding: 5px 9px;
  color: var(--warn);
  font-size: 11px;
  white-space: nowrap;
}

.content-ai-config.configured {
  border-color: #bddfc9;
  background: #eef9f1;
  color: var(--accent-strong);
}

.content-ai-principles {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.content-ai-principles div {
  display: grid;
  gap: 3px;
  border-left: 3px solid #d9eadf;
  padding-left: 10px;
}

.content-ai-principles strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.content-ai-principles span {
  color: var(--muted);
  font-size: 12px;
}

.content-box-heading,
.content-ai-review-actions,
.content-schedule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.content-box-heading .content-section-title {
  margin-bottom: 0;
}

.content-ai-meta {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
}

.content-ai-field {
  border-top: 1px solid #edf2ee;
  padding: 9px 0;
}

.content-ai-field strong {
  color: var(--accent-strong);
  font-size: 12px;
}

.content-ai-field p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.content-publication-card {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border-top: 1px solid #edf2ee;
  padding-top: 10px;
}

.content-schedule-row {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.content-schedule-row input[type="number"] {
  width: 62px;
  min-height: 30px;
  padding: 5px;
}

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

.content-metrics-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.content-metrics-form .wide {
  grid-column: 1 / -1;
}

.content-metric-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #edf2ee;
  padding: 9px 0;
  color: var(--muted);
  font-size: 11px;
}

.content-metric-row strong {
  color: var(--ink);
  font-size: 12px;
}

.content-data-table {
  min-width: 980px;
}

@media (max-width: 920px) {
  .content-dashboard-grid,
  .content-template-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .content-subnav {
    overflow-x: auto;
  }

  .content-subnav-item {
    flex: 0 0 auto;
  }

  .content-dashboard-grid,
  .content-template-grid,
  .content-dashboard-stats,
  .content-data-stats {
    grid-template-columns: 1fr;
  }

  .content-ai-launcher,
  .content-metric-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .content-metrics-form .wide {
    grid-column: 1 / -1;
  }
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-card .brand-mark {
  width: 52px;
  height: 52px;
}

.login-tip {
  margin-top: 0;
  font-size: 13px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

.sidebar {
  background: var(--nav);
  color: #f7fbf8;
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #f2c14f;
  color: #1b211e;
  font-weight: 800;
}

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

.brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.66);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 11px 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

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

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

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

h2 {
  font-size: 18px;
}

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

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(128px, 1fr));
  gap: 12px;
}

.compact-metrics {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.inner-metrics {
  padding: 18px;
  box-shadow: none;
}

.metric {
  min-height: 94px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow: var(--shadow);
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--line);
}

.reimbursement-select-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 48px;
  min-width: 48px;
  background: var(--panel);
  box-shadow: 4px 0 8px rgba(25, 39, 31, 0.06);
  text-align: center !important;
}

.reimbursement-table thead .reimbursement-select-cell {
  z-index: 3;
  background: #fbfcfb;
}

.reimbursement-select-cell input {
  width: 16px;
  min-height: 16px;
  padding: 0;
}

.reimbursement-batch-actions .ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.employee-view {
  gap: 18px;
}

.employee-student-query-panel {
  overflow: hidden;
}

.employee-student-query-form {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}

.employee-student-query-table {
  min-width: 920px;
}

.employee-student-query-table td small,
.employee-student-query-class small {
  display: block;
  margin-top: 3px;
}

.employee-student-query-classes {
  display: grid;
  gap: 7px;
  min-width: 300px;
}

.employee-student-query-class {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
}

.employee-student-query-class small {
  grid-column: 1 / 2;
}

.employee-student-query-class .pill {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.employee-operation-panel {
  overflow: hidden;
}

.employee-operation-panel .employee-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.employee-form {
  align-content: start;
  min-width: 0;
  background: #fbfcfb;
}

.employee-enrollment-items {
  display: grid;
  gap: 10px;
}

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

.employee-enrollment-items .edit-table {
  min-width: 760px;
}

.employee-form h3 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 17px;
}

.employee-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.employee-operation-records-table td small {
  display: block;
  margin-top: 4px;
}

.employee-balance {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f1f6f2;
  color: var(--accent-strong);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
}

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

.transfer-summary div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 8px;
}

.transfer-summary span {
  color: var(--muted);
  font-size: 12px;
}

.transfer-summary strong {
  font-size: 16px;
}

.employee-account-form {
  align-items: end;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-form input {
  min-width: 170px;
}

#content {
  gap: 18px;
}

.content-intro-panel {
  overflow: hidden;
}

.content-principle {
  border: 1px solid #d8e8de;
  border-radius: 999px;
  background: #eef7f1;
  color: var(--accent-strong);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.content-flow {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  padding: 14px 18px 16px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.content-flow span {
  border: 1px solid #d5e6db;
  border-radius: 999px;
  background: #f5faf6;
  padding: 7px 11px;
}

.content-flow i {
  color: #9aa9a0;
  font-style: normal;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 18px;
}

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

.content-form textarea {
  resize: vertical;
}

.content-help-panel {
  align-self: start;
}

.content-help-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.content-help-list div {
  display: grid;
  gap: 3px;
  border-left: 3px solid #d9eadf;
  padding-left: 11px;
}

.content-help-list strong {
  color: var(--accent-strong);
  font-size: 13px;
}

.content-help-list span,
.content-note,
.table-secondary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.content-note {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 13px 18px 16px;
}

.content-filter-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-filter-form input {
  min-width: 190px;
}

.content-status-metrics {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.content-status-card {
  display: grid;
  min-width: 102px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 9px 12px;
  color: var(--muted);
  text-align: left;
}

.content-status-card:hover,
.content-status-card.active {
  border-color: #a9cdb7;
  background: #eef7f1;
  color: var(--accent-strong);
}

.content-status-card strong {
  font-size: 20px;
  line-height: 1;
}

.content-status-card span {
  font-size: 12px;
  white-space: nowrap;
}

.content-table {
  min-width: 1080px;
}

.content-table td strong,
.content-table td small {
  display: block;
}

.content-table td strong {
  margin-bottom: 3px;
}

.content-status {
  display: inline-flex;
  border: 1px solid #c9d8cf;
  border-radius: 999px;
  background: #f3f7f4;
  color: #52665a;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.content-status.info {
  border-color: #c8d9ed;
  background: #f1f6fc;
  color: #315f9b;
}

.content-status.warn {
  border-color: #efd6a8;
  background: #fff8e9;
  color: var(--warn);
}

.content-status.success {
  border-color: #bddfc9;
  background: #eef9f1;
  color: var(--accent-strong);
}

.content-status.danger {
  border-color: #ecc5c3;
  background: #fff3f2;
  color: var(--danger-strong);
}

.content-row-actions {
  display: grid;
  gap: 6px;
  min-width: 120px;
}

.content-row-actions select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.content-detail-panel {
  overflow: hidden;
}

.content-workflow-panel {
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  overflow: hidden;
}

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

.content-workflow-head .content-section-title {
  margin-bottom: 0;
}

.content-workflow-current {
  display: grid;
  min-width: 180px;
  gap: 3px;
  padding-left: 16px;
  border-left: 3px solid #86b79a;
}

.content-workflow-current span,
.content-workflow-current small {
  color: var(--muted);
  font-size: 12px;
}

.content-workflow-current strong {
  color: var(--accent-strong);
  font-size: 15px;
}

.content-workflow-table-wrap {
  background: #fff;
}

.content-workflow-table {
  min-width: 760px;
}

.content-workflow-table th,
.content-workflow-table td {
  padding: 11px 14px;
  vertical-align: middle;
}

.content-workflow-table th {
  color: #5d7066;
  font-size: 12px;
  font-weight: 800;
  background: #f6f9f6;
}

.content-workflow-table td:first-child {
  min-width: 190px;
}

.content-workflow-table td:first-child strong {
  vertical-align: middle;
}

.workflow-step-no {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
  background: #edf2ee;
  color: #64736a;
  font-size: 12px;
  font-weight: 800;
}

.workflow-row-completed .workflow-step-no {
  background: #dff1e5;
  color: var(--accent-strong);
}

.workflow-row-current {
  background: #fffaf0;
}

.workflow-row-current .workflow-step-no {
  background: #f5d79d;
  color: #7a5116;
}

.workflow-row-returned {
  background: #fff3f2;
}

.workflow-row-returned .workflow-step-no {
  background: #f1c6c2;
  color: var(--danger-strong);
}

.workflow-note {
  max-width: 340px;
  color: var(--muted);
  line-height: 1.5;
}

.workflow-result {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.workflow-result.success {
  border-color: #bddfc9;
  background: #eef9f1;
  color: var(--accent-strong);
}

.workflow-result.current {
  border-color: #efd6a8;
  background: #fff8e9;
  color: var(--warn);
}

.workflow-result.danger {
  border-color: #ecc5c3;
  background: #fff3f2;
  color: var(--danger-strong);
}

.workflow-result.pending {
  background: #f7f8f7;
  color: #8a948d;
}

.content-activity-block {
  border-top: 1px solid var(--line);
  padding: 14px 18px 16px;
  background: #fbfcfb;
}

.content-activity-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.content-activity-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid #eef2ee;
}

.content-activity-item:first-of-type {
  border-top: 0;
}

.content-activity-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #86b79a;
}

.content-activity-item div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.content-activity-item strong {
  color: var(--ink);
  font-size: 12px;
}

.content-activity-item span,
.content-activity-item small,
.content-activity-item time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.content-activity-item div small {
  flex-basis: 100%;
}

.content-activity-item time {
  white-space: nowrap;
}

.content-detail-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  padding: 18px;
}

.content-detail-grid > div:first-child {
  min-width: 0;
}

.content-detail-form {
  padding: 0;
  background: transparent;
}

.content-section-title {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
}

.content-detail-side {
  display: grid;
  align-content: start;
  gap: 14px;
}

.content-detail-box {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  padding: 15px;
}

.content-detail-box .panel-subtitle {
  margin: -5px 0 12px;
  line-height: 1.5;
}

.content-material-form {
  display: grid;
  gap: 10px;
}

.content-material-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.content-material-form input,
.content-material-form select,
.content-material-form textarea {
  width: 100%;
}

.content-material-card {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding: 11px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.content-material-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.content-material-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.content-material-card a {
  color: var(--blue);
  font-weight: 700;
}

.content-material-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.content-material-head strong {
  color: var(--ink);
}

.content-material-head span {
  color: var(--accent-strong);
  white-space: nowrap;
}

.content-draft-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 9px 0;
  color: var(--muted);
  font-size: 12px;
}

.content-draft-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.content-draft-row strong {
  color: var(--ink);
}

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

#reports {
  gap: 14px;
}

#reports > .panel {
  overflow: hidden;
}

#reports .panel-head {
  min-height: 64px;
  padding: 14px 20px;
  background: #fbfcfb;
}

#reports .panel-head h2 {
  font-size: 19px;
  line-height: 1.3;
}

#reports .panel-subtitle {
  margin-top: 5px;
  color: var(--accent-strong);
  font-weight: 700;
}

#reports .table-wrap {
  background: #fff;
}

#reports .report-table {
  min-width: 0;
}

#reports .report-table th,
#reports .report-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

#reports .report-table th {
  height: 48px;
  color: #5d7066;
  font-weight: 800;
  background: #f6f9f6;
}

#reports .report-table tbody tr:last-child td {
  border-bottom: 0;
}

#reports .report-type-table {
  table-layout: fixed;
}

#reports .report-type-table th:first-child,
#reports .report-type-table td:first-child {
  width: 15%;
  text-align: left;
}

#reports .report-type-table th:nth-child(2),
#reports .report-type-table td:nth-child(2) {
  width: 25%;
  text-align: left;
}

#reports .report-type-table th:nth-child(n+3),
#reports .report-type-table td:nth-child(n+3),
#reports .report-partner-table th:not(:first-child),
#reports .report-partner-table td:not(:first-child) {
  text-align: right;
}

#reports .report-type-table .summary-row td {
  background: #eef5f0;
  color: var(--ink);
  font-weight: 800;
}

#reports .report-partner-table {
  table-layout: fixed;
}

#reports .report-partner-table th:first-child,
#reports .report-partner-table td:first-child {
  width: 34%;
  text-align: left;
}

#reports .report-class-table {
  min-width: 1120px;
}

#reports .report-class-table th:nth-child(1) {
  width: 12%;
}

#reports .report-class-table th:nth-child(2) {
  width: 17%;
}

#reports .report-class-table th:nth-child(3) {
  width: 12%;
}

#reports .report-class-table th:nth-child(6) {
  width: 25%;
}

#reports .report-class-table th:nth-child(n+8),
#reports .report-class-table td:nth-child(n+8) {
  text-align: right;
}

#reports .report-group {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

#reports .report-group-master {
  background: #fff1da;
  color: #8a5a19;
}

#reports .report-group-regular {
  background: #eef5f0;
  color: var(--accent-strong);
}

#reports .report-renewal-table {
  min-width: 1160px;
}

#reports .report-renewal-table th:nth-child(8),
#reports .report-renewal-table td:nth-child(8),
#reports .report-renewal-table th:nth-child(n+10),
#reports .report-renewal-table td:nth-child(n+10) {
  text-align: right;
}

#reports .report-renewal-table th:nth-child(9),
#reports .report-renewal-table td:nth-child(9) {
  min-width: 220px;
}

#reports .report-transaction-table {
  min-width: 980px;
}

#reports .report-finance-table {
  min-width: 860px;
}

#reports .report-attendance-table {
  min-width: 720px;
}

#reports .report-attendance-table th:nth-child(4),
#reports .report-attendance-table td:nth-child(4) {
  text-align: right;
}

#reports .report-finance-table th:nth-child(7),
#reports .report-finance-table td:nth-child(7) {
  text-align: right;
}

#reimbursements {
  gap: 14px;
}

#reimbursements > .panel {
  overflow: hidden;
}

#reimbursements .panel-head {
  min-height: 64px;
  padding: 14px 20px;
  background: #fbfcfb;
}

#reimbursements .panel-head h2 {
  font-size: 19px;
  line-height: 1.3;
}

.reimbursement-metrics {
  padding: 18px;
}

.reimbursement-table {
  min-width: 1120px;
}

.reimbursement-table th,
.reimbursement-table td {
  vertical-align: middle;
}

.reimbursement-table th:nth-child(5),
.reimbursement-table td:nth-child(5) {
  text-align: right;
}

.reimbursement-table th:last-child,
.reimbursement-table td:last-child {
  text-align: right;
}

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

.report-actions label {
  min-width: 130px;
}

.report-actions input {
  min-height: 38px;
}

.student-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.student-tab {
  position: relative;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.student-tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: transparent;
  transform: translateX(-50%);
}

.student-tab.active {
  color: var(--accent-strong);
}

.student-tab.active::after {
  background: var(--accent);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  padding: 18px;
}

.form-grid.compact {
  grid-template-columns: 180px minmax(220px, 1fr) auto;
  align-items: end;
}

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

.field-block {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.wide {
  grid-column: span 2;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd8d1;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(47, 125, 97, 0.22);
  border-color: var(--accent);
}

.search-student-picker {
  position: relative;
}

.search-student-picker input[type="search"] {
  padding-right: 34px;
}

.search-student-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(25, 39, 31, 0.16);
}

.search-student-option {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid #eef2ee;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  text-align: left;
}

.search-student-option:last-child {
  border-bottom: 0;
}

.search-student-option:hover,
.search-student-option:focus {
  background: #f0f6f2;
  outline: 0;
}

.search-student-option span {
  color: var(--muted);
  font-size: 12px;
}

.search-student-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
}

textarea {
  min-height: 170px;
  line-height: 1.5;
  resize: vertical;
}

.compact-textarea {
  min-height: 76px;
}

.inline-select {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 220px;
}

.inline-select select {
  min-width: 130px;
  flex: 1;
}

.inline-select .small-action {
  flex: 0 0 auto;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--ink);
}

.check-line input {
  width: 18px;
  min-height: 18px;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.link-btn {
  min-height: 42px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 9px 14px;
  font-weight: 700;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
}

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

.danger-btn {
  background: var(--danger);
  color: #fff;
}

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

.ghost-btn {
  background: #eef3ef;
  color: var(--ink);
  border-color: var(--line);
}

.ghost-btn:hover {
  background: #e2ebe5;
}

.link-btn {
  min-height: auto;
  background: transparent;
  color: var(--blue);
  padding: 4px 0;
}

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

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

.pagination-total {
  color: var(--muted);
  font-size: 13px;
}

.pagination-page {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
}

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

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

.detail-table {
  border-top: 1px solid var(--line);
}

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

.edit-table input,
.edit-table select {
  min-width: 130px;
}

.edit-table .small-action {
  min-height: 36px;
  padding: 7px 10px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
  background: #fafcfa;
}

tbody tr:hover {
  background: #f8fbf8;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: #eef3ef;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 13px;
}

.pill.warn {
  background: #fff1da;
  color: var(--warn);
}

.pill.danger {
  background: #fde8e7;
  color: var(--danger);
}

.pill.student-type.type-partner {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.student-type.type-internal {
  background: #ede9fe;
  color: #6d28d9;
}

.pill.student-type.type-special {
  background: #fef3c7;
  color: #92400e;
}

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

.status-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--ink);
  background: #fff;
}

.status-options input {
  width: 14px;
  min-height: 14px;
}

.deduct-input {
  width: 92px;
  min-width: 92px;
}

.weekday-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  gap: 8px;
}

.weekday-options button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.weekday-options button:hover,
.weekday-options button.selected {
  border-color: var(--accent);
  background: #e8f3ed;
  color: var(--accent-strong);
}

.date-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
}

.date-chip {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
}

.date-chip.active {
  border-color: var(--accent);
  background: #e8f3ed;
  color: var(--accent-strong);
}

.date-chip small {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}

.calendar-picker {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-head strong {
  color: var(--ink);
}

.calendar-nav {
  display: flex;
  gap: 6px;
}

.calendar-nav button,
.calendar-day {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fbf8;
  color: var(--ink);
  font-weight: 700;
}

.calendar-nav button {
  min-width: 40px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 6px;
}

.calendar-weekday {
  min-height: 24px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.calendar-day {
  background: #fff;
}

.calendar-day:hover,
.calendar-day.selected {
  border-color: var(--accent);
  background: #e8f3ed;
  color: var(--accent-strong);
}

.calendar-day.muted {
  border-color: transparent;
  background: transparent;
  color: transparent;
  pointer-events: none;
}

.calendar-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 30px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.actions.split {
  justify-content: space-between;
}

.import-form {
  display: grid;
}

.paste-area {
  padding: 0 18px 4px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  border-radius: 8px;
  background: #18211d;
  color: #fff;
  padding: 12px 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(128px, 1fr));
  }

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

  .employee-operation-panel .employee-form {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

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

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

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 14px;
  }

  .brand {
    margin-bottom: 12px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
  }

  .content {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

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

  .wide {
    grid-column: auto;
  }

  .panel-foot,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }

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

  .employee-operation-panel .employee-form {
    grid-template-columns: 1fr;
  }

  .employee-student-query-form {
    grid-template-columns: 1fr;
  }

  .content-principle {
    white-space: normal;
  }

  .content-detail-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .content-workflow-head {
    align-items: stretch;
    flex-direction: column;
  }

  .content-workflow-current {
    min-width: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .content-filter-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .content-filter-form input {
    min-width: 0;
    flex: 1 1 160px;
  }
}
