* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0;
  background: #f5f6f8;
  color: #1f2329;
  line-height: 1.6;
}

.banner {
  background: #fff7e6;
  border-bottom: 1px solid #f5d98b;
  color: #7a5b00;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

h1 {
  font-size: 24px;
  margin: 0 0 4px;
}

h2 {
  font-size: 19px;
  margin: 0 0 12px;
}

h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.sub {
  color: #646a73;
  font-size: 14px;
  margin: 0 0 16px;
}

.nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.nav button {
  flex: 1;
  min-width: 120px;
  padding: 10px 8px;
  border: 1px solid #1677ff;
  background: #fff;
  color: #1677ff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav button.active {
  background: #1677ff;
  color: #fff;
}

.view {
  display: none;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.view.active {
  display: block;
}

.card {
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}

.card.locked {
  background: #fafafa;
  border-style: dashed;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-box {
  border: 1px solid #e5e6eb;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafbfc;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.stat-box:hover {
  border-color: #1677ff;
}

.stat-label {
  font-size: 13px;
  color: #646a73;
}

.stat-value {
  font-size: 21px;
  font-weight: 700;
  color: #e60023;
  margin: 4px 0;
}

.stat-hint {
  font-size: 12px;
  color: #1677ff;
}

.money {
  font-size: 18px;
  font-weight: 700;
  color: #e60023;
}

.ok {
  color: #1a7f37;
  font-weight: 700;
}

.muted {
  color: #646a73;
  font-size: 14px;
}

.tag {
  display: inline-block;
  background: #fff7e6;
  color: #7a5b00;
  border: 1px solid #f5d98b;
  border-radius: 4px;
  font-size: 12px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.tag.free {
  background: #e8f5e9;
  color: #1a7f37;
  border-color: #a5d6a7;
}

.tag.paid {
  background: #e6f4ff;
  color: #0958d9;
  border-color: #91caff;
}

.btn {
  display: inline-block;
  padding: 9px 16px;
  background: #1677ff;
  color: #fff;
  border: 1px solid #1677ff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.secondary {
  background: #fff;
  color: #1677ff;
}

.btn.danger {
  background: #fff;
  color: #cf1322;
  border-color: #ffa39e;
}

.btn.small {
  padding: 5px 10px;
  font-size: 13px;
}

.note {
  background: #f5f6f8;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #4e5969;
  margin-top: 12px;
}

.error-box {
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 12px 0;
}

.info-box {
  background: #e6f4ff;
  border: 1px solid #91caff;
  color: #0958d9;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 12px 0;
}

.privacy-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.row-item:last-child {
  border-bottom: none;
}

.rx-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}

.modal {
  background: #fff;
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 18px 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  border-bottom: 1px solid #eee;
  padding: 8px 6px;
  text-align: left;
}

th {
  background: #fafbfc;
  color: #4e5969;
}
