/* SylanVault - the sign-in pop-up on the landing page (there is no separate sign-in page).
   The SylanOps sign-in frame exactly as SylanSync draws it (sylanops.html, LoginScreen and .sy-auth-*):
   navy header band with glows and a fading dot grid, white body, over a dimmed, blurred page.
   The size every SylanOps sign-in now uses: one 480px card at every width (no larger frame or zoom). */

.signin-pop { --teal: #019E99; --teal-2: #007C78; --navy: #011A3D; position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(2, 6, 23, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.signin-pop[hidden] { display: none; }
/* margin:auto centres the card when it fits and lets it scroll from the top when it does not */
.signin-pop-card { margin: auto 0; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes signin-pop-fade { from { opacity: 0; } to { opacity: 1; } }
  .signin-pop:not([hidden]) { animation: signin-pop-fade .25s ease both; }
}
.signin-head-logo { width: auto; max-width: none; display: flex; justify-content: center; }
.signin-head-logo .sv-logo { gap: 10px; }
.signin-head-logo .sv-logo img { width: 39px; height: 39px; }
.signin-head-logo .sv-logo b { font-size: 25.5px; }
.signin-head-logo .sv-logo small { font-size: 10.4px; }

/* ---------- the card ----------
   Sizes are in px, not rem: the public pages scale their root font with the
   window and the pop-up card must look the same as the /signin page. */
.signin-card {
  position: relative; width: 100%; max-width: 480px; font-size: 16px; line-height: 1.5;
  background: #fff; border-radius: 24px; overflow: hidden; text-align: center;
  box-shadow: 0 30px 80px rgba(0, 8, 30, .45), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 90px rgba(0, 87, 252, .25);
  animation: signin-rise .6s .08s ease-out both;
}

/* ---------- header band ---------- */
.signin-head {
  position: relative; isolation: isolate; overflow: hidden; padding: 20px 32px 14px; color: #fff;
  background: linear-gradient(150deg, #0D3468 0%, #011A3D 55%, #010F26 100%);
}
.signin-head::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent);
}
.signin-glow {
  position: absolute; z-index: -1; width: 240px; height: 240px; border-radius: 50%; filter: blur(50px); opacity: .7;
  animation: signin-drift 12s ease-in-out infinite alternate;
}
.signin-glow:nth-child(1) { background: #0057FC; top: -150px; left: -70px; }
.signin-glow:nth-child(2) { background: #019E99; bottom: -190px; right: -60px; animation-delay: -6s; }

/* the cross in the corner: leave sign-in */
.signin-close {
  position: absolute; top: 12px; right: 12px; z-index: 1; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18);
  transition: background .2s ease;
}
.signin-close:hover { color: #fff; background: rgba(255, 255, 255, .26); }
.signin-close:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .45); }
.signin-close svg { width: 18px; height: 18px; stroke-width: 2.6; }

/* the two sign-in steps */
.signin-steps {
  list-style: none; margin: 14px 0 0; padding: 0; display: flex; justify-content: center; align-items: center; gap: 12px;
  font-size: 13.8px; font-weight: 600;
}
.signin-steps li { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: rgba(255, 255, 255, .55); transition: color .3s ease; }
.signin-steps li + li::before { content: ""; width: 34px; height: 2px; margin-right: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); }
.signin-steps b {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  border: 1.5px solid rgba(255, 255, 255, .4); transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.signin-steps .on { color: #fff; }
.signin-steps .on b { border-color: transparent; background: linear-gradient(135deg, #0057FC, #019E99); box-shadow: 0 0 0 4px rgba(35, 235, 127, .18); transform: scale(1.08); }
.signin-steps .done { color: #9fe9df; }
.signin-steps .done b { border-color: transparent; background: #10b981; font-size: 0; }
.signin-steps .done b::after { content: "\2713"; font-size: 12.8px; }
.signin-steps .done + li::before { background: #10b981; }

/* ---------- body ---------- */
.signin-main { padding: 22px 34px 20px; }
.signin-main > * { animation: signin-swap .35s ease-out; }
.signin-greet { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 22.4px; font-weight: 700; line-height: 1.25; color: #0B1220; margin: 0 0 2px; letter-spacing: 0; text-transform: none; }
.signin-lead { margin: 0 0 16px; color: #64748b; font-size: 15.2px; }

/* messages: a pale rounded box; errors carry an alert icon */
.signin-card .flash {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin: 0 0 14px;
  border: 0; border-radius: 10px; padding: 10px 14px; font-size: 14.4px; line-height: 1.4; text-align: center;
}
.signin-card .flash-error { background: #fef2f2; color: #b91c1c; }
.signin-card .flash-error.flash-ok { background: #f0fdfa; color: #134e4a; }
.signin-card .flash-error.flash-ok::before { display: none; }
.signin-card .flash-error::before {
  content: ""; flex: none; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.2M12 16.3h.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.2M12 16.3h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- form ---------- */
.signin-form { display: grid; gap: 16px; width: 100%; text-align: left; }
.sf-label { display: block; margin: 0 0 4px; font-size: 14.7px; font-weight: 700; color: #0B1220; }
.sf-input {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px 0 14px;
  border: 1.5px solid #E2E8F0; border-radius: 12px; background: #fff; color: #8a97ab;
  transition: border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.sf-input:focus-within { border-color: #019E99; box-shadow: 0 0 0 4px rgba(1, 158, 153, .12); color: #019E99; }
.sf-input input {
  flex: 1; min-width: 0; height: auto; padding: 9px 0; margin: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; outline: none;
  font: inherit; font-size: 16px; color: #0f172a; caret-color: #019E99;
}
.sf-input input::placeholder { color: #8a97ab; }
.sf-input input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; -webkit-text-fill-color: #0f172a; }
.sf-ico { flex: none; display: inline-flex; color: inherit; pointer-events: none; }
.sf-ico svg { width: 18px; height: 18px; }
.sf-toggle {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0;
  background: none; border: 0; border-radius: 10px; cursor: pointer; color: #8a97ab;
  transition: background .2s ease, color .2s ease;
}
.sf-toggle:hover { background: #f1f4f9; color: #011A3D; }
.sf-toggle[aria-pressed="true"] { color: #019E99; background: rgba(1, 158, 153, .1); }
.sf-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(1, 158, 153, .3); }
.sf-toggle svg { width: 18px; height: 18px; }

.sf-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13.6px; color: #334155; }
.sf-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.sf-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); cursor: pointer; }
.sf-forgot { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--teal-2); text-decoration: none; cursor: pointer; }
.sf-forgot:hover { color: var(--teal-2); text-decoration: underline; text-underline-offset: 2px; }

.sf-submit {
  width: 100%; min-height: 48px; padding: 14px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 12px; cursor: pointer; color: #fff;
  font: inherit; font-size: 13.6px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  background: linear-gradient(90deg, #0057FC 0%, #1C7BEA 45%, #019E99 100%); background-size: 180% 100%;
  box-shadow: 0 14px 28px -10px rgba(0, 87, 252, .45);
  transition: background-position .5s ease, transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.sf-submit:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 87, 252, .35); }
.sf-submit:active { transform: translateY(0); }
.sf-submit:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #019E99; }
.sf-submit:disabled { opacity: .6; cursor: default; transform: none; }
.sf-arr { display: inline-block; transition: transform .2s ease; }
.sf-submit:hover:not(:disabled) .sf-arr { transform: translateX(5px); }

/* secondary actions: plain underlined grey links */
.sf-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 18px; }
.sf-plain {
  display: inline-block; margin-top: 8px; padding: 4px; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 15.2px;
  color: #64748b; text-decoration: underline; text-underline-offset: 3px;
}
.sf-plain:hover { color: #011A3D; }

/* ---------- the code step ---------- */
.signin-shield {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center;
  color: #019E99; background: rgba(1, 158, 153, .12); animation: signin-pulse 2.4s ease-out infinite;
}
.signin-shield svg { width: 28px; height: 28px; }
.signin-shield.is-warn { color: #c2410c; background: #fff7ed; animation: none; }
.sf-code.is-big {
  display: block; width: 100%; margin: 0 0 3px; text-align: center; font: inherit; font-size: 25.6px; font-weight: 700; letter-spacing: .55em;
  padding: 13px 10px 13px 28px; border: 2px solid #019E99; border-radius: 16px; color: #0f172a; background: #fff;
  box-shadow: 0 0 0 4px rgba(1, 158, 153, .12); outline: none;
}
.sf-code.is-big::placeholder { color: #9aa3b5; }
/* a recovery code (xxxxx-xxxxx) is longer: tighter so it fits on a phone */
[data-recovery-on="1"] .sf-code.is-big { letter-spacing: .2em; padding-left: 10px; }
.sf-input input.sf-code { letter-spacing: .25em; }
.sf-input input.sf-code::placeholder { letter-spacing: .12em; }
.sf-help { margin: 12px 0 0; font-size: 12.8px; line-height: 1.55; color: #6b7d90; text-align: center; }
.sf-help code { padding: 0.8px 4.8px; border-radius: 5px; background: #f1f5f9; font-size: 12.5px; }

/* locked account: the way back for staff */
.sf-unlock { display: flex; align-items: center; justify-content: center; gap: 7.2px; width: 100%; margin: -4px 0 14px; padding: 11.2px; border-radius: 10px; background: #fff7ed; color: #c2410c; font-size: 14.1px; font-weight: 700; text-decoration: none; }
.sf-unlock:hover { background: #ffedd5; color: #9a3412; }
.sf-unlock svg { width: 16px; height: 16px; }

/* ---------- by-line (the trust/badge row was removed from every SylanOps sign-in) ---------- */
.signin-by { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #E2E8F0; font-size: 10.9px; color: #64748b; }
.signin-by b { color: #011A3D; }
.signin-legal { margin: 2px 0 0; font-size: 9.9px; color: #94a3b8; }
.signin-legal a { color: var(--teal-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- SylanVault's own bits: the forgot-password note, switching to sign-up, the account type ---------- */
.sf-note p { margin: 0 0 6px; }
.sf-note { margin: 0; padding: 10px 14px; border-radius: 10px; background: #f0fdfa; color: #134e4a; font-size: 13.6px; line-height: 1.5; }
.sf-switch { margin: 14px 0 0; font-size: 14.4px; color: #64748b; }
.sf-switch a { font-weight: 700; color: var(--teal-2); text-decoration: none; }
.sf-switch a:hover { text-decoration: underline; text-underline-offset: 2px; }
.sv-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sv-kind label { position: relative; cursor: pointer; }
.sv-kind input { position: absolute; opacity: 0; pointer-events: none; }
.sv-kind span { display: block; height: 100%; line-height: 1.35; padding: 10px 12px; border: 1.5px solid #E2E8F0; border-radius: 12px; text-align: left; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.sv-kind b { display: block; font-size: 14.4px; color: #0B1220; }
.sv-kind small { font-size: 12.5px; color: #64748b; }
.sv-kind input:checked + span { border-color: #019E99; background: rgba(1, 158, 153, .06); box-shadow: 0 0 0 4px rgba(1, 158, 153, .1); }
.sv-kind input:focus-visible + span { outline: 2px solid #019E99; outline-offset: 2px; }

/* ---------- motion ---------- */
@keyframes signin-rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes signin-drift { from { transform: translate(0, 0); } to { transform: translate(40px, 24px); } }
@keyframes signin-swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes signin-pulse { 0% { box-shadow: 0 0 0 0 rgba(1, 158, 153, .35); } 100% { box-shadow: 0 0 0 16px rgba(1, 158, 153, 0); } }
@media (prefers-reduced-motion: reduce) {
  .signin-card, .signin-card * { animation: none !important; transition: none !important; }
}

/* ---------- phones (as SylanSync's frame) ---------- */
@media (max-width: 480px) {
  .signin-head { padding: 26px 22px 22px; }
  .signin-main { padding: 24px 22px 22px; }
  .signin-steps { gap: 8px; font-size: 12.2px; }
  .signin-steps li + li::before { width: 16px; margin-right: 2px; }
}
