* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family: "Quicksand", sans-serif;
    background: linear-gradient(135deg, #f9baa6 0%, #f7c3a7 18%, #58a8d6 58%, #1a8dd0 100%);
    background-attachment: fixed;
    overflow: hidden;
}

body {
    min-height: 100vh;
    position: relative;
}

.login-field {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.login-box {
    width: min(100%, 420px);
    padding: 36px 28px 28px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    box-shadow:
        0 24px 50px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    z-index: 5;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.logo img {
    max-width: 170px;
    height: auto;
    display: block;
}

.heading-login-box {
    margin-bottom: 24px;
    color: #16384f;
    text-align: center;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.3;
}

.form-group {
    margin-bottom: 16px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 105, 173, 0.10);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transition: all 0.25s ease;
    overflow: hidden;
}

.input-wrap:focus-within {
    border-color: rgba(0, 105, 173, 0.35);
    box-shadow: 0 0 0 4px rgba(26, 141, 208, 0.10);
    transform: translateY(-1px);
}

.input-wrap.error {
    border-color: rgba(231, 76, 60, 0.45);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.10);
    animation: shake 0.35s ease;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }

    100% {
        transform: translateX(0);
    }
}

.input-icon,
.toggle-password {
    width: 48px;
    min-width: 48px;
    text-align: center;
    font-size: 18px;
    color: #46708c;
    opacity: 0.95;
    border: none;
    background: transparent;
    outline: none;
}

.toggle-password {
    cursor: pointer;
    font-size: 17px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.toggle-password:hover {
    transform: scale(1.08);
    opacity: 1;
}

.user-box-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 16px 8px 16px 0;
    color: #304f63;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
}

.user-box-input::placeholder {
    color: #6f8a99;
    font-weight: 500;
}

.login-box-button {
    width: 100%;
    border: none;
    outline: none;
    margin-top: 10px;
    padding: 15px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a8dd0, #0069ad);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 12px 24px rgba(0, 105, 173, 0.24);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-box-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(0, 105, 173, 0.28);
}

.login-box-button:active {
    transform: translateY(0);
}

.login-box-button:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    transform: none;
}

.button-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    display: none;
}

.login-box-button.loading .button-spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.square {
    height: 100vh;
    width: 50vw;
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
    z-index: 1;
    pointer-events: none;
    border-radius: 16px;
}

.square.square-tl {
    top: -80%;
    left: -10%;
    animation: bounce 6s infinite ease-in-out;
    background: rgba(34, 34, 34, 0.08);
}

.square.square-tr {
    top: 0%;
    right: -30%;
    animation: bounce 5s infinite ease-in-out;
}

.square.square-bl {
    bottom: -70%;
    left: -15%;
    animation: bounce 4s infinite ease-in-out;
}

.square.square-br {
    bottom: 0%;
    right: -40%;
    animation: bounce 3s infinite ease-in-out;
    background: rgba(34, 34, 34, 0.08);
}

@keyframes bounce {
    0% {
        transform: translateY(0px) rotate(45deg);
    }

    50% {
        transform: translateY(20px) rotate(45deg);
        border-radius: 16px;
    }

    100% {
        transform: translateY(0px) rotate(45deg);
    }
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 20, 35, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.28s ease;
    z-index: 9999;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-card {
    width: min(100%, 360px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 24px 22px 20px;
    text-align: center;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(18px) scale(0.95);
    transition: all 0.28s ease;
}

.modal.show .modal-card {
    transform: translateY(0) scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
}

.modal-icon.warning {
    background: linear-gradient(135deg, #ffd26f, #f39c12);
    color: #fff;
}

.modal-icon.error {
    background: linear-gradient(135deg, #ff8d7a, #e74c3c);
    color: #fff;
}

.modal-title {
    color: #173a4b;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-message {
    color: #5a7180;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.modal-button {
    min-width: 120px;
    border: none;
    outline: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, #1a8dd0, #0069ad);
    color: #fff;
    transition: all 0.22s ease;
    box-shadow: 0 10px 20px rgba(0, 105, 173, 0.22);
}

.modal-button:hover {
    transform: translateY(-1px);
}

@media (max-width: 576px) {
    .login-field {
        padding: 18px;
    }

    .login-box {
        width: 100%;
        max-width: 360px;
        padding: 28px 20px 22px;
        border-radius: 16px;
    }

    .logo img {
        max-width: 145px;
    }

    .heading-login-box {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .input-wrap {
        border-radius: 14px;
    }

    .input-icon,
    .toggle-password {
        width: 44px;
        min-width: 44px;
        font-size: 17px;
    }

    .user-box-input {
        padding: 14px 8px 14px 0;
        font-size: 14px;
    }

    .login-box-button {
        font-size: 14px;
        border-radius: 14px;
        padding: 14px 16px;
    }

    .modal-card {
        border-radius: 16px;
        padding: 22px 18px 18px;
    }

    .modal-icon {
        width: 58px;
        height: 58px;
        font-size: 25px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-message {
        font-size: 14px;
    }
}

@media (max-width: 360px) {
    .heading-login-box {
        font-size: 20px;
    }

    .user-box-input,
    .login-box-button,
    .modal-message {
        font-size: 13px;
    }
}