:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  background: #f5f6f8;
  color: #1d1d1f;
  --blue: #007aff;
  --blue-soft: #e8f2ff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --subtle: #a1a1a6;
  --line: rgba(0, 0, 0, 0.08);
  --surface: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 122, 255, 0.13), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(88, 86, 214, 0.11), transparent 32%),
    linear-gradient(180deg, #fbfcff 0%, #f4f6f9 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.passport-shell {
  min-height: 100vh;
  padding: 28px clamp(22px, 4vw, 56px) 56px;
}

.passport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #1d1d1f;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #0a84ff, #64d2ff);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0;
  box-shadow: 0 10px 24px rgba(0, 122, 255, 0.22);
}

.menu-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 4px;
  padding: 12px;
  backdrop-filter: blur(18px);
}

.menu-button span {
  height: 2px;
  border-radius: 99px;
  background: #3a3a3c;
}

.landing-view {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: clamp(86px, 14vh, 150px) 0 40px;
  text-align: center;
}

.landing-view h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.landing-view p {
  width: min(560px, 100%);
  margin: 24px auto 42px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.primary-pill,
.primary-block,
.ghost-button,
.admin-toolbar button,
.code-line button {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  transition: background-color 160ms ease, filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.primary-pill:hover,
.primary-block:hover,
.ghost-button:hover,
.admin-toolbar button:hover,
.code-line button:hover {
  filter: brightness(0.92);
}

.primary-pill:active,
.primary-block:active,
.ghost-button:active,
.admin-toolbar button:active,
.code-line button:active {
  filter: brightness(0.84);
  transform: translateY(1px) scale(0.99);
}

.primary-pill {
  min-width: 184px;
  height: 54px;
  padding: 0 34px;
  font-size: 17px;
  box-shadow: 0 14px 34px rgba(0, 122, 255, 0.24);
}

.primary-block {
  width: 100%;
  height: 50px;
  margin-top: 18px;
  font-size: 15px;
}

.account-view {
  width: min(720px, 100%);
  margin: clamp(56px, 10vh, 94px) auto 0;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding: 0 4px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 36%, #8e8e93 0 18%, transparent 19%),
    radial-gradient(circle at 50% 80%, #8e8e93 0 31%, transparent 32%),
    #e9eef5;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.admin-avatar {
  background:
    radial-gradient(circle at 50% 42%, #fff 0 20%, transparent 21%),
    linear-gradient(135deg, #007aff, #5e5ce6);
}

.profile-head strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.profile-head span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.list-card,
.security-card {
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.list-row,
.security-row {
  width: 100%;
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.list-row:last-child,
.security-row:last-child {
  border-bottom: 0;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 16px;
  text-align: left;
}

.list-row em {
  color: var(--muted);
  font-style: normal;
}

.text-danger {
  display: block;
  margin: 24px auto 0;
  border: 0;
  background: transparent;
  color: #ff3b30;
  font-size: 14px;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  animation: sheet-backdrop-in 180ms ease-out both;
}

.sheet-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(460px, calc(100% - 28px));
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
  padding: 28px;
  backdrop-filter: blur(28px);
  animation: sheet-panel-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.confirm-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(380px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
  padding: 24px;
  text-align: center;
  backdrop-filter: blur(28px);
  animation: sheet-panel-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.confirm-panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.confirm-panel p {
  color: var(--muted);
}

.primary-block:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2);
  opacity: 0.58;
  transform: none;
}

.sheet-panel h2 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 750;
}

.close-button {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f3f5;
  color: #6e6e73;
  font-size: 24px;
  line-height: 1;
}

.sheet-logo {
  margin: 38px 0 30px;
  text-align: center;
  color: var(--blue);
  font-size: 28px;
  font-weight: 800;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 999px;
  background: #eef0f4;
}

.tabs button {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.tabs .active {
  background: #fff;
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.phone-input,
.code-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-input {
  height: 50px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0 14px;
}

.phone-input span {
  padding-right: 12px;
  border-right: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
}

input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  font-size: 15px;
}

.phone-input input {
  height: 48px;
  border: 0;
  background: transparent;
  padding: 0;
}

input:focus {
  border-color: rgba(0, 122, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8a8f98;
  font-size: 17px;
  line-height: 1;
  transition: background-color 150ms ease, color 150ms ease;
}

.password-eye:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
}

.password-eye.is-visible {
  color: var(--blue);
  background: rgba(0, 122, 255, 0.1);
}

@keyframes sheet-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheet-panel-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 18px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.code-line input {
  flex: 1;
}

.code-line button,
.ghost-button {
  height: 50px;
  padding: 0 16px;
  white-space: nowrap;
  background: var(--blue-soft);
  color: var(--blue);
}

.challenge {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.problem-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--blue);
  line-height: 1.6;
  font-size: 14px;
}

.mobile-page {
  min-height: 100vh;
  background: #fbfbfd;
}

.standalone {
  background: #fbfbfd;
}

.overlay-page {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.topbar {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 253, 0.86);
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  backdrop-filter: blur(18px);
}

.topbar a,
.topbar button {
  border: 0;
  background: transparent;
  color: #3a3a3c;
  text-decoration: none;
  font-size: 34px;
  line-height: 1;
}

.verify-block {
  width: min(460px, calc(100% - 36px));
  margin: 76px auto 0;
  text-align: center;
}

.overlay-page .verify-block {
  margin-top: 54px;
}

.phone-icon,
.soft-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 30px;
}

.verify-block p {
  color: var(--muted);
  font-size: 16px;
}

.verify-block strong {
  display: block;
  margin: 10px 0 26px;
  font-size: 22px;
}

.verify-block input,
.verify-block .code-line {
  margin-top: 12px;
}

.security-row {
  display: grid;
  grid-template-columns: 58px 1fr 24px;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 0 20px;
  text-align: left;
}

.security-row .soft-icon {
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.security-row strong {
  display: block;
  font-size: 16px;
}

.security-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.security-row b {
  color: var(--subtle);
  font-size: 22px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 16px;
}

.admin-toolbar strong {
  font-size: 20px;
}

.admin-toolbar button {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-row {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.admin-row strong {
  display: block;
  font-size: 16px;
}

.admin-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.admin-row .row-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.admin-row button {
  height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.admin-row button.secondary {
  background: #eceef2;
  color: #606974;
}

@media (min-width: 820px) {
  .passport-shell::after {
    content: "";
    display: block;
    width: min(720px, 90%);
    height: 1px;
    margin: 80px auto 0;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
  }
}

@media (max-width: 640px) {
  .passport-shell {
    padding: 22px 22px 44px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
  }

  .landing-view {
    padding-top: 92px;
  }

  .landing-view h1 {
    font-size: 42px;
  }

  .landing-view p {
    margin-bottom: 34px;
    font-size: 17px;
  }

  .primary-pill {
    width: min(280px, 100%);
    height: 52px;
  }

  .sheet-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    transform: translateX(-50%);
    border-radius: 28px 28px 0 0;
    padding: 26px 24px 38px;
    animation-name: sheet-panel-mobile-in;
  }

  @keyframes sheet-panel-mobile-in {
    from {
      opacity: 0;
      transform: translate(-50%, 24px);
    }
    to {
      opacity: 1;
      transform: translate(-50%, 0);
    }
  }

  .sheet-logo {
    margin: 34px 0 28px;
  }

  .account-view {
    margin-top: 50px;
  }
}
