:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #6a7684;
  --line: #e3e9ef;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --brand: #11a879;
  --brand-dark: #0a7858;
  --sun: #ffbd4a;
  --rose: #f06f78;
  --blue: #4b83f1;
  --warn: #b45b24;
  --shadow: 0 18px 50px rgba(36, 48, 62, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ecf7f4 0%, #f6f7f9 42%, #f6f7f9 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(92px + env(safe-area-inset-bottom));
}

.top-panel {
  margin: 0 -16px;
  padding: 18px 16px 20px;
  background: linear-gradient(145deg, #e9faf3 0%, #ffffff 54%, #fff7e9 100%);
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
  box-shadow: 0 12px 32px rgba(45, 66, 74, 0.08);
}

.profile-mode .top-panel {
  display: none;
}

.login-mode .top-panel {
  display: none;
}

.profile-mode .profile-card {
  margin-top: 12px;
}

.profile-top {
  margin: 0 -16px 16px;
  padding: calc(18px + env(safe-area-inset-top)) 16px 18px;
  background: linear-gradient(145deg, #ffffff 0%, #eef8f5 100%);
  border-bottom-left-radius: 22px;
  border-bottom-right-radius: 22px;
  box-shadow: 0 10px 26px rgba(36, 48, 62, 0.07);
}

.profile-top p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.profile-top h1 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.compact-profile-top {
  margin-bottom: 14px;
}

.guest-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 28px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: center;
  box-shadow: 0 12px 26px rgba(36, 48, 62, 0.06);
}

.guest-card h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.guest-card p {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.guest-card .primary-button {
  width: min(100%, 260px);
}

.avatar.large {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

.app-bar,
.app-actions,
.section-heading,
.panel-heading,
.panel-actions,
.profile-card,
.compact-order header {
  display: flex;
  align-items: center;
}

.app-bar,
.section-heading,
.panel-heading,
.compact-order header {
  justify-content: space-between;
  gap: 12px;
}

.app-actions {
  gap: 8px;
}

.panel-actions {
  flex: 0 0 auto;
  gap: 8px;
  flex-wrap: wrap;
}

.eyebrow,
.section-heading p,
.hero-copy p,
.panel-heading p,
.profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.app-bar h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.icon-button,
.sheet-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(22, 32, 42, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(17, 168, 121, 0.13);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  max-width: 120px;
  border: 1px solid rgba(17, 168, 121, 0.2);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(17, 168, 121, 0.12);
}

.profile-chip span,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.profile-chip span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.profile-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}


.search-box {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  height: 48px;
  margin-top: 18px;
  padding: 0 14px;
  border: 1px solid rgba(17, 168, 121, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.search-icon {
  color: var(--brand-dark);
  font-size: 22px;
}

.search-box input,
.form-grid input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  outline: 0;
  background: #fff;
  color: var(--ink);
}

.search-box input {
  border: 0;
  background: transparent;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  align-items: center;
  gap: 12px;
  min-height: 128px;
  margin-top: 16px;
  overflow: hidden;
}

.hero-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.15;
}

.hero-visual {
  position: relative;
  width: 142px;
  height: 118px;
}

.book {
  position: absolute;
  right: 8px;
  bottom: 10px;
  width: 98px;
  height: 76px;
  border-radius: 12px 18px 18px 12px;
  background: linear-gradient(135deg, #fffbf1, #ffe1a2);
  border: 3px solid #17202a;
  transform: rotate(-7deg);
}

.book::before {
  content: "";
  position: absolute;
  left: 13px;
  top: -9px;
  width: 58px;
  height: 88px;
  border-radius: 11px;
  background: linear-gradient(160deg, #11a879, #7fe0bd);
  border: 3px solid #17202a;
}

.card-mini {
  position: absolute;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 3px solid #17202a;
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
}

.card-mini.one {
  top: 2px;
  left: 10px;
  color: var(--blue);
  transform: rotate(-10deg);
}

.card-mini.two {
  right: 0;
  top: 18px;
  color: var(--rose);
  transform: rotate(11deg);
}

.pencil {
  position: absolute;
  left: 30px;
  bottom: 6px;
  width: 74px;
  height: 14px;
  border: 3px solid #17202a;
  border-radius: 999px;
  background: var(--sun);
  transform: rotate(18deg);
}

.page-view {
  display: none !important;
}

.page-view.active {
  display: block !important;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.action-item {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(36, 48, 62, 0.05);
}

.action-item span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #edf7f4;
  color: var(--brand-dark);
  font-weight: 800;
}

.action-item.active {
  border-color: rgba(17, 168, 121, 0.32);
  color: var(--ink);
}

.action-item.active span {
  background: var(--brand);
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(36, 48, 62, 0.05);
}

.filter-field {
  display: grid;
  grid-template-columns: 24px 40px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #f8fafc;
}

.filter-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--brand-dark);
  background: #eaf7f2;
  font-size: 13px;
  font-weight: 900;
}

.filter-label {
  color: #526070;
  font-size: 12px;
  font-weight: 800;
}

.filter-input,
.form-grid input {
  height: 42px;
  border-radius: 14px;
  padding: 0 12px;
}

.filter-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  font-size: 14px;
}

.filter-input::placeholder {
  color: #9aa5b1;
}

.section-heading,
.panel-heading {
  margin: 22px 0 12px;
}

.section-heading {
  align-items: flex-end;
}

.section-heading h2,
.panel-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.text-button,
.ghost-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #eaf7f2;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

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

.orders-list,
.compact-list,
.form-grid {
  display: grid;
  gap: 12px;
}

.order-card,
.panel,
.profile-card,
.compact-order {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(36, 48, 62, 0.06);
}

.order-card,
.panel,
.compact-order {
  padding: 15px;
}

.order-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-card h3 {
  margin: 0;
  min-width: 0;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
}

.price {
  flex: 0 0 auto;
  color: #d85a35;
  font-size: 18px;
  font-weight: 800;
}

.order-card p,
.compact-order p,
.summary-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.secondary-button,
.primary-button {
  height: 42px;
  border-radius: 14px;
  font-weight: 800;
}

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

.primary-button {
  border: 0;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 22px rgba(17, 168, 121, 0.22);
}

.slim {
  width: 100%;
  height: 36px;
  margin-top: 10px;
  border-radius: 12px;
}

.empty-state,
.loading-state {
  border: 1px dashed #cfd8e2;
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.sheet.show {
  display: block;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 22, 31, 0.38);
}

.sheet-panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 430px);
  max-height: 82vh;
  overflow: auto;
  transform: translateX(-50%);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  padding: 22px 16px calc(22px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: var(--shadow);
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 24px;
  line-height: 1;
}

.detail-title {
  margin: 0 48px 10px 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.detail-block,
.spec-list,
.summary-box {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: #f7f9fb;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.detail-line strong {
  color: var(--ink);
  text-align: right;
}

.detail-label,
.spec-list span,
.summary-box span,
.profile-metrics span,
.compact-meta {
  color: var(--muted);
  font-size: 12px;
}

.order-code {
  margin-bottom: 4px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.spec-list {
  margin: 14px 0;
}

.spec-list div,
.summary-box div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.summary-box div {
  grid-template-columns: 50px minmax(0, 1fr);
}

.spec-list strong,
.summary-box strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.requirement-text {
  padding-top: 2px;
}

.profile-card {
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff, #f3fbf8);
}

.avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  font-size: 21px;
}

.profile-card h2 {
  margin: 4px 0 7px;
  font-size: 21px;
  line-height: 1.2;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #eef2f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.APPROVED {
  background: #e6f7f0;
  color: var(--brand-dark);
}

.status-pill.PENDING {
  background: #fff7e5;
  color: var(--warn);
}

.status-pill.REJECTED {
  background: #fff0f0;
  color: #b13535;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.profile-metrics div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  line-height: 1;
}

.panel {
  margin-top: 14px;
}

.panel .panel-heading {
  margin: 0 0 12px;
}

.teacher-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0;
  padding: 4px;
  border-radius: 8px;
  background: #f1f5f8;
}

.teacher-tab {
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.teacher-tab.active {
  color: var(--brand-dark);
  background: #fff;
  box-shadow: 0 8px 16px rgba(36, 48, 62, 0.08);
}

.form-grid {
  margin-top: 14px;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 84px;
  border: 1px dashed #b9c7d4;
  border-radius: 14px;
  color: var(--brand-dark);
  background: #f7fbfa;
  font-weight: 800;
}

.upload-box input {
  display: none;
}

.upload-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fb;
}

.compact-order {
  display: grid;
  gap: 8px;
  box-shadow: none;
}

.compact-order strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
}

.compact-order header span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf7f4;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

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

.compact-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f0f3f6;
}

.status-line {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.status-line.success {
  color: var(--brand-dark);
}

.status-line.warning {
  color: var(--warn);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: min(100%, 430px);
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid rgba(22, 32, 42, 0.08);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.nav-item {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nav-item span {
  font-size: 20px;
  line-height: 1;
}

.nav-item.active {
  background: #eaf7f2;
  color: var(--brand-dark);
}


.hidden {
  display: none !important;
}

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

  .hero-visual {
    justify-self: end;
    margin-top: -18px;
  }

  .card-actions,
  .filters {
    grid-template-columns: 1fr;
  }

  .profile-metrics {
    grid-template-columns: 1fr;
  }
}
 .application-hint { color: #697386; font-size: 12px; align-self: center; }
 .wechat-contact { margin: 16px 0; padding: 14px; text-align: center; background: #f5f8ff; border-radius: 12px; }
 .wechat-contact p { margin: 0 0 10px; color: #526078; font-size: 13px; }
 .wechat-contact img { width: 150px; height: 150px; object-fit: contain; }
 .wechat-prompt { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; }
 .wechat-prompt-backdrop { position: absolute; inset: 0; background: rgba(18, 29, 38, .58); }
 .wechat-prompt-card { position: relative; width: min(360px, 100%); padding: 26px 22px 22px; border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(20, 35, 45, .28); text-align: center; }
 .wechat-prompt-close { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; color: #81909b; font-size: 28px; }
 .wechat-prompt-kicker { margin: 0 0 6px; color: var(--brand-dark); font-size: 13px; }
 .wechat-prompt-card h2 { margin: 0 0 16px; font-size: 22px; }
 .wechat-prompt-qr { display: block; width: 190px; height: 190px; margin: 0 auto 16px; object-fit: contain; border-radius: 10px; }
 .wechat-prompt-empty { margin: 20px 0; padding: 14px; border-radius: 10px; color: #9a5a18; background: #fff5df; font-size: 13px; line-height: 1.6; }
 .wechat-prompt-steps { padding: 12px 14px; border-radius: 12px; background: #f3faf7; text-align: left; }
 .wechat-prompt-steps p { margin: 7px 0; color: #52635d; font-size: 13px; }
 .wechat-prompt-steps b { display: inline-grid; width: 20px; height: 20px; margin-right: 5px; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); font-size: 12px; }
 .wechat-prompt-note { margin: 14px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
 .wechat-prompt-card .primary-button { width: 100%; }
