:root {
    --brand-bg: #020617;
    --brand-green: #2ecc71;
    --brand-green-hover: #27ae60;
    --brand-green-glow: rgba(46, 204, 113, 0.5);
    --auth-panel-bg: rgba(15, 23, 42, 0.65);
    --auth-border: rgba(255, 255, 255, 0.1);
}

body.auth-page {
    background-color: var(--brand-bg);
    position: relative;
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.auth-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-bg-picture {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}

.auth-bg-image {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.5) contrast(1.2);
}

.auth-bg-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0.95) 100%);
    z-index: 1;
}

.auth-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}
.auth-logo:hover { transform: scale(1.05); }

.auth-card {
    background: var(--auth-panel-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--auth-border);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    max-width: 1100px;
}

.auth-title { font-size: 2.2rem; font-weight: 900; color: #fff; margin-bottom: 5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.auth-subtitle { color: #cbd5e1; font-size: 1.05rem; line-height: 1.5; }

.input-icon-wrapper { position: relative; display: flex; align-items: center; }

.input-icon { position: absolute; left: 18px; color: #94a3b8; width: 20px; height: 20px; pointer-events: none; transition: color 0.3s ease; }

.auth-input {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    padding: 16px 20px 16px 50px !important;
    border-radius: 16px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.auth-input::placeholder { color: #64748b; }

.auth-input:focus {
    background: rgba(0, 0, 0, 0.6) !important;
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 4px var(--brand-green-glow), inset 0 2px 4px rgba(0,0,0,0.5) !important;
    outline: none;
}

.auth-input:focus ~ .input-icon, .auth-input:focus + .input-icon { color: var(--brand-green); }

.btn-toggle-pass {
    position: absolute; right: 15px; background: none; border: none; color: #94a3b8; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.btn-toggle-pass:hover { color: var(--brand-green); }

.custom-checkbox .form-check-input { background-color: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.2); cursor: pointer; }
.custom-checkbox .form-check-input:checked { background-color: var(--brand-green); border-color: var(--brand-green); }

.btn-auth-primary {
    background: linear-gradient(135deg, var(--brand-green) 0%, #10b981 50%);
    color: #020617;
    border: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px var(--brand-green-glow), inset 0 2px 0 rgba(255,255,255,0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-auth-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(46, 204, 113, 0.6), inset 0 2px 0 rgba(255,255,255,0.6);
    background: linear-gradient(135deg, #42d383 0%, var(--brand-green) 100%);
}

.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
    z-index: 0;
}
@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.auth-link {
    color: var(--brand-green); text-decoration: none; font-weight: 800; font-size: 0.95rem;
    transition: all 0.2s ease; text-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
}
.auth-link:hover { color: #fff; text-shadow: 0 0 20px var(--brand-green); text-decoration: none; }

.text-brand-green { color: var(--brand-green) !important; text-shadow: 0 0 10px var(--brand-green-glow); }

.auth-divider-line { width: 2px; height: 120px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.15) 50%, transparent); }
.auth-divider-text { color: #94a3b8; font-weight: 800; font-size: 0.85rem; padding: 15px 0; }
.auth-divider-mobile { border-color: rgba(255,255,255,0.15); margin: 0; }
.auth-divider-text-mobile { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #111827; padding: 0 15px; color: #94a3b8; font-size: 0.8rem; font-weight: 800; letter-spacing: 1px; border-radius: 20px; }

.social-title { color: #fff; font-size: 1.4rem; font-weight: 900; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }

.btn-social {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    width: 100%; padding: 12px 18px; border-radius: 16px;
    font-weight: 800; font-size: 1.05rem; transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-google { background: #ffffff; color: #334155; box-shadow: 0 6px 15px rgba(0,0,0,0.3); }
.btn-google:hover { background: #f8fafc; color: #0f172a; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.btn-facebook { background: #1877F2; color: #ffffff; box-shadow: 0 6px 15px rgba(24, 119, 242, 0.3); border: 1px solid rgba(255,255,255,0.1); }
.btn-facebook:hover { background: #166fe5; color: #ffffff; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(24, 119, 242, 0.5); }
.btn-apple { background: #000000; color: #ffffff; box-shadow: 0 6px 15px rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.2); }
.btn-apple:hover { background: #1a1a1a; color: #ffffff; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.6); border-color: rgba(255,255,255,0.4); }

@media (max-width: 991px) {
    .auth-card { padding: 35px 25px; border-radius: 24px; }
    .auth-title { font-size: 1.8rem; }
    .auth-form-section { padding-right: 0 !important; }
}

.auth-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-benefits-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-benefits-list li i {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 5px var(--brand-green-glow));
    flex-shrink: 0;
}

.auth-benefits-list li strong {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

@keyframes pulseGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.error-status-code {
    font-size: 7rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand-green) 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 40px var(--brand-green-glow);
    letter-spacing: -4px;
}

.floating-icon {
    animation: floatUpDown 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

@keyframes floatUpDown {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.error-terminal {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .error-status-code { font-size: 5rem; letter-spacing: -2px; }
}

/* =========================================
   KOZACKIE ALERTY (GLASSMORPHISM TOASTS)
   ========================================= */

.auth-toast {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Animacja wjazdu od góry z efektem sprężyny */
    animation: toastSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
}

@keyframes toastSlideIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Magiczna poświata pod ikoną (Glow) */
.toast-icon-box::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: inherit;
    filter: blur(12px);
    opacity: 0.6;
    z-index: -1;
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.toast-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.toast-message {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.4;
}

.auth-toast-danger {
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.15), inset 0 0 0 1px rgba(239, 68, 68, 0.1);
}
.auth-toast-danger .toast-icon-box {
    background: rgba(239, 68, 68, 0.15);
    color: #ff4757;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.auth-toast-success {
    box-shadow: 0 10px 30px var(--brand-green-glow), inset 0 0 0 1px rgba(46, 204, 113, 0.15);
}
.auth-toast-success .toast-icon-box {
    background: rgba(46, 204, 113, 0.15);
    color: var(--brand-green);
    border: 1px solid rgba(46, 204, 113, 0.3);
}