/* ADMIN.PZK.PL — spójny wygląd ekranów autoryzacji. */
:root {
  color-scheme: light;
  --bg: #f3f7fb;
  --surface: #ffffff;
  --field: #f7f9fc;
  --fg: #192836;
  --muted: #708195;
  --border: #dce5ee;
  --accent: #079de4;
  --accent-hover: #067db8;
  --ring: rgba(7,157,228,.16);
  --shadow: 0 24px 65px rgba(17,44,74,.10);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #030507;
  --surface: #0b1016;
  --field: #111923;
  --fg: #f2f7fc;
  --muted: #93a4b7;
  --border: #26313d;
  --accent: #31b7f4;
  --accent-hover: #20a9e9;
  --ring: rgba(49,183,244,.17);
  --shadow: 0 32px 75px rgba(0,0,0,.48);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
}
.auth-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  width: 100%;
  padding: 35px 20px 18px;
}
.auth-area { width: 100%; display: flex; justify-content: center; }
.auth-card {
  position: relative;
  width: min(100%, 430px);
  padding: 73px 38px 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
/* Przycisk jest zakotwiczony w prawym górnym rogu samej karty. */
.auth-toolbar {
  position: absolute;
  right: 24px;
  top: 23px;
  display: flex;
  justify-content: flex-end;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--border);
  background: var(--field);
  color: var(--fg);
  border-radius: 9px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 650;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg {
  display: block;
  width: 15px;
  height: 15px;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.card-intro { margin-bottom: 26px; }
.card-intro.compact { margin-bottom: 31px; }
.card-kicker {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.card-intro h1, .card-intro h2 {
  font-size: 29px;
  font-weight: 750;
  line-height: 1.22;
  letter-spacing: -.9px;
  margin: 0 0 12px;
}
.card-intro.compact h1 { margin-bottom: 0; }
.card-intro p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.75; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form label { font-size: 12px; font-weight: 700; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.label-row a { font-size: 12px; font-weight: 650; white-space: nowrap; }
.field {
  display: flex;
  align-items: center;
  height: 49px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 0 10px;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.field input {
  min-width: 0;
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--fg);
  outline: none;
  font-size: 13px;
}
.field input::placeholder { color: var(--muted); opacity: .9; }
.field-icon { display: inline-flex; align-items: center; justify-content: center; margin-left: 14px; color: var(--muted); font-size: 14px; }
.field-icon + input { padding-left: 10px; }
.reveal { flex: none; border: 0; background: transparent; padding: 12px 14px; color: var(--muted); display: inline-flex; align-items: center; }
.reveal:hover { color: var(--accent); }
.reveal svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linejoin: round; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 49px;
  width: 100%;
  padding: 10px 15px;
  margin-top: 12px;
  border-radius: 10px;
  border: 0;
  color: #fff;
  background: linear-gradient(110deg, #0aa8eb, #087ec7);
  font-weight: 750;
  font-size: 13px;
  box-shadow: 0 8px 22px rgba(0,143,216,.18);
  transition: filter .15s, transform .15s;
}
.primary:hover { filter: brightness(1.07); transform: translateY(-1px); text-decoration: none; }
.primary span { font-size: 17px; font-weight: 400; }
.link-button { margin-top: 16px; }
.alert { background: #fff2f2; color: #a32632; border: 1px solid #f3c5ca; border-radius: 9px; padding: 12px; font-size: 12px; margin-bottom: 20px; }
:root[data-theme="dark"] .alert { background: #301a22; border-color: #6a303b; color: #ffc0c7; }
.card-bottom { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 16px; text-align: center; color: var(--muted); font-size: 12px; }
/* Dyskretny link z ikoną fa-square-arrow-left zamiast dużego bloku. */
.recovery-back { display: flex; justify-content: center; margin-top: 24px; }
.recovery-back .back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; color: var(--accent); }
.recovery-back .back-link svg.fa-square-arrow-left { display: block; width: 16px !important; height: 16px !important; max-width: 16px; max-height: 16px; flex: 0 0 16px; }
/* Stopka strony, poza oknem formularza. */
.site-footer {
  text-align: center;
  padding: 12px 20px 19px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1px;
}
.site-footer span { margin: 0 6px; }
@media (max-width: 520px) {
  .auth-screen { padding: 22px 16px 14px; }
  .auth-card { width: 100%; padding: 69px 25px 30px; border-radius: 17px; }
  .auth-toolbar { right: 21px; top: 19px; }
  .card-intro h1,.card-intro h2 { font-size: 26px; }
  .label-row a { font-size: 11px; }
  .site-footer { padding-bottom: 15px; }
}
@media (max-height: 650px) {
  .auth-screen { padding-top: 18px; }
  .auth-card { padding-top: 65px; padding-bottom: 24px; }
}

/* Pole weryfikacji Google i poprawne centrowanie kontrolki. */
.captcha-box { display: flex; justify-content: center; overflow: visible; margin: 6px 0 3px; min-height: 78px; }
@media(max-width:375px){.captcha-box{transform:scale(.88);transform-origin:center center;margin-left:-16px;margin-right:-16px}}


/* Kontrolka Google ma 304 × 78 px. Zachowujemy jej oryginalną funkcjonalność. */
.captcha-viewport {
  width: 304px;
  height: 78px;
  flex: 0 0 auto;
}
.captcha-render-target {
  width: 304px;
  height: 78px;
}
/* W motywie ciemnym ukrywamy tylko 3-pikselowy jasny brzeg
   wewnętrznego obrazu Google, bez zasłaniania checkboxa i tekstu. */
:root[data-theme="dark"] .captcha-viewport {
  width: 298px;
  height: 72px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--border);
}
:root[data-theme="dark"] .captcha-render-target {
  transform: translate(-3px, -3px);
}

/* Komunikat o nieaktywnym koncie — czerwone tło i biały tekst w obu motywach. */
.alert.alert-inactive, :root[data-theme="dark"] .alert.alert-inactive { background: #b91c1c; border: 1px solid #991b1b; color: #ffffff; font-weight: 700; }
