/* 全局样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #f5f6f8;
  color: #2c2c2c;
  font-size: 14px;
  line-height: 1.5;
}
a { color: #07c160; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ============ 登录注册样式 ============ */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-wrap { width: 100%; max-width: 420px; }
.auth-card {
  background: #fff; border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
}
.auth-logo { text-align: center; margin-bottom: 12px; }
.logo-icon {
  display: inline-block; width: 56px; height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 14px;
  position: relative;
}
.logo-icon::after {
  content: ''; position: absolute;
  width: 24px; height: 18px; left: 16px; top: 19px;
  background: #fff;
  border-radius: 50% / 60%;
  box-shadow: 0 0 0 4px #667eea, -8px -2px 0 0 #fff inset;
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}
.auth-title { text-align: center; font-size: 22px; color: #1a1a1a; font-weight: 600; }
.auth-sub { text-align: center; color: #888; margin: 6px 0 24px; font-size: 13px; }
.auth-form .form-row { margin-bottom: 16px; }
.auth-form label { display: block; margin-bottom: 6px; color: #555; font-size: 13px; }
.auth-form input {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid #e0e0e0; border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color .2s;
}
.auth-form input:focus { border-color: #667eea; }
.form-code .code-row { display: flex; gap: 10px; }
.form-code .code-row input { flex: 1; }
.btn-code {
  padding: 0 16px; height: 44px;
  background: #f0eefb; color: #667eea;
  border: 1px solid #667eea; border-radius: 8px;
  font-size: 13px; white-space: nowrap;
}
.btn-code:hover { background: #667eea; color: #fff; }
.btn-code:disabled { color: #999; border-color: #ddd; background: #f7f7f7; cursor: not-allowed; }
.btn-primary {
  width: 100%; height: 46px; margin-top: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 500;
  transition: background .2s;
}
.btn-primary:hover { background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%); }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: #888; }

/* ============ 后台布局 ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: #1f2937; color: #cbd5e1;
  flex-shrink: 0; padding: 16px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  font-size: 16px; font-weight: 600; color: #fff;
  padding: 8px 20px 18px; border-bottom: 1px solid #374151;
}
.menu-group { padding: 12px 0 4px; }
.menu-title {
  padding: 6px 20px; font-size: 12px; color: #6b7280;
  letter-spacing: .5px;
}
.menu-item {
  display: block; padding: 10px 20px;
  color: #cbd5e1; font-size: 14px;
  transition: all .2s;
}
.menu-item:hover { background: #374151; color: #fff; text-decoration: none; }
.menu-item.active { background: #07c160; color: #fff; }
.menu-item .sub { padding-left: 14px; }
.main { flex: 1; min-width: 0; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 10;
}
.topbar .title { font-size: 16px; font-weight: 600; color: #1f2937; }
.topbar .user { font-size: 13px; color: #666; }
.topbar .user a { margin-left: 12px; }
.content { padding: 24px; }

/* ============ 卡片 & 表格 ============ */
.card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 20px 22px; margin-bottom: 20px;
}
.card-title {
  font-size: 15px; font-weight: 600; color: #1f2937;
  margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center;
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td {
  padding: 11px 12px; text-align: left;
  border-bottom: 1px solid #f0f0f0;
}
.table th { background: #fafbfc; color: #6b7280; font-weight: 500; }
.table tr:hover td { background: #fafbfc; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-green { background: #e6f7ed; color: #07c160; }
.tag-red { background: #ffece6; color: #ff4d4f; }
.tag-gray { background: #f0f0f0; color: #666; }
.tag-blue { background: #e6f4ff; color: #1890ff; }
.tag-orange { background: #fff7e6; color: #fa8c16; }
.btn {
  display: inline-block; padding: 5px 12px;
  border-radius: 6px; font-size: 13px;
  border: 1px solid #d9d9d9; background: #fff; color: #333;
  margin-right: 4px;
}
.btn:hover { color: #07c160; border-color: #07c160; text-decoration: none; }
.btn-primary-sm {
  background: #07c160; color: #fff; border-color: #07c160;
}
.btn-primary-sm:hover { background: #06ad56; color: #fff; border-color: #06ad56; }
.btn-danger { color: #ff4d4f; border-color: #ffccc7; }
.btn-danger:hover { background: #ff4d4f; color: #fff; border-color: #ff4d4f; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item label { display: block; margin-bottom: 6px; color: #555; font-size: 13px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 8px 12px; height: 38px;
  border: 1px solid #e0e0e0; border-radius: 6px; font-size: 14px; outline: none;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: #07c160; }
.form-item textarea { height: auto; }

/* 弹窗 */
.modal-mask {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 100;
  align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 10px;
  width: 460px; max-width: 92vw; padding: 22px 24px;
}
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.modal-foot { margin-top: 18px; text-align: right; }
.modal-foot .btn { padding: 7px 18px; }

/* 提示 */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 13px; }
.alert-success { background: #f0f9f4; color: #07c160; border: 1px solid #c2e7b5; }
.alert-error { background: #fff0f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.alert-info { background: #e6f4ff; color: #1890ff; border: 1px solid #91caff; }

/* 套餐卡片 */
.pkg-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.pkg-card {
  background: #fff; border-radius: 12px; padding: 24px;
  border: 1px solid #eef0f3; text-align: center;
  transition: all .2s;
}
.pkg-card:hover { border-color: #07c160; box-shadow: 0 6px 20px rgba(7,193,96,.1); transform: translateY(-2px); }
.pkg-name { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.pkg-price { color: #ff4d4f; font-size: 32px; font-weight: 600; margin: 8px 0; }
.pkg-price small { font-size: 14px; }
.pkg-days { color: #888; margin-bottom: 18px; }
.pkg-btn {
  display: inline-block; padding: 9px 30px;
  background: #07c160; color: #fff; border-radius: 6px;
}
.pkg-btn:hover { background: #06ad56; color: #fff; text-decoration: none; }

/* ============ 投诉页面 完美复刻微信官方 ============ */
.wx-body { background: #fff; min-height: 100vh; -webkit-font-smoothing: antialiased; }
.wx-statusbar { height: env(safe-area-inset-top,20px); background: #fff; }
.wx-header {
  background: #fff; color: #000; height: 44px;
  padding: 0 16px; display: flex; align-items: center;
  font-size: 17px; font-weight: 400; position: relative;
  border-bottom: 1px solid #e5e5e5;
}
.wx-header .close-btn { position: absolute; left: 12px; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 8px; cursor: pointer; }
.wx-header .close-icon { color: #000; font-size: 28px; line-height: 1; font-family: serif; }
.wx-header .title { flex: 1; text-align: center; }

.wx-page { background: #fff; min-height: calc(100vh - 44px); padding: 0; }
.wx-tip { padding: 16px 16px 12px; color: #999; font-size: 13px; line-height: 1.5; }
.wx-card { background: #fff; margin: 0; border-bottom: 1px solid #e5e5e5; }
.wx-card-title { font-size: 17px; font-weight: 600; color: #353535; padding: 16px 16px 12px; }
.wx-list { background: #fff; }
.wx-list .wx-item {
  padding: 15px 16px; border-bottom: 1px solid #e5e5e5;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; color: #353535; cursor: pointer; background: #fff;
  transition: background .12s;
}
.wx-list .wx-item:last-child { border-bottom: none; }
.wx-list .wx-item:active { background: #f7f7f7; }
.wx-item .arrow { color: #c7c7c7; font-size: 18px; line-height: 1; font-family: serif; }
.wx-item .arrow::after { content: '›'; }
.wx-section { font-size: 13px; color: #999; padding: 16px 16px 8px; background: #fff; }
.wx-footer { padding: 32px 16px 16px; text-align: center; background: #f7f7f7; }
.wx-footer-link { color: #576b95; font-size: 13px; }
.wx-footer-link:hover { text-decoration: underline; }

.wx-evidence-card { background: #fff; border-bottom: 1px solid #e5e5e5; padding: 0; }
.wx-evidence-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px;
  font-size: 16px; color: #353535;
}
.wx-evidence-row:not(:last-child) { border-bottom: 1px solid #f5f5f5; }
.wx-evidence-label { flex: 1; }
.wx-evidence-value { color: #999; font-size: 15px; }
.wx-evidence-required { color: #ff4d4f; font-size: 13px; margin-left: 4px; }
.wx-evidence-hint { font-size: 13px; color: #999; margin-top: 4px; }

.wx-upload-area { padding: 12px 16px; background: #fff; }
.wx-upload-box { display: flex; flex-wrap: wrap; gap: 8px; }
.wx-upload-btn {
  width: 80px; height: 80px; border: 1px dashed #d9d9d9; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 36px; cursor: pointer; line-height: 1;
  background: #fafafa;
}
.wx-upload-btn:hover { border-color: #07c160; color: #07c160; }
.wx-upload-img { position: relative; width: 80px; height: 80px; }
.wx-upload-img img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.wx-upload-img .del-btn {
  position: absolute; top: -8px; right: -8px; background: rgba(0,0,0,.6);
  color: #fff; width: 20px; height: 20px; border-radius: 50%;
  text-align: center; line-height: 20px; font-size: 14px; cursor: pointer;
}

.wx-textarea-area { background: #fff; padding: 12px 16px; border-bottom: 1px solid #e5e5e5; }
.wx-textarea {
  width: 100%; padding: 0; border: none;
  font-size: 16px; outline: none; background: #fff;
  box-sizing: border-box; color: #353535;
  min-height: 80px; resize: none; line-height: 1.5;
}
.wx-textarea::placeholder { color: #c7c7c7; }
.wx-textarea-counter { text-align: right; font-size: 13px; color: #c7c7c7; margin-top: 8px; }

.wx-submit-area { padding: 20px 16px; background: #fff; }
.wx-submit-btn {
  width: 100%; padding: 13px;
  background: #07c160; color: #fff; border: none; border-radius: 5px;
  font-size: 17px; font-weight: 400;
}
.wx-submit-btn:disabled { background: #d9d9d9; color: #fff; }
.wx-submit-btn:active { background: #06ad56; }

.wx-success { text-align: center; padding: 80px 20px; background: #fff; }
.wx-success .icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: #07c160; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.wx-success .icon::after { content: ''; width: 20px; height: 10px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translateY(-3px); }
.wx-success h3 { font-size: 18px; color: #353535; margin-bottom: 8px; }
.wx-success p { font-size: 13px; color: #999; }
.wx-block { text-align: center; padding: 100px 24px; color: #999; background: #fff; }
.wx-block h3 { font-size: 16px; color: #353535; margin-bottom: 12px; }
.wx-block .pkg { font-size: 13px; color: #07c160; margin-top: 8px; }

.pager { padding: 12px 0; text-align: right; }
.pager a, .pager span {
  display: inline-block; padding: 5px 11px; margin: 0 2px;
  border: 1px solid #e0e0e0; border-radius: 4px; font-size: 13px;
}
.pager .cur { background: #07c160; color: #fff; border-color: #07c160; }
.empty { text-align: center; padding: 40px; color: #999; }
.notice-banner {
  background: linear-gradient(135deg, #07c160 0%, #00a854 100%);
  color: #fff; padding: 14px 20px; border-radius: 10px; margin-bottom: 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.notice-banner .pkg { font-weight: 600; font-size: 15px; }
