:root {
  --ink: #18352d;
  --muted: #72827d;
  --line: #e8ece8;
  --paper: #ffffff;
  --canvas: #f6f8f5;
  --green: #1f6c54;
  --green-strong: #155a45;
  --green-soft: #eaf5ef;
  --amber: #d99b39;
  --amber-soft: #fff6df;
  --coral: #d86f54;
  --coral-soft: #fff0eb;
  --blue: #4a7896;
  --blue-soft: #edf5f8;
  --shadow: 0 14px 42px rgba(24, 53, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  color: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 244px;
  flex-direction: column;
  padding: 30px 20px 24px;
  border-right: 1px solid #edf0ec;
  background: #fbfcfa;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: flex;
  width: 38px;
  height: 38px;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  border-radius: 11px;
  background: var(--green);
  box-shadow: 0 7px 16px rgba(31, 108, 84, 0.2);
}

.brand-mark span {
  display: block;
  width: 5px;
  border-radius: 5px 5px 0 0;
  background: #f7f4e7;
  transform: rotate(-7deg);
}

.brand-mark span:nth-child(1) {
  height: 15px;
}

.brand-mark span:nth-child(2) {
  height: 24px;
}

.brand-mark span:nth-child(3) {
  height: 31px;
}

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

.brand strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand > div > span {
  margin-top: 3px;
  color: #9aa59f;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sidebar nav {
  margin-top: 44px;
}

.sidebar nav > p {
  margin: 27px 11px 10px;
  color: #a5afa9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nav-item {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #687873;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.nav-item:hover {
  background: #f1f5f1;
  color: var(--ink);
}

.nav-item.selected {
  background: var(--green-soft);
  color: var(--green-strong);
  font-weight: 700;
}

.nav-item.disabled {
  cursor: default;
}

.nav-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #82908b;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
}

.nav-item.selected .nav-icon {
  color: var(--green);
}

.nav-item em {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 10px;
  background: #edf0ed;
  color: #88938e;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.nav-item.selected em {
  background: rgba(31, 108, 84, 0.1);
  color: var(--green);
}

.status-dot {
  width: 8px;
  height: 8px;
  margin: 0 6px;
  border-radius: 50%;
  background: #b4bdb8;
}

.status-dot.active {
  background: #32a778;
}

.status-dot.expired {
  background: #dc765e;
}

.status-dot.paused {
  background: #dca444;
}

.status-dot.completed {
  background: #8b9993;
}

.sidebar-note {
  margin-top: auto;
  padding: 17px 16px;
  border: 1px solid #e7ede8;
  border-radius: 13px;
  background: linear-gradient(145deg, #f9fbf8, #f0f6f1);
}

.sidebar-note span {
  color: #7d8984;
  font-size: 11px;
}

.sidebar-note strong {
  display: block;
  margin-top: 5px;
  color: var(--green-strong);
  font-family: "Songti SC", serif;
  font-size: 21px;
}

.sidebar-note p {
  margin: 6px 0 0;
  color: #9aa39f;
  font-size: 10px;
}

.operator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 17px -2px -5px;
  padding: 12px 6px 0;
  border-top: 1px solid #eef0ed;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #dceae2;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

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

.operator strong {
  font-size: 11px;
}

.operator span {
  margin-top: 3px;
  color: #9ca5a1;
  font-size: 9px;
}

.operator i {
  margin-left: auto;
  color: #a4ada8;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 1px;
}

.logout-button {
  margin-left: auto;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ca5a1;
  cursor: pointer;
  font-size: 9px;
}

.logout-button:hover {
  background: #f0f3f0;
  color: var(--green);
}

.main-content {
  min-width: 0;
  margin-left: 244px;
  padding: 0 34px 40px;
}

.topbar {
  display: flex;
  min-height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid #e9ede9;
}

.topbar p {
  margin: 0 0 6px;
  color: #8d9994;
  font-size: 11px;
}

.topbar h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.global-search {
  display: flex;
  width: 280px;
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid #e3e8e3;
  border-radius: 10px;
  background: var(--paper);
  color: #93a09a;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.global-search:focus-within {
  border-color: #8ab3a2;
  box-shadow: 0 0 0 3px rgba(31, 108, 84, 0.08);
}

.global-search > span {
  font-family: Arial, sans-serif;
  font-size: 20px;
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.global-search input::placeholder {
  color: #a7b0ac;
}

.global-search kbd {
  padding: 2px 5px;
  border: 1px solid #e7eae7;
  border-radius: 5px;
  background: #f8f9f7;
  color: #a0aaa5;
  font-family: Arial, sans-serif;
  font-size: 9px;
}

.add-button,
.primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  box-shadow: 0 7px 16px rgba(31, 108, 84, 0.16);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

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

.add-button span {
  font-size: 18px;
  font-weight: 400;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

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

.metric-grid article {
  min-height: 135px;
  padding: 19px 20px 17px;
  border: 1px solid #e8ece8;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 5px 20px rgba(24, 53, 45, 0.035);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7d8b86;
  font-size: 11px;
}

.metric-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.metric-icon.green {
  background: var(--green-soft);
  color: var(--green);
}

.metric-icon.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.metric-icon.amber {
  background: var(--amber-soft);
  color: #b57a20;
}

.metric-icon.coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.metric-grid article > strong {
  display: block;
  margin-top: 10px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 29px;
  line-height: 1;
}

.metric-grid article > p {
  margin: 11px 0 0;
  color: #98a39e;
  font-size: 10px;
}

.metric-grid article > p b {
  margin-right: 5px;
  color: #32a778;
}

.metric-grid article > p.warning-copy {
  color: var(--coral);
}

.data-panel {
  overflow: visible;
  border: 1px solid #e5eae5;
  border-radius: 15px;
  background: var(--paper);
  box-shadow: 0 8px 30px rgba(24, 53, 45, 0.035);
}

.panel-heading {
  display: flex;
  min-height: 77px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid #edf0ed;
}

.panel-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
}

.panel-heading p {
  margin: 5px 0 0;
  color: #9aa49f;
  font-size: 10px;
}

.filter-tabs {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 5px;
}

.filter-tabs button {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #82908a;
  cursor: pointer;
  font-size: 11px;
}

.filter-tabs button:hover,
.filter-tabs button.active {
  background: #f0f5f1;
  color: var(--green);
}

.filter-tabs button.active {
  font-weight: 700;
}

.filter-tabs span {
  margin-left: 3px;
  color: #a2aba7;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid #f0f2ef;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fafbfa;
  color: #97a29d;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

td {
  color: #586b64;
  font-size: 11px;
}

tbody tr {
  transition: background 0.16s;
}

tbody tr:hover {
  background: #fcfdfb;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e5efe9;
  color: var(--green);
  font-family: "Songti SC", serif;
  font-size: 13px;
  font-weight: 700;
}

.student-cell strong,
.student-cell span,
td > div > strong,
td > div > span,
.course-name,
.subtle,
.date-range {
  display: block;
}

.student-cell strong,
.course-name,
.date-range {
  color: #314a42;
  font-size: 11px;
  font-weight: 700;
}

.student-cell span {
  margin-top: 4px;
  color: #a0aaa5;
  font-family: Arial, sans-serif;
  font-size: 9px;
}

.profile-column {
  width: 270px;
}

.profile-summary {
  display: grid;
  gap: 6px;
  min-width: 230px;
}

.profile-summary p {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  margin: 0;
}

.profile-summary b {
  color: var(--green);
  font-size: 9px;
  white-space: nowrap;
}

.profile-summary span {
  overflow: hidden;
  color: #71817b;
  font-size: 9px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtle {
  margin-top: 5px;
  color: #a0aaa5;
  font-size: 9px;
}

.money-cell {
  display: block;
  color: var(--green-strong);
  font-family: "Songti SC", serif;
  font-size: 13px;
}

.due-soon {
  color: var(--coral);
}

.coach {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.coach i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: #f0eee7;
  color: #8a7f68;
  font-size: 9px;
  font-style: normal;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
}

.status-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-chip.active {
  background: #e9f7f0;
  color: #288766;
}

.status-chip.paused {
  background: #fff6e3;
  color: #ae7b27;
}

.status-chip.completed {
  background: #f0f2f1;
  color: #75837d;
}

.status-chip.expired {
  background: #fff0ec;
  color: #c7624c;
}

.row-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.status-select {
  width: 76px;
  height: 29px;
  padding: 0 5px;
  border: 1px solid #e0e6e1;
  border-radius: 7px;
  outline: 0;
  background: #fff;
  color: #7b8983;
  cursor: pointer;
  font-size: 9px;
}

.status-select:focus {
  border-color: #8ab3a2;
}

.renew-button,
.outline-button {
  height: 29px;
  padding: 0 11px;
  border: 1px solid #d9e5dd;
  border-radius: 7px;
  background: #f8fbf8;
  color: var(--green);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.renew-button:hover,
.outline-button:hover {
  border-color: #a4c4b4;
  background: var(--green-soft);
}

.outline-button {
  height: 34px;
}

details {
  position: relative;
}

summary {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  color: #8d9994;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 1px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover,
details[open] summary {
  background: #f1f4f1;
}

.action-menu {
  position: absolute;
  top: 32px;
  right: 0;
  z-index: 12;
  width: 130px;
  padding: 7px;
  border: 1px solid #e4e9e5;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.action-menu > span {
  display: block;
  padding: 5px 8px 7px;
  color: #a2aba7;
  font-size: 9px;
}

.action-menu button {
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}

.action-menu button:hover {
  background: #f0f5f1;
  color: var(--green);
}

.payment-type {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f2;
  color: #6b7c75;
  font-size: 9px;
}

.empty-state {
  display: flex;
  min-height: 330px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.empty-state > div {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: var(--green-soft);
  color: var(--green);
  font-family: "Songti SC", serif;
  font-size: 20px;
  font-weight: 700;
}

.empty-state h3 {
  margin: 16px 0 6px;
  color: #3a5149;
  font-family: "Songti SC", serif;
  font-size: 16px;
}

.empty-state p {
  max-width: 340px;
  margin: 0;
  color: #9aa49f;
  font-size: 10px;
  line-height: 1.7;
}

.empty-state button {
  margin-top: 16px;
  padding: 8px 13px;
  border: 1px solid #cfe0d6;
  border-radius: 8px;
  background: #f5faf6;
  color: var(--green);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.table-footer {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-top: 1px solid #edf0ed;
  color: #9ba5a0;
  font-size: 9px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  overflow-y: auto;
  place-items: start center;
  padding: 36px 18px;
  background: rgba(15, 30, 25, 0.46);
  backdrop-filter: blur(5px);
  animation: fade-in 0.16s ease-out;
}

.modal {
  width: min(760px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(12, 35, 28, 0.24);
  animation: rise-in 0.22s ease-out;
}

.modal.compact {
  width: min(620px, 100%);
  margin-top: 8vh;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 25px 28px 21px;
  border-bottom: 1px solid #ecf0ec;
  background:
    radial-gradient(circle at 90% 0%, rgba(218, 232, 221, 0.7), transparent 38%),
    #fcfdfb;
}

.eyebrow {
  color: #95a49d;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.modal-head h2 {
  margin: 6px 0 4px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 22px;
}

.modal-head p {
  margin: 0;
  color: #8d9994;
  font-size: 10px;
}

.close-button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #e3e8e3;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.8);
  color: #82908a;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 20px;
}

.member-form {
  padding: 4px 28px 24px;
}

.member-form fieldset {
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid #eef1ee;
}

.member-form legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #52675f;
  font-size: 11px;
  font-weight: 700;
}

.member-form legend span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  font-family: Arial, sans-serif;
  font-size: 8px;
}

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

.form-grid label {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 4px;
  color: #687a73;
  font-size: 10px;
  font-weight: 600;
}

.form-grid label b {
  color: var(--coral);
  font-weight: 700;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  flex: 0 0 100%;
  border: 1px solid #dfe5e0;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}

.form-grid input,
.form-grid select {
  height: 39px;
  padding: 0 11px;
}

.form-grid textarea {
  min-height: 86px;
  padding: 10px 11px;
  line-height: 1.6;
  resize: vertical;
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: #afb7b3;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: #79a793;
  box-shadow: 0 0 0 3px rgba(31, 108, 84, 0.08);
}

.form-grid input[readonly] {
  background: #f4f7f4;
  color: var(--green-strong);
  cursor: not-allowed;
}

.profile-fields label {
  align-content: flex-start;
}

.profile-fields label small {
  flex: 0 0 100%;
  color: #9aa59f;
  font-size: 9px;
  font-weight: 400;
}

.date-pair {
  display: flex;
  width: 100%;
  flex: 0 0 100%;
  align-items: center;
  gap: 7px;
}

.date-pair input {
  min-width: 0;
}

.date-pair span {
  color: #a0aaa5;
  font-size: 9px;
  font-weight: 400;
}

.money-input {
  position: relative;
  width: 100%;
  flex: 0 0 100%;
}

.money-input span {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--green);
  font-family: "Songti SC", serif;
  font-size: 14px;
  transform: translateY(-50%);
}

.money-input input {
  padding-left: 29px;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

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

.renewal-form {
  padding-top: 23px;
}

.form-message {
  margin-top: 17px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 10px;
}

.form-message.success {
  background: #eaf6ef;
  color: #267858;
}

.form-message.error {
  background: #fff0ec;
  color: #bc5e49;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 20px;
}

.cancel-button {
  min-width: 76px;
  height: 40px;
  border: 1px solid #dfe4df;
  border-radius: 9px;
  background: #fff;
  color: #71817b;
  cursor: pointer;
  font-size: 11px;
}

.primary-button {
  min-width: 142px;
  min-height: 40px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 200;
  min-width: 190px;
  padding: 12px 15px;
  border: 1px solid #cfe4d8;
  border-radius: 10px;
  background: #f2faf5;
  box-shadow: var(--shadow);
  color: #267858;
  font-size: 11px;
  animation: rise-in 0.2s ease-out;
}

.toast.error {
  border-color: #f0d2ca;
  background: #fff4f1;
  color: #b75d48;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 0%, rgba(219, 235, 224, 0.9), transparent 34%),
    radial-gradient(circle at 95% 95%, rgba(245, 229, 196, 0.65), transparent 28%),
    #f6f8f5;
}

.login-card {
  width: min(420px, 100%);
  padding: 34px 38px 28px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(24, 53, 45, 0.13);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.login-brand strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  letter-spacing: 0.05em;
}

.login-brand small {
  margin-top: 3px;
  color: #9aa59f;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.login-copy {
  margin: 40px 0 26px;
}

.login-copy > span {
  color: #91a098;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-copy h1 {
  margin: 8px 0 7px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 30px;
}

.login-copy p {
  margin: 0;
  color: #87938e;
  font-size: 11px;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #65766f;
  font-size: 10px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid #dde5df;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.login-form input:focus {
  border-color: #7ca994;
  box-shadow: 0 0 0 3px rgba(31, 108, 84, 0.08);
}

.login-form .primary-button {
  width: 100%;
  margin-top: 4px;
}

.login-foot {
  margin: 24px 0 0;
  color: #a1aaa6;
  font-size: 9px;
  text-align: center;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

@media (max-width: 1120px) {
  .sidebar {
    width: 210px;
  }

  .main-content {
    margin-left: 210px;
    padding-inline: 24px;
  }

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

  .global-search {
    width: 220px;
  }
}

@media (max-width: 780px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 15px 17px;
    border-right: 0;
    border-bottom: 1px solid #e8ece8;
  }

  .sidebar nav,
  .sidebar-note,
  .operator {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 0 15px 28px;
  }

  .topbar {
    min-height: 132px;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
  }

  .top-actions {
    width: 100%;
  }

  .global-search {
    min-width: 0;
    flex: 1;
    width: auto;
  }

  .global-search kbd {
    display: none;
  }

  .add-button {
    flex: 0 0 auto;
    padding-inline: 13px;
  }

  .metric-grid {
    gap: 9px;
    padding: 15px 0;
  }

  .metric-grid article {
    min-height: 122px;
    padding: 16px;
  }

  .metric-grid article > strong {
    font-size: 24px;
  }

  .panel-heading {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .filter-tabs {
    width: 100%;
    align-self: auto;
    overflow-x: auto;
  }

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

  .modal,
  .modal.compact {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

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

  .modal-head,
  .member-form {
    padding-inline: 20px;
  }

  .wide-label {
    grid-column: auto;
  }
}

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

  .metric-grid article {
    min-height: 112px;
  }

  .metric-grid article > strong {
    font-size: 21px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .global-search {
    display: none;
  }

  .add-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
