﻿:root {
    --primary-color: #0056b3;
    --primary-hover: #004494;
    --card-bg: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --error-red: #d63031;
    --success-green: #27ae60;
    --border-color: #dfe6e9;
    --input-focus: #74b9ff;
    --radius: 10px;
}

body#login {
    margin: 0;
    background: #FFF;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-page {
    width: 100%;
    max-width: 1200px;
    padding: clamp(12px, 2vw, 28px);
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header & Branding */
.login-header {
    background: var(--atlas-background-color);
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.login-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.logo_title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: #FFF;
}

    .login-brand img {
        height: 30px;
        width: auto;
    }

.logo_title-main {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo_title-sub {
    font-size: 0.62rem;
    font-weight: 600;
}

/* Body & Info Box */
.login-body {
    padding: clamp(14px, 2vw, 24px) clamp(14px, 2vw, 22px);
}

.login-info {
    background: #f1f7ff;
    border-left: 4px solid var(--primary-color);
    padding: 4px 12px;
    margin-bottom: 14px;
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.5;
    border-radius: 4px;
}

/* Form Styling */
.login-field {
    position: relative;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 8px;
}

    .field-label label {
        margin-bottom: 0;
    }

.required-inline {
    display: inline-block;
    font-weight: 700;
    line-height: 1;
}

    .login-field label {
        display: block;
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 8px;
        color: var(--text-main);
    }

.text-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
    box-sizing: border-box;
}

    .text-input:focus {
        border-color: var(--primary-color);
        outline: none;
        box-shadow: 0 0 0 3px rgba(116, 185, 255, 0.2);
    }

/* Password Group */
.login-password {
    display: flex;
    position: relative;
    align-items: center;
}

.login-password .text-input {
    padding-right: 46px;
}

#show_password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #4f5b62;
    cursor: pointer;
    padding: 6px 8px;
    z-index: 5;
    border-radius: 4px;
    line-height: 1;
}

    #show_password:hover {
        color: var(--primary-color);
        background: rgba(0, 86, 179, 0.08);
    }

.login-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Buttons */
.button {
    width: 100%;
    padding: 11px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

    .button:hover {
        background: var(--primary-hover);
    }

    .button:focus-visible,
    .text-input:focus-visible,
    #bt_resetPass:focus-visible,
    #show_password:focus-visible {
        outline: 3px solid rgba(116, 185, 255, 0.45);
        outline-offset: 2px;
    }

    .button:disabled {
        background: #b2bec3;
        cursor: not-allowed;
    }

/* Footer / Reset Link */
.login-footer {
    margin-top: 25px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

#bt_resetPass {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

    #bt_resetPass:hover {
        text-decoration: underline;
    }

/* Notification Messages */
.notification.error {
    color: var(--error-red);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 10px 0;
    line-height: 1.4;
}

span[style*="ForeColor:Red"],
span[style*="color:Red"],
span[style*="color:red"] {
    font-weight: 700;
    margin-left: 4px;
}

/* Password Helper List */
.login-helper {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    font-size: 0.8rem;
}

    .login-helper li {
        color: var(--text-muted);
        margin-bottom: 5px;
        padding-left: 20px;
        position: relative;
    }

        .login-helper li.valid {
            color: var(--success-green);
            font-weight: 600;
        }

/* Modal Popup Overhaul */
.modalBackground {
    background-color: rgba(0, 0, 0, 0.7);
}

.modalPopup {
    background: #fff !important;
    border-radius: var(--radius);
    padding: 0 !important;
    overflow: hidden;
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
    width: 90% !important;
    max-width: 500px !important;
    height: auto !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

    .modalPopup .header,
    .modalPopup .modal-header {
        background: #000;
        color: #fff;
        padding: 20px;
        font-weight: 700;
        font-size: 1.1rem;
    }

    .modalPopup .body,
    .modalPopup .modal-body-content {
        padding: 30px;
        max-height: 60vh !important;
        overflow-y: auto;
    }

.modal-footer-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

    .modal-footer-btns .button {
        flex: 1 1 0;
    }

/* Mobile Adjustments */
@media (max-width: 480px) {
    .login-card {
        border-radius: 0;
        min-height: 100vh;
        min-height: 100dvh;
        max-width: none;
    }

    body#login {
        background: #fff;
        display: block;
    }

    .login-body {
        padding: 8px 14px;
    }

    .login-info {
        font-size: 0.8rem;
    }

    .login-actions {
        flex-direction: column;
    }

    .login-actions .button,
    .button {
        padding: 9px 10px;
        font-size: 0.9rem;
        letter-spacing: 0.4px;
    }

    #show_password {
        right: 4px;
        padding: 6px 7px;
    }

    .modal-footer-btns {
        flex-direction: column;
    }
}

@media (min-width: 481px) and (max-width: 900px) {
    .login-card {
        max-width: 430px;
    }
}
