/* =========================================================
   Nordan SMS Portal
   Step 1 - Login Page Styles
   Version: 1.0.0
========================================================= */

/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    font-size: 16px;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #222222;
    background:
        linear-gradient(
            180deg,
            #454545 0%,
            #555555 100%
        );
    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================
   LOGIN PAGE
========================= */

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* =========================
   LOGIN CARD
========================= */

.login-card {
    width: 100%;
    max-width: 650px;
    min-height: 850px;
    padding: 58px 30px 44px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

/* =========================
   BRAND AREA
========================= */

.brand-area {
    width: 100%;
    margin-bottom: 40px;
    text-align: center;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 350px;
    height: 225px;
    margin: 0 auto 6px;
    object-fit: contain;
}

.brand-text {
    display: none;
    margin-bottom: 14px;
    color: #252525;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-text span {
    color: #25aee8;
}

.brand-area p {
    color: #111111;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 600;
}

/* =========================
   ALERT MESSAGE
========================= */

.login-alert {
    width: 100%;
    min-height: 48px;
    margin-bottom: 20px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.login-alert-error {
    color: #9d1c15;
    background: #ffe7e5;
    border: 1px solid #f1b5b0;
}

.login-alert-success {
    color: #256b1f;
    background: #e9f8e7;
    border: 1px solid #add9a8;
}

/* =========================
   FORM
========================= */

#loginForm {
    width: 100%;
}

.form-group {
    width: 100%;
    margin-bottom: 18px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    height: 92px;
    padding: 0 88px 0 126px;
    color: #333333;
    background: #e9e9e9;
    border: 2px solid transparent;
    border-radius: 52px;
    outline: none;
    font-size: 28px;
    line-height: 1;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #9b9b9b;
    opacity: 1;
}

.input-wrapper input:hover {
    background: #ededed;
}

.input-wrapper input:focus {
    background: #f3f3f3;
    border-color: #56bd43;
    box-shadow:
        0 0 0 4px rgba(86, 189, 67, 0.13);
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 62px;
    transform: translateY(-50%);
    color: #6f6f6f;
    font-size: 23px;
    pointer-events: none;
    z-index: 2;
}

/* =========================
   PASSWORD TOGGLE
========================= */

.password-toggle {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #707070;
    background: transparent;
    border: none;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    font-size: 21px;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
    z-index: 4;
}

.password-toggle:hover {
    color: #333333;
    background: rgba(0, 0, 0, 0.05);
}

.password-toggle:focus-visible {
    color: #333333;
    box-shadow:
        0 0 0 3px rgba(86, 189, 67, 0.22);
}

/* =========================
   CAPTCHA
========================= */

.captcha-section {
    width: 100%;
    margin: 22px 0 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.captcha-question {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111111;
    font-size: 27px;
    line-height: 1.4;
    font-weight: 500;
}

.captcha-question strong {
    font-weight: 700;
}

.captcha-refresh {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #54ba42;
    background: transparent;
    border: none;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.captcha-refresh:hover {
    color: #3b9d2e;
    background: rgba(84, 186, 66, 0.1);
    transform: rotate(30deg);
}

.captcha-refresh:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(86, 189, 67, 0.22);
}

.captcha-input {
    width: 220px;
    height: 58px;
    flex: 0 0 auto;
    padding: 0 16px;
    color: #222222;
    background: #ffffff;
    border: 1.5px solid #222222;
    border-radius: 11px;
    outline: none;
    font-size: 22px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.captcha-input::placeholder {
    color: #999999;
}

.captcha-input:focus {
    border-color: #54ba42;
    box-shadow:
        0 0 0 4px rgba(86, 189, 67, 0.12);
}

/* Remove number input arrows */

.captcha-input::-webkit-outer-spin-button,
.captcha-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.captcha-input[type="number"] {
    -moz-appearance: textfield;
}

/* =========================
   LOGIN BUTTON
========================= */

.login-button {
    position: relative;
    width: 100%;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: #55bd43;
    border: none;
    border-radius: 52px;
    outline: none;
    cursor: pointer;
    overflow: hidden;
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow:
        0 3px 8px rgba(65, 154, 51, 0.24);
    transition:
        background-color 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.2s ease;
}

.login-button:hover {
    background: #49aa39;
    box-shadow:
        0 5px 13px rgba(65, 154, 51, 0.3);
}

.login-button:active {
    transform: scale(0.992);
}

.login-button:focus-visible {
    box-shadow:
        0 0 0 5px rgba(86, 189, 67, 0.24);
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.78;
    transform: none;
}

.button-loader {
    display: none;
    width: 25px;
    height: 25px;
    border: 3px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-spin 0.8s linear infinite;
}

.login-button.loading .button-text {
    display: none;
}

.login-button.loading .button-loader {
    display: block;
}

@keyframes login-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================
   CLIENT MESSAGE
========================= */

.client-message {
    min-height: 24px;
    margin-top: 18px;
    text-align: center;
    color: #d93025;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}

.client-message.success {
    color: #328c2b;
}

.client-message.error {
    color: #d93025;
}

/* =========================
   NOSCRIPT
========================= */

.noscript-message {
    position: fixed;
    right: 15px;
    bottom: 15px;
    max-width: 360px;
    padding: 14px 18px;
    color: #ffffff;
    background: #b3261e;
    border-radius: 8px;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
    z-index: 9999;
}

/* =========================
   TABLET
========================= */

@media (max-width: 768px) {
    .login-page {
        padding: 18px 16px;
    }

    .login-card {
        max-width: 100%;
        min-height: calc(100vh - 36px);
        padding: 46px 28px 38px;
        border-radius: 17px;
    }

    .brand-area {
        margin-bottom: 36px;
    }

    .brand-logo {
        max-width: 315px;
        height: 220px;
    }

    .brand-text {
        font-size: 38px;
    }

    .brand-area p {
        font-size: 25px;
    }

    .input-wrapper input {
        height: 88px;
        padding-left: 112px;
        font-size: 25px;
    }

    .input-icon {
        left: 54px;
        font-size: 21px;
    }

    .captcha-question {
        font-size: 23px;
    }

    .captcha-input {
        width: 205px;
        font-size: 20px;
    }

    .login-button {
        height: 88px;
        font-size: 26px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 520px) {
    body {
        background:
            linear-gradient(
                180deg,
                #454545 0%,
                #555555 100%
            );
    }

    .login-page {
        align-items: flex-start;
        padding: 16px;
    }

    .login-card {
        min-height: calc(100vh - 32px);
        padding: 34px 25px 32px;
        border-radius: 17px;
    }

    .brand-area {
        margin-bottom: 31px;
    }

    .brand-logo {
        max-width: 270px;
        height: 205px;
    }

    .brand-text {
        font-size: 34px;
    }

    .brand-area p {
        font-size: 21px;
    }

    .login-alert {
        padding: 11px 13px;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .input-wrapper input {
        height: 72px;
        padding: 0 65px 0 78px;
        border-radius: 42px;
        font-size: 21px;
    }

    .input-icon {
        left: 34px;
        font-size: 18px;
    }

    .password-toggle {
        right: 17px;
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .captcha-section {
        margin: 20px 0 37px;
        gap: 9px;
    }

    .captcha-question {
        gap: 4px;
        font-size: 18px;
    }

    .captcha-refresh {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .captcha-input {
        width: 145px;
        height: 51px;
        padding: 0 11px;
        font-size: 18px;
    }

    .login-button {
        height: 72px;
        border-radius: 42px;
        font-size: 23px;
    }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 390px) {
    .login-page {
        padding: 12px;
    }

    .login-card {
        min-height: calc(100vh - 24px);
        padding: 30px 20px;
    }

    .brand-logo {
        max-width: 235px;
        height: 180px;
    }

    .brand-text {
        font-size: 31px;
    }

    .brand-area p {
        font-size: 19px;
    }

    .input-wrapper input {
        height: 66px;
        padding-left: 68px;
        font-size: 19px;
    }

    .input-icon {
        left: 29px;
    }

    .captcha-section {
        align-items: stretch;
        flex-direction: column;
    }

    .captcha-question {
        justify-content: center;
        font-size: 18px;
    }

    .captcha-input {
        width: 100%;
        height: 52px;
        text-align: center;
    }

    .login-button {
        height: 66px;
        font-size: 21px;
    }
}

/* =========================
   SHORT SCREEN HEIGHT
========================= */

@media (max-height: 720px) and (min-width: 521px) {
    .login-page {
        align-items: flex-start;
    }

    .login-card {
        min-height: auto;
    }

    .brand-logo {
        height: 170px;
    }

    .brand-area {
        margin-bottom: 28px;
    }

    .input-wrapper input {
        height: 75px;
    }

    .login-button {
        height: 75px;
    }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}