/*
|--------------------------------------------------------------------------
| SSAS AUTH MODULE STYLESHEET
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: #25364a;
    background: linear-gradient(rgba(207, 231, 246, .18), rgba(207, 231, 246, .05)),
                url("../img/login_background.jpg");
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(3, 16, 31, .24) 0%, rgba(3, 16, 31, .05) 42%, rgba(3, 16, 31, .12) 100%);
}

.brand-image {
    width: 322px;
    max-width: 78vw;
    height: 78px;
    object-fit: contain;
    margin-bottom: 6px;
}

.subtitle {
    margin: 0 0 20px;
    padding: 0;
    border-radius: 0;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    background: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
    box-shadow: none;
    letter-spacing: .2px;
}

.card,
.login-card {
    width: 380px;
    max-width: 100%;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(64, 91, 114, .22);
    border-radius: 4px;
    box-shadow: 0 10px 36px rgba(29, 54, 74, .22);
    overflow: hidden;
}

.card {
    width: 374px;
}

.card-body {
    padding: 34px 36px 26px;
}

h2 {
    margin: 0 0 22px;
    padding-bottom: 9px;
    border-bottom: 1px solid #c8dbef;
    color: #3c82d7;
    font-size: 20px;
    font-weight: 300;
}

/* ==========================================================================
   FORM FIELDS
   ========================================================================== */

.field {
    position: relative;
    margin-bottom: 13px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    height: 38px;
    border: 1px solid #c6d2df;
    background: #eaf1fb;
    padding: 0 38px;
    font-size: 14px;
    outline: none;
    border-radius: 3px;
    color: #25364a;
    margin-bottom: 12px;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: #ff8a3d;
    box-shadow: 0 0 0 1px #ff8a3d inset;
}

.field.invalid input[type="email"],
.field.invalid input[type="password"],
.field.invalid input[type="text"] {
    border-color: #d93030;
    background: #fff5f5;
    box-shadow: 0 0 0 1px rgba(217, 48, 48, .2) inset;
}

.field.valid input[type="email"],
.field.valid input[type="password"],
.field.valid input[type="text"] {
    border-color: #1f9d55;
    background: #f4fff8;
    box-shadow: 0 0 0 1px rgba(31, 157, 85, .22) inset;
}

.field.invalid .field-icon,
.field.invalid .toggle-pw {
    color: #c02d2d;
}

.field.valid .field-icon,
.field.valid .toggle-pw {
    color: #1f9d55;
}

.field-error {
    display: block;
    margin: -7px 0 8px;
    color: #9a2626;
    font-size: 12px;
    font-weight: 700;
}

.field-icon {
    position: absolute;
    left: 12px;
    top: 11px;
    width: 16px;
    height: 16px;
    color: #7a96b4;
    pointer-events: none;
}

.field-icon svg {
    width: 15px;
    height: 15px;
}

/* Password eye icon */
.toggle-pw {
    position: absolute;
    right: 10px;
    top: 19px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: #7a96b4;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.toggle-pw:hover {
    color: #448dca;
    background: transparent;
}

.toggle-pw svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.button-row,
.login-row {
    display: flex;
    justify-content: flex-end;
}

.button-row {
    margin-top: 12px;
}

.login-row {
    margin: 20px 0 6px;
}

button,
.btn-login {
    min-width: 110px;
    height: 38px;
    border: 0;
    border-radius: 4px;
    background: #448dca;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}

button {
    min-width: 130px;
}

button:hover,
.btn-login:hover {
    background: #287abc;
}

/* ==========================================================================
   MESSAGES
   ========================================================================== */

.message {
    display: none;
    border-radius: 8px;
    padding: 9px 10px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
}

.message.show {
    display: block;
}

.message.success {
    background: #e5f6ed;
    border: 1px solid #b9e5c9;
    color: #177345;
}

.message.error {
    background: #fdeaea;
    border: 1px solid #f2c1c1;
    color: #9a2626;
}

/* ==========================================================================
   LINKS
   ========================================================================== */

.back {
    display: block;
    padding: 12px 14px;
    background: #4a94cf;
    color: #fff56d;
    text-decoration: none;
    font-size: 16px;
    text-align: center;
    width: 374px;
    max-width: 100%;
}

.forgot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    background: #4a94cf;
    color: #fff56d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s;
}

.forgot:hover {
    background: #3a7fb8;
}

.forgot svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ==========================================================================
   LOCAL RESET UI
   ========================================================================== */

.local-reset {
    margin: 14px 0 4px;
    padding: 12px;
    border: 1px solid #b9d4f5;
    background: #eef6ff;
    color: #244467;
    font-size: 13px;
    line-height: 1.45;
}

.local-reset strong {
    display: block;
    margin-bottom: 6px;
    color: #0755b8;
}

.local-reset a {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    background: #075fd8;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    word-break: break-word;
}

.local-reset a:hover {
    background: #004aa8;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 480px) {
    .page {
        padding: 16px;
    }

    .brand-image {
        width: 260px;
        height: auto;
    }

    .subtitle {
        font-size: 26px;
        margin-bottom: 16px;
    }

    .card,
    .login-card,
    .back {
        width: 100%;
    }

    .card-body {
        padding: 26px 22px 22px;
    }

    h2 {
        font-size: 18px;
    }

    input[type="email"],
    input[type="password"],
    input[type="text"] {
        height: 40px;
        font-size: 14px;
    }

    .toggle-pw {
        top: 20px;
    }

    .forgot {
        font-size: 13px;
        padding: 12px 14px;
    }
}
