/* =====================================================================
   ENOSISWORKS — EKRANY LOGOWANIA
   Dokładka do admin.css: pole marki po lewej, formularz po prawej.
   [1] układ  [2] pole marki  [3] panel formularza  [4] logowanie zewnętrzne
   [5] kod jednorazowy  [6] stany  [7] responsywność
   ===================================================================== */

/* ------------------------------------------------------------ [1] układ */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

/* -------------------------------------------------------- [2] pole marki */
.auth__brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: var(--s-7) clamp(32px, 4vw, 72px);
  background: var(--ew-f-deep); color: #fff;
}
.auth__brand > * { position: relative; z-index: 1; }
/* jeden moduł na marginesie pola — Ciąg wchodzi z dolnej krawędzi */
.auth__brand::after {
  content: ""; position: absolute; right: -40px; bottom: 16px; width: 420px; height: 110px;
  background: url("../assets/brand/ciag-echo.svg") right bottom / auto 84px no-repeat;
  z-index: 0; pointer-events: none;
}
.auth__logo img { height: 26px; }
.auth__claim { margin: auto 0; }
.auth__claim h1 {
  max-width: 15ch;
  font-size: clamp(38px, 3.4vw, 60px); font-weight: 300; line-height: var(--ew-lh-heading); letter-spacing: 0;
}
.auth__claim h1 em { font-style: normal; color: var(--ew-violet-200); }
.auth__claim p { margin-top: var(--s-5); max-width: 34ch; font-size: var(--ew-t-lead);
  font-weight: 300; line-height: var(--ew-lh-lead); color: rgba(255,255,255,.76); }
.auth__facts { max-width: 74%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); margin-top: var(--s-7);
  padding-top: var(--s-5); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.auth__fact { font-size: var(--t-sm); color: rgba(255,255,255,.7); }
.auth__fact { font-size: var(--t-sm); color: rgba(255,255,255,.7); line-height: 1.45; }
.auth__fact strong { display: block; font-size: var(--t-lg); font-weight: 400; color: #fff; margin-bottom: 6px; }
.auth__foot { max-width: 74%; display: flex; gap: var(--s-5); margin-top: var(--s-6);
  font-size: var(--t-sm); color: rgba(255,255,255,.55); }
.auth__foot a:hover { color: #fff; }

/* -------------------------------------------------- [3] panel formularza */
.auth__panel { display: flex; flex-direction: column; justify-content: center;
  padding: var(--s-7) clamp(24px, 4vw, 64px); background: var(--surface); }
.auth__panel-in { width: 100%; max-width: 396px; margin: 0 auto; }
.auth__mark { display: none; margin-bottom: var(--s-6); }
.auth__mark img { height: 26px; }
.auth h2 { font-size: var(--t-2xl); font-weight: 300; line-height: 1.1; }
.auth__lead { margin-top: var(--s-3); color: var(--muted); font-weight: 300; }
.auth form { margin-top: var(--s-6); display: flex; flex-direction: column; gap: var(--s-4); }
.auth .input { min-height: 46px; }
.auth .btn { height: 46px; width: 100%; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.auth__link { font-size: var(--t-sm); color: var(--brand); }
.auth__link:hover { color: var(--brand-dk); text-decoration: underline; text-underline-offset: 3px; }
.auth__check { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); color: var(--muted); cursor: pointer; }
.auth__alt { margin-top: var(--s-6); font-size: var(--t-sm); color: var(--muted); text-align: center; }
.auth__pass { position: relative; }
.auth__pass .input { padding-right: 46px; }
.auth__eye { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0;
  border-radius: var(--r-2); background: transparent; color: var(--faint); cursor: pointer;
  display: grid; place-items: center; }
.auth__eye:hover { background: var(--surface-2); color: var(--ink); }

/* --------------------------------------------- [4] logowanie zewnętrzne */
.auth__sep { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-6) 0;
  font-size: var(--t-sm); color: var(--faint); }
.auth__sep::before, .auth__sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso { display: flex; flex-direction: column; gap: var(--s-2); }
.sso .btn { justify-content: center; gap: var(--s-3); }
.sso img, .sso svg.brandmark { width: 17px; height: 17px; }

/* --------------------------------------------- [5] kod jednorazowy (2FA) */
.code { display: flex; gap: var(--s-2); }
.code input {
  width: 100%; aspect-ratio: 3 / 4; max-height: 64px; text-align: center;
  font-size: var(--t-xl); font-weight: 300; font-variant-numeric: tabular-nums;
  border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); border-radius: var(--r-2);
  background: var(--surface); color: var(--ink);
}
.code input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--brand); }
.code input:not(:placeholder-shown) { box-shadow: inset 0 0 0 1px var(--brand-soft); }

/* ------------------------------------------------------------ [6] stany */
.auth__note { display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-3);
  background: var(--brand-tint); color: var(--brand-dk); font-size: var(--t-sm); }
.auth__note--err { background: var(--err-bg); color: var(--err); }
.auth__note--warn { background: var(--warn-bg); color: var(--warn); }
.auth__done { display: grid; gap: var(--s-4); justify-items: start; }
.auth__tile { width: 52px; height: 52px; border-radius: var(--r-3); display: grid; place-items: center;
  background: var(--ew-g-mist); }
.auth__tile img { width: 26px; }
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy .spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------- [7] responsywność */
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth__brand { display: none; }
  .auth__mark { display: block; }
  .auth__panel { justify-content: flex-start; padding-top: var(--s-7); }
}
