:root {
  --ink: #07151b;
  --ink-2: #0f2a31;
  --paper: #f3f5ef;
  --panel: #ffffff;
  --lime: #d8ff3e;
  --mint: #23b993;
  --muted: #71817d;
  --line: #e1e6df;
  --danger: #c9543b;
  --warning: #b47c23;
  --sidebar: 232px;
  --body-font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

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

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

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

svg {
  display: block;
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(460px, 0.95fr);
  background: var(--paper);
}

.login-art {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  padding: 43px clamp(40px, 5.5vw, 85px);
  background:
    radial-gradient(circle at 70% 62%, rgba(49, 224, 178, 0.13), transparent 28%),
    linear-gradient(145deg, #061419, #0b252b 65%, #113436);
  color: #fff;
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(216, 255, 62, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 255, 62, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(160deg, #000 0%, transparent 82%);
}

.login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand img {
  width: 51px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.login-brand span {
  display: grid;
  min-width: 0;
}

.login-brand strong {
  font-size: 16px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.login-brand small {
  color: rgba(255, 255, 255, 0.4);
  font: 8px Arial, sans-serif;
  letter-spacing: 0.2em;
}

.login-message {
  position: relative;
  z-index: 2;
  margin: auto 0;
  max-width: 610px;
  padding: 60px 0;
}

.login-message > span {
  color: var(--lime);
  font: 700 10px Arial, sans-serif;
  letter-spacing: 0.2em;
}

.login-message h1 {
  margin: 24px 0;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.15;
  letter-spacing: -0.065em;
}

.login-message p {
  max-width: 450px;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.9;
}

.login-orbit {
  position: absolute;
  width: min(52vw, 690px);
  height: min(52vw, 690px);
  right: -30%;
  bottom: -45%;
  border: 1px solid rgba(216, 255, 62, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(216, 255, 62, 0.018), 0 0 0 100px rgba(216, 255, 62, 0.012);
}

.login-orbit i {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 18px var(--lime);
}

.login-orbit i:nth-child(1) {
  left: 18%;
  top: 6%;
}

.login-orbit i:nth-child(2) {
  left: -2%;
  top: 46%;
  width: 5px;
  height: 5px;
}

.login-orbit i:nth-child(3) {
  left: 29%;
  top: 99%;
  width: 4px;
  height: 4px;
  opacity: 0.5;
}

.login-meta {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.24);
  font: 8px Arial, sans-serif;
  letter-spacing: 0.15em;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px clamp(38px, 6vw, 90px);
}

.login-form {
  width: min(390px, 100%);
}

.login-kicker {
  color: #52776e;
  font: 700 9px Arial, sans-serif;
  letter-spacing: 0.2em;
}

.login-form h2 {
  margin: 10px 0 6px;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.login-form > p {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 11px;
}

.login-form label {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.login-form label span {
  color: #3c4e4a;
  font-size: 11px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #d8dfd8;
  border-radius: 4px;
  outline: none;
  background: #fff;
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.login-form input:focus {
  border-color: #4d8778;
  box-shadow: 0 0 0 3px rgba(35, 185, 147, 0.1);
}

.login-error {
  display: none;
  margin: 3px 0 13px;
  padding: 9px 10px;
  border-left: 2px solid var(--danger);
  background: #fae9e4;
  color: #94422f;
  font-size: 10px;
}

.login-error.visible {
  display: block;
}

.login-submit {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding: 0 15px 0 19px;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.login-submit i {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-style: normal;
}

.login-form .login-help {
  margin: 15px 0;
  color: #8d9a96;
  font-size: 8px;
  text-align: center;
}

.back-site {
  display: block;
  color: #536a64;
  font-size: 10px;
  text-align: center;
}

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

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  background: #07151b;
  color: #fff;
}

.sidebar-brand {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-link img {
  width: 39px;
  height: 27px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-link span {
  display: grid;
  min-width: 0;
}

.brand-link strong {
  overflow: hidden;
  font-size: 10.5px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-link small {
  color: rgba(255, 255, 255, 0.31);
  font: 6px Arial, sans-serif;
  letter-spacing: 0.14em;
}

.sidebar-close {
  display: none;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 12px;
}

.nav-group-label {
  margin: 17px 10px 7px;
  color: rgba(255, 255, 255, 0.24);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.nav-group-label:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-item.active {
  background: rgba(216, 255, 62, 0.11);
  color: var(--lime);
}

.nav-item svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item b {
  min-width: 20px;
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  font: 700 8px/1.4 Arial, sans-serif;
  text-align: center;
}

.nav-item b:empty,
.nav-item b[data-zero="true"] {
  display: none;
}

.sidebar-foot {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.storage-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 8px;
}

.storage-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

#logoutButton {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}

#logoutButton:hover {
  color: #fff;
}

.admin-main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  background:
    linear-gradient(90deg, rgba(7, 21, 27, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(7, 21, 27, 0.018) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 12px clamp(24px, 3.4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(243, 245, 239, 0.92);
  backdrop-filter: blur(15px);
}

.topbar > div:first-of-type {
  display: grid;
  gap: 1px;
}

.topbar > div:first-of-type span {
  color: #80918c;
  font: 700 7px Arial, sans-serif;
  letter-spacing: 0.16em;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-site-link {
  color: #567069;
  font-size: 10px;
}

.topbar-site-link span {
  margin-left: 4px;
  color: #1d7662;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 21px;
  border-left: 1px solid var(--line);
}

.admin-user > span {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font: 800 12px Arial, sans-serif;
}

.admin-user > div {
  display: grid;
}

.admin-user strong {
  font-size: 10px;
}

.admin-user small {
  color: #82928e;
  font-size: 8px;
}

.mobile-menu {
  display: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.default-password-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px clamp(24px, 3.4vw, 48px) 0;
  padding: 14px 17px;
  border: 1px solid #e5c990;
  background: #fff8e9;
}

.default-password-banner div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.default-password-banner strong {
  color: #815c1d;
  font-size: 11px;
}

.default-password-banner span {
  color: #8e774e;
  font-size: 9px;
}

.default-password-banner button {
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid #d1a44b;
  border-radius: 3px;
  background: transparent;
  color: #805d20;
  font-size: 9px;
  cursor: pointer;
}

.admin-view {
  display: none;
  padding: 30px clamp(24px, 3.4vw, 48px) 60px;
}

.admin-view.active {
  display: block;
  animation: viewIn 220ms ease;
}

.metrics {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.metric {
  position: relative;
  min-height: 133px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
}

.metric > span {
  color: #61746f;
  font-size: 9px;
}

.metric strong {
  margin: 5px 0;
  font: 800 34px/1 Arial, sans-serif;
  letter-spacing: -0.04em;
}

.metric small {
  color: #8b9995;
  font-size: 8px;
}

.metric-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.metric-primary > span,
.metric-primary small {
  color: rgba(255, 255, 255, 0.4);
}

.metric-primary strong {
  color: var(--lime);
}

.metric-primary i {
  position: absolute;
  top: 17px;
  right: 18px;
  color: var(--lime);
  font-style: normal;
  font-size: 15px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.panel-head p {
  margin: 3px 0 0;
  color: #83918d;
  font-size: 8px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.primary-button:hover {
  background: #15373b;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.secondary-button {
  border: 1px solid #d6ddd5;
  background: #fff;
  color: #3e554f;
}

.secondary-button:hover {
  border-color: #9cac9f;
}

.order-toolbar {
  display: flex;
  gap: 9px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--line);
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 360px;
}

.search-box svg {
  position: absolute;
  width: 15px;
  left: 12px;
  top: 50%;
  fill: none;
  stroke: #86938f;
  stroke-width: 1.8;
  stroke-linecap: round;
  transform: translateY(-50%);
}

.search-box input,
.order-toolbar select {
  min-height: 37px;
  border: 1px solid #dbe1da;
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: #3d514c;
  font-size: 9px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
}

.order-toolbar select {
  min-width: 130px;
  padding: 0 28px 0 11px;
}

.search-box input:focus,
.order-toolbar select:focus {
  border-color: #6f9d90;
}

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

.order-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  text-align: left;
}

.order-table th {
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: #899691;
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
}

.order-table th:first-child,
.order-table td:first-child {
  padding-left: 24px;
}

.order-table th:last-child,
.order-table td:last-child {
  padding-right: 24px;
}

.order-table td {
  height: 62px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf0eb;
  color: #3f514d;
  font-size: 9px;
  white-space: nowrap;
}

.order-table tbody tr {
  transition: background 140ms ease;
}

.order-table tbody tr:hover {
  background: #f8faf5;
}

.student-cell {
  display: grid;
  gap: 2px;
}

.student-cell strong {
  font-size: 11px;
}

.student-cell span {
  color: #8a9894;
  font: 8px/1.4 Arial, sans-serif;
}

.program-cell {
  display: grid;
  max-width: 160px;
  gap: 2px;
  white-space: normal;
}

.program-cell strong {
  font-size: 9px;
}

.program-cell span {
  color: #8c9995;
  font-size: 7px;
}

.amount-cell {
  font: 800 11px Arial, sans-serif;
}

.status-badge {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  padding: 0 7px;
  border-radius: 2px;
  font-size: 8px;
  font-weight: 700;
}

.status-new {
  background: #e6f0ff;
  color: #3f6ea7;
}

.status-contacted {
  background: #fff3d9;
  color: #8a641f;
}

.status-enrolled,
.pay-paid {
  background: #e0f2e9;
  color: #21745b;
}

.status-completed {
  background: #e8eae7;
  color: #5d6864;
}

.status-cancelled,
.pay-refunded {
  background: #f4e8e5;
  color: #92503f;
}

.pay-unpaid {
  background: #f0f0eb;
  color: #787f78;
}

.pay-awaiting_review {
  background: #fff4d7;
  color: #8d681f;
}

.source-tag {
  color: #637871;
  font-size: 8px;
}

.date-cell {
  display: grid;
  gap: 2px;
  color: #7e8e89;
  font-size: 8px;
}

.row-action {
  padding: 5px 8px;
  border: 1px solid #d7dfd6;
  border-radius: 2px;
  background: #fff;
  color: #3b5c54;
  font-size: 8px;
  cursor: pointer;
}

.row-action:hover {
  border-color: #6c9489;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.row-action-danger {
  border-color: #e7d6d0;
  color: #a34c38;
}

.row-action-danger:hover {
  border-color: #c37a65;
  background: #fff7f4;
}

.empty-state {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #899691;
}

.empty-radar {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 15px;
  border: 1px solid #dfe4dd;
  border-radius: 50%;
}

.empty-radar::before,
.empty-radar::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid #e6eae4;
  border-radius: 50%;
}

.empty-radar::after {
  width: 1px;
  height: 25px;
  inset: auto auto 25px 25px;
  border: 0;
  border-left: 1px solid #b2bfba;
  border-radius: 0;
  transform-origin: bottom;
  transform: rotate(42deg);
}

.empty-radar i {
  position: absolute;
  width: 4px;
  height: 4px;
  top: 13px;
  right: 11px;
  border-radius: 50%;
  background: var(--mint);
}

.empty-state strong {
  font-size: 11px;
}

.empty-state span {
  margin-top: 4px;
  font-size: 8px;
}

.view-lead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}

.view-lead h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.view-lead p {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.editor-list {
  display: grid;
  gap: 13px;
}

.course-editor {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
}

.course-editor > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px 20px;
  cursor: pointer;
  list-style: none;
}

.course-editor > summary::-webkit-details-marker {
  display: none;
}

.drag-mark {
  color: #b7c1bd;
  font: 12px Arial, sans-serif;
  letter-spacing: -2px;
}

.course-summary {
  display: grid;
  gap: 2px;
}

.course-summary strong {
  font-size: 12px;
}

.course-summary span {
  color: #85938f;
  font-size: 8px;
}

.course-summary-price {
  color: #254c43;
  font: 800 17px Arial, sans-serif;
}

.course-order-actions {
  display: inline-flex;
  gap: 5px;
}

.course-order-button {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #d7e0da;
  border-radius: 7px;
  background: #fff;
  color: #315f53;
  font: 800 13px/1 Arial, sans-serif;
  cursor: pointer;
}

.course-order-button:hover:not(:disabled) {
  border-color: #8fac9f;
  background: #f3f8f5;
}

.course-order-button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.summary-toggle {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe5de;
  border-radius: 50%;
  color: #788984;
  font-size: 13px;
  transition: transform 160ms ease;
}

.course-editor[open] .summary-toggle {
  transform: rotate(45deg);
}

.course-body {
  padding: 22px 20px;
  border-top: 1px solid var(--line);
}

.course-editor-local-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(3, 16, 27, 0.72);
  backdrop-filter: blur(5px);
}

.program-editor[open],
.product-editor[open] {
  position: relative;
  z-index: 120;
}

.program-editor[open] > .course-editor-local-backdrop,
.product-editor[open] > .course-editor-local-backdrop {
  display: block;
}

body.course-editor-modal-open {
  overflow: hidden;
}

.program-editor[open] > .course-body,
.product-editor[open] > .course-body {
  position: fixed;
  top: max(14px, 3vh);
  right: 0;
  bottom: max(14px, 3vh);
  left: 0;
  z-index: 2;
  width: min(1120px, calc(100vw - 28px));
  height: auto;
  margin-inline: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(17, 70, 58, 0.18);
  border-radius: 16px;
  background: #f7f9fc;
  box-shadow: 0 34px 100px rgba(2, 15, 24, 0.34);
}

.course-modal-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e7ef;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.course-modal-title {
  display: grid;
  gap: 3px;
}

.course-modal-title small {
  color: #769087;
  font: 700 8px Arial, sans-serif;
  letter-spacing: 0.12em;
}

.course-modal-title strong {
  color: #183d35;
  font-size: 16px;
}

.course-modal-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #dce5e0;
  border-radius: 50%;
  background: #fff;
  color: #526862;
  font: 22px/1 Arial, sans-serif;
  cursor: pointer;
}

.course-modal-close:hover {
  border-color: #92aa9e;
  color: #1e5a49;
}

.course-modal-content {
  padding: 22px 20px 28px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-span-2 {
  grid-column: 1 / -1;
}

.admin-field {
  display: grid;
  gap: 6px;
}

.admin-field > span {
  color: #4a5e59;
  font-size: 9px;
  font-weight: 700;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #dce2dc;
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.admin-field textarea {
  min-height: 70px;
  line-height: 1.7;
  resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: #5b897d;
  box-shadow: 0 0 0 3px rgba(35, 185, 147, 0.08);
}

.input-prefix-wrap {
  position: relative;
}

.input-prefix-wrap b {
  position: absolute;
  top: 50%;
  left: 11px;
  color: #788984;
  font: 500 10px Arial, sans-serif;
  transform: translateY(-50%);
}

.input-prefix-wrap input {
  padding-left: 25px;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 17px 0;
  padding-top: 16px;
  border-top: 1px solid #edf0eb;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #50635e;
  font-size: 9px;
  cursor: pointer;
}

.toggle-label input {
  width: 15px;
  height: 15px;
  accent-color: #1b6655;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.delete-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #a75643;
  font-size: 9px;
  cursor: pointer;
}

.add-hint {
  color: #8a9893;
  font-size: 8px;
}

.sticky-save {
  position: sticky;
  z-index: 10;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 910px;
  margin: 18px auto 0;
  padding: 12px 14px 12px 18px;
  border: 1px solid #d9e0d8;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 35px rgba(7, 21, 27, 0.12);
  backdrop-filter: blur(12px);
}

.sticky-save span {
  color: #7a8985;
  font-size: 8px;
}

.program-autosave-copy {
  display: grid;
  gap: 2px;
}

.program-autosave-copy strong {
  color: #2f6d5b;
  font-size: 8px;
  font-weight: 700;
}

.program-autosave-copy strong[data-state="pending"],
.program-autosave-copy strong[data-state="saving"] {
  color: #a16a18;
}

.program-autosave-copy strong[data-state="error"] {
  color: #a34c38;
}

.notice-card {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #ddc88e;
  border-left: 3px solid #c49734;
  background: #fffaf0;
}

.notice-card strong {
  color: #75571e;
  font-size: 10px;
}

.notice-card p {
  margin: 5px 0 0;
  color: #8a754c;
  font-size: 8px;
  line-height: 1.8;
}

.payment-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 910px;
}

.payment-editor {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
}

.payment-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0eb;
}

.payment-editor-head strong {
  font-size: 11px;
}

.payment-editor .admin-field {
  margin-bottom: 13px;
}

.qr-editor {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 13px;
  align-items: center;
  margin: 5px 0 15px;
}

.qr-preview {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed #cfd8cf;
  background: #fafbf8;
  color: #8c9995;
  font-size: 8px;
  object-fit: contain;
}

.qr-upload-copy {
  display: grid;
  gap: 6px;
}

.qr-upload-copy span {
  color: #526660;
  font-size: 9px;
  font-weight: 700;
}

.qr-upload-copy small {
  color: #8a9894;
  font-size: 7px;
}

.file-button {
  display: inline-flex;
  width: fit-content;
  min-height: 29px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #d5dfd6;
  border-radius: 2px;
  background: #fff;
  color: #47655d;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.site-form {
  max-width: 910px;
  padding: 4px 30px 30px;
}

.form-section-title {
  display: flex;
  gap: 13px;
  margin: 29px 0 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid #edf0eb;
}

.form-section-title > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #eaf1eb;
  color: #4e756b;
  font: 700 8px Arial, sans-serif;
}

.form-section-title h3 {
  margin: 0;
  font-size: 12px;
}

.form-section-title p {
  margin: 2px 0 0;
  color: #899792;
  font-size: 8px;
}

.form-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #edf0eb;
}

.form-save-row > span {
  color: #427466;
  font-size: 9px;
}

.security-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.8fr) minmax(400px, 1.2fr);
  gap: 16px;
  max-width: 960px;
}

.password-form {
  padding: 23px;
}

.password-form .form-section-title {
  margin-top: 0;
}

.password-form .admin-field {
  margin-bottom: 14px;
}

.password-message {
  display: none;
  margin-bottom: 13px;
  padding: 8px 10px;
  background: #f8e9e4;
  color: #964733;
  font-size: 8px;
}

.password-message.visible {
  display: block;
}

.password-message.success {
  background: #e5f3ec;
  color: #266e58;
}

.security-notes {
  display: grid;
  gap: 10px;
}

.security-notes article {
  display: flex;
  gap: 14px;
  min-height: 100px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.67);
}

.security-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font: 700 8px Arial, sans-serif;
}

.security-notes h3 {
  margin: 0 0 5px;
  font-size: 11px;
}

.security-notes p {
  margin: 0;
  color: #73847f;
  font-size: 8px;
  line-height: 1.8;
}

.security-notes code {
  padding: 1px 4px;
  background: #edf1eb;
  color: #385e54;
  font-size: 8px;
}

.order-dialog {
  width: min(620px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.32);
}

.order-dialog::backdrop {
  background: rgba(4, 14, 17, 0.68);
  backdrop-filter: blur(5px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px;
  background: var(--ink);
  color: #fff;
}

.dialog-head span {
  color: rgba(255, 255, 255, 0.35);
  font: 7px Arial, sans-serif;
  letter-spacing: 0.16em;
}

.dialog-head h2 {
  margin: 3px 0 0;
  font-size: 19px;
}

.dialog-head button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  padding: 0 24px;
  background: #dde3dc;
}

.order-detail-grid > div {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 12px;
  background: #fafbf8;
}

.order-detail-grid span {
  color: #86948f;
  font-size: 7px;
}

.order-detail-grid strong {
  font-size: 9px;
  word-break: break-word;
}

.order-update-form {
  padding: 22px 24px 25px;
}

.order-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.order-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 15px;
}

.delete-order-button {
  margin-right: auto;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #a44935;
  font-size: 9px;
  cursor: pointer;
}

.delete-order-button:hover {
  color: #7c2f20;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-form-actions span {
  color: #53756b;
  font-size: 8px;
}

.admin-toast {
  position: fixed;
  z-index: 100;
  right: 26px;
  bottom: 26px;
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  border-radius: 3px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 15px 35px rgba(7, 21, 27, 0.25);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.error {
  background: #7c3728;
}

.view-filter {
  min-width: 120px;
  min-height: 37px;
  padding: 0 30px 0 11px;
  border: 1px solid #d5ddd5;
  border-radius: 3px;
  outline: 0;
  background: #fff;
  color: #435852;
  font-size: 9px;
}

.view-filter:focus {
  border-color: #6e998d;
}

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

.review-admin-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
}

.review-admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 13px;
  border-bottom: 1px solid #edf0eb;
}

.review-admin-person {
  display: grid;
  gap: 2px;
}

.review-admin-person strong {
  font-size: 12px;
}

.review-admin-person span {
  color: #84938e;
  font-size: 8px;
}

.review-admin-stars {
  margin-top: 3px;
  color: #a0aa70;
  font-size: 12px;
  letter-spacing: 1px;
}

.review-admin-content {
  margin: 17px 0;
  color: #465a55;
  font-size: 10px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.review-admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.review-admin-meta span {
  padding: 3px 7px;
  border-radius: 2px;
  background: #edf1eb;
  color: #667872;
  font-size: 7px;
}

.review-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #edf0eb;
}

.review-admin-actions button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 2px;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.review-approve-button {
  border: 1px solid #215f50;
  background: #215f50;
  color: #fff;
}

.review-unapprove-button {
  border: 1px solid #d7dfd6;
  background: #fff;
  color: #566c65;
}

.review-delete-button {
  border: 1px solid #e4d1cb;
  background: #fff8f5;
  color: #9f4a36;
}

.review-admin-empty {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.case-upload-button {
  position: relative;
  overflow: hidden;
}

.case-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.case-upload-guide {
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
  padding: 13px 16px;
  border: 1px solid #dce3db;
  background: rgba(255, 255, 255, 0.62);
}

.case-upload-guide > div {
  display: grid;
  gap: 2px;
}

.case-upload-guide strong {
  font-size: 9px;
}

.case-upload-guide span {
  color: #82918c;
  font-size: 8px;
}

.case-upload-guide > span {
  flex: 0 0 auto;
  color: #3b7868;
}

.case-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 960px;
}

.case-admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
}

.case-admin-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #dbe2db;
}

.case-admin-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-admin-order {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 3px 6px;
  border-radius: 2px;
  background: rgba(3, 14, 17, 0.66);
  color: var(--lime);
  font: 700 7px Arial, sans-serif;
}

.case-admin-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.case-admin-body .admin-field {
  margin: 0;
}

.case-admin-body textarea {
  min-height: 56px;
}

.case-admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.case-admin-footer .primary-button {
  min-height: 30px;
  font-size: 8px;
}

.case-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.case-admin-empty {
  max-width: 960px;
  border: 1px dashed #d2dbd1;
  background: rgba(255, 255, 255, 0.5);
}

.course-product-picker {
  padding: 15px;
  border: 1px solid #dce3dc;
  background: #f8faf7;
}

.course-product-picker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5eae4;
}

.course-product-picker-head strong {
  font-size: 10px;
}

.course-product-picker-head span {
  color: #87948f;
  font-size: 8px;
}

.course-product-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.course-product-option {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e1e6e0;
  background: #fff;
  cursor: pointer;
}

.course-product-option:has(input:checked) {
  border-color: #4f8c7e;
  background: #eef6f2;
}

.course-product-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: #215f50;
}

.course-product-option-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.course-product-option-copy strong {
  overflow: hidden;
  color: #344c46;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-product-option-copy small {
  color: #83928d;
  font-size: 7px;
}

.course-product-empty {
  color: #87948f;
  font-size: 8px;
}

.course-image-manager {
  display: grid;
  gap: 15px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dce4ee;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(1, 45, 167, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(1, 45, 167, 0.025) 1px, transparent 1px),
    #f8faff;
  background-size: 28px 28px;
}

.course-image-manager-head,
.course-gallery-editor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.course-image-manager-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e4eaf2;
}

.course-image-manager-head strong,
.course-gallery-editor-head strong {
  font-size: 12px;
}

.course-image-manager-head span,
.course-gallery-editor-head span,
.course-image-status {
  color: #87948f;
  font-size: 8px;
}

.course-cover-editor {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 15px;
  padding: 14px;
  border: 1px solid #e2e8f1;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
}

.course-cover-preview {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px dashed #bac9d9;
  border-radius: 10px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 127, 0, 0.09), transparent 30%),
    linear-gradient(135deg, #edf2fb, #fff7eb);
  color: #899792;
  text-align: center;
}

.course-cover-preview.has-image {
  border-style: solid;
}

.course-cover-preview img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #07152b;
}

.course-cover-preview .course-cover-ratio-badge {
  position: absolute;
  z-index: 1;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(5, 25, 38, 0.78);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.course-cover-preview span {
  font-size: 9px;
}

.course-cover-preview small {
  font-size: 7px;
}

.course-cover-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
}

.course-cover-copy > strong {
  font-size: 12px;
}

.course-cover-copy > p {
  margin: 0;
  color: #728096;
  font-size: 9px;
  line-height: 1.7;
}

.course-cover-copy .secondary-button {
  min-height: 29px;
  padding: 0 10px;
  font-size: 8px;
}

.course-cover-copy .delete-button {
  position: absolute;
  margin-left: 90px;
  margin-top: 35px;
}

.course-gallery-editor {
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(8, 36, 92, 0.045);
}

.course-gallery-editor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 17px 18px;
  border-bottom: 1px solid #e6ebf2;
  background:
    radial-gradient(circle at 82% 10%, rgba(255, 127, 0, 0.08), transparent 32%),
    linear-gradient(120deg, #f4f7ff, #fff 70%);
}

.course-gallery-editor-head > div {
  display: grid;
  gap: 3px;
}

.course-gallery-kicker {
  color: #012da7 !important;
  font: 800 7px Arial, sans-serif !important;
  letter-spacing: 0.17em;
}

.course-gallery-heading > strong {
  color: #182a43;
  font-size: 14px !important;
  letter-spacing: -0.02em;
}

.course-gallery-heading > span {
  color: #7d899d;
  font-size: 8px !important;
}

.course-gallery-editor-head .secondary-button {
  min-height: 30px;
  margin-left: auto;
  padding: 0 12px;
  border-color: rgba(1, 45, 167, 0.22);
  color: #012da7;
  font-size: 9px;
}

.course-gallery-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 17px;
  background:
    linear-gradient(90deg, rgba(1, 45, 167, 0.024) 1px, transparent 1px),
    linear-gradient(rgba(1, 45, 167, 0.024) 1px, transparent 1px),
    #f9fbff;
  background-size: 32px 32px;
}

.course-gallery-editor-card {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e0e7f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(7, 32, 81, 0.055);
}

.course-gallery-preview {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #edf1ed;
}

.course-gallery-preview > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #edf1ed;
}

.course-gallery-ratio-badge {
  position: absolute;
  right: 9px;
  bottom: 9px;
  max-width: calc(100% - 18px);
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(5, 25, 38, 0.78);
  color: #fff;
  font: 700 8px/1.2 Arial, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.course-gallery-caption-editor {
  display: grid;
  gap: 7px;
  padding: 12px 13px 7px;
}

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

.course-gallery-caption-head strong {
  color: #314258;
  font-size: 10px;
}

.course-gallery-caption-head span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2f8;
  color: #8290a3;
  font: 7px Arial, sans-serif;
}

.course-gallery-editor-card textarea {
  width: 100%;
  min-height: 68px;
  padding: 10px;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  outline: 0;
  background: #f7f9fc;
  color: #3a4b60;
  font-size: 10.5px;
  line-height: 1.7;
  resize: vertical;
}

.course-gallery-editor-card textarea:focus {
  border-color: #547caa;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(84, 124, 170, 0.08);
}

.course-gallery-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 13px 13px;
}

.course-gallery-editor-actions .secondary-button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 7px;
}

.course-gallery-editor-actions .delete-button {
  font-size: 7px;
}

.course-gallery-editor-empty {
  grid-column: 1 / -1;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 28px;
  border: 1px dashed #c5d1df;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(237, 243, 255, 0.74), rgba(255, 248, 239, 0.8));
  color: #7d8a9d;
  text-align: left;
}

.course-gallery-empty-icon {
  width: 46px;
  height: 46px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #012da7;
  font-size: 24px;
  box-shadow: 0 10px 24px rgba(1, 45, 167, 0.1);
}

.course-gallery-empty-copy {
  display: grid;
  gap: 4px;
}

.course-gallery-empty-copy strong {
  color: #273b54;
  font-size: 12px;
}

.course-gallery-empty-copy p {
  margin: 0;
  color: #7f8da0;
  font-size: 9px;
  line-height: 1.7;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1150px) {
  :root {
    --sidebar: 210px;
  }

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

  .sidebar {
    transition: transform 200ms ease;
  }

  .payment-editor-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 800px) {
  :root {
    --sidebar: 245px;
  }

  .login-view {
    display: block;
    padding: 30px 0;
  }

  .login-art {
    min-height: 315px;
    padding: 28px 25px;
  }

  .login-message {
    padding: 42px 0 25px;
  }

  .login-message h1 {
    font-size: 38px;
  }

  .login-message p {
    font-size: 11px;
  }

  .login-meta,
  .login-orbit {
    display: none;
  }

  .login-panel {
    min-height: auto;
    padding: 35px 24px;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: 25px 0 70px rgba(0, 0, 0, 0.3);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: block;
  }

  .admin-main {
    margin-left: 0;
  }

  .mobile-menu {
    display: grid;
  }

  .topbar {
    min-height: 68px;
    padding: 10px 17px;
  }

  .topbar > div:first-of-type span,
  .topbar-site-link,
  .admin-user > div {
    display: none;
  }

  .admin-user {
    padding-left: 12px;
  }

  .admin-view {
    padding: 20px 16px 80px;
  }

  .default-password-banner {
    margin: 15px 16px 0;
  }

  .default-password-banner div {
    display: grid;
    gap: 2px;
  }

  .metrics {
    gap: 8px;
  }

  .metric {
    min-height: 115px;
    padding: 15px;
  }

  .metric strong {
    font-size: 28px;
  }

  .panel-head {
    padding: 17px;
  }

  .panel-head p {
    display: none;
  }

  .order-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }

  .search-box {
    grid-column: 1 / -1;
    max-width: none;
  }

  .order-toolbar select {
    min-width: 0;
  }

  .order-table th:first-child,
  .order-table td:first-child {
    padding-left: 13px;
  }

  .order-table th:last-child,
  .order-table td:last-child {
    padding-right: 13px;
  }

  .view-lead {
    display: grid;
    gap: 15px;
  }

  .view-lead .primary-button,
  .view-lead .secondary-button {
    width: fit-content;
  }

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

  .field-span-2 {
    grid-column: auto;
  }

  .course-editor > summary {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 12px 14px;
  }

  .course-summary-price {
    display: none;
  }

  .course-body {
    padding: 17px 14px;
  }

  .course-product-options {
    grid-template-columns: 1fr;
  }

  .course-cover-editor {
    grid-template-columns: 1fr;
  }

  .course-gallery-editor-grid {
    grid-template-columns: 1fr;
  }

  .course-gallery-editor-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .course-gallery-editor-head .secondary-button {
    margin-left: 0;
  }

  .sticky-save {
    bottom: 8px;
  }

  .sticky-save span {
    display: none;
  }

  .sticky-save .primary-button {
    width: 100%;
  }

  .site-form {
    padding: 4px 17px 22px;
  }

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

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

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

  .case-upload-guide {
    display: grid;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
    padding: 0 17px;
  }

  .order-update-form {
    padding: 17px;
  }

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

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

  .metric {
    min-height: 105px;
  }

  .metric > span {
    font-size: 8px;
  }

  .payment-editor {
    padding: 15px;
  }

  .qr-editor {
    grid-template-columns: 80px 1fr;
  }

  .qr-preview {
    width: 80px;
    height: 80px;
  }
}

.sponsor-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 14px;
  padding-top: 20px;
  border-top: 1px solid #edf0eb;
}

.sponsor-admin-toolbar > div {
  display: grid;
  gap: 3px;
}

.sponsor-admin-toolbar strong {
  color: #193b34;
  font-size: 13px;
}

.sponsor-admin-toolbar span {
  color: #8b9894;
  font-size: 9px;
}

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

.sponsor-admin-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 15px;
  padding: 15px;
  border: 1px solid #e5ebe7;
  border-radius: 13px;
  background: #fbfcfa;
}

.sponsor-admin-media {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.sponsor-admin-preview {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  border: 1px dashed #d7e0db;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #f3f6f3 25%, transparent 25%),
    linear-gradient(-45deg, #f3f6f3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f6f3 75%),
    linear-gradient(-45deg, transparent 75%, #f3f6f3 75%),
    #fff;
  background-position:
    0 0,
    0 7px,
    7px -7px,
    -7px 0;
  background-size: 14px 14px;
}

.sponsor-admin-preview img {
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
}

.sponsor-admin-preview span {
  color: #9aa6a1;
  font-size: 9px;
  text-align: center;
}

.sponsor-upload-button {
  min-height: 31px;
  display: grid;
  place-items: center;
  padding: 0 9px;
  border: 1px solid #d7e2dc;
  border-radius: 8px;
  background: #fff;
  color: #216452;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.sponsor-admin-media small {
  color: #93a09b;
  font-size: 8px;
  line-height: 1.45;
}

.sponsor-admin-body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.sponsor-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 3px;
}

.sponsor-admin-actions .toggle-label {
  margin-right: auto;
}

.sponsor-admin-actions .secondary-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 8px;
}

.sponsor-admin-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

@media (max-width: 1080px) {
  .sponsor-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .sponsor-admin-card {
    grid-template-columns: 1fr;
  }

  .sponsor-admin-media {
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
  }

  .sponsor-admin-preview {
    grid-row: 1 / span 2;
    min-height: 82px;
  }

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

.product-detail-gallery-editor {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e2e8f1;
  border-radius: 12px;
  background: #f9fbff;
}

.product-detail-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4eaf2;
}

.product-detail-gallery-head > div {
  display: grid;
  gap: 3px;
}

.product-detail-gallery-head small {
  color: #8090a4;
  font: 700 7px Arial, sans-serif;
  letter-spacing: 0.12em;
}

.product-detail-gallery-head strong {
  color: #273952;
  font-size: 12px;
}

.product-detail-gallery-head span {
  color: #8996a8;
  font-size: 8px;
}

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

.product-detail-image-editor {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  background: #fff;
}

.product-detail-image-media {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #edf1f6;
}

.product-detail-image-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: contain;
  background: #0a1727;
}

.product-detail-image-ratio {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(5, 25, 38, 0.8);
  color: #fff;
  font: 700 8px/1.2 Arial, sans-serif;
}

.product-detail-image-editor > input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  background: #f8faff;
  color: #34465e;
  font-size: 10px;
}

.product-detail-image-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-detail-image-actions .secondary-button {
  min-height: 29px;
  padding: 0 9px;
  font-size: 8px;
}

.product-detail-image-empty {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed #d5dfeb;
  border-radius: 9px;
  color: #8b98aa;
  font-size: 9px;
  text-align: center;
}

@media (max-width: 760px) {
  .product-detail-gallery-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .product-detail-image-editor-grid {
    grid-template-columns: 1fr;
  }
}

.customer-backup-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
}

.customer-backup-panel > div {
  display: grid;
  gap: 5px;
}

.customer-backup-panel > div > span {
  color: #a06a25;
  font: 800 8px Arial, sans-serif;
  letter-spacing: 0.13em;
}

.customer-backup-panel h3 {
  margin: 0;
  color: #193b34;
  font-size: 18px;
}

.customer-backup-panel p {
  margin: 0;
  color: #7a8a85;
  font-size: 9px;
  line-height: 1.7;
}

@media (max-width: 680px) {
  .customer-backup-panel {
    align-items: stretch;
    flex-direction: column;
  }
}
