#loginView {
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: manipulation;
}

.login-wrapper {
    min-height: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom)) 16px;
    background: #1e3c72;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 24px 22px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    position: relative;
    z-index: 1;
    margin: auto;
}

.login-logo-wrap {
    text-align: center;
    margin-bottom: 14px;
}

.login-logo {
    height: 64px;
    width: 64px;
    object-fit: contain;
    border-radius: 16px;
    padding: 8px;
    background: #e7f1ff;
}

.login-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a2b4a;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.login-subtitle {
    text-align: center;
    font-size: 0.78rem;
    color: #8a94a6;
    margin-bottom: 26px;
    letter-spacing: 1px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f7fa;
    border: 1.5px solid #e9eef5;
    border-radius: 12px;
}

.login-input-group:focus-within {
    background: #fff;
    border-color: #0d6efd;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    font-size: 1.1rem;
    color: #98a2b3;
    pointer-events: none;
}

.login-input-group:focus-within .login-input-icon {
    color: #0d6efd;
}

.login-input-group input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: 14px 14px 14px 44px;
    font-size: 0.95rem;
    color: #1a2b4a;
    border-radius: 12px;
}

.login-input-group input::placeholder {
    color: #b0b8c4;
}

.login-eye {
    background: none;
    border: none;
    padding: 0 14px;
    cursor: pointer;
    color: #98a2b3;
    font-size: 1.05rem;
    min-height: unset;
    height: auto;
}

.login-eye:hover {
    color: #0d6efd;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 4px;
    user-select: none;
}

.login-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #0d6efd;
    cursor: pointer;
}

.login-remember label {
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    margin: 0;
}

.login-btn {
    margin-top: 6px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #0d6efd;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn:active {
    background: #0a58ca;
}

.login-footer {
    text-align: center;
    font-size: 0.72rem;
    color: #aab2be;
    margin: 22px 0 0;
    letter-spacing: 0.5px;
}

@media (max-width: 400px) {
    .login-card {
        padding: 26px 18px 16px;
        border-radius: 18px;
    }
    .login-logo {
        height: 56px;
        width: 56px;
    }
    .login-title {
        font-size: 1.2rem;
    }
}

@media (max-height: 620px) {
    #loginView {
        overflow-y: auto;
    }
}