:root {
  --login-brand: #4f46e5;
  --login-brand-hover: #4338ca;
  --login-brand-active: #3730a3;
  --login-ink: #312e81;
  --login-field: #f1f5f9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #fff;
  color: rgba(15, 23, 42, 0.9);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

a { color: var(--login-brand); text-decoration: none; }
a:hover { color: var(--login-brand-hover); }

.login-shell { min-height: 100vh; display: flex; background: #fff; }

.login-hero {
  position: relative;
  width: 45%;
  min-height: 750px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px;
  overflow: hidden;
  background: var(--login-brand);
}

.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.login-hero::before {
  width: 420px;
  height: 420px;
  left: -150px;
  top: -130px;
  background: rgba(255, 255, 255, 0.12);
}

.login-hero::after {
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: 170px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-content { position: relative; z-index: 1; margin-top: 25vh; width: 100%; max-width: 440px; }
.welcome-mark { width: 90%; max-width: 380px; height: auto; color: #111827; }
.welcome-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: clamp(44px, 6vw, 86px); line-height: 0.86; letter-spacing: -0.06em; font-weight: 900; color: #fff; }
.welcome-eyebrow span:last-child { color: rgba(255, 255, 255, 0.78); transform: translateY(18%); }
.hero-title { margin: 48px 0 0; color: #fff; font-size: 52px; line-height: 1.15; font-weight: 700; }

.login-panel { width: 55%; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: min(100%, 560px); margin: 0 auto; }
.panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-title { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 600; }
.home-link { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 14px; transition: color 0.2s ease; }
.home-link:hover { color: #334155; }
.home-link svg { width: 13px; height: 13px; }

.login-mode { position: relative; margin-bottom: 24px; padding: 12px 0; color: var(--login-brand); border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.login-mode::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 2px; border-radius: 999px; background: var(--login-brand); }

.field { position: relative; margin-bottom: 24px; }
.field-icon { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; color: rgba(15, 23, 42, 0.45); transform: translateY(-50%); pointer-events: none; }
.field input { width: 100%; height: 50px; padding: 0 14px 0 42px; border: 0; border-radius: 8px; background: var(--login-field); color: rgba(15, 23, 42, 0.9); font-size: 14px; outline: 0; transition: box-shadow 0.2s ease, background-color 0.2s ease; }
.field input::placeholder { color: rgba(15, 23, 42, 0.35); }
.field input:focus { background: #fff; box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.14); }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; padding: 0; border: 0; color: rgba(15, 23, 42, 0.45); background: transparent; transform: translateY(-50%); cursor: pointer; }
.password-toggle:hover { color: rgba(15, 23, 42, 0.75); }

.code-row { display: flex; gap: 10px; margin-bottom: 24px; }
.code-row .field { flex: 1 1 auto; margin-bottom: 0; }
.code-button { flex: 0 0 auto; height: 50px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--login-brand); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color 0.2s ease, opacity 0.2s ease; white-space: nowrap; }
.code-button:hover { background: var(--login-brand-hover); }
.code-button.is-disabled,
.submit-button.is-disabled { opacity: 0.5; cursor: not-allowed; }

.form-links { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -2px 0 24px; color: rgba(15, 23, 42, 0.72); font-size: 14px; }
.submit-button { width: 100%; height: 50px; border: 0; border-radius: 6px; background: var(--login-brand); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 2px 0 rgba(79, 70, 229, 0.08); transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.submit-button:hover { background: var(--login-brand-hover); }
.submit-button:active { background: var(--login-brand-active); transform: translateY(1px); }

.footer { width: min(100%, 560px); margin: 34px auto 0; text-align: center; color: rgba(15, 23, 42, 0.45); font-size: 12px; }
.footer a { color: inherit; }

.toast-notification { position: fixed; top: 16px; right: 16px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 10px; background: var(--login-brand); color: #fff; box-shadow: 0 12px 36px rgba(31, 41, 55, 0.18); animation: loginSlideIn 0.3s ease-out, loginFadeOut 0.3s ease-in 4.7s; transition: opacity 0.3s ease; }
.toast-notification svg { width: 20px; height: 20px; flex: 0 0 auto; }

@keyframes loginSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes loginFadeOut { from { opacity: 1; } to { opacity: 0; } }

@media (max-width: 900px) {
  .login-shell { flex-direction: column; }
  .login-hero { width: 100%; min-height: 260px; padding: 32px 24px; }
  .hero-content { margin-top: 32px; max-width: 520px; }
  .hero-title { margin-top: 28px; font-size: 40px; }
  .login-panel { width: 100%; min-height: auto; padding: 36px 24px 28px; }
}

@media (max-width: 560px) {
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; padding: 28px 20px; }
  .panel-title { font-size: 22px; }
  .form-links { align-items: flex-start; flex-direction: column; gap: 8px; }
  .code-row { flex-direction: column; }
  .code-button { width: 100%; }
  .footer { margin-top: 28px; line-height: 1.7; }
}
