/*
 * Strony bez logowania (logowanie, rejestracja, reset hasła, panel operatora) — identyfikacja Detailist.
 * Desktop: ciemny panel z hasłem po lewej, formularz po prawej. Telefon: ciemny nagłówek + biały arkusz.
 * Fonty: styles/fonts.css (Outfit, Inter z repozytorium), tokeny: styles/tokens.css.
 */

.auth {
    --dl-navy: #0b1220;
    --dl-navy-2: #0d1f30;
    --dl-accent: #22b8e6;
    --dl-accent-hover: #1ca6d1;
    --dl-link: #0a6e91;
    --dl-ink: #0b1220;
    --dl-muted: #5b6472;
    --dl-soft: #3a4352;
    --dl-border: #c9d3de;
    --dl-hero-text: #c9d1dc;
    --dl-footer: #9aa4b2;
    --dl-display: 'Outfit', 'Inter', system-ui, sans-serif;

    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--dl-ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

/* ---------- panel z hasłem (ciemny) ---------- */
.auth-hero {
    position: relative;
    overflow: hidden;
    background: var(--dl-navy);
    color: #fff;
    padding: 3.5rem 1.5rem 4rem;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .auth-star {
    position: absolute; z-index: 0; color: var(--dl-navy-2); pointer-events: none;
    width: 18rem; height: 18rem; top: -6rem; right: -5.5rem;
}
.auth-logo { display: inline-block; line-height: 0; }
.auth-logo img { height: 1.875rem; width: auto; }
.auth-headline {
    font-family: var(--dl-display); font-weight: 700; letter-spacing: -0.03em;
    font-size: clamp(1.375rem, 6.2vw, 2rem); line-height: 1.15; margin: 1.5rem 0 0; color: #fff;
}
.auth-headline .accent { color: var(--dl-accent); }
.auth-lead, .auth-hero-footer { display: none; }

/* ---------- arkusz z formularzem ---------- */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative; z-index: 2;
    margin-top: -2rem;
    background: #fff;
    border-radius: 1.75rem 1.75rem 0 0;
    padding: 2.25rem 1.5rem 1.5rem;
}
.auth-form { width: 100%; max-width: 25rem; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }
.auth-form > form, .auth-form > .auth-body { flex: 0 0 auto; }

.auth-title {
    font-family: var(--dl-display); font-weight: 700; letter-spacing: -0.03em;
    font-size: 1.875rem; line-height: 1.15; margin: 0 0 1.5rem; color: var(--dl-ink);
}
.auth-subtitle { color: var(--dl-muted); margin: -1rem 0 1.5rem; }
.auth-subtitle.auth-subtitle-desktop { display: none; }

.auth .form-label { font-weight: 500; color: var(--dl-ink); margin-bottom: .5rem; font-size: 1rem; }
.auth .form-control {
    height: 3.25rem; padding: .75rem 1rem; font-size: 1rem; color: var(--dl-ink);
    border: 1px solid var(--dl-border); border-radius: .75rem; background: #fff; box-shadow: none;
}
.auth textarea.form-control { height: auto; }
.auth .form-control::placeholder { color: #757575; opacity: 1; }
.auth .form-control:focus { border-color: var(--dl-accent); box-shadow: 0 0 0 3px rgba(34, 184, 230, .25); }
.auth .form-control.is-invalid { border-color: #dc3545; }
.auth .form-text { color: var(--dl-muted); }
.auth .mb-field { margin-bottom: 1.25rem; }

.auth .password-field { position: relative; }
.auth .password-field .form-control { padding-right: 3.25rem; }
.auth .password-toggle {
    position: absolute; top: 0; right: 0; height: 3.25rem; width: 3.25rem;
    display: flex; align-items: center; justify-content: center;
    border: 0; background: none; color: #5b6472; font-size: 1.375rem; border-radius: .75rem;
}
.auth .password-toggle:focus-visible { outline: 2px solid var(--dl-accent); outline-offset: -2px; }

.auth .form-check { display: flex; align-items: center; gap: .75rem; padding-left: 0; min-height: 1.5rem; margin: 0; }
.auth .form-check-input {
    float: none; margin: 0; flex: 0 0 auto; width: 1.375rem; height: 1.375rem;
    border: 1.5px solid #6b7280; border-radius: .3rem;
}
.auth .form-check-input:checked { background-color: var(--dl-navy); border-color: var(--dl-navy); }
.auth .form-check-input:focus { box-shadow: 0 0 0 3px rgba(34, 184, 230, .25); border-color: var(--dl-accent); }
.auth .form-check-label { color: var(--dl-ink); }

.auth a { color: var(--dl-link); font-weight: 500; text-decoration: underline; text-underline-offset: .15em; }
.auth a:hover { color: var(--dl-navy); }
.auth .label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.auth .options-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.75rem 0 2rem; }
.auth .forgot-desktop { display: none; }

.auth .btn-brand {
    display: block; width: 100%; height: 3.5rem; border: 0; border-radius: 1rem;
    background: var(--dl-accent); color: var(--dl-navy); font-weight: 600; font-size: 1.125rem;
    transition: background-color .15s ease;
}
.auth .btn-brand:hover { background: var(--dl-accent-hover); color: var(--dl-navy); }
.auth .btn-brand:focus-visible { outline: 3px solid var(--dl-navy); outline-offset: 2px; }

.auth .alert { border-radius: .75rem; }
.auth-switch { margin-top: auto; padding-top: 2.5rem; text-align: center; color: var(--dl-soft); }
.auth-referral { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; margin: 0 0 1.5rem; border: 1px solid #e9ebec; border-radius: .5rem; color: var(--dl-muted); }
.auth-referral-logo { max-height: 40px; max-width: 140px; width: auto; object-fit: contain; }
.auth-note { color: var(--dl-muted); font-size: .875rem; text-align: center; margin: 1rem 0 0; }

/* Inne szablony (operator) wciąż mogą używać karty Velzona — bez ramki i cienia w tym layoucie. */
.auth-form .card { border: 0; box-shadow: none; background: transparent; margin: 0 !important; }
.auth-form .card-body { padding: 0 !important; }

/* ---------- desktop ---------- */
@media (min-width: 992px) {
    .auth { flex-direction: row; }
    .auth-hero {
        flex: 0 0 54%;
        display: flex; flex-direction: column;
        min-height: 100vh; min-height: 100dvh;
        padding: 3rem 4rem 2.5rem;
    }
    .auth-hero .auth-star { width: 30rem; height: 30rem; top: auto; bottom: calc(18vh - 15rem); right: calc(20% - 15rem); }
    .auth-logo img { height: 2.5rem; }
    .auth-hero-copy { margin: auto 0; padding: 4rem 0; }
    .auth-headline { font-size: clamp(3rem, 4.6vw, 4.5rem); line-height: 1.02; margin: 0; }
    .auth-headline .accent { display: block; }
    .auth-lead { display: block; color: var(--dl-hero-text); font-size: 1.25rem; line-height: 1.55; max-width: 38rem; margin: 2rem 0 0; }
    .auth-hero-footer {
        display: flex; justify-content: space-between; align-items: center; gap: 1rem;
        color: var(--dl-footer); font-size: .9375rem;
    }
    .auth-hero-footer nav { display: flex; gap: 1.75rem; }
    .auth-hero-footer a { color: var(--dl-footer); font-weight: 400; }
    .auth-hero-footer a:hover { color: #fff; }

    .auth-main { margin: 0; border-radius: 0; justify-content: center; padding: 3rem 2rem; }
    .auth-form { flex: 0 0 auto; }
    .auth-title { font-size: 2.5rem; margin-bottom: 1rem; }
    .auth-subtitle, .auth-subtitle.auth-subtitle-desktop { display: block; margin: 0 0 2rem; font-size: 1.125rem; }
    .auth .forgot-desktop { display: inline; }
    .auth .forgot-mobile { display: none; }
    .auth .options-row { margin: 1.5rem 0 2rem; }
    .auth-switch { margin-top: 0; padding-top: 1.75rem; }
}

/* Zgoda na cookies marketingowe (Meta Pixel) — tylko strony publiczne */
.cookie-consent { position: fixed; z-index: 1080; left: 1rem; right: 1rem; bottom: 1rem; max-width: 34rem; margin-left: auto; padding: 1rem 1.25rem; background: #fff; color: #212529; border-radius: .75rem; box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .18); font-size: .875rem; }
