/* ===== ZEUS ERP - LOGIN STYLES ===== */

:root {
    --zeus-red: #8B0000;
    --zeus-dark-red: #660000;
    --zeus-light-red: #DC143C;
    --zeus-gray: #6c757d;
    --zeus-dark-gray: #495057;
    --zeus-light-gray: #f8f9fa;
    --zeus-very-light-gray: #ffffff;
    --zeus-black: #212529;
    --zeus-white: #ffffff;
}

/* ===== BODY & CONTAINER ===== */
body {
    background: linear-gradient(135deg,
        var(--zeus-light-gray) 0%,
        #e9ecef 25%,
        #dee2e6 50%,
        var(--zeus-gray) 100%);
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    background: var(--zeus-white);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2),
                0 8px 24px rgba(139, 0, 0, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    backdrop-filter: blur(15px);
}

/* ===== MOBILE BRAND BAR ===== */
.login-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    margin: -1.25rem -1.25rem 1.25rem;
    background: linear-gradient(135deg, var(--zeus-red), var(--zeus-dark-red));
    color: var(--zeus-white);
}

.login-mobile-brand__logo {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--zeus-white);
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.login-mobile-brand__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-mobile-brand__text {
    min-width: 0;
}

.login-mobile-brand__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
    line-height: 1.2;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.login-mobile-brand__subtitle {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.92;
    font-weight: 300;
    line-height: 1.3;
}

/* ===== LEFT SIDE - BRANDING (desktop) ===== */
.login-left {
    background: linear-gradient(135deg, var(--zeus-red), var(--zeus-dark-red));
    color: var(--zeus-white);
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* ===== LOGO ===== */
.logo-container {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.logo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--zeus-white);
    padding: 28px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35),
                0 12px 28px rgba(0, 0, 0, 0.25);
    margin-bottom: 28px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.08);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4),
                0 20px 40px rgba(0, 0, 0, 0.3);
}

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

/* ===== BRAND TEXT ===== */
.brand-text {
    position: relative;
    z-index: 2;
}

.brand-title {
    font-size: 3.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.45);
    letter-spacing: -1.5px;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 0;
    font-weight: 300;
}

/* ===== RIGHT SIDE - FORM ===== */
.login-right {
    padding: 1.25rem;
    background: var(--zeus-white);
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
}

/* ===== FORM TITLES ===== */
.form-title {
    color: var(--zeus-black);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle {
    color: var(--zeus-gray);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    line-height: 1.45;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 1.125rem;
    position: relative;
}

.form-label {
    color: var(--zeus-dark-gray);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--zeus-light-gray);
    min-height: 48px;
}

.form-control:focus {
    border-color: var(--zeus-red);
    box-shadow: 0 0 0 0.2rem rgba(139, 0, 0, 0.25);
    background: var(--zeus-white);
}

.login-form .form-control.is-valid,
.login-form .form-control.is-invalid {
    background-image: none;
    padding-right: 16px;
}

.login-form .form-control-with-icon.is-valid,
.login-form .form-control-with-icon.is-invalid {
    padding-left: 45px;
}

.login-form .form-control-with-toggle.is-valid,
.login-form .form-control-with-toggle.is-invalid {
    padding-right: 48px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--zeus-gray);
    pointer-events: none;
    z-index: 2;
}

.input-icon-left {
    left: 15px;
}

.form-control-with-icon {
    padding-left: 45px;
}

.form-control-with-toggle {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--zeus-gray);
    padding: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--zeus-red);
}

.password-toggle:focus {
    outline: none;
    color: var(--zeus-red);
}

/* ===== BUTTONS ===== */
.btn-login {
    background: linear-gradient(135deg, var(--zeus-red), var(--zeus-dark-red));
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--zeus-white);
    width: 100%;
    min-height: 48px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control:focus:valid {
    color: var(--zeus-dark-gray);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.3);
    color: var(--zeus-white);
}

/* ===== REMEMBER ME & FORGOT PASSWORD ===== */
.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

.remember-me input {
    margin-right: 10px;
    accent-color: var(--zeus-red);
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.remember-me label {
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
}

.forgot-password-link {
    color: var(--zeus-red);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--zeus-dark-red);
}

.auth-back-link {
    text-align: center;
    margin-top: 1.25rem;
}

.auth-back-link a {
    color: var(--zeus-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.auth-back-link a:hover {
    color: var(--zeus-red);
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* ===== MOBILE FINE-TUNING ===== */
@media (max-width: 576px) {
    .container {
        padding: 0.75rem;
        padding-top: max(0.75rem, env(safe-area-inset-top));
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
        align-items: flex-start;
    }

    .login-container {
        border-radius: 16px;
    }

    .login-right {
        padding: 1.25rem;
    }

    .login-mobile-brand {
        margin: -1.25rem -1.25rem 1rem;
    }

    .login-options-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}

/* ===== DESKTOP (lg+) ===== */
@media (min-width: 992px) {
    .container {
        padding: 1.25rem;
    }

    .login-container {
        max-width: 1200px;
        border-radius: 28px;
        box-shadow: 0 32px 112px rgba(0, 0, 0, 0.3),
                    0 20px 56px rgba(139, 0, 0, 0.25),
                    0 6px 16px rgba(0, 0, 0, 0.15);
        border-width: 3px;
    }

    .login-left {
        padding: 96px 64px;
    }

    .login-right {
        padding: 96px 72px;
    }

    .form-title {
        margin-bottom: 20px;
    }

    .form-subtitle {
        margin-bottom: 3.5rem;
    }

    .form-group {
        margin-bottom: 25px;
    }

    .btn-login {
        margin-top: 25px;
        font-size: 1.05rem;
    }

    .login-options-row {
        margin-top: 20px;
    }

    .auth-back-link {
        margin-top: 24px;
    }

    .alert {
        margin-bottom: 25px;
    }
}
