/* ─── Strony autoryzacji (logowanie / reset / zmiana hasła) ─────────────────
   Ta sama paleta co app.css: granat (#0f172a) + akcent czerwony (#c8102e). */
:root {
    --primary: #c8102e;
    --primary-dark: #a30d26;
    --success: #15803d;
    --danger: #b91c1c;
    --warning: #b45309;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --border: #cbd5e1;
    --bg: #f5f7fb;
    --ring: 0 0 0 3px rgba(200, 16, 46, .15);
    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

.auth-page {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(200, 16, 46, .10), transparent 60%),
        radial-gradient(900px 500px at 110% 120%, rgba(37, 99, 235, .10), transparent 60%),
        var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px rgba(15, 23, 42, .08);
    padding: 36px 34px 28px;
}

.auth-brand { text-align: center; margin-bottom: 26px; }

.auth-logo {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 14px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #e23a52);
    box-shadow: 0 8px 18px rgba(200, 16, 46, .3);
}
.auth-logo .icon { width: 28px; height: 28px; }

.auth-card h1 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.auth-tagline {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex-shrink: 0; }

/* Komunikaty */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid transparent;
    opacity: 1;
    transition: opacity .5s ease;
}
.alert-icon { width: 18px; height: 18px; margin-top: 1px; }
.alert-error { background: #fdecec; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #e8f6ee; color: #166534; border-color: #bbf7d0; }
.alert-warning { background: #fef5e4; color: #92400e; border-color: #fde68a; }
.alert-info { background: #e8effd; color: #1e40af; border-color: #bfdbfe; }

/* Formularz */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.form-group input {
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-group input::placeholder { color: #94a3b8; }

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}

.form-group input.invalid { border-color: var(--danger); }
.form-group input.invalid:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .15); }

.field-error {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--danger);
    min-height: 16px;
    opacity: 0;
    transition: opacity .2s;
}
.field-error.visible { opacity: 1; }

/* Przycisk */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-block { width: 100%; margin-top: 4px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(200, 16, 46, .3); }
.btn-primary:hover { background: var(--primary-dark); }

/* Linki */
.auth-links {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
}
.auth-links a {
    color: var(--text-2);
    font-weight: 500;
    text-decoration: none;
}
.auth-links a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Wybór języka */
.auth-locale {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
    font-size: 13px;
    color: var(--muted);
}
.auth-locale label { font-weight: 500; }
.auth-locale select {
    padding: 5px 10px;
    font: inherit;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

@media (max-width: 480px) {
    .auth-card { padding: 28px 20px 22px; border-radius: 14px; }
}
