﻿:root {
  --blue-a: #4567e9;
  --blue-b: #20a6e5;
  --panel: #e9e9ec;
  --line: #d9dde5;
  --text: #111;
  --muted: #b9c0cb;
  --btn: #4799e9;
  --btn-dark: #2f80dc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--text);
}

.mobile-wrap {
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(21, 48, 108, 0.2);
}

.hero {
  height: 232px;
  background: url("/assets/ab-header.webp") center center / cover no-repeat;
}

.card {
  margin-top: -8px;
  background: var(--panel);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 20px 14px 24px;
  min-height: calc(100vh - 252px);
}

.card h1 {
  margin: 4px 0 12px;
  text-align: center;
  font-size: 42px;
  font-weight: 400;
}

.field-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 36px;
  font-weight: 400;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 44px 0 50px;
  font-size: 26px;
  color: #2a2a2a;
  outline: none;
}

.input-wrap input::placeholder {
  color: var(--muted);
}

.input-wrap input:focus {
  border-color: #82b6f4;
  box-shadow: 0 0 0 3px rgba(81, 156, 237, 0.14);
}

.field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

.account-icon {
  background-image: url("/assets/icon-account.svg");
}

.lock-icon {
  background-image: url("/assets/icon-lock.svg");
}

.shield-icon {
  background-image: url("/assets/icon-shield.svg");
}

.eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  width: 28px;
  height: 20px;
  cursor: pointer;
  z-index: 2;
}

.eye-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 16px;
}

.eye-btn::after {
  content: none;
}

.eye-btn[data-state="hidden"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='16' viewBox='0 0 24 16'%3E%3Cpath d='M2 5c3.2 4.4 6.5 6.6 10 6.6S18.8 9.4 22 5' fill='none' stroke='%239aa3b1' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7.4 9.7 6 12M12 11.2v2.4M16.6 9.7 18 12' fill='none' stroke='%239aa3b1' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.eye-btn[data-state="shown"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='16' viewBox='0 0 24 16'%3E%3Cpath d='M1.5 8S5 2.5 12 2.5 22.5 8 22.5 8 19 13.5 12 13.5 1.5 8 1.5 8Z' fill='none' stroke='%239aa3b1' stroke-width='2'/%3E%3Ccircle cx='12' cy='8' r='3' fill='none' stroke='%239aa3b1' stroke-width='2'/%3E%3C/svg%3E");
}

.primary-btn {
  margin-top: 24px;
  width: 100%;
  height: 64px;
  border: 0;
  border-radius: 6px;
  background: var(--btn);
  color: #fff;
  font-size: 36px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(67, 137, 223, 0.22);
}

.primary-btn:active {
  background: var(--btn-dark);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.hidden {
  display: none;
}

.dialog {
  width: min(320px, 92%);
  background: #fff;
  border-radius: 14px;
  text-align: center;
  padding: 14px 16px 16px;
}

.dialog h2 {
  margin: 2px 0 6px;
  font-size: 30px;
  font-weight: 400;
}

.dialog p {
  margin: 8px 0 12px;
  color: #636b76;
  font-size: 24px;
  line-height: 1.35;
}

.dialog-btn {
  border: 0;
  border-radius: 8px;
  width: 96px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  font-weight: 400;
  background: #3f7de8;
}

body.dialog-open .eye-btn {
  visibility: hidden;
  pointer-events: none;
}

.admin-login-page {
  min-height: 100vh;
  background: #f3f3f4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-card {
  width: min(720px, 100%);
  background: #f7f7f8;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
  padding: 40px 56px;
  border: 1px solid #eceff3;
}

.admin-login-card h1 {
  text-align: center;
  margin: 0 0 28px;
  font-size: 46px;
  font-weight: 400;
}

.admin-input {
  width: 100%;
  height: 66px;
  border: 1px solid #d7dce6;
  border-radius: 6px;
  padding: 0 16px;
  font-size: 28px;
  margin-bottom: 18px;
  background: #fff;
}

.admin-input::placeholder {
  color: #c0c6d0;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  align-items: center;
}

.captcha-box {
  border: 1px solid #d7dce6;
  border-radius: 6px;
  height: 66px;
  display: block;
  width: 100%;
  background: #fff;
  cursor: pointer;
}

.admin-login-btn {
  margin-top: 24px;
}

.admin-root {
  min-height: 100vh;
  background: #f3f5f8;
}

.admin-topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e5e9f0;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 30px;
  color: #4f627d;
}

.admin-user {
  position: relative;
  padding-left: 42px;
  font-size: 34px;
}

.admin-user::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -16px;
  border: 2px solid #b7bec8;
  border-radius: 50%;
}

.admin-user::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 18px;
  height: 10px;
  margin-top: 2px;
  border: 2px solid #b7bec8;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.admin-arrow {
  margin-left: 12px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #8f9eb1;
  border-bottom: 2px solid #8f9eb1;
  transform: rotate(45deg) translateY(-2px);
}

.admin-content {
  padding: 24px;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e3e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.data-table th,
.data-table td {
  border: 1px solid #e8edf5;
  padding: 14px;
  font-size: 22px;
  text-align: left;
  color: #324860;
}

.data-table th {
  color: #6c8098;
  font-weight: 400;
}

.danger-btn {
  border: 0;
  background: #ff4e51;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-wrap {
    min-height: 100dvh;
    box-shadow: none;
    max-width: 100%;
    display: flex;
    flex-direction: column;
  }

  .hero {
    height: 150px;
    flex: 0 0 auto;
  }

  .card {
    flex: 1;
    min-height: 0;
    padding: 14px 12px 16px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }

  .card h1 {
    margin: 2px 0 8px;
    font-size: 30px;
  }

  .field-label {
    margin: 10px 0 6px;
    font-size: 24px;
  }

  .input-wrap input {
    font-size: 16px;
    height: 48px;
    padding-left: 40px;
  }

  .field-icon {
    width: 18px;
    height: 18px;
    left: 12px;
    background-size: 18px 18px;
  }

  .lock-icon {
    width: 18px;
    height: 18px;
  }

  .primary-btn {
    margin-top: 14px;
    height: 50px;
    font-size: 24px;
  }

  .dialog h2 {
    font-size: 24px;
  }

  .dialog p {
    font-size: 17px;
    margin: 8px 0 10px;
  }

  .dialog-btn {
    width: 82px;
    height: 40px;
    font-size: 20px;
  }

  .admin-login-card {
    padding: 28px 20px;
  }

  .admin-login-card h1 {
    font-size: 34px;
  }

  .admin-input,
  .captcha-box {
    height: 50px;
    font-size: 20px;
  }

  .captcha-row {
    grid-template-columns: 1fr 140px;
  }

  .admin-topbar {
    font-size: 22px;
  }

  .admin-user {
    font-size: 24px;
    padding-left: 32px;
  }

  .admin-content {
    padding: 10px;
  }

  .table-wrap {
    border: 1px solid #e3e8f0;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 900px;
    border-collapse: collapse;
    border-spacing: 0;
  }

  .data-table thead {
    display: table-header-group;
  }

  .data-table tbody,
  .data-table tr {
    display: table-row-group;
    width: auto;
  }

  .data-table tr {
    display: table-row;
  }

  .data-table th,
  .data-table td {
    display: table-cell;
    white-space: nowrap;
    font-size: 14px;
    padding: 10px 10px;
    word-break: normal;
  }

  .danger-btn {
    font-size: 14px;
    padding: 7px 12px;
  }

  .empty-row td {
    padding: 14px;
    text-align: center;
  }
}

@media (max-width: 768px) and (max-height: 760px) {
  .hero {
    height: 118px;
  }

  .card {
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .card h1 {
    margin-bottom: 6px;
    font-size: 26px;
  }

  .field-label {
    margin: 8px 0 4px;
    font-size: 21px;
  }

  .input-wrap input {
    height: 44px;
    font-size: 15px;
  }

  .primary-btn {
    height: 46px;
    font-size: 22px;
  }
}
