/* =========================================================
   Revomart Identity Login — page-specific
   Path: /account/login.css
   Visual only. Auth behavior lives in /account/login.js.
   ========================================================= */

body.account-login-page {
  min-height: 100vh;
  background:
    radial-gradient(1100px 480px at 10% -12%, rgba(138, 115, 64, 0.1), transparent 55%),
    radial-gradient(820px 420px at 100% 0%, rgba(14, 26, 43, 0.06), transparent 52%),
    linear-gradient(180deg, #f3f5f8 0%, var(--ac-paper) 42%, #f7f8fa 100%);
}

.ac-login-shell {
  width: min(100% - 40px, 960px);
  margin: 0 auto;
  padding: 36px 0 80px;
}

.ac-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 40px 56px;
  align-items: center;
  min-height: calc(100vh - 180px);
}

/* ---------- Identity brand panel ---------- */
.ac-login-brand {
  padding: 8px 8px 8px 4px;
}

.ac-login-brand-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ac-accent);
}

.ac-login-brand-title {
  margin: 0;
  max-width: 12em;
  font-family: var(--ac-serif);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ac-navy);
  letter-spacing: 0.01em;
}

.ac-login-brand-en {
  margin: 14px 0 0;
  font-size: 16px;
  color: var(--ac-muted);
  line-height: 1.55;
  font-family: var(--ac-serif);
  font-style: italic;
}

.ac-login-brand-lead {
  margin: 18px 0 0;
  max-width: 30em;
  font-size: 15px;
  color: var(--ac-muted);
  line-height: 1.65;
}

/* ---------- Login card overrides ---------- */
body.account-login-page .ac-login-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 30px 28px 28px;
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(14, 26, 43, 0.04),
    0 18px 40px rgba(14, 26, 43, 0.06);
}

body.account-login-page .ac-login-card h2 {
  margin: 0;
  font-family: var(--ac-serif);
  font-size: clamp(26px, 2.8vw, 32px);
  font-weight: 600;
  color: var(--ac-navy);
  line-height: 1.25;
}

.ac-login-welcome-en {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ac-muted);
}

body.account-login-page .ac-lead {
  margin-top: 8px;
  font-size: 15px;
}

.ac-invite-context {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(138, 115, 64, 0.28);
  background: var(--ac-accent-soft);
  color: #5a4a28;
  font-size: 13px;
  line-height: 1.55;
}

.ac-invite-context span {
  display: block;
  margin-top: 4px;
  opacity: 0.9;
}

.ac-trust-entry-context,
.ac-activation-context {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(14, 26, 43, 0.12);
  background: #f3f5f8;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
}

.ac-trust-entry-context span,
.ac-activation-context span {
  display: block;
  margin-top: 4px;
  opacity: 0.9;
}

.ac-compat-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f3f5f8;
  color: var(--ac-muted);
  font-size: 13px;
  line-height: 1.55;
}

.ac-compat-note span {
  display: block;
  margin-top: 4px;
}

body.account-login-page .ac-footer-links {
  text-align: left;
}

body.account-login-page .ac-primary {
  letter-spacing: 0.01em;
}

.ac-login-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 10px;
}

.ac-text-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ac-accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
}

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

/* ---------- Password recovery modal ---------- */
.ac-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
}

.ac-modal {
  width: min(100%, 460px);
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  border: 1px solid var(--ac-line);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.ac-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.ac-modal h3 {
  margin: 0 0 6px;
  color: var(--ac-navy);
  font-size: 22px;
  font-family: var(--ac-serif);
}

.ac-modal-header p {
  margin: 0;
  color: var(--ac-muted);
  font-size: 14px;
  line-height: 1.65;
}

.ac-modal-close {
  border: 0;
  background: #f1f5f9;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  color: #64748b;
}

.ac-recovery-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}

.ac-recovery-tab {
  border: 0;
  background: transparent;
  height: 38px;
  border-radius: 9px;
  cursor: pointer;
  color: #64748b;
  font-weight: 700;
  font-family: inherit;
}

.ac-recovery-tab.is-active {
  background: #fff;
  color: var(--ac-navy);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ac-field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-navy);
}

.ac-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--ac-line);
  border-radius: 8px;
  padding: 0 13px;
  background: #fbfcfd;
  color: var(--ac-ink);
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}

.ac-help-text {
  margin: 10px 0 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}

.ac-inline-message {
  min-height: 20px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--ac-danger);
}

.ac-inline-message.is-success {
  color: #1f6b4a;
}

.ac-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.ac-btn-secondary,
.ac-btn-primary {
  flex: 1;
  height: 46px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.ac-btn-secondary {
  border: 1px solid var(--ac-line);
  background: #fff;
  color: #475569;
}

.ac-btn-primary {
  border: 0;
  background: var(--ac-navy);
  color: #fff;
}

.ac-phone-step .ac-field {
  margin-bottom: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ac-login-layout {
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: stretch;
    min-height: 0;
  }

  .ac-login-brand {
    padding: 4px 0 0;
  }

  .ac-login-brand-title {
    max-width: none;
    font-size: clamp(28px, 7vw, 36px);
  }
}

@media (max-width: 640px) {
  .ac-login-shell {
    width: min(100% - 28px, 1080px);
    padding: 18px 0 56px;
  }

  body.account-login-page .ac-login-card {
    padding: 22px 18px 24px;
  }

  body.account-login-page .ac-primary {
    width: 100%;
  }

}
