/* Logowanie, rejestracja, hasło i strony statusów - wygląd strony głównej (tokeny i przyciski z landing.css). */
body.auth { min-height: 100vh; background: var(--tint); }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); }

/* Lewy panel z logo */
.auth-aside {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 40px; padding: 40px;
    background: radial-gradient(120% 80% at 0% 0%, var(--green-700), var(--green-900) 55%, var(--green-950));
    color: var(--white); overflow: hidden;
}
.auth-aside .logo-badge { align-self: flex-start; }
.auth-aside__body { margin-block: auto; }
.auth-aside h2 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); margin-bottom: 14px; }
.auth-aside__body > p:not(.eyebrow) { color: rgba(255, 255, 255, .72); }
.auth-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; font-weight: 600; }
.auth-points li { display: flex; align-items: center; gap: 12px; }
.auth-points .ico { color: var(--mint); }
.auth-back {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; align-self: flex-start;
    font-weight: 700; color: rgba(255, 255, 255, .75); transition: color .2s;
}
.auth-back:hover { color: var(--white); }
.ico { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Karta z formularzem */
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth-card {
    width: 100%; max-width: 480px; padding: 40px; border-radius: 24px; background: var(--white);
    border: 1px solid var(--line); box-shadow: var(--shadow); animation: fadeUp .5s var(--ease) both;
}
.auth-card--wide { max-width: 1000px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 10px; }
.auth-lead { color: var(--muted); margin-bottom: 26px !important; }
.auth-lead a, .auth-links a, .auth-card .agreements a { color: var(--green-700); font-weight: 700; }
.auth-lead a:hover, .auth-links a:hover { color: var(--red); }
.auth-company-logo { display: block; max-width: 200px; max-height: 90px; margin: 0 auto 24px; object-fit: contain; }

.auth-form { display: grid; gap: 18px; }
.auth-form .btn, .auth-actions .btn { white-space: normal; text-align: center; }
.auth-form .btn, .btn--block { width: 100%; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.auth-actions .btn { flex: 1 1 180px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: .94rem; }
.auth-divider {
    display: flex; align-items: center; gap: 14px; margin: 26px 0; color: var(--muted);
    font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Pole hasła z okiem */
/* .pass-field to <span> w <label> - bez display:block oko pozycjonowało się względem linii tekstu, nie pola */
.pass-field { position: relative; display: block; }
.pass-field input { display: block; padding-right: 54px; }
.auth-eye {
    position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 46px; height: 44px; display: grid; place-items: center;
    border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer;
}
/* Oko dołożone z auth.js (rejestracja): pod polem może pojawić się komunikat walidacji (.error-message w tym samym
   spanie), więc oko trzymamy przy polu (min. 50px), a nie w połowie wysokości całości. */
.pass-field--auto .auth-eye { top: 3px; transform: none; }
.auth-eye:hover, .auth-eye[aria-pressed="true"] { color: var(--green-700); }
.auth-eye .ico { width: 22px; height: 22px; }

/* Komunikaty (#alert-danger / #alert-success sterowane z JS przez display) */
.auth .alert { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: .94rem; margin-bottom: 20px; border: 1px solid transparent; }
.auth .alert p { margin: 0; }
.auth .alert-danger { background: #fdecec; border-color: #f6c4c5; color: #a3171a; }
.auth .alert-success { background: #e8f7f1; border-color: #b9e6d4; color: #075a47; }

/* Formularze rejestracji (fragmenty z Bootstrapem) */
/* register_company_script wstrzykuje po załadowaniu strony (document.ready) własne .form-group/.form-check i absolutne
   checkboxy - stąd body.auth i !important, inaczej checkbox chwilę po wczytaniu przeskakuje na tekst zgody. */
body.auth .auth-card .form-group { margin-bottom: 18px; padding: 0; }
.auth .auth-card label { display: inline-block; margin-bottom: 7px; font-size: .86rem; font-weight: 700; color: var(--ink); }
.auth .form-control {
    height: auto; min-height: 50px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
    background: #fbfcfc; color: var(--ink); font-size: 1rem; font-weight: 500;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.auth .form-control:focus { outline: none; border-color: var(--green-700); background: var(--white); box-shadow: 0 0 0 4px rgba(10, 92, 83, .14); }
.auth .form-text.text-muted { color: var(--muted) !important; font-size: .8rem; }
.auth .required-field::after { content: " *"; color: var(--red); }
.auth .auth-card h3 { font-size: 1.2rem !important; margin-bottom: 18px !important; color: var(--green-900); }
body.auth .auth-card .form-check { margin-bottom: 12px; padding: 0; }
.auth .auth-card .form-check-label { font-weight: 500; font-size: .92rem; line-height: 1.5; }
body.auth .auth-card .form-check input[type=checkbox] { position: static !important; left: auto; flex: none; width: 20px; height: 20px; margin: 2px 12px 0 0; accent-color: var(--red); }
.auth .agreements { position: relative; }
.auth .agreements .form-check-input { position: absolute !important; left: 0; top: 2px; margin: 0; }
.auth .agreements label, .auth .auth-card .form-check-label { cursor: pointer; }
.auth .agreements label { display: block; padding-left: 32px; }
.auth .agreements h6 { margin: 0 !important; font-size: .92rem; font-weight: 500; line-height: 1.5; }
.auth .agreements a { padding-left: 32px; }
.auth .auth-card .btn { border-radius: 999px; }
.auth .btn-primary, .auth .btn-danger { background: var(--red); border-color: transparent; color: var(--white); box-shadow: 0 10px 24px -10px rgba(227, 36, 38, .7); }
.auth .btn-primary:hover, .auth .btn-danger:hover { background: var(--red-600); color: var(--white); }
.auth .btn-secondary { background: transparent; border-color: var(--green-900); color: var(--green-900); }
.auth .btn-secondary:hover { background: var(--green-900); color: var(--white); }
.auth .btn-success { background: var(--green-900); border-color: transparent; color: var(--white); }
.auth .btn-warning { background: #f4b400; border-color: transparent; color: var(--ink); }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; }
    .auth-aside__body { display: none; }
    .auth-aside .logo-badge--lg { padding: 7px 12px; }
    .auth-aside .logo-badge--lg img { height: 30px; }
    .auth-main { align-items: flex-start; padding: 24px 16px 40px; }
    .auth-card { padding: 28px 20px; border-radius: 20px; }
    .auth-card h1 { font-size: 1.45rem; }
}
