/* Sign-in and two-step screens (staff and clients): the garita at dawn on one
   side, the firm's logo and a single clear action on the other. */
:root { --auth-navy: #0F2A36; --auth-ink: #14243B; --auth-gold: #A8843F; --auth-ivory: #F8F6F1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ---------- sign-in page ---------- */
body.auth-page { margin: 0; background: var(--auth-ivory); min-height: 100vh; }
.auth-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr); min-height: 100vh; }
.auth-art { background: #1b3346 url("/assets/brand/tower.jpg") left center / cover no-repeat; position: sticky; top: 0; height: 100vh; }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,42,54,0) 70%, rgba(15,42,54,.18)); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 32px; background:
  radial-gradient(1200px 500px at 100% 0%, rgba(168,132,63,.08), transparent 60%), var(--auth-ivory); }
.auth-inner { width: 100%; max-width: 400px; text-align: center; }
.auth-logo { width: 230px; max-width: 70%; height: auto; display: block; margin: 0 auto 34px; }
.auth-title { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 2rem; letter-spacing: .01em; color: var(--auth-ink); margin: 0 0 8px; }
.auth-sub { color: #5d6675; margin: 0 0 28px; line-height: 1.5; }
.auth-btn { display: block; width: 100%; padding: 15px 20px; border-radius: 3px; background: var(--auth-navy); color: var(--auth-ivory) !important;
  text-decoration: none; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .9rem; border: 1px solid var(--auth-navy);
  transition: background .2s ease, box-shadow .2s ease; }
.auth-btn:hover { background: #163a4a; box-shadow: 0 6px 18px rgba(15,42,54,.18); }
.auth-btn:focus-visible { outline: 3px solid var(--auth-gold); outline-offset: 3px; }
.auth-secure { color: #6b7280; font-size: .85rem; margin: 16px 0 0; }
.auth-panel .error { text-align: left; background: #fff4f2; border-left: 3px solid #9b1c1c; padding: 10px 12px; margin: 0 0 18px; }
.auth-demo { margin-top: 32px; padding-top: 22px; border-top: 1px solid #e3dccd; text-align: left; }
.auth-demo h2 { font-family: Georgia, serif; font-weight: 400; font-size: 1.15rem; margin: 0 0 6px; color: var(--auth-ink); }
.auth-foot { margin-top: 44px; font-size: .8rem; color: #8a8f99; letter-spacing: .04em; }
.auth-foot a { color: #8a8f99; }
.auth-inner > * { animation: auth-in .6s ease both; }
.auth-inner > *:nth-child(2) { animation-delay: .05s; } .auth-inner > *:nth-child(3) { animation-delay: .1s; } .auth-inner > *:nth-child(4) { animation-delay: .15s; }
@keyframes auth-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth-inner > * { animation: none; } .auth-btn { transition: none; } }
/* Small screens: the photo becomes the backdrop and the sign-in sits on a card. */
@media (max-width: 860px) {
  .auth-split { display: block; min-height: 100vh; background: var(--auth-ivory); }
  .auth-art { display: block; position: fixed; inset: 0 0 auto 0; height: 46vh; background-image: url("/assets/brand/tower-garita.jpg"); background-position: 30% 30%; }
  .auth-art::after { background: linear-gradient(180deg, rgba(15,42,54,0) 55%, rgba(15,42,54,.25)); }
  .auth-panel { position: relative; min-height: 100vh; align-items: flex-start; background: transparent; padding: 30vh 14px 28px; }
  .auth-inner { background: rgba(248,246,241,.96); border-radius: 6px; padding: 34px 26px 26px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
  .auth-logo { width: 180px; margin-bottom: 24px; }
  .auth-foot { margin-top: 26px; }
}

/* ---------- two-step and recovery screens inside the staff app and portal ----------
   Same composition as the sign-in page: the garita on the left, the card on ivory. */
body.auth-screen { background: var(--auth-ivory); min-height: 100vh; }
body.auth-screen::before { content: ""; position: fixed; left: 0; top: 0; bottom: 0; width: 52vw; z-index: 0;
  background: #1b3346 url("/assets/brand/tower.jpg") left center / cover no-repeat; pointer-events: none; }
body.auth-screen main, body.auth-screen .wrap { max-width: none !important; margin: 0 !important; padding: 0 !important; }
body.auth-screen > header, body.auth-screen .top, body.auth-screen #pr-band, body.auth-screen #loading { display: none !important; }
body.auth-screen #mfa, body.auth-screen #codes { position: relative; z-index: 1; width: 400px; max-width: calc(48vw - 48px);
  margin: 14vh 0 40px calc(52vw + (48vw - 400px) / 2); background: transparent; border: 0; box-shadow: none; padding: 0; }
body.auth-screen .auth-card-logo { display: block; width: 200px; height: auto; margin: 0 auto 26px; }
body.auth-screen #mfa h1, body.auth-screen #codes h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; text-align: center; color: var(--auth-ink); font-size: 1.8rem; }
body.auth-screen #mfa button:not(.plain), body.auth-screen #codes button:not(.plain) { background: var(--auth-navy); border-color: var(--auth-navy); letter-spacing: .06em; }
body.auth-screen #pk-setup, body.auth-screen #passkey-go { width: 100%; padding: 14px; font-size: 1rem; }
body.auth-screen #mfa input:not([type=checkbox]) { max-width: none; }
.auth-card-logo { display: none; }
@media (max-width: 860px) {
  body.auth-screen::before { width: 100vw; height: 46vh; bottom: auto; background-image: url("/assets/brand/tower-garita.jpg"); background-position: 30% 30%; }
  body.auth-screen #mfa, body.auth-screen #codes { width: auto; max-width: none; margin: 30vh 14px 30px; background: rgba(248,246,241,.98);
    border-radius: 6px; padding: 28px 22px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.22); }
}
@media print { body.auth-screen::before { display: none; } }

/* Email and password form */
.auth-form { text-align: left; margin: 0; }
.auth-form label { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #5d6675; margin: 0 0 6px; font-weight: 600; }
.auth-form input { display: block; width: 100%; max-width: none; padding: 13px 14px; margin: 0 0 18px; border: 1px solid #d8d0c0; border-radius: 3px;
  background: #fff; font: inherit; font-size: 1rem; color: var(--auth-ink); transition: border-color .15s ease, box-shadow .15s ease; }
.auth-form input:focus { outline: none; border-color: var(--auth-gold); box-shadow: 0 0 0 3px rgba(168,132,63,.18); }
.auth-form .auth-btn { margin-top: 6px; cursor: pointer; font-family: inherit; }
.auth-form .auth-btn[disabled] { opacity: .7; cursor: progress; }
.auth-help { color: #5d6675; font-size: .92rem; line-height: 1.5; margin: 0 0 18px; }
.auth-switch { margin: 16px 0 0; font-size: .9rem; }
.auth-switch a, .auth-hub a { color: var(--auth-navy); }
.auth-hub { margin: 10px 0 0; font-size: .82rem; }
.auth-hub a { color: #6b7280; }
