:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #6d6a66;
  --line: #e4dfd7;
  --page: #f3f1ed;
  --surface: #fffdfa;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.login-page-frame {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  opacity: 1;
  transition: opacity 0.12s ease;
}

.login-brand-loading .login-page-frame {
  opacity: 0;
}

.login-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(22px, 5vw, 64px);
}

.login-brand {
  display: inline-grid;
  justify-items: start;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
}

.login-brand img {
  display: block;
  width: min(245px, 58vw);
  max-height: 86px;
  height: auto;
  object-fit: contain;
}

.login-brand-fallback {
  max-width: min(360px, 62vw);
  color: var(--ink);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.15;
}

.firm-login-page .login-brand-fallback {
  padding: 10px 0;
}


.login-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #211d1a;
  color: #fffdfa;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 14px 34px rgba(26, 22, 18, 0.16);
}

.login-brand-text {
  display: grid;
  gap: 2px;
  text-align: left;
}

.login-brand-text strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 1.72rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.login-brand-text small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.login-support-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  padding: 8px 0;
}

.login-support-link:hover {
  color: var(--ink);
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 28px 18px 54px;
}

.login-card {
  width: min(520px, 100%);
  padding: 46px 50px 42px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 22px 60px rgba(26, 22, 18, 0.16);
  text-align: center;
}

.login-heading {
  margin: 0;
}

.login-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 2.65rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.05;
}

.login-heading p {
  max-width: 310px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.login-social-actions {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.login-social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}

.login-social-button:hover {
  border-color: #d3ccc2;
  background: #fffdf9;
}

.login-social-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.login-google-mark {
  font-size: 1rem;
  font-weight: 700;
  color: #4285f4;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 22px 0;
  color: #8a8580;
  font-size: 0.82rem;
}

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

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

.login-form input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 20px;
  outline: none;
  text-align: left;
}

.login-form input:focus {
  border-color: rgba(255, 122, 26, 0.76);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.13);
}

.login-form input::placeholder {
  color: #8b8781;
}

.login-forgot-link {
  justify-self: end;
  margin-top: -4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  text-decoration: none;
  padding: 0;
}

.login-forgot-link:hover {
  color: var(--ink);
}

.login-submit-button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: #e3e6ea;
  color: #8a929b;
  font-weight: 500;
  box-shadow: none;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.login-submit-button:disabled {
  cursor: not-allowed;
}

.login-submit-button:disabled:hover {
  background: #dce1e6;
  transform: none;
}

.login-submit-button.is-ready {
  background: linear-gradient(135deg, #ff6b2a 0%, #ff9f1c 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(255, 122, 26, 0.22);
}

.login-submit-button.is-ready:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(255, 122, 26, 0.28);
}

.login-create-account {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.login-create-account > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.login-create-account p {
  max-width: 340px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.45;
}

.login-copy-email-card {
  display: block;
  margin-top: 2px;
}

.login-copy-email-card > span {
  display: none;
}

.login-copy-email-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 122, 26, 0.34);
  border-radius: 999px;
  background: #fffaf3;
  color: #2b2018;
  font-size: 0.86rem;
  font-weight: 500;
  text-align: center;
  padding: 5px 54px;
}

.login-copy-email-button::before {
  content: attr(data-email);
  min-width: 0;
  overflow-wrap: anywhere;
}

.login-copy-email-button::after {
  content: "Copy";
  position: absolute;
  right: 5px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  background: #ffffff;
  color: #9a5d09;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 10px;
  box-shadow: 0 4px 12px rgba(26, 22, 18, 0.08);
  transform: translateY(-50%);
}

.login-copy-email-button:hover {
  border-color: rgba(255, 122, 26, 0.56);
  background: #fff6e9;
}

.login-copy-status {
  color: #14795b;
  font-size: 0.8rem;
  line-height: 1.4;
}

.login-copy-status.error {
  color: #b8262b;
}

.login-portal-url {
  display: none;
}
.login-error {
  margin: -4px 0 0;
  color: #b8262b;
  font-size: 0.84rem;
  text-align: left;
}

.login-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  padding: 22px;
  color: #8a8580;
  font-size: 0.8rem;
  text-align: center;
}

.login-help-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(21, 21, 21, 0.28);
}

.login-help-card {
  position: relative;
  width: min(440px, 100%);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(26, 22, 18, 0.22);
  padding: 32px;
}

.login-help-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}

.login-help-close:hover {
  color: var(--ink);
}

.login-help-heading {
  padding-right: 34px;
}

.login-help-heading span {
  color: #a46b12;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-help-heading h2 {
  margin: 8px 0 8px;
  font-size: 1.45rem;
  font-weight: 600;
}

.login-help-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.login-help-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.login-help-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.login-help-form input,
.login-help-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 13px 15px;
  outline: none;
}

.login-help-form textarea {
  min-height: 112px;
  resize: vertical;
}

.login-help-form input:focus,
.login-help-form textarea:focus {
  border-color: rgba(255, 122, 26, 0.76);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.13);
}

.login-help-form button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: #211d1a;
  color: #fff;
  font-weight: 600;
}

.login-help-form button:hover {
  background: #151515;
}

.login-help-form button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.login-help-status {
  margin: 0;
  color: #14795b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.login-help-status.error {
  color: #b8262b;
}

.login-mfa-modal {
  z-index: 50;
}

.login-mfa-card {
  width: min(560px, 100%);
}

.login-mfa-card .login-help-heading {
  padding-right: 0;
}

.login-mfa-body {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.login-mfa-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.login-mfa-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.login-mfa-field input:focus {
  border-color: rgba(255, 122, 26, 0.76);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.13);
}

.login-mfa-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.login-mfa-destination {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 122, 26, 0.22);
  border-radius: 10px;
  background: #fff8ef;
  padding: 13px 14px;
}

.login-mfa-destination span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-mfa-destination strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.login-mfa-remember {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.login-mfa-remember input {
  margin-top: 3px;
}

.login-mfa-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.login-mfa-primary,
.login-mfa-secondary {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 650;
  padding: 0 18px;
}

.login-mfa-primary {
  border: 0;
  background: #211d1a;
  color: #ffffff;
}

.login-mfa-primary:hover {
  background: #151515;
}

.login-mfa-primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-mfa-secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.login-mfa-secondary:hover {
  border-color: #d3ccc2;
  background: #fffdf9;
}

@media (max-width: 860px) {
  .login-topbar {
    padding: 22px 18px;
  }

  .login-support-link {
    display: none;
  }

  .login-card {
    padding: 34px 24px 30px;
  }
}

.inactive-logout-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
}

.inactive-logout-card {
  display: grid;
  justify-items: center;
  width: min(760px, 100%);
  color: var(--ink);
  text-align: center;
}

.inactive-logout-brand {
  display: grid;
  place-items: center;
  width: min(300px, 64vw);
  min-height: 104px;
  margin-bottom: 24px;
}

.inactive-logout-logo {
  display: block;
  max-width: 100%;
  max-height: 104px;
  height: auto;
  object-fit: contain;
}

.inactive-logout-logo-fallback {
  max-width: min(320px, 72vw);
  color: var(--ink);
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  font-weight: 650;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.inactive-logout-card h2 {
  margin: 0 0 16px;
  color: #675879;
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  font-weight: 400;
  letter-spacing: 0;
}

.inactive-logout-card p {
  max-width: 680px;
  margin: 0 0 12px;
  color: #25211e;
  font-size: clamp(0.98rem, 2.5vw, 1.08rem);
  line-height: 1.55;
}

.inactive-logout-button {
  min-height: 46px;
  margin-top: 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b2a 0%, #ff9f1c 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 0 22px;
  box-shadow: 0 14px 30px rgba(255, 122, 26, 0.22);
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.inactive-logout-button:hover {
  box-shadow: 0 18px 36px rgba(255, 122, 26, 0.28);
  transform: translateY(-1px);
}
