/* AWMZA Go authentication pages — static, framework-free. */
:root {
  --ink: #09111e;
  --panel: #101b2b;
  --panel-soft: #142238;
  --line: #2a3b53;
  --slate: #9aa9be;
  --paper: #edf2f7;
  --accent: #f2a519;
  --accent-deep: #c87a00;
  --teal: #24d0ba;
  --danger: #ff7a87;
  --success: #4ed6a5;
  --focus: #fff3c4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--ink); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 9% 5%, rgba(36, 208, 186, .10), transparent 30rem),
    radial-gradient(circle at 92% 88%, rgba(242, 165, 25, .12), transparent 32rem),
    var(--ink);
  font-family: 'IBM Plex Sans', Arial, sans-serif;
}
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.auth-shell { width: min(100% - 32px, 1040px); margin: 0 auto; }
.auth-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(154, 169, 190, .22);
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  letter-spacing: .08em;
  font: 700 15px 'Space Mono', monospace;
}
.brand-dot { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 12px var(--teal); }
.brand-go { color: var(--accent); }
.auth-nav-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.language-control { display: inline-flex; align-items: center; gap: 7px; color: var(--slate); font-size: 12px; }
.language-control select {
  min-width: 104px; padding: 7px 9px; color: var(--paper); background: var(--panel); border: 1px solid var(--line); border-radius: 3px;
}
.nav-return { color: var(--slate); font-size: 14px; text-decoration: none; }
.nav-return:hover, .auth-link:hover { color: var(--accent); }

.auth-main { display: grid; place-items: center; min-height: calc(100vh - 142px); padding: 44px 0 54px; }
.auth-card {
  width: min(100%, 468px); padding: 34px; background: rgba(16, 27, 43, .95);
  border: 1px solid var(--line); border-radius: 7px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
}
.auth-kicker { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; color: var(--teal); text-transform: uppercase; letter-spacing: .14em; font: 700 11px 'Space Mono', monospace; }
.auth-kicker::before { content: ''; width: 24px; height: 1px; background: currentColor; }
h1 { margin: 0; font: 700 clamp(29px, 6vw, 39px)/1.05 'Space Mono', monospace; letter-spacing: -.04em; }
.auth-intro { margin: 15px 0 27px; color: var(--slate); line-height: 1.58; }
.auth-form { display: grid; gap: 17px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--paper); font-size: 14px; font-weight: 600; }
.field input {
  width: 100%; min-height: 47px; padding: 11px 13px; color: var(--paper); background: #0c1726;
  border: 1px solid var(--line); border-radius: 3px; outline: none;
}
.field input::placeholder { color: #667a95; }
.field input:focus, .language-control select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242, 165, 25, .15); }
.code-input { letter-spacing: .32em; font: 700 21px 'Space Mono', monospace; text-align: center; }
.form-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.auth-link { color: var(--teal); font-size: 14px; text-decoration: none; }
.auth-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 11px 16px;
  color: #172130; background: var(--accent); border: 1px solid var(--accent); border-radius: 3px; font-weight: 700;
}
.auth-button:hover { background: #ffb72f; border-color: #ffb72f; }
.auth-button:disabled { opacity: .68; cursor: wait; }
.auth-button.secondary { color: var(--paper); background: transparent; border-color: var(--line); }
.auth-button.secondary:hover { border-color: var(--teal); background: rgba(36, 208, 186, .08); }
.auth-note { margin: 4px 0 0; color: var(--slate); text-align: center; font-size: 14px; line-height: 1.5; }

.auth-status { display: none; margin: 2px 0; padding: 12px 13px; border: 1px solid transparent; border-radius: 3px; font-size: 14px; line-height: 1.45; }
.auth-status.is-visible { display: block; }
.auth-status.error { color: #ffd9de; background: rgba(191, 61, 77, .15); border-color: rgba(255, 122, 135, .55); }
.auth-status.success { color: #d8ffef; background: rgba(31, 141, 104, .15); border-color: rgba(78, 214, 165, .55); }
.auth-status.info { color: #d6f8f5; background: rgba(17, 137, 126, .14); border-color: rgba(36, 208, 186, .5); }

.qr-zone { display: none; margin: 1px 0 4px; padding: 22px; background: #f8fbff; border-radius: 4px; text-align: center; }
.qr-zone.is-visible { display: block; }
#totpQr { display: inline-flex; width: 208px; height: 208px; align-items: center; justify-content: center; padding: 8px; background: white; }
#totpQr canvas, #totpQr img, #totpQr svg { max-width: 100%; max-height: 100%; }
.otpauth-box { display: none; margin: 0; padding: 11px; overflow-wrap: anywhere; color: #26364a; background: #e9f1fb; border-top: 1px solid #c8d7e9; font: 11px/1.45 'Space Mono', monospace; }
.otpauth-box.is-visible { display: block; }
.step-divider { display: none; margin: 25px 0 19px; border: 0; border-top: 1px solid var(--line); }
.step-divider.is-visible { display: block; }
.confirm-panel { display: none; }
.confirm-panel.is-visible { display: block; }
.confirm-title { margin: 0 0 14px; font-size: 18px; }
.session-warning { margin: 0 0 19px; color: var(--danger); font-size: 14px; line-height: 1.48; }

.auth-footer { padding: 0 0 29px; color: var(--slate); font: 11px 'Space Mono', monospace; text-align: center; }
.auth-footer span { color: var(--teal); }
.awmza-rtl .auth-nav, .awmza-rtl .form-row { direction: rtl; }
.awmza-rtl .auth-kicker { direction: rtl; justify-content: flex-end; }
.awmza-rtl .auth-kicker::before { display: none; }
.awmza-rtl .code-input { direction: ltr; }

@media (max-width: 560px) {
  .auth-shell { width: min(100% - 24px, 1040px); }
  .auth-nav { min-height: 68px; }
  .nav-return { display: none; }
  .language-caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .auth-main { align-items: start; padding-top: 26px; }
  .auth-card { padding: 25px 21px; }
  .auth-nav-tools { gap: 6px; }
}

/* Password visibility and authenticator setup actions. */
.password-wrap { position: relative; }
.password-wrap input { padding-inline-end: 92px; }
.password-toggle {
  position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
  min-height: 32px; padding: 4px 8px; color: var(--teal); background: transparent;
  border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 700;
}
.password-toggle:hover, .password-toggle:focus { border-color: var(--teal); outline: none; }
.authenticator-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; }
.authenticator-actions .auth-button { min-height: 42px; padding: 9px 12px; text-decoration: none; font-size: 13px; }
.authenticator-note { margin: 14px 0 0; color: var(--slate); font-size: 13px; line-height: 1.48; }
.authenticator-note strong { color: var(--danger); }
@media (max-width: 420px) {
  .authenticator-actions { grid-template-columns: 1fr; }
  .password-wrap input { padding-inline-end: 82px; }
  .password-toggle { font-size: 11px; }
}
