﻿/* Base page */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to bottom right, #f8f9fb, #ffffff);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Container that holds the card and modals */
.login-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    box-sizing: border-box;
}

/* Logo above the form */
.logo {
    text-align: center;
    margin-bottom: 24px;
}

    .logo img {
        max-width: 180px;
        width: auto;
        height: auto;
        display: inline-block;
    }

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* show via script */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal backdrop + centering */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.modal-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-sizing: border-box;
}

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    cursor: pointer;
    color: #004f8b;
}

    .close-btn:hover {
        color: #000000;
    }

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

/* Button styles */
.btn {
    background-color: #004f8b;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

    .btn:hover {
        background-color: #003f7b;
    }

.btn-cancel {
    background-color: #e0e0e0;
    color: #333333;
}

/* Main card layout */
.card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 40px;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
    margin: 0 auto;
}

.form-section {
    flex: 2;
}

.illustration {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .illustration img {
        width: 100%;
        max-width: 350px;
        display: block;
    }

/* Form actions: stacked layout */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.forgot-password {
    font-size: 14px;
    color: #004f8b;
    text-decoration: none;
    align-self: flex-start;
}

    .forgot-password:hover {
        text-decoration: underline;
    }

.form-actions .btn {
    width: 100%;
    text-align: center;
}

/* Responsive: illustration hides on narrow viewports */
@media (max-width: 768px) {
    .card {
        flex-direction: column;
        padding: 24px;
        align-items: center;
    }

    .illustration {
        display: none;
    }

    .logo img {
        max-width: 140px;
    }
}


/* error text */
.field-validation-error {
    color: #dc3545; /* a subtle “danger” red */
    font-size: 0.85em;
    margin-top: 4px;
    display: block;
}

/* highlight invalid inputs */
.input-validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.25);
}

/* optional: validation summary */
.validation-summary {
    border: 1px solid #dc3545;
    background: rgba(220, 53, 69, 0.05);
    padding: 12px;
    margin-bottom: 20px;
    color: #721c24;
    border-radius: 4px;
}