:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --radius: 8px;
  --radius-ctl: 6px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font: 300 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
/* Plynne podkreslenie linkow: kreska wjezdza od lewej po najechaniu, zjezdza w prawo po zjechaniu. */
.auth a { position: relative; }
.auth a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
.auth a:hover::after, .auth a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.auth__mark { display: block; width: 44px; height: 44px; margin: 0 auto 24px; border-radius: 10px; }
.auth__card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.auth__title { margin: 0 0 6px; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; text-align: center; }
.auth__lead { margin: 0 0 26px; color: var(--muted); font-size: 14px; text-align: center; }
.auth__foot { margin-top: 32px; font-size: 12px; color: var(--muted); text-align: center; }
.auth__foot a { display: inline-flex; align-items: center; gap: 5px; vertical-align: bottom; }
.auth__foot svg { width: 14px; height: 14px; }
.auth__foot a { color: var(--muted); }
.auth__foot a:hover { color: var(--text); }
.auth__alt { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); text-align: center; }

.field { margin-bottom: 16px; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.field label { display: block; font-size: 14px; font-weight: 400; }
.field__row label { margin: 0; }
.field__row a { font-size: 13px; }
.field > label { margin-bottom: 8px; }
.input { position: relative; }
.input input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); font-weight: 300; background: var(--surface); color: var(--text); font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.input input::placeholder { color: #94a3b8; font-weight: 300; }
.input--icon input { padding-left: 44px; }
.input__icon { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: #94a3b8; pointer-events: none; transition: color .15s; }
.input:focus-within .input__icon { color: var(--accent); }
.input--pass input { padding-right: 48px; }
.input__eye { position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: none; color: #94a3b8; cursor: pointer; border-radius: 0 var(--radius-ctl) var(--radius-ctl) 0; }
.input__eye:hover { color: var(--text); }
.input__eye svg { width: 18px; height: 18px; }

.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 20px; }
.link-muted { font-size: 13px; color: var(--muted); }
.link-muted:hover { color: var(--text); }
.check { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; width: 16px; height: 16px; margin: 0; cursor: pointer; }
.check__box { width: 16px; height: 16px; flex: none; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface) center / 10px 10px no-repeat; transition: background-color .15s, border-color .15s; }
.check:hover .check__box { border-color: var(--muted); }
.check input:checked + .check__box { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.6 9.5 3.6'/%3E%3C/svg%3E"); }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); border-color: var(--accent); }

.btn { width: 100%; height: 48px; border: 0; border-radius: var(--radius-ctl); background: var(--accent); color: #fff; font: 500 15px var(--font); cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--accent-hover); }
.btn:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }

.alert { margin: 0 0 18px; padding: 10px 12px; border: 1px solid #fecdca; border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-size: 14px; }
.alert--ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }

@media (max-width: 480px) {
  .auth { justify-content: flex-start; padding-top: 48px; background: var(--surface); }
  body { background: var(--surface); }
  .auth__card { border: 0; padding: 0; }
}
