/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #333;
  min-height: 100vh;
}

/* ─── Header ─── */
.header {
  background: #000;
  width: 100%;
}
.header-inner {
  max-width: 480px;
  margin: 0 auto;
}
.header-banner {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* ─── Main Container ─── */
.main {
  background: #fff;
}
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 20px 36px;
}

/* ─── Title ─── */
.title {
  font-size: 28px;
  font-weight: 800;
  color: #222;
  text-align: left;
  margin-bottom: 12px;
  line-height: 1.25;
  letter-spacing: 0.3px;
}

/* ─── Subtitle ─── */
.subtitle {
  font-size: 14px;
  color: #333;
  text-align: left;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ─── Instruction Image ─── */
.img-row {
  margin-bottom: 18px;
}
.instruction-img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Serial Block ─── */
.serial-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}
.serial-label {
  font-size: 14px;
  color: #333;
  white-space: nowrap;
}
.serial-value {
  font-size: 14px;
  color: #333;
  word-break: break-all;
}

/* ─── Input Block ─── */
.input-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.code-input {
  width: 100%;
  height: 48px;
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
  color: #333;
}
.code-input:focus {
  border-color: #CF1D2D;
}
.code-input::placeholder {
  color: #aaa;
}
.verify-btn {
  width: 100%;
  height: 48px;
  background: #CF1D2D;
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s;
}
.verify-btn:hover  { background: #b8182a; }
.verify-btn:active { background: #a01525; }

/* ─── Disclaimer ─── */
.disclaimer {
  font-size: 12px;
  color: #555;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 22px;
}
.disclaimer p + p { margin-top: 8px; }

/* ─── Social ─── */
.social-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}
.social-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.social-tip {
  text-align: center;
  font-size: 12px;
  color: #555;
  line-height: 1.4;
}

/* ─── Modal ─── */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 36px 28px 28px;
  width: 300px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.modal-icon {
  font-size: 52px;
  margin-bottom: 14px;
  line-height: 1;
}
.modal-msg {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.4;
}
.modal-close-btn {
  padding: 8px 32px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: #333;
}

.modal-box.success .modal-icon { color: #27ae60; }
.modal-box.success .modal-msg  { color: #27ae60; }
.modal-box.success .modal-close-btn { background: #27ae60; }

.modal-box.failure .modal-icon { color: #CF1D2D; }
.modal-box.failure .modal-msg  { color: #CF1D2D; }
.modal-box.failure .modal-close-btn { background: #CF1D2D; }


/* ═══════════════════════════════
   Result Page
═══════════════════════════════ */

.result-container {
  padding-top: 24px;
  padding-bottom: 40px;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

/* 标题 */
.result-title {
  font-size: 28px;
  font-weight: 800;
  color: #222;
  margin-bottom: 28px;
  line-height: 1.25;
}
.result-title--warning {
  color: #222;
}

/* 图标 + 描述行 */
.result-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: auto;
  padding-bottom: 48px;
}

.result-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.result-icon--success {
  color: #27ae60;
  border-color: #27ae60;
}
.result-icon--failure {
  color: #CF1D2D;
  border-color: #CF1D2D;
}

.result-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  padding-top: 12px;
}

/* 按钮组 */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
}

.result-btn {
  width: 100%;
  height: 52px;
  border-radius: 2px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  letter-spacing: 0.3px;
}
.result-btn:hover { opacity: 0.88; }

.result-btn--primary {
  background: #CF1D2D;
  color: #fff;
  border: none;
}
.result-btn--outline {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

/* ═══════════════════════════════
   Admin Styles
═══════════════════════════════ */

.admin-body {
  background: #f0f2f5;
}

.admin-header {
  background: #CF1D2D;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
}
.admin-header-inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-brand {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.admin-wrap { min-height: 100vh; }
.admin-content {
  max-width: 780px;
  margin: 28px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #CF1D2D;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  height: 38px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: #CF1D2D; }

.form-msg {
  margin-top: 8px;
  font-size: 13px;
  min-height: 18px;
}
.msg-success { color: #27ae60; }
.msg-error   { color: #CF1D2D; }

.serial-edit-row,
.add-code-row {
  display: flex;
  gap: 10px;
}
.serial-edit-row .form-input,
.add-code-row .form-input { flex: 1; }

.btn {
  height: 38px;
  padding: 0 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, opacity 0.2s;
}
.btn-primary { background: #CF1D2D; color: #fff; }
.btn-primary:hover { background: #b01826; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

.code-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}
.code-table th {
  background: #f5f5f5;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #e0e0e0;
  color: #555;
  font-weight: 600;
}
.code-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.code-table tbody tr:hover { background: #fafafa; }
.code-table code {
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 14px;
  letter-spacing: 1px;
}
.empty-tip { text-align: center; color: #999; font-style: italic; }

/* ─── Login Page ─── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 8px;
  padding: 36px 32px;
  width: 360px;
  max-width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.logo-text {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #CF1D2D;
  letter-spacing: 2px;
}
.logo-sub {
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alert {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 12px;
}
.alert-error {
  background: #fde8e8;
  color: #CF1D2D;
  border: 1px solid #f5c6c6;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .title { font-size: 24px; }
  .admin-content { padding: 0 12px; }
  .card { padding: 18px 14px; }
}

/* ═══════════════════════════════
   Contact Page
═══════════════════════════════ */

.contact-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.contact-main {
  flex: 1;
  padding-bottom: 80px; /* 留出底部 Back 按钮空间 */
}

.contact-container {
  padding-top: 20px;
  padding-bottom: 0;
}

/* 说明文字 */
.contact-intro {
  font-size: 17px;
  color: #222;
  line-height: 1.45;
  margin-bottom: 4px;
}

/* 列表 */
.contact-list {
  list-style: none;
  margin-top: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid #e5e5e5;
}

.contact-region {
  font-size: 15px;
  color: #222;
}

.contact-number {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #222;
  text-decoration: none;
  white-space: nowrap;
}
.contact-number:hover { opacity: 0.75; }

.phone-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #222;
}

/* 固定底部 Back 按钮 */
.contact-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
}

.contact-back-btn {
  display: block;
  width: 100%;
  height: 56px;
  background: #CF1D2D;
  color: #fff;
  border: none;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.15s;
}
.contact-back-btn:hover { background: #b8182a; }
