/* login.css - Panel logowania AutoBaza */
/* VBaza System */

/* ===== RESET I PODSTAWOWE STYLE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

/* ===== GŁÓWNY KONTENER ===== */
.split-container {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

/* ===== LEWA STRONA - PANEL LOGOWANIA ===== */
.left-side {
    flex: 1;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.login-wrapper {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.logo-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.cars-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-small h1 {
    color: #000000;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    color: #000000;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
}

.login-form {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000000;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-group label i {
    color: #ff3333;
    width: 20px;
}

.input-group input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.input-group input:focus {
    outline: none;
    border-color: #ff3333;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 51, 51, 0.15);
}

.input-group input::placeholder {
    color: #999;
    font-size: 13px;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 14px;
    z-index: 2;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: rgba(255, 51, 51, 0.1);
    color: #ff3333;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remember-me input[type="checkbox"]:checked {
    background: #ff3333;
    border-color: #ff3333;
    accent-color: #ff3333;
}

.remember-me label {
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff3333, #cc0000);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #ff0000, #b30000);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-login i {
    font-size: 16px;
}

/* ===== PRAWA STRONA - BRANDING ===== */
.right-side {
    flex: 1;
    background: linear-gradient(135deg, #999999 0%, #CCCCCC 100%);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.branding-wrapper {
    text-align: center;
    color: #333;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-large {
    margin-bottom: 30px;
}

.logo-container {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.branding-content {
    margin-bottom: 30px;
}

.brand-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.brand-title a {
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.4);
    display: inline-block;
}

.brand-title a:hover {
    color: #ff0000;
    background: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.branding-footer {
    margin-top: 20px;
    padding: 12px 20px;
    color: #000;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    width: auto;
    text-align: center;
}

/* ===== STOPKA GLOBALNA ===== */
.global-footer {
    width: 100%;
    max-width: 1100px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    text-align: center;
    font-size: 9px;
    color: #333;
    border-top: 1px solid #ffffff;
    margin: 10px auto 0;
    border-radius: 2px;
}

.global-footer .footer-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

.global-footer p {
    margin: 5px 0;
    color: #555;
}

.global-footer p:first-child {
    font-weight: 700;
    color: #ff3333;
}

/* ===== KOMUNIKATY ===== */
.login-message {
    margin-top: 1.5rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
    animation: slideIn 0.3s ease;
}

.error-message, .success-message {
    padding: 10px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
    display: none;
    animation: fadeIn 0.3s ease;
}

/* ===== ANIMACJE ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== RESPONSYWNOŚĆ ===== */
@media (max-width: 1024px) {
    .split-container {
        max-width: 95%;
    }
    
    .logo-small h1 {
        font-size: 32px;
        letter-spacing: 3px;
    }
    
    .logo-container {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        border-radius: 15px;
        margin: 0 auto;
    }
    
    .left-side, .right-side {
        padding: 35px 25px;
        width: 100%;
    }
    
    .right-side {
        order: -1;
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    .login-wrapper {
        max-width: 100%;
    }
    
    .logo-small h1 {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .logo-container {
        width: 200px;
        height: 200px;
        padding: 25px;
    }
    
    .global-footer {
        margin-top: 0;
        border-radius: 0 0 15px 15px;
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 0;
    }
    
    .split-container {
        border-radius: 0;
        box-shadow: none;
        margin: 0;
    }
    
    .left-side, .right-side {
        padding: 30px 20px;
    }
    
    .logo-small h1 {
        font-size: 24px;
        letter-spacing: 1.5px;
    }
    
    .cars-logo {
        width: 40px;
        height: 40px;
    }
    
    .login-header h2 {
        font-size: 14px;
    }
    
    .logo-container {
        width: 160px;
        height: 160px;
        padding: 20px;
    }
    
    .input-group input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 14px;
    }
    
    .global-footer {
        font-size: 9px;
        padding: 10px;
    }
}

@media (max-width: 360px) {
    .left-side, .right-side {
        padding: 25px 15px;
    }
    
    .logo-small h1 {
        font-size: 22px;
        letter-spacing: 1px;
    }
    
    .cars-logo {
        width: 35px;
        height: 35px;
    }
    
    .logo-container {
        width: 140px;
        height: 140px;
        padding: 15px;
    }
}

/* ===== OBSŁUGA DOTYKU ===== */
@media (hover: none) and (pointer: coarse) {
    .btn-login:hover {
        transform: none;
        box-shadow: none;
    }
    
    .password-toggle:hover {
        background: none;
    }
    
    .brand-title a:hover {
        background: rgba(255, 255, 255, 0.4);
        transform: none;
    }
}

/* ===== POPRAWKI DLA iOS ===== */
@supports (-webkit-touch-callout: none) {
    .input-group input {
        font-size: 16px !important;
    }
    
    .btn-login {
        -webkit-tap-highlight-color: rgba(255, 51, 51, 0.3);
    }
}