/* ==========================================================================
   Admin sign-in
   ========================================================================== */

.login-page {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(900px 540px at 80% 6%, rgba(204, 228, 255, 0.7), transparent 66%),
    radial-gradient(700px 460px at 4% 92%, rgba(255, 225, 204, 0.42), transparent 68%),
    #eff5fb;
}

.login-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-atmosphere-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.login-atmosphere-orb--one {
  top: -140px;
  right: -140px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(129, 183, 255, 0.22), transparent 65%);
}

.login-atmosphere-orb--two {
  bottom: -220px;
  left: -100px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(236, 165, 114, 0.14), transparent 68%);
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(16, 42, 67, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 42, 67, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 45%, black, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, black, transparent 78%);
  opacity: 0.65;
}

/* ---- Brand + top bar ----------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 8px 18px rgba(11, 31, 54, 0.16);
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy strong {
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.brand-copy small {
  color: var(--ink-400);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.login-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(1200px, calc(100% - 48px));
  height: 82px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-400);
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}

.back-link:hover {
  color: var(--ink-800);
}

.back-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}

.back-link:hover svg {
  transform: translateX(-2px);
}

/* ---- Stage --------------------------------------------------------------- */
.login-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 12px 24px 34px;
}

.login-shell {
  display: grid;
  width: min(1140px, 100%);
  min-height: 668px;
  grid-template-columns: 1.02fr 0.98fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  background: var(--white);
  box-shadow:
    0 42px 90px rgba(15, 43, 70, 0.18),
    0 10px 28px rgba(15, 43, 70, 0.07);
}

/* ---- Left showcase ------------------------------------------------------- */
.login-showcase {
  position: relative;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px 44px 33px;
  background:
    radial-gradient(620px 400px at 88% 20%, rgba(40, 117, 201, 0.36), transparent 65%),
    linear-gradient(145deg, #0a2037 0%, #0e2945 52%, #123755 100%);
  color: var(--white);
}

.showcase-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(160deg, black, transparent 72%);
  -webkit-mask-image: linear-gradient(160deg, black, transparent 72%);
}

.showcase-orb {
  position: absolute;
  border: 1px solid rgba(170, 209, 255, 0.12);
  border-radius: 50%;
}

.showcase-orb--one {
  top: -160px;
  right: -140px;
  width: 450px;
  height: 450px;
}

.showcase-orb--two {
  top: -56px;
  right: -36px;
  width: 250px;
  height: 250px;
  border-style: dashed;
  border-color: rgba(170, 209, 255, 0.1);
}

.showcase-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.showcase-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #adc9e2;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.showcase-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #56d6ae;
  box-shadow: 0 0 0 3px rgba(86, 214, 174, 0.1);
}

.showcase-version {
  color: #577692;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.showcase-content {
  position: relative;
  z-index: 2;
  padding: 36px 0 20px;
}

.showcase-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #7fb2df;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.showcase-eyebrow::before {
  content: "";
  width: 19px;
  height: 1px;
  background: currentColor;
}

.showcase-content h1 {
  margin-top: 18px;
  color: #f7fbff;
  font-size: clamp(36px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.045em;
}

.showcase-content h1 span {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  background: linear-gradient(100deg, #a8d4ff, #78e2c5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.showcase-content h1 span::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: -2px;
  left: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(168, 212, 255, 0.4), rgba(120, 226, 197, 0.07));
}

.showcase-content > p {
  max-width: 390px;
  margin-top: 19px;
  color: #91abc2;
  font-size: 13px;
  line-height: 1.9;
}

.showcase-points {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 29px;
  padding-top: 21px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.showcase-points > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.point-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #7dd3bf;
}

.point-icon svg {
  width: 15px;
  height: 15px;
}

.showcase-points strong {
  display: block;
  color: #d8e7f3;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.showcase-points small {
  display: block;
  color: #64839e;
  font-size: 9px;
}

.showcase-quote {
  position: relative;
  z-index: 2;
  padding: 19px 20px 17px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.showcase-quote-mark {
  display: block;
  height: 16px;
  color: #477aa8;
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 0.85;
}

.showcase-quote p {
  margin-top: 2px;
  color: #a9bfd2;
  font-size: 11.5px;
  line-height: 1.75;
}

.showcase-quote-by {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.showcase-avatar {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: linear-gradient(135deg, #2c6bb3, #183e63);
  color: #d5e7f6;
  font-size: 10px;
  font-weight: 600;
}

.showcase-quote-by strong {
  display: block;
  color: #8da9c1;
  font-size: 9.5px;
  font-weight: 500;
}

.showcase-quote-by small {
  display: block;
  color: #577692;
  font-size: 8px;
}

/* ---- Right form ---------------------------------------------------------- */
.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 54px 26px;
  background: var(--white);
}

.login-card {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.form-heading {
  margin-bottom: 25px;
}

.form-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-600);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.form-eyebrow span {
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--blue-500);
}

.form-heading h2 {
  margin-top: 9px;
  color: var(--ink-900);
  font-size: 31px;
  font-weight: 720;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.form-heading p {
  margin-top: 7px;
  color: var(--ink-400);
  font-size: 12.5px;
  line-height: 1.7;
}

.login-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid #ceebdd;
  border-radius: 9px;
  background: #f3fcf8;
  color: var(--green-600);
  font-size: 11.5px;
  line-height: 1.55;
}

.login-notice svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.login-field + .login-field {
  margin-top: 16px;
}

.login-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  width: 100%;
  height: 50px;
  padding: 0 46px 0 43px;
  border: 1px solid #dce6f1;
  border-radius: 10px;
  background: #fafcff;
  color: var(--ink-800);
  font-size: 13.5px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

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

.input-wrap input:focus {
  outline: none;
  border-color: var(--blue-400);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(26, 107, 255, 0.09);
}

.input-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  display: inline-flex;
  color: var(--ink-300);
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 0.2s var(--ease);
}

.input-wrap:focus-within .input-icon {
  color: var(--blue-500);
}

.input-icon svg {
  width: 17px;
  height: 17px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--ink-300);
  transform: translateY(-50%);
  transition:
    color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.password-toggle:hover {
  background: var(--ink-50);
  color: var(--ink-600);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-500);
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}

.check-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.check-box {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--white);
  color: var(--white);
  transition:
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.check-box svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}

.check-label input:checked + .check-box {
  border-color: var(--blue-500);
  background: var(--blue-500);
}

.check-label input:checked + .check-box svg {
  opacity: 1;
}

.check-label input:focus-visible + .check-box {
  outline: 3px solid rgba(26, 107, 255, 0.35);
  outline-offset: 2px;
}

.login-help {
  color: var(--ink-300);
  font-size: 10.5px;
}

.form-error {
  margin-top: 14px;
  animation: error-in 0.25s var(--ease);
}

@keyframes error-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-error svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.login-submit {
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 7px 0 21px;
  border-radius: 10px;
  background: linear-gradient(108deg, #1557dc, #1a6bff);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(26, 107, 255, 0.28);
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(26, 107, 255, 0.33);
}

.login-submit:active {
  transform: translateY(0);
}

.login-submit-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
}

.login-submit-icon svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s var(--ease);
}

.login-submit:hover .login-submit-icon svg {
  transform: translateX(2px);
}

.login-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.login-form.is-shaking {
  animation: form-shake 0.32s var(--ease);
}

@keyframes form-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  55% {
    transform: translateX(4px);
  }
  80% {
    transform: translateX(-2px);
  }
}

.login-submit .btn-spinner {
  margin-right: 9px;
}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 17px;
  color: var(--ink-300);
  font-size: 9.5px;
  line-height: 1.6;
  text-align: center;
}

.login-security svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.login-copyright {
  margin-top: 22px;
  color: var(--ink-300);
  font-size: 9.5px;
  text-align: center;
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1080px) {
  .login-shell {
    min-height: 640px;
    grid-template-columns: 0.94fr 1.06fr;
  }

  .login-showcase {
    padding: 32px 34px 28px;
  }

  .showcase-content h1 {
    font-size: 38px;
  }

  .login-panel {
    padding: 36px 38px 24px;
  }

  .showcase-points {
    gap: 14px;
  }
}

@media (max-width: 860px) {
  .login-page {
    background:
      radial-gradient(700px 450px at 80% 0%, rgba(204, 228, 255, 0.72), transparent 68%),
      #eff5fb;
  }

  .login-topbar {
    height: 74px;
  }

  .login-main {
    align-items: flex-start;
    padding: 8px 20px 28px;
  }

  .login-shell {
    display: block;
    width: min(470px, 100%);
    min-height: 0;
    margin: auto;
    border-radius: 22px;
  }

  .login-showcase {
    display: none;
  }

  .login-panel {
    padding: 38px 38px 24px;
  }

  .login-copyright {
    margin-top: 20px;
  }
}

@media (max-width: 520px) {
  .login-topbar {
    width: calc(100% - 32px);
  }

  .login-topbar .brand-mark {
    width: 37px;
    height: 37px;
  }

  .login-topbar .brand-copy strong {
    font-size: 14px;
  }

  .login-topbar .brand-copy small {
    font-size: 9px;
  }

  .back-link {
    font-size: 11px;
  }

  .login-main {
    padding: 4px 12px 22px;
  }

  .login-shell {
    border-radius: 19px;
  }

  .login-panel {
    padding: 30px 22px 20px;
  }

  .form-heading h2 {
    font-size: 28px;
  }

  .form-heading p {
    font-size: 12px;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .login-security {
    font-size: 9px;
  }
}

@media (max-height: 760px) and (min-width: 861px) {
  .login-topbar {
    height: 68px;
  }

  .login-main {
    align-items: flex-start;
    padding-top: 4px;
  }

  .login-shell {
    min-height: 630px;
  }

  .login-showcase {
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .showcase-content {
    padding-top: 22px;
  }

  .showcase-content h1 {
    font-size: 35px;
  }

  .showcase-content > p {
    margin-top: 13px;
  }

  .showcase-points {
    margin-top: 20px;
    padding-top: 16px;
  }

  .login-panel {
    padding-top: 28px;
    padding-bottom: 18px;
  }

  .form-heading {
    margin-bottom: 18px;
  }

  .login-field + .login-field {
    margin-top: 12px;
  }

  .login-submit {
    margin-top: 15px;
  }

  .login-copyright {
    margin-top: 14px;
  }
}
