/* ============================================================
   FileVault — prémiový vzhled přihlašovací stránky
   Načítá se POUZE na login.html (po style.css, který přebíjí).
   ============================================================ */

/* ---- Bundlovaný font Inter (variabilní, bez závislosti na CDN) ---- */
@font-face {
  font-family: "InterVar";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "InterVar";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokeny stránky (login je záměrně vždy tmavý — produktová vizitka) ---- */
.auth-page {
  --ab-bg: #060b17;
  --ab-ink: #eef3fb;
  --ab-dim: #9db0cc;
  --ab-faint: #6b7d99;
  --ab-blue: #4d8dff;
  --ab-violet: #8b5cf6;
  --ab-cyan: #22d3ee;
  --ab-green: #34d399;
  --ab-card: rgba(13, 20, 38, .78);
  --ab-line: rgba(148, 170, 220, .14);
  font-family: "InterVar", Inter, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, sans-serif;
  background: var(--ab-bg);
  color: var(--ab-ink);
  font-size: 15px;
  letter-spacing: .005em;
  min-height: 100vh;
}

/* ============================================================
   POZADÍ — aurora, jemná mřížka, zrno, vinětace
   ============================================================ */
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ab-bg); }

.auth-bg .aurora { position: absolute; border-radius: 50%; filter: blur(110px); will-change: transform; }
.auth-bg .a1 { width: 54vw; height: 54vw; left: -14vw; top: -18vw;
  background: radial-gradient(circle at 35% 35%, rgba(56, 118, 255, .34), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate; }
.auth-bg .a2 { width: 46vw; height: 46vw; right: -12vw; top: -6vw;
  background: radial-gradient(circle at 60% 40%, rgba(139, 92, 246, .26), transparent 66%);
  animation: drift2 32s ease-in-out infinite alternate; }
.auth-bg .a3 { width: 42vw; height: 42vw; left: 28vw; bottom: -22vw;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .17), transparent 62%);
  animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(9vw, 7vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-7vw, 9vh) scale(.94); } }
@keyframes drift3 { to { transform: translate(-9vw, -7vh) scale(1.1); } }

/* šikmý světelný paprsek pro hloubku */
.auth-bg .beam { position: absolute; left: 8%; top: -30%; width: 34vw; height: 160%;
  background: linear-gradient(100deg, transparent 20%, rgba(122, 162, 255, .05) 46%, rgba(167, 139, 250, .06) 54%, transparent 80%);
  transform: rotate(16deg); filter: blur(6px); }

.auth-bg .grid-overlay { position: absolute; inset: 0; background:
    linear-gradient(rgba(148, 170, 220, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 170, 220, .05) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 34% 26%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 75% at 34% 26%, #000 25%, transparent 78%); }

/* filmové zrno — odstraní pruhování gradientů, dodá „drahý" povrch */
.auth-bg .noise { position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E"); }

.auth-bg .vignette { position: absolute; inset: 0;
  background: radial-gradient(120% 115% at 50% 38%, transparent 52%, rgba(2, 5, 12, .55) 100%); }

/* ============================================================
   ROZVRŽENÍ
   ============================================================ */
.auth { position: relative; z-index: 1; display: grid; grid-template-columns: 1.12fr .88fr;
  min-height: 100vh; color: var(--ab-ink); }
.auth-hero { padding: 7vh 3.5vw 7vh 6vw; display: flex; flex-direction: column; justify-content: center; }
.auth-hero-inner { max-width: 580px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 6vh 4.5vw; }

/* ---- Značka ---- */
.brand-row { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 44px; height: 44px; flex: none;
  filter: drop-shadow(0 4px 18px rgba(93, 140, 255, .45)); }
.auth-hero .logo, .logo-sm { font-size: 27px; font-weight: 760; letter-spacing: -.02em; }
.auth-hero .logo span, .logo-sm span { color: #7cb0ff;
  background: linear-gradient(120deg, #79aaff, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-tag { font-size: 10.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
  color: #9fc0ff; border: 1px solid rgba(124, 176, 255, .32); border-radius: 999px; padding: 4px 10px;
  background: rgba(77, 141, 255, .09); margin-left: 4px; }

/* ---- Titulek ---- */
.auth-hero h1 { font-size: clamp(34px, 4.5vw, 57px); line-height: 1.04; margin: 30px 0 18px;
  font-weight: 800; letter-spacing: -.031em; }
.auth-hero h1 .grad { background: linear-gradient(92deg, #6ea8ff 5%, #a78bfa 45%, #22d3ee 90%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradShift 9s ease-in-out infinite alternate; }
@keyframes gradShift { to { background-position: 90% 0; } }

.auth-hero .lead { color: var(--ab-dim); font-size: 16.5px; max-width: 47ch; margin: 0 0 22px; line-height: 1.68; }

/* ---- Stavový řádek (živý puls) ---- */
.status-line { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 32px;
  font-size: 12.5px; font-weight: 550; color: #a9c0e2; border: 1px solid var(--ab-line);
  background: rgba(19, 29, 52, .5); border-radius: 999px; padding: 7px 14px; backdrop-filter: blur(8px); }
.status-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ab-green); position: relative; flex: none; }
.status-line .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, .55); animation: ping 2.2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
.status-line i { font-style: normal; color: var(--ab-faint); margin: 0 2px; }

/* ---- Karty funkcí (SVG ikony místo emoji) ---- */
.auth-features { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; max-width: 580px; }
.feature-card { display: flex; gap: 13px; align-items: flex-start; padding: 15px 16px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(148, 170, 220, .07), rgba(148, 170, 220, .03));
  border: 1px solid var(--ab-line); backdrop-filter: blur(10px);
  transition: transform .22s cubic-bezier(.2, .7, .2, 1), border-color .22s, background .22s, box-shadow .22s; }
.feature-card:hover { transform: translateY(-3px); background: rgba(148, 170, 220, .09);
  border-color: rgba(124, 176, 255, .38); box-shadow: 0 14px 34px rgba(3, 8, 20, .5); }
.feature-card .fi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  border: 1px solid transparent; }
.feature-card .fi svg { width: 21px; height: 21px; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }
.fi.f-blue   { background: rgba(77, 141, 255, .13); border-color: rgba(77, 141, 255, .3); }
.fi.f-blue svg   { stroke: #7cb0ff; }
.fi.f-violet { background: rgba(139, 92, 246, .13); border-color: rgba(139, 92, 246, .3); }
.fi.f-violet svg { stroke: #b79cff; }
.fi.f-cyan   { background: rgba(34, 211, 238, .11); border-color: rgba(34, 211, 238, .28); }
.fi.f-cyan svg   { stroke: #67e3f7; }
.fi.f-green  { background: rgba(52, 211, 153, .11); border-color: rgba(52, 211, 153, .28); }
.fi.f-green svg  { stroke: #6ee7b7; }
.feature-card b { display: block; font-size: 13.8px; font-weight: 650; letter-spacing: -.005em; margin-bottom: 2px; }
.feature-card small { color: #8fa2bf; font-size: 12.3px; line-height: 1.45; display: block; }

/* ---- Řádek důvěryhodnosti ---- */
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 26px; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; font-size: 12.8px; font-weight: 550; color: #93a8c8; }
.trust-row svg { width: 15px; height: 15px; fill: none; stroke: #6f8fc4; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.hero-foot { position: absolute; left: 6vw; bottom: 26px; font-size: 12px; color: #5d6f8d; letter-spacing: .01em; }

/* ============================================================
   PŘIHLAŠOVACÍ KARTA — sklo s gradientním okrajem
   ============================================================ */
.auth-card, .auth-card.glass { width: 100%; max-width: 416px; position: relative;
  border: 1px solid transparent; border-radius: 22px; padding: 34px 32px 26px;
  background:
    linear-gradient(var(--ab-card), var(--ab-card)) padding-box,
    linear-gradient(165deg, rgba(122, 162, 255, .55), rgba(148, 170, 220, .1) 34%, rgba(148, 170, 220, .08) 62%, rgba(167, 139, 250, .5)) border-box;
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: 0 30px 80px rgba(2, 6, 16, .62), 0 4px 18px rgba(2, 6, 16, .4); }
/* svit za kartou */
.auth-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: 24px;
  background: radial-gradient(60% 45% at 50% 0%, rgba(93, 140, 255, .2), transparent 70%);
  filter: blur(26px); }
/* horní odlesk */
.auth-card::after { content: ""; position: absolute; left: 14%; right: 14%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); }

.auth-card .logo-sm { display: none; margin-bottom: 20px; color: var(--ab-ink); }
.auth-card h2 { font-size: 24.5px; margin: 0 0 6px; color: var(--ab-ink); font-weight: 720; letter-spacing: -.022em; }
.card-sub { color: var(--ab-dim); font-size: 14px; margin: 0 0 26px; }

/* ---- Pole formuláře ---- */
.auth-card .field { margin-bottom: 16px; }
.auth-card label { color: #b6c6e0; font-size: 12.8px; font-weight: 570; margin-bottom: 7px; letter-spacing: .01em; }
.input-wrap { position: relative; }
.input-wrap .in-ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; fill: none; stroke: #6d82a6; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none; z-index: 2;
  transition: stroke .18s; }
.input-wrap:focus-within .in-ic { stroke: #86b3ff; }
.pw-wrap { position: relative; width: 100%; }

.auth-card input { background: rgba(9, 15, 30, .62); border: 1px solid rgba(148, 170, 220, .17);
  color: var(--ab-ink); padding: 13px 14px 13px 46px; border-radius: 13px; font-size: 14.5px;
  height: 48px; transition: border-color .18s, background .18s, box-shadow .18s; }
.auth-card input::placeholder { color: #5b6c88; }
.auth-card input:hover { border-color: rgba(148, 170, 220, .3); }
.auth-card input:focus { border-color: rgba(109, 155, 255, .75); background: rgba(12, 20, 38, .78);
  box-shadow: 0 0 0 4px rgba(77, 141, 255, .14), 0 1px 12px rgba(77, 141, 255, .1) inset; outline: none; }

/* Oprava žlutého Chrome autofillu (viditelný na screenshotu původní verze) */
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ab-ink);
  -webkit-box-shadow: 0 0 0 1000px #0d1730 inset;
  box-shadow: 0 0 0 1000px #0d1730 inset;
  border-color: rgba(109, 155, 255, .4);
  caret-color: var(--ab-ink);
  transition: background-color 9999999s ease-out; }

/* tlačítko oka (vkládá common.js) */
.auth-card .pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; color: #7a8fb2; padding: 8px; border-radius: 9px;
  display: grid; place-items: center; transition: color .15s, background .15s; }
.auth-card .pw-toggle:hover { color: #cfdcf2; background: rgba(148, 170, 220, .1); }

/* 2FA pole — plynulé objevení + číslicový vzhled */
#codeField:not(.hidden) { animation: fieldIn .34s cubic-bezier(.2, .7, .2, 1); }
@keyframes fieldIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
#code { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-weight: 600; }
#code::placeholder { letter-spacing: .02em; font-weight: 400; }

/* ---- Hlavní tlačítko ---- */
.btn-auth, .auth-card .btn-primary { width: 100%; height: 49px; border: none; border-radius: 13px;
  margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 15px; font-weight: 650; letter-spacing: .012em; color: #fff;
  background: linear-gradient(135deg, #3e7bfa 0%, #6d5cff 55%, #8b5cf6 100%);
  box-shadow: 0 10px 26px rgba(62, 123, 250, .38), 0 1px 0 rgba(255, 255, 255, .16) inset;
  transition: transform .16s, box-shadow .22s, filter .18s; }
.btn-auth:hover { filter: brightness(1.09); transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(62, 123, 250, .5), 0 1px 0 rgba(255, 255, 255, .18) inset; }
.btn-auth:active { transform: translateY(0) scale(.995); }
.btn-auth:focus-visible { outline: 2px solid #9db9ff; outline-offset: 3px; }
.btn-auth .btn-arrow { display: inline-block; transition: transform .18s; font-weight: 500; }
.btn-auth:hover .btn-arrow { transform: translateX(4px); }
/* stav „přihlašuji" — login.js dává disabled po dobu požadavku */
.btn-auth[disabled] { opacity: .78; cursor: progress; filter: saturate(.8); }
.btn-auth[disabled] .btn-arrow { display: none; }
.btn-auth[disabled]::after { content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Mikropatička karty ---- */
.auth-sec { display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 18px;
  font-size: 11.6px; font-weight: 550; color: #7d90b0; letter-spacing: .015em; }
.auth-sec i { font-style: normal; color: #45566f; }
.auth-foot { text-align: center; margin-top: 18px; padding-top: 16px; font-size: 12px; color: #7f92b2;
  border-top: 1px solid rgba(148, 170, 220, .1); display: flex; align-items: center; justify-content: center; gap: 7px; }
.auth-foot svg { width: 13px; height: 13px; fill: none; stroke: #7f92b2; stroke-width: 2; stroke-linecap: round; }
.back-row { text-align: center; margin-top: 13px; }
.back-link { font-size: 12.5px; color: #8fa5c6; transition: color .15s; }
.back-link:hover { color: #d7e2f5; }

/* ============================================================
   ANIMACE OBJEVENÍ
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); animation: reveal .8s cubic-bezier(.16, .84, .28, 1) forwards; }
.reveal.d1 { animation-delay: .07s } .reveal.d2 { animation-delay: .15s } .reveal.d3 { animation-delay: .23s }
.reveal.d4 { animation-delay: .3s }  .reveal.d5 { animation-delay: .37s } .reveal.d6 { animation-delay: .44s }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .auth-bg .aurora, .status-line .dot::after, .auth-hero h1 .grad { animation: none !important; }
}

/* ============================================================
   RESPONZIVITA
   ============================================================ */
@media (max-width: 1080px) {
  .auth { grid-template-columns: 1fr 1fr; }
  .auth-hero { padding-left: 4.5vw; }
}
@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; min-height: 100vh; }
  /* na mobilu nejdřív přihlášení, marketing pod ním */
  .auth-form { order: -1; padding: 7vh 6vw 3vh; }
  .auth-hero { padding: 3vh 7vw 9vh; justify-content: flex-start; }
  .auth-hero .brand-row { display: none; }           /* značka je v kartě */
  .auth-card .logo-sm { display: flex; align-items: center; gap: 9px; }
  .auth-hero h1 { margin-top: 6px; font-size: clamp(28px, 7.4vw, 40px); }
  .hero-foot { position: static; margin-top: 34px; }
}
@media (max-width: 560px) {
  .auth-features { grid-template-columns: 1fr; }
  .auth-card, .auth-card.glass { padding: 28px 22px 20px; border-radius: 19px; }
  .auth-form { padding: 5vh 5vw 2vh; }
  .status-line { font-size: 11.8px; }
}
