* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: #f5f7fa;
  line-height: 1.6;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.site-header {
  background: #111827;
  color: #fff;
  padding: 40px 0;
}
.site-header h1 { font-size: 28px; margin-bottom: 8px; }
.site-header p { color: #9ca3af; }

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

main.container { padding-top: 32px; padding-bottom: 64px; }

.domain-list { display: grid; gap: 16px; }

.domain-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}
.domain-name { font-size: 22px; color: #111827; }
.domain-title { color: #6b7280; font-size: 14px; margin-top: 4px; }
.domain-desc { color: #4b5563; margin-top: 8px; }
.domain-price { color: #2563eb; font-weight: 700; font-size: 18px; margin-top: 8px; }

.domain-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; }
.stat { color: #6b7280; font-size: 13px; }
.stat-price { color: #2563eb; font-weight: 600; }

.domain-link { color: inherit; text-decoration: none; }
.domain-link:hover { color: #2563eb; text-decoration: underline; }
.domain-actions { display: flex; gap: 10px; }

.domain-detail { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.domain-detail .domain-name { margin-bottom: 4px; }
.offer-history { margin-bottom: 24px; }
.offer-history h3 { margin-bottom: 12px; font-size: 18px; }
.offer-history td:first-child { color: #2563eb; font-weight: 600; }
.offer-btn { margin-top: 16px; }
.featured-offer {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%);
  border: 2px solid #2563eb;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.10);
}
.featured-banner { margin-bottom: 20px; }
.featured-label {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  margin-bottom: 10px;
}
.featured-domain {
  font-size: 36px;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 4px;
  word-break: break-all;
}
.featured-hint { color: #6b7280; font-size: 13px; }
.featured-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.featured-form > label:first-of-type { margin-top: 0; }
.offer-submit { padding: 18px 64px; font-size: 20px; font-weight: 700; }
.offer-submit-wrap { text-align: center; margin-top: 20px; }
.opt { color: #9ca3af; font-size: 12px; }
.stat-link { color: #2563eb; text-decoration: none; font-weight: 600; margin-left: 4px; }
.stat-link:hover { text-decoration: underline; }
.offer-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.offer-history-head h3 { margin-bottom: 0; }
.featured-offer .offer-history { margin-bottom: 0; }
.login-banner {
  background: #dcfce7;
  color: #15803d;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.btn {
  display: inline-block;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-small { padding: 4px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; font-weight: 600; }

.empty { text-align: center; color: #9ca3af; padding: 48px 0; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tabs a {
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.tabs a.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.data-table th, .data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  white-space: nowrap;
}
.data-table th { background: #f9fafb; color: #6b7280; font-weight: 600; }
.data-table tr:hover td { background: #fafafa; }

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.show { display: flex; }
.modal-body {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-body h3 { margin-bottom: 16px; }

label { display: block; margin: 12px 0 6px; font-size: 14px; color: #374151; }
.req { color: #dc2626; }
input, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}
input:focus, textarea:focus { outline: none; border-color: #2563eb; }
input[readonly] { background: #f3f4f6; color: #6b7280; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.error { color: #dc2626; background: #fef2f2; padding: 10px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
}
.login-box h1 { font-size: 22px; margin-bottom: 8px; }
.login-box .btn { width: 100%; margin-top: 20px; }

.detail-list { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; }
.detail-list dt { color: #6b7280; font-size: 14px; }
.detail-list dd { font-size: 14px; word-break: break-all; }

.pin-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 12px;
  color: #b45309;
  background: #fef3c7;
  border-radius: 4px;
  vertical-align: middle;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-top: 24px;
}
.page-link {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
}
.page-info { color: #6b7280; font-size: 14px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.filter-label { color: #374151; font-size: 14px; font-weight: 600; }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.badge-on { color: #15803d; background: #dcfce7; }
.badge-off { color: #6b7280; background: #f3f4f6; }

.op-group { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-form { display: inline; }
.btn-danger { color: #dc2626; border-color: #fecaca; background: #fff; }
.btn-danger:hover { background: #fef2f2; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.checkbox-label input { width: auto; }

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.user-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-phone {
  color: #9ca3af;
  font-size: 14px;
  margin-right: 4px;
}
.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-hint {
  margin-top: 12px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}
.form-hint a { color: #2563eb; text-decoration: none; }

.success {
  color: #15803d;
  background: #dcfce7;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.settings-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}
.settings-form h2 { font-size: 18px; margin: 24px 0 8px; }
.settings-form h2:first-child { margin-top: 0; }
.form-tip { color: #6b7280; font-size: 13px; margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

#userModal h4 { margin: 16px 0 8px; font-size: 15px; }

.site-footer { background: #111827; color: #9ca3af; margin-top: 48px; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; padding: 40px 20px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-col p { font-size: 14px; margin: 4px 0; }
.footer-col a { color: #93c5fd; text-decoration: none; }
.footer-qr { text-align: center; }
.footer-qr img { width: 120px; height: 120px; border-radius: 8px; background: #fff; padding: 6px; }
.footer-qr p { color: #9ca3af; font-size: 13px; margin-top: 8px; }
.footer-copy { border-top: 1px solid #1f2937; padding: 16px 0; }
.footer-copy p { text-align: center; font-size: 13px; color: #6b7280; }

.upload-row { display: flex; align-items: center; gap: 20px; margin: 8px 0 16px; }
.avatar-preview { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #f3f4f6; }
.qrcode-preview { width: 120px; height: 120px; border-radius: 8px; object-fit: contain; background: #f3f4f6; }
.qrcode-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
}
.upload-control { flex: 1; }

@media (max-width: 640px) {
  .domain-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .data-table { display: block; overflow-x: auto; }
  .header-top { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; gap: 24px; }
  .upload-row { flex-direction: column; align-items: flex-start; }
  .featured-domain { font-size: 26px; }
}
