.login-page {
  min-height: 100vh;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 24px;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  width: min(920px, 100%);
  border-radius: var(--chandan-radius-lg);
  overflow: hidden;
  box-shadow: var(--chandan-shadow-hover);
  border: 1px solid var(--chandan-border);
  animation: login-rise 0.55s ease both;
}

@keyframes login-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Left showcase panel —— */
.login-showcase {
  position: relative;
  padding: 44px 40px;
  background: linear-gradient(
    155deg,
    var(--chandan-primary-dark) 0%,
    var(--chandan-primary) 45%,
    var(--chandan-primary-light) 100%
  );
  color: var(--chandan-white);
  overflow: hidden;
}

.login-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-showcase::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.login-showcase-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.brand-mark-lg {
  height: 52px;
}

.login-showcase-brand .brand-copy strong {
  color: var(--chandan-white);
  font-size: 1.35rem;
}

.login-showcase-brand .brand-copy span {
  color: rgba(255, 255, 255, 0.72);
}

.login-showcase-title {
  margin: 36px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
}

.login-showcase-title span {
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-showcase-lede {
  margin: 0 0 32px;
  max-width: 34ch;
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.login-features {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.login-feature-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
}

.login-feature-icon svg {
  width: 20px;
  height: 20px;
}

.login-features strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.login-features span {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

/* —— Right login card —— */
.login-card {
  position: relative;
  padding: 40px 36px 32px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
}

.login-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--chandan-primary),
    var(--chandan-primary-light),
    var(--chandan-gold)
  );
}

.login-brand-mobile {
  display: none;
  margin-bottom: 28px;
}

.login-card-head h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--chandan-primary-dark);
}

.login-copy {
  margin: 0 0 28px;
  color: var(--chandan-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field span {
  color: var(--chandan-ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  display: grid;
  place-items: center;
  color: var(--chandan-primary-soft);
  pointer-events: none;
}

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

.login-input-wrap input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  border: 1.5px solid var(--chandan-border);
  border-radius: 14px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--chandan-ink);
  background: var(--chandan-white);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.login-input-wrap input::placeholder {
  color: #a89fb5;
}

.login-input-wrap input:hover {
  border-color: rgba(80, 61, 110, 0.28);
}

.login-input-wrap input:focus {
  outline: none;
  border-color: var(--chandan-primary-light);
  box-shadow: 0 0 0 4px rgba(80, 61, 110, 0.12);
  background: #fff;
}

.login-password-toggle {
  position: absolute;
  right: 4px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--chandan-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.login-password-toggle:hover {
  color: var(--chandan-primary);
  background: rgba(80, 61, 110, 0.08);
}

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

.login-password-toggle .hidden {
  display: none;
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.92rem;
  line-height: 1.45;
  animation: login-shake 0.4s ease;
}

.login-error svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.login-error.hidden {
  display: none;
}

@keyframes login-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.login-button {
  position: relative;
  width: 100%;
  margin-top: 4px;
  padding: 14px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
}

.login-button.is-loading .login-button-label {
  opacity: 0;
}

.login-button-spinner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin 0.7s linear infinite;
}

.login-button-spinner.hidden {
  display: none;
}

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

.login-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0;
  font-size: 0.82rem;
  color: var(--chandan-muted);
}

.login-secure-note svg {
  width: 15px;
  height: 15px;
  color: var(--chandan-primary-soft);
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--chandan-muted);
}

.login-footer a {
  color: var(--chandan-primary-dark);
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* —— Shared button styles —— */
.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.button:disabled {
  opacity: 0.75;
  cursor: wait;
}

.button:not(:disabled):hover {
  transform: translateY(-1px);
}

.button:not(:disabled):active {
  transform: translateY(0);
}

.button-primary {
  background: linear-gradient(
    135deg,
    var(--chandan-primary),
    var(--chandan-primary-light)
  );
  color: var(--chandan-white);
  box-shadow: 0 12px 28px rgba(80, 61, 110, 0.32);
}

.button-primary:not(:disabled):hover {
  box-shadow: 0 16px 34px rgba(80, 61, 110, 0.38);
}

/* —— Responsive —— */
@media (max-width: 780px) {
  .login-layout {
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .login-showcase {
    display: none;
  }

  .login-brand-mobile {
    display: flex;
  }

  .login-card {
    padding: 32px 24px 28px;
  }
}

@media (max-width: 400px) {
  .login-shell {
    padding: 20px 12px;
  }

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

  .login-card-head h1 {
    font-size: 1.6rem;
  }
}
