/* ============================================
   VRA Customer Portal - Login Page Stylesheet
   NOTE: Design tokens inherited from layout-improved.css
   ============================================ */

/* Reset and Base Styles */
.login-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    background: linear-gradient(135deg, #0052a3 0%, #1e73be 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Container */
.login-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 0;
    overflow: hidden;
}

/* Image Column */
.login-image-column {
    display: none;
    flex: 1;
    background: linear-gradient(135deg, #0052a3 0%, #1e73be 100%);
    position: relative;
    overflow: hidden;
}

.image-overlay {
    width: 100%;
    height: 100%;
    background-image: url(../../images/vra_hydro_plant.jpg);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 60px;
}

.image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 82, 163, 0.4) 0%, rgba(0, 82, 163, 0.8) 100%);
    z-index: 1;
}

.overlay-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.overlay-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
}

.overlay-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
}

/* Form Column */
.login-form-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background-color: #ffffff;
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    height: 60px;
    margin-bottom: 24px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin: 0;
    font-weight: 400;
}

/* Alert Styles */
.alert {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    background-color: #fff5f5;
    color: #e74c3c;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.alert-content {
    display: flex;
    gap: 12px;
}

.alert-icon {
    flex-shrink: 0;
    color: currentColor;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert li {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* Form Group */
.form-group {
    position: relative;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #7f8c8d;
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}

.input-wrapper .form-control {
    padding: 11px 14px 11px 44px;
    font-size: 0.95rem;
    border: 1.5px solid #e0e6ed;
    border-radius: 6px;
    background-color: #ffffff;
    color: #2c3e50;
    transition: all 150ms ease-in-out;
    font-family: inherit;
}

.input-wrapper .form-control::placeholder {
    color: #95a5a6;
}

.input-wrapper .form-control:focus {
    outline: none;
    border-color: #0052a3;
    box-shadow: 0 0 0 3px rgba(0, 82, 163, 0.1);
    background-color: #ffffff;
}

.input-wrapper .form-control.is-invalid {
    border-color: #e74c3c;
}

.input-wrapper .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.invalid-feedback {
    display: block;
    font-size: 0.85rem;
    color: #e74c3c;
    margin-top: 6px;
    font-weight: 500;
}

/* Form Check */
.form-check {
    display: flex;
    align-items: center;
    margin: 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 0;
    margin-right: 8px;
    cursor: pointer;
    border: 1.5px solid #e0e6ed;
    border-radius: 4px;
    transition: all 150ms ease-in-out;
}

.form-check-input:checked {
    background-color: #0052a3;
    border-color: #0052a3;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 82, 163, 0.1);
}

.form-check-label {
    font-size: 0.9rem;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-weight: 500;
}

/* Forgot Password Link */
.forgot-password-link {
    font-size: 0.85rem;
    color: #0052a3;
    text-decoration: none;
    font-weight: 600;
    transition: all 150ms ease-in-out;
}

.forgot-password-link:hover {
    color: #1e73be;
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    background: linear-gradient(135deg, #0052a3 0%, #1e73be 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 82, 163, 0.3);
}

.btn-login:hover {
    background: linear-gradient(135deg, #1e73be 0%, #0052a3 100%);
    box-shadow: 0 8px 20px rgba(0, 82, 163, 0.4);
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 82, 163, 0.3);
}

.button-text {
    display: inline-block;
}

.button-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Divider */
.divider {
    position: relative;
    margin: 24px 0;
    text-align: center;
    color: #95a5a6;
    font-size: 0.85rem;
    font-weight: 500;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e6ed;
    z-index: 1;
}

.divider span {
    position: relative;
    background-color: #ffffff;
    padding: 0 12px;
    z-index: 2;
}

/* Help Text */
.help-text {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin: 0;
    text-align: center;
}

.help-link {
    color: #0052a3;
    text-decoration: none;
    font-weight: 600;
    transition: color 150ms ease-in-out;
}

.help-link:hover {
    color: #1e73be;
    text-decoration: underline;
}

/* Login Footer */
.login-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 40px;
}

.footer-text {
    font-size: 0.8rem;
    color: #95a5a6;
    margin: 0;
}

.footer-link {
    color: #0052a3;
    text-decoration: none;
    transition: color 150ms ease-in-out;
}

.footer-link:hover {
    color: #1e73be;
    text-decoration: underline;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .login-body {
        background: linear-gradient(135deg, #00429f 0%, #0052a3 100%);
    }

    .login-form-column {
        background-color: #1a1a2e;
    }

    .form-wrapper {
        background-color: #1a1a2e;
    }

    .login-title,
    .form-label,
    .form-check-label {
        color: #ecf0f1;
    }

    .login-subtitle,
    .help-text,
    .footer-text {
        color: #bdc3c7;
    }

    .input-wrapper .form-control {
        background-color: #16213e;
        color: #ecf0f1;
        border-color: #2a3f5f;
    }

    .input-wrapper .form-control:focus {
        background-color: #0f3460;
        border-color: #1e73be;
    }

    .alert {
        background-color: rgba(231, 76, 60, 0.1);
    }
}

/* Responsive Design */
@media (min-width: 992px) {
    .login-image-column {
        display: flex;
    }

    .login-form-column {
        flex: 1;
    }
}

@media (max-width: 991.98px) {
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
    }

    .login-form-column {
        min-height: 100vh;
        justify-content: center;
    }

    .form-wrapper {
        padding: 0;
    }
}

@media (max-width: 576px) {
    .login-form-column {
        padding: 24px;
    }

    .login-header {
        margin-bottom: 32px;
    }

    .login-logo {
        height: 50px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .form-wrapper {
        max-width: 100%;
    }

    .divider {
        margin: 20px 0;
    }

    .login-footer {
        bottom: 10px;
        padding: 0 24px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .input-wrapper .form-control,
    .btn-login,
    .form-check-input,
    .forgot-password-link,
    .help-link,
    .footer-link {
        transition: none;
    }

    .btn-login:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .login-container {
        display: none;
    }
}
