* {
  box-sizing: border-box;
}

:root {
  --blue: #168bff;
  --blue-dark: #172ca9;
  --panel-blue: #2334b1;
  --ink: #0f172a;
  --muted: #6b7280;
  --line: #d8dee9;
  --soft: #f6f9fe;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: #0c59cf;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 56px 84px 64px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, .42) 0 9%, transparent 9% 100%),
    linear-gradient(28deg, transparent 0 72%, rgba(255, 255, 255, .82) 72% 100%),
    linear-gradient(210deg, transparent 0 78%, rgba(174, 207, 255, .88) 78% 100%),
    #0d57c9;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-page::before {
  left: -80px;
  top: 10px;
  width: 560px;
  height: 180px;
  background: rgba(255, 255, 255, .45);
  clip-path: polygon(0 0, 100% 0, 64% 100%, 0 36%);
}

.login-page::after {
  right: -60px;
  bottom: -70px;
  width: 520px;
  height: 210px;
  background: rgba(5, 75, 180, .7);
  clip-path: polygon(20% 0, 100% 34%, 100% 100%, 0 100%);
}

.login-frame {
  position: relative;
  z-index: 1;
  width: min(1740px, 92vw);
  min-height: 795px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 24px 60px rgba(0, 32, 96, .22);
}

.visual-pane {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #3546b6, #192da9 72%);
}

.visual-pane::before,
.visual-pane::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, .055);
  border-radius: 42px;
  transform: rotate(-32deg);
}

.visual-pane::before {
  width: 540px;
  height: 150px;
  left: -80px;
  top: 28px;
}

.visual-pane::after {
  width: 520px;
  height: 150px;
  right: -110px;
  top: 68px;
}

.visual-copy {
  position: absolute;
  left: 15.5%;
  top: 84px;
  z-index: 2;
  font-size: 34px;
  line-height: 1.48;
  font-weight: 500;
  color: white;
  letter-spacing: 2px;
}

.iso-field {
  position: absolute;
  inset: 190px 7% 72px;
}

.iso-field::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .72;
  transform: skewY(-8deg);
  background:
    linear-gradient(30deg, transparent 0 48%, rgba(67, 184, 255, .18) 49% 51%, transparent 52%),
    linear-gradient(150deg, transparent 0 48%, rgba(67, 184, 255, .16) 49% 51%, transparent 52%);
  background-size: 92px 92px;
}

.tower {
  position: absolute;
  left: 43%;
  top: 13%;
  width: 140px;
  height: 300px;
  border-radius: 48px 48px 28px 28px;
  background: linear-gradient(180deg, rgba(52, 235, 231, .78), rgba(24, 154, 221, .66));
  box-shadow: 0 0 80px rgba(0, 236, 255, .36);
}

.tower::before {
  content: "";
  position: absolute;
  left: -54px;
  right: -54px;
  bottom: -70px;
  height: 116px;
  border-radius: 50%;
  background: radial-gradient(circle, #57ecff 0 34%, #1d9dff 35% 60%, rgba(0, 72, 255, .42) 61%);
}

.tower i {
  position: absolute;
  background: #38f4e9;
  border-radius: 20px;
}

.tower i:nth-child(1) {
  left: 24px;
  top: 38px;
  width: 34px;
  height: 82px;
}

.tower i:nth-child(2) {
  right: 24px;
  top: 72px;
  width: 38px;
  height: 120px;
}

.tower i:nth-child(3) {
  left: 48px;
  bottom: 50px;
  width: 54px;
  height: 92px;
}

.coin {
  position: absolute;
  z-index: 2;
  width: 126px;
  height: 86px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 42px;
  font-weight: 800;
  border-radius: 50%;
  background: radial-gradient(circle, #72f4ff 0 42%, #1e9cff 43% 72%, #0750d0 73%);
  box-shadow: 0 16px 32px rgba(0, 72, 255, .4);
}

.coin-left {
  left: 23%;
  bottom: 22%;
}

.coin-right {
  right: 24%;
  top: 35%;
  transform: scale(.78);
}

.tile {
  position: absolute;
  z-index: 2;
  width: 58px;
  height: 74px;
  background: linear-gradient(160deg, #20c7ff, #1390ef);
  transform: skewY(-18deg);
}

.tile-a {
  left: 33%;
  top: 42%;
}

.tile-b {
  right: 31%;
  bottom: 19%;
}

.connector {
  position: absolute;
  z-index: 1;
  height: 4px;
  background: #36e7f6;
  box-shadow: 0 0 16px rgba(54, 231, 246, .9);
  transform-origin: left center;
}

.connector-a {
  left: 32%;
  bottom: 30%;
  width: 310px;
  transform: rotate(-27deg);
}

.connector-b {
  left: 55%;
  top: 53%;
  width: 230px;
  transform: rotate(-28deg);
}

.form-pane {
  display: grid;
  align-items: center;
  justify-items: center;
  background: #fff;
}

.login-card {
  width: 466px;
  display: grid;
  gap: 24px;
  padding-top: 6px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: #1e93ff;
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
}

.brand-text {
  font-size: 28px;
  color: #1e93ff;
  font-weight: 900;
  letter-spacing: .4px;
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

.title-row h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}

.title-row span {
  color: #7b8491;
  font-size: 22px;
}

.field {
  display: grid;
  gap: 10px;
  font-size: 16px;
  color: #1f2937;
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap input {
  width: 100%;
  height: 46px;
  border: 1px solid #d6dce6;
  border-radius: 4px;
  padding: 0 46px 0 14px;
  outline: none;
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.input-wrap input:focus {
  border-color: #1e93ff;
  box-shadow: 0 0 0 3px rgba(30, 147, 255, .12);
}

.field-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 1px solid #aeb8c5;
  border-radius: 50%;
}

.lock-icon::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1px dashed #aeb8c5;
  border-radius: 50%;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
  margin-top: -4px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 14px;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: #1e93ff;
}

.text-link {
  border: 0;
  background: transparent;
  color: #168bff;
  padding: 0;
  font-size: 15px;
}

.login-submit,
.alt-login,
.auth-box button {
  width: 100%;
  height: 45px;
  border: 0;
  border-radius: 3px;
  background: #2196f3;
  color: #fff;
  font-size: 18px;
  transition: background .16s ease, opacity .16s ease;
}

.login-submit {
  position: relative;
  margin-top: 4px;
}

.login-submit:hover,
.alt-login:hover,
.auth-box button:hover {
  background: #168bff;
}

.login-submit[aria-busy="true"] {
  pointer-events: none;
  opacity: .86;
}

.button-spinner {
  display: none;
  position: absolute;
  right: 22px;
  top: 50%;
  width: 17px;
  height: 17px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.login-submit[aria-busy="true"] .button-spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-tip {
  min-height: 20px;
  margin: -10px 0 0;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.form-tip.error {
  color: #dc2626;
}

.form-tip.ok {
  color: #16a34a;
}

.auth-details {
  margin-top: -4px;
  border: 1px solid #e3e9f2;
  border-radius: 4px;
  background: #f8fbff;
}

.auth-details summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #42607f;
  font-size: 13px;
  cursor: pointer;
}

.auth-box {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.auth-box textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid #d6dce6;
  border-radius: 4px;
  padding: 10px;
  color: #1f2937;
  background: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.auth-box button {
  height: 34px;
  font-size: 14px;
}

.alt-title {
  margin-top: 8px;
  text-align: center;
  color: #303846;
  font-size: 16px;
}

.alt-login {
  height: 38px;
  font-size: 16px;
}

.register-line {
  text-align: center;
  color: #303846;
  font-size: 16px;
}

.login-page footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 1;
  text-align: center;
  color: #fff;
  font-size: 16px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 170px 1fr;
  background: #f3f6fb;
}

.shell-side {
  background: #fff;
  border-right: 1px solid #edf0f5;
  box-shadow: 4px 0 18px rgba(15, 23, 42, .04);
}

.shell-logo {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #1e93ff;
  font-weight: 900;
  border-bottom: 1px solid #edf0f5;
}

.shell-logo span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #1e93ff;
}

.shell-side nav {
  display: grid;
  gap: 6px;
  padding: 12px 8px;
}

.shell-side button {
  height: 38px;
  border: 0;
  border-radius: 4px;
  color: #26364a;
  background: #fff;
  text-align: left;
  padding: 0 14px;
}

.shell-side button.active {
  color: #fff;
  background: #1e93ff;
}

.shell-main header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid #edf0f5;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .04);
}

.shell-main header div {
  display: flex;
  gap: 10px;
}

.shell-main header button {
  height: 34px;
  border: 1px solid #d8dee9;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  padding: 0 12px;
}

.shell-card {
  margin: 18px;
  padding: 24px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}

.shell-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.shell-card p {
  margin: 0 0 20px;
  color: #64748b;
}

.shell-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.shell-card dl div {
  border: 1px solid #e5eaf2;
  border-radius: 4px;
  padding: 14px;
}

.shell-card dt {
  color: #64748b;
  font-size: 13px;
}

.shell-card dd {
  margin: 6px 0 0;
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .login-page {
    padding: 28px;
  }

  .login-frame {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .visual-pane {
    min-height: 320px;
  }

  .visual-copy {
    left: 44px;
    top: 42px;
    font-size: 28px;
  }

  .iso-field {
    inset: 120px 7% 30px;
  }

  .form-pane {
    padding: 42px 24px;
  }
}

@media (max-width: 640px) {
  .login-page {
    padding: 18px 14px 52px;
  }

  .login-frame {
    width: 100%;
  }

  .visual-pane {
    display: none;
  }

  .login-card {
    width: min(466px, 100%);
    gap: 18px;
  }

  .brand-row {
    margin-bottom: 12px;
  }

  .title-row h1 {
    font-size: 24px;
  }

  .title-row span {
    font-size: 18px;
  }

  .login-page footer {
    font-size: 12px;
    bottom: 12px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .shell-side {
    display: none;
  }

  .shell-main header {
    height: auto;
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .shell-main header div {
    flex-wrap: wrap;
  }

  .shell-card dl {
    grid-template-columns: 1fr;
  }
}
