/* auth.css — full-page sign-in (phone sign-in, admin portal login), on top of
   colpari.css. Brushed black metal over the whole viewport, the colpari
   hummingbird drawn in as a glowing line, one slim card. No inline code. */

/* Dark page only while the sign-in is shown (the admin portal keeps the hidden
   login in the page after signing in). */
html:has(.auth-page:not([hidden])), html:has(.auth-page:not([hidden])) body { background: #0d0f12; }

.auth-page {
  --metal-0: #0d0f12;
  --metal-1: #1d2126;
  --ink: #e8eef3;
  --ink-soft: #9fb0bf;
  --glow: #33b5d6;
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  isolation: isolate;
  background-color: var(--metal-0);
  background-image:
    radial-gradient(70% 60% at 78% 50%, rgba(0, 149, 186, .20), rgba(0, 149, 186, 0) 70%),
    radial-gradient(120% 70% at 10% -10%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 55%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, rgba(0, 0, 0, .05) 1px 2px, rgba(255, 255, 255, 0) 2px 4px),
    linear-gradient(165deg, var(--metal-1) 0%, #0b0d10 52%, #15181c 100%);
}

/* Slow light sweep across the metal. */
.auth-sheen {
  position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .055) 50%, rgba(255, 255, 255, 0) 58%);
  background-size: 260% 100%;
  animation: auth-sweep 16s ease-in-out infinite alternate;
}
@keyframes auth-sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* The hummingbird: outline drawn in, then a soft fill. */
.auth-bird {
  position: absolute; z-index: -1; pointer-events: none;
  /* Card and bird share a ~1500 px stage, centred on very wide screens. */
  right: max(clamp(1.5rem, 5vw, 6rem), calc((100vw - 1500px) / 2)); top: 50%; transform: translateY(-46%);
  height: min(70vh, 42rem); max-width: 52vw; width: auto;
  filter: drop-shadow(0 0 14px rgba(0, 149, 186, .55)) drop-shadow(0 0 42px rgba(0, 136, 173, .35));
}
.auth-bird path {
  fill: rgba(0, 149, 186, 0);
  stroke: var(--glow); stroke-width: 1.1; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: auth-draw 2.8s cubic-bezier(.6, .05, .25, 1) .25s forwards, auth-fill 1.6s ease 2.4s forwards;
}
@keyframes auth-draw { to { stroke-dashoffset: 0; } }
@keyframes auth-fill { to { fill: rgba(0, 149, 186, .16); } }

/* Brand top-left, footer bottom-left. */
.auth-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: .9rem;
  padding: 1.75rem max(clamp(1.25rem, 5vw, 4rem), calc((100vw - 1500px) / 2 + 2rem)); color: #fff; }
.auth-top .brand-mark { width: 2.6rem; height: 1.9rem; background: #fff; }
.auth-top .brand-word { font-size: 1.55rem; }
.auth-top .sep { width: 1px; height: 1.4rem; background: rgba(255, 255, 255, .25); }
.auth-top .brand-sub { color: var(--ink-soft); opacity: 1; }
.auth-foot { position: absolute; left: 0; bottom: 0; padding: 1.5rem max(clamp(1.25rem, 5vw, 4rem), calc((100vw - 1500px) / 2 + 2rem));
  font-size: .82rem; color: var(--ink-soft); display: flex; gap: 1.25rem; }
.auth-foot a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid rgba(159, 176, 191, .35); }
.auth-foot a:hover { color: #fff; border-bottom-color: var(--glow); }

/* Layout: card in the left third, bird on the right. */
.auth-main { min-height: 100vh; display: flex; align-items: center;
  padding: 6.5rem clamp(1.25rem, 9vw, 9rem) 5rem max(clamp(1.25rem, 9vw, 9rem), calc((100vw - 1500px) / 2 + 2rem)); }

.auth-card {
  position: relative; width: min(25rem, 100%);
  padding: 2.4rem 2.25rem 2.1rem;
  background: rgba(14, 17, 21, .80);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 1.25rem;
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(6px);
  animation: auth-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.auth-card::before { content: ""; position: absolute; left: 2.25rem; right: 2.25rem; top: -1px; height: 3px;
  border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--c-orange), var(--c-orange-light) 30%, var(--c-teal) 70%, var(--c-blue)); }
@keyframes auth-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.auth-eyebrow { font: 500 .72rem var(--f-head); letter-spacing: .22em; text-transform: uppercase; color: var(--glow); margin: 0 0 .9rem; }
.auth-card h1 { font: 500 clamp(1.9rem, 3vw, 2.35rem)/1.1 var(--f-head); letter-spacing: -.01em; text-transform: none;
  color: #fff; margin: 0 0 .6rem; }
.auth-lead { color: var(--ink-soft); margin: 0 0 1.75rem; font-size: 1rem; }
.auth-card ul { color: var(--ink-soft); font-size: .88rem; padding-left: 1.1rem; margin: 0 0 1.25rem; }

.auth-card label { font: 600 .7rem var(--f-text); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .45rem; }
.auth-card .field + .field { margin-top: 1.1rem; }
.auth-card input {
  height: 3.1rem; padding: 0 1rem; font: 400 1.05rem var(--f-text); color: #fff;
  background: rgba(6, 8, 11, .72); border: 1px solid rgba(255, 255, 255, .12); border-radius: .7rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-card input::placeholder { color: rgba(159, 176, 191, .55); }
.auth-card input:hover { border-color: rgba(255, 255, 255, .22); }
.auth-card input:focus { border-color: var(--glow); background: rgba(6, 8, 11, .9);
  box-shadow: 0 0 0 4px rgba(51, 181, 214, .16), 0 0 24px rgba(0, 149, 186, .25); outline: none; }

.auth-submit {
  position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin-top: 1.6rem; height: 3.3rem; padding: 0 1.25rem; border: 0; border-radius: .8rem; cursor: pointer;
  font: 600 1.02rem var(--f-text); color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--c-teal), var(--c-blue-dark));
  box-shadow: 0 .75rem 1.75rem rgba(0, 111, 142, .35), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s;
}
.auth-submit .arrow { font-size: 1.25rem; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.auth-submit:hover { filter: brightness(1.08); box-shadow: 0 1rem 2.25rem rgba(0, 149, 186, .45), inset 0 1px 0 rgba(255, 255, 255, .22); }
.auth-submit:hover .arrow { transform: translateX(5px); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { filter: grayscale(.5) brightness(.8); cursor: wait; }
.auth-submit:focus-visible { outline: 3px solid var(--c-orange-light); outline-offset: 3px; }

.auth-oauth { text-decoration: none; }
.auth-or { display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 1.1rem; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .12); }
#pwLogin[hidden] { display: none; }
/* With the colpari login on, the password form is the fallback: quieter button. */
.has-oauth #pwLogin .auth-submit { background: transparent; color: var(--ink-soft, #c9d3dc);
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: none; margin-top: 1.3rem; height: 2.9rem; }
.has-oauth #pwLogin .auth-submit:hover { border-color: rgba(255, 255, 255, .3); color: #fff; filter: none; box-shadow: none; }
.auth-card .alert { margin-top: 1.1rem; background: rgba(220, 53, 69, .14); color: #ffb3bb; border: 1px solid rgba(220, 53, 69, .35); }
.auth-note { margin: 1.4rem 0 0; font-size: .84rem; color: var(--ink-soft); }
.auth-note a { color: #6fd0ea; }

@media (max-width: 820px) {
  .auth-bird { right: 50%; top: 5.25rem; transform: translateX(50%); height: 24vh; max-width: 88vw; }
  .auth-main { justify-content: center; align-items: flex-start; padding: calc(6.5rem + 24vh) 1.25rem 5rem; }
  .auth-bird { right: 50%; }
  .auth-card { padding: 2rem 1.5rem 1.75rem; }
  .auth-card::before { left: 1.5rem; right: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-sheen { animation: none; }
  .auth-bird path { animation: none; stroke-dashoffset: 0; fill: rgba(0, 149, 186, .16); }
  .auth-card { animation: none; }
}

/* Headline block and notes centred; field labels stay left for readability. */
.auth-eyebrow, .auth-card h1, .auth-lead, .auth-note { text-align: center; }
.auth-lead { max-width: 20rem; margin-left: auto; margin-right: auto; }
.auth-card ul { width: fit-content; margin-left: auto; margin-right: auto; }
