html {
  font-size: clamp(14px, 0.9vw, 16px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, Arial, sans-serif;
  color: #111827;
  background: #f3f5f7;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-bootstrap-status,
.login-bootstrap-error {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.login-bootstrap-error button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  background: #9f1d2b;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: 10px;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
}

.login-wrap {
  --login-accent: #9f1d2b;
  --login-accent-dark: #811825;
  --login-bg: #f3f5f7;
  --login-surface: #ffffff;
  --login-border: #dde3eb;
  --login-text: #111827;
  --login-muted: #6b7280;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 44px 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(159, 29, 43, 0.12), transparent 38%),
    radial-gradient(circle at 85% 100%, rgba(17, 24, 39, 0.08), transparent 40%), var(--login-bg);
}

.login-card {
  width: min(980px, 96vw);
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--login-surface);
  border: 1px solid var(--login-border);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
  overflow: hidden;
  animation: loginFadeIn 0.22s ease-out;
}

@keyframes loginFadeIn {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-side {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.92)), rgba(17, 24, 39, 0.95);
  color: #ffffff;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
}

.login-logo {
  width: 94px;
  height: 94px;
  border-radius: 22px;
  object-fit: contain;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35);
}

.login-title {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.login-sub {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

.login-main {
  padding: 32px 34px;
}

.login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
}

.login-head h2 {
  margin: 0;
  font-size: 24px;
  color: var(--login-text);
}

.entra-login-section {
  display: grid;
  gap: 15px;
  margin-bottom: 15px;
}

.entra-login-btn {
  width: 100%;
  min-height: 64px;
  border: 1px solid #c8d0dc;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}

.entra-login-btn:hover {
  transform: translateY(-1px);
  border-color: #9ca8b8;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.1);
}

.entra-login-mark {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.entra-login-mark span:nth-child(1) {
  background: #f25022;
}

.entra-login-mark span:nth-child(2) {
  background: #7fba00;
}

.entra-login-mark span:nth-child(3) {
  background: #00a4ef;
}

.entra-login-mark span:nth-child(4) {
  background: #ffb900;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
  color: var(--login-muted);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--login-border);
}

.login-method-chooser {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.login-method-chooser.is-single-option {
  grid-template-columns: 1fr;
}

.login-method-btn {
  min-height: 52px;
  border: 1px solid #d0d7e2;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fafbfc);
  color: #253044;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.login-method-btn i,
.login-method-btn svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.login-method-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 29, 43, 0.45);
  color: var(--login-accent);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.11);
}

.login-method-btn:focus-visible,
.login-back-btn:focus-visible {
  outline: 3px solid rgba(159, 29, 43, 0.2);
  outline-offset: 2px;
}

.login-method-panel {
  animation: loginPanelIn 0.16s ease-out;
}

@keyframes loginPanelIn {
  from {
    opacity: 0.45;
    transform: translateX(5px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.login-method-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.login-method-head h3 {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--login-accent);
  color: var(--login-text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.login-back-btn {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid #d0d7e2;
  border-radius: 11px;
  background: #ffffff;
  color: #344054;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease;
}

.login-back-btn:hover {
  transform: translateX(-2px);
  border-color: rgba(159, 29, 43, 0.4);
  color: var(--login-accent);
  background: #fffafa;
  box-shadow: 0 7px 16px rgba(17, 24, 39, 0.1);
}

.login-back-btn i,
.login-back-btn svg {
  width: 21px;
  height: 21px;
}

.login-alert {
  border-radius: 12px;
  border: 1px solid rgba(159, 29, 43, 0.25);
  background: #fff1f2;
  color: #9f1d2b;
  padding: 10px 12px;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--login-muted);
}

.otp-email-field {
  width: 62%;
}

.login-input {
  border: 1px solid #cfd6df;
  border-radius: 12px;
  background: #ffffff;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.login-input:focus-within {
  border-color: rgba(159, 29, 43, 0.45);
  box-shadow: 0 0 0 3px rgba(159, 29, 43, 0.12);
}

.login-input input {
  width: 100%;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--login-text);
}

.login-input-password {
  display: grid;
  grid-template-columns: 1fr auto;
}

.login-eye {
  height: 100%;
  border: 0;
  border-left: 1px solid #e4e7ec;
  background: #f8fafc;
  color: #344054;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.login-eye:hover {
  background: #f2f4f7;
}

.otp-code-input {
  letter-spacing: 0.22em;
  font-weight: 700;
}

.login-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 10px;
}

.login-btn {
  height: 44px;
  border-radius: 12px;
  border: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    opacity 0.12s ease;
}

.login-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.login-btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--login-accent), var(--login-accent-dark));
  box-shadow: 0 10px 20px rgba(159, 29, 43, 0.24);
}

.login-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.login-btn-secondary {
  color: #344054;
  border: 1px solid #cfd6df;
  background: #ffffff;
}

.login-btn-secondary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(17, 24, 39, 0.1);
}

.login-note {
  width: 100%;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  border: 1px solid #dce3ea;
  background: #f8fafc;
  color: #334155;
}

.login-note.is-compact {
  width: 62%;
}

.login-note.is-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.login-note.is-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1d2b;
}

.login-warning {
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12px;
  color: #6b7280;
  border: 1px dashed #d6dbe3;
  background: #fcfcfd;
}

.login-submit {
  margin-top: 2px;
  width: 100%;
  border-radius: 12px;
  border: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, var(--login-accent), var(--login-accent-dark));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-submit:hover {
  transform: translateY(-1px);
}

.login-arrow {
  font-size: 16px;
}

@media (max-width: 940px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-side {
    padding: 24px 24px 20px;
    align-items: center;
    text-align: center;
  }

  .login-logo {
    width: 78px;
    height: 78px;
  }

  .login-title {
    font-size: 24px;
  }

  .login-main {
    padding: 22px 18px 20px;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  .otp-email-field,
  .login-note.is-compact {
    width: 100%;
  }
}
