/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.login-shell {
  --login-terra: oklch(0.52 0.13 262);
  --login-terra-deep: oklch(0.42 0.13 265);
  --login-g-top: oklch(0.27 0.075 272);
  --login-g-mid: oklch(0.40 0.115 264);
  --login-g-bot: oklch(0.52 0.130 258);
  --login-glow: oklch(0.72 0.13 268 / 0.5);
  --login-sun: oklch(0.96 0.06 82);
  --login-ink: oklch(0.26 0.02 262);
  --login-muted: oklch(0.50 0.02 262);
  --login-line: oklch(0.90 0.008 262);
  --login-field: oklch(0.985 0.005 262);
  --login-warm-line: oklch(0.98 0.02 70 / 0.35);
  --login-warm-soft: oklch(0.98 0.02 70 / 0.75);
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 1fr);
  background: #ffffff;
  color: var(--login-ink);
  letter-spacing: 0;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 56px 64px;
  color: #ffffff;
  background:
    radial-gradient(150% 78% at 50% 122%, var(--login-glow) 0%, transparent 60%),
    linear-gradient(185deg, var(--login-g-top) 0%, var(--login-g-mid) 52%, var(--login-g-bot) 100%);
}

.login-brand-top,
.login-mobile-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--login-sun);
  background: oklch(0.98 0.02 70 / 0.14);
  border: 1px solid var(--login-warm-line);
}

.login-brand-mark svg {
  width: 26px;
  height: 26px;
}

.login-brand-name {
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.login-brand-name span {
  display: block;
  margin-top: 4px;
  color: var(--login-warm-soft);
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-brand-hero {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin-top: auto;
}

.login-kicker {
  margin-bottom: 18px;
  color: oklch(0.95 0.04 72 / 0.9);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.login-brand-hero h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
}

.login-brand-hero h1 em,
.login-brand-foot em {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.login-brand-hero p {
  max-width: 380px;
  margin: 20px 0 0;
  color: oklch(0.98 0.02 70 / 0.85);
  font-size: 16.5px;
  line-height: 1.5;
}

.login-brand-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 48px;
  color: oklch(0.98 0.02 70 / 0.7);
  font-size: 13.5px;
  line-height: 1.5;
}

.login-form-side {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
  background: #ffffff;
}

.login-panel {
  width: 100%;
  max-width: 392px;
}

.login-mobile-brand {
  display: none;
  justify-content: center;
  margin-bottom: 28px;
  color: var(--login-ink);
}

.login-mobile-brand .login-brand-mark {
  color: var(--login-sun);
  background: var(--login-terra-deep);
  border-color: var(--login-terra-deep);
}

.login-mobile-brand .login-brand-name span {
  color: var(--login-muted);
}

.login-tenant {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--login-line);
}

.login-tenant-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-tenant-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.login-tenant-name {
  color: var(--login-ink);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

.login-tenant-subtitle {
  margin-top: 3px;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.3;
}

.login-title {
  margin: 0;
  color: var(--login-ink);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
}

.login-subtitle {
  margin: 8px 0 0;
  color: var(--login-muted);
  font-size: 15px;
  line-height: 1.5;
}

.login-flash {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.login-flash-alert {
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

.login-flash-notice {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.login-sso,
.login-password-form {
  margin-top: 34px;
}

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

.login-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--login-ink);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
}

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

.login-input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--login-muted);
  pointer-events: none;
}

.login-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--login-line);
  border-radius: 11px;
  background: var(--login-field);
  padding: 0 14px 0 42px;
  color: var(--login-ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-input::placeholder {
  color: oklch(0.64 0.02 60);
}

.login-input:focus {
  outline: none;
  border-color: var(--login-terra);
  background: #ffffff;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--login-terra) 16%, transparent);
}

.login-form-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.login-link {
  color: var(--login-terra);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  text-decoration: none;
}

.login-link:hover {
  text-decoration: underline;
}

.login-submit,
.login-google-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: var(--login-terra);
  font: inherit;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: 0 6px 18px color-mix(in oklab, var(--login-terra) 32%, transparent);
  transition: transform 80ms ease, background 150ms ease, box-shadow 150ms ease;
}

.login-submit:hover,
.login-google-button:hover {
  background: var(--login-terra-deep);
}

.login-submit:active,
.login-google-button:active {
  transform: translateY(1px);
}

.login-submit svg {
  width: 17px;
  height: 17px;
}

.login-sso-note {
  margin: 12px 0 0;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.login-sso-note code {
  padding: 2px 6px;
  border-radius: 6px;
  background: color-mix(in oklab, var(--login-terra) 9%, white);
  color: var(--login-terra-deep);
  font-size: 12px;
}

.login-parent-details {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--login-line);
}

.login-parent-details summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.login-parent-details summary::-webkit-details-marker {
  display: none;
}

.login-parent-details summary:hover {
  color: var(--login-ink);
}

.login-parent-details summary svg {
  width: 14px;
  height: 14px;
  transition: transform 150ms ease;
}

.login-parent-details[open] summary svg {
  transform: rotate(90deg);
}

.login-parent-form .login-password-form {
  margin-top: 20px;
}

.login-foot-note {
  margin: 28px 0 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.login-foot-note + .login-foot-note {
  margin-top: 10px;
}

/* ── MFA + password-reset extensions (same shell as the login page) ── */

.login-code-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--login-line);
  border-radius: 11px;
  background: var(--login-field);
  padding: 0 14px;
  color: var(--login-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  text-align: center;
  letter-spacing: 0.35em;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-code-input::placeholder {
  color: oklch(0.64 0.02 60);
}

.login-code-input:focus {
  outline: none;
  border-color: var(--login-terra);
  background: #ffffff;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--login-terra) 16%, transparent);
}

.login-secondary {
  margin-top: 16px;
  text-align: center;
}

.login-secondary form {
  display: inline;
}

.login-link-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--login-terra);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.login-link-button:hover {
  text-decoration: underline;
}

.login-steps {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-steps strong {
  color: var(--login-ink);
}

.login-qr {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.login-qr > div {
  width: 176px;
  height: 176px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--login-line);
  border-radius: 12px;
}

.login-hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--login-muted);
}

.login-secret {
  margin: 4px 0 0;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  word-break: break-all;
  color: var(--login-ink);
}

@media (max-width: 900px) {
  .login-shell {
    display: block;
  }

  .login-brand {
    display: none;
  }

  .login-form-side {
    min-height: 100vh;
    padding: 40px 24px;
  }

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

@media (max-width: 480px) {
  .login-form-side {
    padding: 32px 18px;
  }

  .login-panel {
    max-width: none;
  }

  .login-tenant {
    margin-bottom: 28px;
    padding-bottom: 24px;
  }

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