/* Backend login only: the public site's espresso / cream / caramel studio theme.
   Presentation only. Password, MFA, email OTP and trusted-browser behavior stay in PHP. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #171310;
  --espresso: #191511;
  --cream: #f4eddf;
  --paper: #fffaf2;
  --caramel: #e6bd8e;
  --muted: #6b5745;
  --line: #b8a590;
  --focus: #9b5b29;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background: var(--espresso);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; }
body { font: 400 16px/1.6 'Manrope', sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  min-height: 100vh;
  min-height: 100svh;
}
.brand-panel {
  display: grid;
  align-items: center;
  padding: clamp(40px, 5vw, 96px);
  background: radial-gradient(ellipse at 80% 25%, #73472a30, transparent 65%), var(--espresso);
  color: var(--cream);
}
.brand-overlay, .steam-wrap { display: none; }
.brand-content { width: 100%; max-width: 640px; margin-inline: auto; }
.partner-brand-wrap { display: flex; align-items: center; gap: clamp(18px, 2vw, 32px); margin-bottom: 48px; }
.partner-logo-card {
  display: grid;
  place-items: center;
  width: clamp(124px, 12vw, 210px);
  height: clamp(124px, 12vw, 210px);
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  flex: none;
  padding: 9px;
  background: var(--paper);
  border-radius: 50%;
  overflow: hidden;
}
.brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.partner-logo-card img[alt="AKopi Logo"] { width: 120%; height: 120%; max-width: none; }
.partner-x { color: var(--caramel); font-size: 30px; font-weight: 500; }
.brand-eyebrow, .small-title { display: none; }
.brand-content h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(46px, 4.6vw, 80px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.brand-copy { max-width: 460px; margin: 26px 0 0; color: #c8bfb4; font-size: 16px; line-height: 1.85; }
.brand-tags { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 40px; }
.brand-tags span { color: var(--caramel); font-size: 12px; font-weight: 700; }

.login-panel {
  display: grid;
  align-items: center;
  justify-items: center;
  min-width: 0;
  padding: clamp(36px, 5vw, 88px);
  background: var(--cream);
}
.login-card { width: 100%; max-width: 440px; min-width: 0; }
.login-heading { margin-bottom: 36px; }
.login-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(36px, 3.3vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.login-heading p:last-child { max-width: 39ch; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
form { margin: 0; }
.field-group { margin-bottom: 22px; }
.field-group label { display: block; margin-bottom: 9px; color: #24190f; font-size: 13px; font-weight: 800; }
.input-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.input-icon { display: none; }
.input-wrap input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 14px 16px;
  color: #24190f;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 160ms ease;
}
.input-wrap input::placeholder { color: #786451; opacity: 1; }
.input-wrap input:focus { border-color: #735035; outline: 2px solid var(--focus); outline-offset: 2px; }
.input-wrap input:disabled { background: #e6ded1; color: #675747; opacity: 1; }
.input-wrap input:-webkit-autofill {
  -webkit-text-fill-color: #24190f;
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
  caret-color: #24190f;
}
.password-wrap input { padding-right: 86px; }
.show-password-btn {
  position: absolute;
  right: 6px;
  min-width: 64px;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #62432b;
  font-size: 13px;
  font-weight: 800;
  transition: background-color 160ms ease;
}
.show-password-btn:hover:not(:disabled) { background: #ece0ce; }
.show-password-btn:disabled { color: #786451; }
.login-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--caramel);
  color: #24190f;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
  transition: background-color 160ms ease;
}
.login-button strong { font-size: 21px; line-height: 1; font-weight: 500; }
.login-button:hover:not(:disabled) { background: #efcca2; }
.login-button:active:not(:disabled) { background: #dcb07d; }
.login-button:disabled { background: #d9ccba; color: #6b5946; }

.alert { margin-bottom: 20px; padding: 14px 16px; border: 1px solid; border-radius: 5px; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.alert-success { color: #285338; background: #edf2e7; border-color: #96ad96; }
.alert-error { color: #8b2922; background: #f9e8e1; border-color: #c49a8c; }
.alert-warning { color: #715016; background: #f6e9ca; border-color: #b8a06b; }
.login-footer-note {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid #d6c8b5;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.lock-dot { display: none; }
.verification-code-input { font-variant-numeric: tabular-nums; letter-spacing: .28em; font-size: 20px !important; font-weight: 700; }
.remember-browser { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 24px; font-size: 13px; font-weight: 600; line-height: 1.6; cursor: pointer; }
.remember-browser input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: #735035; }
.remember-browser small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 400; }
.challenge-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 18px; margin-top: 18px; }
.challenge-actions form { max-width: 100%; }
.challenge-link { min-height: 44px; padding: 10px 0; border: 0; border-radius: 3px; background: transparent; color: #62432b; font-size: 13px; font-weight: 700; line-height: 1.6; text-align: left; text-decoration: underline; text-underline-offset: 4px; }
.challenge-link:hover { color: #24190f; }

@media (max-width: 980px) {
  .login-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .brand-panel { padding: 24px 32px; }
  .brand-content { display: flex; align-items: center; gap: 24px; max-width: 620px; }
  .partner-brand-wrap { gap: 12px; margin: 0; flex: none; }
  .partner-logo-card { width: 64px; height: 64px; padding: 3px; }
  .partner-x { font-size: 22px; }
  .brand-content h1 { font-size: 28px; letter-spacing: -.03em; }
  .brand-copy, .brand-tags { display: none; }
  .login-panel { padding: 44px 32px; }
}
@media (max-width: 520px) {
  .brand-panel { padding: 20px 24px; }
  .brand-content { gap: 20px; }
  .partner-brand-wrap { gap: 8px; }
  .partner-logo-card { width: 48px; height: 48px; }
  .partner-x { font-size: 18px; }
  .brand-content h1 { font-size: 23px; }
  .login-panel { padding: 36px 24px; align-items: start; }
  .login-heading { margin-bottom: 28px; }
  .login-heading h2 { font-size: 36px; }
  .login-heading p:last-child { font-size: 14px; margin-top: 14px; }
  .field-group { margin-bottom: 20px; }
  .login-footer-note { margin-top: 26px; }
  .challenge-actions { align-items: stretch; flex-direction: column; gap: 0; }
  .challenge-actions form, .challenge-link { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
