/* Synerra sign-in pages (login, MFA, password reset / invite) — shared look.
   Background shapes: include/auth_background.php; headline: include/auth_hero.php. */

:root {
  --ink: #120f15; --plum: #433c48; --plum-2: #29252c; --copper: #ba745f; --copper-2: #c99383;
  --rose: #d8b2a7; --text: #f4ece9; --muted: rgba(244,236,233,.62); --line: rgba(216,178,167,.20);
  --error: #ff8a7a; --success: #7fe3b4;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif; color: var(--text); min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(900px 600px at 82% 18%, rgba(186,116,95,.30), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(186,116,95,.10), transparent 70%),
    radial-gradient(600px 400px at 30% 10%, rgba(201,147,131,.10), transparent 70%),
    linear-gradient(135deg, #0e0b11 0%, #1a141d 45%, #2a1d22 100%);
}

/* ── decorative layer ─────────────────────────────── */
.bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.bg svg { position: absolute; }
/* honeycomb mesh, fading out from the top-right corner */
.bg .hexes { right: 0; top: 0; width: 64vw; max-width: 1100px; height: 70vh; opacity: .5;
             -webkit-mask: radial-gradient(120% 100% at 100% 0%, #000 0%, transparent 70%);
                     mask: radial-gradient(120% 100% at 100% 0%, #000 0%, transparent 70%); }
/* large shield with a check, low on the right (the card's glass blurs it where they overlap) */
.bg .shield { right: 5%; bottom: 8%; width: clamp(170px, 15vw, 270px); opacity: .85; filter: drop-shadow(0 0 30px rgba(186,116,95,.30)); }
/* network graph, bottom left */
.bg .mesh { left: -40px; bottom: -30px; width: 560px; opacity: .55; }
/* binary stream, top left */
.bg .bits { left: 3%; top: 4%; width: 300px; opacity: .22; font-family: ui-monospace, Menlo, monospace; }
/* small glass badges floating around the shield */
.badge {
  position: absolute; width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(216,178,167,.28); color: var(--rose);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.badge svg { position: static; width: 26px; height: 26px; }
.badge.b1 { right: 22%; bottom: 10%; transform: rotate(-8deg); }
.badge.b2 { right: 5%;  top: 34%;    transform: rotate(6deg); }
.badge.b3 { right: 24%; top: 9%;     transform: rotate(-4deg); width: 50px; height: 50px; }
.badge.b4 { right: 4%;  top: 11%;    transform: rotate(10deg); width: 46px; height: 46px; opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .badge { animation: float 7s ease-in-out infinite; }
  .badge.b2 { animation-delay: -2s; } .badge.b3 { animation-delay: -4s; } .badge.b4 { animation-delay: -5.5s; }
  @keyframes float { 50% { translate: 0 -10px; } }
  .bg .shield .scan { animation: scan 6s ease-in-out infinite; }
  @keyframes scan { 0%, 100% { transform: translateY(0); opacity: 0; } 15%, 85% { opacity: .55; } 50% { transform: translateY(330px); } }
}

/* ── layout ───────────────────────────────────────── */
.stage {
  position: relative; z-index: 1; min-height: 100vh; display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px) minmax(0, .55fr);
  align-items: center; gap: 3rem; padding: 3rem clamp(1.25rem, 5vw, 5rem);
}
.hero { align-self: center; }
.hero-kicker { font-family: 'Outfit', sans-serif; font-weight: 300; font-size: clamp(1.4rem, 2.4vw, 2.4rem); letter-spacing: .02em; color: rgba(255,255,255,.88); }
.hero-big {
  font-family: 'Outfit', sans-serif; font-weight: 700; line-height: .95; letter-spacing: -.02em;
  font-size: clamp(3rem, 5.4vw, 7.6rem); margin: .1em 0 .05em; white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 0%, #f3e3dd 55%, #d8b2a7 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-family: 'Outfit', sans-serif; font-weight: 300; font-size: clamp(1.6rem, 3.6vw, 3.4rem); color: #fff; letter-spacing: .01em; }
.hero-text { margin-top: 1.4rem; max-width: 520px; color: var(--muted); font-size: .98rem; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.chip { font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: .38rem .75rem; border-radius: 999px;
        border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--rose); backdrop-filter: blur(6px); }

/* ── sign-in card (glass) ─────────────────────────── */
.card {
  position: relative; width: 100%; padding: 2.1rem 2rem 1.7rem; border-radius: 20px;
  background: linear-gradient(160deg, rgba(67,60,72,.55) 0%, rgba(41,37,44,.42) 60%, rgba(41,37,44,.30) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
}
.card::before {   /* soft copper sheen */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px 180px at 85% 0%, rgba(201,147,131,.18), transparent 70%);
}
.brand { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.brand img { height: 46px; width: auto; }
.card h1 { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 1.65rem; color: #fff; }
.card .lead { font-size: .86rem; color: var(--muted); margin-top: .2rem; margin-bottom: 1.5rem; }

.field { margin-bottom: 1.05rem; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.86); margin-bottom: .4rem; }
.control { position: relative; }
.control input {
  width: 100%; padding: .78rem .95rem; font: inherit; font-size: .95rem; color: #fff;
  background: rgba(14,11,17,.42); border: 1px solid rgba(216,178,167,.22); border-radius: 10px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.control input::placeholder { color: rgba(244,236,233,.38); }
.control input:focus { outline: none; border-color: var(--copper-2); background: rgba(14,11,17,.55); box-shadow: 0 0 0 3px rgba(186,116,95,.22); }
.control input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #1d1820 inset; caret-color: #fff; }
.control .with-btn { padding-right: 2.9rem; }
.eye {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--rose); cursor: pointer;
}
.eye:hover, .eye:focus-visible { background: rgba(255,255,255,.07); outline: none; }
.row-end { display: flex; justify-content: flex-end; margin: -.3rem 0 1.15rem; }
.link { color: var(--rose); font-size: .82rem; font-weight: 500; text-decoration: none; }
.link:hover { color: #fff; text-decoration: underline; }

.btn-primary {
  width: 100%; padding: .85rem; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 700; font-size: .95rem; color: #fff;
  background: linear-gradient(135deg, #c99383 0%, #ba745f 55%, #9c5c4a 100%);
  box-shadow: 0 10px 24px rgba(186,116,95,.35); transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 30px rgba(186,116,95,.45); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .7; cursor: progress; }

.alerts { display: grid; gap: .5rem; margin-bottom: 1.1rem; }
.alert { font-size: .84rem; line-height: 1.45; padding: .65rem .8rem; border-radius: 10px; border: 1px solid; }
.alert.error   { color: #ffd2cb; background: rgba(255,90,70,.12); border-color: rgba(255,138,122,.35); }
.alert.success { color: #c9f5df; background: rgba(60,200,140,.12); border-color: rgba(127,227,180,.35); }

.divider { display: flex; align-items: center; gap: .8rem; margin: 1.35rem 0 1rem; color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(216,178,167,.35), transparent); }
.sso { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.sso a {
  display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem .6rem; border-radius: 10px;
  color: #fff; font-size: .86rem; font-weight: 600; text-decoration: none;
  background: rgba(255,255,255,.05); border: 1px solid rgba(216,178,167,.22); transition: background .2s, border-color .2s;
}
.sso a:hover, .sso a:focus-visible { background: rgba(255,255,255,.10); border-color: var(--copper-2); outline: none; }

.foot { text-align: center; margin-top: 1.4rem; font-size: .76rem; color: rgba(244,236,233,.45); }

@media (max-width: 1100px) {
  .stage { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
}
@media (max-width: 860px) {
  .stage { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 1.6rem; padding: 2rem 1rem 2.5rem; }
  .stage > div { width: 100%; max-width: 440px; }
  .hero { text-align: center; }
  .hero-big { font-size: clamp(2.5rem, 12.5vw, 4.6rem); }
  .hero-kicker { font-size: 1.15rem; }
  .hero-sub { font-size: 1.45rem; }
  .hero-text { display: none; }
  .chips { justify-content: center; }
  .chip { font-size: .68rem; padding: .3rem .6rem; }
  .card { max-width: 440px; }
  .bg .hexes { width: 100vw; opacity: .35; }
  .bg .shield { width: 150px; right: 4%; bottom: 3%; opacity: .45; }
  .bg .mesh { width: 380px; opacity: .35; }
  .badge, .bg .bits { display: none; }   /* keep the headline clear on small screens */
}
@media (max-width: 420px) { .card { padding: 1.6rem 1.25rem 1.3rem; } .sso { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise .6s ease-out both; }
  .hero { animation: fade .8s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
  
/* ── shared by MFA / password pages ───────────────────── */
.card-icon {
  width: 52px; height: 52px; border-radius: 15px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(201,147,131,.28), rgba(186,116,95,.12)); border: 1px solid rgba(216,178,167,.3); color: #f3d3c8;
}
.card-icon svg { width: 26px; height: 26px; }
.card .lead strong { color: #fff; font-weight: 600; }
.otp {
  width: 100%; text-align: center; font: 600 1.6rem/1 'Outfit', sans-serif; letter-spacing: .55em; padding: .8rem .5rem .8rem 1.05rem !important;
}
.hint { font-size: .78rem; color: var(--muted); margin-top: .45rem; }
.back { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1.1rem; }
.back-row { text-align: center; }
.steps { list-style: none; counter-reset: s; margin: 0 0 1.2rem; display: grid; gap: .55rem; }
.steps li { counter-increment: s; display: flex; gap: .65rem; font-size: .86rem; color: rgba(244,236,233,.82); line-height: 1.45; }
.steps li::before {
  content: counter(s); flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, #c99383, #ba745f);
}
.qr-wrap { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; }
.qr-box { background: #fff; padding: 10px; border-radius: 14px; box-shadow: 0 10px 26px rgba(0,0,0,.35); flex: none; }
.qr-box img { display: block; width: 156px; height: 156px; }
.secret-box { flex: 1 1 160px; min-width: 0; }
.secret-label { font-size: .74rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.secret {
  display: flex; align-items: center; gap: .4rem; padding: .55rem .6rem .55rem .8rem; border-radius: 10px;
  background: rgba(14,11,17,.45); border: 1px dashed rgba(216,178,167,.35); font-family: ui-monospace, Menlo, monospace;
  font-size: .9rem; letter-spacing: .12em; color: #fff; word-break: break-all;
}
.secret code { flex: 1; min-width: 0; }
.copy {
  flex: none; border: 0; border-radius: 8px; padding: .3rem .55rem; cursor: pointer; font: 600 .72rem 'Inter', sans-serif;
  color: #fff; background: rgba(255,255,255,.1);
}
.copy:hover { background: rgba(255,255,255,.18); }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; margin: -.2rem 0 1.1rem; }
.checklist div { display: flex; align-items: center; gap: .4rem; font-size: .76rem; color: var(--muted); transition: color .15s; }
.checklist div::before {
  content: ''; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid rgba(216,178,167,.45);
}
.checklist div.ok { color: #c9f5df; }
.checklist div.ok::before { border-color: #7fe3b4; background: #7fe3b4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23123' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
@media (max-width: 420px) { .checklist { grid-template-columns: 1fr; } .qr-wrap { justify-content: center; } }
