/* Login-siden i samme udtryk som forsiden: glas over bevægelige skyer.
   Filen, logoet og skyerne må hentes uden login (_PUBLIC_PATHS i app.py). */

:root {
  --ink: #0f2742;
  --ink-soft: #3d5a78;
  --accent: #1f6feb;
  --accent-deep: #1455c0;
  --bad: #b42318;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased;
       background: #7fb2e8 url("/static/media/skyer.jpg") center / cover fixed; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Himlen */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.sky-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04);
             transition: opacity 2s var(--ease-out), filter 2s var(--ease-out), transform 3s var(--ease-out); }
.sky-shade { position: absolute; inset: 0; transition: background 2s var(--ease-out);
  background: radial-gradient(ellipse at 50% 45%, rgba(10, 35, 70, .08), rgba(10, 35, 70, .38) 78%); }
body.intro .sky-video { opacity: 0; filter: blur(14px); transform: scale(1.18); }
body.intro .sky-shade { background: rgba(10, 35, 70, .55); }

/* Kortet */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
              padding: 24px 16px; gap: 18px; }
.glass { background: rgba(255, 255, 255, .28); border: 1px solid rgba(255, 255, 255, .6);
         box-shadow: 0 20px 70px rgba(15, 39, 66, .25), inset 0 1px 0 rgba(255, 255, 255, .55);
         backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(255, 255, 255, .85); } }
.card { width: min(420px, 100%); border-radius: 30px; padding: 34px 32px 26px; text-align: center;
        transition: opacity 1.1s var(--ease-out) .55s, transform 1.2s var(--ease-out) .55s, filter 1.1s var(--ease-out) .55s; }
body.intro .card { opacity: 0; transform: translateY(26px) scale(.97); filter: blur(8px); }
.logo { width: 64px; height: 64px; border-radius: 50%; display: block; margin: -2px auto 18px;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, .6), 0 10px 26px rgba(10, 35, 70, .3);
        transition: transform 1.2s var(--ease-spring) .8s; }
body.intro .logo { transform: scale(.6) rotate(-25deg); }
h1 { margin: 0; font-weight: 300; font-size: clamp(32px, 7vw, 40px); letter-spacing: -.03em; color: #fff;
     text-shadow: 0 2px 20px rgba(10, 35, 70, .3); }
h1 b { font-weight: 600; }
.sub { margin: 8px 0 22px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 8px rgba(10, 35, 70, .3); font-size: 15px; }
label { display: block; text-align: left; margin: 14px 4px 6px; font-size: 13px; font-weight: 600;
        color: rgba(255, 255, 255, .95); text-shadow: 0 1px 6px rgba(10, 35, 70, .3); }
input { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .8);
        background: rgba(255, 255, 255, .62); color: var(--ink); font-size: 16px; outline: none;
        transition: background .25s, box-shadow .25s, border-color .25s; }
input::placeholder { color: rgba(15, 39, 66, .45); }
input:focus { background: rgba(255, 255, 255, .85); border-color: #fff; box-shadow: 0 0 0 4px rgba(31, 111, 235, .25); }
#code { font-size: 30px; letter-spacing: 12px; text-align: center; padding: 14px 10px 14px 22px; font-variant-numeric: tabular-nums; }
.primary { width: 100%; margin-top: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
           padding: 14px 18px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 16px; color: #fff;
           background: linear-gradient(135deg, var(--accent), var(--accent-deep));
           box-shadow: 0 10px 26px rgba(31, 111, 235, .4); transition: transform .45s var(--ease-spring), box-shadow .3s, opacity .2s; }
.primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(31, 111, 235, .5); }
.primary:hover:not(:disabled) svg { transform: translateX(3px); }
.primary svg { transition: transform .4s var(--ease-spring); }
.primary:active:not(:disabled) { transform: scale(.98); }
.primary:disabled { opacity: .6; cursor: progress; }
.msg { min-height: 1.3em; margin: 14px 0 0; font-size: 14px; color: #fff; text-shadow: 0 1px 6px rgba(10, 35, 70, .35); }
.msg.bad { color: var(--bad); text-shadow: none; background: rgba(255, 241, 240, .9); border-radius: 12px; padding: 8px 12px; }
.msg:empty { padding: 0; background: none; }
.forgot { display: inline-block; margin-top: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .92);
          text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .45); transition: border-color .2s; }
.forgot:hover { border-color: #fff; }
.foot { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 8px rgba(10, 35, 70, .35);
        transition: opacity 1s var(--ease-out) 1.2s; }
body.intro .foot { opacity: 0; }

/* Skift fra adgangskode til kode: det nye trin glider ind. */
.step.enter { animation: step-in .7s var(--ease-out) both; }
@keyframes step-in { from { opacity: 0; transform: translateX(30px); filter: blur(6px); } }
.card.shake { animation: shake .45s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .sky-video { display: none; }
}
