:root {
  --bg: #ececf3;
  --line: #e6e6eb;
  --text: #1b1b1f;
  --muted: #8f939a;
  --wechat-green: #16c116;
  --danger: #e32646;
  --primary-blue: #1ea7ff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: #f6f7f9;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
}

body {
  min-height: 100vh;
  display: block;
}

.phone-shell {
  width: var(--app-width, 100%);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  padding-bottom: 84px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, #eef4fb 0%, #ececf3 48%, #e8e8ef 100%);
}

.login-card {
  width: min(460px, 100%);
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e3e4ea;
  box-shadow: 0 8px 30px rgba(25, 35, 58, 0.08);
  padding: 24px 20px 18px;
}

.login-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
  text-align: center;
  color: #1e2430;
}

.login-input {
  width: 100%;
  height: 50px;
  border: 1px solid #d6d9e2;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
}

.profile-card .login-input + .login-input {
  margin-top: 10px;
}

.profile-id-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.profile-id-row .login-input {
  margin-top: 0;
  flex: 1;
}

.profile-random-btn {
  border: 1px solid #c9d7ef;
  background: #edf4ff;
  color: #356dc9;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  white-space: nowrap;
}

.login-input:focus {
  border-color: #57a0ff;
  box-shadow: 0 0 0 3px rgba(87, 160, 255, 0.15);
}

.login-btn {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: var(--wechat-green);
  color: #fff;
  font-size: 17px;
}

.login-tip,
.login-error {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
}

.profile-tip,
.profile-error {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.profile-tip {
  color: #7f8793;
}

.profile-error {
  color: #de3659;
}

.login-tip {
  color: #8a909a;
}

.login-error {
  color: #de3659;
}

.page {
  min-height: 100%;
}

.workshop {
  padding: 8px 6px 86px;
}

.work-group {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 8px 6px 12px;
}

.group-title {
  margin: 2px 8px 8px;
  font-size: 16px;
  color: #8a8f95;
}

.group-title.with-arrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.group-title.with-arrow::after {
  content: "〉";
  color: #b6b8be;
  font-size: 14px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 14px;
}

.work-item {
  text-decoration: none;
  text-align: center;
  color: #17191f;
}

.work-icon {
  width: 30px;
  height: 30px;
  margin: 0 auto 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #89d5ff 0%, #5da2ff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.work-icon-img {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  padding: 2px;
  object-fit: contain;
  display: block;
  box-sizing: border-box;
}

.work-icon-img.used-img {
  border-radius: 12px;
}

.work-icon.used {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #71c6ff, #2e78ff);
  font-size: 12px;
}

.work-label {
  font-size: 12px;
  line-height: 1.2;
}

.section {
  background: #fff;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section.no-top {
  margin-top: 0;
}

.section-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 14px;
  font-size: 22px;
  color: #2e3138;
}

.hint {
  color: #6f737a;
  font-size: 18px;
}

.hero {
  background: #f1f2f6;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(
      120deg,
      #a5acb9,
      #a5acb9 2px,
      transparent 2px,
      transparent 42px
    );
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 18px 14px 12px;
}

.hero-name,
.hero-id {
  font-size: 18px;
  color: #102a86;
  letter-spacing: 1px;
  line-height: 1.7;
}

.balance-card {
  margin-top: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e9ef;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 14px 6px;
}

.balance-col {
  text-align: center;
}

.balance-label {
  color: #666b72;
  font-size: 16px;
  margin-bottom: 5px;
}

.balance-num {
  color: #d84a61;
  font-size: 19px;
  font-weight: 500;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 18px;
  column-gap: 2px;
  padding: 14px 8px 16px;
}

.grid-item {
  text-decoration: none;
  text-align: center;
  color: #21242b;
}

.icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  margin: 0 auto 9px;
  border: 2px solid #5ea9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
}

.campus-icon-img {
  width: 38px;
  height: 38px;
  padding: 2px;
  object-fit: contain;
  display: block;
  margin: 0 auto 9px;
  box-sizing: border-box;
}

.icon.cyan {
  color: #34b5d8;
  border-color: #4eb8d8;
}

.icon.orange {
  color: #f1a31a;
  border-color: #f1a31a;
}

.icon.blue {
  color: #4f7eff;
  border-color: #4f7eff;
}

.grid-label {
  font-size: 15px;
  line-height: 1.2;
}

.tip-row {
  margin: 14px 10px;
  background: #fff;
  border: 1px solid #dfdfe5;
  border-radius: 12px;
  color: #dd5a7f;
  font-size: 13px;
  line-height: 1.7;
  padding: 12px 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tip-icon {
  width: 22px;
  height: 22px;
  border: 1px solid #a7a8ad;
  border-radius: 50%;
  color: #8a8b90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.line-list {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.line {
  min-height: 60px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.line:last-child {
  border-bottom: 0;
}

.line-label {
  color: #363a42;
  font-size: 23px;
  letter-spacing: 2px;
}

.line-value {
  color: #b5b9c0;
  font-size: 23px;
}

.line-value.strong {
  color: #575c64;
}

.line-value.danger {
  color: var(--danger);
}

.line-value.input-like {
  color: #9fa3ab;
}

.payment-row .line-label {
  display: none;
}

.pay-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3d4249;
  font-size: 22px;
}

.pay-icon {
  width: 18px;
  height: 14px;
  background: #23a8ef;
  border-radius: 2px;
  position: relative;
}

.pay-icon::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  background: #79d0ff;
  top: 2px;
  left: 2px;
}

.pay-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #17be14;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}

.pad {
  padding: 10px 10px 8px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.amount-btn {
  height: 52px;
  border: 1px solid #d8d9dd;
  border-radius: 8px;
  background: #fff;
  color: #7a7d83;
  font-size: 20px;
}

.amount-btn.active {
  border-color: #31b74c;
  color: #31b74c;
}

.primary-btn {
  width: calc(100% - 28px);
  margin: 14px 14px 12px;
  height: 58px;
  border: 0;
  border-radius: 15px;
  background: var(--wechat-green);
  color: #fff;
  font-size: 22px;
  letter-spacing: 2px;
}

.bill-empty {
  text-align: center;
  color: #4d5259;
  font-size: 24px;
  padding-top: 26px;
}

.mt8 {
  margin-top: 8px;
}

.soft-text {
  color: #a0a4ab;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  padding: 0 14px;
}

.soft-text.warn {
  padding-top: 10px;
}

.notice-wrap {
  margin-top: 0;
  border-top: 0;
  background: #dadadd;
}

.info-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e1394e;
  padding: 10px 14px;
  font-size: 12px;
}

.center-total {
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 18px 0 10px;
}

.center-total h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 2px;
  color: #5f646c;
}

.center-total p {
  margin: 4px 0 0;
  font-size: 50px;
  line-height: 1;
  color: #ff7d00;
  font-weight: 600;
}

.dot-legend {
  background: #fff;
  padding: 14px 14px 16px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666a71;
  font-size: 20px;
  margin-bottom: 6px;
}

.dot {
  width: 11px;
  height: 11px;
}

.dot.blue { background: #1ea4ff; }
.dot.orange { background: #f5a623; }
.dot.green { background: #27c027; }

.app-center-head {
  height: 52px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 0 0;
  color: #2e3238;
  font-size: 22px;
}

.left-accent {
  width: 8px;
  height: 100%;
  background: #4965c6;
  display: inline-block;
}

.blank-note {
  padding: 18px 14px;
  color: #9ca0a8;
  font-size: 13px;
}

.mini-tab {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: var(--app-width, 100%);
  height: 64px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.mini-tab-4 {
  grid-template-columns: repeat(4, 1fr);
}

.mini-tab button {
  border: 0;
  background: transparent;
  color: #a4a7ad;
  font-size: 14px;
}

.mini-tab button.active {
  color: var(--primary-blue);
}

#bottomDock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: var(--app-width, 100%);
  height: auto;
  border-top: 0;
  background: transparent;
  display: none;
}

.dock-image {
  width: 100%;
  height: auto;
  display: block;
}

#bottomDock button {
  border: 0;
  background: transparent;
  color: #8f939b;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

#bottomDock button.active {
  color: #2f87ff;
}

.dock-icon {
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 360px) {
  .line-label,
  .line-value,
  .pay-left,
  .legend-row {
    font-size: 19px;
  }

  .hero-name,
  .hero-id {
    font-size: 17px;
  }
}
