/* Strony kont (rejestracja / potwierdzenie / poczekalnia) - ten sam jezyk
   wizualny co ekran logowania apki (app/static/style.css, sekcja auth-*):
   formularz po lewej, panel marki teal po prawej. Zawsze jasny motyw (decyzja
   usera 2026-10-10) - bez wariantu ciemnego. */
:root {
  --bg: #f2f6f6; --panel: #ffffff; --panel-2: #edf3f3; --panel-3: #e2ebeb;
  --border: #dae4e4; --text: #0b1a1d; --text-dim: #5f7377;
  --accent: #f67608; --red: #dc2626; --green: #16a34a; --amber: #c97a12; --teal: #053a41;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--panel); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.5;
}
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.auth-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-main { display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 64px); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-logo { height: 26px; width: auto; display: block; }
.auth-home { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-dim); text-decoration: none; }
.auth-home:hover { background: var(--panel-2); color: var(--text); }
.auth-home svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding: 36px 0; }
.auth-view { animation: authIn .32s cubic-bezier(.2,.8,.2,1); }
@keyframes authIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.auth-title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.auth-sub { font-size: 14.5px; color: var(--text-dim); margin: 0 0 26px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auth-field label { font-size: 13px; font-weight: 600; }
.auth-field label .opt { font-weight: 400; color: var(--text-dim); }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-field input[type=text], .auth-field input[type=email], .auth-field input[type=password], .auth-field input[type=tel] {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input:hover { border-color: var(--text-dim); }
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.auth-field.is-invalid input { border-color: var(--red); }
.field-error { font-size: 12.5px; color: var(--red); margin: 0; }
.field-hint { font-size: 12.5px; color: var(--text-dim); margin: 0; }
input.has-eye { padding-right: 46px !important; }
.auth-eye { position: absolute; right: 6px; width: 36px; height: 36px; display: grid; place-items: center; background: none; border: none; border-radius: 8px; cursor: pointer; color: var(--text-dim); }
.auth-eye:hover { background: var(--panel-2); color: var(--text); }
.auth-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-eye .eye-closed, .auth-eye[aria-pressed="true"] .eye-open { display: none; }
.auth-eye[aria-pressed="true"] .eye-closed { display: block; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.pw-meter span { height: 4px; border-radius: 4px; background: var(--panel-3); transition: background .2s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--amber); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: #84cc16; }
.pw-meter[data-score="4"] span { background: var(--green); }
.auth-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-dim); cursor: pointer; line-height: 1.45; }
.auth-check input { width: 17px; height: 17px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.auth-check.is-invalid span { color: var(--red); }
.auth-check a { color: var(--accent); }
.auth-btn {
  height: 48px; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); text-decoration: none;
}
.auth-btn:hover { filter: brightness(1.05); }
.auth-btn:disabled { cursor: default; opacity: .8; }
.auth-btn.is-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 6px 0 -2px; font-size: 13px; color: var(--text-dim); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-info { display: grid; gap: 16px; padding: 16px 18px; border-radius: 12px; font-size: 14px; line-height: 1.55; color: var(--text); background: var(--panel-2); border: 1px solid var(--border); }
.auth-info p { margin: 0; }
.auth-alert { display: flex; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--red); background: color-mix(in srgb, var(--red) 9%, var(--panel)); border: 1px solid color-mix(in srgb, var(--red) 28%, transparent); }
.auth-alert.is-ok { color: var(--text); background: color-mix(in srgb, var(--green) 10%, var(--panel)); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.auth-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.auth-badge { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--panel)); color: var(--accent); }
.auth-badge.is-ok { background: color-mix(in srgb, var(--green) 14%, var(--panel)); color: var(--green); }
.auth-badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-note { font-size: 13px; color: var(--text-dim); }
.summary { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; margin: 0 0 22px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.summary div:last-child { border-bottom: none; }
.summary dt { color: var(--text-dim); }
.summary dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.steps .dot { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); }
.steps li.done .dot { background: var(--green); color: #fff; border-color: var(--green); }
.steps li.now .dot { background: var(--accent); color: #fff; border-color: var(--accent); }
.steps small { display: block; color: var(--text-dim); font-size: 12.5px; }

.auth-side { position: relative; overflow: hidden; background: var(--teal); color: #fff; display: flex; align-items: center; padding: clamp(32px, 6vw, 80px); }
.auth-side::before { content: ""; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%); }
.auth-side::after { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(246,118,8,.28), transparent 65%); }
.auth-side-inner { position: relative; z-index: 1; max-width: 460px; }
.auth-side-mark { width: 56px; height: 56px; display: block; margin-bottom: 36px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 30px rgba(0,0,0,.25); }
.auth-side-title { font-size: clamp(28px, 2.8vw, 38px); line-height: 1.12; letter-spacing: -.025em; font-weight: 700; margin: 0 0 32px; }
.auth-side-title span { color: #fc931f; }
.auth-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.auth-side-list li { display: flex; gap: 14px; }
.auth-side-list b { display: block; font-size: 15px; font-weight: 600; }
.auth-side-list small { display: block; font-size: 13.5px; color: rgba(255,255,255,.62); margin-top: 3px; }
.auth-side-ico { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fc931f; font-weight: 700; font-size: 14px; }

@media (max-width: 900px) {
  .auth-screen { display: block; }
  .auth-side { display: none; }
  .auth-main { padding: 22px 20px 40px; min-height: 100vh; min-height: 100dvh; }
  .auth-card { padding: 26px 0; }
  .auth-title { font-size: 24px; }
  .auth-field input[type=text], .auth-field input[type=email], .auth-field input[type=password], .auth-field input[type=tel] { font-size: 16px; }
}
@media (max-width: 480px) { .auth-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .auth-view { animation: none; } }

/* Strony z dokumentami (regulamin / polityka) */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; }
.doc h1 { font-size: 28px; letter-spacing: -.02em; }
.doc .draft { padding: 12px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 10%, var(--panel)); }
.doc h2 { font-size: 19px; margin: 34px 0 10px; letter-spacing: -.01em; }
.doc h3 { font-size: 16px; margin: 22px 0 8px; }
.doc p, .doc li { line-height: 1.65; }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .meta { color: var(--text-dim); font-size: 14px; }
.doc .ph { padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--amber) 22%, transparent); font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.doc .table-wrap { overflow-x: auto; }
.doc nav.toc { margin: 18px 0 8px; }
.doc nav.toc a { margin-right: 14px; }
/* Ikony w polach i wiersz "Haslo / Nie pamietasz hasla?" - jak ekran logowania apki (style.css) */
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-label-row label { font-size: 13px; font-weight: 600; }
.auth-label-row .auth-link { font-size: 13px; }
.auth-input-icon {
  position: absolute; left: 13px; width: 18px; height: 18px; pointer-events: none;
  fill: none; stroke: var(--text-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .15s;
}
.auth-input-wrap:focus-within .auth-input-icon { stroke: var(--accent); }
.auth-field input.has-icon { padding-left: 42px !important; }
